@koda-sl/baker-cli 0.387.0 → 0.389.0-dev.8065ad8f0

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 (967) hide show
  1. package/README.md +1090 -211
  2. package/canvas/tiktok-captions-composition/index.html +5 -6
  3. package/canvas/tiktok-captions-composition/meta.json +5 -0
  4. package/dist/account-CLOKMTTC.js +49 -0
  5. package/dist/account-CLOKMTTC.js.map +1 -0
  6. package/dist/account-V5Y2QHAK.js +79 -0
  7. package/dist/account-V5Y2QHAK.js.map +1 -0
  8. package/dist/account-XFK6VX2R.js +80 -0
  9. package/dist/account-XFK6VX2R.js.map +1 -0
  10. package/dist/account-reads-S5VXX2QU.js +218 -0
  11. package/dist/account-reads-S5VXX2QU.js.map +1 -0
  12. package/dist/account-writes-Y7EQXDXF.js +66 -0
  13. package/dist/account-writes-Y7EQXDXF.js.map +1 -0
  14. package/dist/accounts-7YD457YN.js +114 -0
  15. package/dist/accounts-7YD457YN.js.map +1 -0
  16. package/dist/accounts-BJ3X5JQT.js +115 -0
  17. package/dist/accounts-BJ3X5JQT.js.map +1 -0
  18. package/dist/accounts-LOJ4WLIX.js +77 -0
  19. package/dist/accounts-LOJ4WLIX.js.map +1 -0
  20. package/dist/accounts-RYBDLQ6H.js +75 -0
  21. package/dist/accounts-RYBDLQ6H.js.map +1 -0
  22. package/dist/accounts-UO4XBWM2.js +611 -0
  23. package/dist/accounts-UO4XBWM2.js.map +1 -0
  24. package/dist/actions-3AW3R63U.js +55 -0
  25. package/dist/actions-3AW3R63U.js.map +1 -0
  26. package/dist/active-entities-R6GZIO6Z.js +103 -0
  27. package/dist/active-entities-R6GZIO6Z.js.map +1 -0
  28. package/dist/activities-ESBF3GFS.js +74 -0
  29. package/dist/activities-ESBF3GFS.js.map +1 -0
  30. package/dist/ad-group-writes-I225OYDZ.js +170 -0
  31. package/dist/ad-group-writes-I225OYDZ.js.map +1 -0
  32. package/dist/ad-groups-O35MWNF6.js +68 -0
  33. package/dist/ad-groups-O35MWNF6.js.map +1 -0
  34. package/dist/ad-writes-SS5YZO5W.js +174 -0
  35. package/dist/ad-writes-SS5YZO5W.js.map +1 -0
  36. package/dist/add-43DUOVNR.js +104 -0
  37. package/dist/add-43DUOVNR.js.map +1 -0
  38. package/dist/add-IE5WDELB.js +302 -0
  39. package/dist/add-IE5WDELB.js.map +1 -0
  40. package/dist/add-QZHAWUBA.js +97 -0
  41. package/dist/add-QZHAWUBA.js.map +1 -0
  42. package/dist/add-TGQIVVXH.js +105 -0
  43. package/dist/add-TGQIVVXH.js.map +1 -0
  44. package/dist/add-accounts-6QYPOPR2.js +91 -0
  45. package/dist/add-accounts-6QYPOPR2.js.map +1 -0
  46. package/dist/ads-AUSRB4GU.js +128 -0
  47. package/dist/ads-AUSRB4GU.js.map +1 -0
  48. package/dist/ads-COYOTEKE.js +77 -0
  49. package/dist/ads-COYOTEKE.js.map +1 -0
  50. package/dist/ads-MALHYD2D.js +40 -0
  51. package/dist/ads-MALHYD2D.js.map +1 -0
  52. package/dist/ads-XZCMSPM5.js +113 -0
  53. package/dist/ads-XZCMSPM5.js.map +1 -0
  54. package/dist/adsets-AKR75THA.js +176 -0
  55. package/dist/adsets-AKR75THA.js.map +1 -0
  56. package/dist/advertisers-52FMMBTQ.js +120 -0
  57. package/dist/advertisers-52FMMBTQ.js.map +1 -0
  58. package/dist/advertisers-BCGKUMEH.js +125 -0
  59. package/dist/advertisers-BCGKUMEH.js.map +1 -0
  60. package/dist/analytics-JPDBKETM.js +1980 -0
  61. package/dist/analytics-JPDBKETM.js.map +1 -0
  62. package/dist/analytics-YVQ6H4BG.js +433 -0
  63. package/dist/analytics-YVQ6H4BG.js.map +1 -0
  64. package/dist/animate-JXIT77Y5.js +480 -0
  65. package/dist/animate-JXIT77Y5.js.map +1 -0
  66. package/dist/assign-66NTWTR2.js +77 -0
  67. package/dist/assign-66NTWTR2.js.map +1 -0
  68. package/dist/audience-size-LVQJWQAS.js +94 -0
  69. package/dist/audience-size-LVQJWQAS.js.map +1 -0
  70. package/dist/audiences-DC3IOG34.js +85 -0
  71. package/dist/audiences-DC3IOG34.js.map +1 -0
  72. package/dist/audiences-NEW3LLQR.js +268 -0
  73. package/dist/audiences-NEW3LLQR.js.map +1 -0
  74. package/dist/audiences-NYGMBGQ3.js +79 -0
  75. package/dist/audiences-NYGMBGQ3.js.map +1 -0
  76. package/dist/audit-UIPMTI5C.js +88 -0
  77. package/dist/audit-UIPMTI5C.js.map +1 -0
  78. package/dist/audit-XGN2OFLN.js +151 -0
  79. package/dist/audit-XGN2OFLN.js.map +1 -0
  80. package/dist/autocomplete-LVPDV3JE.js +111 -0
  81. package/dist/autocomplete-LVPDV3JE.js.map +1 -0
  82. package/dist/avatars-S6NSLMJK.js +38 -0
  83. package/dist/avatars-S6NSLMJK.js.map +1 -0
  84. package/dist/bid-pricing-2LYULXU2.js +99 -0
  85. package/dist/bid-pricing-2LYULXU2.js.map +1 -0
  86. package/dist/brand-WWHUZ72R.js +22 -0
  87. package/dist/brand-WWHUZ72R.js.map +1 -0
  88. package/dist/brief-XY3TFWBC.js +492 -0
  89. package/dist/brief-XY3TFWBC.js.map +1 -0
  90. package/dist/businesses-J7OP7MSK.js +53 -0
  91. package/dist/businesses-J7OP7MSK.js.map +1 -0
  92. package/dist/campaign-groups-N4TZ2F3L.js +95 -0
  93. package/dist/campaign-groups-N4TZ2F3L.js.map +1 -0
  94. package/dist/campaign-writes-5XA727KI.js +170 -0
  95. package/dist/campaign-writes-5XA727KI.js.map +1 -0
  96. package/dist/campaign-writes-7YFRQIQT.js +165 -0
  97. package/dist/campaign-writes-7YFRQIQT.js.map +1 -0
  98. package/dist/campaigns-JPYNVFQI.js +76 -0
  99. package/dist/campaigns-JPYNVFQI.js.map +1 -0
  100. package/dist/campaigns-L43ZUKAI.js +107 -0
  101. package/dist/campaigns-L43ZUKAI.js.map +1 -0
  102. package/dist/campaigns-OD7Z332M.js +109 -0
  103. package/dist/campaigns-OD7Z332M.js.map +1 -0
  104. package/dist/campaigns-R4DXIR2Q.js +110 -0
  105. package/dist/campaigns-R4DXIR2Q.js.map +1 -0
  106. package/dist/canvas-J7SLIVL7.js +46 -0
  107. package/dist/canvas-J7SLIVL7.js.map +1 -0
  108. package/dist/capabilities-FVTZAFPV.js +144 -0
  109. package/dist/capabilities-FVTZAFPV.js.map +1 -0
  110. package/dist/cards-7H32TNMO.js +85 -0
  111. package/dist/cards-7H32TNMO.js.map +1 -0
  112. package/dist/catalog-OTICZPJA.js +64 -0
  113. package/dist/catalog-OTICZPJA.js.map +1 -0
  114. package/dist/catalogs-ABCQLCDU.js +128 -0
  115. package/dist/catalogs-ABCQLCDU.js.map +1 -0
  116. package/dist/changes-7ZIGNUW6.js +135 -0
  117. package/dist/changes-7ZIGNUW6.js.map +1 -0
  118. package/dist/chatgpt-B3NHRJUE.js +47 -0
  119. package/dist/chatgpt-B3NHRJUE.js.map +1 -0
  120. package/dist/chats-E7DBRHBF.js +262 -0
  121. package/dist/chats-E7DBRHBF.js.map +1 -0
  122. package/dist/chunk-2CV7LX23.js +474 -0
  123. package/dist/chunk-2CV7LX23.js.map +1 -0
  124. package/dist/chunk-2HCI5BXB.js +479 -0
  125. package/dist/chunk-2HCI5BXB.js.map +1 -0
  126. package/dist/chunk-2SQJL7ZN.js +56 -0
  127. package/dist/chunk-2SQJL7ZN.js.map +1 -0
  128. package/dist/chunk-2Y5V23PU.js +29 -0
  129. package/dist/chunk-2Y5V23PU.js.map +1 -0
  130. package/dist/chunk-32CPGJPL.js +149 -0
  131. package/dist/chunk-32CPGJPL.js.map +1 -0
  132. package/dist/chunk-3ACMDRSE.js +39 -0
  133. package/dist/chunk-3ACMDRSE.js.map +1 -0
  134. package/dist/chunk-3CIXGQJS.js +150 -0
  135. package/dist/chunk-3CIXGQJS.js.map +1 -0
  136. package/dist/chunk-3U7TDBIB.js +275 -0
  137. package/dist/chunk-3U7TDBIB.js.map +1 -0
  138. package/dist/chunk-3UDSYYND.js +42 -0
  139. package/dist/chunk-3UDSYYND.js.map +1 -0
  140. package/dist/chunk-3ZWWXAQZ.js +150 -0
  141. package/dist/chunk-3ZWWXAQZ.js.map +1 -0
  142. package/dist/chunk-4MH6LONO.js +274 -0
  143. package/dist/chunk-4MH6LONO.js.map +1 -0
  144. package/dist/chunk-4NZ47VXO.js +137 -0
  145. package/dist/chunk-4NZ47VXO.js.map +1 -0
  146. package/dist/chunk-564AEU2Q.js +541 -0
  147. package/dist/chunk-564AEU2Q.js.map +1 -0
  148. package/dist/chunk-5HYSKH77.js +315 -0
  149. package/dist/chunk-5HYSKH77.js.map +1 -0
  150. package/dist/chunk-5MBPIONY.js +29 -0
  151. package/dist/chunk-5MBPIONY.js.map +1 -0
  152. package/dist/chunk-5OVOLYY3.js +74 -0
  153. package/dist/chunk-5OVOLYY3.js.map +1 -0
  154. package/dist/chunk-66USKCVY.js +4410 -0
  155. package/dist/chunk-66USKCVY.js.map +1 -0
  156. package/dist/chunk-6I7SYEYN.js +166 -0
  157. package/dist/chunk-6I7SYEYN.js.map +1 -0
  158. package/dist/chunk-6O7ISBC7.js +65 -0
  159. package/dist/chunk-6O7ISBC7.js.map +1 -0
  160. package/dist/chunk-752S7JF6.js +35 -0
  161. package/dist/chunk-752S7JF6.js.map +1 -0
  162. package/dist/chunk-77DN7R35.js +228 -0
  163. package/dist/chunk-77DN7R35.js.map +1 -0
  164. package/dist/chunk-7F7MFMLI.js +175 -0
  165. package/dist/chunk-7F7MFMLI.js.map +1 -0
  166. package/dist/chunk-7THBBTJJ.js +183 -0
  167. package/dist/chunk-7THBBTJJ.js.map +1 -0
  168. package/dist/chunk-7XU3HKMX.js +1599 -0
  169. package/dist/chunk-7XU3HKMX.js.map +1 -0
  170. package/dist/chunk-A2CBZLQ6.js +111 -0
  171. package/dist/chunk-A2CBZLQ6.js.map +1 -0
  172. package/dist/chunk-AFJGYJ7Z.js +45 -0
  173. package/dist/chunk-AFJGYJ7Z.js.map +1 -0
  174. package/dist/chunk-AR7PU7BB.js +76 -0
  175. package/dist/chunk-AR7PU7BB.js.map +1 -0
  176. package/dist/chunk-ASL7JFBD.js +96 -0
  177. package/dist/chunk-ASL7JFBD.js.map +1 -0
  178. package/dist/chunk-AUSKKFVH.js +84 -0
  179. package/dist/chunk-AUSKKFVH.js.map +1 -0
  180. package/dist/chunk-B52DCYL2.js +159 -0
  181. package/dist/chunk-B52DCYL2.js.map +1 -0
  182. package/dist/{chunk-XHC4LMK4.js → chunk-BVM5IRZW.js} +16 -8
  183. package/dist/chunk-BVM5IRZW.js.map +1 -0
  184. package/dist/chunk-CAMX6OHF.js +3182 -0
  185. package/dist/chunk-CAMX6OHF.js.map +1 -0
  186. package/dist/chunk-CYBLKMXQ.js +310 -0
  187. package/dist/chunk-CYBLKMXQ.js.map +1 -0
  188. package/dist/chunk-CZENWCBS.js +333 -0
  189. package/dist/chunk-CZENWCBS.js.map +1 -0
  190. package/dist/chunk-D5FY4FAK.js +24 -0
  191. package/dist/chunk-D5FY4FAK.js.map +1 -0
  192. package/dist/chunk-DGCUPJZD.js +39 -0
  193. package/dist/chunk-DGCUPJZD.js.map +1 -0
  194. package/dist/chunk-DNCLWSHO.js +41 -0
  195. package/dist/chunk-DNCLWSHO.js.map +1 -0
  196. package/dist/chunk-DX4GIDO7.js +296 -0
  197. package/dist/chunk-DX4GIDO7.js.map +1 -0
  198. package/dist/chunk-EDLZGTGN.js +216 -0
  199. package/dist/chunk-EDLZGTGN.js.map +1 -0
  200. package/dist/chunk-EDNKALM6.js +304 -0
  201. package/dist/chunk-EDNKALM6.js.map +1 -0
  202. package/dist/chunk-EDNX3AOS.js +76 -0
  203. package/dist/chunk-EDNX3AOS.js.map +1 -0
  204. package/dist/chunk-EF5DP6EB.js +52 -0
  205. package/dist/chunk-EF5DP6EB.js.map +1 -0
  206. package/dist/chunk-ERSX3MKH.js +34 -0
  207. package/dist/chunk-ERSX3MKH.js.map +1 -0
  208. package/dist/chunk-F3IJSR7O.js +346 -0
  209. package/dist/chunk-F3IJSR7O.js.map +1 -0
  210. package/dist/chunk-FKOECEVC.js +126 -0
  211. package/dist/chunk-FKOECEVC.js.map +1 -0
  212. package/dist/chunk-FWT55B3O.js +509 -0
  213. package/dist/chunk-FWT55B3O.js.map +1 -0
  214. package/dist/chunk-FYWWTMXP.js +2902 -0
  215. package/dist/chunk-FYWWTMXP.js.map +1 -0
  216. package/dist/chunk-FZGCAW46.js +64 -0
  217. package/dist/chunk-FZGCAW46.js.map +1 -0
  218. package/dist/chunk-G7AFVTUS.js +106 -0
  219. package/dist/chunk-G7AFVTUS.js.map +1 -0
  220. package/dist/chunk-GIW7ABMM.js +74 -0
  221. package/dist/chunk-GIW7ABMM.js.map +1 -0
  222. package/dist/chunk-GIWHHCD6.js +145 -0
  223. package/dist/chunk-GIWHHCD6.js.map +1 -0
  224. package/dist/chunk-GRQ2AXDX.js +9 -0
  225. package/dist/chunk-GRQ2AXDX.js.map +1 -0
  226. package/dist/chunk-GXDLWBOY.js +73 -0
  227. package/dist/chunk-GXDLWBOY.js.map +1 -0
  228. package/dist/chunk-GYABNLWW.js +629 -0
  229. package/dist/chunk-GYABNLWW.js.map +1 -0
  230. package/dist/chunk-H7MLHG2I.js +94 -0
  231. package/dist/chunk-H7MLHG2I.js.map +1 -0
  232. package/dist/chunk-H7XVKLIY.js +206 -0
  233. package/dist/chunk-H7XVKLIY.js.map +1 -0
  234. package/dist/chunk-HAE4WWFQ.js +455 -0
  235. package/dist/chunk-HAE4WWFQ.js.map +1 -0
  236. package/dist/chunk-HDHWIEJJ.js +136 -0
  237. package/dist/chunk-HDHWIEJJ.js.map +1 -0
  238. package/dist/chunk-HJTIBTF7.js +98 -0
  239. package/dist/chunk-HJTIBTF7.js.map +1 -0
  240. package/dist/{chunk-VZEDAFAR.js → chunk-HLXWKMTK.js} +47 -8
  241. package/dist/chunk-HLXWKMTK.js.map +1 -0
  242. package/dist/{chunk-MF7YA62W.js → chunk-HREWXNTO.js} +10 -5
  243. package/dist/chunk-HREWXNTO.js.map +1 -0
  244. package/dist/chunk-HYXKRNRV.js +176 -0
  245. package/dist/chunk-HYXKRNRV.js.map +1 -0
  246. package/dist/chunk-I3DIZWN5.js +97 -0
  247. package/dist/chunk-I3DIZWN5.js.map +1 -0
  248. package/dist/chunk-IJMWEO4P.js +57 -0
  249. package/dist/chunk-IJMWEO4P.js.map +1 -0
  250. package/dist/chunk-IOCSDFF2.js +23992 -0
  251. package/dist/chunk-IOCSDFF2.js.map +1 -0
  252. package/dist/chunk-IVIJJXXT.js +62 -0
  253. package/dist/chunk-IVIJJXXT.js.map +1 -0
  254. package/dist/chunk-J57GWTPK.js +106 -0
  255. package/dist/chunk-J57GWTPK.js.map +1 -0
  256. package/dist/chunk-JPK34QPS.js +134 -0
  257. package/dist/chunk-JPK34QPS.js.map +1 -0
  258. package/dist/chunk-JRCFCIE3.js +188 -0
  259. package/dist/chunk-JRCFCIE3.js.map +1 -0
  260. package/dist/chunk-JUAIGJ2A.js +76 -0
  261. package/dist/chunk-JUAIGJ2A.js.map +1 -0
  262. package/dist/chunk-K5OQES4V.js +58 -0
  263. package/dist/chunk-K5OQES4V.js.map +1 -0
  264. package/dist/chunk-KBS5GH4T.js +1626 -0
  265. package/dist/chunk-KBS5GH4T.js.map +1 -0
  266. package/dist/chunk-KIGGMKAE.js +66 -0
  267. package/dist/chunk-KIGGMKAE.js.map +1 -0
  268. package/dist/chunk-KKJ4KJCW.js +29 -0
  269. package/dist/chunk-KKJ4KJCW.js.map +1 -0
  270. package/dist/chunk-KLK6KQLQ.js +55 -0
  271. package/dist/chunk-KLK6KQLQ.js.map +1 -0
  272. package/dist/chunk-KXGG6EQM.js +382 -0
  273. package/dist/chunk-KXGG6EQM.js.map +1 -0
  274. package/dist/chunk-KXRKPZZY.js +169 -0
  275. package/dist/chunk-KXRKPZZY.js.map +1 -0
  276. package/dist/chunk-KZUHRZ2C.js +5187 -0
  277. package/dist/chunk-KZUHRZ2C.js.map +1 -0
  278. package/dist/chunk-L45A3IYV.js +1079 -0
  279. package/dist/chunk-L45A3IYV.js.map +1 -0
  280. package/dist/chunk-LA6PPSNA.js +65 -0
  281. package/dist/chunk-LA6PPSNA.js.map +1 -0
  282. package/dist/chunk-LEIQAHWF.js +25 -0
  283. package/dist/chunk-LEIQAHWF.js.map +1 -0
  284. package/dist/chunk-LERWCRY5.js +297 -0
  285. package/dist/chunk-LERWCRY5.js.map +1 -0
  286. package/dist/chunk-LLPFY3NI.js +207 -0
  287. package/dist/chunk-LLPFY3NI.js.map +1 -0
  288. package/dist/chunk-M6UNISGO.js +66 -0
  289. package/dist/chunk-M6UNISGO.js.map +1 -0
  290. package/dist/chunk-MDATIJPM.js +92 -0
  291. package/dist/chunk-MDATIJPM.js.map +1 -0
  292. package/dist/chunk-MGKHFGLV.js +75 -0
  293. package/dist/chunk-MGKHFGLV.js.map +1 -0
  294. package/dist/chunk-MZWC6HHA.js +455 -0
  295. package/dist/chunk-MZWC6HHA.js.map +1 -0
  296. package/dist/chunk-N3XJ434P.js +197 -0
  297. package/dist/chunk-N3XJ434P.js.map +1 -0
  298. package/dist/chunk-NFSLRRIE.js +77 -0
  299. package/dist/chunk-NFSLRRIE.js.map +1 -0
  300. package/dist/chunk-NHU33T2S.js +60 -0
  301. package/dist/chunk-NHU33T2S.js.map +1 -0
  302. package/dist/chunk-NJEZM4OB.js +51 -0
  303. package/dist/chunk-NJEZM4OB.js.map +1 -0
  304. package/dist/chunk-O6QKCJE4.js +455 -0
  305. package/dist/chunk-O6QKCJE4.js.map +1 -0
  306. package/dist/chunk-OFFAMC5H.js +225 -0
  307. package/dist/chunk-OFFAMC5H.js.map +1 -0
  308. package/dist/chunk-OHGTCFFE.js +57 -0
  309. package/dist/chunk-OHGTCFFE.js.map +1 -0
  310. package/dist/chunk-P4NSJS54.js +20 -0
  311. package/dist/chunk-P4NSJS54.js.map +1 -0
  312. package/dist/chunk-P5T7OZKV.js +26 -0
  313. package/dist/chunk-P5T7OZKV.js.map +1 -0
  314. package/dist/chunk-PFBQERWX.js +10 -0
  315. package/dist/chunk-PFBQERWX.js.map +1 -0
  316. package/dist/chunk-PUPEGICD.js +103 -0
  317. package/dist/chunk-PUPEGICD.js.map +1 -0
  318. package/dist/chunk-Q6ULQMWG.js +41 -0
  319. package/dist/chunk-Q6ULQMWG.js.map +1 -0
  320. package/dist/chunk-QO23YHLK.js +84 -0
  321. package/dist/chunk-QO23YHLK.js.map +1 -0
  322. package/dist/chunk-QSGIWV4P.js +337 -0
  323. package/dist/chunk-QSGIWV4P.js.map +1 -0
  324. package/dist/chunk-R4Y5P3PB.js +19 -0
  325. package/dist/chunk-R4Y5P3PB.js.map +1 -0
  326. package/dist/chunk-R5OQM7FF.js +179 -0
  327. package/dist/chunk-R5OQM7FF.js.map +1 -0
  328. package/dist/chunk-RODLBWIR.js +592 -0
  329. package/dist/chunk-RODLBWIR.js.map +1 -0
  330. package/dist/chunk-RY7TYEIX.js +504 -0
  331. package/dist/chunk-RY7TYEIX.js.map +1 -0
  332. package/dist/chunk-S4LZ7KTG.js +160 -0
  333. package/dist/chunk-S4LZ7KTG.js.map +1 -0
  334. package/dist/chunk-SHTESUB6.js +1442 -0
  335. package/dist/chunk-SHTESUB6.js.map +1 -0
  336. package/dist/chunk-SJH4EOZH.js +23 -0
  337. package/dist/chunk-SJH4EOZH.js.map +1 -0
  338. package/dist/chunk-SMIENBNX.js +6212 -0
  339. package/dist/chunk-SMIENBNX.js.map +1 -0
  340. package/dist/chunk-T7GT22KA.js +494 -0
  341. package/dist/chunk-T7GT22KA.js.map +1 -0
  342. package/dist/chunk-T7M4WFNV.js +172 -0
  343. package/dist/chunk-T7M4WFNV.js.map +1 -0
  344. package/dist/chunk-TIFVHGQL.js +6683 -0
  345. package/dist/chunk-TIFVHGQL.js.map +1 -0
  346. package/dist/chunk-TMIDUSOR.js +665 -0
  347. package/dist/chunk-TMIDUSOR.js.map +1 -0
  348. package/dist/{chunk-WLDM2TRF.js → chunk-TPXI2GCW.js} +4 -4
  349. package/dist/chunk-U6VRBDNQ.js +1830 -0
  350. package/dist/chunk-U6VRBDNQ.js.map +1 -0
  351. package/dist/chunk-U7BBXM67.js +1743 -0
  352. package/dist/chunk-U7BBXM67.js.map +1 -0
  353. package/dist/chunk-UI6BKYQD.js +225 -0
  354. package/dist/chunk-UI6BKYQD.js.map +1 -0
  355. package/dist/chunk-UOI5S62H.js +846 -0
  356. package/dist/chunk-UOI5S62H.js.map +1 -0
  357. package/dist/chunk-USL5ARRE.js +26 -0
  358. package/dist/chunk-USL5ARRE.js.map +1 -0
  359. package/dist/chunk-UYC45JNS.js +139 -0
  360. package/dist/chunk-UYC45JNS.js.map +1 -0
  361. package/dist/chunk-VNKVBY54.js +363 -0
  362. package/dist/chunk-VNKVBY54.js.map +1 -0
  363. package/dist/chunk-VS4C7VAR.js +533 -0
  364. package/dist/chunk-VS4C7VAR.js.map +1 -0
  365. package/dist/chunk-VZMDYVNS.js +3151 -0
  366. package/dist/chunk-VZMDYVNS.js.map +1 -0
  367. package/dist/chunk-W4W4ZRBP.js +191 -0
  368. package/dist/chunk-W4W4ZRBP.js.map +1 -0
  369. package/dist/chunk-WN4KX7GE.js +25 -0
  370. package/dist/chunk-WN4KX7GE.js.map +1 -0
  371. package/dist/chunk-WNFTXSGR.js +111 -0
  372. package/dist/chunk-WNFTXSGR.js.map +1 -0
  373. package/dist/chunk-WOTDHRNF.js +2109 -0
  374. package/dist/chunk-WOTDHRNF.js.map +1 -0
  375. package/dist/chunk-XGWKTYXQ.js +67 -0
  376. package/dist/chunk-XGWKTYXQ.js.map +1 -0
  377. package/dist/chunk-XIGIJJSF.js +66 -0
  378. package/dist/chunk-XIGIJJSF.js.map +1 -0
  379. package/dist/chunk-XNUXB63I.js +817 -0
  380. package/dist/chunk-XNUXB63I.js.map +1 -0
  381. package/dist/chunk-XQ3CCNJD.js +610 -0
  382. package/dist/chunk-XQ3CCNJD.js.map +1 -0
  383. package/dist/chunk-XX6ZMCY5.js +4227 -0
  384. package/dist/chunk-XX6ZMCY5.js.map +1 -0
  385. package/dist/chunk-Y362QH54.js +98 -0
  386. package/dist/chunk-Y362QH54.js.map +1 -0
  387. package/dist/chunk-Y4T6ATDQ.js +74 -0
  388. package/dist/chunk-Y4T6ATDQ.js.map +1 -0
  389. package/dist/chunk-YQSBHWOI.js +41 -0
  390. package/dist/chunk-YU26SDNT.js +46 -0
  391. package/dist/chunk-YU26SDNT.js.map +1 -0
  392. package/dist/chunk-YULENNA7.js +501 -0
  393. package/dist/chunk-YULENNA7.js.map +1 -0
  394. package/dist/chunk-Z3ENMCFE.js +94 -0
  395. package/dist/chunk-Z3ENMCFE.js.map +1 -0
  396. package/dist/chunk-ZH7ZM3ZM.js +125 -0
  397. package/dist/chunk-ZH7ZM3ZM.js.map +1 -0
  398. package/dist/chunk-ZIXHS6AM.js +42 -0
  399. package/dist/chunk-ZIXHS6AM.js.map +1 -0
  400. package/dist/chunk-ZLLJKSNS.js +96 -0
  401. package/dist/chunk-ZLLJKSNS.js.map +1 -0
  402. package/dist/claim-LF6VQ7OR.js +197 -0
  403. package/dist/claim-LF6VQ7OR.js.map +1 -0
  404. package/dist/cli.js +104 -70041
  405. package/dist/cli.js.map +1 -1
  406. package/dist/client-26SAJ46D.js +19 -0
  407. package/dist/code-MOWYJMDH.js +76 -0
  408. package/dist/code-MOWYJMDH.js.map +1 -0
  409. package/dist/companies-6HSK5BLK.js +195 -0
  410. package/dist/companies-6HSK5BLK.js.map +1 -0
  411. package/dist/complete-2PUAFQEC.js +81 -0
  412. package/dist/complete-2PUAFQEC.js.map +1 -0
  413. package/dist/config-X6GKOVQ6.js +88 -0
  414. package/dist/config-X6GKOVQ6.js.map +1 -0
  415. package/dist/connect-RXPMAJQI.js +42 -0
  416. package/dist/content-UYZC4AKN.js +85 -0
  417. package/dist/content-UYZC4AKN.js.map +1 -0
  418. package/dist/conversation-Y3NB2VDI.js +93 -0
  419. package/dist/conversation-Y3NB2VDI.js.map +1 -0
  420. package/dist/conversion-report-R4GJWWTK.js +125 -0
  421. package/dist/conversion-report-R4GJWWTK.js.map +1 -0
  422. package/dist/conversion-upload-command-YP4DGTPP.js +438 -0
  423. package/dist/conversion-upload-command-YP4DGTPP.js.map +1 -0
  424. package/dist/conversion-writes-WHFFUWWL.js +120 -0
  425. package/dist/conversion-writes-WHFFUWWL.js.map +1 -0
  426. package/dist/conversions-K7C32DPW.js +135 -0
  427. package/dist/conversions-K7C32DPW.js.map +1 -0
  428. package/dist/conversions-OXJAX5GB.js +76 -0
  429. package/dist/conversions-OXJAX5GB.js.map +1 -0
  430. package/dist/countries-PBXNB3BR.js +82 -0
  431. package/dist/countries-PBXNB3BR.js.map +1 -0
  432. package/dist/create-AJ4KPSJ4.js +59 -0
  433. package/dist/create-AJ4KPSJ4.js.map +1 -0
  434. package/dist/create-ALKOAD5J.js +138 -0
  435. package/dist/create-ALKOAD5J.js.map +1 -0
  436. package/dist/create-HTKZMXKB.js +207 -0
  437. package/dist/create-HTKZMXKB.js.map +1 -0
  438. package/dist/create-TZMAOFBR.js +236 -0
  439. package/dist/create-TZMAOFBR.js.map +1 -0
  440. package/dist/creatives-MBTZTIAA.js +51 -0
  441. package/dist/creatives-MBTZTIAA.js.map +1 -0
  442. package/dist/creatives-OZHVU4WB.js +182 -0
  443. package/dist/creatives-OZHVU4WB.js.map +1 -0
  444. package/dist/creatives-VMGY5SU4.js +87 -0
  445. package/dist/creatives-VMGY5SU4.js.map +1 -0
  446. package/dist/credentials-FY4UH6TF.js +287 -0
  447. package/dist/credentials-FY4UH6TF.js.map +1 -0
  448. package/dist/critique-2UTP4DR3.js +216 -0
  449. package/dist/critique-2UTP4DR3.js.map +1 -0
  450. package/dist/critique-B3H7QFM2.js +1449 -0
  451. package/dist/critique-B3H7QFM2.js.map +1 -0
  452. package/dist/crm-2IBLUHDB.js +318 -0
  453. package/dist/crm-2IBLUHDB.js.map +1 -0
  454. package/dist/crm-YMYO4U53.js +224 -0
  455. package/dist/crm-YMYO4U53.js.map +1 -0
  456. package/dist/crop-U3AD4DDR.js +113 -0
  457. package/dist/crop-U3AD4DDR.js.map +1 -0
  458. package/dist/currency-S6KWZSZ6.js +88 -0
  459. package/dist/currency-S6KWZSZ6.js.map +1 -0
  460. package/dist/custom-conversions-FABS6YVT.js +125 -0
  461. package/dist/custom-conversions-FABS6YVT.js.map +1 -0
  462. package/dist/customers-P6LLLJHK.js +56 -0
  463. package/dist/decide-YTHCBKM6.js +199 -0
  464. package/dist/decide-YTHCBKM6.js.map +1 -0
  465. package/dist/delete-B2TDEW7H.js +63 -0
  466. package/dist/delete-B2TDEW7H.js.map +1 -0
  467. package/dist/delete-DZUDLYPC.js +69 -0
  468. package/dist/delete-DZUDLYPC.js.map +1 -0
  469. package/dist/delete-NZGZP4YP.js +71 -0
  470. package/dist/delete-NZGZP4YP.js.map +1 -0
  471. package/dist/delete-SDOZNDWQ.js +54 -0
  472. package/dist/delete-SDOZNDWQ.js.map +1 -0
  473. package/dist/delete-VQMU56OH.js +71 -0
  474. package/dist/delete-VQMU56OH.js.map +1 -0
  475. package/dist/delete-WKQPMVAM.js +66 -0
  476. package/dist/delete-WKQPMVAM.js.map +1 -0
  477. package/dist/demographics-Q3DCXULY.js +138 -0
  478. package/dist/demographics-Q3DCXULY.js.map +1 -0
  479. package/dist/describe-JNTCQZNL.js +97 -0
  480. package/dist/describe-JNTCQZNL.js.map +1 -0
  481. package/dist/describe-MT4334NG.js +97 -0
  482. package/dist/describe-MT4334NG.js.map +1 -0
  483. package/dist/dimensions-FEZUJRAG.js +101 -0
  484. package/dist/dimensions-FEZUJRAG.js.map +1 -0
  485. package/dist/discard-NEZM5CHF.js +66 -0
  486. package/dist/discard-NEZM5CHF.js.map +1 -0
  487. package/dist/discover-4GD7QSF5.js +93 -0
  488. package/dist/discover-4GD7QSF5.js.map +1 -0
  489. package/dist/discover-6K3IOYXR.js +172 -0
  490. package/dist/discover-6K3IOYXR.js.map +1 -0
  491. package/dist/domain-7Y256IDR.js +98 -0
  492. package/dist/domain-7Y256IDR.js.map +1 -0
  493. package/dist/download-L27HWEOE.js +299 -0
  494. package/dist/download-L27HWEOE.js.map +1 -0
  495. package/dist/draft-25G2P2TE.js +281 -0
  496. package/dist/draft-25G2P2TE.js.map +1 -0
  497. package/dist/draft-F6TUGXAY.js +307 -0
  498. package/dist/draft-F6TUGXAY.js.map +1 -0
  499. package/dist/draft-KLULNBWP.js +233 -0
  500. package/dist/draft-KLULNBWP.js.map +1 -0
  501. package/dist/draft-LY5ZPF73.js +217 -0
  502. package/dist/draft-LY5ZPF73.js.map +1 -0
  503. package/dist/draft-M4ZHDQ46.js +306 -0
  504. package/dist/draft-M4ZHDQ46.js.map +1 -0
  505. package/dist/draft-MI7RWY2K.js +100 -0
  506. package/dist/draft-MI7RWY2K.js.map +1 -0
  507. package/dist/draft-P4IVYTY3.js +103 -0
  508. package/dist/draft-P4IVYTY3.js.map +1 -0
  509. package/dist/draft-QQMCVDDS.js +328 -0
  510. package/dist/draft-QQMCVDDS.js.map +1 -0
  511. package/dist/engine/index.d.ts +213 -127
  512. package/dist/engine/index.js +18 -4
  513. package/dist/{env-4P5HOGNA.js → env-FBTHZKGN.js} +12 -2
  514. package/dist/env-FBTHZKGN.js.map +1 -0
  515. package/dist/experiment-HDYTJPUY.js +1397 -0
  516. package/dist/experiment-HDYTJPUY.js.map +1 -0
  517. package/dist/export-TS5GYEMA.js +168 -0
  518. package/dist/export-TS5GYEMA.js.map +1 -0
  519. package/dist/extract-QVQFUOIK.js +113 -0
  520. package/dist/extract-QVQFUOIK.js.map +1 -0
  521. package/dist/facets-7MBSM7BP.js +114 -0
  522. package/dist/facets-7MBSM7BP.js.map +1 -0
  523. package/dist/favorites-7QP7BY5K.js +178 -0
  524. package/dist/favorites-7QP7BY5K.js.map +1 -0
  525. package/dist/feed-EETRO2FG.js +177 -0
  526. package/dist/feed-EETRO2FG.js.map +1 -0
  527. package/dist/feedback-PLMFRAQW.js +66 -0
  528. package/dist/feedback-PLMFRAQW.js.map +1 -0
  529. package/dist/feedback-record-QEHHGVYC.js +177 -0
  530. package/dist/feedback-record-QEHHGVYC.js.map +1 -0
  531. package/dist/fetch-QE3EB756.js +176 -0
  532. package/dist/fetch-QE3EB756.js.map +1 -0
  533. package/dist/fetch-Z7O3ZL4D.js +139 -0
  534. package/dist/fetch-Z7O3ZL4D.js.map +1 -0
  535. package/dist/find-KAQ6JDMO.js +134 -0
  536. package/dist/find-KAQ6JDMO.js.map +1 -0
  537. package/dist/fit-MY5GVZZZ.js +45 -0
  538. package/dist/fit-MY5GVZZZ.js.map +1 -0
  539. package/dist/flows-C67KEMDU.js +247 -0
  540. package/dist/flows-C67KEMDU.js.map +1 -0
  541. package/dist/follow-IX4XVK5Y.js +94 -0
  542. package/dist/follow-IX4XVK5Y.js.map +1 -0
  543. package/dist/follow-competitors-UZBUOYTH.js +112 -0
  544. package/dist/follow-competitors-UZBUOYTH.js.map +1 -0
  545. package/dist/following-VGOIUCIZ.js +113 -0
  546. package/dist/following-VGOIUCIZ.js.map +1 -0
  547. package/dist/fonts-UR7XZ5XZ.js +34 -0
  548. package/dist/fonts-UR7XZ5XZ.js.map +1 -0
  549. package/dist/forecast-3F4SZNAK.js +104 -0
  550. package/dist/forecast-3F4SZNAK.js.map +1 -0
  551. package/dist/forecast-K5E7CTKX.js +168 -0
  552. package/dist/forecast-K5E7CTKX.js.map +1 -0
  553. package/dist/funding-H5YO37OW.js +85 -0
  554. package/dist/funding-H5YO37OW.js.map +1 -0
  555. package/dist/funnel-2PPEPAMY.js +394 -0
  556. package/dist/funnel-2PPEPAMY.js.map +1 -0
  557. package/dist/ga4-YHJ2XMLC.js +55 -0
  558. package/dist/ga4-YHJ2XMLC.js.map +1 -0
  559. package/dist/generate-M2ZX5DMI.js +262 -0
  560. package/dist/generate-M2ZX5DMI.js.map +1 -0
  561. package/dist/get-4EYKCZ6F.js +59 -0
  562. package/dist/get-4EYKCZ6F.js.map +1 -0
  563. package/dist/get-637GALM2.js +63 -0
  564. package/dist/get-637GALM2.js.map +1 -0
  565. package/dist/get-AZARFR6O.js +61 -0
  566. package/dist/get-AZARFR6O.js.map +1 -0
  567. package/dist/get-BPMEHRUG.js +56 -0
  568. package/dist/get-BPMEHRUG.js.map +1 -0
  569. package/dist/get-MQ6MMIZ7.js +78 -0
  570. package/dist/get-MQ6MMIZ7.js.map +1 -0
  571. package/dist/get-N4BPOQCB.js +63 -0
  572. package/dist/get-N4BPOQCB.js.map +1 -0
  573. package/dist/get-RPZHLQ56.js +92 -0
  574. package/dist/get-RPZHLQ56.js.map +1 -0
  575. package/dist/gif-6PRTB2VR.js +94 -0
  576. package/dist/gif-6PRTB2VR.js.map +1 -0
  577. package/dist/google-52JRH7X3.js +136 -0
  578. package/dist/google-52JRH7X3.js.map +1 -0
  579. package/dist/google-X2AQR3RB.js +3190 -0
  580. package/dist/google-X2AQR3RB.js.map +1 -0
  581. package/dist/google-ads-PWX7OF5Z.js +195 -0
  582. package/dist/google-ads-PWX7OF5Z.js.map +1 -0
  583. package/dist/group-AAZ5QKC3.js +43 -0
  584. package/dist/group-AAZ5QKC3.js.map +1 -0
  585. package/dist/group-GSYCZORC.js +43 -0
  586. package/dist/group-GSYCZORC.js.map +1 -0
  587. package/dist/gsc-TS5T7ML2.js +30 -0
  588. package/dist/gsc-TS5T7ML2.js.map +1 -0
  589. package/dist/history-EW6LFFCX.js +67 -0
  590. package/dist/history-EW6LFFCX.js.map +1 -0
  591. package/dist/history-XI5ABCFO.js +133 -0
  592. package/dist/history-XI5ABCFO.js.map +1 -0
  593. package/dist/hubspot-AVUOILRE.js +779 -0
  594. package/dist/hubspot-AVUOILRE.js.map +1 -0
  595. package/dist/icon-K75KI6BV.js +137 -0
  596. package/dist/icon-K75KI6BV.js.map +1 -0
  597. package/dist/ideas-L3SZSIZP.js +35 -0
  598. package/dist/ideas-L3SZSIZP.js.map +1 -0
  599. package/dist/images-CD53I2W5.js +90 -0
  600. package/dist/images-CD53I2W5.js.map +1 -0
  601. package/dist/improve-L3BW4EQG.js +86 -0
  602. package/dist/improve-L3BW4EQG.js.map +1 -0
  603. package/dist/ingest-KRJOYTCQ.js +107 -0
  604. package/dist/ingest-KRJOYTCQ.js.map +1 -0
  605. package/dist/ingest-WE3SPPND.js +23 -0
  606. package/dist/ingest-WE3SPPND.js.map +1 -0
  607. package/dist/insights-PELVD4RY.js +122 -0
  608. package/dist/insights-PELVD4RY.js.map +1 -0
  609. package/dist/insights-XCA4BUJW.js +423 -0
  610. package/dist/insights-XCA4BUJW.js.map +1 -0
  611. package/dist/inspect-QKETG5UJ.js +189 -0
  612. package/dist/inspect-QKETG5UJ.js.map +1 -0
  613. package/dist/inspiration-Y2J2PUPC.js +53 -0
  614. package/dist/inspiration-Y2J2PUPC.js.map +1 -0
  615. package/dist/intent-YJOJGNVJ.js +95 -0
  616. package/dist/intent-YJOJGNVJ.js.map +1 -0
  617. package/dist/job-E2U4FS5P.js +202 -0
  618. package/dist/job-E2U4FS5P.js.map +1 -0
  619. package/dist/job-create-DFYCHVQ7.js +109 -0
  620. package/dist/job-create-DFYCHVQ7.js.map +1 -0
  621. package/dist/job-status-FFPMTSHB.js +74 -0
  622. package/dist/job-status-FFPMTSHB.js.map +1 -0
  623. package/dist/keep-GYZS2UTL.js +78 -0
  624. package/dist/keep-GYZS2UTL.js.map +1 -0
  625. package/dist/keyword-gap-QU7O7UKC.js +130 -0
  626. package/dist/keyword-gap-QU7O7UKC.js.map +1 -0
  627. package/dist/keyword-metrics-HLCM3QU7.js +197 -0
  628. package/dist/keyword-metrics-HLCM3QU7.js.map +1 -0
  629. package/dist/keywords-for-site-BDKPQKWB.js +128 -0
  630. package/dist/keywords-for-site-BDKPQKWB.js.map +1 -0
  631. package/dist/landing-4K6XYNFM.js +28 -0
  632. package/dist/landing-4K6XYNFM.js.map +1 -0
  633. package/dist/landings-F7LOAEJE.js +151 -0
  634. package/dist/landings-F7LOAEJE.js.map +1 -0
  635. package/dist/languages-P3ZM6R2A.js +40 -0
  636. package/dist/languages-P3ZM6R2A.js.map +1 -0
  637. package/dist/languages-XEJKTIFP.js +55 -0
  638. package/dist/languages-XEJKTIFP.js.map +1 -0
  639. package/dist/launches-TCFAYUA5.js +19 -0
  640. package/dist/launches-TCFAYUA5.js.map +1 -0
  641. package/dist/layerize-ZSKFIPZA.js +190 -0
  642. package/dist/layerize-ZSKFIPZA.js.map +1 -0
  643. package/dist/leads-GDF4S2AM.js +90 -0
  644. package/dist/leads-GDF4S2AM.js.map +1 -0
  645. package/dist/leads-TPB5OFSQ.js +293 -0
  646. package/dist/leads-TPB5OFSQ.js.map +1 -0
  647. package/dist/learn-NMFEA5H5.js +203 -0
  648. package/dist/learn-NMFEA5H5.js.map +1 -0
  649. package/dist/library-IP2UKNRU.js +109 -0
  650. package/dist/library-IP2UKNRU.js.map +1 -0
  651. package/dist/lighthouse-57XBJRCO.js +75 -0
  652. package/dist/lighthouse-57XBJRCO.js.map +1 -0
  653. package/dist/line-item-writes-O6SSS5NQ.js +208 -0
  654. package/dist/line-item-writes-O6SSS5NQ.js.map +1 -0
  655. package/dist/line-items-ZZAKH3YZ.js +103 -0
  656. package/dist/line-items-ZZAKH3YZ.js.map +1 -0
  657. package/dist/link-CRY57R3E.js +64 -0
  658. package/dist/link-CRY57R3E.js.map +1 -0
  659. package/dist/linkedin-WC7LGYPP.js +1008 -0
  660. package/dist/linkedin-WC7LGYPP.js.map +1 -0
  661. package/dist/list-6IKPWQGG.js +57 -0
  662. package/dist/list-6IKPWQGG.js.map +1 -0
  663. package/dist/list-CAUH3BMG.js +65 -0
  664. package/dist/list-CAUH3BMG.js.map +1 -0
  665. package/dist/list-CWAKX5TH.js +63 -0
  666. package/dist/list-CWAKX5TH.js.map +1 -0
  667. package/dist/list-FJ5FSVL6.js +151 -0
  668. package/dist/list-FJ5FSVL6.js.map +1 -0
  669. package/dist/list-GTOSN7DP.js +50 -0
  670. package/dist/list-GTOSN7DP.js.map +1 -0
  671. package/dist/list-HLJP4NVE.js +51 -0
  672. package/dist/list-HLJP4NVE.js.map +1 -0
  673. package/dist/list-LCUPF7EF.js +76 -0
  674. package/dist/list-LCUPF7EF.js.map +1 -0
  675. package/dist/list-NH4ZRZTL.js +303 -0
  676. package/dist/list-NH4ZRZTL.js.map +1 -0
  677. package/dist/locations-2BYWKIYA.js +67 -0
  678. package/dist/locations-2BYWKIYA.js.map +1 -0
  679. package/dist/locations-LVVDOSXO.js +40 -0
  680. package/dist/locations-LVVDOSXO.js.map +1 -0
  681. package/dist/log-6JOWOY5G.js +92 -0
  682. package/dist/log-6JOWOY5G.js.map +1 -0
  683. package/dist/logo-AJK2TDQU.js +18 -0
  684. package/dist/logo-AJK2TDQU.js.map +1 -0
  685. package/dist/lookup-H5GEM77H.js +22 -0
  686. package/dist/lookup-H5GEM77H.js.map +1 -0
  687. package/dist/make-N3WZ6OSS.js +640 -0
  688. package/dist/make-N3WZ6OSS.js.map +1 -0
  689. package/dist/map-4KOYFHAN.js +404 -0
  690. package/dist/map-4KOYFHAN.js.map +1 -0
  691. package/dist/mcp-LSS2DHYL.js +463 -0
  692. package/dist/mcp-LSS2DHYL.js.map +1 -0
  693. package/dist/media-JBCN6V4X.js +15 -0
  694. package/dist/media-JBCN6V4X.js.map +1 -0
  695. package/dist/media-RAGEJTZX.js +89 -0
  696. package/dist/media-RAGEJTZX.js.map +1 -0
  697. package/dist/media-sources-GSPAV7HT.js +32 -0
  698. package/dist/media-sources-GSPAV7HT.js.map +1 -0
  699. package/dist/members-GUUVEK2Y.js +44 -0
  700. package/dist/members-GUUVEK2Y.js.map +1 -0
  701. package/dist/meta-Z37ZR3PJ.js +69 -0
  702. package/dist/meta-Z37ZR3PJ.js.map +1 -0
  703. package/dist/metrics-KW6SDULI.js +152 -0
  704. package/dist/metrics-KW6SDULI.js.map +1 -0
  705. package/dist/models-5J4WFUD3.js +155 -0
  706. package/dist/models-5J4WFUD3.js.map +1 -0
  707. package/dist/normalize-DSFVTRXN.js +806 -0
  708. package/dist/normalize-DSFVTRXN.js.map +1 -0
  709. package/dist/normalize-EUDI5HEM.js +141 -0
  710. package/dist/normalize-EUDI5HEM.js.map +1 -0
  711. package/dist/options-P4PPJQH4.js +121 -0
  712. package/dist/options-P4PPJQH4.js.map +1 -0
  713. package/dist/output-DTCLVPUF.js +24 -0
  714. package/dist/output-DTCLVPUF.js.map +1 -0
  715. package/dist/page-N2ZO3O7F.js +105 -0
  716. package/dist/page-N2ZO3O7F.js.map +1 -0
  717. package/dist/pages-FQ4CBAJ2.js +66 -0
  718. package/dist/pages-FQ4CBAJ2.js.map +1 -0
  719. package/dist/performance-A66LYIZX.js +24 -0
  720. package/dist/performance-A66LYIZX.js.map +1 -0
  721. package/dist/pinterest-NV5XTNJE.js +96 -0
  722. package/dist/pinterest-NV5XTNJE.js.map +1 -0
  723. package/dist/pixels-CTJ43FZ4.js +108 -0
  724. package/dist/pixels-CTJ43FZ4.js.map +1 -0
  725. package/dist/pixels-HKINGZCH.js +60 -0
  726. package/dist/pixels-HKINGZCH.js.map +1 -0
  727. package/dist/plan-ZYTWLGWK.js +207 -0
  728. package/dist/plan-ZYTWLGWK.js.map +1 -0
  729. package/dist/preview-5ROBOQG7.js +169 -0
  730. package/dist/preview-5ROBOQG7.js.map +1 -0
  731. package/dist/profile-Q3PHR6FU.js +159 -0
  732. package/dist/profile-Q3PHR6FU.js.map +1 -0
  733. package/dist/promoted-tweet-writes-AEOUK2LK.js +180 -0
  734. package/dist/promoted-tweet-writes-AEOUK2LK.js.map +1 -0
  735. package/dist/promoted-tweets-L2CEC2BJ.js +119 -0
  736. package/dist/promoted-tweets-L2CEC2BJ.js.map +1 -0
  737. package/dist/properties-WLL6M2P6.js +101 -0
  738. package/dist/properties-WLL6M2P6.js.map +1 -0
  739. package/dist/publish-KHNR5ARF.js +322 -0
  740. package/dist/publish-KHNR5ARF.js.map +1 -0
  741. package/dist/query-A34J7BGX.js +61 -0
  742. package/dist/query-A34J7BGX.js.map +1 -0
  743. package/dist/query-IYZN5KHO.js +236 -0
  744. package/dist/query-IYZN5KHO.js.map +1 -0
  745. package/dist/query-UN2P6DBA.js +247 -0
  746. package/dist/query-UN2P6DBA.js.map +1 -0
  747. package/dist/questionnaire-Z2ZIKNBV.js +93 -0
  748. package/dist/questionnaire-Z2ZIKNBV.js.map +1 -0
  749. package/dist/read-GM7PQYJA.js +141 -0
  750. package/dist/read-GM7PQYJA.js.map +1 -0
  751. package/dist/reddit-5NPFULGD.js +26 -0
  752. package/dist/reddit-5NPFULGD.js.map +1 -0
  753. package/dist/refresh-FGXW4Y4X.js +94 -0
  754. package/dist/refresh-FGXW4Y4X.js.map +1 -0
  755. package/dist/release-OKZMC73N.js +60 -0
  756. package/dist/release-OKZMC73N.js.map +1 -0
  757. package/dist/relevant-pages-J76ZKNKF.js +99 -0
  758. package/dist/relevant-pages-J76ZKNKF.js.map +1 -0
  759. package/dist/remove-CA2J6ACH.js +50 -0
  760. package/dist/remove-CA2J6ACH.js.map +1 -0
  761. package/dist/remove-GOYW2G4R.js +48 -0
  762. package/dist/remove-GOYW2G4R.js.map +1 -0
  763. package/dist/reopen-XPKSOE6O.js +63 -0
  764. package/dist/reopen-XPKSOE6O.js.map +1 -0
  765. package/dist/rerun-QA6ISKVO.js +86 -0
  766. package/dist/rerun-QA6ISKVO.js.map +1 -0
  767. package/dist/research-FZ63UZTE.js +62 -0
  768. package/dist/research-FZ63UZTE.js.map +1 -0
  769. package/dist/research-YGQQ6CNG.js +262 -0
  770. package/dist/research-YGQQ6CNG.js.map +1 -0
  771. package/dist/reset-BGPZ4HMA.js +54 -0
  772. package/dist/reset-BGPZ4HMA.js.map +1 -0
  773. package/dist/reset-HTD6LCIT.js +54 -0
  774. package/dist/reset-HTD6LCIT.js.map +1 -0
  775. package/dist/resolve-NRDZ6N2B.js +121 -0
  776. package/dist/resolve-NRDZ6N2B.js.map +1 -0
  777. package/dist/retry-PF4BGKJV.js +60 -0
  778. package/dist/retry-PF4BGKJV.js.map +1 -0
  779. package/dist/retry-XL26JDAV.js +62 -0
  780. package/dist/retry-XL26JDAV.js.map +1 -0
  781. package/dist/retry-failed-BEFWRV4Z.js +45 -0
  782. package/dist/retry-failed-BEFWRV4Z.js.map +1 -0
  783. package/dist/run-3ZDGCCTH.js +61 -0
  784. package/dist/run-3ZDGCCTH.js.map +1 -0
  785. package/dist/run-EMJLI7LR.js +65 -0
  786. package/dist/run-EMJLI7LR.js.map +1 -0
  787. package/dist/scaffold-ad-QW75LLYR.js +1550 -0
  788. package/dist/scaffold-ad-QW75LLYR.js.map +1 -0
  789. package/dist/scaffold-static-ad-S3UOKLJ3.js +973 -0
  790. package/dist/scaffold-static-ad-S3UOKLJ3.js.map +1 -0
  791. package/dist/scaffold-video-3BJQOUAA.js +874 -0
  792. package/dist/scaffold-video-3BJQOUAA.js.map +1 -0
  793. package/dist/schedule-KQ7UIR3N.js +66 -0
  794. package/dist/schedule-KQ7UIR3N.js.map +1 -0
  795. package/dist/schedule-PKPNSISL.js +61 -0
  796. package/dist/schedule-PKPNSISL.js.map +1 -0
  797. package/dist/scheduled-agents-LP5LITA3.js +49 -0
  798. package/dist/scheduled-agents-LP5LITA3.js.map +1 -0
  799. package/dist/schema-B6J6VPTO.js +132 -0
  800. package/dist/schema-B6J6VPTO.js.map +1 -0
  801. package/dist/schema-QXTDLZVC.js +63 -0
  802. package/dist/schema-QXTDLZVC.js.map +1 -0
  803. package/dist/scrape-7YKJWFZE.js +2241 -0
  804. package/dist/scrape-7YKJWFZE.js.map +1 -0
  805. package/dist/screenshot-ZHBSG3SI.js +102 -0
  806. package/dist/screenshot-ZHBSG3SI.js.map +1 -0
  807. package/dist/search-332KFYZ6.js +224 -0
  808. package/dist/search-332KFYZ6.js.map +1 -0
  809. package/dist/search-4PBMXXUY.js +91 -0
  810. package/dist/search-4PBMXXUY.js.map +1 -0
  811. package/dist/search-6WNUKCMP.js +174 -0
  812. package/dist/search-6WNUKCMP.js.map +1 -0
  813. package/dist/search-AVNUU6TJ.js +26 -0
  814. package/dist/search-AVNUU6TJ.js.map +1 -0
  815. package/dist/search-F5INRFFK.js +92 -0
  816. package/dist/search-F5INRFFK.js.map +1 -0
  817. package/dist/search-copy-DZVBYG2B.js +168 -0
  818. package/dist/search-copy-DZVBYG2B.js.map +1 -0
  819. package/dist/seeds-5JTQN5WI.js +101 -0
  820. package/dist/seeds-5JTQN5WI.js.map +1 -0
  821. package/dist/select-2V6CHATD.js +96 -0
  822. package/dist/select-2V6CHATD.js.map +1 -0
  823. package/dist/sends-3L6QBS46.js +309 -0
  824. package/dist/sends-3L6QBS46.js.map +1 -0
  825. package/dist/sequences-YKFV7BDH.js +146 -0
  826. package/dist/sequences-YKFV7BDH.js.map +1 -0
  827. package/dist/set-prompt-XGZXW63I.js +188 -0
  828. package/dist/set-prompt-XGZXW63I.js.map +1 -0
  829. package/dist/setup-links-6H5ONDCQ.js +141 -0
  830. package/dist/setup-links-6H5ONDCQ.js.map +1 -0
  831. package/dist/{shared-6762QE6R.js → shared-QAMP7FZV.js} +8 -6
  832. package/dist/shared-QAMP7FZV.js.map +1 -0
  833. package/dist/shopify-D3GNV5O6.js +3715 -0
  834. package/dist/shopify-D3GNV5O6.js.map +1 -0
  835. package/dist/site-TBPERLY3.js +177 -0
  836. package/dist/site-TBPERLY3.js.map +1 -0
  837. package/dist/sitemaps-XPGLW24S.js +87 -0
  838. package/dist/sitemaps-XPGLW24S.js.map +1 -0
  839. package/dist/sites-WMBY2HJV.js +101 -0
  840. package/dist/sites-WMBY2HJV.js.map +1 -0
  841. package/dist/skills-3HEILQCU.js +47 -0
  842. package/dist/skills-3HEILQCU.js.map +1 -0
  843. package/dist/sources-JFQKTK2L.js +421 -0
  844. package/dist/sources-JFQKTK2L.js.map +1 -0
  845. package/dist/sources-Q3I6DDV7.js +30 -0
  846. package/dist/sources-Q3I6DDV7.js.map +1 -0
  847. package/dist/stale-4SERZW2D.js +66 -0
  848. package/dist/stale-4SERZW2D.js.map +1 -0
  849. package/dist/stats-GNILHSKK.js +34 -0
  850. package/dist/stats-GNILHSKK.js.map +1 -0
  851. package/dist/status-LIZWJYS4.js +62 -0
  852. package/dist/status-LIZWJYS4.js.map +1 -0
  853. package/dist/sticker-KCV3VZHY.js +94 -0
  854. package/dist/sticker-KCV3VZHY.js.map +1 -0
  855. package/dist/stock-VTORKR4C.js +179 -0
  856. package/dist/stock-VTORKR4C.js.map +1 -0
  857. package/dist/studio-QCRA6BY5.js +49 -0
  858. package/dist/studio-QCRA6BY5.js.map +1 -0
  859. package/dist/sync-455DB46Y.js +54 -0
  860. package/dist/sync-455DB46Y.js.map +1 -0
  861. package/dist/sync-A4KKQ3B6.js +265 -0
  862. package/dist/sync-A4KKQ3B6.js.map +1 -0
  863. package/dist/sync-ULKWDFXM.js +54 -0
  864. package/dist/sync-ULKWDFXM.js.map +1 -0
  865. package/dist/sync-definition-YTBLMLX2.js +55 -0
  866. package/dist/sync-definition-YTBLMLX2.js.map +1 -0
  867. package/dist/tag-manager-E7QTXBWQ.js +43 -0
  868. package/dist/tag-manager-E7QTXBWQ.js.map +1 -0
  869. package/dist/tags-4Q4I5GQJ.js +20 -0
  870. package/dist/tags-4Q4I5GQJ.js.map +1 -0
  871. package/dist/tags-AMEVAQZ4.js +26 -0
  872. package/dist/tags-AMEVAQZ4.js.map +1 -0
  873. package/dist/tags-DPLOLH3E.js +20 -0
  874. package/dist/tags-DPLOLH3E.js.map +1 -0
  875. package/dist/tags-LDHXONR3.js +224 -0
  876. package/dist/tags-LDHXONR3.js.map +1 -0
  877. package/dist/tags-UW3WJTAQ.js +20 -0
  878. package/dist/tags-UW3WJTAQ.js.map +1 -0
  879. package/dist/targeting-constants-D64YO3E7.js +118 -0
  880. package/dist/targeting-constants-D64YO3E7.js.map +1 -0
  881. package/dist/targeting-criteria-BP6VJA7X.js +113 -0
  882. package/dist/targeting-criteria-BP6VJA7X.js.map +1 -0
  883. package/dist/targets-CQWO2UXD.js +102 -0
  884. package/dist/targets-CQWO2UXD.js.map +1 -0
  885. package/dist/templates-WZSTNRNZ.js +178 -0
  886. package/dist/templates-WZSTNRNZ.js.map +1 -0
  887. package/dist/testimonials-ETHSNWUH.js +32 -0
  888. package/dist/testimonials-ETHSNWUH.js.map +1 -0
  889. package/dist/themes-YU663LQH.js +94 -0
  890. package/dist/themes-YU663LQH.js.map +1 -0
  891. package/dist/top-companies-KTXHS472.js +108 -0
  892. package/dist/top-companies-KTXHS472.js.map +1 -0
  893. package/dist/translate-6QAJ5ZUU.js +600 -0
  894. package/dist/translate-6QAJ5ZUU.js.map +1 -0
  895. package/dist/triggers-4EDFLNGH.js +141 -0
  896. package/dist/triggers-4EDFLNGH.js.map +1 -0
  897. package/dist/tweets-ZUKQAAUQ.js +123 -0
  898. package/dist/tweets-ZUKQAAUQ.js.map +1 -0
  899. package/dist/unfollow-A4JVCJBF.js +46 -0
  900. package/dist/unfollow-A4JVCJBF.js.map +1 -0
  901. package/dist/unlink-KY2OEKMD.js +67 -0
  902. package/dist/unlink-KY2OEKMD.js.map +1 -0
  903. package/dist/unstage-FHUG67RI.js +84 -0
  904. package/dist/unstage-FHUG67RI.js.map +1 -0
  905. package/dist/unstage-ZRLLCSQF.js +95 -0
  906. package/dist/unstage-ZRLLCSQF.js.map +1 -0
  907. package/dist/update-27LGM65V.js +63 -0
  908. package/dist/update-27LGM65V.js.map +1 -0
  909. package/dist/update-AIY46I2Q.js +155 -0
  910. package/dist/update-AIY46I2Q.js.map +1 -0
  911. package/dist/update-QYD2XZFM.js +142 -0
  912. package/dist/update-QYD2XZFM.js.map +1 -0
  913. package/dist/update-W2OSRNFO.js +98 -0
  914. package/dist/update-W2OSRNFO.js.map +1 -0
  915. package/dist/upload-JGBTSKGH.js +126 -0
  916. package/dist/upload-JGBTSKGH.js.map +1 -0
  917. package/dist/upload-XEHWYMJG.js +150 -0
  918. package/dist/upload-XEHWYMJG.js.map +1 -0
  919. package/dist/upscale-I5P2OHTN.js +109 -0
  920. package/dist/upscale-I5P2OHTN.js.map +1 -0
  921. package/dist/url-options-QHGA42RP.js +130 -0
  922. package/dist/url-options-QHGA42RP.js.map +1 -0
  923. package/dist/url-params-NWSUHWRE.js +98 -0
  924. package/dist/url-params-NWSUHWRE.js.map +1 -0
  925. package/dist/use-U4HG2NF3.js +95 -0
  926. package/dist/use-U4HG2NF3.js.map +1 -0
  927. package/dist/validate-DOQ6AI62.js +91 -0
  928. package/dist/validate-DOQ6AI62.js.map +1 -0
  929. package/dist/variant-FOVE6URJ.js +338 -0
  930. package/dist/variant-FOVE6URJ.js.map +1 -0
  931. package/dist/videos-DP3VCSYG.js +39 -0
  932. package/dist/videos-DP3VCSYG.js.map +1 -0
  933. package/dist/view-HRI3FHCH.js +121 -0
  934. package/dist/view-HRI3FHCH.js.map +1 -0
  935. package/dist/viewer-check-JYUE24M6.js +68 -0
  936. package/dist/viewer-check-JYUE24M6.js.map +1 -0
  937. package/dist/web-AFUIWPFU.js +140 -0
  938. package/dist/web-AFUIWPFU.js.map +1 -0
  939. package/dist/winners-SMMDN6LW.js +113 -0
  940. package/dist/winners-SMMDN6LW.js.map +1 -0
  941. package/dist/winning-ads-PCIJUYVA.js +84 -0
  942. package/dist/winning-ads-PCIJUYVA.js.map +1 -0
  943. package/dist/write-commands-7Z34WG2J.js +206 -0
  944. package/dist/write-commands-7Z34WG2J.js.map +1 -0
  945. package/dist/write-commands-BLT2SEC4.js +713 -0
  946. package/dist/write-commands-BLT2SEC4.js.map +1 -0
  947. package/dist/write-commands-N4FSGRVQ.js +743 -0
  948. package/dist/write-commands-N4FSGRVQ.js.map +1 -0
  949. package/dist/write-commands-Q4MQ3BGM.js +1015 -0
  950. package/dist/write-commands-Q4MQ3BGM.js.map +1 -0
  951. package/dist/x-AUOZJNWE.js +47 -0
  952. package/dist/x-AUOZJNWE.js.map +1 -0
  953. package/package.json +9 -2
  954. package/dist/chunk-FGHMWBUD.js +0 -9989
  955. package/dist/chunk-FGHMWBUD.js.map +0 -1
  956. package/dist/chunk-HJEMOSPH.js +0 -1292
  957. package/dist/chunk-HJEMOSPH.js.map +0 -1
  958. package/dist/chunk-MF7YA62W.js.map +0 -1
  959. package/dist/chunk-VZEDAFAR.js.map +0 -1
  960. package/dist/chunk-XHC4LMK4.js.map +0 -1
  961. package/dist/client-GR6YL3YX.js +0 -17
  962. package/dist/output-NMQXZF3Z.js +0 -18
  963. /package/dist/{chunk-WLDM2TRF.js.map → chunk-TPXI2GCW.js.map} +0 -0
  964. /package/dist/{client-GR6YL3YX.js.map → chunk-YQSBHWOI.js.map} +0 -0
  965. /package/dist/{env-4P5HOGNA.js.map → client-26SAJ46D.js.map} +0 -0
  966. /package/dist/{output-NMQXZF3Z.js.map → connect-RXPMAJQI.js.map} +0 -0
  967. /package/dist/{shared-6762QE6R.js.map → customers-P6LLLJHK.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/engine/brand/fonts.ts"],"sourcesContent":["/**\n * Brand font resolution against Google Fonts.\n *\n * A font that doesn't load fails silently — the browser substitutes a fallback\n * and the page renders fine, just off-brand. These helpers turn \"we think the\n * brand uses Manrope 500\" into a verifiable fact: the exact CSS Google serves,\n * and the exact files behind it.\n */\n\nimport { posix } from \"node:path\";\nimport { parseBrandTokens } from \"../landing/lib/brand-tokens.ts\";\n\nconst GOOGLE_CSS2 = \"https://fonts.googleapis.com/css2\";\n\nexport type BrandFontFace = {\n /** Which catalogue served it, so a re-fetch cannot silently swap foundries. */\n provider?: FontProviderName;\n /** Unicode subset the face covers — \"latin\", \"cyrillic\", \"greek\", … */\n subset: string;\n family: string;\n style: string;\n weight: number;\n url: string;\n /** Kept verbatim: self-hosting more than one subset needs it, or the browser\n * picks the wrong file for the same family/weight and glyphs fall back. */\n unicodeRange: string;\n};\n\n/**\n * Split a Google Fonts stylesheet into its faces.\n *\n * Google returns one `@font-face` per unicode subset — six or more per weight —\n * and the subset name appears ONLY in the CSS comment above each block. Callers\n * that self-host want the latin subsets, not all of them, so that comment is\n * the only thing that makes the choice possible and it has to be parsed with\n * the block rather than stripped as noise.\n */\nexport function parseGoogleFontFaces(css: string): BrandFontFace[] {\n const faces: BrandFontFace[] = [];\n const re = /\\/\\*\\s*([\\w-]+)\\s*\\*\\/\\s*@font-face\\s*\\{([^}]*)\\}/g;\n for (const match of String(css).matchAll(re)) {\n const subset = match[1] ?? \"\";\n const body = match[2] ?? \"\";\n const family = body.match(/font-family\\s*:\\s*['\"]?([^'\";]+)['\"]?\\s*;/i)?.[1]?.trim();\n const url = body.match(/src\\s*:\\s*url\\(\\s*['\"]?([^'\")]+)['\"]?\\s*\\)/i)?.[1]?.trim();\n const weight = body.match(/font-weight\\s*:\\s*(\\d{3})\\s*;/i)?.[1];\n if (!family || !url || !weight) continue;\n faces.push({\n subset,\n family,\n style: body.match(/font-style\\s*:\\s*([\\w-]+)\\s*;/i)?.[1]?.trim() ?? \"normal\",\n weight: Number(weight),\n url,\n unicodeRange: body.match(/unicode-range\\s*:\\s*([^;]+);/i)?.[1]?.trim() ?? \"\",\n });\n }\n return faces;\n}\n\n/**\n * Filename for a self-hosted face. Family, weight, style and subset all go in:\n * Google ships a separate file per subset for the same family+weight, so\n * anything less specific silently overwrites one subset with another.\n */\nexport function fontFileName(face: BrandFontFace): string {\n const family = face.family.replace(/[^A-Za-z0-9]/g, \"\");\n const style = face.style === \"italic\" ? \"italic\" : \"\";\n return `${family}-${face.weight}${style}-${face.subset}.woff2`;\n}\n\n/**\n * `src: url()` for a self-hosted face, written from the point of view of\n * `src/styles/global.css` — the one stylesheet the block is ever pasted into.\n *\n * Relative on purpose. A root-relative `/src/brand/fonts/…` reads to the bundler\n * as a path something else already serves, so it is passed through untouched:\n * the woff2 never lands in the published build and every page 404s it. Nothing\n * fails loudly when that happens — an unfetchable face falls back to a system\n * font — so the whole site quietly renders off-brand. Kept relative, the\n * bundler follows it on disk, fingerprints it, and emits it with the build.\n */\nfunction fontFaceHref(face: BrandFontFace): string {\n return `../brand/fonts/${fontFileName(face)}`;\n}\n\n/**\n * The `@font-face` block to paste above `@theme` in global.css. `unicode-range`\n * is carried through verbatim so multiple subsets of one family coexist, and\n * `font-display: swap` matches what the export pipeline enforces at publish.\n */\nexport function renderFontFaceCss(faces: BrandFontFace[]): string {\n return faces\n .map((face) =>\n [\n \"@font-face {\",\n ` font-family: '${face.family}';`,\n ` font-style: ${face.style};`,\n ` font-weight: ${face.weight};`,\n \" font-display: swap;\",\n ` src: url('${fontFaceHref(face)}') format('woff2');`,\n ...(face.unicodeRange ? [` unicode-range: ${face.unicodeRange};`] : []),\n \"}\",\n ].join(\"\\n\"),\n )\n .join(\"\\n\");\n}\n\n/**\n * Catalogues a brand face can be self-hosted from, in resolution order.\n *\n * Google first and always: it is the canonical catalogue, and a family both\n * carry must resolve the same way on every run — otherwise a re-fetch silently\n * swaps which foundry's file the brand ships, with nothing failing.\n *\n * Modelled on `unjs/unifont`'s providers rather than importing it. The scaffold\n * carries a mirror of this file for the wiring migration, and that migration\n * runs from the extracted tarball with no node_modules — `run-migrations.mjs`\n * is zero-dependency on purpose. Depending on unifont here and hand-rolling\n * there would let the two resolve differently while the byte-identical CSS\n * contract test still passed, because it only compares emitted CSS.\n */\nexport const FONT_PROVIDERS = [\"google\", \"fontsource\"] as const;\nexport type FontProviderName = (typeof FONT_PROVIDERS)[number];\n\nconst FONTSOURCE_API = \"https://api.fontsource.org/v1\";\n\n/**\n * The two styles a catalogue self-host can cover. `oblique` is not one: no\n * catalogue ships it as an axis, so a face declaring it is one this command\n * cannot replace — `upsertFontFaceCss` leaves it standing rather than deleting\n * a rule nothing here can write back.\n */\nexport const FONT_STYLES = [\"normal\", \"italic\"] as const;\nexport type FontStyle = (typeof FONT_STYLES)[number];\n\n/** Google's `ital` axis value: upright is 0, italic is 1. */\nconst ITAL_AXIS: Record<FontStyle, number> = { normal: 0, italic: 1 };\n\n/** Fontsource's id, which is exactly the slugified family — verified across all 2096 entries. */\nexport function fontsourceId(family: string): string {\n return family\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-|-$/g, \"\");\n}\n\ntype FontsourceMeta = {\n family: string;\n weights: number[];\n styles: string[];\n subsets: string[];\n /** Per-subset `unicode-range`, keyed by subset name. Absent on single-subset families. */\n unicodeRange?: Record<string, string>;\n variants: Record<string, Record<string, Record<string, { url: Record<string, string> }>>>;\n};\n\n/**\n * Faces Fontsource serves for a family, or null when it does not carry it.\n *\n * The `unicode-range` comes from the API's own per-subset map and is NOT\n * optional once two subsets are in play: two rules with the same family, style\n * and weight and no range both cover everything, so the later one wins outright\n * and the other file is downloaded, fingerprinted, shipped and never read. On\n * `--subsets latin,latin-ext` that means latin-ext wins and ordinary text falls\n * back — the silent substitution this module exists to prevent.\n *\n * The field really is empty for some families, which is where the old blanket\n * `\"\"` came from: verified live, the ~120 entries Fontsource hosts itself (Open\n * Sauce One among them) are single-subset with no range, while the ~1976 it\n * mirrors from Google are multi-subset and carry the full map. One subset needs\n * no range — there is nothing to disambiguate from — so both stay correct.\n */\nexport function fontsourceFaces(\n meta: FontsourceMeta,\n weights: number[],\n subsets: string[],\n styles: readonly FontStyle[] = [\"normal\"],\n): BrandFontFace[] {\n const faces: BrandFontFace[] = [];\n for (const subset of subsets.filter((s) => meta.subsets.includes(s))) {\n for (const weight of weights.filter((w) => meta.weights.includes(w))) {\n for (const style of styles.filter((style) => meta.styles.includes(style))) {\n const url = meta.variants[String(weight)]?.[style]?.[subset]?.url?.woff2;\n if (!url) continue;\n faces.push({\n subset,\n family: meta.family,\n style,\n weight,\n url,\n unicodeRange: meta.unicodeRange?.[subset] ?? \"\",\n provider: \"fontsource\",\n });\n }\n }\n }\n return faces;\n}\n\n/**\n * Subsets that would ship as an `@font-face` nothing can tell apart.\n *\n * Only a problem in the plural: one subset with no range is a complete\n * self-host, two are a coin flip decided by source order.\n */\nexport function undisambiguatedSubsets(faces: BrandFontFace[]): string[] {\n if (new Set(faces.map((face) => face.subset)).size < 2) return [];\n return [...new Set(faces.filter((face) => !face.unicodeRange).map((face) => face.subset))];\n}\n\n/**\n * Families that look like what was asked for, so a miss is a next step rather\n * than a dead end.\n *\n * The case this exists for is real and not a typo: a client's stylesheet asks\n * for \"Open Sauce\", which no catalogue carries, while Fontsource has \"Open\n * Sauce One\", \"Open Sauce Sans\" and \"Open Sauce Two\". Nothing can pick between\n * those three for the brand, so this never auto-resolves — it just puts the\n * three real names in the error where the agent can act on them.\n */\nexport function suggestFamilies(wanted: string, catalogue: string[], limit = 5): string[] {\n const key = (s: string) =>\n s\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \" \")\n .trim();\n const target = key(wanted);\n if (!target) return [];\n const words = target.split(\" \");\n const scored = catalogue\n .map((family) => {\n const candidate = key(family);\n if (candidate === target) return { family, score: 0 };\n if (candidate.startsWith(target)) return { family, score: 1 };\n if (candidate.includes(target)) return { family, score: 2 };\n const shared = words.filter((w) => w.length > 2 && candidate.includes(w)).length;\n return { family, score: shared > 0 ? 3 + (words.length - shared) : Number.POSITIVE_INFINITY };\n })\n .filter((c) => Number.isFinite(c.score))\n .sort((a, b) => a.score - b.score || a.family.localeCompare(b.family));\n return scored.slice(0, limit).map((c) => c.family);\n}\n\n/** Narrow an untyped API body, so a shape change fails here and not at a `.url` deep inside. */\nfunction asFontsourceMeta(body: unknown): FontsourceMeta | null {\n if (typeof body !== \"object\" || body === null) return null;\n const meta = body as Partial<FontsourceMeta>;\n const ok =\n typeof meta.family === \"string\" &&\n Array.isArray(meta.weights) &&\n Array.isArray(meta.styles) &&\n Array.isArray(meta.subsets) &&\n typeof meta.variants === \"object\" &&\n meta.variants !== null;\n return ok ? (meta as FontsourceMeta) : null;\n}\n\n/**\n * What a catalogue lookup found. Three failures, kept apart because their fixes\n * are different sentences: an unknown NAME wants a near-match, a missing SUBSET\n * wants a different `--subsets`, a missing WEIGHT wants a different `--weights`.\n * Collapsing them sent a subset miss into the weight branch, which answered\n * `\"Inter\" exists but not at weight 400 — retry with --weights 400`: a\n * contradiction, and a loop for any agent that obeyed it.\n */\nexport type ResolveOutcome =\n | { ok: true; provider: FontProviderName; faces: BrandFontFace[]; availableStyles: string[] }\n | { ok: false; reason: \"unknown-family\" }\n | { ok: false; reason: \"unreachable\"; provider: FontProviderName }\n | { ok: false; reason: \"subset\"; provider: FontProviderName; available: string[] }\n | { ok: false; reason: \"ambiguous-subsets\"; provider: FontProviderName; available: string[] }\n | { ok: false; reason: \"weight\"; provider: FontProviderName; available: number[] };\n\n/**\n * What Google said, as opposed to whether we heard it. `absent` is Google\n * answering that it does not carry the family — it replies 400, not 404, and\n * only to that. Every other status, and every thrown request, is `unreachable`:\n * we never got an answer, which is not the same fact and must not be acted on\n * as though it were.\n */\nexport type GoogleCssLookup = { status: \"served\"; css: string } | { status: \"absent\" } | { status: \"unreachable\" };\n\nexport type ProviderDeps = {\n lookupGoogleCss: (url: string) => Promise<GoogleCssLookup>;\n fetchJson: (url: string) => Promise<unknown>;\n};\n\n/**\n * Everything Google serves for a family, in ONE request: every standard weight\n * against both styles. Measured — a request is refused only when EVERY tuple in\n * it is missing, so asking for all eighteen returns exactly the ones that exist.\n *\n * It used to ask one weight at a time, nine at once, on the belief that Google\n * rejects the whole request over a single missing weight. It does not (`Lato\n * wght@400;500` answers 200 with 400 alone), and the burst was actively\n * harmful: Google answers a rapid series of requests with **400**, which this\n * module reads as `absent` — \"Google does not carry it\" — and acts on by\n * self-hosting another foundry's build, permanently. Nine requests per family\n * is how you provoke that; one is not.\n *\n * `null` means the probe never got an answer, which is not the same fact as\n * \"none of them\" and must not be acted on as though it were.\n */\nasync function probeGoogleFaces(\n family: string,\n lookup: ProviderDeps[\"lookupGoogleCss\"],\n): Promise<BrandFontFace[] | null> {\n const got = await lookup(googleFontCssUrl(family, STANDARD_WEIGHTS, FONT_STYLES));\n if (got.status === \"unreachable\") return null;\n return got.status === \"served\" ? parseGoogleFontFaces(got.css) : [];\n}\n\n/**\n * What Google can answer for this family, or null to mean \"not ours — ask the\n * next catalogue\". Split out so the Fontsource half below stays readable.\n */\nasync function resolveFromGoogle(\n family: string,\n weights: number[],\n subsets: string[],\n styles: readonly FontStyle[],\n deps: ProviderDeps,\n): Promise<ResolveOutcome | null> {\n // Both axes, always — even when only the upright is wanted. It is the same\n // ONE request either way (measured: a family with no italic answers 200 with\n // the italic tuples silently dropped, it is not refused), and it is the only\n // way to know whether the family HAS an italic the brand is not taking. Asked\n // narrowly, that question can only be answered by a second request nobody\n // would spend, so the gap stayed invisible. The wanted styles filter below.\n const google = await deps.lookupGoogleCss(googleFontCssUrl(family, weights, FONT_STYLES));\n // A timeout is not an answer. Falling through to Fontsource here self-hosts\n // its build of a family Google carries — the foundry swap the contract above\n // forbids — and once the files are on disk the swap is permanent, decided by\n // one bad minute. Better to fail and be re-run.\n if (google.status === \"unreachable\") return { ok: false, reason: \"unreachable\", provider: \"google\" };\n\n if (google.status === \"absent\") {\n // A refusal means every tuple asked for is missing — which is true both of\n // a name Google has never heard of and of a family asked for at weights it\n // does not ship. Taken as the former, `fetch \"Lato\" --weights 500` would\n // self-host Fontsource's build of a family Google carries. Ask once more,\n // for everything, and let the answer decide.\n const served = await probeGoogleFaces(family, deps.lookupGoogleCss);\n if (served === null) return { ok: false, reason: \"unreachable\", provider: \"google\" };\n const available = [...new Set(served.map((face) => face.weight))].sort((a, b) => a - b);\n return available.length > 0 ? { ok: false, reason: \"weight\", provider: \"google\", available } : null;\n }\n\n const served = parseGoogleFontFaces(google.css);\n if (served.length === 0) return null;\n const availableStyles = [...new Set(served.map((face) => face.style))].sort();\n // Subset first, style second, and in that order: a face is only ever upright\n // or italic and upright is always among the styles asked for, so a family\n // whose subset matched can never be emptied by the style filter — which is\n // why a style miss needs no branch of its own.\n const inSubset = served.filter((face) => subsets.includes(face.subset));\n const faces = inSubset\n .filter((face) => styles.includes(face.style as FontStyle))\n .map((face) => ({ ...face, provider: \"google\" as const }));\n if (faces.length > 0) return { ok: true, provider: \"google\", faces, availableStyles };\n return { ok: false, reason: \"subset\", provider: \"google\", available: [...new Set(served.map((f) => f.subset))] };\n}\n\n/**\n * The faces some catalogue really serves for a family, and which one served\n * them — or null when none carries it.\n *\n * Google is tried first and wins outright: it is the canonical catalogue, and\n * a family both carry has to resolve the same way every run or a re-fetch\n * silently swaps which foundry's file the brand ships.\n */\nexport async function resolveBrandFaces(\n family: string,\n weights: number[],\n subsets: string[],\n deps: ProviderDeps,\n styles: readonly FontStyle[] = [\"normal\"],\n): Promise<ResolveOutcome> {\n const google = await resolveFromGoogle(family, weights, subsets, styles, deps);\n if (google) return google;\n\n // Same rule as Google's, for the same reason: a catalogue that did not answer\n // has not said the family is missing. `fetchJson` throws for that case and\n // returns null only for Fontsource's own 404, so a 503 cannot end up telling\n // the agent to check its spelling or hand-write an @font-face.\n let body: unknown;\n try {\n body = await deps.fetchJson(`${FONTSOURCE_API}/fonts/${fontsourceId(family)}`);\n } catch {\n return { ok: false, reason: \"unreachable\", provider: \"fontsource\" };\n }\n\n const meta = asFontsourceMeta(body);\n if (meta) {\n const faces = fontsourceFaces(meta, weights, subsets, styles);\n const ambiguous = undisambiguatedSubsets(faces);\n if (ambiguous.length > 0) {\n return { ok: false, reason: \"ambiguous-subsets\", provider: \"fontsource\", available: meta.subsets };\n }\n if (faces.length > 0) return { ok: true, provider: \"fontsource\", faces, availableStyles: [...meta.styles].sort() };\n if (!subsets.some((subset) => meta.subsets.includes(subset))) {\n return { ok: false, reason: \"subset\", provider: \"fontsource\", available: meta.subsets };\n }\n return { ok: false, reason: \"weight\", provider: \"fontsource\", available: meta.weights };\n }\n\n return { ok: false, reason: \"unknown-family\" };\n}\n\n/**\n * Rewrite a face's `url()`s so they resolve from `global.css` rather than from\n * the file that declared them.\n *\n * A page sits at `src/pages/<name>/index.astro` and writes `../../brand/fonts/x`;\n * the stylesheet sits at `src/styles/global.css`, where the same file is\n * `../brand/fonts/x`. Getting this wrong is the silent 404 the whole module\n * warns about, so absolute, data: and http: hrefs are left exactly as found.\n */\nexport function rebaseFontFaceSrc(block: string, fromDir: string, toDir = \"src/styles\"): string {\n return block.replace(/url\\(\\s*(['\"]?)([^'\")]+)\\1\\s*\\)/gi, (whole, _quote, href: string) => {\n if (!isRepoFontHref(href)) return whole;\n const target = posix.normalize(posix.join(fromDir, href));\n return `url('${posix.relative(toDir, target)}')`;\n });\n}\n\n/** The `@font-face` blocks a source file declares, verbatim, comments excluded. */\nfunction declaredFontFaces(source: string): { family: string; block: string }[] {\n const out: { family: string; block: string }[] = [];\n // Ranges come from the comment-blanked copy, which is the same length, so a\n // commented-out face is invisible here and is never moved.\n for (const rule of stripCssComments(source).matchAll(/@font-face\\s*\\{[^}]*\\}/gi)) {\n const family = rule[0].match(/font-family\\s*:\\s*([^;]+)/i)?.[1];\n if (!family || rule.index === undefined) continue;\n out.push({ family: normalizeFamily(family), block: source.slice(rule.index, rule.index + rule[0].length) });\n }\n return out;\n}\n\nexport type AdoptionPlan = { family: string; blocks: string[]; files: string[]; urls: string[] };\n\n/**\n * An href this repo is expected to ship a file for.\n *\n * The same set `rebaseFontFaceSrc` refuses to rewrite: a `data:`, `http(s):` or\n * root-relative href means the same thing from any directory, so it is not\n * ours to resolve against `src/brand/fonts/`.\n */\nfunction isRepoFontHref(href: string): boolean {\n return !/^(?:data:|https?:|\\/)/i.test(href);\n}\n\n/**\n * The files a plan points at that are not in `src/brand/fonts/`.\n *\n * Remote and absolute hrefs are skipped, exactly as `validate-brand-fonts`\n * skips them: they are not files this repo ships, so basenaming them against\n * the fonts directory reported a face that loads perfectly well as a missing\n * file, and `adopt` refused to move it.\n */\nexport function missingFontFiles(urls: string[], available: Set<string>): string[] {\n return urls\n .filter(isRepoFontHref)\n .map((url) => posix.basename(url.split(\"?\")[0] ?? \"\"))\n .filter((file) => !available.has(file));\n}\n\n/**\n * How to move faces a page already ships into `global.css`.\n *\n * The `--font-*` token lives in `@theme` and governs every page; a page's own\n * `<style>` ships only with that page. So one page declaring the brand face\n * leaves the rest on a fallback — measured on a live client, the body font\n * painted on 1 page of 6. Adopting what is on disk beats downloading the same\n * family from a catalogue, which would hand that page a different build of the\n * face and change how it renders.\n *\n * A family two files declare DIFFERENTLY is refused rather than merged: one\n * global scope can hold only one mapping, so picking a winner would silently\n * repaint whichever page lost.\n */\nexport function planFontAdoption(\n sources: { path: string; source: string }[],\n families: string[],\n): { plans: AdoptionPlan[]; conflicts: { family: string; files: string[] }[] } {\n const wanted = new Map(families.map((family) => [normalizeFamily(family), family]));\n const byFamily = new Map<string, Map<string, string[]>>();\n\n for (const { path, source } of sources) {\n const dir = posix.dirname(path);\n for (const face of declaredFontFaces(source)) {\n if (!wanted.has(face.family)) continue;\n const perFile = byFamily.get(face.family) ?? new Map<string, string[]>();\n perFile.set(path, [...(perFile.get(path) ?? []), rebaseFontFaceSrc(face.block, dir)]);\n byFamily.set(face.family, perFile);\n }\n }\n\n const plans: AdoptionPlan[] = [];\n const conflicts: { family: string; files: string[] }[] = [];\n for (const [family, perFile] of byFamily) {\n const display = wanted.get(family) ?? family;\n const files = [...perFile.keys()];\n // Byte-identical declarations in two files are a copy-paste, not a\n // disagreement; differing ones cannot both survive one global scope.\n const shapes = new Set([...perFile.values()].map((blocks) => blocks.join(\"\\n\")));\n if (shapes.size > 1) {\n conflicts.push({ family: display, files });\n continue;\n }\n const blocks = perFile.get(files[0] ?? \"\") ?? [];\n const urls = blocks.flatMap((block) =>\n [...block.matchAll(/url\\(\\s*['\"]?([^'\")]+)['\"]?\\s*\\)/gi)].map((m) => m[1] ?? \"\"),\n );\n plans.push({ family: display, blocks, files, urls });\n }\n return { plans, conflicts };\n}\n\n/**\n * Every family Fontsource lists, for near-match suggestions. Empty if the call\n * fails — this only enriches an error that is already being reported, so an\n * unreachable catalogue costs a \"did you mean\" and must not replace the real\n * failure with its own.\n */\nexport async function fontsourceCatalogue(deps: Pick<ProviderDeps, \"fetchJson\">): Promise<string[]> {\n const body = await deps.fetchJson(`${FONTSOURCE_API}/fonts`).catch(() => null);\n if (!Array.isArray(body)) return [];\n return body\n .map((entry) => (typeof entry === \"object\" && entry !== null ? (entry as { family?: unknown }).family : null))\n .filter((family): family is string => typeof family === \"string\");\n}\n\nexport type GoogleFontRequest = { family: string; weights: number[] };\n\n/**\n * Weights in a `wght` axis spec. Handles the list (`400;700`), the italic tuple\n * (`ital,wght@0,400;1,700` — weight is last in each tuple) and the variable\n * range (`400..700`, which really does ship every step in between).\n */\nfunction parseWeightAxis(spec: string): number[] {\n const axis = spec.match(/wght@([^&]+)/i)?.[1] ?? \"\";\n const weights = new Set<number>();\n for (const tuple of axis.split(\";\")) {\n const last = tuple.split(\",\").pop()?.trim() ?? \"\";\n const range = last.match(/^(\\d{3})\\.\\.(\\d{3})$/);\n if (range) {\n for (let w = Number(range[1]); w <= Number(range[2]); w += 100) weights.add(w);\n } else if (/^\\d{3}$/.test(last)) {\n weights.add(Number(last));\n }\n }\n return [...weights].sort((a, b) => a - b);\n}\n\n/**\n * What a brand stylesheet ASKS Google for. This is only the request — whether\n * Google actually serves that family at that weight is a separate question, and\n * the whole reason `baker brand fonts check` exists.\n */\nexport function googleFontRequests(css: string): GoogleFontRequest[] {\n const out: GoogleFontRequest[] = [];\n // `;` must stay INSIDE the match: it separates weights (`wght@400;600`).\n // Quotes and `)` already terminate the URL in every form CSS allows.\n for (const link of String(css).matchAll(/fonts\\.googleapis\\.com\\/[^\\s\"')]+/gi)) {\n for (const param of link[0].matchAll(/[?&]family=([^&]+)/gi)) {\n const [namePart, ...specParts] = (param[1] ?? \"\").split(\":\");\n const family = decodeURIComponent((namePart ?? \"\").replaceAll(\"+\", \" \")).trim();\n if (!family) continue;\n out.push({ family, weights: parseWeightAxis(specParts.join(\":\")) });\n }\n }\n return out;\n}\n\n/**\n * Weights for `fonts fetch`: an explicit `--weights` flag wins, otherwise the\n * weights `global.css` already provides for that family, otherwise 400.\n *\n * `declared` is EMPTY — not undefined — when the family is imported without a\n * `wght` axis (`?family=Manrope&display=swap`), so the fallback has to test\n * length rather than nullishness or that import resolves to \"no weights at all\".\n *\n * A flag with nothing usable in it returns `[]` on purpose: the caller reports\n * that as a bad flag, which is a different failure from \"nothing declared\".\n */\nexport function resolveFetchWeights(flag: string | undefined, declared: number[] | undefined): number[] {\n if (flag) {\n return String(flag)\n .split(\",\")\n .map((w) => Number(w.trim()))\n .filter((w) => Number.isInteger(w) && w >= 100 && w <= 900);\n }\n return declared?.length ? declared : [400];\n}\n\n/** The subset a brand gets when nothing else says otherwise. */\nexport const DEFAULT_SUBSETS = [\"latin\"] as const;\n\n/**\n * Subsets for `fonts fetch`: an explicit `--subsets` flag wins, otherwise the\n * subsets `global.css` already self-hosts for that family, otherwise `latin`.\n *\n * The same rule as `resolveFetchWeights`, for the same reason. `fetch` replaces\n * the family's rules rather than adding to them, so defaulting a re-run to\n * `latin` deleted the latin-ext face an earlier `--subsets latin,latin-ext`\n * downloaded and orphaned its file — with nothing failing, because the family\n * is still resolved, while every accented character falls back to a system font.\n */\nexport function resolveFetchSubsets(flag: string | undefined, selfHosted: string[]): string[] {\n const asked = String(flag ?? \"\")\n .split(\",\")\n .map((subset) => subset.trim())\n .filter(Boolean);\n const named = flag ? [...new Set(asked)] : selfHosted;\n return named.length > 0 ? named : [...DEFAULT_SUBSETS];\n}\n\n/**\n * Styles for `fonts fetch`: `--italic` asks for both, and so does a stylesheet\n * that already self-hosts an italic for the family.\n *\n * Deliberately NOT symmetric with `--weights` and `--subsets`, which narrow. An\n * upright face is what the `--font-*` token resolves to, so it is never dropped;\n * and there is no `--no-italic`, because narrowing italics away is the silent\n * loss this whole path exists to prevent — deleting the rule is how you do that\n * on purpose.\n */\nexport function resolveFetchStyles(italic: boolean | undefined, selfHosted: readonly string[]): FontStyle[] {\n return italic || selfHosted.includes(\"italic\") ? [\"normal\", \"italic\"] : [\"normal\"];\n}\n\n/**\n * Google's `family=` value: spaces become `+`, weights become one sorted axis.\n *\n * Each whitespace-separated token is percent-encoded before the `+` join, so a\n * mistyped or pasted name carrying `&`, `#` or `=` fails cleanly instead of\n * corrupting the query — a bare `#` would otherwise truncate everything after\n * it, and Google would answer for the default weight as if all were fine.\n *\n * Asking for italic switches the whole spec to the two-axis TUPLE form\n * (`ital,wght@0,400;1,400`), and both orderings are load-bearing: axis names\n * must be alphabetical and tuples ascending. Measured — `wght,ital@400,0` is\n * NOT rejected, it answers 200 with the upright faces only, so getting the\n * order wrong looks exactly like a family with no italic.\n */\nexport function googleFontCssUrl(family: string, weights: number[], styles: readonly FontStyle[] = [\"normal\"]): string {\n const name = family.trim().split(/\\s+/).map(encodeURIComponent).join(\"+\");\n const sorted = [...new Set(weights)].sort((a, b) => a - b);\n if (sorted.length === 0) return `${GOOGLE_CSS2}?family=${name}&display=swap`;\n // The single-axis form stays byte-identical for an upright-only request, so\n // nothing that never asks for italic changes what it puts on the wire.\n const wanted = FONT_STYLES.filter((style) => styles.includes(style));\n const spec =\n wanted.length > 1\n ? `${name}:ital,wght@${wanted.flatMap((style) => sorted.map((w) => `${ITAL_AXIS[style]},${w}`)).join(\";\")}`\n : `${name}:wght@${sorted.join(\";\")}`;\n return `${GOOGLE_CSS2}?family=${spec}&display=swap`;\n}\n\n/** The weights Google Fonts exposes as discrete steps on the `wght` axis. */\nconst STANDARD_WEIGHTS = [100, 200, 300, 400, 500, 600, 700, 800, 900];\n\nexport type FontCheckResult = {\n family: string;\n requested: number[];\n served: number[];\n missing: number[];\n subsets: string[];\n /** Only set when the family/weight combination was rejected outright. */\n cause?: \"unknown-family\" | \"unavailable-weight\";\n};\n\nexport type FetchCss = (url: string) => Promise<string | null>;\n\n/**\n * Which of the standard weights Google really serves for a family, in ONE\n * request. Google refuses a request only when EVERY weight in it is missing, so\n * asking for all nine returns exactly the ones that exist.\n *\n * This used to fan out nine concurrent requests per family, on the belief that\n * the whole set would be rejected over one missing weight. It is not — and the\n * fan-out was what made it dangerous: a rapid series of requests is answered\n * **400**, indistinguishable here from \"Google does not serve this\", so a\n * three-family brand firing 27 requests could report a real family as unknown.\n * Runs only on the failure path, where the alternative is telling the agent to\n * re-run the command that just failed.\n */\nasync function probeServedWeights(family: string, fetchCss: FetchCss): Promise<number[]> {\n const css = await fetchCss(googleFontCssUrl(family, STANDARD_WEIGHTS));\n if (css === null) return [];\n return [...new Set(parseGoogleFontFaces(css).map((face) => face.weight))].sort((a, b) => a - b);\n}\n\n/**\n * Ask Google what it ACTUALLY serves for each family a stylesheet requests.\n *\n * `fetchCss` is injected so the whole decision table is testable without the\n * network. Every result carries `served` — including the failures, because\n * `check` is precisely the command an agent runs to learn which weights it may\n * use, and an error that omits them can only advise running `check` again.\n */\nexport async function checkFontRequests(requests: GoogleFontRequest[], fetchCss: FetchCss): Promise<FontCheckResult[]> {\n const results: FontCheckResult[] = [];\n for (const request of requests) {\n const css = await fetchCss(googleFontCssUrl(request.family, request.weights));\n if (css === null) {\n // A refusal means every weight asked for is missing, which is ambiguous:\n // wrong name, or a real family at other weights? Ask for all nine.\n const served = await probeServedWeights(request.family, fetchCss);\n results.push({\n family: request.family,\n requested: request.weights,\n served,\n missing: request.weights.filter((w) => !served.includes(w)),\n subsets: [],\n cause: served.length === 0 ? \"unknown-family\" : \"unavailable-weight\",\n });\n continue;\n }\n const faces = parseGoogleFontFaces(css);\n const served = [...new Set(faces.map((f) => f.weight))].sort((a, b) => a - b);\n results.push({\n family: request.family,\n requested: request.weights,\n served,\n missing: request.weights.filter((w) => !served.includes(w)),\n subsets: [...new Set(faces.map((f) => f.subset))],\n });\n }\n return results;\n}\n\n/**\n * Families that are a fallback stack, not a commitment — none of them names a\n * face that has to load. Mirrors `GENERIC_FAMILIES` in the scaffold's\n * `__tooling__/checks/sdk/theme-css.mjs`; the scaffold sits outside this pnpm\n * workspace so it cannot be imported, and `__tests__/theme-css-contract.test.ts`\n * is the seam that keeps the two sets identical.\n */\nexport const GENERIC_FAMILIES = new Set([\n \"sans-serif\",\n \"serif\",\n \"monospace\",\n \"cursive\",\n \"fantasy\",\n \"system-ui\",\n \"ui-sans-serif\",\n \"ui-serif\",\n \"ui-monospace\",\n \"ui-rounded\",\n \"arial\",\n \"helvetica\",\n \"georgia\",\n \"times\",\n \"courier\",\n \"inherit\",\n \"initial\",\n \"unset\",\n]);\n\n/**\n * Blank out comments while keeping every byte and newline in place, so an index\n * into the stripped copy still addresses the same character of the original.\n * `upsertFontFaceCss` depends on that: it finds ranges in the blanked copy and\n * splices them out of the real file.\n */\nexport function stripCssComments(css: string): string {\n return css.replace(/\\/\\*[\\s\\S]*?\\*\\//g, (block) => block.replace(/[^\\n]/g, \" \"));\n}\n\nfunction normalizeFamily(raw: string): string {\n return raw\n .trim()\n .replace(/^['\"]|['\"]$/g, \"\")\n .trim()\n .toLowerCase();\n}\n\n/** Families a local `@font-face` in this stylesheet actually provides. */\nfunction fontFaceFamilies(css: string): Set<string> {\n const out = new Set<string>();\n for (const rule of stripCssComments(css).matchAll(/@font-face\\s*\\{([^}]*)\\}/gi)) {\n const family = (rule[1] ?? \"\").match(/font-family\\s*:\\s*([^;]+)/i)?.[1];\n if (family) out.add(normalizeFamily(family));\n }\n return out;\n}\n\n/**\n * The weights one `@font-face` body declares.\n *\n * `font-weight: 100 900` on a variable face declares the WHOLE range — it is\n * what Google returns for `wght@100..900`, and what the scaffold's\n * `validate-brand-fonts` has always read it as. Taking the first number alone\n * resolved a re-fetch to `[100]`; since `fetch` replaces the family's rules,\n * that deleted 200-900 and left every heading rendering hairline.\n */\nfunction declaredWeights(body: string): number[] {\n const spec = (body.match(/font-weight\\s*:\\s*([^;}]+)/i)?.[1] ?? \"\").match(/\\d{3}/g) ?? [];\n if (spec.length !== 2) return spec.map(Number);\n const range: number[] = [];\n for (let w = Number(spec[0]); w <= Number(spec[1]); w += 100) range.push(w);\n return range;\n}\n\n/**\n * Weights the stylesheet already self-hosts for `family`.\n *\n * `fetch` puts the downloaded faces IN CHARGE of the family — it drops the\n * existing rules rather than adding to them — so with no `--weights` and no\n * Google import to read, a second run resolved to 400 alone, deleted the 700\n * rule and orphaned its file. Nothing caught it: the family is still resolved,\n * so `check` and the client's verify both stay green while every bold word on\n * the site renders as synthesized faux-bold. The first run is what removes the\n * import, so this is the second run of the documented recipe, not an edge case.\n */\nexport function selfHostedWeights(css: string, family: string): number[] {\n const target = normalizeFamily(family);\n const weights = new Set<number>();\n for (const rule of stripCssComments(css).matchAll(/@font-face\\s*\\{([^}]*)\\}/gi)) {\n const body = rule[1] ?? \"\";\n const declared = body.match(/font-family\\s*:\\s*([^;]+)/i)?.[1];\n if (!declared || normalizeFamily(declared) !== target) continue;\n for (const weight of declaredWeights(body)) weights.add(weight);\n }\n return [...weights].sort((a, b) => a - b);\n}\n\n/**\n * The subset segment of a file `fontFileName` produced, or null for any other\n * name — a hand-written face says nothing about which subset it covers.\n */\nfunction fontFileSubset(href: string): string | null {\n const file = posix.basename((href.split(\"?\")[0] ?? \"\").split(\"#\")[0] ?? \"\");\n return /^[A-Za-z0-9]+-[1-9]00(?:italic)?-([\\w-]+)\\.woff2$/.exec(file)?.[1] ?? null;\n}\n\n/**\n * Subsets the stylesheet already self-hosts for `family`.\n *\n * `selfHostedWeights`' other half, and it exists for the same failure: `fetch`\n * replaces the family's rules, so a re-run with no `--subsets` narrowed a family\n * an earlier `--subsets latin,latin-ext` had widened, dropping the latin-ext\n * rule and orphaning its file while every accented character fell back.\n *\n * Read from the file NAME rather than the rule, because a subset survives in\n * CSS only as its `unicode-range` and nothing maps that back to a name —\n * `fontFileName` puts it in the name, so the rules `fetch` wrote read back.\n * Anything else reports nothing and takes the default, exactly as before.\n */\nexport function selfHostedSubsets(css: string, family: string): string[] {\n const target = normalizeFamily(family);\n const subsets = new Set<string>();\n for (const rule of stripCssComments(css).matchAll(/@font-face\\s*\\{([^}]*)\\}/gi)) {\n const body = rule[1] ?? \"\";\n const declared = body.match(/font-family\\s*:\\s*([^;]+)/i)?.[1];\n if (!declared || normalizeFamily(declared) !== target) continue;\n for (const url of body.matchAll(/url\\(\\s*['\"]?([^'\")]+)['\"]?\\s*\\)/gi)) {\n const subset = fontFileSubset(url[1] ?? \"\");\n if (subset) subsets.add(subset);\n }\n }\n return [...subsets].sort();\n}\n\n/**\n * Styles the stylesheet already self-hosts for `family`.\n *\n * The third axis `fetch` has to read back, after weights and subsets, and the\n * one with the sharpest edge: an italic face is not something `fetch` can\n * rebuild from a flag it was not given, so a re-run that ignored it left the\n * rule pointing at a file nothing had refreshed.\n */\nexport function selfHostedStyles(css: string, family: string): string[] {\n const target = normalizeFamily(family);\n const styles = new Set<string>();\n for (const rule of stripCssComments(css).matchAll(/@font-face\\s*\\{([^}]*)\\}/gi)) {\n const body = rule[1] ?? \"\";\n const declared = body.match(/font-family\\s*:\\s*([^;]+)/i)?.[1];\n if (declared && normalizeFamily(declared) === target) styles.add(faceStyle(body));\n }\n return [...styles].sort();\n}\n\n/**\n * Families a stylesheet tries to load from an `@fontsource*` package.\n *\n * NOT a way to resolve a family. The package ships the `@font-face` rules, but\n * `package.json` and `pnpm-lock.yaml` are force-synced from a scaffold that\n * declares no @fontsource dependency — so the package is erased on the next sync,\n * the import resolves to nothing, and the build fails. Reported, never trusted.\n */\nexport function fontsourceFamilies(css: string): Set<string> {\n const out = new Set<string>();\n for (const imported of stripCssComments(css).matchAll(/@fontsource(-variable)?\\/([\\w-]+)/gi)) {\n const slug = imported[2];\n if (!slug) continue;\n // Verified against the published packages: `@fontsource/ibm-plex-mono`\n // registers \"IBM Plex Mono\", but `@fontsource-variable/inter` registers\n // \"Inter Variable\" — NOT \"Inter\". Dropping that suffix would clear a token\n // saying \"Inter\" that the package does not actually provide.\n out.add(`${slug.replaceAll(\"-\", \" \")}${imported[1] ? \" variable\" : \"\"}`.toLowerCase());\n }\n return out;\n}\n\n/**\n * The family as the stylesheet authored it, for a readable message.\n *\n * Quoted form first: an unquoted scan matches the first case-insensitive hit\n * anywhere, so `@import \"@fontsource-variable/inter\"` beat the `\"Inter\"` token\n * and the error named the family \"inter\".\n */\nfunction asAuthored(css: string, normalized: string): string {\n const escaped = normalized.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n const text = stripCssComments(css);\n return (\n text.match(new RegExp(`[\"']${escaped}[\"']`, \"i\"))?.[0]?.slice(1, -1) ??\n text.match(new RegExp(`(?<![\\\\w-])${escaped}(?![\\\\w-])`, \"i\"))?.[0] ??\n normalized\n );\n}\n\n/**\n * Brand faces committed by a `--font-*` token that nothing in the stylesheet\n * loads — no local `@font-face`, no Google Fonts import.\n *\n * This is the failure `baker brand fonts check` used to miss entirely. It only\n * ever looked at Google requests, so a stylesheet with no `@import` at all\n * answered `selfHosted: true` — claiming self-hosted when nothing hosted the\n * font. Measured across the fleet, 56 of 60 client repos have no Google import,\n * so that was the answer almost everyone got, and the only thing that caught it\n * was the scaffold validator at verify time, long after the brand was written.\n *\n * The token side is `parseBrandTokens` rather than another regex on purpose:\n * four independent copies of that pattern once read `--text-h1--font-weight: 700`\n * as a face called \"700\".\n *\n * An `@fontsource` import does not count as loading the family — the dependency\n * cannot survive a sync — so those families are reported here too. Same verdict\n * as the scaffold validator, which names that case specifically.\n */\nexport function unresolvedBrandFamilies(css: string): string[] {\n const declared = [...parseBrandTokens(css).fonts].filter((family) => !GENERIC_FAMILIES.has(family));\n // Local `@font-face` only. A font-CDN `@import` does not put a face on the\n // page here: Astro merges component CSS ahead of global.css into one inlined\n // `<style>`, so the import lands after rules and the browser drops it —\n // measured on an affected client's live site, which makes zero requests to\n // googleapis and renders body text at the generated fallback's exact width.\n const loaded = fontFaceFamilies(css);\n return declared.filter((family) => !loaded.has(family)).map((family) => asAuthored(css, family));\n}\n\n/**\n * Put `block` in charge of `family`: drop the stylesheet's existing faces for\n * it and insert the new ones above `@theme`, where Tailwind still reads the\n * token block. Idempotent, so re-fetching a family never stacks duplicates.\n *\n * `fonts fetch` used to return this block as a hint for the agent to paste by\n * hand. It downloaded the files either way, so a skipped paste left a repo with\n * fonts on disk and nothing loading them — one client had 44 font files and\n * zero `@font-face` rules.\n */\nexport function stripFontFaceBlocks(source: string, family: string, styles?: Set<string>): string {\n const target = normalizeFamily(family);\n const ranges: [number, number][] = [];\n // Ranges come from the comment-blanked copy, which is the same length as the\n // original — so a commented-out face is invisible here and survives untouched.\n for (const rule of stripCssComments(source).matchAll(/@font-face\\s*\\{([^}]*)\\}/gi)) {\n const body = rule[1] ?? \"\";\n const declared = body.match(/font-family\\s*:\\s*([^;]+)/i)?.[1];\n if (!declared || normalizeFamily(declared) !== target || rule.index === undefined) continue;\n if (styles && !styles.has(faceStyle(body))) continue;\n ranges.push([rule.index, rule.index + rule[0].length]);\n }\n let out = source;\n for (const [start, end] of ranges.reverse()) out = `${out.slice(0, start)}${out.slice(end)}`;\n return out.replace(/\\n{3,}/g, \"\\n\\n\");\n}\n\n/** A face's `font-style`, defaulting to what CSS means by its absence. */\nfunction faceStyle(body: string): string {\n return (\n body\n .match(/font-style\\s*:\\s*([\\w-]+)/i)?.[1]\n ?.trim()\n .toLowerCase() ?? \"normal\"\n );\n}\n\n/** The styles a replacement block covers — anything else it cannot stand in for. */\nfunction declaredStyles(block: string): Set<string> {\n const styles = new Set<string>();\n for (const rule of stripCssComments(block).matchAll(/@font-face\\s*\\{([^}]*)\\}/gi))\n styles.add(faceStyle(rule[1] ?? \"\"));\n return styles;\n}\n\nexport function upsertFontFaceCss(css: string, family: string, block: string): string {\n // Only the styles `block` actually covers are dropped. `fetch` emits nothing\n // but `font-style: normal` — Google is asked without an `ital` axis and\n // Fontsource is read at `.normal` — so clearing the family outright deleted\n // an italic rule it could not put back, orphaning its file and leaving every\n // italic word faux-obliqued while the family stayed resolved and verify green.\n const styles = declaredStyles(block);\n const out = stripFontFaceBlocks(css, family, styles.size > 0 ? styles : undefined);\n\n const themeAt = stripCssComments(out).search(/@theme\\b/);\n if (themeAt < 0) return `${out.trimEnd()}\\n\\n${block}\\n`;\n\n const head = out.slice(0, themeAt).trimEnd();\n const tail = out.slice(themeAt);\n return head ? `${head}\\n\\n${block}\\n\\n${tail}` : `${block}\\n\\n${tail}`;\n}\n"],"mappings":";;;;;AASA,SAAS,aAAa;AAGtB,IAAM,cAAc;AAyBb,SAAS,qBAAqB,KAA8B;AACjE,QAAM,QAAyB,CAAC;AAChC,QAAM,KAAK;AACX,aAAW,SAAS,OAAO,GAAG,EAAE,SAAS,EAAE,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EAAO,IAAI;AACtE;","names":["style","served","blocks"]}
