@koda-sl/baker-cli 0.546.0-dev.e8b0ca6de → 0.547.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 (914) hide show
  1. package/README.md +3 -18
  2. package/dist/account-2HJ4GKHN.js +82 -0
  3. package/dist/account-MTMCQQYH.js +82 -0
  4. package/dist/account-reads-X36NPCX5.js +219 -0
  5. package/dist/account-users-FJ63HUJT.js +64 -0
  6. package/dist/account-writes-FZ3KCJZY.js +68 -0
  7. package/dist/accounts-PU2GGSH4.js +701 -0
  8. package/dist/accounts-VYQINKID.js +80 -0
  9. package/dist/actions-NKCYYR7Q.js +55 -0
  10. package/dist/activecampaign-LQHDIHN5.js +938 -0
  11. package/dist/ad-group-writes-XGG3WQEO.js +172 -0
  12. package/dist/ad-groups-GZIPUN64.js +70 -0
  13. package/dist/ad-writes-2VTRWQLW.js +176 -0
  14. package/dist/add-6EHN5G6X.js +107 -0
  15. package/dist/add-HLBKTI3H.js +305 -0
  16. package/dist/ads-CWXQLZCC.js +48 -0
  17. package/dist/ads-LNWALF6G.js +79 -0
  18. package/dist/advertisers-YMIPR2QG.js +123 -0
  19. package/dist/analytics-37M6Z37U.js +2437 -0
  20. package/dist/analytics-6VAB2VYM.js +447 -0
  21. package/dist/animate-DM4OUJMR.js +480 -0
  22. package/dist/assign-V25HMGMU.js +80 -0
  23. package/dist/audience-size-FKNAK4QD.js +76 -0
  24. package/dist/audiences-7D5VPOWF.js +280 -0
  25. package/dist/audit-6VVUMMYL.js +154 -0
  26. package/dist/autocomplete-NETVGJRC.js +114 -0
  27. package/dist/avatars-HH4LOUA3.js +38 -0
  28. package/dist/bid-pricing-SCTUSHFI.js +103 -0
  29. package/dist/brand-FTPQYYDU.js +22 -0
  30. package/dist/brief-MCKNRSWM.js +543 -0
  31. package/dist/campaign-groups-ZNKBTXPV.js +99 -0
  32. package/dist/campaign-writes-5TWXZ44R.js +168 -0
  33. package/dist/campaign-writes-H22P6YPW.js +176 -0
  34. package/dist/campaigns-265JXD2Z.js +78 -0
  35. package/dist/campaigns-E64SHT67.js +111 -0
  36. package/dist/campaigns-GYNO5P22.js +113 -0
  37. package/dist/canvas-E4ZT2K7I.js +46 -0
  38. package/dist/capabilities-RVNBW4OL.js +147 -0
  39. package/dist/catalog-DPUQBZZ7.js +66 -0
  40. package/dist/catalogs-SBXFAD3X.js +130 -0
  41. package/dist/changes-HXVZUJMH.js +143 -0
  42. package/dist/chatgpt-UXJPCGZU.js +47 -0
  43. package/dist/chats-4SQSGOFC.js +449 -0
  44. package/dist/check-4WC2RLDR.js +107 -0
  45. package/dist/chunk-3I66ZQTI.js +203 -0
  46. package/dist/chunk-3SEXQVMX.js +91 -0
  47. package/dist/chunk-4D73PLXU.js +843 -0
  48. package/dist/chunk-4EGXO63N.js +479 -0
  49. package/dist/chunk-4S5ZAG4S.js +63 -0
  50. package/dist/chunk-5UEBOBLO.js +170 -0
  51. package/dist/chunk-6FLUNQHT.js +91 -0
  52. package/dist/chunk-6I7N2WYU.js +19 -0
  53. package/dist/chunk-6KWT3Z35.js +103 -0
  54. package/dist/chunk-AI2SKWZE.js +197 -0
  55. package/dist/chunk-ANV42DGJ.js +455 -0
  56. package/dist/chunk-AYEWXTSF.js +392 -0
  57. package/dist/chunk-CKIDKN6H.js +191 -0
  58. package/dist/chunk-D4NK7SPT.js +930 -0
  59. package/dist/chunk-DNZVBP2W.js +61 -0
  60. package/dist/chunk-DYTBVVQX.js +679 -0
  61. package/dist/chunk-DYTBVVQX.js.map +1 -0
  62. package/dist/chunk-EBWOLUII.js +24026 -0
  63. package/dist/chunk-EBWOLUII.js.map +1 -0
  64. package/dist/chunk-EH34RWKR.js +604 -0
  65. package/dist/chunk-EOMY5SUJ.js +783 -0
  66. package/dist/chunk-EQAEWL6A.js +547 -0
  67. package/dist/chunk-F5UU5PAE.js +494 -0
  68. package/dist/chunk-FVDC6AKZ.js +150 -0
  69. package/dist/chunk-G4VG6ZV3.js +430 -0
  70. package/dist/chunk-G4VG6ZV3.js.map +1 -0
  71. package/dist/chunk-GEQUWPAX.js +715 -0
  72. package/dist/chunk-GEQUWPAX.js.map +1 -0
  73. package/dist/chunk-GN7K3NPI.js +148 -0
  74. package/dist/chunk-H6CS7VSO.js +1902 -0
  75. package/dist/chunk-HBDWE7WK.js +98 -0
  76. package/dist/chunk-I6JPTDKR.js +377 -0
  77. package/dist/chunk-IGIACW2B.js +207 -0
  78. package/dist/chunk-IRINY4B2.js +2209 -0
  79. package/dist/chunk-J4JY435Z.js +438 -0
  80. package/dist/chunk-JAC6JVCI.js +26 -0
  81. package/dist/chunk-JLLGXYOZ.js +857 -0
  82. package/dist/chunk-JY3OJBKZ.js +3510 -0
  83. package/dist/chunk-KIXVHP2C.js +1919 -0
  84. package/dist/chunk-LODEDXCD.js +156 -0
  85. package/dist/chunk-MCJ5I5LR.js +3187 -0
  86. package/dist/chunk-MCJ5I5LR.js.map +1 -0
  87. package/dist/chunk-MEK7SMWO.js +685 -0
  88. package/dist/chunk-MELSTI6W.js +66 -0
  89. package/dist/chunk-MLJKPUWP.js +191 -0
  90. package/dist/chunk-MLJKPUWP.js.map +1 -0
  91. package/dist/chunk-MSMTG6OC.js +4269 -0
  92. package/dist/chunk-MSMTG6OC.js.map +1 -0
  93. package/dist/chunk-MZPS46OR.js +76 -0
  94. package/dist/chunk-NBWZVBDG.js +131 -0
  95. package/dist/chunk-P3VY5JEM.js +274 -0
  96. package/dist/chunk-PXGR3VGW.js +1646 -0
  97. package/dist/chunk-QK3HMAVU.js +5471 -0
  98. package/dist/chunk-QYKZ3FVE.js +51 -0
  99. package/dist/chunk-RHEWQB5O.js +638 -0
  100. package/dist/chunk-RP36XHWT.js +46 -0
  101. package/dist/chunk-SNWFM2DB.js +228 -0
  102. package/dist/chunk-SWPJZJTY.js +8954 -0
  103. package/dist/chunk-SXYEIZND.js +275 -0
  104. package/dist/chunk-T62SKL4T.js +831 -0
  105. package/dist/chunk-T7SOINEA.js +169 -0
  106. package/dist/chunk-TARINRA4.js +1518 -0
  107. package/dist/chunk-TNHIYELA.js +249 -0
  108. package/dist/chunk-TNZUMU55.js +167 -0
  109. package/dist/chunk-UT77RVVU.js +142 -0
  110. package/dist/chunk-UZ4L5ERW.js +387 -0
  111. package/dist/chunk-V2XA5SIO.js +152 -0
  112. package/dist/chunk-V2XA5SIO.js.map +1 -0
  113. package/dist/chunk-VOUCQ2YW.js +64 -0
  114. package/dist/chunk-VR2AF7I7.js +7823 -0
  115. package/dist/chunk-VR2AF7I7.js.map +1 -0
  116. package/dist/chunk-VVMRSEW6.js +23 -0
  117. package/dist/chunk-WFJ7KR5K.js +163 -0
  118. package/dist/chunk-WLA7CA4G.js +297 -0
  119. package/dist/chunk-WOE4TZHJ.js +285 -0
  120. package/dist/chunk-X32MFGWW.js +15 -0
  121. package/dist/chunk-X32MFGWW.js.map +1 -0
  122. package/dist/chunk-XJ2GXHU4.js +57 -0
  123. package/dist/chunk-XLG3SJ3K.js +334 -0
  124. package/dist/chunk-XYNQMRNX.js +5368 -0
  125. package/dist/chunk-YDGBWP3I.js +89 -0
  126. package/dist/chunk-Z4TWYYM3.js +910 -0
  127. package/dist/chunk-ZEUAJAKN.js +225 -0
  128. package/dist/chunk-ZKYJYBDR.js +344 -0
  129. package/dist/chunk-ZL43WZBX.js +224 -0
  130. package/dist/claim-G4MRH7Q7.js +200 -0
  131. package/dist/cli.js +35 -36
  132. package/dist/cli.js.map +1 -1
  133. package/dist/companies-TV5SX7IW.js +198 -0
  134. package/dist/company-W2N3H7AG.js +308 -0
  135. package/dist/complete-CTS2VDY5.js +84 -0
  136. package/dist/config-3VK74MY6.js +88 -0
  137. package/dist/connect-64CFSYYE.js +45 -0
  138. package/dist/conversation-T57OY4L4.js +96 -0
  139. package/dist/conversion-report-RB2MU7UD.js +127 -0
  140. package/dist/conversion-upload-command-HFZYKVXA.js +439 -0
  141. package/dist/conversion-writes-56AIPXPK.js +122 -0
  142. package/dist/conversions-NRX76ZIT.js +78 -0
  143. package/dist/conversions-P75BZDDN.js +140 -0
  144. package/dist/create-2IFLWXCE.js +135 -0
  145. package/dist/create-2ZM3SAMX.js +239 -0
  146. package/dist/create-I6AVOYOS.js +210 -0
  147. package/dist/create-YKV66SQ6.js +62 -0
  148. package/dist/creatives-4HMWWE4O.js +58 -0
  149. package/dist/creatives-CSXTXOTD.js +223 -0
  150. package/dist/credentials-YQND7EIL.js +290 -0
  151. package/dist/critique-ABUU725C.js +232 -0
  152. package/dist/critique-EBQKUWBV.js +1451 -0
  153. package/dist/crm-CD7QLN65.js +323 -0
  154. package/dist/crm-G2QOW4WY.js +227 -0
  155. package/dist/currency-CHBV6WIO.js +88 -0
  156. package/dist/customers-SNDSWS2C.js +65 -0
  157. package/dist/delete-AXECUWUU.js +57 -0
  158. package/dist/delete-WSWCPQ4R.js +67 -0
  159. package/dist/delete-YE3ZJKGK.js +69 -0
  160. package/dist/demographics-UPLQV4VW.js +141 -0
  161. package/dist/discard-D3SPLQP2.js +69 -0
  162. package/dist/discover-ZU2DAV23.js +172 -0
  163. package/dist/domain-OXNE56NK.js +101 -0
  164. package/dist/download-DGVEUXKX.js +172 -0
  165. package/dist/draft-2SMIRPNZ.js +220 -0
  166. package/dist/draft-2YTMB4YM.js +313 -0
  167. package/dist/draft-2YTMB4YM.js.map +1 -0
  168. package/dist/draft-6EHV5NAN.js +247 -0
  169. package/dist/draft-6EHV5NAN.js.map +1 -0
  170. package/dist/draft-EWGNZUU4.js +288 -0
  171. package/dist/draft-EWGNZUU4.js.map +1 -0
  172. package/dist/draft-FSZMTGWI.js +106 -0
  173. package/dist/draft-FSZMTGWI.js.map +1 -0
  174. package/dist/draft-L7EN5TZD.js +342 -0
  175. package/dist/draft-L7EN5TZD.js.map +1 -0
  176. package/dist/draft-P3YJZY74.js +106 -0
  177. package/dist/draft-P3YJZY74.js.map +1 -0
  178. package/dist/draft-R7BNWMBR.js +408 -0
  179. package/dist/draft-R7BNWMBR.js.map +1 -0
  180. package/dist/engine/index.js +8 -8
  181. package/dist/experiments-C3M65LMP.js +236 -0
  182. package/dist/facets-SGS4HDCM.js +117 -0
  183. package/dist/feedback-256D3HOY.js +115 -0
  184. package/dist/feedback-record-FDOIZ3HV.js +269 -0
  185. package/dist/fetch-EODKEOLX.js +204 -0
  186. package/dist/fit-VEUYZEG6.js +65 -0
  187. package/dist/flows-RCOWB5BY.js +250 -0
  188. package/dist/fonts-33UOE4X3.js +39 -0
  189. package/dist/forecast-372Q6KQZ.js +169 -0
  190. package/dist/forecast-I3WRFKQL.js +121 -0
  191. package/dist/funnel-MLPPNJQK.js +397 -0
  192. package/dist/ga4-GDMHIFBU.js +55 -0
  193. package/dist/generate-JQIK3UYS.js +263 -0
  194. package/dist/get-AOHHMPZC.js +59 -0
  195. package/dist/get-SORMH25W.js +82 -0
  196. package/dist/google-JHTOX6WM.js +3270 -0
  197. package/dist/google-ads-CNREZMRN.js +198 -0
  198. package/dist/history-D5UQTJ4H.js +102 -0
  199. package/dist/history-VNLS2TKB.js +69 -0
  200. package/dist/history-ZE7OQGDR.js +153 -0
  201. package/dist/hubspot-WGP36QI3.js +782 -0
  202. package/dist/ideas-4F5JG4UV.js +45 -0
  203. package/dist/images-Q5MZ75SL.js +92 -0
  204. package/dist/ingest-52X3B37O.js +123 -0
  205. package/dist/ingest-NXISET6E.js +27 -0
  206. package/dist/insights-XY6II7TX.js +132 -0
  207. package/dist/inspect-JD4WLZ57.js +192 -0
  208. package/dist/intent-5QUPPZNI.js +95 -0
  209. package/dist/keyword-gap-IG3EFLDH.js +130 -0
  210. package/dist/keyword-metrics-DDW4MSLX.js +200 -0
  211. package/dist/keywords-for-site-3UM6THUN.js +131 -0
  212. package/dist/landing-ZHDHE65Z.js +28 -0
  213. package/dist/languages-LNHWSCMT.js +40 -0
  214. package/dist/leads-MITJNZWB.js +115 -0
  215. package/dist/learn-VLUC2TXW.js +207 -0
  216. package/dist/line-item-writes-HLQYQ4KG.js +211 -0
  217. package/dist/line-items-64KIKPCB.js +107 -0
  218. package/dist/link-NNSG5YQ4.js +67 -0
  219. package/dist/linkedin-JYN5LGP2.js +1330 -0
  220. package/dist/linkedin-JYN5LGP2.js.map +1 -0
  221. package/dist/linkedin-person-OPCUWPLI.js +139 -0
  222. package/dist/list-5U4Z3PWU.js +306 -0
  223. package/dist/list-7S4KTZNU.js +154 -0
  224. package/dist/list-VQQICPK3.js +67 -0
  225. package/dist/locations-64JNCQID.js +69 -0
  226. package/dist/locations-KVAAO7LD.js +40 -0
  227. package/dist/log-63ZVYC6L.js +95 -0
  228. package/dist/make-7ITIZUJI.js +1367 -0
  229. package/dist/map-MTR4V7KE.js +436 -0
  230. package/dist/mcp-HKMQLXBC.js +729 -0
  231. package/dist/media-sources-ZBSBTB4C.js +35 -0
  232. package/dist/members-MTRJ3ZRS.js +47 -0
  233. package/dist/meta-XVPSGNHU.js +122 -0
  234. package/dist/metrics-MXGA3EFS.js +152 -0
  235. package/dist/models-Z6SUHWKI.js +155 -0
  236. package/dist/normalize-SAKXSFEX.js +144 -0
  237. package/dist/options-L7B3SDIX.js +125 -0
  238. package/dist/organization-FFRNHVC5.js +949 -0
  239. package/dist/performance-AJA7YGOO.js +5565 -0
  240. package/dist/performance-F72KFQU5.js +27 -0
  241. package/dist/pixels-H642RPK4.js +62 -0
  242. package/dist/plan-FRRE4YQC.js +208 -0
  243. package/dist/promoted-tweet-writes-32RAOXQR.js +183 -0
  244. package/dist/promoted-tweets-KMLFRWDN.js +119 -0
  245. package/dist/publish-FOSPQ2BE.js +344 -0
  246. package/dist/query-FT2BA3WH.js +62 -0
  247. package/dist/read-7ZFZAJSQ.js +141 -0
  248. package/dist/reddit-5PYYZNBJ.js +29 -0
  249. package/dist/refresh-AOHTPXU4.js +97 -0
  250. package/dist/release-G2UKFAQY.js +63 -0
  251. package/dist/relevant-pages-OCHLUV5K.js +99 -0
  252. package/dist/remove-K5C2URJE.js +53 -0
  253. package/dist/reopen-PWROABUC.js +66 -0
  254. package/dist/rerun-CVJYCCNK.js +96 -0
  255. package/dist/research-KLWC3JBI.js +75 -0
  256. package/dist/research-Z3OJXOS4.js +265 -0
  257. package/dist/reset-3QL7IOHF.js +57 -0
  258. package/dist/reset-GPO4MCSM.js +57 -0
  259. package/dist/resolve-7SW7FZ7Q.js +124 -0
  260. package/dist/retry-HNCUDQ7S.js +63 -0
  261. package/dist/retry-NVMOGTZD.js +65 -0
  262. package/dist/revenue-HDJFYUEB.js +91 -0
  263. package/dist/rules-RYHWD4HA.js +99 -0
  264. package/dist/rules-add-EMDFBYDA.js +465 -0
  265. package/dist/run-2XRDPVHX.js +71 -0
  266. package/dist/run-PXHQKRY5.js +69 -0
  267. package/dist/scaffold-ad-RJAXMKOX.js +1513 -0
  268. package/dist/scaffold-static-ad-4HLSHPJI.js +1011 -0
  269. package/dist/scaffold-video-UH6OOIQW.js +885 -0
  270. package/dist/schedule-WT22OEBF.js +64 -0
  271. package/dist/scheduled-agents-BLIDNRFX.js +55 -0
  272. package/dist/schema-FUCZHUNV.js +135 -0
  273. package/dist/schema-NSXMRNWM.js +121 -0
  274. package/dist/search-S5O3L4KX.js +177 -0
  275. package/dist/select-ISIQXRPF.js +110 -0
  276. package/dist/set-prompt-MAQN5CYY.js +199 -0
  277. package/dist/setup-links-HANLAGD2.js +144 -0
  278. package/dist/shopify-PKWH7WXV.js +3980 -0
  279. package/dist/shopify-PKWH7WXV.js.map +1 -0
  280. package/dist/site-GADKB2RP.js +180 -0
  281. package/dist/sources-CA7JLF4P.js +30 -0
  282. package/dist/sources-HUXVRGDH.js +457 -0
  283. package/dist/stale-2A33KEE7.js +90 -0
  284. package/dist/status-5JTRE3OM.js +65 -0
  285. package/dist/studio-6ZXUKA4G.js +49 -0
  286. package/dist/sync-RJFMKM6D.js +57 -0
  287. package/dist/sync-definition-AKZUCLEV.js +70 -0
  288. package/dist/tag-manager-74CGUGXX.js +43 -0
  289. package/dist/tags-B2EXVMNS.js +23 -0
  290. package/dist/tags-JUIKSERD.js +227 -0
  291. package/dist/tags-LP6I7GY4.js +26 -0
  292. package/dist/tags-UHD43CAG.js +23 -0
  293. package/dist/tags-WJFCPOP7.js +23 -0
  294. package/dist/targeting-criteria-2LKBD5IH.js +113 -0
  295. package/dist/targets-O5JYFOCY.js +106 -0
  296. package/dist/testimonials-P63TKNJ2.js +32 -0
  297. package/dist/themes-R3A6IVQN.js +95 -0
  298. package/dist/top-companies-F7DUMWXA.js +111 -0
  299. package/dist/transcript-4RFSQA5U.js +165 -0
  300. package/dist/translate-WOJFJRAC.js +603 -0
  301. package/dist/triggers-4MHFN3VV.js +144 -0
  302. package/dist/unlink-5AXBQOIL.js +70 -0
  303. package/dist/unstage-SIBXT25Y.js +88 -0
  304. package/dist/update-4BDOO53L.js +101 -0
  305. package/dist/update-NNEMJQ4D.js +155 -0
  306. package/dist/update-O76YSKXB.js +192 -0
  307. package/dist/update-YS4QI2KP.js +66 -0
  308. package/dist/upload-XVV3HQ5W.js +130 -0
  309. package/dist/url-options-YZ6UG3NY.js +131 -0
  310. package/dist/url-params-XL5URMTG.js +101 -0
  311. package/dist/validate-42Q7X2KK.js +125 -0
  312. package/dist/videos-HMKEY5WY.js +41 -0
  313. package/dist/viewer-check-4XFEWEH3.js +83 -0
  314. package/dist/web-PYG3AOYS.js +173 -0
  315. package/dist/winning-ads-74BKOBVN.js +86 -0
  316. package/dist/write-commands-43GTQIR6.js +1525 -0
  317. package/dist/write-commands-5Z5A3D3M.js +713 -0
  318. package/dist/write-commands-7DTFGM6E.js +206 -0
  319. package/dist/x-6WSV55RN.js +47 -0
  320. package/package.json +1 -1
  321. package/dist/account-2WTVU5VH.js +0 -82
  322. package/dist/account-IG3U6UXZ.js +0 -82
  323. package/dist/account-reads-L2GYNCD3.js +0 -219
  324. package/dist/account-users-CK7D4AAI.js +0 -64
  325. package/dist/account-writes-BSSKSTZ2.js +0 -68
  326. package/dist/accounts-3EERX6MO.js +0 -701
  327. package/dist/accounts-JWYTBGDR.js +0 -80
  328. package/dist/actions-UUNK3DO4.js +0 -55
  329. package/dist/activecampaign-URFTGK6R.js +0 -938
  330. package/dist/ad-group-writes-KMB3OMJG.js +0 -172
  331. package/dist/ad-groups-E67CNQS4.js +0 -70
  332. package/dist/ad-writes-FNMKNFUN.js +0 -176
  333. package/dist/add-2JN54LSO.js +0 -107
  334. package/dist/add-4PYISQPU.js +0 -305
  335. package/dist/ads-4LASBP4G.js +0 -79
  336. package/dist/ads-6KIDAXHQ.js +0 -48
  337. package/dist/advertisers-K4ZLOZQ2.js +0 -123
  338. package/dist/analytics-36JY2LHD.js +0 -2437
  339. package/dist/analytics-NXXDWJU2.js +0 -447
  340. package/dist/animate-OWXAT2RK.js +0 -480
  341. package/dist/assign-SG5JXTMD.js +0 -80
  342. package/dist/audience-size-HOLSWGNO.js +0 -76
  343. package/dist/audiences-3R574STZ.js +0 -280
  344. package/dist/audit-YWT6CEY2.js +0 -154
  345. package/dist/autocomplete-KMYCOXHU.js +0 -114
  346. package/dist/avatars-ZGJ6RGNQ.js +0 -38
  347. package/dist/bid-pricing-C2UQJWYK.js +0 -103
  348. package/dist/brand-3653YYQF.js +0 -22
  349. package/dist/brief-I537G3PB.js +0 -543
  350. package/dist/campaign-groups-A7BT67RF.js +0 -99
  351. package/dist/campaign-writes-HASDYGTI.js +0 -168
  352. package/dist/campaign-writes-Z2J24SUZ.js +0 -176
  353. package/dist/campaigns-43OS6EUG.js +0 -78
  354. package/dist/campaigns-5DOTTJ47.js +0 -113
  355. package/dist/campaigns-FHP74WGY.js +0 -111
  356. package/dist/canvas-AW235KQX.js +0 -46
  357. package/dist/capabilities-6P674LBM.js +0 -147
  358. package/dist/catalog-7LINLVVY.js +0 -66
  359. package/dist/catalogs-IR22RGZD.js +0 -130
  360. package/dist/changes-RSEGYV45.js +0 -143
  361. package/dist/chatgpt-PDFFKPY2.js +0 -47
  362. package/dist/chats-KU6JI7DK.js +0 -449
  363. package/dist/check-W27MKVN7.js +0 -107
  364. package/dist/chunk-3EUITH4J.js +0 -638
  365. package/dist/chunk-3S3TVLAV.js +0 -7793
  366. package/dist/chunk-3S3TVLAV.js.map +0 -1
  367. package/dist/chunk-3TN4OR43.js +0 -57
  368. package/dist/chunk-4FCSE6NG.js +0 -429
  369. package/dist/chunk-4FCSE6NG.js.map +0 -1
  370. package/dist/chunk-4IRJ5JXA.js +0 -46
  371. package/dist/chunk-4OYSP3OX.js +0 -547
  372. package/dist/chunk-52WCKY2O.js +0 -103
  373. package/dist/chunk-5IFFPSEN.js +0 -225
  374. package/dist/chunk-5KSLZSOH.js +0 -156
  375. package/dist/chunk-64ALJ6TJ.js +0 -274
  376. package/dist/chunk-6OIKNJ7G.js +0 -26
  377. package/dist/chunk-73E4ITJK.js +0 -224
  378. package/dist/chunk-7UFV6H7J.js +0 -167
  379. package/dist/chunk-B3CDNANO.js +0 -843
  380. package/dist/chunk-B5UCAVCD.js +0 -91
  381. package/dist/chunk-B74ZFQKS.js +0 -676
  382. package/dist/chunk-B74ZFQKS.js.map +0 -1
  383. package/dist/chunk-BKIHYRQL.js +0 -149
  384. package/dist/chunk-BKIHYRQL.js.map +0 -1
  385. package/dist/chunk-BNO3EFGR.js +0 -4266
  386. package/dist/chunk-BNO3EFGR.js.map +0 -1
  387. package/dist/chunk-CVTWKHWZ.js +0 -377
  388. package/dist/chunk-E5H7JIWB.js +0 -3510
  389. package/dist/chunk-ERWMBQU2.js +0 -203
  390. package/dist/chunk-EYLRARHT.js +0 -2209
  391. package/dist/chunk-EZVW3KAW.js +0 -831
  392. package/dist/chunk-F3CZFUXZ.js +0 -3187
  393. package/dist/chunk-F3CZFUXZ.js.map +0 -1
  394. package/dist/chunk-G6J6AWTE.js +0 -5471
  395. package/dist/chunk-GAS6HBPM.js +0 -334
  396. package/dist/chunk-GCFC2MNR.js +0 -228
  397. package/dist/chunk-GCZK4BMB.js +0 -5368
  398. package/dist/chunk-H24HT7W7.js +0 -170
  399. package/dist/chunk-HMFIOE4P.js +0 -63
  400. package/dist/chunk-IM3GD4G3.js +0 -857
  401. package/dist/chunk-J6OTEZT3.js +0 -685
  402. package/dist/chunk-JAFTWN3A.js +0 -207
  403. package/dist/chunk-JBNT444M.js +0 -285
  404. package/dist/chunk-JDBZCUTY.js +0 -249
  405. package/dist/chunk-JKRXKD54.js +0 -66
  406. package/dist/chunk-JW6VZBV7.js +0 -1646
  407. package/dist/chunk-JYXERSEO.js +0 -89
  408. package/dist/chunk-L7AJMZ6Z.js +0 -24026
  409. package/dist/chunk-L7AJMZ6Z.js.map +0 -1
  410. package/dist/chunk-LDFM37DM.js +0 -148
  411. package/dist/chunk-LDMN6RE6.js +0 -142
  412. package/dist/chunk-M2QBEVIH.js +0 -91
  413. package/dist/chunk-MHMVFXTK.js +0 -438
  414. package/dist/chunk-MO3FJMU5.js +0 -930
  415. package/dist/chunk-MONZLJWO.js +0 -1902
  416. package/dist/chunk-NL55W4HD.js +0 -61
  417. package/dist/chunk-NQF5U6FX.js +0 -150
  418. package/dist/chunk-P6744QO6.js +0 -344
  419. package/dist/chunk-P6FMQHJJ.js +0 -131
  420. package/dist/chunk-PFBQERWX.js +0 -10
  421. package/dist/chunk-PFBQERWX.js.map +0 -1
  422. package/dist/chunk-PQWT6JHT.js +0 -494
  423. package/dist/chunk-PYEM5RGJ.js +0 -51
  424. package/dist/chunk-PZEPUBAS.js +0 -8954
  425. package/dist/chunk-Q6LCL67T.js +0 -1518
  426. package/dist/chunk-REFZAC6Q.js +0 -604
  427. package/dist/chunk-RLTFA2YN.js +0 -910
  428. package/dist/chunk-RM5T4MA6.js +0 -783
  429. package/dist/chunk-RPT3EWX2.js +0 -392
  430. package/dist/chunk-RQOSSYVH.js +0 -718
  431. package/dist/chunk-RQOSSYVH.js.map +0 -1
  432. package/dist/chunk-SIKCVWM3.js +0 -76
  433. package/dist/chunk-SP5P2TGW.js +0 -197
  434. package/dist/chunk-UYUH5XNV.js +0 -455
  435. package/dist/chunk-V4UJERGL.js +0 -64
  436. package/dist/chunk-VIHHAS2H.js +0 -23
  437. package/dist/chunk-X4APGDHX.js +0 -191
  438. package/dist/chunk-XBFUCGS4.js +0 -387
  439. package/dist/chunk-XK2ZJ6CI.js +0 -19
  440. package/dist/chunk-XN77O7GB.js +0 -275
  441. package/dist/chunk-XU6XQPNM.js +0 -1919
  442. package/dist/chunk-Y2AKJYI4.js +0 -191
  443. package/dist/chunk-Y2AKJYI4.js.map +0 -1
  444. package/dist/chunk-YQB66YKJ.js +0 -98
  445. package/dist/chunk-YRALBXYF.js +0 -479
  446. package/dist/chunk-YRTQQRNY.js +0 -297
  447. package/dist/chunk-ZHDXKNPO.js +0 -163
  448. package/dist/chunk-ZIC6AWWL.js +0 -169
  449. package/dist/claim-DGEZFT3W.js +0 -200
  450. package/dist/companies-NG6NTBDR.js +0 -198
  451. package/dist/company-46N4KFB7.js +0 -308
  452. package/dist/complete-KQPLWTSD.js +0 -84
  453. package/dist/config-3GCILBEL.js +0 -88
  454. package/dist/connect-OU2LJ2Z6.js +0 -45
  455. package/dist/conversation-UMZQ7RDA.js +0 -96
  456. package/dist/conversion-report-R4KJI4VA.js +0 -127
  457. package/dist/conversion-upload-command-XQQWLYHZ.js +0 -439
  458. package/dist/conversion-writes-XIQEIDPS.js +0 -122
  459. package/dist/conversions-RMBQNW3T.js +0 -78
  460. package/dist/conversions-X5LGZHA6.js +0 -140
  461. package/dist/create-EQSXPFUS.js +0 -135
  462. package/dist/create-IFQP7SVV.js +0 -239
  463. package/dist/create-M4LMQ2RN.js +0 -210
  464. package/dist/create-U4ADI5DV.js +0 -62
  465. package/dist/creatives-3XLHWIHK.js +0 -58
  466. package/dist/creatives-B2CQUJ3Y.js +0 -223
  467. package/dist/credentials-KVIE4DRI.js +0 -290
  468. package/dist/critique-UX2TWXXH.js +0 -232
  469. package/dist/critique-Z64ZFE6F.js +0 -1451
  470. package/dist/crm-67S5ZY5G.js +0 -227
  471. package/dist/crm-NCDTODY3.js +0 -323
  472. package/dist/currency-XFHCLKAV.js +0 -88
  473. package/dist/customers-CGVQMPPT.js +0 -65
  474. package/dist/delete-53RTKHBL.js +0 -69
  475. package/dist/delete-Q3DM3BTX.js +0 -67
  476. package/dist/delete-QGYNGZAO.js +0 -57
  477. package/dist/demographics-5SLROVD6.js +0 -141
  478. package/dist/discard-WY37YU5P.js +0 -69
  479. package/dist/discover-R3QBVUHZ.js +0 -172
  480. package/dist/domain-2KA6VEX4.js +0 -101
  481. package/dist/download-6JWNJY3B.js +0 -172
  482. package/dist/draft-25YY6NMC.js +0 -396
  483. package/dist/draft-25YY6NMC.js.map +0 -1
  484. package/dist/draft-6E7EQUCU.js +0 -103
  485. package/dist/draft-6E7EQUCU.js.map +0 -1
  486. package/dist/draft-BGCCVIZI.js +0 -310
  487. package/dist/draft-BGCCVIZI.js.map +0 -1
  488. package/dist/draft-EJNKW4JN.js +0 -335
  489. package/dist/draft-EJNKW4JN.js.map +0 -1
  490. package/dist/draft-GIJCJIQ5.js +0 -240
  491. package/dist/draft-GIJCJIQ5.js.map +0 -1
  492. package/dist/draft-NMEKF23T.js +0 -220
  493. package/dist/draft-Q74WOMUR.js +0 -283
  494. package/dist/draft-Q74WOMUR.js.map +0 -1
  495. package/dist/draft-RK3ZAUBF.js +0 -100
  496. package/dist/draft-RK3ZAUBF.js.map +0 -1
  497. package/dist/experiments-KGRE35JK.js +0 -236
  498. package/dist/facets-GWV63PKA.js +0 -117
  499. package/dist/feedback-2SOINGXM.js +0 -115
  500. package/dist/feedback-O4RPVQ73.js +0 -136
  501. package/dist/feedback-O4RPVQ73.js.map +0 -1
  502. package/dist/feedback-record-6FKYOZ3P.js +0 -269
  503. package/dist/fetch-4NRSXMHY.js +0 -204
  504. package/dist/fit-OH2X3XSX.js +0 -65
  505. package/dist/flows-WXSJQ3UJ.js +0 -250
  506. package/dist/fonts-LRN2PVYX.js +0 -39
  507. package/dist/forecast-FVZBUIJU.js +0 -121
  508. package/dist/forecast-JOQESPEP.js +0 -169
  509. package/dist/funnel-X2XT3XB5.js +0 -397
  510. package/dist/ga4-SBHUQKGK.js +0 -55
  511. package/dist/generate-SW5KLHXG.js +0 -263
  512. package/dist/get-AP3WGMDU.js +0 -59
  513. package/dist/get-NR34JBHK.js +0 -82
  514. package/dist/google-Q424277P.js +0 -3270
  515. package/dist/google-ads-HLFROWL7.js +0 -198
  516. package/dist/history-7DF5HFJT.js +0 -69
  517. package/dist/history-IMHDQLXW.js +0 -102
  518. package/dist/history-VIPGJT7Z.js +0 -153
  519. package/dist/hubspot-UZ4F5ANA.js +0 -782
  520. package/dist/ideas-MU6I7DBD.js +0 -45
  521. package/dist/images-236N2YSJ.js +0 -92
  522. package/dist/ingest-3DVD25B6.js +0 -27
  523. package/dist/ingest-XELCXH2P.js +0 -123
  524. package/dist/insights-YVV5MHPQ.js +0 -132
  525. package/dist/inspect-DZUGQK5Y.js +0 -192
  526. package/dist/intent-5VLQBTM7.js +0 -95
  527. package/dist/keyword-gap-COLF7JNH.js +0 -130
  528. package/dist/keyword-metrics-R6EWGKGO.js +0 -200
  529. package/dist/keywords-for-site-LU3LF65F.js +0 -131
  530. package/dist/landing-FZ7SSEP6.js +0 -28
  531. package/dist/languages-RYIOZQFH.js +0 -40
  532. package/dist/leads-B2YSVBOA.js +0 -115
  533. package/dist/learn-FVQA7RG4.js +0 -207
  534. package/dist/line-item-writes-UXJ3JVFY.js +0 -211
  535. package/dist/line-items-FOVTA5LD.js +0 -107
  536. package/dist/link-UPXHMS2Q.js +0 -67
  537. package/dist/linkedin-75HES7MX.js +0 -1328
  538. package/dist/linkedin-75HES7MX.js.map +0 -1
  539. package/dist/linkedin-person-V6CK4IYG.js +0 -139
  540. package/dist/list-23P4WTBN.js +0 -154
  541. package/dist/list-MALIT3TA.js +0 -306
  542. package/dist/list-WMF25FUC.js +0 -67
  543. package/dist/locations-7RYEWKJO.js +0 -69
  544. package/dist/locations-OF2ZI5YX.js +0 -40
  545. package/dist/log-I7FAVIQA.js +0 -95
  546. package/dist/make-YHE4Y2CK.js +0 -1367
  547. package/dist/map-3H6JFF3K.js +0 -436
  548. package/dist/mcp-KTR7IPSP.js +0 -729
  549. package/dist/media-sources-XADH7UR6.js +0 -35
  550. package/dist/members-4I3TSPZD.js +0 -47
  551. package/dist/meta-X46LC3GI.js +0 -122
  552. package/dist/metrics-PKMIG7VL.js +0 -152
  553. package/dist/models-X2IXXAD6.js +0 -155
  554. package/dist/normalize-GEBDT74P.js +0 -144
  555. package/dist/options-4DJFAVSV.js +0 -125
  556. package/dist/organization-SBFGCUZJ.js +0 -949
  557. package/dist/performance-BHDYL4JE.js +0 -5565
  558. package/dist/performance-ZNVGH4BL.js +0 -27
  559. package/dist/pixels-DBSPNHIE.js +0 -62
  560. package/dist/plan-2Q6SOHMD.js +0 -208
  561. package/dist/promoted-tweet-writes-OQM7SURA.js +0 -183
  562. package/dist/promoted-tweets-BCKQ4D3D.js +0 -119
  563. package/dist/publish-ZCWQZ5EO.js +0 -344
  564. package/dist/query-GBIWIZSS.js +0 -62
  565. package/dist/read-DF3UPNBM.js +0 -141
  566. package/dist/reddit-NUPXPOG3.js +0 -29
  567. package/dist/refresh-5KSQVA3V.js +0 -97
  568. package/dist/release-QIBDWPNL.js +0 -63
  569. package/dist/relevant-pages-OZPYOGFO.js +0 -99
  570. package/dist/remove-IM3WF5RS.js +0 -53
  571. package/dist/reopen-DK3SFSWS.js +0 -66
  572. package/dist/rerun-7OOJRRZE.js +0 -96
  573. package/dist/research-KNLA55TJ.js +0 -75
  574. package/dist/research-R3JAZRD4.js +0 -265
  575. package/dist/reset-JRKJKUZL.js +0 -57
  576. package/dist/reset-WQAJPREG.js +0 -57
  577. package/dist/resolve-LCZXCACJ.js +0 -124
  578. package/dist/retry-64YJR4ZS.js +0 -65
  579. package/dist/retry-BPDA54WP.js +0 -63
  580. package/dist/revenue-WNMRTD6P.js +0 -91
  581. package/dist/rules-N2YPNUM5.js +0 -99
  582. package/dist/rules-add-BS577EEB.js +0 -465
  583. package/dist/run-BNZFJ2YU.js +0 -71
  584. package/dist/run-OPSLEKBZ.js +0 -69
  585. package/dist/scaffold-ad-PREXRCXY.js +0 -1513
  586. package/dist/scaffold-static-ad-KK4QOBO7.js +0 -1011
  587. package/dist/scaffold-video-KLBPRMAV.js +0 -885
  588. package/dist/schedule-BODZ6DED.js +0 -64
  589. package/dist/scheduled-agents-GZEB2B25.js +0 -55
  590. package/dist/schema-I54DIUTV.js +0 -135
  591. package/dist/schema-U6GAKTQZ.js +0 -121
  592. package/dist/search-IJ745GV3.js +0 -177
  593. package/dist/select-WZJCQW4A.js +0 -110
  594. package/dist/set-prompt-SUJW4F5J.js +0 -199
  595. package/dist/setup-links-UVGNFNGP.js +0 -144
  596. package/dist/shopify-BR27STCS.js +0 -3958
  597. package/dist/shopify-BR27STCS.js.map +0 -1
  598. package/dist/site-ZRD4H65V.js +0 -180
  599. package/dist/sources-4FWNXBBR.js +0 -457
  600. package/dist/sources-E3QDROKM.js +0 -30
  601. package/dist/stale-TPM2XQKT.js +0 -90
  602. package/dist/status-QEVQKFFP.js +0 -65
  603. package/dist/studio-OV2ZY5W3.js +0 -49
  604. package/dist/sync-GOVV6G45.js +0 -57
  605. package/dist/sync-definition-OSSIAZ23.js +0 -70
  606. package/dist/tag-manager-5ORFHLM4.js +0 -43
  607. package/dist/tags-BXTCJCOH.js +0 -227
  608. package/dist/tags-H6ZDU6MK.js +0 -23
  609. package/dist/tags-Q6Q5FRVL.js +0 -26
  610. package/dist/tags-YJ3UVNGP.js +0 -23
  611. package/dist/tags-YJI3QOBK.js +0 -23
  612. package/dist/targeting-criteria-667LEXSS.js +0 -113
  613. package/dist/targets-AOE2FDDM.js +0 -106
  614. package/dist/testimonials-IOBXKEMA.js +0 -32
  615. package/dist/themes-GD53PVOD.js +0 -95
  616. package/dist/top-companies-AUXG5OY5.js +0 -111
  617. package/dist/transcript-D7ZS3X6S.js +0 -165
  618. package/dist/translate-BQCLUORU.js +0 -603
  619. package/dist/triggers-QBG5VN5O.js +0 -144
  620. package/dist/unlink-5KKAJJM6.js +0 -70
  621. package/dist/unstage-EU6YHHDA.js +0 -88
  622. package/dist/update-JJG7R6QN.js +0 -192
  623. package/dist/update-OLQGUBNH.js +0 -101
  624. package/dist/update-RROGL7SO.js +0 -66
  625. package/dist/update-RW5T53RB.js +0 -155
  626. package/dist/upload-4JN4BPY2.js +0 -130
  627. package/dist/url-options-VNNI4QXX.js +0 -131
  628. package/dist/url-params-3GCYLRDI.js +0 -101
  629. package/dist/validate-YBD2PIZE.js +0 -125
  630. package/dist/videos-OMPPGIYZ.js +0 -41
  631. package/dist/viewer-check-TCX6PFO4.js +0 -83
  632. package/dist/web-QGNS3YPN.js +0 -173
  633. package/dist/winning-ads-LY4NV5O3.js +0 -86
  634. package/dist/write-commands-FGWCJHLH.js +0 -713
  635. package/dist/write-commands-OLTCXPPW.js +0 -1525
  636. package/dist/write-commands-UTM7PPK5.js +0 -206
  637. package/dist/x-VBSKVDIX.js +0 -47
  638. /package/dist/{account-IG3U6UXZ.js.map → account-2HJ4GKHN.js.map} +0 -0
  639. /package/dist/{account-2WTVU5VH.js.map → account-MTMCQQYH.js.map} +0 -0
  640. /package/dist/{account-reads-L2GYNCD3.js.map → account-reads-X36NPCX5.js.map} +0 -0
  641. /package/dist/{account-users-CK7D4AAI.js.map → account-users-FJ63HUJT.js.map} +0 -0
  642. /package/dist/{account-writes-BSSKSTZ2.js.map → account-writes-FZ3KCJZY.js.map} +0 -0
  643. /package/dist/{accounts-3EERX6MO.js.map → accounts-PU2GGSH4.js.map} +0 -0
  644. /package/dist/{accounts-JWYTBGDR.js.map → accounts-VYQINKID.js.map} +0 -0
  645. /package/dist/{actions-UUNK3DO4.js.map → actions-NKCYYR7Q.js.map} +0 -0
  646. /package/dist/{activecampaign-URFTGK6R.js.map → activecampaign-LQHDIHN5.js.map} +0 -0
  647. /package/dist/{ad-group-writes-KMB3OMJG.js.map → ad-group-writes-XGG3WQEO.js.map} +0 -0
  648. /package/dist/{ad-groups-E67CNQS4.js.map → ad-groups-GZIPUN64.js.map} +0 -0
  649. /package/dist/{ad-writes-FNMKNFUN.js.map → ad-writes-2VTRWQLW.js.map} +0 -0
  650. /package/dist/{add-2JN54LSO.js.map → add-6EHN5G6X.js.map} +0 -0
  651. /package/dist/{add-4PYISQPU.js.map → add-HLBKTI3H.js.map} +0 -0
  652. /package/dist/{ads-6KIDAXHQ.js.map → ads-CWXQLZCC.js.map} +0 -0
  653. /package/dist/{ads-4LASBP4G.js.map → ads-LNWALF6G.js.map} +0 -0
  654. /package/dist/{advertisers-K4ZLOZQ2.js.map → advertisers-YMIPR2QG.js.map} +0 -0
  655. /package/dist/{analytics-36JY2LHD.js.map → analytics-37M6Z37U.js.map} +0 -0
  656. /package/dist/{analytics-NXXDWJU2.js.map → analytics-6VAB2VYM.js.map} +0 -0
  657. /package/dist/{animate-OWXAT2RK.js.map → animate-DM4OUJMR.js.map} +0 -0
  658. /package/dist/{assign-SG5JXTMD.js.map → assign-V25HMGMU.js.map} +0 -0
  659. /package/dist/{audience-size-HOLSWGNO.js.map → audience-size-FKNAK4QD.js.map} +0 -0
  660. /package/dist/{audiences-3R574STZ.js.map → audiences-7D5VPOWF.js.map} +0 -0
  661. /package/dist/{audit-YWT6CEY2.js.map → audit-6VVUMMYL.js.map} +0 -0
  662. /package/dist/{autocomplete-KMYCOXHU.js.map → autocomplete-NETVGJRC.js.map} +0 -0
  663. /package/dist/{avatars-ZGJ6RGNQ.js.map → avatars-HH4LOUA3.js.map} +0 -0
  664. /package/dist/{bid-pricing-C2UQJWYK.js.map → bid-pricing-SCTUSHFI.js.map} +0 -0
  665. /package/dist/{brand-3653YYQF.js.map → brand-FTPQYYDU.js.map} +0 -0
  666. /package/dist/{brief-I537G3PB.js.map → brief-MCKNRSWM.js.map} +0 -0
  667. /package/dist/{campaign-groups-A7BT67RF.js.map → campaign-groups-ZNKBTXPV.js.map} +0 -0
  668. /package/dist/{campaign-writes-HASDYGTI.js.map → campaign-writes-5TWXZ44R.js.map} +0 -0
  669. /package/dist/{campaign-writes-Z2J24SUZ.js.map → campaign-writes-H22P6YPW.js.map} +0 -0
  670. /package/dist/{campaigns-43OS6EUG.js.map → campaigns-265JXD2Z.js.map} +0 -0
  671. /package/dist/{campaigns-FHP74WGY.js.map → campaigns-E64SHT67.js.map} +0 -0
  672. /package/dist/{campaigns-5DOTTJ47.js.map → campaigns-GYNO5P22.js.map} +0 -0
  673. /package/dist/{canvas-AW235KQX.js.map → canvas-E4ZT2K7I.js.map} +0 -0
  674. /package/dist/{capabilities-6P674LBM.js.map → capabilities-RVNBW4OL.js.map} +0 -0
  675. /package/dist/{catalog-7LINLVVY.js.map → catalog-DPUQBZZ7.js.map} +0 -0
  676. /package/dist/{catalogs-IR22RGZD.js.map → catalogs-SBXFAD3X.js.map} +0 -0
  677. /package/dist/{changes-RSEGYV45.js.map → changes-HXVZUJMH.js.map} +0 -0
  678. /package/dist/{chatgpt-PDFFKPY2.js.map → chatgpt-UXJPCGZU.js.map} +0 -0
  679. /package/dist/{chats-KU6JI7DK.js.map → chats-4SQSGOFC.js.map} +0 -0
  680. /package/dist/{check-W27MKVN7.js.map → check-4WC2RLDR.js.map} +0 -0
  681. /package/dist/{chunk-ERWMBQU2.js.map → chunk-3I66ZQTI.js.map} +0 -0
  682. /package/dist/{chunk-M2QBEVIH.js.map → chunk-3SEXQVMX.js.map} +0 -0
  683. /package/dist/{chunk-B3CDNANO.js.map → chunk-4D73PLXU.js.map} +0 -0
  684. /package/dist/{chunk-YRALBXYF.js.map → chunk-4EGXO63N.js.map} +0 -0
  685. /package/dist/{chunk-HMFIOE4P.js.map → chunk-4S5ZAG4S.js.map} +0 -0
  686. /package/dist/{chunk-H24HT7W7.js.map → chunk-5UEBOBLO.js.map} +0 -0
  687. /package/dist/{chunk-B5UCAVCD.js.map → chunk-6FLUNQHT.js.map} +0 -0
  688. /package/dist/{chunk-XK2ZJ6CI.js.map → chunk-6I7N2WYU.js.map} +0 -0
  689. /package/dist/{chunk-52WCKY2O.js.map → chunk-6KWT3Z35.js.map} +0 -0
  690. /package/dist/{chunk-SP5P2TGW.js.map → chunk-AI2SKWZE.js.map} +0 -0
  691. /package/dist/{chunk-UYUH5XNV.js.map → chunk-ANV42DGJ.js.map} +0 -0
  692. /package/dist/{chunk-RPT3EWX2.js.map → chunk-AYEWXTSF.js.map} +0 -0
  693. /package/dist/{chunk-X4APGDHX.js.map → chunk-CKIDKN6H.js.map} +0 -0
  694. /package/dist/{chunk-MO3FJMU5.js.map → chunk-D4NK7SPT.js.map} +0 -0
  695. /package/dist/{chunk-NL55W4HD.js.map → chunk-DNZVBP2W.js.map} +0 -0
  696. /package/dist/{chunk-REFZAC6Q.js.map → chunk-EH34RWKR.js.map} +0 -0
  697. /package/dist/{chunk-RM5T4MA6.js.map → chunk-EOMY5SUJ.js.map} +0 -0
  698. /package/dist/{chunk-4OYSP3OX.js.map → chunk-EQAEWL6A.js.map} +0 -0
  699. /package/dist/{chunk-PQWT6JHT.js.map → chunk-F5UU5PAE.js.map} +0 -0
  700. /package/dist/{chunk-NQF5U6FX.js.map → chunk-FVDC6AKZ.js.map} +0 -0
  701. /package/dist/{chunk-LDFM37DM.js.map → chunk-GN7K3NPI.js.map} +0 -0
  702. /package/dist/{chunk-MONZLJWO.js.map → chunk-H6CS7VSO.js.map} +0 -0
  703. /package/dist/{chunk-YQB66YKJ.js.map → chunk-HBDWE7WK.js.map} +0 -0
  704. /package/dist/{chunk-CVTWKHWZ.js.map → chunk-I6JPTDKR.js.map} +0 -0
  705. /package/dist/{chunk-JAFTWN3A.js.map → chunk-IGIACW2B.js.map} +0 -0
  706. /package/dist/{chunk-EYLRARHT.js.map → chunk-IRINY4B2.js.map} +0 -0
  707. /package/dist/{chunk-MHMVFXTK.js.map → chunk-J4JY435Z.js.map} +0 -0
  708. /package/dist/{chunk-6OIKNJ7G.js.map → chunk-JAC6JVCI.js.map} +0 -0
  709. /package/dist/{chunk-IM3GD4G3.js.map → chunk-JLLGXYOZ.js.map} +0 -0
  710. /package/dist/{chunk-E5H7JIWB.js.map → chunk-JY3OJBKZ.js.map} +0 -0
  711. /package/dist/{chunk-XU6XQPNM.js.map → chunk-KIXVHP2C.js.map} +0 -0
  712. /package/dist/{chunk-5KSLZSOH.js.map → chunk-LODEDXCD.js.map} +0 -0
  713. /package/dist/{chunk-J6OTEZT3.js.map → chunk-MEK7SMWO.js.map} +0 -0
  714. /package/dist/{chunk-JKRXKD54.js.map → chunk-MELSTI6W.js.map} +0 -0
  715. /package/dist/{chunk-SIKCVWM3.js.map → chunk-MZPS46OR.js.map} +0 -0
  716. /package/dist/{chunk-P6FMQHJJ.js.map → chunk-NBWZVBDG.js.map} +0 -0
  717. /package/dist/{chunk-64ALJ6TJ.js.map → chunk-P3VY5JEM.js.map} +0 -0
  718. /package/dist/{chunk-JW6VZBV7.js.map → chunk-PXGR3VGW.js.map} +0 -0
  719. /package/dist/{chunk-G6J6AWTE.js.map → chunk-QK3HMAVU.js.map} +0 -0
  720. /package/dist/{chunk-PYEM5RGJ.js.map → chunk-QYKZ3FVE.js.map} +0 -0
  721. /package/dist/{chunk-3EUITH4J.js.map → chunk-RHEWQB5O.js.map} +0 -0
  722. /package/dist/{chunk-4IRJ5JXA.js.map → chunk-RP36XHWT.js.map} +0 -0
  723. /package/dist/{chunk-GCFC2MNR.js.map → chunk-SNWFM2DB.js.map} +0 -0
  724. /package/dist/{chunk-PZEPUBAS.js.map → chunk-SWPJZJTY.js.map} +0 -0
  725. /package/dist/{chunk-XN77O7GB.js.map → chunk-SXYEIZND.js.map} +0 -0
  726. /package/dist/{chunk-EZVW3KAW.js.map → chunk-T62SKL4T.js.map} +0 -0
  727. /package/dist/{chunk-ZIC6AWWL.js.map → chunk-T7SOINEA.js.map} +0 -0
  728. /package/dist/{chunk-Q6LCL67T.js.map → chunk-TARINRA4.js.map} +0 -0
  729. /package/dist/{chunk-JDBZCUTY.js.map → chunk-TNHIYELA.js.map} +0 -0
  730. /package/dist/{chunk-7UFV6H7J.js.map → chunk-TNZUMU55.js.map} +0 -0
  731. /package/dist/{chunk-LDMN6RE6.js.map → chunk-UT77RVVU.js.map} +0 -0
  732. /package/dist/{chunk-XBFUCGS4.js.map → chunk-UZ4L5ERW.js.map} +0 -0
  733. /package/dist/{chunk-V4UJERGL.js.map → chunk-VOUCQ2YW.js.map} +0 -0
  734. /package/dist/{chunk-VIHHAS2H.js.map → chunk-VVMRSEW6.js.map} +0 -0
  735. /package/dist/{chunk-ZHDXKNPO.js.map → chunk-WFJ7KR5K.js.map} +0 -0
  736. /package/dist/{chunk-YRTQQRNY.js.map → chunk-WLA7CA4G.js.map} +0 -0
  737. /package/dist/{chunk-JBNT444M.js.map → chunk-WOE4TZHJ.js.map} +0 -0
  738. /package/dist/{chunk-3TN4OR43.js.map → chunk-XJ2GXHU4.js.map} +0 -0
  739. /package/dist/{chunk-GAS6HBPM.js.map → chunk-XLG3SJ3K.js.map} +0 -0
  740. /package/dist/{chunk-GCZK4BMB.js.map → chunk-XYNQMRNX.js.map} +0 -0
  741. /package/dist/{chunk-JYXERSEO.js.map → chunk-YDGBWP3I.js.map} +0 -0
  742. /package/dist/{chunk-RLTFA2YN.js.map → chunk-Z4TWYYM3.js.map} +0 -0
  743. /package/dist/{chunk-5IFFPSEN.js.map → chunk-ZEUAJAKN.js.map} +0 -0
  744. /package/dist/{chunk-P6744QO6.js.map → chunk-ZKYJYBDR.js.map} +0 -0
  745. /package/dist/{chunk-73E4ITJK.js.map → chunk-ZL43WZBX.js.map} +0 -0
  746. /package/dist/{claim-DGEZFT3W.js.map → claim-G4MRH7Q7.js.map} +0 -0
  747. /package/dist/{companies-NG6NTBDR.js.map → companies-TV5SX7IW.js.map} +0 -0
  748. /package/dist/{company-46N4KFB7.js.map → company-W2N3H7AG.js.map} +0 -0
  749. /package/dist/{complete-KQPLWTSD.js.map → complete-CTS2VDY5.js.map} +0 -0
  750. /package/dist/{config-3GCILBEL.js.map → config-3VK74MY6.js.map} +0 -0
  751. /package/dist/{connect-OU2LJ2Z6.js.map → connect-64CFSYYE.js.map} +0 -0
  752. /package/dist/{conversation-UMZQ7RDA.js.map → conversation-T57OY4L4.js.map} +0 -0
  753. /package/dist/{conversion-report-R4KJI4VA.js.map → conversion-report-RB2MU7UD.js.map} +0 -0
  754. /package/dist/{conversion-upload-command-XQQWLYHZ.js.map → conversion-upload-command-HFZYKVXA.js.map} +0 -0
  755. /package/dist/{conversion-writes-XIQEIDPS.js.map → conversion-writes-56AIPXPK.js.map} +0 -0
  756. /package/dist/{conversions-RMBQNW3T.js.map → conversions-NRX76ZIT.js.map} +0 -0
  757. /package/dist/{conversions-X5LGZHA6.js.map → conversions-P75BZDDN.js.map} +0 -0
  758. /package/dist/{create-EQSXPFUS.js.map → create-2IFLWXCE.js.map} +0 -0
  759. /package/dist/{create-IFQP7SVV.js.map → create-2ZM3SAMX.js.map} +0 -0
  760. /package/dist/{create-M4LMQ2RN.js.map → create-I6AVOYOS.js.map} +0 -0
  761. /package/dist/{create-U4ADI5DV.js.map → create-YKV66SQ6.js.map} +0 -0
  762. /package/dist/{creatives-3XLHWIHK.js.map → creatives-4HMWWE4O.js.map} +0 -0
  763. /package/dist/{creatives-B2CQUJ3Y.js.map → creatives-CSXTXOTD.js.map} +0 -0
  764. /package/dist/{credentials-KVIE4DRI.js.map → credentials-YQND7EIL.js.map} +0 -0
  765. /package/dist/{critique-UX2TWXXH.js.map → critique-ABUU725C.js.map} +0 -0
  766. /package/dist/{critique-Z64ZFE6F.js.map → critique-EBQKUWBV.js.map} +0 -0
  767. /package/dist/{crm-NCDTODY3.js.map → crm-CD7QLN65.js.map} +0 -0
  768. /package/dist/{crm-67S5ZY5G.js.map → crm-G2QOW4WY.js.map} +0 -0
  769. /package/dist/{currency-XFHCLKAV.js.map → currency-CHBV6WIO.js.map} +0 -0
  770. /package/dist/{customers-CGVQMPPT.js.map → customers-SNDSWS2C.js.map} +0 -0
  771. /package/dist/{delete-QGYNGZAO.js.map → delete-AXECUWUU.js.map} +0 -0
  772. /package/dist/{delete-Q3DM3BTX.js.map → delete-WSWCPQ4R.js.map} +0 -0
  773. /package/dist/{delete-53RTKHBL.js.map → delete-YE3ZJKGK.js.map} +0 -0
  774. /package/dist/{demographics-5SLROVD6.js.map → demographics-UPLQV4VW.js.map} +0 -0
  775. /package/dist/{discard-WY37YU5P.js.map → discard-D3SPLQP2.js.map} +0 -0
  776. /package/dist/{discover-R3QBVUHZ.js.map → discover-ZU2DAV23.js.map} +0 -0
  777. /package/dist/{domain-2KA6VEX4.js.map → domain-OXNE56NK.js.map} +0 -0
  778. /package/dist/{download-6JWNJY3B.js.map → download-DGVEUXKX.js.map} +0 -0
  779. /package/dist/{draft-NMEKF23T.js.map → draft-2SMIRPNZ.js.map} +0 -0
  780. /package/dist/{experiments-KGRE35JK.js.map → experiments-C3M65LMP.js.map} +0 -0
  781. /package/dist/{facets-GWV63PKA.js.map → facets-SGS4HDCM.js.map} +0 -0
  782. /package/dist/{feedback-2SOINGXM.js.map → feedback-256D3HOY.js.map} +0 -0
  783. /package/dist/{feedback-record-6FKYOZ3P.js.map → feedback-record-FDOIZ3HV.js.map} +0 -0
  784. /package/dist/{fetch-4NRSXMHY.js.map → fetch-EODKEOLX.js.map} +0 -0
  785. /package/dist/{fit-OH2X3XSX.js.map → fit-VEUYZEG6.js.map} +0 -0
  786. /package/dist/{flows-WXSJQ3UJ.js.map → flows-RCOWB5BY.js.map} +0 -0
  787. /package/dist/{fonts-LRN2PVYX.js.map → fonts-33UOE4X3.js.map} +0 -0
  788. /package/dist/{forecast-JOQESPEP.js.map → forecast-372Q6KQZ.js.map} +0 -0
  789. /package/dist/{forecast-FVZBUIJU.js.map → forecast-I3WRFKQL.js.map} +0 -0
  790. /package/dist/{funnel-X2XT3XB5.js.map → funnel-MLPPNJQK.js.map} +0 -0
  791. /package/dist/{ga4-SBHUQKGK.js.map → ga4-GDMHIFBU.js.map} +0 -0
  792. /package/dist/{generate-SW5KLHXG.js.map → generate-JQIK3UYS.js.map} +0 -0
  793. /package/dist/{get-AP3WGMDU.js.map → get-AOHHMPZC.js.map} +0 -0
  794. /package/dist/{get-NR34JBHK.js.map → get-SORMH25W.js.map} +0 -0
  795. /package/dist/{google-Q424277P.js.map → google-JHTOX6WM.js.map} +0 -0
  796. /package/dist/{google-ads-HLFROWL7.js.map → google-ads-CNREZMRN.js.map} +0 -0
  797. /package/dist/{history-IMHDQLXW.js.map → history-D5UQTJ4H.js.map} +0 -0
  798. /package/dist/{history-7DF5HFJT.js.map → history-VNLS2TKB.js.map} +0 -0
  799. /package/dist/{history-VIPGJT7Z.js.map → history-ZE7OQGDR.js.map} +0 -0
  800. /package/dist/{hubspot-UZ4F5ANA.js.map → hubspot-WGP36QI3.js.map} +0 -0
  801. /package/dist/{ideas-MU6I7DBD.js.map → ideas-4F5JG4UV.js.map} +0 -0
  802. /package/dist/{images-236N2YSJ.js.map → images-Q5MZ75SL.js.map} +0 -0
  803. /package/dist/{ingest-XELCXH2P.js.map → ingest-52X3B37O.js.map} +0 -0
  804. /package/dist/{ingest-3DVD25B6.js.map → ingest-NXISET6E.js.map} +0 -0
  805. /package/dist/{insights-YVV5MHPQ.js.map → insights-XY6II7TX.js.map} +0 -0
  806. /package/dist/{inspect-DZUGQK5Y.js.map → inspect-JD4WLZ57.js.map} +0 -0
  807. /package/dist/{intent-5VLQBTM7.js.map → intent-5QUPPZNI.js.map} +0 -0
  808. /package/dist/{keyword-gap-COLF7JNH.js.map → keyword-gap-IG3EFLDH.js.map} +0 -0
  809. /package/dist/{keyword-metrics-R6EWGKGO.js.map → keyword-metrics-DDW4MSLX.js.map} +0 -0
  810. /package/dist/{keywords-for-site-LU3LF65F.js.map → keywords-for-site-3UM6THUN.js.map} +0 -0
  811. /package/dist/{landing-FZ7SSEP6.js.map → landing-ZHDHE65Z.js.map} +0 -0
  812. /package/dist/{languages-RYIOZQFH.js.map → languages-LNHWSCMT.js.map} +0 -0
  813. /package/dist/{leads-B2YSVBOA.js.map → leads-MITJNZWB.js.map} +0 -0
  814. /package/dist/{learn-FVQA7RG4.js.map → learn-VLUC2TXW.js.map} +0 -0
  815. /package/dist/{line-item-writes-UXJ3JVFY.js.map → line-item-writes-HLQYQ4KG.js.map} +0 -0
  816. /package/dist/{line-items-FOVTA5LD.js.map → line-items-64KIKPCB.js.map} +0 -0
  817. /package/dist/{link-UPXHMS2Q.js.map → link-NNSG5YQ4.js.map} +0 -0
  818. /package/dist/{linkedin-person-V6CK4IYG.js.map → linkedin-person-OPCUWPLI.js.map} +0 -0
  819. /package/dist/{list-MALIT3TA.js.map → list-5U4Z3PWU.js.map} +0 -0
  820. /package/dist/{list-23P4WTBN.js.map → list-7S4KTZNU.js.map} +0 -0
  821. /package/dist/{list-WMF25FUC.js.map → list-VQQICPK3.js.map} +0 -0
  822. /package/dist/{locations-7RYEWKJO.js.map → locations-64JNCQID.js.map} +0 -0
  823. /package/dist/{locations-OF2ZI5YX.js.map → locations-KVAAO7LD.js.map} +0 -0
  824. /package/dist/{log-I7FAVIQA.js.map → log-63ZVYC6L.js.map} +0 -0
  825. /package/dist/{make-YHE4Y2CK.js.map → make-7ITIZUJI.js.map} +0 -0
  826. /package/dist/{map-3H6JFF3K.js.map → map-MTR4V7KE.js.map} +0 -0
  827. /package/dist/{mcp-KTR7IPSP.js.map → mcp-HKMQLXBC.js.map} +0 -0
  828. /package/dist/{media-sources-XADH7UR6.js.map → media-sources-ZBSBTB4C.js.map} +0 -0
  829. /package/dist/{members-4I3TSPZD.js.map → members-MTRJ3ZRS.js.map} +0 -0
  830. /package/dist/{meta-X46LC3GI.js.map → meta-XVPSGNHU.js.map} +0 -0
  831. /package/dist/{metrics-PKMIG7VL.js.map → metrics-MXGA3EFS.js.map} +0 -0
  832. /package/dist/{models-X2IXXAD6.js.map → models-Z6SUHWKI.js.map} +0 -0
  833. /package/dist/{normalize-GEBDT74P.js.map → normalize-SAKXSFEX.js.map} +0 -0
  834. /package/dist/{options-4DJFAVSV.js.map → options-L7B3SDIX.js.map} +0 -0
  835. /package/dist/{organization-SBFGCUZJ.js.map → organization-FFRNHVC5.js.map} +0 -0
  836. /package/dist/{performance-BHDYL4JE.js.map → performance-AJA7YGOO.js.map} +0 -0
  837. /package/dist/{performance-ZNVGH4BL.js.map → performance-F72KFQU5.js.map} +0 -0
  838. /package/dist/{pixels-DBSPNHIE.js.map → pixels-H642RPK4.js.map} +0 -0
  839. /package/dist/{plan-2Q6SOHMD.js.map → plan-FRRE4YQC.js.map} +0 -0
  840. /package/dist/{promoted-tweet-writes-OQM7SURA.js.map → promoted-tweet-writes-32RAOXQR.js.map} +0 -0
  841. /package/dist/{promoted-tweets-BCKQ4D3D.js.map → promoted-tweets-KMLFRWDN.js.map} +0 -0
  842. /package/dist/{publish-ZCWQZ5EO.js.map → publish-FOSPQ2BE.js.map} +0 -0
  843. /package/dist/{query-GBIWIZSS.js.map → query-FT2BA3WH.js.map} +0 -0
  844. /package/dist/{read-DF3UPNBM.js.map → read-7ZFZAJSQ.js.map} +0 -0
  845. /package/dist/{reddit-NUPXPOG3.js.map → reddit-5PYYZNBJ.js.map} +0 -0
  846. /package/dist/{refresh-5KSQVA3V.js.map → refresh-AOHTPXU4.js.map} +0 -0
  847. /package/dist/{release-QIBDWPNL.js.map → release-G2UKFAQY.js.map} +0 -0
  848. /package/dist/{relevant-pages-OZPYOGFO.js.map → relevant-pages-OCHLUV5K.js.map} +0 -0
  849. /package/dist/{remove-IM3WF5RS.js.map → remove-K5C2URJE.js.map} +0 -0
  850. /package/dist/{reopen-DK3SFSWS.js.map → reopen-PWROABUC.js.map} +0 -0
  851. /package/dist/{rerun-7OOJRRZE.js.map → rerun-CVJYCCNK.js.map} +0 -0
  852. /package/dist/{research-KNLA55TJ.js.map → research-KLWC3JBI.js.map} +0 -0
  853. /package/dist/{research-R3JAZRD4.js.map → research-Z3OJXOS4.js.map} +0 -0
  854. /package/dist/{reset-JRKJKUZL.js.map → reset-3QL7IOHF.js.map} +0 -0
  855. /package/dist/{reset-WQAJPREG.js.map → reset-GPO4MCSM.js.map} +0 -0
  856. /package/dist/{resolve-LCZXCACJ.js.map → resolve-7SW7FZ7Q.js.map} +0 -0
  857. /package/dist/{retry-BPDA54WP.js.map → retry-HNCUDQ7S.js.map} +0 -0
  858. /package/dist/{retry-64YJR4ZS.js.map → retry-NVMOGTZD.js.map} +0 -0
  859. /package/dist/{revenue-WNMRTD6P.js.map → revenue-HDJFYUEB.js.map} +0 -0
  860. /package/dist/{rules-N2YPNUM5.js.map → rules-RYHWD4HA.js.map} +0 -0
  861. /package/dist/{rules-add-BS577EEB.js.map → rules-add-EMDFBYDA.js.map} +0 -0
  862. /package/dist/{run-BNZFJ2YU.js.map → run-2XRDPVHX.js.map} +0 -0
  863. /package/dist/{run-OPSLEKBZ.js.map → run-PXHQKRY5.js.map} +0 -0
  864. /package/dist/{scaffold-ad-PREXRCXY.js.map → scaffold-ad-RJAXMKOX.js.map} +0 -0
  865. /package/dist/{scaffold-static-ad-KK4QOBO7.js.map → scaffold-static-ad-4HLSHPJI.js.map} +0 -0
  866. /package/dist/{scaffold-video-KLBPRMAV.js.map → scaffold-video-UH6OOIQW.js.map} +0 -0
  867. /package/dist/{schedule-BODZ6DED.js.map → schedule-WT22OEBF.js.map} +0 -0
  868. /package/dist/{scheduled-agents-GZEB2B25.js.map → scheduled-agents-BLIDNRFX.js.map} +0 -0
  869. /package/dist/{schema-I54DIUTV.js.map → schema-FUCZHUNV.js.map} +0 -0
  870. /package/dist/{schema-U6GAKTQZ.js.map → schema-NSXMRNWM.js.map} +0 -0
  871. /package/dist/{search-IJ745GV3.js.map → search-S5O3L4KX.js.map} +0 -0
  872. /package/dist/{select-WZJCQW4A.js.map → select-ISIQXRPF.js.map} +0 -0
  873. /package/dist/{set-prompt-SUJW4F5J.js.map → set-prompt-MAQN5CYY.js.map} +0 -0
  874. /package/dist/{setup-links-UVGNFNGP.js.map → setup-links-HANLAGD2.js.map} +0 -0
  875. /package/dist/{site-ZRD4H65V.js.map → site-GADKB2RP.js.map} +0 -0
  876. /package/dist/{sources-E3QDROKM.js.map → sources-CA7JLF4P.js.map} +0 -0
  877. /package/dist/{sources-4FWNXBBR.js.map → sources-HUXVRGDH.js.map} +0 -0
  878. /package/dist/{stale-TPM2XQKT.js.map → stale-2A33KEE7.js.map} +0 -0
  879. /package/dist/{status-QEVQKFFP.js.map → status-5JTRE3OM.js.map} +0 -0
  880. /package/dist/{studio-OV2ZY5W3.js.map → studio-6ZXUKA4G.js.map} +0 -0
  881. /package/dist/{sync-GOVV6G45.js.map → sync-RJFMKM6D.js.map} +0 -0
  882. /package/dist/{sync-definition-OSSIAZ23.js.map → sync-definition-AKZUCLEV.js.map} +0 -0
  883. /package/dist/{tag-manager-5ORFHLM4.js.map → tag-manager-74CGUGXX.js.map} +0 -0
  884. /package/dist/{tags-YJI3QOBK.js.map → tags-B2EXVMNS.js.map} +0 -0
  885. /package/dist/{tags-BXTCJCOH.js.map → tags-JUIKSERD.js.map} +0 -0
  886. /package/dist/{tags-Q6Q5FRVL.js.map → tags-LP6I7GY4.js.map} +0 -0
  887. /package/dist/{tags-YJ3UVNGP.js.map → tags-UHD43CAG.js.map} +0 -0
  888. /package/dist/{tags-H6ZDU6MK.js.map → tags-WJFCPOP7.js.map} +0 -0
  889. /package/dist/{targeting-criteria-667LEXSS.js.map → targeting-criteria-2LKBD5IH.js.map} +0 -0
  890. /package/dist/{targets-AOE2FDDM.js.map → targets-O5JYFOCY.js.map} +0 -0
  891. /package/dist/{testimonials-IOBXKEMA.js.map → testimonials-P63TKNJ2.js.map} +0 -0
  892. /package/dist/{themes-GD53PVOD.js.map → themes-R3A6IVQN.js.map} +0 -0
  893. /package/dist/{top-companies-AUXG5OY5.js.map → top-companies-F7DUMWXA.js.map} +0 -0
  894. /package/dist/{transcript-D7ZS3X6S.js.map → transcript-4RFSQA5U.js.map} +0 -0
  895. /package/dist/{translate-BQCLUORU.js.map → translate-WOJFJRAC.js.map} +0 -0
  896. /package/dist/{triggers-QBG5VN5O.js.map → triggers-4MHFN3VV.js.map} +0 -0
  897. /package/dist/{unlink-5KKAJJM6.js.map → unlink-5AXBQOIL.js.map} +0 -0
  898. /package/dist/{unstage-EU6YHHDA.js.map → unstage-SIBXT25Y.js.map} +0 -0
  899. /package/dist/{update-OLQGUBNH.js.map → update-4BDOO53L.js.map} +0 -0
  900. /package/dist/{update-RW5T53RB.js.map → update-NNEMJQ4D.js.map} +0 -0
  901. /package/dist/{update-JJG7R6QN.js.map → update-O76YSKXB.js.map} +0 -0
  902. /package/dist/{update-RROGL7SO.js.map → update-YS4QI2KP.js.map} +0 -0
  903. /package/dist/{upload-4JN4BPY2.js.map → upload-XVV3HQ5W.js.map} +0 -0
  904. /package/dist/{url-options-VNNI4QXX.js.map → url-options-YZ6UG3NY.js.map} +0 -0
  905. /package/dist/{url-params-3GCYLRDI.js.map → url-params-XL5URMTG.js.map} +0 -0
  906. /package/dist/{validate-YBD2PIZE.js.map → validate-42Q7X2KK.js.map} +0 -0
  907. /package/dist/{videos-OMPPGIYZ.js.map → videos-HMKEY5WY.js.map} +0 -0
  908. /package/dist/{viewer-check-TCX6PFO4.js.map → viewer-check-4XFEWEH3.js.map} +0 -0
  909. /package/dist/{web-QGNS3YPN.js.map → web-PYG3AOYS.js.map} +0 -0
  910. /package/dist/{winning-ads-LY4NV5O3.js.map → winning-ads-74BKOBVN.js.map} +0 -0
  911. /package/dist/{write-commands-OLTCXPPW.js.map → write-commands-43GTQIR6.js.map} +0 -0
  912. /package/dist/{write-commands-FGWCJHLH.js.map → write-commands-5Z5A3D3M.js.map} +0 -0
  913. /package/dist/{write-commands-UTM7PPK5.js.map → write-commands-7DTFGM6E.js.map} +0 -0
  914. /package/dist/{x-VBSKVDIX.js.map → x-6WSV55RN.js.map} +0 -0