@@ -0,0 +1,197 @@
1
+ import {
2
+ mediaTagsCreateRequestSchema,
3
+ mediaTagsDeleteRequestSchema,
4
+ mediaTagsUpdateRequestSchema
5
+ } from "./chunk-SMIENBNX.js";
6
+ import {
7
+ ApiError,
8
+ apiGet,
9
+ apiPost
10
+ } from "./chunk-HREWXNTO.js";
11
+ import {
12
+ registerSchema,
13
+ writeJson
14
+ } from "./chunk-WOTDHRNF.js";
15
+
16
+ // src/lib/tags-command.ts
17
+ import { defineCommand } from "citty";
18
+ var OUTPUT_ARG = {
19
+ output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
20
+ };
21
+ var SHARED_POOL_HINT = "Custom tags are one pool shared by images, videos and testimonials \u2014 this change shows up in all three. Already applied: publishing or discarding this chat does not undo it.";
22
+ function fail(err) {
23
+ const code = err instanceof ApiError ? err.code : "INTERNAL_ERROR";
24
+ const message = err instanceof ApiError ? err.message : "Unexpected error";
25
+ writeJson({ ok: false, error: { code, message } });
26
+ process.exit(1);
27
+ }
28
+ function failInvalid(issue) {
29
+ writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message: issue?.message ?? "Invalid request" } });
30
+ process.exit(1);
31
+ }
32
+ function makeTagsCommand(command, label, endpoint) {
33
+ registerSchema({
34
+ command: `${command}.tags.list`,
35
+ description: `List the available ${label} tag taxonomy (built-in defaults + this company's custom tags).`,
36
+ args: OUTPUT_ARG
37
+ });
38
+ const listCommand = defineCommand({
39
+ meta: {
40
+ name: "list",
41
+ description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
42
+ },
43
+ args: OUTPUT_ARG,
44
+ run: async ({ args }) => {
45
+ try {
46
+ const { markdown } = await apiGet(endpoint);
47
+ if (args.output === "json") {
48
+ writeJson({ ok: true, data: { markdown } });
49
+ return;
50
+ }
51
+ process.stdout.write(`${markdown.trimEnd()}
52
+ `);
53
+ } catch (err) {
54
+ const code = err instanceof ApiError ? err.code : "INTERNAL_ERROR";
55
+ const message = err instanceof ApiError ? err.message : "Unexpected error";
56
+ if (args.output === "json") {
57
+ writeJson({ ok: false, error: { code, message } });
58
+ } else {
59
+ process.stderr.write(`Error: ${message}
60
+ `);
61
+ }
62
+ process.exit(1);
63
+ }
64
+ }
65
+ });
66
+ const createArgs = {
67
+ name: { type: "positional", description: "Tag name (stored lowercased, spaces \u2192 hyphens)", required: true },
68
+ description: {
69
+ type: "string",
70
+ description: "What the tag means, so it gets applied consistently",
71
+ required: false
72
+ }
73
+ };
74
+ registerSchema({
75
+ command: `${command}.tags.create`,
76
+ description: "Create a custom media tag in the company's shared pool (images, videos and testimonials). Applies immediately. Use when no built-in or custom tag fits.",
77
+ args: {
78
+ name: { type: "string", description: "Tag name (stored lowercased, spaces \u2192 hyphens)", required: true },
79
+ description: createArgs.description
80
+ }
81
+ });
82
+ const createCommand = defineCommand({
83
+ meta: {
84
+ name: "create",
85
+ description: `Create a custom tag (shared by images, videos and testimonials). Applies immediately.
86
+
87
+ Example: baker ${command} tags create "summer sale" --description "Assets for the summer sale campaign"`
88
+ },
89
+ args: createArgs,
90
+ run: async ({ args }) => {
91
+ const parsed = mediaTagsCreateRequestSchema.safeParse({
92
+ name: String(args.name ?? ""),
93
+ ...args.description ? { description: String(args.description) } : {}
94
+ });
95
+ if (!parsed.success) failInvalid(parsed.error.issues[0]);
96
+ try {
97
+ const data = await apiPost("/api/media-tags/create", parsed.data);
98
+ writeJson({
99
+ ok: true,
100
+ data,
101
+ hints: [
102
+ SHARED_POOL_HINT,
103
+ `Use it as \`--tags ${data.name}\`.`,
104
+ ...data.description ? [] : ["MISSING --description: add one with `tags update` so the tag is applied consistently."]
105
+ ]
106
+ });
107
+ } catch (err) {
108
+ fail(err);
109
+ }
110
+ }
111
+ });
112
+ registerSchema({
113
+ command: `${command}.tags.update`,
114
+ description: "Change what a custom tag means (its description). Built-in tags cannot be changed. Applies immediately.",
115
+ args: {
116
+ slug: { type: "string", description: "Custom tag name, as `tags` lists it", required: true },
117
+ description: { type: "string", description: "New description", required: true }
118
+ }
119
+ });
120
+ const updateCommand = defineCommand({
121
+ meta: {
122
+ name: "update",
123
+ description: `Change a custom tag's description. Built-in tags cannot be changed. Applies immediately.
124
+
125
+ Example: baker ${command} tags update summer-sale --description "Assets for the 2026 summer sale"`
126
+ },
127
+ args: {
128
+ slug: { type: "positional", description: "Custom tag name, as `tags` lists it", required: true },
129
+ description: { type: "string", description: "New description", required: true }
130
+ },
131
+ run: async ({ args }) => {
132
+ const parsed = mediaTagsUpdateRequestSchema.safeParse({
133
+ slug: String(args.slug ?? ""),
134
+ description: String(args.description ?? "")
135
+ });
136
+ if (!parsed.success) failInvalid(parsed.error.issues[0]);
137
+ try {
138
+ const data = await apiPost("/api/media-tags/update", parsed.data);
139
+ writeJson({ ok: true, data, hints: [SHARED_POOL_HINT] });
140
+ } catch (err) {
141
+ fail(err);
142
+ }
143
+ }
144
+ });
145
+ registerSchema({
146
+ command: `${command}.tags.delete`,
147
+ description: "Delete a custom tag from the company's shared pool. Built-in tags cannot be deleted. Applies immediately. Confirm with the user first.",
148
+ args: { slug: { type: "string", description: "Custom tag name, as `tags` lists it", required: true } }
149
+ });
150
+ const deleteCommand = defineCommand({
151
+ meta: {
152
+ name: "delete",
153
+ description: `Delete a custom tag (shared by images, videos and testimonials). Built-in tags cannot be deleted. Applies immediately \u2014 confirm with the user first.
154
+
155
+ Example: baker ${command} tags delete summer-sale`
156
+ },
157
+ args: { slug: { type: "positional", description: "Custom tag name, as `tags` lists it", required: true } },
158
+ run: async ({ args }) => {
159
+ const parsed = mediaTagsDeleteRequestSchema.safeParse({ slug: String(args.slug ?? "") });
160
+ if (!parsed.success) failInvalid(parsed.error.issues[0]);
161
+ try {
162
+ const data = await apiPost("/api/media-tags/delete", parsed.data);
163
+ writeJson({ ok: true, data, hints: [SHARED_POOL_HINT] });
164
+ } catch (err) {
165
+ fail(err);
166
+ }
167
+ }
168
+ });
169
+ return defineCommand({
170
+ meta: {
171
+ name: "tags",
172
+ description: `The ${label} tag taxonomy: built-in defaults plus the company's custom tags (one pool shared by images, videos and testimonials). Subcommands: list (default), create, update, delete.
173
+
174
+ Examples:
175
+ baker ${command} tags # list available tags
176
+ baker ${command} tags create "summer sale" --description "\u2026"
177
+ baker ${command} tags update summer-sale --description "\u2026"
178
+ baker ${command} tags delete summer-sale`
179
+ },
180
+ // Declared on the parent too: `default: "list"` dispatches the bare `tags --output json`
181
+ // form, and citty reads an undeclared flag's value as a subcommand name.
182
+ args: OUTPUT_ARG,
183
+ subCommands: {
184
+ list: listCommand,
185
+ create: createCommand,
186
+ update: updateCommand,
187
+ delete: deleteCommand
188
+ },
189
+ // `default`, never `run`: citty falls through to the parent's `run` after a subcommand.
190
+ default: "list"
191
+ });
192
+ }
193
+
194
+ export {
195
+ makeTagsCommand
196
+ };
197
+ //# sourceMappingURL=chunk-N3XJ434P.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/tags-command.ts"],"sourcesContent":["import type { MediaTagsCreateResponse, MediaTagsDeleteResponse, MediaTagsUpdateResponse } from \"@baker/api\";\nimport { mediaTagsCreateRequestSchema, mediaTagsDeleteRequestSchema, mediaTagsUpdateRequestSchema } from \"@baker/api\";\nimport { defineCommand } from \"citty\";\nimport { ApiError, apiGet, apiPost } from \"../client.ts\";\nimport { writeJson } from \"../output.ts\";\nimport { registerSchema } from \"../schemas.ts\";\n\nconst OUTPUT_ARG = {\n output: { type: \"string\", description: \"Output format: md|json\", required: false, default: \"md\" },\n} as const;\n\n/** The custom tags are one pool for the whole company, whichever family the agent reached them from. */\nconst SHARED_POOL_HINT =\n \"Custom tags are one pool shared by images, videos and testimonials — this change shows up in all three. Already applied: publishing or discarding this chat does not undo it.\";\n\nfunction fail(err: unknown): never {\n const code = err instanceof ApiError ? err.code : \"INTERNAL_ERROR\";\n const message = err instanceof ApiError ? err.message : \"Unexpected error\";\n writeJson({ ok: false, error: { code, message } });\n process.exit(1);\n}\n\nfunction failInvalid(issue: { message: string } | undefined): never {\n writeJson({ ok: false, error: { code: \"VALIDATION_ERROR\", message: issue?.message ?? \"Invalid request\" } });\n process.exit(1);\n}\n\n/**\n * Builds `baker <command> tags` for one media type: `list` (the default, so the\n * bare `baker images tags` keeps printing the taxonomy) plus `create`, `update`\n * and `delete` for the company's custom tags.\n *\n * `command` is the plural CLI noun used for the schema id and example\n * (`images` → `images.tags.list`); `label` is the singular noun used in prose.\n *\n * Errors from `list` in the default markdown mode are written to STDERR, not\n * stdout. It is inlined into the library skills via `!`baker images tags``, so\n * a JSON error blob on stdout would be silently injected into the agent's skill\n * context as if it were the tag list. `--output json` keeps the machine-readable\n * envelope on stdout for programmatic callers.\n */\nexport function makeTagsCommand(command: string, label: string, endpoint: string) {\n registerSchema({\n command: `${command}.tags.list`,\n description: `List the available ${label} tag taxonomy (built-in defaults + this company's custom tags).`,\n args: OUTPUT_ARG,\n });\n\n const listCommand = defineCommand({\n meta: {\n name: \"list\",\n description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`,\n },\n args: OUTPUT_ARG,\n run: async ({ args }) => {\n try {\n const { markdown } = await apiGet<{ markdown: string }>(endpoint);\n if (args.output === \"json\") {\n writeJson({ ok: true, data: { markdown } });\n return;\n }\n process.stdout.write(`${markdown.trimEnd()}\\n`);\n } catch (err) {\n const code = err instanceof ApiError ? err.code : \"INTERNAL_ERROR\";\n const message = err instanceof ApiError ? err.message : \"Unexpected error\";\n if (args.output === \"json\") {\n writeJson({ ok: false, error: { code, message } });\n } else {\n process.stderr.write(`Error: ${message}\\n`);\n }\n process.exit(1);\n }\n },\n });\n\n const createArgs = {\n name: { type: \"positional\", description: \"Tag name (stored lowercased, spaces → hyphens)\", required: true },\n description: {\n type: \"string\",\n description: \"What the tag means, so it gets applied consistently\",\n required: false,\n },\n } as const;\n\n registerSchema({\n command: `${command}.tags.create`,\n description:\n \"Create a custom media tag in the company's shared pool (images, videos and testimonials). Applies immediately. Use when no built-in or custom tag fits.\",\n args: {\n name: { type: \"string\", description: \"Tag name (stored lowercased, spaces → hyphens)\", required: true },\n description: createArgs.description,\n },\n });\n\n const createCommand = defineCommand({\n meta: {\n name: \"create\",\n description: `Create a custom tag (shared by images, videos and testimonials). Applies immediately.\\n\\nExample: baker ${command} tags create \"summer sale\" --description \"Assets for the summer sale campaign\"`,\n },\n args: createArgs,\n run: async ({ args }) => {\n const parsed = mediaTagsCreateRequestSchema.safeParse({\n name: String(args.name ?? \"\"),\n ...(args.description ? { description: String(args.description) } : {}),\n });\n if (!parsed.success) failInvalid(parsed.error.issues[0]);\n try {\n const data = await apiPost<MediaTagsCreateResponse>(\"/api/media-tags/create\", parsed.data);\n writeJson({\n ok: true,\n data,\n hints: [\n SHARED_POOL_HINT,\n `Use it as \\`--tags ${data.name}\\`.`,\n ...(data.description\n ? []\n : [\"MISSING --description: add one with `tags update` so the tag is applied consistently.\"]),\n ],\n });\n } catch (err) {\n fail(err);\n }\n },\n });\n\n registerSchema({\n command: `${command}.tags.update`,\n description:\n \"Change what a custom tag means (its description). Built-in tags cannot be changed. Applies immediately.\",\n args: {\n slug: { type: \"string\", description: \"Custom tag name, as `tags` lists it\", required: true },\n description: { type: \"string\", description: \"New description\", required: true },\n },\n });\n\n const updateCommand = defineCommand({\n meta: {\n name: \"update\",\n description: `Change a custom tag's description. Built-in tags cannot be changed. Applies immediately.\\n\\nExample: baker ${command} tags update summer-sale --description \"Assets for the 2026 summer sale\"`,\n },\n args: {\n slug: { type: \"positional\", description: \"Custom tag name, as `tags` lists it\", required: true },\n description: { type: \"string\", description: \"New description\", required: true },\n },\n run: async ({ args }) => {\n const parsed = mediaTagsUpdateRequestSchema.safeParse({\n slug: String(args.slug ?? \"\"),\n description: String(args.description ?? \"\"),\n });\n if (!parsed.success) failInvalid(parsed.error.issues[0]);\n try {\n const data = await apiPost<MediaTagsUpdateResponse>(\"/api/media-tags/update\", parsed.data);\n writeJson({ ok: true, data, hints: [SHARED_POOL_HINT] });\n } catch (err) {\n fail(err);\n }\n },\n });\n\n registerSchema({\n command: `${command}.tags.delete`,\n description:\n \"Delete a custom tag from the company's shared pool. Built-in tags cannot be deleted. Applies immediately. Confirm with the user first.\",\n args: { slug: { type: \"string\", description: \"Custom tag name, as `tags` lists it\", required: true } },\n });\n\n const deleteCommand = defineCommand({\n meta: {\n name: \"delete\",\n description: `Delete a custom tag (shared by images, videos and testimonials). Built-in tags cannot be deleted. Applies immediately — confirm with the user first.\\n\\nExample: baker ${command} tags delete summer-sale`,\n },\n args: { slug: { type: \"positional\", description: \"Custom tag name, as `tags` lists it\", required: true } },\n run: async ({ args }) => {\n const parsed = mediaTagsDeleteRequestSchema.safeParse({ slug: String(args.slug ?? \"\") });\n if (!parsed.success) failInvalid(parsed.error.issues[0]);\n try {\n const data = await apiPost<MediaTagsDeleteResponse>(\"/api/media-tags/delete\", parsed.data);\n writeJson({ ok: true, data, hints: [SHARED_POOL_HINT] });\n } catch (err) {\n fail(err);\n }\n },\n });\n\n return defineCommand({\n meta: {\n name: \"tags\",\n description: `The ${label} tag taxonomy: built-in defaults plus the company's custom tags (one pool shared by images, videos and testimonials). Subcommands: list (default), create, update, delete.\n\nExamples:\n baker ${command} tags # list available tags\n baker ${command} tags create \"summer sale\" --description \"…\"\n baker ${command} tags update summer-sale --description \"…\"\n baker ${command} tags delete summer-sale`,\n },\n // Declared on the parent too: `default: \"list\"` dispatches the bare `tags --output json`\n // form, and citty reads an undeclared flag's value as a subcommand name.\n args: OUTPUT_ARG,\n subCommands: {\n list: listCommand,\n create: createCommand,\n update: updateCommand,\n delete: deleteCommand,\n },\n // `default`, never `run`: citty falls through to the parent's `run` after a subcommand.\n default: \"list\",\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,SAAS,qBAAqB;AAK9B,IAAM,aAAa;AAAA,EACjB,QAAQ,EAAE,MAAM,UAAU,aAAa,0BAA0B,UAAU,OAAO,SAAS,KAAK;AAClG;AAGA,IAAM,mBACJ;AAEF,SAA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,KAAK,OAAO,EAAE,KAAK,MAAM;AACvB,YAAM,SAAS,6BAA6B,UAAU,EAAE,MAAM,OAAO,KAAK,QAAQ,EAAE,EAAE,CAAC;AACvF,UAAI,CAAC,OAAO,QAAS,aAAY,OAAO,MAAM,OAAO,CAAC,CAAC;AACvD,UAAI;AACF,cAAM,OAAO,MAAM,QAAiC,0BAA0B,OAAO,IAAI;AACzF,kBAAU,EAAE,IAAI,MAAM,MAAM,OAAO,CAAC,gBAAgB,EAAE,CAAC;AAAA,MACzD,SAAS,KAAK;AACZ,aAAK,GAAG;AAAA,MACV;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAO,cAAc;AAAA,IACnB,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aAAa,OAAO,KAAK;AAAA;AAAA;AAAA,UAGrB,OAAO;AAAA,UACP,OAAO;AAAA,UACP,OAAO;AAAA,UACP,OAAO;AAAA,IACb;AAAA;AAAA;AAAA,IAGA,MAAM;AAAA,IACN,aAAa;AAAA,MACX,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA;AAAA,IAEA,SAAS;AAAA,EACX,CAAC;AACH;","names":[]}
@@ -0,0 +1,77 @@
1
+ import {
2
+ classifyAudience
3
+ } from "./chunk-5HYSKH77.js";
4
+
5
+ // src/audience-names.ts
6
+ var BUYERS_QUESTION = `\`name\` is the name an advertiser gave a custom audience in their Meta ad account, in any language. Is it made of people who have already bought from the brand: purchasers, paying customers, clients, a customer list? People who only visited, engaged, signed up, started a checkout or are leads or prospects have not bought. A lookalike of buyers is not buyers.`;
7
+ var BUYERS_HELD = 0.42;
8
+ var LOOKALIKE_QUESTION = `\`name\` is the name an advertiser gave a custom audience in their Meta ad account, in any language. Is it a lookalike audience: new people Meta finds because they resemble a seed audience (often named "Lookalike (GB, 1%)", "LAL 3%", "Similar to\u2026")?`;
9
+ var LOOKALIKE_HELD = 0.4;
10
+ async function readAudienceNames(names, ask) {
11
+ const distinct = [...new Set(names.map((n) => n.trim()).filter(Boolean))];
12
+ if (distinct.length === 0) return () => void 0;
13
+ const answers = await ask(
14
+ distinct.flatMap((name) => [
15
+ { instructions: { name, question: BUYERS_QUESTION } },
16
+ { instructions: { name, question: LOOKALIKE_QUESTION } }
17
+ ])
18
+ );
19
+ if (answers === null) return () => void 0;
20
+ const read = new Map(
21
+ distinct.map((name, i) => [
22
+ name,
23
+ { buyers: (answers[2 * i] ?? 0) >= BUYERS_HELD, lookalike: (answers[2 * i + 1] ?? 0) >= LOOKALIKE_HELD }
24
+ ])
25
+ );
26
+ return (name) => read.get(name.trim());
27
+ }
28
+
29
+ // src/commands/ads/meta/adset-viewers.ts
30
+ function adSetViewerRows(adSets, audiences, campaigns, readName) {
31
+ const campaignById = new Map(campaigns.map((campaign) => [campaign.id, campaign]));
32
+ return adSets.map((adSet) => ({
33
+ id: adSet.id,
34
+ name: adSet.name,
35
+ campaign_id: adSet.campaign_id,
36
+ effective_status: adSet.effective_status,
37
+ viewer: classifyAudience(adSet, audiences, campaignById.get(adSet.campaign_id), readName)
38
+ }));
39
+ }
40
+ var VIEWER_TABLE_COLUMNS = [
41
+ "id",
42
+ "name",
43
+ "effective_status",
44
+ "temperature",
45
+ "knows",
46
+ "placements",
47
+ "why"
48
+ ];
49
+ function flattenViewerRows(rows) {
50
+ return rows.map(({ viewer, ...row }) => ({
51
+ id: row.id,
52
+ name: row.name,
53
+ effective_status: row.effective_status,
54
+ temperature: viewer.temperature,
55
+ knows: viewer.knows.length > 0 ? viewer.knows.join(", ") : "nothing yet",
56
+ placements: viewer.placements.join(", "),
57
+ why: viewer.reasons.join(" ")
58
+ }));
59
+ }
60
+ function audienceNamesOf(adSets, audiences) {
61
+ const refs = adSets.flatMap((adSet) => {
62
+ const targeting = adSet.targeting ?? {};
63
+ return [targeting.custom_audiences, targeting.excluded_custom_audiences].flatMap(
64
+ (list) => Array.isArray(list) ? list.map((ref) => ref?.name) : []
65
+ );
66
+ });
67
+ return [...refs, ...audiences.map((a) => a.name)].filter((n) => typeof n === "string" && n.length > 0);
68
+ }
69
+
70
+ export {
71
+ readAudienceNames,
72
+ adSetViewerRows,
73
+ VIEWER_TABLE_COLUMNS,
74
+ flattenViewerRows,
75
+ audienceNamesOf
76
+ };
77
+ //# sourceMappingURL=chunk-NFSLRRIE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/audience-names.ts","../src/commands/ads/meta/adset-viewers.ts"],"sourcesContent":["/**\n * What a Meta custom audience's name says its members are, read by the decision model (Jev) in\n * the advertiser's own language: buyers (\"Compradores 180d\", \"Kunden-Liste\", \"購入者\"), or a\n * lookalike of a seed. It replaced a regex of the words for \"buyer\" in five languages, which read\n * \"Clientes potenciales\" (leads) as buyers and missed every other language. Thresholds were\n * measured on scripts/audience-names-evals (docs/decision-model.md).\n */\nimport type { AskNouls } from \"./engine/lib/remembered-nouls.ts\";\nimport type { AudienceNameReading } from \"./viewer-profile.ts\";\n\nexport const BUYERS_QUESTION = `\\`name\\` is the name an advertiser gave a custom audience in their Meta ad account, in any language. Is it made of people who have already bought from the brand: purchasers, paying customers, clients, a customer list? People who only visited, engaged, signed up, started a checkout or are leads or prospects have not bought. A lookalike of buyers is not buyers.`;\nconst BUYERS_HELD = 0.42;\n\nexport const LOOKALIKE_QUESTION = `\\`name\\` is the name an advertiser gave a custom audience in their Meta ad account, in any language. Is it a lookalike audience: new people Meta finds because they resemble a seed audience (often named \"Lookalike (GB, 1%)\", \"LAL 3%\", \"Similar to…\")?`;\nconst LOOKALIKE_HELD = 0.4;\n\n/** Each name's reading, in one request; undefined for every name when the model could not answer. */\nexport async function readAudienceNames(names: readonly string[], ask: AskNouls): Promise<AudienceNameReading> {\n const distinct = [...new Set(names.map((n) => n.trim()).filter(Boolean))];\n if (distinct.length === 0) return () => undefined;\n const answers = await ask(\n distinct.flatMap((name) => [\n { instructions: { name, question: BUYERS_QUESTION } },\n { instructions: { name, question: LOOKALIKE_QUESTION } },\n ]),\n );\n if (answers === null) return () => undefined;\n const read = new Map(\n distinct.map((name, i) => [\n name,\n { buyers: (answers[2 * i] ?? 0) >= BUYERS_HELD, lookalike: (answers[2 * i + 1] ?? 0) >= LOOKALIKE_HELD },\n ]),\n );\n return (name) => read.get(name.trim());\n}\n","import {\n type AudienceNameReading,\n type CustomAudienceInput,\n classifyAudience,\n type ViewerProfile,\n} from \"../../../viewer-profile.ts\";\n\ntype MetaRow = Record<string, unknown>;\n\nexport interface AdSetViewerRow {\n id: unknown;\n name: unknown;\n campaign_id: unknown;\n effective_status: unknown;\n viewer: ViewerProfile;\n}\n\n/**\n * `baker ads meta adsets --audience`: who each ad set reaches, read off its own\n * targeting, the account's audience list (for each audience's subtype) and its\n * campaign's objective, and what each audience's name says its members are\n * (`readAudienceNames`; read by subtype alone without it). The row keeps only\n * what names the ad set, so the viewer is the one thing it adds.\n */\nexport function adSetViewerRows(\n adSets: readonly MetaRow[],\n audiences: readonly CustomAudienceInput[],\n campaigns: readonly MetaRow[],\n readName?: AudienceNameReading,\n): AdSetViewerRow[] {\n const campaignById = new Map(campaigns.map((campaign) => [campaign.id, campaign]));\n return adSets.map((adSet) => ({\n id: adSet.id,\n name: adSet.name,\n campaign_id: adSet.campaign_id,\n effective_status: adSet.effective_status,\n viewer: classifyAudience(adSet, audiences, campaignById.get(adSet.campaign_id), readName),\n }));\n}\n\nexport const VIEWER_TABLE_COLUMNS = [\n \"id\",\n \"name\",\n \"effective_status\",\n \"temperature\",\n \"knows\",\n \"placements\",\n \"why\",\n] as const;\n\n/** The table and csv writers print one scalar per cell, so the viewer is spelled out column by column. */\nexport function flattenViewerRows(rows: readonly AdSetViewerRow[]): Array<Record<string, unknown>> {\n return rows.map(({ viewer, ...row }) => ({\n id: row.id,\n name: row.name,\n effective_status: row.effective_status,\n temperature: viewer.temperature,\n knows: viewer.knows.length > 0 ? viewer.knows.join(\", \") : \"nothing yet\",\n placements: viewer.placements.join(\", \"),\n why: viewer.reasons.join(\" \"),\n }));\n}\n\n/** Every audience name an ad set includes or excludes, and every name in the account's list. Pure. */\nexport function audienceNamesOf(adSets: readonly MetaRow[], audiences: readonly CustomAudienceInput[]): string[] {\n const refs = adSets.flatMap((adSet) => {\n const targeting = (adSet.targeting ?? {}) as Record<string, unknown>;\n return [targeting.custom_audiences, targeting.excluded_custom_audiences].flatMap((list) =>\n Array.isArray(list) ? list.map((ref) => (ref as { name?: unknown })?.name) : [],\n );\n });\n return [...refs, ...audiences.map((a) => a.name)].filter((n): n is string => typeof n === \"string\" && n.length > 0);\n}\n"],"mappings":";;;;;AAUO,IAAM,kBAAkB;AAC/B,IAAM,cAAc;AAEb,IAAM,qBAAqB;AAClC,IAAM,iBAAiB;AAGvB,eAAsB,kBAAkB,OAA0B,KAA6C;AAC7G,QAAM,WAAW,CAAC,GAAG,IAAI,IAAI,MAAM,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,OAAO,CAAC,CAAC;AACxE,MAAI,SAAS,WAAW,EAAG,QAAO,MAAM;AACxC,QAAM,UAAU,MAAM;AAAA,IACpB,SAAS,QAAQ,CAAC,SAAS;AAAA,MACzB,EAAE,cAAc,EAAE,MAAM,UAAU,gBAAgB,EAAE;AAAA,MACpD,EAAE,cAAc,EAAE,MAAM,UAAU,mBAAmB,EAAE;AAAA,IACzD,CAAC;AAAA,EACH;AACA,MAAI,YAAY,KAAM,QAAO,MAAM;AACnC,QAAM,OAAO,IAAI;AAAA,IACf,SAAS,IAAI,CAAC,MAAM,MAAM;AAAA,MACxB;AAAA,MACA,EAAE,SAAS,QAAQ,IAAI,CAAC,KAAK,MAAM,aAAa,YAAY,QAAQ,IAAI,IAAI,CAAC,KAAK,MAAM,eAAe;AAAA,IACzG,CAAC;AAAA,EACH;AACA,SAAO,CAAC,SAAS,KAAK,IAAI,KAAK,KAAK,CAAC;AACvC;;;ACVO,SAAS,gBACd,QACA,WACA,WACA,UACkB;AAClB,QAAM,eAAe,IAAI,IAAI,UAAU,IAAI,CAAC,aAAa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_PREFIX
3
+ } from "./chunk-66USKCVY.js";
4
+
5
+ // src/commands/canvas/node-preview.ts
6
+ var MAX_PARAMS_PREVIEW_LENGTH = 4e3;
7
+ var SPEC_KEYS = [
8
+ "model",
9
+ "aspect_ratio",
10
+ "image_size",
11
+ "resolution",
12
+ "duration",
13
+ "subject_type",
14
+ "font_size",
15
+ "expect",
16
+ "source",
17
+ "path",
18
+ "url"
19
+ ];
20
+ var BODY_KEYS = ["prompt", "text", "subject_description"];
21
+ function scalarField(params, key) {
22
+ const value = params[key];
23
+ if (typeof value === "number") return String(value);
24
+ if (typeof value !== "string") return void 0;
25
+ const trimmed = value.trim();
26
+ return trimmed && !trimmed.startsWith(REF_PREFIX) ? trimmed : void 0;
27
+ }
28
+ function compactJson(params) {
29
+ try {
30
+ const json = JSON.stringify(params);
31
+ return json && json !== "{}" ? json : void 0;
32
+ } catch {
33
+ return void 0;
34
+ }
35
+ }
36
+ function cap(text) {
37
+ return text.length > MAX_PARAMS_PREVIEW_LENGTH ? `${text.slice(0, MAX_PARAMS_PREVIEW_LENGTH - 1)}\u2026` : text;
38
+ }
39
+ function nodeParamsPreview(params, deps) {
40
+ const refsLine = deps && deps.length > 0 ? `refs: ${deps.join(", ")}` : void 0;
41
+ if (!params || typeof params !== "object") return refsLine;
42
+ const record = params;
43
+ const spec = [];
44
+ for (const key of SPEC_KEYS) {
45
+ const value = scalarField(record, key);
46
+ if (value !== void 0) spec.push(`${key}: ${value}`);
47
+ }
48
+ if (refsLine) spec.push(refsLine);
49
+ const body = BODY_KEYS.map((key) => scalarField(record, key)).find(Boolean);
50
+ const header = spec.join("\n");
51
+ const composed = header && body ? `${header}
52
+
53
+ ${body}` : header || body || compactJson(record);
54
+ return composed ? cap(composed) : void 0;
55
+ }
56
+
57
+ export {
58
+ nodeParamsPreview
59
+ };
60
+ //# sourceMappingURL=chunk-NHU33T2S.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/canvas/node-preview.ts"],"sourcesContent":["import { REF_PREFIX } from \"../../engine/schema/canvas.ts\";\n\n// Mirrors the backend's runNodeSchema / definitionGraph paramsPreview cap — an\n// over-long preview would 400 the whole record.\nconst MAX_PARAMS_PREVIEW_LENGTH = 4000;\n\n// Scalar params worth showing as their own labeled line in a node's detail — the\n// \"what settings produced this\" a reviewer asks for: the model, the aspect ratio,\n// the image size, an ingest's expected format and where it pulls from. Ordered\n// most-identifying first so the graph card's 2-line clamp surfaces the model/format\n// and the inspector shows the full set.\nconst SPEC_KEYS = [\n \"model\",\n \"aspect_ratio\",\n \"image_size\",\n \"resolution\",\n \"duration\",\n \"subject_type\",\n \"font_size\",\n \"expect\",\n \"source\",\n \"path\",\n \"url\",\n] as const;\n\n// The longer free-text a node is recognized by, shown as the body under the spec\n// lines (a generator's prompt, a specimen's copy, a sheet's subject brief).\nconst BODY_KEYS = [\"prompt\", \"text\", \"subject_description\"] as const;\n\n/** A trimmed string or a number as text — never a `$ref:` wiring string (the deps line carries those). */\nfunction scalarField(params: Record<string, unknown>, key: string): string | undefined {\n const value = params[key];\n if (typeof value === \"number\") return String(value);\n if (typeof value !== \"string\") return undefined;\n const trimmed = value.trim();\n return trimmed && !trimmed.startsWith(REF_PREFIX) ? trimmed : undefined;\n}\n\nfunction compactJson(params: unknown): string | undefined {\n try {\n const json = JSON.stringify(params);\n return json && json !== \"{}\" ? json : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction cap(text: string): string {\n return text.length > MAX_PARAMS_PREVIEW_LENGTH ? `${text.slice(0, MAX_PARAMS_PREVIEW_LENGTH - 1)}…` : text;\n}\n\n/**\n * A structured, multi-line excerpt of a node's params for the graph card and its\n * inspector: labeled spec lines (model / aspect_ratio / image_size / expect / …),\n * a `refs:` line naming the upstream nodes it consumes (the \"props\" wired into a\n * generate, taken from the resolved `$ref` deps), then the free-text body (prompt,\n * specimen copy, subject brief). This is what surfaces \"the model, the aspect ratio,\n * the size, everything\" in the dashboard instead of just a bare prompt line. Falls\n * back to compact JSON for a node with no recognized field, or just the `refs:` line\n * when params are absent but deps exist.\n */\nexport function nodeParamsPreview(params: unknown, deps?: readonly string[]): string | undefined {\n const refsLine = deps && deps.length > 0 ? `refs: ${deps.join(\", \")}` : undefined;\n if (!params || typeof params !== \"object\") return refsLine;\n\n const record = params as Record<string, unknown>;\n const spec: string[] = [];\n for (const key of SPEC_KEYS) {\n const value = scalarField(record, key);\n if (value !== undefined) spec.push(`${key}: ${value}`);\n }\n if (refsLine) spec.push(refsLine);\n\n const body = BODY_KEYS.map((key) => scalarField(record, key)).find(Boolean);\n const header = spec.join(\"\\n\");\n const composed = header && body ? `${header}\\n\\n${body}` : header || body || compactJson(record);\n return composed ? cap(composed) : undefined;\n}\n"],"mappings":";;;;;AAIA,IAAM,4BAA4B;AAOlC,IAAM,YAAY;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAIA,IAAM,YAAY,CAAC,UAAU,QAAQ,qBAAqB;AAG1D,SAAS,YAAY,QAAiC,KAAiC;AACrF,QAAM,QAAQ,OAAO,GAAG;AACxB,MAAI,OAAO,UAAU,SAAU,QAAO,OAAO,KAAK;AAClD,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,QAAM,UAAU,MAAM,KAAK;AAC3B,SAAO,WAAW,CAAC,QAAQ,WAAW,UAAU,IAAI,UAAU;AAChE;AAEA,SAAS,YAAY,QAAqC;AACxD,MAAI;AACF,UAAM,OAAO,KAAK,UAAU,MAAM;AAClC,WAAO,QAAQ,SAAS,OAAO,OAAO;AAAA,EACxC,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,SAAS,IAAI,MAAsB;AACjC,SAAO,KAAK,SAAS,4BAA4B,GAAG,KAAK,MAAM,GAAG,4BAA4B,CAAC,CAAC,WAAM;AACxG;AAYO,SAAS,kBAAkB,QAAiB,MAA8C;AAC/F,QAAM,WAAW,QAAQ,KAAK,SAAS,IAAI,SAAS,KAAK,KAAK,IAAI,CAAC,KAAK;AACxE,MAAI,CAAC,UAAU,OAAO,WAAW,SAAU,QAAO;AAElD,QAAM,SAAS;AACf,QAAM,OAAiB,CAAC;AACxB,aAAW,OAAO,WAAW;AAC3B,UAAM,QAAQ,YAAY,QAAQ,GAAG;AACrC,QAAI,UAAU,OAAW,MAAK,KAAK,GAAG,GAAG,KAAK,KAAK,EAAE;AAAA,EACvD;AACA,MAAI,SAAU,MAAK,KAAK,QAAQ;AAEhC,QAAM,OAAO,UAAU,IAAI,CAAC,QAAQ,YAAY,QAAQ,GAAG,CAAC,EAAE,KAAK,OAAO;AAC1E,QAAM,SAAS,KAAK,KAAK,IAAI;AAC7B,QAAM,WAAW,UAAU,OAAO,GAAG,MAAM;AAAA;AAAA,EAAO,IAAI,KAAK,UAAU,QAAQ,YAAY,MAAM;AAC/F,SAAO,WAAW,IAAI,QAAQ,IAAI;AACpC;","names":[]}
@@ -0,0 +1,51 @@
1
+ import {
2
+ failApi
3
+ } from "./chunk-7THBBTJJ.js";
4
+ import {
5
+ HUBSPOT_MISSING_GRANT_MARKER,
6
+ HUBSPOT_NOT_CONNECTED_MESSAGE
7
+ } from "./chunk-SMIENBNX.js";
8
+ import {
9
+ ApiError
10
+ } from "./chunk-HREWXNTO.js";
11
+ import {
12
+ writeJson
13
+ } from "./chunk-WOTDHRNF.js";
14
+
15
+ // src/commands/hubspot/refusal.ts
16
+ var CONTINUE = "Keep going with the wider task: say which part you could not read, skip it, and finish everything else. If the `request_connection` call fails, say so plainly and give the exact route: dashboard \u2192 Brain \u2192 Integrations \u2192 Platforms \u2192 HubSpot.";
17
+ function hubspotRefusal(code, message, reason = "so I can count a contact becoming a customer") {
18
+ if (code === "NOT_FOUND" && message.includes(HUBSPOT_NOT_CONNECTED_MESSAGE)) {
19
+ return {
20
+ code: "NO_HUBSPOT_CONNECTION",
21
+ fix: {
22
+ action: "request_connection",
23
+ explanation: `AGENT INSTRUCTION: HubSpot is not connected, and only the user can connect it. Call the \`request_connection\` tool with { platform: "hubspot", reason } \u2014 reason in their words, e.g. "${reason}" \u2014 and they connect it inside the chat; then run this command again. ` + CONTINUE
24
+ }
25
+ };
26
+ }
27
+ if (code === "FORBIDDEN" && message.includes(HUBSPOT_MISSING_GRANT_MARKER)) {
28
+ return {
29
+ code: "HUBSPOT_RECONNECT_REQUIRED",
30
+ fix: {
31
+ action: "request_connection",
32
+ explanation: 'AGENT INSTRUCTION: HubSpot is connected \u2014 do not tell the user it is missing, and do not retry. Its access does not cover this read (it was connected before Baker asked for it, or the access was withdrawn), and only the user can widen it. Call the `request_connection` tool with { platform: "hubspot", reason } naming what you need to read; the card offers them a Reconnect button. Run this command again once they have. ' + CONTINUE
33
+ }
34
+ };
35
+ }
36
+ return null;
37
+ }
38
+ function failNotConnected(err, reason) {
39
+ const refusal = err instanceof ApiError ? hubspotRefusal(err.code, err.message, reason) : null;
40
+ if (err instanceof ApiError && refusal !== null) {
41
+ writeJson({ ok: false, error: { code: refusal.code, message: err.message, fix: refusal.fix } });
42
+ process.exit(1);
43
+ }
44
+ failApi(err);
45
+ }
46
+
47
+ export {
48
+ hubspotRefusal,
49
+ failNotConnected
50
+ };
51
+ //# sourceMappingURL=chunk-NJEZM4OB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/hubspot/refusal.ts"],"sourcesContent":["import { HUBSPOT_MISSING_GRANT_MARKER, HUBSPOT_NOT_CONNECTED_MESSAGE } from \"@baker/api\";\nimport { ApiError } from \"../../client.ts\";\nimport { writeJson } from \"../../output.ts\";\nimport { failApi } from \"../actions/shared.ts\";\n\nexport interface HubspotRefusal {\n code: \"NO_HUBSPOT_CONNECTION\" | \"HUBSPOT_RECONNECT_REQUIRED\";\n fix: { action: \"request_connection\"; explanation: string };\n}\n\nconst CONTINUE =\n \"Keep going with the wider task: say which part you could not read, skip it, and finish everything else. If the \" +\n \"`request_connection` call fails, say so plainly and give the exact route: dashboard → Brain → Integrations → \" +\n \"Platforms → HubSpot.\";\n\n/**\n * The two HubSpot refusals only the user can clear, as the fix the agent\n * relays: the in-chat connect card, which connects HubSpot when nothing is\n * connected and reconnects it when the connection does not allow the read.\n * Every command that reads HubSpot shares this, so `baker hubspot` and\n * `baker analytics sources` cannot answer the same refusal two ways. Null for\n * every other refusal. `reason` is the example the agent words its ask on —\n * pass one that fits the read that was refused.\n *\n * Matched on the backend's own sentences (shared from `@baker/api`), because\n * the status alone does not tell them apart: a 404 is also \"no such source\",\n * and a 403 also \"you cannot change this company\".\n */\nexport function hubspotRefusal(\n code: string,\n message: string,\n reason = \"so I can count a contact becoming a customer\",\n): HubspotRefusal | null {\n if (code === \"NOT_FOUND\" && message.includes(HUBSPOT_NOT_CONNECTED_MESSAGE)) {\n return {\n code: \"NO_HUBSPOT_CONNECTION\",\n fix: {\n action: \"request_connection\",\n explanation:\n \"AGENT INSTRUCTION: HubSpot is not connected, and only the user can connect it. Call the `request_connection` \" +\n `tool with { platform: \"hubspot\", reason } — reason in their words, e.g. \"${reason}\" — and they connect it ` +\n \"inside the chat; then run this command again. \" +\n CONTINUE,\n },\n };\n }\n if (code === \"FORBIDDEN\" && message.includes(HUBSPOT_MISSING_GRANT_MARKER)) {\n return {\n code: \"HUBSPOT_RECONNECT_REQUIRED\",\n fix: {\n action: \"request_connection\",\n explanation:\n \"AGENT INSTRUCTION: HubSpot is connected — do not tell the user it is missing, and do not retry. Its access does \" +\n \"not cover this read (it was connected before Baker asked for it, or the access was withdrawn), and only the user \" +\n 'can widen it. Call the `request_connection` tool with { platform: \"hubspot\", reason } naming what you need to ' +\n \"read; the card offers them a Reconnect button. Run this command again once they have. \" +\n CONTINUE,\n },\n };\n }\n return null;\n}\n\n/**\n * \"No HubSpot connected\" and \"connected, but not for this\" are the most common\n * reasons these commands can't answer, and the agent can fix neither — only the\n * user can. Turn them into the in-chat connect card instead of a bare error.\n */\nexport function failNotConnected(err: unknown, reason?: string): never {\n const refusal = err instanceof ApiError ? hubspotRefusal(err.code, err.message, reason) : null;\n if (err instanceof ApiError && refusal !== null) {\n writeJson({ ok: false, error: { code: refusal.code, message: err.message, fix: refusal.fix } });\n process.exit(1);\n }\n failApi(err);\n}\n"],"mappings":";;;;;;;;;;;;;;;AAUA,IAAM,WACJ;AAiBK,SAAS,eACd,MACA,SACA,SAAS,gDACc;AACvB,MAAI,SAAS,eAAe,QAAQ,SAAS,6BAA6B,GAAG;AAC3E,WAAO;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,QACH,QAAQ;AAAA,QACR,aACE,gMAC4E,MAAM,gFAElF;AAAA,MACJ;AAAA,IACF;AAAA,EACF;AACA,MAAI,SAAS,eAAe,QAAQ,SAAS,4BAA4B,GAAG;AAC1E,WAAO;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,QACH,QAAQ;AAAA,QACR,aACE,+aAIA;AAAA,MACJ;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AAOO,SAAS,iBAAiB,KAAc,QAAwB;AACrE,QAAM,UAAU,eAAe,WAAW,eAAe,IAAI,MAAM,IAAI,SAAS,MAAM,IAAI;AAC1F,MAAI,eAAe,YAAY,YAAY,MAAM;AAC/C,cAAU,EAAE,IAAI,OAAO,OAAO,EAAE,MAAM,QAAQ,MAAM,SAAS,IAAI,SAAS,KAAK,QAAQ,IAAI,EAAE,CAAC;AAC9F,YAAQ,KAAK,CAAC;AAAA,EAChB;AACA,UAAQ,GAAG;AACb;","names":[]}