@@ -1,2209 +0,0 @@
1
- import {
2
- nodeParamsPreview
3
- } from "./chunk-V4UJERGL.js";
4
- import {
5
- outputRatioWarningsFor,
6
- shownBaseline,
7
- shownVersion
8
- } from "./chunk-X4APGDHX.js";
9
- import {
10
- waitForSheet
11
- } from "./chunk-WN4KX7GE.js";
12
- import {
13
- fetchBrandLogo
14
- } from "./chunk-DSL33LWI.js";
15
- import {
16
- advanceDefinitionStatus
17
- } from "./chunk-3ACMDRSE.js";
18
- import {
19
- correctedPicture,
20
- growFromVersion,
21
- ingestedNow,
22
- keepsChosen,
23
- madeThisRun,
24
- makesSameVariants,
25
- pictureRecord,
26
- plainRunGrowth,
27
- previousAdImage,
28
- previousDelivered,
29
- relaysSizesOnly,
30
- runBaker,
31
- seriesLeadsAbove,
32
- seriesMembers,
33
- seriesRunHints,
34
- variantFiles,
35
- variantImage,
36
- versionRun,
37
- writeSeriesMemberCanvas
38
- } from "./chunk-MO3FJMU5.js";
39
- import {
40
- AUTO_FIX_ROUNDS,
41
- autoFixStep,
42
- clearLegacyDirtyMarker,
43
- correctFrom,
44
- fixMemoryOf,
45
- formatOfSizeNode,
46
- frameChanges,
47
- isStaticAdCanvas,
48
- lostVital,
49
- oneSizeFix,
50
- paidFor,
51
- peopleReader,
52
- persistingDefects,
53
- pictureEdit,
54
- placedTooFar,
55
- plainRunEdit,
56
- prefilterSpend,
57
- readRenderState,
58
- recordRenderAttempt,
59
- recordRendered,
60
- recordReviewOutcome,
61
- recordSeriesLeadRun,
62
- recordSnapshot,
63
- rendersNewPicture,
64
- repeatsFailedFix,
65
- reviewStaticRun,
66
- runCostHint,
67
- sizeShapeOf,
68
- specEditInstruction,
69
- staticReviewTargets,
70
- stopsWithoutRepair,
71
- withDeliveredSizes,
72
- withExtendedSizes,
73
- withRelayEdit,
74
- withRelayNote,
75
- withSizesFollowingFix
76
- } from "./chunk-MONZLJWO.js";
77
- import {
78
- buildFailedRunRecord,
79
- buildInitialRunRecord,
80
- buildRunRecord,
81
- creativeSlugFromCanvasPath,
82
- finalFiles,
83
- finalOutputLabelsFromCanvas,
84
- nodeOutputsToRecord,
85
- withFacts
86
- } from "./chunk-7UFV6H7J.js";
87
- import {
88
- CanvasPrepareError,
89
- REBUILD_FILE,
90
- anchorLines,
91
- castHandles,
92
- computeSourceSha,
93
- exitOnPrepareError,
94
- findBrandRoot,
95
- fixStaticAd,
96
- formatOfAdaptId,
97
- isNativeCanvas,
98
- listSceneFiles,
99
- prepareCanvas,
100
- readIdeaAnchor,
101
- readStaticBrandKit,
102
- readStaticPromptJson,
103
- rederiveFromVariant,
104
- seriesOf,
105
- wireNamedPeople,
106
- wireProofBadges
107
- } from "./chunk-PZEPUBAS.js";
108
- import {
109
- gatewayViewerModel,
110
- jevReadJudge,
111
- liveViewerLookups,
112
- mayBeCorrection,
113
- readTurnRenders,
114
- recordTurnRender,
115
- recordViewerFail,
116
- roundFitsTurn,
117
- turnRenderRefusal,
118
- updateTurnRenders,
119
- viewerCheckBeforeRender,
120
- viewerCheckSkip,
121
- viewerChecksSpent
122
- } from "./chunk-EZVW3KAW.js";
123
- import {
124
- heldRules
125
- } from "./chunk-LDMN6RE6.js";
126
- import {
127
- readAvatars,
128
- writeAvatars
129
- } from "./chunk-C4EE6LIF.js";
130
- import {
131
- readCaseFile
132
- } from "./chunk-P6744QO6.js";
133
- import {
134
- ruleTells
135
- } from "./chunk-3EUITH4J.js";
136
- import {
137
- holdUnbilledSpend,
138
- holdWhenSettled,
139
- sendBillingSpend,
140
- takeUnbilledSpend
141
- } from "./chunk-VWOKPC3T.js";
142
- import {
143
- canvasOutputsRoot,
144
- describeRewrites,
145
- findWorkspaceRoot,
146
- localPathParam
147
- } from "./chunk-BGT5ZA4L.js";
148
- import {
149
- ValidationError,
150
- createEngineFromEnv,
151
- resolveConcurrency,
152
- ulid
153
- } from "./chunk-G6J6AWTE.js";
154
- import {
155
- BackendClient,
156
- STATIC_ADAPT_FORMAT_ROLE,
157
- castsNobody,
158
- isPlateCanvas,
159
- nodesWithRole,
160
- regenerateTargets,
161
- rolesById
162
- } from "./chunk-GCZK4BMB.js";
163
- import {
164
- bytesOf
165
- } from "./chunk-Q6LCL67T.js";
166
- import {
167
- reviewAgainstRules
168
- } from "./chunk-4IRJ5JXA.js";
169
- import {
170
- AdSpecSchema,
171
- adSpecJsonSchema,
172
- decisionOf,
173
- isAdSpec,
174
- isMemeTemplate,
175
- isVital,
176
- jevCitationJudge,
177
- nativeCopy
178
- } from "./chunk-XU6XQPNM.js";
179
- import {
180
- RENDER_REVIEW_MODEL,
181
- RENDER_REVIEW_UNAVAILABLE,
182
- askAboutImages,
183
- reviewContextBeside,
184
- reviewRenderedVideo,
185
- rulesDigest,
186
- sceneWindowsBeside,
187
- videoPathFromOutput
188
- } from "./chunk-B3CDNANO.js";
189
- import {
190
- VIEWER_CHECK_MODEL
191
- } from "./chunk-F3CZFUXZ.js";
192
- import {
193
- LayerExecutionError,
194
- RunAbortedError,
195
- describeFailureReason,
196
- requireCredentialsFromEnv,
197
- runFailureCode,
198
- sha256Hex
199
- } from "./chunk-SYLPRIFM.js";
200
- import {
201
- optionalChatId,
202
- optionalTurnId
203
- } from "./chunk-E54435XT.js";
204
-
205
- // src/commands/canvas/run.ts
206
- import { readFile as readFile4 } from "fs/promises";
207
- import path5 from "path";
208
- import { defineCommand } from "citty";
209
-
210
- // src/commands/canvas/run-progress.ts
211
- function clampNodeError(error) {
212
- return { ...error, message: error.message.slice(0, 2e3) };
213
- }
214
- var RunProgressTracker = class {
215
- runId;
216
- meta;
217
- startedAt;
218
- nodes = /* @__PURE__ */ new Map();
219
- finalLabels;
220
- planned = false;
221
- constructor(runId, meta, finalLabels) {
222
- this.runId = runId;
223
- this.meta = meta;
224
- this.finalLabels = finalLabels;
225
- this.startedAt = Date.now();
226
- }
227
- apply(event) {
228
- if (event.kind === "plan") {
229
- for (const node of event.nodes) {
230
- this.nodes.set(node.node_id, {
231
- nodeId: node.node_id,
232
- nodeType: node.node_type,
233
- cached: false,
234
- credits: 0,
235
- durationMs: 0,
236
- outputs: [],
237
- deps: node.deps,
238
- status: "pending",
239
- paramsPreview: nodeParamsPreview(node.params, node.deps),
240
- ...node.role !== void 0 ? { role: node.role } : {}
241
- });
242
- }
243
- this.planned = true;
244
- return;
245
- }
246
- if (event.kind === "node_start") {
247
- this.patchNode(event.node_id, { status: "running" });
248
- return;
249
- }
250
- if (event.kind === "node_settled") {
251
- this.patchNode(event.run.node_id, {
252
- status: "completed",
253
- cached: event.run.cached,
254
- credits: event.run.credits,
255
- durationMs: event.run.duration_ms,
256
- outputs: nodeOutputsToRecord(
257
- event.outputs,
258
- event.run.node_id === this.finalLabels?.nodeId ? this.finalLabels.labels : void 0
259
- ),
260
- ...withFacts(event.outputs)
261
- });
262
- return;
263
- }
264
- this.patchNode(event.node_id, { status: "failed", error: clampNodeError(event.error) });
265
- }
266
- /** True once the plan event landed — before that there is nothing worth posting. */
267
- hasPlan() {
268
- return this.planned;
269
- }
270
- /** Plan facts (deps + params preview) for stamping the terminal record's nodes. */
271
- planInfo() {
272
- const info = /* @__PURE__ */ new Map();
273
- for (const node of this.nodes.values()) {
274
- info.set(node.nodeId, {
275
- deps: node.deps ?? [],
276
- paramsPreview: node.paramsPreview,
277
- ...node.role !== void 0 ? { role: node.role } : {}
278
- });
279
- }
280
- return info;
281
- }
282
- /** The current in-flight state as a postable full record. */
283
- snapshot() {
284
- const nodes = [...this.nodes.values()];
285
- return {
286
- runId: this.runId,
287
- ...this.meta,
288
- status: "running",
289
- stats: {
290
- totalNodes: nodes.length,
291
- cachedNodes: nodes.filter((n) => n.cached).length,
292
- totalCredits: nodes.reduce((sum, n) => sum + n.credits, 0),
293
- durationMs: Date.now() - this.startedAt
294
- },
295
- nodes
296
- };
297
- }
298
- /**
299
- * Terminal record for a failed run, preserving what each node got to —
300
- * completed nodes keep their outputs so the graph shows exactly where the
301
- * run died instead of an empty husk.
302
- */
303
- failedSnapshot(errorMessage) {
304
- const snapshot = this.snapshot();
305
- return {
306
- ...snapshot,
307
- status: "failed",
308
- errorMessage: errorMessage.slice(0, 2e3),
309
- stats: { ...snapshot.stats, durationMs: Date.now() - this.startedAt }
310
- };
311
- }
312
- patchNode(nodeId, patch) {
313
- const existing = this.nodes.get(nodeId);
314
- if (!existing) return;
315
- this.nodes.set(nodeId, { ...existing, ...patch, status: patch.status ?? existing.status });
316
- }
317
- };
318
- var RunRecordPoster = class {
319
- post;
320
- latest = null;
321
- inflight = null;
322
- warned = false;
323
- keepaliveTimer = null;
324
- constructor(post) {
325
- this.post = post;
326
- }
327
- /** Queue a progress snapshot; returns immediately. */
328
- enqueue(payload) {
329
- this.latest = payload;
330
- if (!this.inflight) this.inflight = this.pump();
331
- }
332
- /**
333
- * Re-post the latest snapshot on an interval even with no new node events, so
334
- * the backend's `canvasRuns.updatedAt` heartbeat stays fresh during a long
335
- * single-clip poll (a video_generate clip can run minutes with no
336
- * intervening node events). When this process dies the keepalive stops → the
337
- * run's `updatedAt` goes stale → the backend reconciliation sweep force-fails
338
- * it as interrupted and surfaces the clips that finished. `produce` returns
339
- * null before the plan lands (nothing worth posting yet).
340
- */
341
- startKeepalive(produce, intervalMs = 6e4) {
342
- if (this.keepaliveTimer) return;
343
- this.keepaliveTimer = setInterval(() => {
344
- const snapshot = produce();
345
- if (snapshot) this.enqueue(snapshot);
346
- }, intervalMs);
347
- this.keepaliveTimer.unref?.();
348
- }
349
- stopKeepalive() {
350
- if (this.keepaliveTimer) {
351
- clearInterval(this.keepaliveTimer);
352
- this.keepaliveTimer = null;
353
- }
354
- }
355
- /**
356
- * Post the terminal record (awaited, errors surfaced to the caller). Any
357
- * queued progress snapshot is superseded — the terminal record is the full
358
- * state — but an in-flight POST is awaited first so it can't land after.
359
- */
360
- async flush(terminal) {
361
- this.stopKeepalive();
362
- this.latest = null;
363
- if (this.inflight) await this.inflight;
364
- await this.post(terminal);
365
- }
366
- async pump() {
367
- while (this.latest) {
368
- const payload = this.latest;
369
- this.latest = null;
370
- try {
371
- await this.post(payload);
372
- } catch (e) {
373
- if (!this.warned) {
374
- this.warned = true;
375
- const msg = e instanceof Error ? e.message : String(e);
376
- process.stderr.write(`[warn] live run progress not streaming (${msg})
377
- `);
378
- }
379
- }
380
- }
381
- this.inflight = null;
382
- }
383
- };
384
-
385
- // src/commands/canvas/run-retention.ts
386
- import { rm } from "fs/promises";
387
- import path from "path";
388
- function runDirsToPrune(entries, keep, currentRunId) {
389
- const runs = entries.filter((e) => /^r_[0-9A-Za-z]+$/.test(e) && e !== currentRunId).sort();
390
- if (keep <= 0) return runs;
391
- return runs.slice(0, Math.max(0, runs.length - keep));
392
- }
393
- async function pruneOldRuns(outputsDir, keep, currentRunId, log) {
394
- const { readdir: readdir2 } = await import("fs/promises");
395
- let entries;
396
- try {
397
- entries = await readdir2(outputsDir);
398
- } catch {
399
- return;
400
- }
401
- const toPrune = runDirsToPrune(entries, keep, currentRunId);
402
- if (toPrune.length === 0) return;
403
- for (const dir of toPrune) {
404
- await rm(path.join(outputsDir, dir), { recursive: true, force: true }).catch(
405
- (e) => log(`[prune ] could not remove ${dir}: ${e.message}`)
406
- );
407
- }
408
- log(`[prune ] removed ${toPrune.length} old run dir(s), kept the ${keep} newest`);
409
- }
410
-
411
- // src/commands/canvas/run-resume.ts
412
- import { randomUUID } from "crypto";
413
- import { rmSync } from "fs";
414
- import { mkdir, readFile, rm as rm2, writeFile } from "fs/promises";
415
- import path2 from "path";
416
- function markerKey(canvasPath) {
417
- const slug = creativeSlugFromCanvasPath(canvasPath);
418
- const identity = slug ?? path2.relative(process.cwd(), path2.resolve(canvasPath));
419
- return sha256Hex(Buffer.from(identity)).slice(0, 32);
420
- }
421
- function markerFile(outputsDir, canvasPath) {
422
- return path2.join(outputsDir, ".inflight", `${markerKey(canvasPath)}.json`);
423
- }
424
- function classifyRemoteRun(run) {
425
- if (run.interrupted === true || run.status === "awaiting_approval") return "adopt";
426
- if (run.status !== "running") return "ignore";
427
- return run.adoptable === true ? "adopt" : "concurrent";
428
- }
429
- var HEARTBEAT_MS = 2e4;
430
- var MARKER_LIVE_MS = 9e4;
431
- function isLiveRender(marker, now = Date.now()) {
432
- if (marker.pid === void 0) return false;
433
- const beat = marker.heartbeatAt ?? marker.startedAt;
434
- if (beat === void 0 || now - beat > MARKER_LIVE_MS) return false;
435
- try {
436
- process.kill(marker.pid, 0);
437
- return true;
438
- } catch (e) {
439
- return e.code === "EPERM";
440
- }
441
- }
442
- async function resolveRunId(opts) {
443
- const existing = await readMarker(opts.outputsDir, opts.canvasPath);
444
- if (existing?.pid !== void 0 && existing.pid !== process.pid && (opts.isRendering ?? ((marker) => isLiveRender(marker)))(existing)) {
445
- return { runId: existing.runId, resumed: false, rendering: { runId: existing.runId, pid: existing.pid } };
446
- }
447
- if (opts.explicitRunId) return { runId: opts.explicitRunId, resumed: false };
448
- if (!opts.fresh) {
449
- if (existing) {
450
- const sameSource = existing.sourceSha !== void 0 && existing.sourceSha === opts.sourceSha;
451
- return { runId: existing.runId, resumed: true, source: "local", sameSource };
452
- }
453
- if (opts.adoptedRunId) return { runId: opts.adoptedRunId, resumed: true, source: "remote", sameSource: true };
454
- if (opts.remote) {
455
- try {
456
- const active = await opts.remote.getActiveRun(opts.remote.creativeSlug, opts.remote.sourceSha);
457
- if (active) {
458
- const decision = classifyRemoteRun(active);
459
- if (decision === "adopt") return { runId: active.runId, resumed: true, source: "remote", sameSource: true };
460
- if (decision === "concurrent") {
461
- return { runId: `r_${ulid()}`, resumed: false, concurrentRunId: active.runId };
462
- }
463
- }
464
- } catch (e) {
465
- const msg = e instanceof Error ? e.message : String(e);
466
- process.stderr.write(`[warn] resumable-run lookup failed (${msg}) \u2014 starting a fresh run
467
- `);
468
- }
469
- }
470
- }
471
- return { runId: `r_${ulid()}`, resumed: false };
472
- }
473
- async function readMarker(outputsDir, canvasPath) {
474
- try {
475
- const parsed = JSON.parse(await readFile(markerFile(outputsDir, canvasPath), "utf8"));
476
- if (typeof parsed.runId !== "string" || parsed.runId.length === 0) return null;
477
- const num = (value) => typeof value === "number" && Number.isFinite(value) ? value : void 0;
478
- return {
479
- runId: parsed.runId,
480
- ...Number.isInteger(parsed.pid) ? { pid: parsed.pid } : {},
481
- ...typeof parsed.token === "string" ? { token: parsed.token } : {},
482
- ...num(parsed.startedAt) !== void 0 ? { startedAt: num(parsed.startedAt) } : {},
483
- ...num(parsed.heartbeatAt) !== void 0 ? { heartbeatAt: num(parsed.heartbeatAt) } : {},
484
- ...typeof parsed.sourceSha === "string" ? { sourceSha: parsed.sourceSha } : {}
485
- };
486
- } catch {
487
- return null;
488
- }
489
- }
490
- async function markRunInFlight(outputsDir, canvasPath, runId, sourceSha) {
491
- const file = markerFile(outputsDir, canvasPath);
492
- const token = randomUUID();
493
- const startedAt = Date.now();
494
- const write = (heartbeatAt) => writeFile(
495
- file,
496
- JSON.stringify({
497
- runId,
498
- pid: process.pid,
499
- token,
500
- canvasPath: path2.resolve(canvasPath),
501
- startedAt,
502
- heartbeatAt,
503
- ...sourceSha ? { sourceSha } : {}
504
- })
505
- );
506
- try {
507
- await mkdir(path2.dirname(file), { recursive: true });
508
- await write(startedAt);
509
- } catch {
510
- }
511
- const timer = setInterval(() => {
512
- void readMarker(outputsDir, canvasPath).then((marker) => marker?.token === token ? write(Date.now()) : void 0).catch(() => void 0);
513
- }, HEARTBEAT_MS);
514
- timer.unref();
515
- return { token, stop: () => clearInterval(timer) };
516
- }
517
- function busyFile(outputsDir, canvasPath) {
518
- return path2.join(outputsDir, ".inflight", `${markerKey(canvasPath)}.busy.json`);
519
- }
520
- async function markCanvasBusy(outputsDir, canvasPath, runId, pid = process.pid) {
521
- const file = busyFile(outputsDir, canvasPath);
522
- const write = () => writeFile(file, JSON.stringify({ runId, pid, heartbeatAt: Date.now() }));
523
- try {
524
- await mkdir(path2.dirname(file), { recursive: true });
525
- await write();
526
- } catch {
527
- }
528
- const timer = setInterval(() => void write().catch(() => void 0), HEARTBEAT_MS);
529
- timer.unref();
530
- let released = false;
531
- const release = () => {
532
- if (released) return;
533
- released = true;
534
- clearInterval(timer);
535
- try {
536
- rmSync(file, { force: true });
537
- } catch {
538
- }
539
- };
540
- return { release };
541
- }
542
- async function canvasBusyElsewhere(outputsDir, canvasPath, now = Date.now()) {
543
- try {
544
- const held = JSON.parse(await readFile(busyFile(outputsDir, canvasPath), "utf8"));
545
- if (typeof held.runId !== "string" || held.pid === void 0 || held.pid === process.pid) return null;
546
- return isLiveRender(held, now) ? { runId: held.runId, pid: held.pid } : null;
547
- } catch {
548
- return null;
549
- }
550
- }
551
- async function clearRunMarker(outputsDir, canvasPath, token) {
552
- try {
553
- if (token !== void 0) {
554
- const marker = await readMarker(outputsDir, canvasPath);
555
- if (marker?.token !== void 0 && marker.token !== token) return;
556
- }
557
- await rm2(markerFile(outputsDir, canvasPath), { force: true });
558
- } catch {
559
- }
560
- }
561
-
562
- // src/commands/canvas/run-snapshot.ts
563
- import { existsSync } from "fs";
564
- import { mkdir as mkdir2, readdir, readFile as readFile2, stat, writeFile as writeFile2 } from "fs/promises";
565
- import path3 from "path";
566
- var SNAPSHOT_SCHEMA = "baker-canvas-snapshot/1";
567
- var MAX_SNAPSHOT_FILE_BYTES = 32 * 1024 * 1024;
568
- var EXT_TO_MIME = {
569
- json: "application/json",
570
- html: "text/html",
571
- css: "text/css",
572
- js: "text/javascript",
573
- txt: "text/plain",
574
- md: "text/markdown",
575
- png: "image/png",
576
- jpg: "image/jpeg",
577
- jpeg: "image/jpeg",
578
- webp: "image/webp",
579
- gif: "image/gif",
580
- avif: "image/avif",
581
- mp3: "audio/mpeg",
582
- wav: "audio/wav",
583
- mp4: "video/mp4",
584
- webm: "video/webm",
585
- mov: "video/quicktime",
586
- ttf: "font/ttf",
587
- otf: "font/otf",
588
- woff: "font/woff",
589
- woff2: "font/woff2"
590
- };
591
- function mimeForFile(filePath) {
592
- const ext = path3.extname(filePath).slice(1).toLowerCase();
593
- return EXT_TO_MIME[ext] ?? "application/octet-stream";
594
- }
595
- function toPosix(p) {
596
- return p.split(path3.sep).join("/");
597
- }
598
- function isInside(dir, target) {
599
- const rel = path3.relative(dir, target);
600
- return !rel.startsWith("..") && !path3.isAbsolute(rel);
601
- }
602
- function localPathRefsFromCanvas(parsed) {
603
- const nodes = parsed?.nodes;
604
- if (!Array.isArray(nodes)) return [];
605
- const refs = /* @__PURE__ */ new Set();
606
- for (const node of nodes) {
607
- const n = node;
608
- const params = n.params;
609
- if (!params || typeof params !== "object") continue;
610
- const key = localPathParam(n);
611
- const value = key ? params[key] : void 0;
612
- if (isSnapshotablePath(value)) refs.add(value);
613
- }
614
- return [...refs];
615
- }
616
- function isSnapshotablePath(value) {
617
- return typeof value === "string" && value.length > 0 && !value.includes("[TODO");
618
- }
619
- var FINGERPRINTED_FILES = ["prompt.json", "_definition.md"];
620
- async function sourceRefsToSnapshot(canvasDir, parsed) {
621
- const refs = new Set(localPathRefsFromCanvas(parsed));
622
- for (const sceneFile of await listSceneFiles(canvasDir)) {
623
- refs.add(toPosix(path3.relative(canvasDir, sceneFile)));
624
- }
625
- refs.add(REBUILD_FILE);
626
- for (const fingerprinted of FINGERPRINTED_FILES) {
627
- if (existsSync(path3.join(canvasDir, fingerprinted))) refs.add(fingerprinted);
628
- }
629
- return [...refs];
630
- }
631
- async function uploadRunSnapshot(client, opts) {
632
- try {
633
- const canvasDir = path3.dirname(opts.canvasPath);
634
- const canvasBytes = Buffer.from(opts.raw);
635
- const canvasEntry = {
636
- path: path3.basename(opts.canvasPath),
637
- bytes: canvasBytes,
638
- sha256: sha256Hex(canvasBytes),
639
- mime: "application/json"
640
- };
641
- const files = [];
642
- const skipped = [];
643
- for (const refPath of await sourceRefsToSnapshot(canvasDir, opts.parsed)) {
644
- const abs = path3.isAbsolute(refPath) ? refPath : path3.resolve(canvasDir, refPath);
645
- if (!isInside(canvasDir, abs)) {
646
- skipped.push({
647
- path: toPosix(path3.relative(canvasDir, abs)),
648
- reason: "outside the creative folder \u2014 read from the workspace on rerun"
649
- });
650
- continue;
651
- }
652
- let st;
653
- try {
654
- st = await stat(abs);
655
- } catch {
656
- skipped.push({ path: toPosix(path3.relative(canvasDir, abs)), reason: "missing" });
657
- continue;
658
- }
659
- const fileList = st.isDirectory() ? await listFilesRecursive(abs) : [abs];
660
- for (const file of fileList) {
661
- const rel = toPosix(path3.relative(canvasDir, file));
662
- const size = (await stat(file)).size;
663
- if (size > MAX_SNAPSHOT_FILE_BYTES) {
664
- skipped.push({ path: rel, reason: `too large (${size} bytes)` });
665
- continue;
666
- }
667
- const bytes = await readFile2(file);
668
- files.push({ path: rel, bytes, sha256: sha256Hex(bytes), mime: mimeForFile(file) });
669
- }
670
- }
671
- const identity = sha256Hex(
672
- Buffer.from(
673
- JSON.stringify({
674
- creativeSlug: opts.creativeSlug,
675
- entries: [canvasEntry, ...files].map((entry) => [entry.path, entry.sha256]),
676
- skipped
677
- })
678
- )
679
- );
680
- if (opts.previous?.identity === identity) return opts.previous;
681
- const put = (bytes, mime) => putContentAddressed(client, bytes, mime, opts.signal);
682
- const canvasUpload = await put(canvasEntry.bytes, canvasEntry.mime);
683
- const uploaded = [];
684
- for (const file of files) {
685
- const upload = await put(file.bytes, file.mime);
686
- uploaded.push({ path: file.path, sha256: upload.sha256, url: upload.url });
687
- }
688
- const manifest = {
689
- schema: SNAPSHOT_SCHEMA,
690
- creativeSlug: opts.creativeSlug,
691
- canvasSha: canvasUpload.sha256,
692
- canvas: { path: canvasEntry.path, sha256: canvasUpload.sha256, url: canvasUpload.url },
693
- files: uploaded,
694
- skipped: skipped.length > 0 ? skipped : void 0
695
- };
696
- const manifestUpload = await put(Buffer.from(JSON.stringify(manifest)), "application/json");
697
- return { identity, url: manifestUpload.url };
698
- } catch (e) {
699
- const msg = e instanceof Error ? e.message : String(e);
700
- process.stderr.write(`[warn] canvas snapshot not uploaded (${msg}) \u2014 this run cannot be re-run from another workspace
701
- `);
702
- return null;
703
- }
704
- }
705
- var MAX_GRAPH_BYTES = 4 * 1024 * 1024;
706
- async function uploadRunGraph(client, graph, signal) {
707
- try {
708
- const bytes = Buffer.from(JSON.stringify(graph));
709
- if (bytes.length > MAX_GRAPH_BYTES) return null;
710
- return (await putContentAddressed(client, bytes, "application/json", signal)).url;
711
- } catch (e) {
712
- const msg = e instanceof Error ? e.message : String(e);
713
- process.stderr.write(`[warn] run graph not kept (${msg}) \u2014 a correction from another workspace starts from its picture
714
- `);
715
- return null;
716
- }
717
- }
718
- async function putContentAddressed(client, bytes, mime, signal) {
719
- const sha256 = sha256Hex(bytes);
720
- const { putUrl, publicUrl } = await client.presignAssetUpload(sha256, mime, signal, "blueprint");
721
- const held = await fetch(publicUrl, { method: "HEAD", signal }).then(
722
- (res2) => res2.ok,
723
- () => false
724
- );
725
- if (held) return { sha256, url: publicUrl };
726
- const res = await fetch(putUrl, {
727
- method: "PUT",
728
- body: new Uint8Array(bytes),
729
- headers: { "Content-Type": mime },
730
- signal
731
- });
732
- if (!res.ok) throw new Error(`snapshot PUT failed ${res.status} ${res.statusText}`);
733
- return { sha256, url: publicUrl };
734
- }
735
- async function listFilesRecursive(dir) {
736
- const entries = await readdir(dir, { recursive: true, withFileTypes: true });
737
- return entries.filter((d) => d.isFile()).map((d) => path3.join(d.parentPath, d.name));
738
- }
739
- var SnapshotConflictError = class extends Error {
740
- conflicts;
741
- constructor(conflicts) {
742
- super(`local files differ from the recorded snapshot: ${conflicts.join(", ")}`);
743
- this.name = "SnapshotConflictError";
744
- this.conflicts = conflicts;
745
- }
746
- };
747
- async function restoreRunSnapshot(manifest, targetDir, opts = {}) {
748
- const entries = [manifest.canvas, ...manifest.files];
749
- const resolvedTarget = path3.resolve(targetDir);
750
- const planned = [];
751
- const conflicts = [];
752
- const upToDate = [];
753
- for (const entry of entries) {
754
- if (path3.isAbsolute(entry.path) || entry.path.split("/").includes("..")) {
755
- throw new Error(`snapshot entry escapes the creative directory: ${entry.path}`);
756
- }
757
- const target = path3.resolve(resolvedTarget, entry.path);
758
- if (target !== resolvedTarget && !target.startsWith(resolvedTarget + path3.sep)) {
759
- throw new Error(`snapshot entry escapes the creative directory: ${entry.path}`);
760
- }
761
- const existing = await readFile2(target).catch(() => null);
762
- if (existing) {
763
- if (sha256Hex(existing) === entry.sha256) {
764
- upToDate.push(entry.path);
765
- continue;
766
- }
767
- if (!opts.force) {
768
- conflicts.push(entry.path);
769
- continue;
770
- }
771
- }
772
- planned.push({ entry, target });
773
- }
774
- if (conflicts.length > 0) throw new SnapshotConflictError(conflicts);
775
- const restored = [];
776
- for (const { entry, target } of planned) {
777
- const res = await fetch(entry.url);
778
- if (!res.ok) throw new Error(`snapshot download failed for ${entry.path}: ${res.status} ${res.statusText}`);
779
- const bytes = Buffer.from(await res.arrayBuffer());
780
- if (sha256Hex(bytes) !== entry.sha256) {
781
- throw new Error(`snapshot download for ${entry.path} does not match its recorded sha256`);
782
- }
783
- await mkdir2(path3.dirname(target), { recursive: true });
784
- await writeFile2(target, bytes);
785
- restored.push(entry.path);
786
- }
787
- return { canvasPath: path3.resolve(resolvedTarget, manifest.canvas.path), restored, upToDate };
788
- }
789
-
790
- // src/commands/avatars/namedPerson.ts
791
- var RESEARCH_TIMEOUT_MS = 18e4;
792
- async function avatarOfNamedPerson(who) {
793
- const research = await writeAvatars(
794
- "/api/avatars/research",
795
- { who, create: true },
796
- { timeoutMs: RESEARCH_TIMEOUT_MS }
797
- );
798
- const handle = research.avatar?.handle;
799
- if (research.status !== "found" || !handle) return null;
800
- const read = () => readAvatars("/api/avatars/get", { handle });
801
- const avatar = await waitForSheet(await read(), read);
802
- return avatar.sheetUrl ? { handle, sheetUrl: avatar.sheetUrl } : null;
803
- }
804
-
805
- // src/commands/canvas/slug-restore.ts
806
- import { existsSync as existsSync2 } from "fs";
807
- import path4 from "path";
808
- var SLUG_PATTERN = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
809
- var SlugRestoreError = class extends Error {
810
- code;
811
- fix;
812
- constructor(code, message, fix) {
813
- super(message);
814
- this.name = "SlugRestoreError";
815
- this.code = code;
816
- this.fix = fix;
817
- }
818
- };
819
- async function canvasForSlug(slug, opts) {
820
- if (!SLUG_PATTERN.test(slug)) {
821
- throw new SlugRestoreError("invalid_slug", `"${slug}" is not a valid creative slug`);
822
- }
823
- const targetDir = path4.join(opts.workspaceRoot, "src", "creatives", slug);
824
- const local = path4.join(targetDir, `${slug}.canvas.json`);
825
- if (!opts.forceRemote && existsSync2(local)) return { canvasPath: local };
826
- const client = opts.client();
827
- if (!client) {
828
- throw new SlugRestoreError(
829
- "missing_credentials",
830
- `"${slug}" is not in this workspace, and restoring it from run history needs Baker credentials (BAKER_API_URL / BAKER_API_KEY).`
831
- );
832
- }
833
- const latest = await client.getLatestSnapshotRun(slug);
834
- if (!latest) {
835
- throw new SlugRestoreError(
836
- "no_snapshot_run",
837
- `No creative "${slug}" in this workspace, and no recorded run of it to restore from.`,
838
- "Check the slug against `ls src/creatives`, or scaffold the creative first."
839
- );
840
- }
841
- const manifest = await fetchManifest(latest.canvasSnapshotUrl);
842
- if (latest.canvasSha && manifest.canvasSha !== latest.canvasSha) {
843
- throw new SlugRestoreError("snapshot_mismatch", `the snapshot of run ${latest.runId} does not match its recorded canvas`);
844
- }
845
- try {
846
- const restore = await restoreRunSnapshot(manifest, targetDir, { force: opts.forceRemote });
847
- opts.log(
848
- restore.restored.length > 0 ? `[restore] ${restore.restored.length} file(s) from run ${latest.runId}: ${restore.restored.join(", ")}` : `[restore] local files already match run ${latest.runId}, nothing downloaded`
849
- );
850
- for (const skipped of manifest.skipped ?? []) {
851
- opts.log(`[warn] snapshot omitted ${skipped.path} (${skipped.reason}); supply it locally if the run needs it fresh`);
852
- }
853
- return { canvasPath: restore.canvasPath, adoptRunId: await adoptableRun(client, slug, latest.runId) };
854
- } catch (e) {
855
- if (e instanceof SnapshotConflictError) {
856
- throw new SlugRestoreError(
857
- "local_files_differ",
858
- `local files differ from the recorded snapshot: ${e.conflicts.join(", ")}`,
859
- "Re-run with --force-remote to overwrite them, or run the local canvas file directly with `baker canvas run <file>`."
860
- );
861
- }
862
- throw e;
863
- }
864
- }
865
- async function adoptableRun(client, slug, restoredRunId) {
866
- const active = await client.getActiveRun(slug).catch(() => null);
867
- return active?.runId === restoredRunId && active.adoptable === true ? restoredRunId : void 0;
868
- }
869
- async function fetchManifest(url) {
870
- const res = await fetch(url);
871
- if (!res.ok) {
872
- throw new SlugRestoreError("snapshot_unavailable", `snapshot manifest download failed: ${res.status} ${res.statusText}`);
873
- }
874
- const manifest = await res.json();
875
- if (manifest?.schema !== SNAPSHOT_SCHEMA || typeof manifest.canvas?.path !== "string") {
876
- throw new SlugRestoreError("snapshot_invalid", "snapshot manifest has an unexpected shape");
877
- }
878
- return manifest;
879
- }
880
-
881
- // src/commands/canvas/series-run.ts
882
- async function runSeries(slugs, deps) {
883
- return Promise.all(
884
- slugs.map(async (slug) => {
885
- const plan = await deps.plan(slug);
886
- if ("refused" in plan) return { slug, status: "refused", error: plan.refused };
887
- if (!plan.run) return { slug, status: "up_to_date", ...plan.runId ? { run_id: plan.runId } : {} };
888
- return resultOf(slug, await deps.run(slug));
889
- })
890
- );
891
- }
892
- function resultOf(slug, answer) {
893
- if (answer.ok !== true) {
894
- const error = answer.error ?? {};
895
- return {
896
- slug,
897
- status: "failed",
898
- error: {
899
- code: error.code ?? "render_failed",
900
- message: error.message ?? "The render did not finish.",
901
- ...error.fix ? { fix: error.fix } : {}
902
- }
903
- };
904
- }
905
- const verdict = answer.verdict;
906
- const status = verdict === "ready" || verdict === "ready_with_notes" || verdict === "needs_fixes" ? verdict : "ready";
907
- return {
908
- slug,
909
- status,
910
- ...typeof answer.run_id === "string" ? { run_id: answer.run_id } : {},
911
- ...answer.files !== void 0 ? { files: answer.files } : {}
912
- };
913
- }
914
- function seriesEnvelope(lead, results) {
915
- const ready = results.filter((r) => r.status === "ready" || r.status === "ready_with_notes");
916
- const fixes = results.filter((r) => r.status === "needs_fixes");
917
- const stopped = results.filter((r) => r.status === "refused" || r.status === "failed");
918
- return {
919
- ok: true,
920
- data: { lead, ready: ready.map((r) => r.slug), ads: results },
921
- hints: [
922
- ...ready.filter((r) => r.run_id).map((r) => `Save: baker creatives publish --slug ${r.slug} --run-id ${r.run_id} --title "<title>" --output <lead size>`),
923
- ...fixes.length > 0 ? [
924
- `Still needs fixes after its own corrections: ${fixes.map((r) => r.slug).join(", ")}. Correct each by itself (baker canvas run --slug <slug> --fix "<what to change>"); the others stay as they are.`
925
- ] : [],
926
- ...stopped.map((r) => `${r.slug}: ${r.error?.message ?? "not rendered"}${r.error?.fix ? ` ${r.error.fix}` : ""}`),
927
- `A new version of the lead (${lead}) reaches every ad of the series on the next \`baker canvas run --series ${lead}\`.`
928
- ]
929
- };
930
- }
931
-
932
- // src/commands/canvas/voice-retake.ts
933
- var nodesOf = (graph) => {
934
- const nodes = graph?.nodes;
935
- return Array.isArray(nodes) ? nodes : [];
936
- };
937
- function refsIn(value) {
938
- if (typeof value === "string") {
939
- const id = /^\$ref:([^.]+)\./.exec(value)?.[1];
940
- return id ? [id] : [];
941
- }
942
- if (Array.isArray(value)) return value.flatMap(refsIn);
943
- if (value && typeof value === "object") return Object.values(value).flatMap(refsIn);
944
- return [];
945
- }
946
- function keptVoiceClips(graph) {
947
- const nodes = nodesOf(graph);
948
- const byId = new Map(nodes.flatMap((n) => typeof n.id === "string" ? [[n.id, n]] : []));
949
- const tracks = nodes.filter((n) => {
950
- const tags = n.tags ?? {};
951
- return n.type === "audio_timeline" && tags.role === "voice" && tags.on_camera === true;
952
- });
953
- const seen = /* @__PURE__ */ new Set();
954
- const queue = tracks.flatMap((t) => refsIn(t.inputs));
955
- while (queue.length > 0) {
956
- const id = queue.pop();
957
- if (seen.has(id)) continue;
958
- seen.add(id);
959
- queue.push(...refsIn(byId.get(id)?.inputs));
960
- }
961
- return [...seen].flatMap((id) => {
962
- const node = byId.get(id);
963
- return node?.type === "video_generate" ? [node] : [];
964
- });
965
- }
966
- var promptOf = (node) => JSON.stringify(node?.params?.prompt ?? null);
967
- function retakenTalkingScenes(previous, canvas) {
968
- const before = new Map(nodesOf(previous).map((n) => [n.id, n]));
969
- return keptVoiceClips(canvas).filter((clip) => before.has(clip.id) && promptOf(before.get(clip.id)) !== promptOf(clip)).map((clip) => String(clip.id));
970
- }
971
-
972
- // src/commands/canvas/static-spec-repair.ts
973
- import { readFile as readFile3, writeFile as writeFile3 } from "fs/promises";
974
- import sharp from "sharp";
975
- import { z } from "zod";
976
- var Answer = z.object({
977
- changed: z.string().min(1),
978
- set: z.array(z.object({ path: z.string().min(1), value: z.unknown() }))
979
- });
980
- function withValueAt(root, path6, value) {
981
- const [key, ...rest] = path6;
982
- if (key === void 0) return value;
983
- if (Array.isArray(root)) {
984
- const at = Number(key);
985
- if (!Number.isInteger(at) || at < 0 || at > root.length) return root;
986
- const next = [...root];
987
- next[at] = withValueAt(root[at], rest, value);
988
- return next;
989
- }
990
- const holder = root && typeof root === "object" ? root : {};
991
- return { ...holder, [key]: withValueAt(holder[key], rest, value) };
992
- }
993
- function declaredAvatars(spec) {
994
- return new Set((spec.concept?.load_bearing ?? []).filter(isVital).flatMap((l) => castHandles(l.ours ?? "")));
995
- }
996
- function groundedAvatars(spec) {
997
- return new Set(spec.references.flatMap((r) => r.avatar ? [r.avatar.toLowerCase()] : []));
998
- }
999
- function castsOnly(spec, avatars) {
1000
- const people = spec.references.filter((r) => r.id.startsWith("PERSON_"));
1001
- return people.length > 0 && people.every((r) => r.avatar !== void 0 && avatars.has(r.avatar.toLowerCase()));
1002
- }
1003
- function keepsCast(was, now) {
1004
- const declared = declaredAvatars(was);
1005
- if (castsNobody(was) && !castsNobody(now) && !castsOnly(now, declared)) return false;
1006
- const before = groundedAvatars(was);
1007
- const after = groundedAvatars(now);
1008
- return ![...declared].some((handle) => before.has(handle) && !after.has(handle));
1009
- }
1010
- function memeTemplateReferences(spec) {
1011
- return spec.references.filter(isMemeTemplate);
1012
- }
1013
- function keepsMemeTemplates(was, now) {
1014
- return memeTemplateReferences(was).every(
1015
- (t) => now.references.some((r) => r.id === t.id && r.role === t.role && r.image === t.image && r.what === t.what && r.keep === t.keep)
1016
- );
1017
- }
1018
- function printedWords(spec) {
1019
- return [...spec.copy.map((l) => l.text), ...spec.native ? nativeCopy(spec.native) : []];
1020
- }
1021
- function acceptRepair(before, answer, held = { rules: [] }) {
1022
- const parsed = Answer.safeParse(answer);
1023
- if (!parsed.success || !isAdSpec(before)) return null;
1024
- const spec = parsed.data.set.reduce((at, { path: path6, value }) => withValueAt(at, path6.split("."), value), before);
1025
- if (!isAdSpec(spec)) return null;
1026
- const was = AdSpecSchema.safeParse(before);
1027
- const now = AdSpecSchema.safeParse(spec);
1028
- if (!was.success || !now.success) return null;
1029
- if (JSON.stringify(was.data) === JSON.stringify(now.data)) return null;
1030
- for (const key of ["concept", "mechanism", "message", "brand", "viewer"]) {
1031
- if (JSON.stringify(was.data[key]) !== JSON.stringify(now.data[key])) return null;
1032
- }
1033
- if (was.data.native && was.data.native.surface !== now.data.native?.surface) return null;
1034
- if (!keepsCast(was.data, now.data) || !keepsMemeTemplates(was.data, now.data)) return null;
1035
- const kept = printedWords(now.data);
1036
- const said = printedWords(was.data);
1037
- if (!said.every((text) => kept.includes(text))) return null;
1038
- if (was.data.native) {
1039
- const shown = now.data.native ? nativeCopy(now.data.native) : [];
1040
- if (!nativeCopy(was.data.native).every((text) => shown.includes(text))) return null;
1041
- }
1042
- const added = kept.filter((text) => !said.includes(text));
1043
- if (ruleTells(added, held.rules, held.language).some((t) => t.kind === "forbidden")) return null;
1044
- return { changed: parsed.data.changed, spec };
1045
- }
1046
- function memeTemplatesOf(spec) {
1047
- let raw;
1048
- try {
1049
- raw = JSON.parse(spec);
1050
- } catch {
1051
- return [];
1052
- }
1053
- const parsed = AdSpecSchema.safeParse(raw);
1054
- return parsed.success ? memeTemplateReferences(parsed.data).map((r) => `${r.id} (${r.what})`) : [];
1055
- }
1056
- function buildSpecRepairPrompt(spec, findings, schema, rejected = [], restore = []) {
1057
- const templates = memeTemplatesOf(spec);
1058
- return [
1059
- "This is the spec (prompt.json) a static ad was drawn from, and the image is the ad it gave.",
1060
- "A review found these defects in it, and they come from what the spec asks for, so drawing it again or editing the picture brings them back:",
1061
- ...findings.map((f) => `- ${f}`),
1062
- ...restore.length > 0 ? [
1063
- "",
1064
- "Restore what made the proven ad win, as the concept declares it: put each of these back in the scene, the references and the lines' `look`, carried by exactly what of ours the concept names; never drop it or put anything the concept does not declare in its place.",
1065
- ...restore.map((r) => `- ${r}`)
1066
- ] : [],
1067
- ...rejected.length > 0 ? [
1068
- "",
1069
- "What the person rejected in earlier versions of this ad, in their words: never bring back any of it, in the scene, the references or the layout.",
1070
- ...rejected.map((r) => `- ${r}`)
1071
- ] : [],
1072
- "",
1073
- "Correct the spec so these defects cannot happen, changing as little as you can:",
1074
- "- Drop, replace or reword the element, photo, reference, layout or scene instruction that causes a defect (never what the concept keeps of the proven ad). A second subject the viewer would read as another one (another pet, another person) is dropped, or made unmistakably the same one.",
1075
- "- A rating or stars shown with no source: name the source only if the spec already states one anywhere; otherwise drop the stars or the rating. Never invent a source, a number or a claim.",
1076
- "- A native screen's layout (where its headline, bubbles or cards sit, what it shows) is changed in its `native` block.",
1077
- "- Keep every line of copy word for word: never reword, shorten or drop one. Keep the schema, the brand and everything the defects do not touch.",
1078
- "- Preserve `concept`, `mechanism`, `message` and `brand` exactly, including the CTA colour. Fix how the ad executes its idea; never change why it works or remove its load-bearing elements to make a defect pass.",
1079
- ...templates.length > 0 ? [
1080
- `- These references are real meme templates, grounded on their real pictures: ${templates.join("; ")}. Keep each exactly as it is (id, role, image and use) and keep the scene using it as the picture; never drop, replace or redraw one, and never describe its people or faces in the scene for the image model to draw.`
1081
- ] : [],
1082
- "- Keep a native screen on the same `native.surface`. Notes stays Notes, a review stays on its review platform. Change its layout or content only; never replace it with a physical document or a generic ad.",
1083
- "",
1084
- 'Reply with only this JSON, naming only the fields you replace, each by its dotted path in the spec ("scene.layout", "references", "copy.2.position", "native.messages"), with its whole new value: {"changed": "<one plain sentence a marketer reads: what you changed and why>", "set": [{"path": "<dotted path>", "value": <its new value>}]}',
1085
- "",
1086
- "The spec:",
1087
- spec,
1088
- // Bench, Oct 2026: without it the model set a field the spec does not have ("native.layout").
1089
- ...schema ? ["", "Its JSON schema: set only fields and values it allows.", JSON.stringify(schema)] : []
1090
- ].join("\n");
1091
- }
1092
- function restoreLines(spec, jobs) {
1093
- const parsed = AdSpecSchema.safeParse(spec);
1094
- if (!parsed.success || jobs.length === 0) return [];
1095
- return (parsed.data.concept?.load_bearing ?? []).filter((l) => isVital(l) && l.job !== void 0 && jobs.includes(l.job)).map((l) => {
1096
- const carried = decisionOf(l) === "keep" ? "kept as in the proven ad" : `carried by ${l.ours?.trim() || "what of ours the concept names"}`;
1097
- return `${l.job === "stop" ? "what stops the scroll" : "the proof"}, "${l.element}": ${carried}`;
1098
- });
1099
- }
1100
- var REPAIR_TIMEOUT_MS = 15e4;
1101
- var SHOWN_WIDTH = 768;
1102
- async function repairSpec(opts) {
1103
- const text = await readFile3(opts.promptPath, "utf8").catch(() => null);
1104
- if (text === null) return null;
1105
- let before;
1106
- try {
1107
- before = JSON.parse(text);
1108
- } catch {
1109
- return null;
1110
- }
1111
- const shown = opts.image ? await bytesOf(opts.image).then(async (bytes) => (await sharp(bytes).resize({ width: SHOWN_WIDTH }).jpeg({ quality: 85 }).toBuffer()).toString("base64")).catch(() => null) : null;
1112
- const prompt = buildSpecRepairPrompt(
1113
- text,
1114
- opts.findings,
1115
- adSpecJsonSchema(),
1116
- opts.rejected,
1117
- restoreLines(before, opts.restore ?? [])
1118
- );
1119
- const repair = acceptRepair(
1120
- before,
1121
- await askAboutImages(RENDER_REVIEW_MODEL, shown ? [shown] : [], prompt, opts.onSpend, REPAIR_TIMEOUT_MS),
1122
- opts.held
1123
- );
1124
- if (!repair) return null;
1125
- await writeFile3(opts.promptPath, `${JSON.stringify(repair.spec, null, 2)}
1126
- `, "utf8");
1127
- return repair.changed;
1128
- }
1129
-
1130
- // src/commands/canvas/run.ts
1131
- function refusePlateVersion(runId) {
1132
- const message = `The version of run ${runId} could not be found with the picture its sizes are cut from, so it cannot be changed on top of. Render the creative again (baker canvas run --slug <slug>), then make the change on that version.`;
1133
- process.stderr.write(`${JSON.stringify({ ok: false, error: { code: "version_not_found", message } }, null, 2)}
1134
- `);
1135
- process.exit(2);
1136
- }
1137
- var OPERATOR = "Operator only, agents never need it.";
1138
- var runCommand = defineCommand({
1139
- meta: {
1140
- name: "run",
1141
- description: "Validate and execute a canvas. Pass the canvas file, or `--slug <slug>` to run a creative by name: its canvas in this workspace, or, when this workspace does not have it (a fresh workspace, another chat's creative), its files restored from its latest recorded run first. A run that was interrupted resumes; a finished one re-renders from the cache."
1142
- },
1143
- args: {
1144
- file: { type: "positional", required: false, description: "Path to canvas JSON (or use --slug)" },
1145
- slug: {
1146
- type: "string",
1147
- description: "Run the creative src/creatives/<slug>/ by name instead of passing its file. Restores its files from run history when they are not in this workspace; local files are never overwritten unless you pass --force-remote."
1148
- },
1149
- series: {
1150
- type: "string",
1151
- description: "Render every ad of the series this lead ad leads, all at once (`baker creatives make <idea> --series <lead>` made them): each is the lead's ready version with its own words, reviewed and corrected on its own. An ad already ready from the lead's current version is not rendered again. Start here for several messages in one style: baker canvas run --series spring-offer"
1152
- },
1153
- "force-remote": {
1154
- type: "boolean",
1155
- default: false,
1156
- description: "With --slug: restore the recorded files even over local ones, replacing those that differ"
1157
- },
1158
- until: {
1159
- type: "string",
1160
- description: "Stop before the expensive half and leave the run resumable. `frames` settles the pictures and stops on the doorstep of the clips, so the look can be checked for the price of a few images instead of a whole ad. Continue with `baker canvas run <file> --run-id <the same id>` \u2014 everything already done is cached and is not paid for twice."
1161
- },
1162
- brief: {
1163
- type: "string",
1164
- description: "What the person asked for, IN THEIR OWN WORDS \u2014 paste their message, do not summarise it. The review compares the finished video against this and reports what they asked for that is missing or contradicted. Without it the review can only say whether the video is well made, not whether it is the one they wanted: every other check grades the render against the spec, and a spec that misread the request agrees with itself."
1165
- },
1166
- "run-id": { type: "string", description: "Override run id (also resumes that run, re-attaching its in-flight jobs)" },
1167
- fix: {
1168
- type: "string",
1169
- description: `Static ad only: correct a finished version instead of rendering a new one. One render takes that version as its first reference and changes only what you say here ("the CTA sits in the Stories band: move it up", "'Analitica' is missing its accent"), keeping the picture, layout and every other word. It is added on top of that version: its options, pick and earlier corrections are kept as they were made (free), the edit after them. Every size is made again from it (each other size re-laid out from it, one request each) and the review follows as usual. The version is the creative's last render, or --from <run_id>.`
1170
- },
1171
- from: {
1172
- type: "string",
1173
- description: "With --fix, --use-variant or a --regenerate of sizes only: the run id of the version (default: the one the creative shows, its last render here, or in a new chat the version chosen, else its newest)"
1174
- },
1175
- "use-variant": {
1176
- type: "string",
1177
- description: "Static ad only: the person asked in the chat for another of a version's variants over the judge's pick. Give its sha256 (the picture's, never the option's number): every size is made again from that picture, the judge's pick replaced. The only requests re-lay out each other size from that picture (one per size). The version is --from <run_id>, else the creative's last render."
1178
- },
1179
- autofix: {
1180
- type: "boolean",
1181
- default: true,
1182
- description: `Static ad: when the review finds a blocking defect, the run corrects it itself before it reports (up to ${AUTO_FIX_ROUNDS} more renders: the chosen picture fixed, or only the size at fault laid out again). --no-autofix reports after the first render.`
1183
- },
1184
- "skip-viewer-check": {
1185
- type: "boolean",
1186
- default: false,
1187
- description: "Static ad only: render without the viewer check (see `baker canvas viewer-check`). Only when the person has heard what the viewer missed and asked for this copy as it is."
1188
- },
1189
- fresh: {
1190
- type: "boolean",
1191
- default: false,
1192
- description: "Ignore any interrupted-run marker and start a new run id instead of resuming"
1193
- },
1194
- "cache-policy": { type: "string", description: "read_write | bypass | read_only" },
1195
- regenerate: {
1196
- type: "string",
1197
- description: "Comma-separated node ids or roles to force fresh THIS run (e.g. --regenerate pick,adapt; on a static ad --regenerate static_variants, or its id gen, renders the variants again; on one cut from one picture --regenerate format_9x16 sets the 9:16's words again on the picture the last version shows, its --fix correction or chosen variant included; on one laid out again for each size --regenerate adapt_9x16 lays out the 9:16 again from that picture, and --regenerate static_adapt_format every re-laid-out size), bypassing the content cache for just those nodes + everything downstream. For a persistent re-render, bump a node's `regenerate` field in the canvas JSON instead."
1198
- },
1199
- concurrency: {
1200
- type: "string",
1201
- description: "Max nodes running at once (default 8; env BAKER_CANVAS_CONCURRENCY)"
1202
- },
1203
- parallel: {
1204
- type: "string",
1205
- description: "Alias for --concurrency: independent clips (and every other same-layer node) already fan out in parallel up to this bound"
1206
- },
1207
- // citty consumes any `--no-<flag>` as a negation of `<flag>`, so the
1208
- // opt-out spelling `--no-record` requires the flag to be named `record`
1209
- // (a literal "no-record" arg would never receive a value).
1210
- record: {
1211
- type: "boolean",
1212
- default: true,
1213
- description: "Post the durable run-history record to Baker (disable with --no-record)"
1214
- },
1215
- "cache-dir": { type: "string", description: `${OPERATOR} Cache root (default <workspace root>/canvas/.cache)` },
1216
- "outputs-dir": { type: "string", description: `${OPERATOR} Per-run outputs root (default <workspace root>/canvas)` },
1217
- "keep-runs": {
1218
- type: "string",
1219
- description: `${OPERATOR} After the run, prune old r_* run dirs, keeping the N newest (off by default)`
1220
- },
1221
- "remote-cache": {
1222
- type: "string",
1223
- description: `${OPERATOR} on | off: company-scoped remote cache + durable asset persistence (default on; env BAKER_CANVAS_REMOTE_CACHE)`
1224
- }
1225
- },
1226
- async run({ args }) {
1227
- if (args.series) {
1228
- await executeSeriesRun(String(args.series));
1229
- return;
1230
- }
1231
- await executeCanvasRun({
1232
- file: args.file ? String(args.file) : void 0,
1233
- slug: args.slug ? String(args.slug) : void 0,
1234
- forceRemote: args["force-remote"] === true,
1235
- cacheDir: args["cache-dir"] ? String(args["cache-dir"]) : void 0,
1236
- outputsDir: args["outputs-dir"] ? String(args["outputs-dir"]) : void 0,
1237
- runId: args["run-id"] ? String(args["run-id"]) : void 0,
1238
- fresh: args.fresh === true,
1239
- fix: args.fix ? String(args.fix) : void 0,
1240
- from: args.from ? String(args.from) : void 0,
1241
- useVariant: args["use-variant"] ? String(args["use-variant"]) : void 0,
1242
- skipViewerCheck: args["skip-viewer-check"] === true,
1243
- autoFix: args.autofix !== false,
1244
- brief: args.brief ? String(args.brief) : void 0,
1245
- until: args.until ? String(args.until) : void 0,
1246
- cachePolicy: args["cache-policy"] ? String(args["cache-policy"]) : void 0,
1247
- regenerate: args.regenerate !== void 0 ? String(args.regenerate) : void 0,
1248
- // --concurrency wins; --parallel is the discoverable alias for the same bound.
1249
- concurrency: (args.concurrency ?? args.parallel) !== void 0 ? String(args.concurrency ?? args.parallel) : void 0,
1250
- keepRuns: args["keep-runs"] !== void 0 ? Number(args["keep-runs"]) : void 0,
1251
- remoteCache: args["remote-cache"] !== void 0 ? String(args["remote-cache"]) !== "off" : void 0,
1252
- record: args.record !== false
1253
- });
1254
- }
1255
- });
1256
- function stopBeforeKinds(until) {
1257
- if (until?.trim() === "frames") return /* @__PURE__ */ new Set(["video_generate"]);
1258
- return null;
1259
- }
1260
- function failPreflight(code, message, fix) {
1261
- process.stderr.write(`${JSON.stringify({ ok: false, error: { code, message, ...fix ? { fix } : {} } }, null, 2)}
1262
- `);
1263
- process.exit(2);
1264
- }
1265
- async function canvasFileFor(opts) {
1266
- if (opts.file) return { canvasPath: path5.resolve(opts.file) };
1267
- if (!opts.slug) failPreflight("missing_canvas", "Pass the canvas file, or --slug <slug> to run a creative by name.");
1268
- const cwd = process.cwd();
1269
- try {
1270
- return await canvasForSlug(opts.slug, {
1271
- workspaceRoot: findWorkspaceRoot(cwd) ?? cwd,
1272
- forceRemote: opts.forceRemote === true,
1273
- client: buildBackendClient,
1274
- log: (line) => process.stdout.write(`${line}
1275
- `)
1276
- });
1277
- } catch (e) {
1278
- if (e instanceof SlugRestoreError) failPreflight(e.code, e.message, e.fix);
1279
- throw e;
1280
- }
1281
- }
1282
- async function executeSeriesRun(lead) {
1283
- const root = findWorkspaceRoot(process.cwd()) ?? process.cwd();
1284
- const members = await seriesMembers(root, lead);
1285
- if (members.length === 0) {
1286
- failPreflight(
1287
- "no_series_ads",
1288
- `No ad names "${lead}" as its lead (\`series: ${lead}\` in its _definition.md).`,
1289
- `Make each other message as an ad of the series first (baker creatives make <idea> --series ${lead}), or each language (baker creatives translate --slug ${lead} --to es-MX,de).`
1290
- );
1291
- }
1292
- const canvasRoot = path5.join(root, "canvas");
1293
- process.stdout.write(`[series] rendering ${members.length} ads of ${lead} at once: ${members.join(", ")}
1294
- `);
1295
- const results = await runSeries(members, {
1296
- plan: async (slug) => {
1297
- const made = await writeSeriesMemberCanvas(root, slug, { takeLeadDesign: true });
1298
- if (made === null) return { refused: { code: "not_in_series", message: `${slug} is no ad of this series.`, fix: "" } };
1299
- if ("refused" in made) return made;
1300
- if (made.designFromLead) process.stdout.write(`[series] ${slug} takes the lead's design, its own words kept
1301
- `);
1302
- try {
1303
- const prepared = await prepareCanvas(made.canvasPath, { write: false });
1304
- const state = await readRenderState(canvasRoot, slug);
1305
- const fresh = state.rendered?.sourceSha === prepared.sourceSha && (state.blocking ?? []).length === 0;
1306
- return fresh ? { run: false, runId: state.rendered?.runId } : { run: true };
1307
- } catch (e) {
1308
- const envelope = e instanceof CanvasPrepareError ? e.toEnvelope().error : null;
1309
- return {
1310
- refused: {
1311
- code: String(envelope?.code ?? "prepare_failed"),
1312
- message: String(envelope?.message ?? (e instanceof Error ? e.message : e)),
1313
- fix: String(envelope?.fix ?? "")
1314
- }
1315
- };
1316
- }
1317
- },
1318
- run: (slug) => runBaker(["canvas", "run", "--slug", slug])
1319
- });
1320
- process.stdout.write(`${JSON.stringify(seriesEnvelope(lead, results), null, 2)}
1321
- `);
1322
- }
1323
- async function refreshSeriesAd(opts) {
1324
- const slug = opts.slug ?? (opts.file ? creativeSlugFromCanvasPath(path5.resolve(opts.file)) : null);
1325
- if (!slug) return false;
1326
- const root = findWorkspaceRoot(opts.file ? path5.dirname(path5.resolve(opts.file)) : process.cwd());
1327
- if (!root) return false;
1328
- const made = await writeSeriesMemberCanvas(root, slug);
1329
- if (made === null) return false;
1330
- if ("refused" in made) failPreflight(made.refused.code, made.refused.message, made.refused.fix);
1331
- process.stdout.write(
1332
- `[series] ${slug} is the lead ${made.lead}'s version ${made.leadRunId} with this ad's words${made.written ? " (canvas written)" : ""}
1333
- `
1334
- );
1335
- return made.newLeadVersion;
1336
- }
1337
- async function editScopeNotes(input) {
1338
- const { opts, shown } = input;
1339
- const plain = (opts.autoFixRound ?? 0) === 0 && opts.fix === void 0 && opts.regenerate === void 0 && opts.useVariant === void 0 && opts.from === void 0;
1340
- if (!plain || !shown.rendered) return [];
1341
- const notes = [];
1342
- const changed = !input.native && input.asEdit === null && shown.prompt ? frameChanges(shown.prompt, input.promptNow) : [];
1343
- if (changed.length > 0) {
1344
- notes.push(
1345
- `[scope] this run changes ${changed.join(", ")} since the version shown: new pictures are made. If the person asked only for words, colours or one element, put the rest back (or use --fix).`
1346
- );
1347
- }
1348
- const local = { record: async () => null, graph: async () => null };
1349
- const previous = await versionRun(input.canvasRoot, shown.rendered.runId, local);
1350
- for (const clip of previous ? retakenTalkingScenes(previous.canvas, input.canvas) : []) {
1351
- notes.push(
1352
- `[voice] the take ${clip} is said again by the video model: it may not sound like the other takes; listen to it before you show it.`
1353
- );
1354
- }
1355
- return notes;
1356
- }
1357
- var canvasHeld = false;
1358
- var RECORDED_RULE_IDS = 100;
1359
- async function executeCanvasRun(opts) {
1360
- const startedAt = opts.autoFixStartedAt ?? Date.now();
1361
- const newAsk = (opts.autoFixRound ?? 0) === 0 ? await refreshSeriesAd(opts) : false;
1362
- const { canvasPath: filePath, adoptRunId } = await canvasFileFor(opts);
1363
- const canvasRoot = canvasOutputsRoot(filePath);
1364
- const creativeSlug = creativeSlugFromCanvasPath(filePath) ?? void 0;
1365
- const held = creativeSlug ? await heldRules(path5.dirname(filePath)) : { rules: [] };
1366
- if (creativeSlug) await clearLegacyDirtyMarker(canvasRoot, creativeSlug);
1367
- const turnId = optionalTurnId();
1368
- const turnCache = opts.cacheDir ?? path5.join(canvasRoot, ".cache");
1369
- const refuseTurnRender = async (correction) => {
1370
- if (!creativeSlug || (opts.autoFixRound ?? 0) > 0) return;
1371
- const onDisk = await readFile4(filePath, "utf8").then((text) => JSON.parse(text)).catch(() => null);
1372
- const shape = sizeShapeOf(onDisk);
1373
- const refusal = turnRenderRefusal(await readTurnRenders(turnCache), turnId, creativeSlug, { correction, shape });
1374
- if (!refusal) return;
1375
- process.stderr.write(
1376
- `${JSON.stringify({ ok: false, error: { code: refusal.code, message: refusal.message, fix: refusal.fix } }, null, 2)}
1377
- `
1378
- );
1379
- process.exit(2);
1380
- };
1381
- const shown = creativeSlug ? await shownVersion(canvasRoot, creativeSlug) : {};
1382
- const promptOnDisk = await readFile4(path5.join(path5.dirname(filePath), "prompt.json"), "utf8").then((text) => JSON.parse(text)).catch(() => null);
1383
- await refuseTurnRender(mayBeCorrection(opts, shown.prompt, promptOnDisk));
1384
- const ideaHeld = creativeSlug && (opts.autoFixRound ?? 0) === 0 ? (await shownBaseline({
1385
- canvasRoot,
1386
- slug: creativeSlug,
1387
- creativeDir: path5.dirname(filePath),
1388
- turnId,
1389
- shown,
1390
- record: true
1391
- })).baseline : void 0;
1392
- const citing = [];
1393
- await wireProofBadges(
1394
- path5.join(path5.dirname(filePath), "prompt.json"),
1395
- fetchBrandLogo,
1396
- (line) => process.stderr.write(`${line}
1397
- `),
1398
- jevCitationJudge((u) => citing.push(u))
1399
- );
1400
- await holdUnbilledSpend(turnCache, citing);
1401
- if ((opts.autoFixRound ?? 0) === 0) {
1402
- const reading = [];
1403
- await wireNamedPeople(
1404
- path5.join(path5.dirname(filePath), "prompt.json"),
1405
- avatarOfNamedPerson,
1406
- (line) => process.stderr.write(`${line}
1407
- `),
1408
- peopleReader(turnCache, (u) => reading.push(u))
1409
- );
1410
- await holdUnbilledSpend(turnCache, reading);
1411
- }
1412
- let prepared;
1413
- try {
1414
- prepared = await prepareCanvas(filePath, {
1415
- requireSuppliedAssets: true,
1416
- gate: true,
1417
- log: (line) => process.stderr.write(`${line}
1418
- `),
1419
- ...ideaHeld ? { baseline: ideaHeld } : {},
1420
- firstRender: creativeSlug !== void 0 && !shown.rendered && (opts.autoFixRound ?? 0) === 0
1421
- });
1422
- } catch (e) {
1423
- if (creativeSlug) await recordRenderAttempt(canvasRoot, creativeSlug, await computeSourceSha(filePath));
1424
- exitOnPrepareError(e);
1425
- }
1426
- if (creativeSlug) await recordRenderAttempt(canvasRoot, creativeSlug, prepared.sourceSha);
1427
- if (prepared.rewrites.length > 0) {
1428
- process.stderr.write(
1429
- `[canvas] rewrote ${prepared.rewrites.length} asset reference(s) in the canvas file so it says what runs (absolute paths \u2192 canvas-relative, a URL in an ingest path \u2192 source "url", a path into canvas/ \u2192 the durable URL of the same bytes):
1430
- ${describeRewrites(prepared.rewrites)}
1431
- `
1432
- );
1433
- }
1434
- let parsed = prepared.canvas;
1435
- const promptNow = isStaticAdCanvas(parsed) ? await readStaticPromptJson(parsed).catch(() => null) : null;
1436
- const native = isNativeCanvas(parsed);
1437
- if (native && (opts.fix !== void 0 || opts.useVariant !== void 0)) {
1438
- process.stderr.write(
1439
- `${JSON.stringify(
1440
- {
1441
- ok: false,
1442
- error: {
1443
- code: "nothing_to_fix",
1444
- message: "This ad is a native screen drawn exactly from prompt.json, not a painted picture: there is nothing to correct by --fix or to pick by --use-variant.",
1445
- fix: "Edit prompt.json's `native` block (its words, people, photos, frame) and run again: nothing renders but a photo whose description changed. A photo with a defect: `--regenerate photo_<n>`."
1446
- }
1447
- },
1448
- null,
1449
- 2
1450
- )}
1451
- `
1452
- );
1453
- process.exit(2);
1454
- }
1455
- const asEdit = opts.fix === void 0 && opts.useVariant === void 0 && opts.regenerate === void 0 && opts.from === void 0 && shown.rendered ? plainRunEdit(parsed, shown.prompt, promptNow) : null;
1456
- const editOf = asEdit && shown.rendered ? await previousAdImage(canvasRoot, shown.rendered.runId, void 0, rolesById(parsed)) : null;
1457
- const editInstruction = editOf ? asEdit : null;
1458
- if (editInstruction) {
1459
- process.stdout.write(`[edit] only the words or colours changed: editing the version of run ${shown.rendered?.runId}: ${editInstruction}
1460
- `);
1461
- }
1462
- const runNotes = await editScopeNotes({
1463
- opts,
1464
- asEdit,
1465
- native,
1466
- shown,
1467
- promptNow,
1468
- canvas: parsed,
1469
- canvasRoot
1470
- });
1471
- for (const note of runNotes) process.stderr.write(`${note}
1472
- `);
1473
- const fixInstruction = opts.fix ?? editInstruction ?? void 0;
1474
- const requested = opts.regenerate?.split(",").map((id) => id.trim()) ?? [];
1475
- await refuseTurnRender(
1476
- fixInstruction !== void 0 || requested.length > 0 && isStaticAdCanvas(parsed) && relaysSizesOnly(parsed, regenerateTargets(parsed, requested).ids)
1477
- );
1478
- const fromRun = opts.from ?? shown.rendered?.runId;
1479
- const memory = fixMemoryOf(shown, opts.from);
1480
- if (opts.fix !== void 0 && repeatsFailedFix(memory.lastFix, opts.fix)) {
1481
- const left = memory.lastFix?.blocking ?? [];
1482
- process.stderr.write(
1483
- `${JSON.stringify(
1484
- {
1485
- ok: false,
1486
- error: {
1487
- code: "no_progress",
1488
- message: `Not rendered: this exact fix already ran and left ${left.length === 1 ? "this" : "these"} in place: ${left.join(" | ")}`,
1489
- fix: `Do not ask for the same correction again. Change the approach: edit prompt.json so the problem cannot happen (shorter words, a line moved or dropped, a different position), make just the size at fault again (${oneSizeFix(sizeShapeOf(parsed))}), or ask for new options with \`--regenerate static_variants\`.`
1490
- }
1491
- },
1492
- null,
1493
- 2
1494
- )}
1495
- `
1496
- );
1497
- process.exit(2);
1498
- }
1499
- let grown = null;
1500
- const growOn = async (from, growth) => {
1501
- const version = await versionRun(canvasRoot, from);
1502
- return version ? growFromVersion(parsed, version, growth) : null;
1503
- };
1504
- if (fixInstruction !== void 0) {
1505
- const instruction = fixInstruction.trim();
1506
- const from = opts.from ?? shown.rendered?.runId;
1507
- const previous = editOf ?? (from ? await previousAdImage(canvasRoot, from, void 0, rolesById(parsed)) : null);
1508
- if (!instruction || !isStaticAdCanvas(parsed) || !from || !previous) {
1509
- const message = !instruction ? "--fix needs the correction in words." : !isStaticAdCanvas(parsed) ? "--fix corrects a static ad; this canvas is not one." : !from ? "--fix needs a version to correct: this creative has no recorded render here. Pass --from <run_id>." : `--fix could not find the finished ad of run ${from}: pass --from with a run that rendered one.`;
1510
- process.stderr.write(`${JSON.stringify({ ok: false, error: { code: "nothing_to_fix", message } }, null, 2)}
1511
- `);
1512
- process.exit(2);
1513
- }
1514
- const rejected = creativeSlug ? await readCaseFile(creativeSlug) : [];
1515
- const { rules } = held;
1516
- grown = await growOn(from, { kind: "edit", instruction, promptJson: promptNow, rejected, rules });
1517
- if (!grown && isPlateCanvas(parsed)) refusePlateVersion(from);
1518
- parsed = grown ? grown.canvas : fixStaticAd(parsed, { instruction, previous, promptJson: promptNow, rejected, rules });
1519
- const labels = finalOutputLabelsFromCanvas(parsed);
1520
- const delivered = await previousDelivered(canvasRoot, from, labels?.nodeId ?? "final", labels?.labels ?? [], {
1521
- prefer: "url"
1522
- });
1523
- const last = Object.fromEntries(
1524
- nodesWithRole(parsed, STATIC_ADAPT_FORMAT_ROLE).flatMap((n) => {
1525
- const path6 = delivered.find((d) => d.format === formatOfAdaptId(n.id))?.path;
1526
- return path6 ? [[n.id, path6]] : [];
1527
- })
1528
- );
1529
- parsed = withSizesFollowingFix(parsed, {
1530
- last,
1531
- change: instruction.replace(/^Change only this: /, ""),
1532
- ...opts.relayAlso ? { also: opts.relayAlso } : {}
1533
- });
1534
- const kept = delivered.filter((d) => opts.keepSizes?.includes(d.format));
1535
- if (kept.length > 0) {
1536
- parsed = withDeliveredSizes(parsed, Object.fromEntries(kept.map((d) => [d.format, d.path])));
1537
- process.stdout.write(`[fix] keeping ${kept.map((d) => d.format).join(", ")} as it was: nothing blocking on it
1538
- `);
1539
- }
1540
- if (!editInstruction) process.stdout.write(`[fix] correcting the version of run ${from}: ${instruction}
1541
- `);
1542
- }
1543
- if (opts.useVariant !== void 0 && opts.fix === void 0) {
1544
- const sha = opts.useVariant.trim();
1545
- const from = opts.from ?? shown.rendered?.runId;
1546
- grown = from && isStaticAdCanvas(parsed) ? await growOn(from, { kind: "variant", sha256: sha }) : null;
1547
- const url = from && !grown && isStaticAdCanvas(parsed) ? await variantImage(canvasRoot, from, sha, void 0, rolesById(parsed)) : null;
1548
- if (!from || !grown && !url) {
1549
- const message = !isStaticAdCanvas(parsed) ? "--use-variant re-makes the sizes of a static ad; this canvas is not one." : !from ? "--use-variant needs the version the variant belongs to: this creative has no recorded render here. Pass --from <run_id>." : `--use-variant found no variant ${sha} in run ${from}: pass the sha256 \`baker creatives feedback --slug <slug>\` prints, and --from with that version's run.`;
1550
- process.stderr.write(`${JSON.stringify({ ok: false, error: { code: "no_such_variant", message } }, null, 2)}
1551
- `);
1552
- process.exit(2);
1553
- }
1554
- if (!grown && isPlateCanvas(parsed)) refusePlateVersion(from);
1555
- if (grown) parsed = grown.canvas;
1556
- else if (url) parsed = rederiveFromVariant(parsed, { url });
1557
- process.stdout.write(`[variant] making every size of run ${from} again from the chosen variant ${sha.slice(0, 12)}
1558
- `);
1559
- }
1560
- let relaidFrom;
1561
- if (opts.regenerate !== void 0 && opts.fix === void 0 && opts.useVariant === void 0 && isStaticAdCanvas(parsed)) {
1562
- const requested2 = opts.regenerate.split(",").map((id) => id.trim());
1563
- const from = opts.from ?? shown.rendered?.runId;
1564
- const sizesOnly = relaysSizesOnly(parsed, regenerateTargets(parsed, requested2).ids);
1565
- grown = from && sizesOnly ? await growOn(from, { kind: "keep" }) : null;
1566
- const url = from && sizesOnly && !grown ? await correctedPicture(canvasRoot, from) ?? (shown.picture?.redrawn && shown.picture.runId === from ? await previousAdImage(canvasRoot, from, void 0, rolesById(parsed)) : null) : null;
1567
- if (from && grown) {
1568
- parsed = grown.canvas;
1569
- relaidFrom = from;
1570
- process.stdout.write(`[regenerate] re-laying out from the picture run ${from} shows, kept as it was made
1571
- `);
1572
- } else if (from && url && !isPlateCanvas(parsed)) {
1573
- parsed = rederiveFromVariant(parsed, { url });
1574
- relaidFrom = from;
1575
- process.stdout.write(`[regenerate] re-laying out from the picture run ${from} shows (its correction or the person's choice)
1576
- `);
1577
- }
1578
- }
1579
- const plain = fixInstruction === void 0 && opts.useVariant === void 0 && opts.regenerate === void 0 && (opts.extendSizes?.length ?? 0) === 0;
1580
- if (plain && fromRun && !native && isStaticAdCanvas(parsed) && !seriesOf(parsed)) {
1581
- const version = await versionRun(canvasRoot, fromRun);
1582
- const same = version !== null && makesSameVariants(parsed, version, await ingestedNow(variantFiles(parsed), path5.dirname(filePath)));
1583
- const growth = version ? plainRunGrowth(parsed, version, {
1584
- sameVariants: same,
1585
- frameChanged: shown.prompt !== void 0 && frameChanges(shown.prompt, promptNow).length > 0,
1586
- wordsChanged: shown.prompt !== void 0 && specEditInstruction(shown.prompt, promptNow) !== null,
1587
- pictureChanged: shown.prompt !== void 0 && pictureEdit(shown.prompt, promptNow) !== null
1588
- }) : null;
1589
- grown = version && growth ? growFromVersion(parsed, version, growth) : null;
1590
- if (grown) {
1591
- parsed = grown.canvas;
1592
- relaidFrom = fromRun;
1593
- process.stdout.write(`[version] nothing the variants are made from changed: keeping the picture of run ${fromRun}
1594
- `);
1595
- }
1596
- }
1597
- if (grown) {
1598
- const kept = Object.keys(grown.pinned);
1599
- process.stdout.write(`[version] built on top of the version before: ${kept.join(", ")} kept as they were made (free)
1600
- `);
1601
- }
1602
- const canvasText = prepared.text;
1603
- let regenerate;
1604
- if (opts.regenerate !== void 0) {
1605
- const requested2 = opts.regenerate.split(",").map((id) => id.trim()).filter((id) => id.length > 0);
1606
- const known = new Set(canvasNodeIds(parsed));
1607
- const { ids: resolved, unknown } = regenerateTargets(parsed, requested2);
1608
- if (unknown.length > 0) {
1609
- process.stderr.write(
1610
- `${JSON.stringify(
1611
- {
1612
- ok: false,
1613
- error: {
1614
- code: "unknown_regenerate_node",
1615
- message: `--regenerate names node id(s) not in this canvas: ${unknown.join(", ")}. Known ids: ${[...known].join(", ")}`
1616
- }
1617
- },
1618
- null,
1619
- 2
1620
- )}
1621
- `
1622
- );
1623
- process.exit(2);
1624
- }
1625
- if (resolved.length > 0) {
1626
- regenerate = new Set(resolved);
1627
- process.stdout.write(`[regenerate] forcing fresh this run: ${[...regenerate].join(", ")} (+ downstream)
1628
- `);
1629
- if (opts.relayNote) parsed = withRelayNote(parsed, resolved, opts.relayNote);
1630
- const editFrom = opts.from ?? shown.rendered?.runId;
1631
- if (opts.relayEdits && editFrom) {
1632
- const labels = finalOutputLabelsFromCanvas(parsed);
1633
- const delivered = await previousDelivered(canvasRoot, editFrom, labels?.nodeId ?? "final", labels?.labels ?? [], {
1634
- prefer: "url"
1635
- });
1636
- for (const [id, instruction] of Object.entries(opts.relayEdits)) {
1637
- if (!resolved.includes(id)) continue;
1638
- const last = delivered.find((d) => d.format === formatOfSizeNode(parsed, id))?.path;
1639
- parsed = last ? withRelayEdit(parsed, id, { previous: last, instruction, asked: opts.relayAsked?.[id] ?? [] }) : withRelayNote(parsed, [id], instruction);
1640
- }
1641
- const relaid = resolved.flatMap((id) => formatOfSizeNode(parsed, id) ?? []);
1642
- parsed = withDeliveredSizes(
1643
- parsed,
1644
- Object.fromEntries(delivered.filter((d) => !relaid.includes(d.format)).map((d) => [d.format, d.path]))
1645
- );
1646
- }
1647
- }
1648
- }
1649
- if (opts.extendSizes && opts.extendSizes.length > 0 && isStaticAdCanvas(parsed)) {
1650
- const from = opts.from ?? shown.rendered?.runId;
1651
- if (opts.extendOnly && from) {
1652
- const labels = finalOutputLabelsFromCanvas(parsed);
1653
- const delivered = await previousDelivered(canvasRoot, from, labels?.nodeId ?? "final", labels?.labels ?? [], {
1654
- prefer: "url"
1655
- });
1656
- parsed = withDeliveredSizes(parsed, Object.fromEntries(delivered.map((d) => [d.format, d.path])));
1657
- }
1658
- parsed = withExtendedSizes(parsed, opts.extendSizes);
1659
- process.stdout.write(`[extend] placing ${opts.extendSizes.join(", ")} clear of what covers or cuts it, its margins painted
1660
- `);
1661
- }
1662
- const cacheDir = opts.cacheDir ?? path5.join(canvasRoot, ".cache");
1663
- const engine = createEngineFromEnv({
1664
- cacheDir,
1665
- outputsDir: opts.outputsDir ?? canvasRoot,
1666
- log: (line) => process.stdout.write(`${line}
1667
- `),
1668
- remoteCache: opts.remoteCache
1669
- });
1670
- const validation = await engine.validateDeep(parsed);
1671
- if (!validation.ok) {
1672
- process.stderr.write(
1673
- `${JSON.stringify({ ok: false, error: { code: "validation", issues: validation.issues } }, null, 2)}
1674
- `
1675
- );
1676
- process.exit(2);
1677
- }
1678
- const advisories = (validation.warnings ?? []).filter((w) => w.code !== "ORPHAN_NODE");
1679
- for (const w of [...advisories, ...await outputRatioWarningsFor(parsed, filePath)]) {
1680
- process.stdout.write(`[warn] ${w.code}: ${w.message}
1681
- `);
1682
- }
1683
- const canvasSha = sha256Hex(Buffer.from(canvasText));
1684
- const sourceSha = prepared.sourceSha;
1685
- const client = opts.record === false ? null : buildBackendClient();
1686
- const outputsDir = opts.outputsDir ? path5.resolve(opts.outputsDir) : canvasRoot;
1687
- const { runId, resumed, source, sameSource, concurrentRunId, rendering } = await resolveRunId({
1688
- explicitRunId: opts.runId,
1689
- adoptedRunId: adoptRunId,
1690
- fresh: opts.fresh === true || fixInstruction !== void 0 || opts.useVariant !== void 0 || relaidFrom !== void 0,
1691
- outputsDir,
1692
- canvasPath: filePath,
1693
- sourceSha,
1694
- remote: client && creativeSlug && sourceSha ? { creativeSlug, sourceSha, getActiveRun: (slug, sha) => client.getActiveRun(slug, sha) } : void 0
1695
- });
1696
- const holder = rendering ?? await canvasBusyElsewhere(outputsDir, filePath);
1697
- if (holder) {
1698
- process.stderr.write(
1699
- `${JSON.stringify(
1700
- {
1701
- ok: false,
1702
- error: {
1703
- code: "CONFLICT",
1704
- message: `This canvas is already rendering in another process (run ${holder.runId}, pid ${holder.pid}).`,
1705
- fix: "Wait for that render to finish and use its result instead of starting a second one: two renders of one canvas share a run and overwrite each other. If you started it in the background, read its output when it completes."
1706
- }
1707
- },
1708
- null,
1709
- 2
1710
- )}
1711
- `
1712
- );
1713
- process.exit(2);
1714
- }
1715
- const viewerUsage = [];
1716
- const viewerCheck = creativeSlug && isStaticAdCanvas(parsed) ? await viewerCheckBeforeRender({
1717
- creativeDir: path5.dirname(filePath),
1718
- cacheDir,
1719
- slug: creativeSlug,
1720
- skip: viewerCheckSkip({
1721
- fix: opts.fix !== void 0,
1722
- useVariant: opts.useVariant !== void 0,
1723
- relaid: relaidFrom !== void 0,
1724
- autoFixRound: opts.autoFixRound ?? 0,
1725
- resumed: resumed && sameSource === true,
1726
- asked: opts.skipViewerCheck === true
1727
- }),
1728
- spent: viewerChecksSpent(await readTurnRenders(turnCache), turnId, creativeSlug),
1729
- lookups: liveViewerLookups(path5.dirname(canvasRoot)),
1730
- model: VIEWER_CHECK_MODEL,
1731
- ask: gatewayViewerModel(VIEWER_CHECK_MODEL, (usage) => viewerUsage.push(usage)),
1732
- judge: jevReadJudge((usage) => viewerUsage.push(usage))
1733
- }) : null;
1734
- for (const line of viewerCheck?.lines ?? []) process.stdout.write(`${line}
1735
- `);
1736
- await holdUnbilledSpend(cacheDir, viewerUsage);
1737
- if (viewerCheck?.failure) {
1738
- if (creativeSlug && turnId && viewerCheck.failure.error.code === "viewer_check_failed") {
1739
- await updateTurnRenders(turnCache, (ledger) => recordViewerFail(ledger, turnId, creativeSlug));
1740
- }
1741
- process.stderr.write(`${JSON.stringify(viewerCheck.failure, null, 2)}
1742
- `);
1743
- process.exit(2);
1744
- }
1745
- if (resumed) {
1746
- process.stdout.write(
1747
- `[resume] continuing interrupted run ${runId}${source === "remote" ? " (adopted from run history)" : ""} \u2014 in-flight jobs re-attach, cached nodes skip
1748
- `
1749
- );
1750
- }
1751
- if (concurrentRunId) {
1752
- process.stderr.write(
1753
- `[concurrent] this canvas appears to be running elsewhere right now (run ${concurrentRunId}) \u2014 starting a separate run; pass --run-id ${concurrentRunId} to adopt it instead
1754
- `
1755
- );
1756
- }
1757
- const abort = new AbortController();
1758
- let abortedBy = null;
1759
- for (const signalName of ["SIGINT", "SIGTERM"]) {
1760
- process.once(signalName, () => {
1761
- abortedBy = signalName;
1762
- process.stderr.write(`[interrupt] ${signalName} received \u2014 flushing a resumable snapshot (repeat to force-quit)
1763
- `);
1764
- abort.abort(new Error(`aborted by ${signalName}`));
1765
- });
1766
- }
1767
- const inFlight = await markRunInFlight(outputsDir, filePath, runId, sourceSha);
1768
- if (!canvasHeld) {
1769
- const held2 = await markCanvasBusy(outputsDir, filePath, runId);
1770
- canvasHeld = true;
1771
- process.once("exit", held2.release);
1772
- }
1773
- const clearMarker = () => {
1774
- inFlight.stop();
1775
- return clearRunMarker(outputsDir, filePath, inFlight.token);
1776
- };
1777
- const snapshot = client && creativeSlug ? await uploadRunSnapshot(client, {
1778
- canvasPath: filePath,
1779
- raw: canvasText,
1780
- creativeSlug,
1781
- parsed,
1782
- previous: (await readRenderState(canvasRoot, creativeSlug)).snapshot
1783
- }) : null;
1784
- if (snapshot && creativeSlug) await recordSnapshot(canvasRoot, creativeSlug, snapshot);
1785
- const graphUrl = client && creativeSlug && isStaticAdCanvas(parsed) ? await uploadRunGraph(client, parsed) : null;
1786
- const recordMeta = {
1787
- creativeSlug,
1788
- canvasPath: path5.relative(path5.dirname(canvasRoot), filePath) || void 0,
1789
- canvasSha,
1790
- // The fingerprint the dashboard compares against the current source to flag
1791
- // "edited since last render": the same `computeSourceSha` the edit-sync posts,
1792
- // taken after the preflight wrote the projected graph, so the two are comparable.
1793
- sourceSha,
1794
- chatId: optionalChatId(),
1795
- canvasSnapshotUrl: snapshot?.url,
1796
- ...graphUrl ? { graphUrl } : {},
1797
- ...newAsk ? { newAsk: true } : {},
1798
- ...creativeSlug ? { rules: { digest: rulesDigest(held.rules), ids: held.rules.slice(0, RECORDED_RULE_IDS).map((r) => r.id) } } : {}
1799
- };
1800
- if (client) {
1801
- const registered = await postInitialRunRecord(client, buildInitialRunRecord(runId, recordMeta));
1802
- if (!registered) {
1803
- process.stderr.write(
1804
- "[warn] run start not registered \u2014 this run stays invisible to the dashboard until a later progress post lands, and cannot be resumed from another workspace\n"
1805
- );
1806
- }
1807
- }
1808
- const leadRun = seriesOf(parsed)?.run_id;
1809
- if (creativeSlug && leadRun) await recordSeriesLeadRun(canvasRoot, creativeSlug, leadRun);
1810
- const record = client ? (payload) => client.recordRun(payload) : null;
1811
- const finalLabels = finalOutputLabelsFromCanvas(parsed) ?? void 0;
1812
- const progress = record ? new RunProgressTracker(runId, recordMeta, finalLabels) : null;
1813
- const poster = record ? new RunRecordPoster(record) : null;
1814
- const flushBilled = async (p, payload) => {
1815
- const failure = await sendBillingSpend(cacheDir, payload.reviewUsage ?? [], () => p.flush(payload));
1816
- if (failure !== null) process.stderr.write(`[warn] run record not persisted (${failure})
1817
- `);
1818
- };
1819
- if (progress && poster) {
1820
- poster.startKeepalive(() => progress.hasPlan() ? progress.snapshot() : null);
1821
- }
1822
- const frameUrls = [];
1823
- let next = null;
1824
- const madeHere = grown ? madeThisRun({ canvas: parsed, pinned: grown.pinned }) : parsed;
1825
- const readerSpend = holdWhenSettled(cacheDir, (run, outputs) => prefilterSpend(madeHere, { [run.node_id]: outputs }, [run]));
1826
- const isFrameNode = (id) => parsed.nodes?.find((n) => n.id === id)?.type === "image_generate";
1827
- try {
1828
- const policy = opts.cachePolicy ?? "read_write";
1829
- const result = await engine.run(parsed, {
1830
- run_id: runId,
1831
- signal: abort.signal,
1832
- cache_policy: policy,
1833
- ...stopBeforeKinds(opts.until) ? { stop_before_kinds: stopBeforeKinds(opts.until) } : {},
1834
- concurrency: resolveConcurrency(opts.concurrency, process.env.BAKER_CANVAS_CONCURRENCY),
1835
- regenerate,
1836
- ...grown ? { pinned: grown.pinned } : {},
1837
- // Always set, because the frame collector has to run whether or not this run is
1838
- // reporting progress to a backend — without it a checkpoint stops with nothing to
1839
- // show, which is the only thing a checkpoint is for.
1840
- onProgress: (event) => {
1841
- if (event.kind === "node_settled") readerSpend.settled(event.run, event.outputs);
1842
- if (event.kind === "node_settled" && isFrameNode(event.run.node_id)) {
1843
- for (const out of Object.values(event.outputs ?? {})) {
1844
- const url = out?.url;
1845
- if (url) frameUrls.push(url);
1846
- }
1847
- }
1848
- if (progress && poster) {
1849
- progress.apply(event);
1850
- if (progress.hasPlan()) poster.enqueue(progress.snapshot());
1851
- }
1852
- }
1853
- });
1854
- await clearMarker();
1855
- const beforeRunId = shown.rendered?.runId;
1856
- if (creativeSlug) {
1857
- const idea = await readIdeaAnchor(path5.dirname(filePath));
1858
- await recordRendered(canvasRoot, creativeSlug, sourceSha, result.run_id, {
1859
- ...promptNow ? { prompt: promptNow } : {},
1860
- ...idea ? { anchor: idea.anchor, idea: anchorLines(idea.view) } : {},
1861
- ...seriesOf(parsed)?.run_id ? { seriesLeadRun: seriesOf(parsed)?.run_id } : {},
1862
- picture: pictureRecord(result.run_id, {
1863
- chose: opts.useVariant !== void 0,
1864
- of: shown.picture,
1865
- from: fromRun,
1866
- keeps: fixInstruction !== void 0 || relaidFrom !== void 0,
1867
- redrawn: opts.autoFixKind === "regenerate"
1868
- })
1869
- });
1870
- }
1871
- const keepRuns = opts.keepRuns;
1872
- if (keepRuns !== void 0 && Number.isFinite(keepRuns)) {
1873
- await pruneOldRuns(outputsDir, keepRuns, result.run_id, (line) => process.stdout.write(`${line}
1874
- `));
1875
- }
1876
- const reviewable = videoPathFromOutput(result.output);
1877
- await readerSpend.drained();
1878
- const reviewUsage = poster ? await takeUnbilledSpend(cacheDir) : [];
1879
- const videoRules = held.rules;
1880
- const review = reviewable ? await reviewRenderedVideo({
1881
- video: reviewable,
1882
- windows: await sceneWindowsBeside(filePath),
1883
- ...await reviewContextBeside(filePath),
1884
- rules: videoRules,
1885
- checkStills: (stills, labels) => reviewAgainstRules({ stills, formats: labels, rules: videoRules, onSpend: (usage) => reviewUsage.push(usage) }),
1886
- brief: opts.brief?.trim() || void 0,
1887
- onSpend: (usage) => reviewUsage.push(usage)
1888
- }) : null;
1889
- const brandKit = reviewable ? null : await readStaticBrandKit(await findBrandRoot(path5.dirname(filePath)) ?? process.cwd());
1890
- const runShape = {
1891
- fix: fixInstruction !== void 0,
1892
- useVariant: opts.useVariant !== void 0,
1893
- sizesOnly: relaidFrom !== void 0 || opts.extendOnly === true || regenerate !== void 0 && relaysSizesOnly(parsed, [...regenerate])
1894
- };
1895
- const staticReview = reviewable ? null : await reviewStaticRun({
1896
- parsed: madeHere,
1897
- output: result.output,
1898
- outputsByNode: result.outputs_by_node,
1899
- onSpend: (usage) => reviewUsage.push(usage),
1900
- viewer: viewerCheck?.viewer ?? null,
1901
- ...brandKit?.name ? { brandName: brandKit.name } : {},
1902
- ...brandKit?.lockup ? { lockup: brandKit.lockup } : {},
1903
- // Only a new picture is compared with the last one: an edit, a fix, a chosen option or a
1904
- // re-layout keeps it on purpose, and would read as "this retry changed nothing".
1905
- ...beforeRunId && beforeRunId !== result.run_id && rendersNewPicture(runShape) ? { previous: await previousDelivered(canvasRoot, beforeRunId, finalLabels?.nodeId ?? "final", finalLabels?.labels ?? []) } : {},
1906
- // A size this round did not touch keeps the last round's verdict: the review's second look at it is no defect of the round.
1907
- ...opts.settledReview && opts.from ? {
1908
- settled: {
1909
- review: opts.settledReview,
1910
- images: await previousDelivered(canvasRoot, opts.from, finalLabels?.nodeId ?? "final", finalLabels?.labels ?? [])
1911
- }
1912
- } : {}
1913
- });
1914
- const blockingNow = (staticReview?.review ?? []).filter((f) => f.severity === "blocking").map((f) => f.what);
1915
- const stillThere = fixInstruction !== void 0 && staticReview?.review ? persistingDefects(memory.blocking, staticReview.review) : [];
1916
- if (creativeSlug && staticReview) {
1917
- await recordReviewOutcome(canvasRoot, creativeSlug, {
1918
- blocking: blockingNow,
1919
- ...fixInstruction !== void 0 ? { lastFix: { instruction: fixInstruction.trim(), blocking: stillThere } } : {}
1920
- });
1921
- }
1922
- const costHint = staticReview ? runCostHint(result.stats, paidFor(runShape)) : null;
1923
- const corrected = opts.autoFixed ?? [];
1924
- const seriesRoot = creativeSlug && staticReview ? findWorkspaceRoot(path5.dirname(filePath)) : null;
1925
- const seriesHints = seriesRoot && creativeSlug ? seriesRunHints(creativeSlug, {
1926
- leads: await seriesLeadsAbove(seriesRoot, creativeSlug),
1927
- members: await seriesMembers(seriesRoot, creativeSlug)
1928
- }) : [];
1929
- const reviewHints = staticReview ? [
1930
- ...corrected.length > 0 ? [
1931
- `Corrected automatically before this result, ${corrected.length} more render${corrected.length === 1 ? "" : "s"}: ${corrected.join(" Then ")} What follows is the review of the corrected version.`
1932
- ] : [],
1933
- ...staticReview.hints,
1934
- ...costHint ? [costHint] : [],
1935
- ...seriesHints,
1936
- ...stillThere.length > 0 ? [
1937
- `The fix did not remove ${stillThere.length === 1 ? "this" : "these"}: ${stillThere.join(" | ")}. The same instruction will not run again; change the approach (edit prompt.json so it cannot happen, or make only that size again with \`--regenerate\` on its size node).`
1938
- ] : []
1939
- ] : reviewable ? review === null ? [RENDER_REVIEW_UNAVAILABLE] : review.length === 0 ? ["Reviewed the finished video frame by frame \u2014 nothing to report."] : [
1940
- `Reviewed the finished video and found ${review.length} thing${review.length === 1 ? "" : "s"} to fix. Show the user what is wrong before you show them the ad.`,
1941
- ...review.map((f) => `${f.severity === "blocking" ? "Must fix" : "Should fix"} \u2014 ${f.what}`),
1942
- ...review.some((f) => f.scene) ? [
1943
- `Anything about the mark or the closing card is a composition fix, not a re-render: both are drawn as HTML by the caption composition, so editing it and re-running re-renders only that pass \u2014 the clips are cached and no generation is paid for again. Fix them, then re-run: edit the \`show\` of the scene files named above \u2014 a shot with a person handling equipment is where limbs and objects go wrong, so widen it, move the hands out of frame, or drop the person from that beat. Re-running re-renders only the scenes you edited; everything else comes from the cache (this run: ${result.stats?.cached_nodes ?? 0} of ${result.stats?.total_nodes ?? 0} nodes were cached).`
1944
- ] : []
1945
- ] : [];
1946
- const hints = [...runNotes, ...reviewHints];
1947
- const findings = staticReview ? staticReview.review : review;
1948
- const ready = staticReview ? staticReview.verdict === "ready" || staticReview.verdict === "ready_with_notes" : review !== null && !review.some((f) => f.severity === "blocking");
1949
- const definitionStatus = ready && creativeSlug ? await advanceDefinitionStatus(path5.join(path5.dirname(filePath), "_definition.md"), "rendered") : null;
1950
- if (poster) {
1951
- await flushBilled(
1952
- poster,
1953
- // `review` is null only when nobody looked (no key, no ffmpeg, unreadable video);
1954
- // an empty array is a render that was reviewed and came back clean. The record
1955
- // has to keep those apart.
1956
- buildRunRecord(
1957
- result,
1958
- {
1959
- ...recordMeta,
1960
- ...findings ? { review: findings } : {},
1961
- ...reviewUsage.length > 0 ? { reviewUsage } : {},
1962
- // A static ad that failed a check is never shown as a version (the backend reads both).
1963
- ...staticReview ? { verdict: staticReview.verdict, presentable: staticReview.verdict !== "needs_fixes" } : {}
1964
- },
1965
- progress?.planInfo(),
1966
- finalLabels
1967
- )
1968
- );
1969
- }
1970
- const round = opts.autoFixRound ?? 0;
1971
- const keepPicture = opts.useVariant !== void 0 || opts.autoFixKeepPicture === true || (fixInstruction !== void 0 || relaidFrom !== void 0) && keepsChosen(shown.picture, fromRun);
1972
- const attempts = staticReview?.review ? [...opts.autoFixAttempts ?? [], { runId: result.run_id, review: staticReview.review }] : [];
1973
- const base = attempts.length > 0 ? correctFrom(attempts) : null;
1974
- const reverted = base !== null && base.runId !== result.run_id;
1975
- let step = staticReview && base && opts.autoFix !== false ? (
1976
- // The graph the next round re-prepares (the file's), never this run's rewrite of it: a fix or a
1977
- // re-layout takes the variants out of `parsed`, and only the file's graph can draw a new picture.
1978
- autoFixStep(prepared.canvas, base.review, {
1979
- round,
1980
- keepPicture,
1981
- // Gone back to an earlier attempt: what this round did and left is no longer the picture's.
1982
- ...!reverted && opts.autoFixKind ? { previous: opts.autoFixKind } : {},
1983
- ...!reverted && fixInstruction !== void 0 ? { lastFix: { instruction: fixInstruction.trim(), blocking: stillThere } } : {},
1984
- tooFar: reverted ? [] : placedTooFar(parsed, result.outputs_by_node),
1985
- fixedBefore: base.fixedBefore
1986
- })
1987
- ) : null;
1988
- if (step && reverted && base) {
1989
- process.stdout.write(
1990
- `[autofix] run ${result.run_id} came out worse than run ${base.runId}: the next correction starts from run ${base.runId}
1991
- `
1992
- );
1993
- }
1994
- const outOfTime = step !== null && !roundFitsTurn(await readTurnRenders(turnCache), turnId, creativeSlug, Date.now() - startedAt, step.kind);
1995
- if (outOfTime) {
1996
- process.stdout.write(
1997
- `[autofix] not started: this ad has had its time in this turn (${Math.round((Date.now() - startedAt) / 6e4)} min in this render). It stands as it is.
1998
- `
1999
- );
2000
- hints.unshift(
2001
- "Out of time for this ad in this turn: no further correction or render. Show this version as it stands and say in one plain sentence what is left; the person's next message says what changes."
2002
- );
2003
- step = null;
2004
- }
2005
- if (!step && reverted && base) {
2006
- hints.unshift(
2007
- `Run ${base.runId} has fewer problems than this one: correct that one, never this one (add \`--from ${base.runId}\` to a --fix).`
2008
- );
2009
- }
2010
- let respecced = null;
2011
- const briefFindings = step?.kind === "respec" ? step.findings : step?.kind === "regenerate" ? step.brief ?? [] : [];
2012
- const lost = [...new Set((base?.review ?? []).filter(lostVital).flatMap((f) => f.kind?.job ? [f.kind.job] : []))];
2013
- if (briefFindings.length > 0) {
2014
- const target = staticReviewTargets(parsed, result.output);
2015
- const spent = [];
2016
- respecced = target ? await repairSpec({
2017
- promptPath: target.promptPath,
2018
- findings: briefFindings,
2019
- rejected: creativeSlug ? await readCaseFile(creativeSlug) : [],
2020
- held,
2021
- ...lost.length > 0 ? { restore: lost } : {},
2022
- ...target.images[0] ? { image: target.images[0].path } : {},
2023
- onSpend: (usage) => spent.push(usage)
2024
- }) : null;
2025
- if (spent.length > 0) await holdUnbilledSpend(cacheDir, spent);
2026
- if (step?.kind === "respec" && respecced === null) step = null;
2027
- }
2028
- if (step && stopsWithoutRepair(base?.review ?? [], briefFindings, respecced !== null)) {
2029
- process.stdout.write(
2030
- "[autofix] stopped: what made the proven ad win is gone and no correction of prompt.json may restore it\n"
2031
- );
2032
- hints.unshift(
2033
- "The automatic correction stopped: what made the proven ad win is gone and no correction of prompt.json may restore it, so a new picture from the same plan would come back without it."
2034
- );
2035
- step = null;
2036
- }
2037
- if (step) {
2038
- const did = step.kind === "respec" ? `The spec was corrected: ${respecced}` : step.kind === "fix" ? `The picture was corrected for: ${step.instruction.replace(/^[^:]*: /, "")}` : step.kind === "regenerate" && relaysSizesOnly(parsed, regenerateTargets(parsed, step.ids).ids) ? `The ${step.ids.join(" and ")} ${step.ids.length === 1 ? "was" : "were"} made again from the same chosen picture, avoiding: ${step.note.replace(/^[^:]*: /, "")}` : step.kind === "regenerate" ? `${respecced ? `The spec was corrected (${respecced}) and a` : "A"} new picture was made, avoiding: ${step.note.replace(/^[^:]*: /, "")}` : step.kind === "extend" ? `The ${step.sizes.join(" and ")} ${step.sizes.length === 1 ? "was" : "were"} placed clear of what covers or cuts ${step.sizes.length === 1 ? "it" : "them"}, the margins painted to match.` : `The ${step.ids.map((id) => formatOfSizeNode(parsed, id) ?? id).join(" and ")} was edited: ${Object.values(step.edits).join(" ")}`;
2039
- const files = finalFiles(result.output, finalLabels?.labels);
2040
- process.stdout.write(
2041
- `[autofix] round ${round + 1} of ${AUTO_FIX_ROUNDS}: run ${result.run_id} needs fixes. ${did} If the correction fails, run ${result.run_id} stands as the latest version: ${JSON.stringify(files)}
2042
- `
2043
- );
2044
- next = {
2045
- file: filePath,
2046
- cacheDir: opts.cacheDir,
2047
- outputsDir: opts.outputsDir,
2048
- concurrency: opts.concurrency,
2049
- keepRuns: opts.keepRuns,
2050
- remoteCache: opts.remoteCache,
2051
- record: opts.record,
2052
- brief: opts.brief,
2053
- cachePolicy: opts.cachePolicy,
2054
- fresh: true,
2055
- from: base?.runId ?? result.run_id,
2056
- autoFixRound: round + 1,
2057
- autoFixAttempts: attempts,
2058
- autoFixStartedAt: startedAt,
2059
- autoFixed: [...corrected, did],
2060
- autoFixKind: step.kind,
2061
- ...base ? { settledReview: [...base.review] } : {},
2062
- ...keepPicture ? { autoFixKeepPicture: true } : {},
2063
- ...step.kind === "fix" ? {
2064
- fix: step.instruction,
2065
- ...step.relay ? { relayAlso: step.relay } : {},
2066
- ...step.keep ? { keepSizes: step.keep } : {},
2067
- ...step.extend ? { extendSizes: step.extend } : {}
2068
- } : step.kind === "extend" ? { extendSizes: step.sizes, extendOnly: true } : step.kind === "relayout" ? {
2069
- ...step.extend ? { extendSizes: step.extend } : {},
2070
- regenerate: step.ids.join(","),
2071
- relayEdits: step.edits,
2072
- // A second edit of a size is told what the first asked for.
2073
- ...opts.autoFixKind === "relayout" && opts.relayEdits ? { relayAsked: Object.fromEntries(Object.entries(opts.relayEdits).map(([id, asked]) => [id, [asked]])) } : {}
2074
- } : step.kind === "regenerate" ? { regenerate: step.ids.join(","), relayNote: step.note, ...step.extend ? { extendSizes: step.extend } : {} } : {}
2075
- };
2076
- } else {
2077
- if (creativeSlug && turnId && staticReview) {
2078
- const tookMs = Date.now() - startedAt;
2079
- await updateTurnRenders(
2080
- turnCache,
2081
- (ledger) => recordTurnRender(ledger, turnId, creativeSlug, staticReview.verdict, tookMs)
2082
- );
2083
- }
2084
- process.stdout.write(
2085
- `${JSON.stringify(
2086
- {
2087
- ok: true,
2088
- outputs_dir: result.outputs_dir,
2089
- output: result.output,
2090
- stats: result.stats,
2091
- // The agent reads a finding's words; the review model's typed fields are the correction's.
2092
- ...findings ? { review: findings.map(({ kind: _kind, ...finding }) => finding) } : {},
2093
- ...staticReview?.judge?.length ? { judge: staticReview.judge } : {},
2094
- ...definitionStatus === "updated" ? { definition_status: "rendered" } : {},
2095
- ...hints.length ? { hints } : {},
2096
- // Last, so a `| tail` keeps them: production agents cut them off and re-ran to get them back.
2097
- // A static ad whose review found a blocking problem is finished but NOT ready.
2098
- ...staticReview ? { verdict: staticReview.verdict } : {},
2099
- run_id: result.run_id,
2100
- files: finalFiles(result.output, finalLabels?.labels)
2101
- },
2102
- null,
2103
- 2
2104
- )}
2105
- `
2106
- );
2107
- }
2108
- } catch (e) {
2109
- const failedPayload = async (message) => {
2110
- await readerSpend.drained();
2111
- const payload = progress?.hasPlan() ? progress.failedSnapshot(message) : buildFailedRunRecord(runId, message, recordMeta);
2112
- const held2 = await takeUnbilledSpend(cacheDir);
2113
- return held2.length > 0 ? { ...payload, reviewUsage: held2 } : payload;
2114
- };
2115
- if (e instanceof RunAbortedError && e.reason === "signal") {
2116
- const message = `Interrupted${abortedBy ? ` by ${abortedBy}` : ""} \u2014 re-run \`baker canvas run\` to resume; in-flight jobs re-attach, completed nodes come from the cache.`;
2117
- if (poster) await flushBilled(poster, { ...await failedPayload(message), interrupted: true });
2118
- process.stderr.write(`${JSON.stringify({ ok: false, error: { code: "interrupted", message } }, null, 2)}
2119
- `);
2120
- process.exit(abortedBy === "SIGTERM" ? 143 : 130);
2121
- }
2122
- if (e instanceof RunAbortedError && e.reason === "checkpoint") {
2123
- await clearMarker();
2124
- if (poster) {
2125
- await flushBilled(poster, {
2126
- ...await failedPayload(`Frames ready to review before the clips. Resume with --run-id ${runId}.`),
2127
- status: "awaiting_approval"
2128
- });
2129
- }
2130
- const frames = frameUrls;
2131
- process.stdout.write(
2132
- `${JSON.stringify(
2133
- {
2134
- ok: true,
2135
- data: { stopped: "frames", runId, frames },
2136
- hints: [
2137
- `${e.message}`,
2138
- frames.length > 0 ? `Review these ${frames.length} frames against the brief and Brand, fix any defects, then resume immediately with the same run id. Wait for the user only when they explicitly requested storyboards only or a review before continuing; do not ask them to choose a version.` : "No frame outputs were captured \u2014 carry on rather than blocking on nothing.",
2139
- `Carry on with: baker canvas run ${filePath} --run-id ${runId}`
2140
- ]
2141
- },
2142
- null,
2143
- 2
2144
- )}
2145
- `
2146
- );
2147
- process.exit(0);
2148
- }
2149
- await clearMarker();
2150
- if (e instanceof ValidationError) {
2151
- process.stderr.write(
2152
- `${JSON.stringify({ ok: false, error: { code: "validation", issues: e.issues } }, null, 2)}
2153
- `
2154
- );
2155
- process.exit(2);
2156
- }
2157
- if (e instanceof LayerExecutionError) {
2158
- const failures = e.failures.map((f) => ({ node_id: f.nodeId, message: describeFailureReason(f.reason) }));
2159
- if (poster) await flushBilled(poster, await failedPayload(e.message));
2160
- process.stderr.write(
2161
- `${JSON.stringify({ ok: false, error: { code: runFailureCode(e), message: e.message, failures } }, null, 2)}
2162
- `
2163
- );
2164
- process.exit(1);
2165
- }
2166
- const msg = e instanceof Error ? e.message : String(e);
2167
- if (poster) await flushBilled(poster, await failedPayload(msg));
2168
- process.stderr.write(`${JSON.stringify({ ok: false, error: { code: runFailureCode(e), message: msg } }, null, 2)}
2169
- `);
2170
- process.exit(1);
2171
- }
2172
- if (next) await executeCanvasRun(next);
2173
- }
2174
- function canvasNodeIds(parsed) {
2175
- const nodes = parsed?.nodes;
2176
- if (!Array.isArray(nodes)) return [];
2177
- return nodes.map((node) => node?.id).filter((id) => typeof id === "string");
2178
- }
2179
- function buildBackendClient() {
2180
- try {
2181
- const creds = requireCredentialsFromEnv();
2182
- return new BackendClient({ baseUrl: creds.url, apiKey: creds.apiKey });
2183
- } catch (e) {
2184
- const msg = e instanceof Error ? e.message : String(e);
2185
- process.stderr.write(`[warn] run history disabled (${msg})
2186
- `);
2187
- return null;
2188
- }
2189
- }
2190
- var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
2191
- async function postInitialRunRecord(client, payload) {
2192
- for (let attempt = 0; attempt < 3; attempt++) {
2193
- try {
2194
- await client.recordRun(payload);
2195
- return true;
2196
- } catch {
2197
- if (attempt < 2) await sleep(500 * 2 ** attempt);
2198
- }
2199
- }
2200
- return false;
2201
- }
2202
-
2203
- export {
2204
- runCommand,
2205
- stopBeforeKinds,
2206
- executeCanvasRun,
2207
- buildBackendClient
2208
- };
2209
- //# sourceMappingURL=chunk-EYLRARHT.js.map