@koda-sl/baker-cli 0.386.0-dev.4e118c09a → 0.386.0-dev.d6e55699d
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.
- package/README.md +1057 -215
- package/canvas/tiktok-captions-composition/index.html +5 -6
- package/canvas/tiktok-captions-composition/meta.json +5 -0
- package/dist/account-5TGX45FO.js +79 -0
- package/dist/account-5TGX45FO.js.map +1 -0
- package/dist/account-CLOKMTTC.js +49 -0
- package/dist/account-CLOKMTTC.js.map +1 -0
- package/dist/account-XFK6VX2R.js +80 -0
- package/dist/account-XFK6VX2R.js.map +1 -0
- package/dist/account-reads-ZK5RMLB2.js +218 -0
- package/dist/account-reads-ZK5RMLB2.js.map +1 -0
- package/dist/account-writes-Y7EQXDXF.js +66 -0
- package/dist/account-writes-Y7EQXDXF.js.map +1 -0
- package/dist/accounts-7YD457YN.js +114 -0
- package/dist/accounts-7YD457YN.js.map +1 -0
- package/dist/accounts-BJ3X5JQT.js +115 -0
- package/dist/accounts-BJ3X5JQT.js.map +1 -0
- package/dist/accounts-HGAFFOA7.js +77 -0
- package/dist/accounts-HGAFFOA7.js.map +1 -0
- package/dist/accounts-OWMXUT6D.js +611 -0
- package/dist/accounts-OWMXUT6D.js.map +1 -0
- package/dist/accounts-RYBDLQ6H.js +75 -0
- package/dist/accounts-RYBDLQ6H.js.map +1 -0
- package/dist/actions-NSQYW7YS.js +55 -0
- package/dist/actions-NSQYW7YS.js.map +1 -0
- package/dist/active-entities-R6GZIO6Z.js +103 -0
- package/dist/active-entities-R6GZIO6Z.js.map +1 -0
- package/dist/activities-ESBF3GFS.js +74 -0
- package/dist/activities-ESBF3GFS.js.map +1 -0
- package/dist/ad-group-writes-I225OYDZ.js +170 -0
- package/dist/ad-group-writes-I225OYDZ.js.map +1 -0
- package/dist/ad-groups-O35MWNF6.js +68 -0
- package/dist/ad-groups-O35MWNF6.js.map +1 -0
- package/dist/ad-writes-SS5YZO5W.js +174 -0
- package/dist/ad-writes-SS5YZO5W.js.map +1 -0
- package/dist/add-HWIE5PGR.js +302 -0
- package/dist/add-HWIE5PGR.js.map +1 -0
- package/dist/add-IIW3NHZH.js +104 -0
- package/dist/add-IIW3NHZH.js.map +1 -0
- package/dist/add-QZHAWUBA.js +97 -0
- package/dist/add-QZHAWUBA.js.map +1 -0
- package/dist/add-TGQIVVXH.js +105 -0
- package/dist/add-TGQIVVXH.js.map +1 -0
- package/dist/add-accounts-6QYPOPR2.js +91 -0
- package/dist/add-accounts-6QYPOPR2.js.map +1 -0
- package/dist/ads-AUSRB4GU.js +128 -0
- package/dist/ads-AUSRB4GU.js.map +1 -0
- package/dist/ads-COYOTEKE.js +77 -0
- package/dist/ads-COYOTEKE.js.map +1 -0
- package/dist/ads-D6KKCQ3Q.js +40 -0
- package/dist/ads-D6KKCQ3Q.js.map +1 -0
- package/dist/ads-QKIHHXP5.js +113 -0
- package/dist/ads-QKIHHXP5.js.map +1 -0
- package/dist/adsets-7WMWU45E.js +176 -0
- package/dist/adsets-7WMWU45E.js.map +1 -0
- package/dist/advertisers-6NZ2M57X.js +120 -0
- package/dist/advertisers-6NZ2M57X.js.map +1 -0
- package/dist/advertisers-BCGKUMEH.js +125 -0
- package/dist/advertisers-BCGKUMEH.js.map +1 -0
- package/dist/analytics-QJC2BTZY.js +433 -0
- package/dist/analytics-QJC2BTZY.js.map +1 -0
- package/dist/analytics-SN6K7J7M.js +1980 -0
- package/dist/analytics-SN6K7J7M.js.map +1 -0
- package/dist/animate-JXIT77Y5.js +480 -0
- package/dist/animate-JXIT77Y5.js.map +1 -0
- package/dist/assign-XFDA42KL.js +77 -0
- package/dist/assign-XFDA42KL.js.map +1 -0
- package/dist/audience-size-DJPFYHPJ.js +94 -0
- package/dist/audience-size-DJPFYHPJ.js.map +1 -0
- package/dist/audiences-DC3IOG34.js +85 -0
- package/dist/audiences-DC3IOG34.js.map +1 -0
- package/dist/audiences-NEW3LLQR.js +268 -0
- package/dist/audiences-NEW3LLQR.js.map +1 -0
- package/dist/audiences-VXTIBZP6.js +78 -0
- package/dist/audiences-VXTIBZP6.js.map +1 -0
- package/dist/audit-M5B7TZGT.js +151 -0
- package/dist/audit-M5B7TZGT.js.map +1 -0
- package/dist/audit-UIPMTI5C.js +88 -0
- package/dist/audit-UIPMTI5C.js.map +1 -0
- package/dist/autocomplete-NWHEASQY.js +111 -0
- package/dist/autocomplete-NWHEASQY.js.map +1 -0
- package/dist/avatars-RNMUVMFM.js +38 -0
- package/dist/avatars-RNMUVMFM.js.map +1 -0
- package/dist/bid-pricing-EAY3HAHY.js +99 -0
- package/dist/bid-pricing-EAY3HAHY.js.map +1 -0
- package/dist/brand-XBHWYPMT.js +22 -0
- package/dist/brand-XBHWYPMT.js.map +1 -0
- package/dist/brief-XBAAPKRR.js +492 -0
- package/dist/brief-XBAAPKRR.js.map +1 -0
- package/dist/businesses-J7OP7MSK.js +53 -0
- package/dist/businesses-J7OP7MSK.js.map +1 -0
- package/dist/campaign-groups-7KA2RA5V.js +95 -0
- package/dist/campaign-groups-7KA2RA5V.js.map +1 -0
- package/dist/campaign-writes-5XA727KI.js +170 -0
- package/dist/campaign-writes-5XA727KI.js.map +1 -0
- package/dist/campaign-writes-D2UID2I6.js +165 -0
- package/dist/campaign-writes-D2UID2I6.js.map +1 -0
- package/dist/campaigns-JPYNVFQI.js +76 -0
- package/dist/campaigns-JPYNVFQI.js.map +1 -0
- package/dist/campaigns-NJ3KOPJS.js +107 -0
- package/dist/campaigns-NJ3KOPJS.js.map +1 -0
- package/dist/campaigns-QUTTH2TB.js +110 -0
- package/dist/campaigns-QUTTH2TB.js.map +1 -0
- package/dist/campaigns-SOO5RHYG.js +109 -0
- package/dist/campaigns-SOO5RHYG.js.map +1 -0
- package/dist/canvas-3VZ46BCF.js +46 -0
- package/dist/canvas-3VZ46BCF.js.map +1 -0
- package/dist/capabilities-KAYDPH7E.js +144 -0
- package/dist/capabilities-KAYDPH7E.js.map +1 -0
- package/dist/cards-7H32TNMO.js +85 -0
- package/dist/cards-7H32TNMO.js.map +1 -0
- package/dist/catalog-OTICZPJA.js +64 -0
- package/dist/catalog-OTICZPJA.js.map +1 -0
- package/dist/catalogs-ABCQLCDU.js +128 -0
- package/dist/catalogs-ABCQLCDU.js.map +1 -0
- package/dist/changes-22EO52IY.js +135 -0
- package/dist/changes-22EO52IY.js.map +1 -0
- package/dist/chatgpt-B3NHRJUE.js +47 -0
- package/dist/chatgpt-B3NHRJUE.js.map +1 -0
- package/dist/chats-QG3IRHOD.js +262 -0
- package/dist/chats-QG3IRHOD.js.map +1 -0
- package/dist/chunk-2CV7LX23.js +474 -0
- package/dist/chunk-2CV7LX23.js.map +1 -0
- package/dist/chunk-2SQJL7ZN.js +56 -0
- package/dist/chunk-2SQJL7ZN.js.map +1 -0
- package/dist/chunk-2Y5V23PU.js +29 -0
- package/dist/chunk-2Y5V23PU.js.map +1 -0
- package/dist/chunk-32CPGJPL.js +149 -0
- package/dist/chunk-32CPGJPL.js.map +1 -0
- package/dist/chunk-32PSERWG.js +363 -0
- package/dist/chunk-32PSERWG.js.map +1 -0
- package/dist/chunk-3ACMDRSE.js +39 -0
- package/dist/chunk-3ACMDRSE.js.map +1 -0
- package/dist/chunk-3UDSYYND.js +42 -0
- package/dist/chunk-3UDSYYND.js.map +1 -0
- package/dist/chunk-3V5E5SVE.js +382 -0
- package/dist/chunk-3V5E5SVE.js.map +1 -0
- package/dist/chunk-455BTAHM.js +57 -0
- package/dist/chunk-455BTAHM.js.map +1 -0
- package/dist/chunk-4MH6LONO.js +274 -0
- package/dist/chunk-4MH6LONO.js.map +1 -0
- package/dist/chunk-4NZ47VXO.js +137 -0
- package/dist/chunk-4NZ47VXO.js.map +1 -0
- package/dist/chunk-4OBO75XU.js +275 -0
- package/dist/chunk-4OBO75XU.js.map +1 -0
- package/dist/chunk-5HYSKH77.js +315 -0
- package/dist/chunk-5HYSKH77.js.map +1 -0
- package/dist/chunk-5MBPIONY.js +29 -0
- package/dist/chunk-5MBPIONY.js.map +1 -0
- package/dist/chunk-5OVOLYY3.js +74 -0
- package/dist/chunk-5OVOLYY3.js.map +1 -0
- package/dist/chunk-66USKCVY.js +4410 -0
- package/dist/chunk-66USKCVY.js.map +1 -0
- package/dist/chunk-6I7SYEYN.js +166 -0
- package/dist/chunk-6I7SYEYN.js.map +1 -0
- package/dist/chunk-6O7ISBC7.js +65 -0
- package/dist/chunk-6O7ISBC7.js.map +1 -0
- package/dist/chunk-752S7JF6.js +35 -0
- package/dist/chunk-752S7JF6.js.map +1 -0
- package/dist/chunk-AFJGYJ7Z.js +45 -0
- package/dist/chunk-AFJGYJ7Z.js.map +1 -0
- package/dist/chunk-AR7PU7BB.js +76 -0
- package/dist/chunk-AR7PU7BB.js.map +1 -0
- package/dist/chunk-ASL7JFBD.js +96 -0
- package/dist/chunk-ASL7JFBD.js.map +1 -0
- package/dist/chunk-AUCITRRT.js +310 -0
- package/dist/chunk-AUCITRRT.js.map +1 -0
- package/dist/chunk-AUSKKFVH.js +84 -0
- package/dist/chunk-AUSKKFVH.js.map +1 -0
- package/dist/chunk-BEGARAVC.js +174 -0
- package/dist/chunk-BEGARAVC.js.map +1 -0
- package/dist/{chunk-WWCLT3RG.js → chunk-BVM5IRZW.js} +16 -8
- package/dist/chunk-BVM5IRZW.js.map +1 -0
- package/dist/chunk-CAMX6OHF.js +3182 -0
- package/dist/chunk-CAMX6OHF.js.map +1 -0
- package/dist/chunk-CKI3RLMU.js +159 -0
- package/dist/chunk-CKI3RLMU.js.map +1 -0
- package/dist/chunk-CZENWCBS.js +333 -0
- package/dist/chunk-CZENWCBS.js.map +1 -0
- package/dist/chunk-D5FY4FAK.js +24 -0
- package/dist/chunk-D5FY4FAK.js.map +1 -0
- package/dist/chunk-DGCUPJZD.js +39 -0
- package/dist/chunk-DGCUPJZD.js.map +1 -0
- package/dist/chunk-DIICZGIS.js +509 -0
- package/dist/chunk-DIICZGIS.js.map +1 -0
- package/dist/chunk-DNCLWSHO.js +41 -0
- package/dist/chunk-DNCLWSHO.js.map +1 -0
- package/dist/chunk-DX4GIDO7.js +296 -0
- package/dist/chunk-DX4GIDO7.js.map +1 -0
- package/dist/chunk-DYZJBWT2.js +1079 -0
- package/dist/chunk-DYZJBWT2.js.map +1 -0
- package/dist/chunk-EDLZGTGN.js +216 -0
- package/dist/chunk-EDLZGTGN.js.map +1 -0
- package/dist/chunk-EDNX3AOS.js +76 -0
- package/dist/chunk-EDNX3AOS.js.map +1 -0
- package/dist/chunk-EF5DP6EB.js +52 -0
- package/dist/chunk-EF5DP6EB.js.map +1 -0
- package/dist/chunk-EQEZAYPL.js +541 -0
- package/dist/chunk-EQEZAYPL.js.map +1 -0
- package/dist/chunk-ERSX3MKH.js +34 -0
- package/dist/chunk-ERSX3MKH.js.map +1 -0
- package/dist/chunk-FKOECEVC.js +126 -0
- package/dist/chunk-FKOECEVC.js.map +1 -0
- package/dist/chunk-FYWWTMXP.js +2902 -0
- package/dist/chunk-FYWWTMXP.js.map +1 -0
- package/dist/chunk-G7AFVTUS.js +106 -0
- package/dist/chunk-G7AFVTUS.js.map +1 -0
- package/dist/chunk-GIW7ABMM.js +74 -0
- package/dist/chunk-GIW7ABMM.js.map +1 -0
- package/dist/chunk-GIWHHCD6.js +145 -0
- package/dist/chunk-GIWHHCD6.js.map +1 -0
- package/dist/chunk-GOJXKIFQ.js +1605 -0
- package/dist/chunk-GOJXKIFQ.js.map +1 -0
- package/dist/chunk-GPXIUYIA.js +592 -0
- package/dist/chunk-GPXIUYIA.js.map +1 -0
- package/dist/chunk-GRQ2AXDX.js +9 -0
- package/dist/chunk-GRQ2AXDX.js.map +1 -0
- package/dist/chunk-GXDLWBOY.js +73 -0
- package/dist/chunk-GXDLWBOY.js.map +1 -0
- package/dist/chunk-H7MLHG2I.js +94 -0
- package/dist/chunk-H7MLHG2I.js.map +1 -0
- package/dist/chunk-HAE4WWFQ.js +455 -0
- package/dist/chunk-HAE4WWFQ.js.map +1 -0
- package/dist/chunk-HB3LNR4Y.js +197 -0
- package/dist/chunk-HB3LNR4Y.js.map +1 -0
- package/dist/chunk-HDHWIEJJ.js +136 -0
- package/dist/chunk-HDHWIEJJ.js.map +1 -0
- package/dist/chunk-HJTIBTF7.js +98 -0
- package/dist/chunk-HJTIBTF7.js.map +1 -0
- package/dist/{chunk-VZEDAFAR.js → chunk-HLXWKMTK.js} +47 -8
- package/dist/chunk-HLXWKMTK.js.map +1 -0
- package/dist/{chunk-MF7YA62W.js → chunk-HREWXNTO.js} +10 -5
- package/dist/chunk-HREWXNTO.js.map +1 -0
- package/dist/chunk-HVJUMQYY.js +494 -0
- package/dist/chunk-HVJUMQYY.js.map +1 -0
- package/dist/chunk-I3DIZWN5.js +97 -0
- package/dist/chunk-I3DIZWN5.js.map +1 -0
- package/dist/chunk-IJMWEO4P.js +57 -0
- package/dist/chunk-IJMWEO4P.js.map +1 -0
- package/dist/chunk-IMORFIUT.js +207 -0
- package/dist/chunk-IMORFIUT.js.map +1 -0
- package/dist/chunk-IOCSDFF2.js +23992 -0
- package/dist/chunk-IOCSDFF2.js.map +1 -0
- package/dist/chunk-IRTYTT5D.js +665 -0
- package/dist/chunk-IRTYTT5D.js.map +1 -0
- package/dist/chunk-IVIJJXXT.js +62 -0
- package/dist/chunk-IVIJJXXT.js.map +1 -0
- package/dist/chunk-J57GWTPK.js +106 -0
- package/dist/chunk-J57GWTPK.js.map +1 -0
- package/dist/chunk-JAYT43KX.js +4227 -0
- package/dist/chunk-JAYT43KX.js.map +1 -0
- package/dist/chunk-JPK34QPS.js +134 -0
- package/dist/chunk-JPK34QPS.js.map +1 -0
- package/dist/chunk-JRCFCIE3.js +188 -0
- package/dist/chunk-JRCFCIE3.js.map +1 -0
- package/dist/chunk-JRGPCPT2.js +479 -0
- package/dist/chunk-JRGPCPT2.js.map +1 -0
- package/dist/chunk-JUAIGJ2A.js +76 -0
- package/dist/chunk-JUAIGJ2A.js.map +1 -0
- package/dist/chunk-K2RYUZ5Y.js +51 -0
- package/dist/chunk-K2RYUZ5Y.js.map +1 -0
- package/dist/chunk-K5OQES4V.js +58 -0
- package/dist/chunk-K5OQES4V.js.map +1 -0
- package/dist/chunk-KAHMADFH.js +455 -0
- package/dist/chunk-KAHMADFH.js.map +1 -0
- package/dist/chunk-KIGGMKAE.js +66 -0
- package/dist/chunk-KIGGMKAE.js.map +1 -0
- package/dist/chunk-KKJ4KJCW.js +29 -0
- package/dist/chunk-KKJ4KJCW.js.map +1 -0
- package/dist/chunk-KLK6KQLQ.js +55 -0
- package/dist/chunk-KLK6KQLQ.js.map +1 -0
- package/dist/chunk-KRIK2JR4.js +6212 -0
- package/dist/chunk-KRIK2JR4.js.map +1 -0
- package/dist/chunk-KZUHRZ2C.js +5187 -0
- package/dist/chunk-KZUHRZ2C.js.map +1 -0
- package/dist/chunk-L5WIRYNB.js +19 -0
- package/dist/chunk-L5WIRYNB.js.map +1 -0
- package/dist/chunk-LA6PPSNA.js +65 -0
- package/dist/chunk-LA6PPSNA.js.map +1 -0
- package/dist/chunk-LEIQAHWF.js +25 -0
- package/dist/chunk-LEIQAHWF.js.map +1 -0
- package/dist/chunk-LWBWCIWL.js +297 -0
- package/dist/chunk-LWBWCIWL.js.map +1 -0
- package/dist/chunk-M4PPFVYL.js +346 -0
- package/dist/chunk-M4PPFVYL.js.map +1 -0
- package/dist/chunk-M6UNISGO.js +66 -0
- package/dist/chunk-M6UNISGO.js.map +1 -0
- package/dist/chunk-MGKHFGLV.js +75 -0
- package/dist/chunk-MGKHFGLV.js.map +1 -0
- package/dist/chunk-MUVSWFLL.js +111 -0
- package/dist/chunk-MUVSWFLL.js.map +1 -0
- package/dist/chunk-NFSLRRIE.js +77 -0
- package/dist/chunk-NFSLRRIE.js.map +1 -0
- package/dist/chunk-NHU33T2S.js +60 -0
- package/dist/chunk-NHU33T2S.js.map +1 -0
- package/dist/chunk-O6QKCJE4.js +455 -0
- package/dist/chunk-O6QKCJE4.js.map +1 -0
- package/dist/chunk-OBNWER4H.js +1599 -0
- package/dist/chunk-OBNWER4H.js.map +1 -0
- package/dist/chunk-OFFAMC5H.js +225 -0
- package/dist/chunk-OFFAMC5H.js.map +1 -0
- package/dist/chunk-P4NSJS54.js +20 -0
- package/dist/chunk-P4NSJS54.js.map +1 -0
- package/dist/chunk-P5T7OZKV.js +26 -0
- package/dist/chunk-P5T7OZKV.js.map +1 -0
- package/dist/chunk-PAHLJMC3.js +175 -0
- package/dist/chunk-PAHLJMC3.js.map +1 -0
- package/dist/chunk-PBVLPFJ6.js +169 -0
- package/dist/chunk-PBVLPFJ6.js.map +1 -0
- package/dist/chunk-PFBQERWX.js +10 -0
- package/dist/chunk-PFBQERWX.js.map +1 -0
- package/dist/chunk-Q6ULQMWG.js +41 -0
- package/dist/chunk-Q6ULQMWG.js.map +1 -0
- package/dist/chunk-QKE7GXZ7.js +6683 -0
- package/dist/chunk-QKE7GXZ7.js.map +1 -0
- package/dist/chunk-QL573PLH.js +150 -0
- package/dist/chunk-QL573PLH.js.map +1 -0
- package/dist/chunk-QO23YHLK.js +84 -0
- package/dist/chunk-QO23YHLK.js.map +1 -0
- package/dist/chunk-R5OQM7FF.js +179 -0
- package/dist/chunk-R5OQM7FF.js.map +1 -0
- package/dist/chunk-RDLB54KF.js +629 -0
- package/dist/chunk-RDLB54KF.js.map +1 -0
- package/dist/chunk-RGIXQEGJ.js +502 -0
- package/dist/chunk-RGIXQEGJ.js.map +1 -0
- package/dist/chunk-RRIAHUWP.js +304 -0
- package/dist/chunk-RRIAHUWP.js.map +1 -0
- package/dist/chunk-S4LZ7KTG.js +160 -0
- package/dist/chunk-S4LZ7KTG.js.map +1 -0
- package/dist/chunk-SHTESUB6.js +1442 -0
- package/dist/chunk-SHTESUB6.js.map +1 -0
- package/dist/chunk-SLB46MSS.js +64 -0
- package/dist/chunk-SLB46MSS.js.map +1 -0
- package/dist/chunk-T7M4WFNV.js +172 -0
- package/dist/chunk-T7M4WFNV.js.map +1 -0
- package/dist/{chunk-JTZXQRXI.js → chunk-TPXI2GCW.js} +4 -4
- package/dist/chunk-TWNFQUBS.js +23 -0
- package/dist/chunk-TWNFQUBS.js.map +1 -0
- package/dist/chunk-U6VRBDNQ.js +1830 -0
- package/dist/chunk-U6VRBDNQ.js.map +1 -0
- package/dist/chunk-U7BBXM67.js +1743 -0
- package/dist/chunk-U7BBXM67.js.map +1 -0
- package/dist/chunk-UI6BKYQD.js +225 -0
- package/dist/chunk-UI6BKYQD.js.map +1 -0
- package/dist/chunk-USL5ARRE.js +26 -0
- package/dist/chunk-USL5ARRE.js.map +1 -0
- package/dist/chunk-UYC45JNS.js +139 -0
- package/dist/chunk-UYC45JNS.js.map +1 -0
- package/dist/chunk-V5GSRREZ.js +846 -0
- package/dist/chunk-V5GSRREZ.js.map +1 -0
- package/dist/chunk-V5HDRJQW.js +337 -0
- package/dist/chunk-V5HDRJQW.js.map +1 -0
- package/dist/chunk-VS4C7VAR.js +533 -0
- package/dist/chunk-VS4C7VAR.js.map +1 -0
- package/dist/chunk-W4W4ZRBP.js +191 -0
- package/dist/chunk-W4W4ZRBP.js.map +1 -0
- package/dist/chunk-WIRBRCTJ.js +228 -0
- package/dist/chunk-WIRBRCTJ.js.map +1 -0
- package/dist/chunk-WN4KX7GE.js +25 -0
- package/dist/chunk-WN4KX7GE.js.map +1 -0
- package/dist/chunk-WNFTXSGR.js +111 -0
- package/dist/chunk-WNFTXSGR.js.map +1 -0
- package/dist/chunk-WOTDHRNF.js +2109 -0
- package/dist/chunk-WOTDHRNF.js.map +1 -0
- package/dist/chunk-WPKOEFOE.js +103 -0
- package/dist/chunk-WPKOEFOE.js.map +1 -0
- package/dist/chunk-XE3WS3QE.js +183 -0
- package/dist/chunk-XE3WS3QE.js.map +1 -0
- package/dist/chunk-XGWKTYXQ.js +67 -0
- package/dist/chunk-XGWKTYXQ.js.map +1 -0
- package/dist/chunk-XIGIJJSF.js +66 -0
- package/dist/chunk-XIGIJJSF.js.map +1 -0
- package/dist/chunk-XNUXB63I.js +817 -0
- package/dist/chunk-XNUXB63I.js.map +1 -0
- package/dist/chunk-XQ3CCNJD.js +610 -0
- package/dist/chunk-XQ3CCNJD.js.map +1 -0
- package/dist/chunk-Y362QH54.js +98 -0
- package/dist/chunk-Y362QH54.js.map +1 -0
- package/dist/chunk-Y4HZNSBN.js +3151 -0
- package/dist/chunk-Y4HZNSBN.js.map +1 -0
- package/dist/chunk-Y4T6ATDQ.js +74 -0
- package/dist/chunk-Y4T6ATDQ.js.map +1 -0
- package/dist/chunk-YIMGUMXX.js +206 -0
- package/dist/chunk-YIMGUMXX.js.map +1 -0
- package/dist/chunk-YQSBHWOI.js +41 -0
- package/dist/chunk-YU26SDNT.js +46 -0
- package/dist/chunk-YU26SDNT.js.map +1 -0
- package/dist/chunk-YULENNA7.js +501 -0
- package/dist/chunk-YULENNA7.js.map +1 -0
- package/dist/chunk-YYSZYSAG.js +150 -0
- package/dist/chunk-YYSZYSAG.js.map +1 -0
- package/dist/chunk-Z3ENMCFE.js +94 -0
- package/dist/chunk-Z3ENMCFE.js.map +1 -0
- package/dist/chunk-ZCFSHQBF.js +92 -0
- package/dist/chunk-ZCFSHQBF.js.map +1 -0
- package/dist/chunk-ZH7ZM3ZM.js +125 -0
- package/dist/chunk-ZH7ZM3ZM.js.map +1 -0
- package/dist/chunk-ZIXHS6AM.js +42 -0
- package/dist/chunk-ZIXHS6AM.js.map +1 -0
- package/dist/chunk-ZLLJKSNS.js +96 -0
- package/dist/chunk-ZLLJKSNS.js.map +1 -0
- package/dist/claim-4AFNDV3A.js +197 -0
- package/dist/claim-4AFNDV3A.js.map +1 -0
- package/dist/cli.js +104 -71708
- package/dist/cli.js.map +1 -1
- package/dist/client-26SAJ46D.js +19 -0
- package/dist/code-MOWYJMDH.js +76 -0
- package/dist/code-MOWYJMDH.js.map +1 -0
- package/dist/companies-PZRRZZNV.js +195 -0
- package/dist/companies-PZRRZZNV.js.map +1 -0
- package/dist/complete-IBW5DNVZ.js +81 -0
- package/dist/complete-IBW5DNVZ.js.map +1 -0
- package/dist/config-X6GKOVQ6.js +88 -0
- package/dist/config-X6GKOVQ6.js.map +1 -0
- package/dist/connect-WYUYS5V4.js +42 -0
- package/dist/content-UYZC4AKN.js +85 -0
- package/dist/content-UYZC4AKN.js.map +1 -0
- package/dist/conversation-6AG3UBYY.js +93 -0
- package/dist/conversation-6AG3UBYY.js.map +1 -0
- package/dist/conversion-report-R4GJWWTK.js +125 -0
- package/dist/conversion-report-R4GJWWTK.js.map +1 -0
- package/dist/conversion-upload-command-YML2UNJB.js +438 -0
- package/dist/conversion-upload-command-YML2UNJB.js.map +1 -0
- package/dist/conversion-writes-WHFFUWWL.js +120 -0
- package/dist/conversion-writes-WHFFUWWL.js.map +1 -0
- package/dist/conversions-NOBBFNIU.js +135 -0
- package/dist/conversions-NOBBFNIU.js.map +1 -0
- package/dist/conversions-OXJAX5GB.js +76 -0
- package/dist/conversions-OXJAX5GB.js.map +1 -0
- package/dist/countries-PBXNB3BR.js +82 -0
- package/dist/countries-PBXNB3BR.js.map +1 -0
- package/dist/create-JK42P564.js +59 -0
- package/dist/create-JK42P564.js.map +1 -0
- package/dist/create-LAWUVPCY.js +207 -0
- package/dist/create-LAWUVPCY.js.map +1 -0
- package/dist/create-MUPQ5CTH.js +138 -0
- package/dist/create-MUPQ5CTH.js.map +1 -0
- package/dist/create-NQJNCFRO.js +236 -0
- package/dist/create-NQJNCFRO.js.map +1 -0
- package/dist/creatives-KCWFZIM5.js +182 -0
- package/dist/creatives-KCWFZIM5.js.map +1 -0
- package/dist/creatives-NNDWCSKJ.js +51 -0
- package/dist/creatives-NNDWCSKJ.js.map +1 -0
- package/dist/creatives-RHNHTS2R.js +87 -0
- package/dist/creatives-RHNHTS2R.js.map +1 -0
- package/dist/credentials-CEKGXR2C.js +287 -0
- package/dist/credentials-CEKGXR2C.js.map +1 -0
- package/dist/critique-HDDYER52.js +1449 -0
- package/dist/critique-HDDYER52.js.map +1 -0
- package/dist/critique-QIN2FO4F.js +216 -0
- package/dist/critique-QIN2FO4F.js.map +1 -0
- package/dist/crm-KBPWZC6J.js +318 -0
- package/dist/crm-KBPWZC6J.js.map +1 -0
- package/dist/crm-QBWD7CWB.js +224 -0
- package/dist/crm-QBWD7CWB.js.map +1 -0
- package/dist/crop-U3AD4DDR.js +113 -0
- package/dist/crop-U3AD4DDR.js.map +1 -0
- package/dist/currency-XTFGZFGB.js +88 -0
- package/dist/currency-XTFGZFGB.js.map +1 -0
- package/dist/custom-conversions-W3K33V33.js +125 -0
- package/dist/custom-conversions-W3K33V33.js.map +1 -0
- package/dist/customers-HYE7N2H5.js +56 -0
- package/dist/decide-YTHCBKM6.js +199 -0
- package/dist/decide-YTHCBKM6.js.map +1 -0
- package/dist/delete-64REPCY2.js +54 -0
- package/dist/delete-64REPCY2.js.map +1 -0
- package/dist/delete-AY3KL3N3.js +63 -0
- package/dist/delete-AY3KL3N3.js.map +1 -0
- package/dist/delete-DZUDLYPC.js +69 -0
- package/dist/delete-DZUDLYPC.js.map +1 -0
- package/dist/delete-NZGZP4YP.js +71 -0
- package/dist/delete-NZGZP4YP.js.map +1 -0
- package/dist/delete-VO2LZXE4.js +66 -0
- package/dist/delete-VO2LZXE4.js.map +1 -0
- package/dist/delete-VQMU56OH.js +71 -0
- package/dist/delete-VQMU56OH.js.map +1 -0
- package/dist/demographics-KOFLMGVW.js +138 -0
- package/dist/demographics-KOFLMGVW.js.map +1 -0
- package/dist/describe-JNTCQZNL.js +97 -0
- package/dist/describe-JNTCQZNL.js.map +1 -0
- package/dist/describe-MT4334NG.js +97 -0
- package/dist/describe-MT4334NG.js.map +1 -0
- package/dist/dimensions-FEZUJRAG.js +101 -0
- package/dist/dimensions-FEZUJRAG.js.map +1 -0
- package/dist/discard-H4RPXZHX.js +66 -0
- package/dist/discard-H4RPXZHX.js.map +1 -0
- package/dist/discover-4GD7QSF5.js +93 -0
- package/dist/discover-4GD7QSF5.js.map +1 -0
- package/dist/discover-L7OVXW4V.js +172 -0
- package/dist/discover-L7OVXW4V.js.map +1 -0
- package/dist/domain-HURQ23KR.js +98 -0
- package/dist/domain-HURQ23KR.js.map +1 -0
- package/dist/download-L27HWEOE.js +299 -0
- package/dist/download-L27HWEOE.js.map +1 -0
- package/dist/draft-25G2P2TE.js +281 -0
- package/dist/draft-25G2P2TE.js.map +1 -0
- package/dist/draft-5VH2PW3R.js +307 -0
- package/dist/draft-5VH2PW3R.js.map +1 -0
- package/dist/draft-D6UTKSAA.js +217 -0
- package/dist/draft-D6UTKSAA.js.map +1 -0
- package/dist/draft-KLULNBWP.js +233 -0
- package/dist/draft-KLULNBWP.js.map +1 -0
- package/dist/draft-MI7RWY2K.js +100 -0
- package/dist/draft-MI7RWY2K.js.map +1 -0
- package/dist/draft-P4IVYTY3.js +103 -0
- package/dist/draft-P4IVYTY3.js.map +1 -0
- package/dist/draft-UQYWDZS7.js +306 -0
- package/dist/draft-UQYWDZS7.js.map +1 -0
- package/dist/draft-YFAJHCKM.js +328 -0
- package/dist/draft-YFAJHCKM.js.map +1 -0
- package/dist/engine/index.d.ts +213 -127
- package/dist/engine/index.js +18 -4
- package/dist/{env-4P5HOGNA.js → env-FBTHZKGN.js} +12 -2
- package/dist/env-FBTHZKGN.js.map +1 -0
- package/dist/experiment-HDYTJPUY.js +1397 -0
- package/dist/experiment-HDYTJPUY.js.map +1 -0
- package/dist/export-TS5GYEMA.js +168 -0
- package/dist/export-TS5GYEMA.js.map +1 -0
- package/dist/extract-QVQFUOIK.js +113 -0
- package/dist/extract-QVQFUOIK.js.map +1 -0
- package/dist/facets-WYQUZMFJ.js +114 -0
- package/dist/facets-WYQUZMFJ.js.map +1 -0
- package/dist/favorites-7QP7BY5K.js +178 -0
- package/dist/favorites-7QP7BY5K.js.map +1 -0
- package/dist/feed-EETRO2FG.js +177 -0
- package/dist/feed-EETRO2FG.js.map +1 -0
- package/dist/feedback-SIMPRE37.js +66 -0
- package/dist/feedback-SIMPRE37.js.map +1 -0
- package/dist/feedback-record-L4MPIVML.js +177 -0
- package/dist/feedback-record-L4MPIVML.js.map +1 -0
- package/dist/fetch-DTBM3DE2.js +176 -0
- package/dist/fetch-DTBM3DE2.js.map +1 -0
- package/dist/fetch-Z7O3ZL4D.js +139 -0
- package/dist/fetch-Z7O3ZL4D.js.map +1 -0
- package/dist/find-KAQ6JDMO.js +134 -0
- package/dist/find-KAQ6JDMO.js.map +1 -0
- package/dist/fit-MY5GVZZZ.js +45 -0
- package/dist/fit-MY5GVZZZ.js.map +1 -0
- package/dist/flows-IUDXVDOS.js +247 -0
- package/dist/flows-IUDXVDOS.js.map +1 -0
- package/dist/follow-IX4XVK5Y.js +94 -0
- package/dist/follow-IX4XVK5Y.js.map +1 -0
- package/dist/follow-competitors-UZBUOYTH.js +112 -0
- package/dist/follow-competitors-UZBUOYTH.js.map +1 -0
- package/dist/following-VGOIUCIZ.js +113 -0
- package/dist/following-VGOIUCIZ.js.map +1 -0
- package/dist/fonts-EUDHI6CA.js +34 -0
- package/dist/fonts-EUDHI6CA.js.map +1 -0
- package/dist/forecast-BRSEH2H3.js +104 -0
- package/dist/forecast-BRSEH2H3.js.map +1 -0
- package/dist/forecast-QV4U7TOY.js +168 -0
- package/dist/forecast-QV4U7TOY.js.map +1 -0
- package/dist/funding-H5YO37OW.js +85 -0
- package/dist/funding-H5YO37OW.js.map +1 -0
- package/dist/funnel-JLF77MLF.js +394 -0
- package/dist/funnel-JLF77MLF.js.map +1 -0
- package/dist/ga4-YHJ2XMLC.js +55 -0
- package/dist/ga4-YHJ2XMLC.js.map +1 -0
- package/dist/generate-M2ZX5DMI.js +262 -0
- package/dist/generate-M2ZX5DMI.js.map +1 -0
- package/dist/get-4EYKCZ6F.js +59 -0
- package/dist/get-4EYKCZ6F.js.map +1 -0
- package/dist/get-637GALM2.js +63 -0
- package/dist/get-637GALM2.js.map +1 -0
- package/dist/get-AYX5HS64.js +56 -0
- package/dist/get-AYX5HS64.js.map +1 -0
- package/dist/get-AZARFR6O.js +61 -0
- package/dist/get-AZARFR6O.js.map +1 -0
- package/dist/get-EG2U7MIL.js +78 -0
- package/dist/get-EG2U7MIL.js.map +1 -0
- package/dist/get-N4BPOQCB.js +63 -0
- package/dist/get-N4BPOQCB.js.map +1 -0
- package/dist/get-RPZHLQ56.js +92 -0
- package/dist/get-RPZHLQ56.js.map +1 -0
- package/dist/gif-6PRTB2VR.js +94 -0
- package/dist/gif-6PRTB2VR.js.map +1 -0
- package/dist/google-52JRH7X3.js +136 -0
- package/dist/google-52JRH7X3.js.map +1 -0
- package/dist/google-ITTPCJ7N.js +3190 -0
- package/dist/google-ITTPCJ7N.js.map +1 -0
- package/dist/google-ads-U3JFFQLU.js +195 -0
- package/dist/google-ads-U3JFFQLU.js.map +1 -0
- package/dist/group-AAZ5QKC3.js +43 -0
- package/dist/group-AAZ5QKC3.js.map +1 -0
- package/dist/group-GSYCZORC.js +43 -0
- package/dist/group-GSYCZORC.js.map +1 -0
- package/dist/gsc-TS5T7ML2.js +30 -0
- package/dist/gsc-TS5T7ML2.js.map +1 -0
- package/dist/history-EW6LFFCX.js +67 -0
- package/dist/history-EW6LFFCX.js.map +1 -0
- package/dist/history-YTNCWSV3.js +133 -0
- package/dist/history-YTNCWSV3.js.map +1 -0
- package/dist/hubspot-LXWQNKKB.js +779 -0
- package/dist/hubspot-LXWQNKKB.js.map +1 -0
- package/dist/icon-K75KI6BV.js +137 -0
- package/dist/icon-K75KI6BV.js.map +1 -0
- package/dist/ideas-JJIHQFV4.js +35 -0
- package/dist/ideas-JJIHQFV4.js.map +1 -0
- package/dist/images-MWETBYKB.js +90 -0
- package/dist/images-MWETBYKB.js.map +1 -0
- package/dist/improve-L3BW4EQG.js +86 -0
- package/dist/improve-L3BW4EQG.js.map +1 -0
- package/dist/ingest-THFAV4NO.js +107 -0
- package/dist/ingest-THFAV4NO.js.map +1 -0
- package/dist/ingest-U6B7GR4A.js +23 -0
- package/dist/ingest-U6B7GR4A.js.map +1 -0
- package/dist/insights-FA6T6PT6.js +423 -0
- package/dist/insights-FA6T6PT6.js.map +1 -0
- package/dist/insights-PELVD4RY.js +122 -0
- package/dist/insights-PELVD4RY.js.map +1 -0
- package/dist/inspect-N2WVVWGP.js +189 -0
- package/dist/inspect-N2WVVWGP.js.map +1 -0
- package/dist/inspiration-Y2J2PUPC.js +53 -0
- package/dist/inspiration-Y2J2PUPC.js.map +1 -0
- package/dist/intent-YNAAVNHK.js +95 -0
- package/dist/intent-YNAAVNHK.js.map +1 -0
- package/dist/job-E2U4FS5P.js +202 -0
- package/dist/job-E2U4FS5P.js.map +1 -0
- package/dist/job-create-DFYCHVQ7.js +109 -0
- package/dist/job-create-DFYCHVQ7.js.map +1 -0
- package/dist/job-status-FFPMTSHB.js +74 -0
- package/dist/job-status-FFPMTSHB.js.map +1 -0
- package/dist/keep-GYZS2UTL.js +78 -0
- package/dist/keep-GYZS2UTL.js.map +1 -0
- package/dist/keyword-gap-4JKLWIBJ.js +130 -0
- package/dist/keyword-gap-4JKLWIBJ.js.map +1 -0
- package/dist/keyword-metrics-KU3OHTQK.js +197 -0
- package/dist/keyword-metrics-KU3OHTQK.js.map +1 -0
- package/dist/keywords-for-site-M4MFWMVK.js +128 -0
- package/dist/keywords-for-site-M4MFWMVK.js.map +1 -0
- package/dist/landing-7UVZ7IPP.js +28 -0
- package/dist/landing-7UVZ7IPP.js.map +1 -0
- package/dist/landings-F7LOAEJE.js +151 -0
- package/dist/landings-F7LOAEJE.js.map +1 -0
- package/dist/languages-PKYCZNUB.js +40 -0
- package/dist/languages-PKYCZNUB.js.map +1 -0
- package/dist/languages-XEJKTIFP.js +55 -0
- package/dist/languages-XEJKTIFP.js.map +1 -0
- package/dist/launches-TCFAYUA5.js +19 -0
- package/dist/launches-TCFAYUA5.js.map +1 -0
- package/dist/layerize-ZSKFIPZA.js +190 -0
- package/dist/layerize-ZSKFIPZA.js.map +1 -0
- package/dist/leads-CSRESOB2.js +293 -0
- package/dist/leads-CSRESOB2.js.map +1 -0
- package/dist/leads-MQPEA7DG.js +90 -0
- package/dist/leads-MQPEA7DG.js.map +1 -0
- package/dist/learn-K5YBUMBT.js +203 -0
- package/dist/learn-K5YBUMBT.js.map +1 -0
- package/dist/library-IP2UKNRU.js +109 -0
- package/dist/library-IP2UKNRU.js.map +1 -0
- package/dist/lighthouse-57XBJRCO.js +75 -0
- package/dist/lighthouse-57XBJRCO.js.map +1 -0
- package/dist/line-item-writes-73NR2J5L.js +208 -0
- package/dist/line-item-writes-73NR2J5L.js.map +1 -0
- package/dist/line-items-2YBGXOAQ.js +103 -0
- package/dist/line-items-2YBGXOAQ.js.map +1 -0
- package/dist/link-GVAWECJO.js +64 -0
- package/dist/link-GVAWECJO.js.map +1 -0
- package/dist/linkedin-PZDT22AT.js +1008 -0
- package/dist/linkedin-PZDT22AT.js.map +1 -0
- package/dist/list-6IKPWQGG.js +57 -0
- package/dist/list-6IKPWQGG.js.map +1 -0
- package/dist/list-CAUH3BMG.js +65 -0
- package/dist/list-CAUH3BMG.js.map +1 -0
- package/dist/list-FNDRV25Y.js +151 -0
- package/dist/list-FNDRV25Y.js.map +1 -0
- package/dist/list-GTOSN7DP.js +50 -0
- package/dist/list-GTOSN7DP.js.map +1 -0
- package/dist/list-HLJP4NVE.js +51 -0
- package/dist/list-HLJP4NVE.js.map +1 -0
- package/dist/list-LCUPF7EF.js +76 -0
- package/dist/list-LCUPF7EF.js.map +1 -0
- package/dist/list-REZGFWC5.js +63 -0
- package/dist/list-REZGFWC5.js.map +1 -0
- package/dist/list-S6MNXDTV.js +303 -0
- package/dist/list-S6MNXDTV.js.map +1 -0
- package/dist/locations-2BYWKIYA.js +67 -0
- package/dist/locations-2BYWKIYA.js.map +1 -0
- package/dist/locations-GJHHMV6Z.js +40 -0
- package/dist/locations-GJHHMV6Z.js.map +1 -0
- package/dist/log-HGDNLDUX.js +92 -0
- package/dist/log-HGDNLDUX.js.map +1 -0
- package/dist/logo-AJK2TDQU.js +18 -0
- package/dist/logo-AJK2TDQU.js.map +1 -0
- package/dist/lookup-H5GEM77H.js +22 -0
- package/dist/lookup-H5GEM77H.js.map +1 -0
- package/dist/make-BT26YJXZ.js +640 -0
- package/dist/make-BT26YJXZ.js.map +1 -0
- package/dist/map-J5EX4HOX.js +404 -0
- package/dist/map-J5EX4HOX.js.map +1 -0
- package/dist/mcp-MHDW6AFL.js +463 -0
- package/dist/mcp-MHDW6AFL.js.map +1 -0
- package/dist/media-RAGEJTZX.js +89 -0
- package/dist/media-RAGEJTZX.js.map +1 -0
- package/dist/media-RNB7JFJP.js +15 -0
- package/dist/media-RNB7JFJP.js.map +1 -0
- package/dist/media-sources-4NN3DWSG.js +32 -0
- package/dist/media-sources-4NN3DWSG.js.map +1 -0
- package/dist/members-AIWMXAQD.js +44 -0
- package/dist/members-AIWMXAQD.js.map +1 -0
- package/dist/meta-WAPZMZI7.js +69 -0
- package/dist/meta-WAPZMZI7.js.map +1 -0
- package/dist/metrics-6EHC4ESN.js +152 -0
- package/dist/metrics-6EHC4ESN.js.map +1 -0
- package/dist/models-5J4WFUD3.js +155 -0
- package/dist/models-5J4WFUD3.js.map +1 -0
- package/dist/normalize-DSFVTRXN.js +806 -0
- package/dist/normalize-DSFVTRXN.js.map +1 -0
- package/dist/normalize-ZAWN4XCS.js +141 -0
- package/dist/normalize-ZAWN4XCS.js.map +1 -0
- package/dist/options-3CZNT5KP.js +121 -0
- package/dist/options-3CZNT5KP.js.map +1 -0
- package/dist/output-DTCLVPUF.js +24 -0
- package/dist/output-DTCLVPUF.js.map +1 -0
- package/dist/page-N2ZO3O7F.js +105 -0
- package/dist/page-N2ZO3O7F.js.map +1 -0
- package/dist/pages-FQ4CBAJ2.js +66 -0
- package/dist/pages-FQ4CBAJ2.js.map +1 -0
- package/dist/performance-GOMJMHPE.js +24 -0
- package/dist/performance-GOMJMHPE.js.map +1 -0
- package/dist/pinterest-NV5XTNJE.js +96 -0
- package/dist/pinterest-NV5XTNJE.js.map +1 -0
- package/dist/pixels-CTJ43FZ4.js +108 -0
- package/dist/pixels-CTJ43FZ4.js.map +1 -0
- package/dist/pixels-HKINGZCH.js +60 -0
- package/dist/pixels-HKINGZCH.js.map +1 -0
- package/dist/plan-ZYTWLGWK.js +207 -0
- package/dist/plan-ZYTWLGWK.js.map +1 -0
- package/dist/preview-UKYLPAW2.js +169 -0
- package/dist/preview-UKYLPAW2.js.map +1 -0
- package/dist/profile-Q3PHR6FU.js +159 -0
- package/dist/profile-Q3PHR6FU.js.map +1 -0
- package/dist/promoted-tweet-writes-IYOAZTA5.js +180 -0
- package/dist/promoted-tweet-writes-IYOAZTA5.js.map +1 -0
- package/dist/promoted-tweets-G3XFD5YM.js +119 -0
- package/dist/promoted-tweets-G3XFD5YM.js.map +1 -0
- package/dist/properties-WLL6M2P6.js +101 -0
- package/dist/properties-WLL6M2P6.js.map +1 -0
- package/dist/publish-ZG4J2GTH.js +322 -0
- package/dist/publish-ZG4J2GTH.js.map +1 -0
- package/dist/query-7AGG77WH.js +61 -0
- package/dist/query-7AGG77WH.js.map +1 -0
- package/dist/query-IYZN5KHO.js +236 -0
- package/dist/query-IYZN5KHO.js.map +1 -0
- package/dist/query-UN2P6DBA.js +247 -0
- package/dist/query-UN2P6DBA.js.map +1 -0
- package/dist/questionnaire-Z2ZIKNBV.js +93 -0
- package/dist/questionnaire-Z2ZIKNBV.js.map +1 -0
- package/dist/read-GM7PQYJA.js +141 -0
- package/dist/read-GM7PQYJA.js.map +1 -0
- package/dist/reddit-FTO4SFQE.js +26 -0
- package/dist/reddit-FTO4SFQE.js.map +1 -0
- package/dist/refresh-OUENQ2FS.js +94 -0
- package/dist/refresh-OUENQ2FS.js.map +1 -0
- package/dist/release-5OG7AAFY.js +60 -0
- package/dist/release-5OG7AAFY.js.map +1 -0
- package/dist/relevant-pages-KUVDZPRU.js +99 -0
- package/dist/relevant-pages-KUVDZPRU.js.map +1 -0
- package/dist/remove-33HI27KM.js +50 -0
- package/dist/remove-33HI27KM.js.map +1 -0
- package/dist/remove-GOYW2G4R.js +48 -0
- package/dist/remove-GOYW2G4R.js.map +1 -0
- package/dist/reopen-KFFYE53A.js +63 -0
- package/dist/reopen-KFFYE53A.js.map +1 -0
- package/dist/rerun-P6XACA5Z.js +86 -0
- package/dist/rerun-P6XACA5Z.js.map +1 -0
- package/dist/research-BEO3JMZI.js +262 -0
- package/dist/research-BEO3JMZI.js.map +1 -0
- package/dist/research-QOC53DLS.js +62 -0
- package/dist/research-QOC53DLS.js.map +1 -0
- package/dist/reset-E3OWE2WF.js +54 -0
- package/dist/reset-E3OWE2WF.js.map +1 -0
- package/dist/reset-I7M3HYMB.js +54 -0
- package/dist/reset-I7M3HYMB.js.map +1 -0
- package/dist/resolve-GP7BHM6L.js +121 -0
- package/dist/resolve-GP7BHM6L.js.map +1 -0
- package/dist/retry-33ZJCNQI.js +62 -0
- package/dist/retry-33ZJCNQI.js.map +1 -0
- package/dist/retry-X5PU7QO3.js +60 -0
- package/dist/retry-X5PU7QO3.js.map +1 -0
- package/dist/retry-failed-BEFWRV4Z.js +45 -0
- package/dist/retry-failed-BEFWRV4Z.js.map +1 -0
- package/dist/run-REK3TEGY.js +65 -0
- package/dist/run-REK3TEGY.js.map +1 -0
- package/dist/run-TH2662IC.js +61 -0
- package/dist/run-TH2662IC.js.map +1 -0
- package/dist/scaffold-ad-3WDRKUFT.js +1550 -0
- package/dist/scaffold-ad-3WDRKUFT.js.map +1 -0
- package/dist/scaffold-static-ad-X5NT52NF.js +973 -0
- package/dist/scaffold-static-ad-X5NT52NF.js.map +1 -0
- package/dist/scaffold-video-WZPVACLE.js +874 -0
- package/dist/scaffold-video-WZPVACLE.js.map +1 -0
- package/dist/schedule-KQ7UIR3N.js +66 -0
- package/dist/schedule-KQ7UIR3N.js.map +1 -0
- package/dist/schedule-V4UHGY3V.js +61 -0
- package/dist/schedule-V4UHGY3V.js.map +1 -0
- package/dist/scheduled-agents-KLQ5H2PA.js +49 -0
- package/dist/scheduled-agents-KLQ5H2PA.js.map +1 -0
- package/dist/schema-G3T4PZDI.js +132 -0
- package/dist/schema-G3T4PZDI.js.map +1 -0
- package/dist/schema-QXTDLZVC.js +63 -0
- package/dist/schema-QXTDLZVC.js.map +1 -0
- package/dist/scrape-7YKJWFZE.js +2241 -0
- package/dist/scrape-7YKJWFZE.js.map +1 -0
- package/dist/screenshot-ZHBSG3SI.js +102 -0
- package/dist/screenshot-ZHBSG3SI.js.map +1 -0
- package/dist/search-332KFYZ6.js +224 -0
- package/dist/search-332KFYZ6.js.map +1 -0
- package/dist/search-4PBMXXUY.js +91 -0
- package/dist/search-4PBMXXUY.js.map +1 -0
- package/dist/search-6XKEGABN.js +174 -0
- package/dist/search-6XKEGABN.js.map +1 -0
- package/dist/search-AVNUU6TJ.js +26 -0
- package/dist/search-AVNUU6TJ.js.map +1 -0
- package/dist/search-F5INRFFK.js +92 -0
- package/dist/search-F5INRFFK.js.map +1 -0
- package/dist/search-copy-DZVBYG2B.js +168 -0
- package/dist/search-copy-DZVBYG2B.js.map +1 -0
- package/dist/seeds-5JTQN5WI.js +101 -0
- package/dist/seeds-5JTQN5WI.js.map +1 -0
- package/dist/select-N2V55BEX.js +96 -0
- package/dist/select-N2V55BEX.js.map +1 -0
- package/dist/sends-3L6QBS46.js +309 -0
- package/dist/sends-3L6QBS46.js.map +1 -0
- package/dist/sequences-YKFV7BDH.js +146 -0
- package/dist/sequences-YKFV7BDH.js.map +1 -0
- package/dist/set-prompt-7HVHERRU.js +188 -0
- package/dist/set-prompt-7HVHERRU.js.map +1 -0
- package/dist/setup-links-4VVNQVPU.js +141 -0
- package/dist/setup-links-4VVNQVPU.js.map +1 -0
- package/dist/{shared-AVM74EX7.js → shared-QAMP7FZV.js} +8 -6
- package/dist/shared-QAMP7FZV.js.map +1 -0
- package/dist/shopify-FSHM5M4I.js +3346 -0
- package/dist/shopify-FSHM5M4I.js.map +1 -0
- package/dist/site-Q2HTRLIW.js +177 -0
- package/dist/site-Q2HTRLIW.js.map +1 -0
- package/dist/sitemaps-XPGLW24S.js +87 -0
- package/dist/sitemaps-XPGLW24S.js.map +1 -0
- package/dist/sites-WMBY2HJV.js +101 -0
- package/dist/sites-WMBY2HJV.js.map +1 -0
- package/dist/skills-3HEILQCU.js +47 -0
- package/dist/skills-3HEILQCU.js.map +1 -0
- package/dist/sources-2KN4RJNJ.js +30 -0
- package/dist/sources-2KN4RJNJ.js.map +1 -0
- package/dist/sources-4I2YMS2K.js +421 -0
- package/dist/sources-4I2YMS2K.js.map +1 -0
- package/dist/stale-IN7WSBLC.js +66 -0
- package/dist/stale-IN7WSBLC.js.map +1 -0
- package/dist/stats-GNILHSKK.js +34 -0
- package/dist/stats-GNILHSKK.js.map +1 -0
- package/dist/status-6SLKZWNR.js +62 -0
- package/dist/status-6SLKZWNR.js.map +1 -0
- package/dist/sticker-KCV3VZHY.js +94 -0
- package/dist/sticker-KCV3VZHY.js.map +1 -0
- package/dist/stock-VTORKR4C.js +179 -0
- package/dist/stock-VTORKR4C.js.map +1 -0
- package/dist/studio-QCRA6BY5.js +49 -0
- package/dist/studio-QCRA6BY5.js.map +1 -0
- package/dist/sync-455DB46Y.js +54 -0
- package/dist/sync-455DB46Y.js.map +1 -0
- package/dist/sync-A4KKQ3B6.js +265 -0
- package/dist/sync-A4KKQ3B6.js.map +1 -0
- package/dist/sync-LFZV5NBN.js +54 -0
- package/dist/sync-LFZV5NBN.js.map +1 -0
- package/dist/sync-definition-IJISZ5VQ.js +55 -0
- package/dist/sync-definition-IJISZ5VQ.js.map +1 -0
- package/dist/tag-manager-E7QTXBWQ.js +43 -0
- package/dist/tag-manager-E7QTXBWQ.js.map +1 -0
- package/dist/tags-6OAZOQYO.js +26 -0
- package/dist/tags-6OAZOQYO.js.map +1 -0
- package/dist/tags-6YRMDX3R.js +20 -0
- package/dist/tags-6YRMDX3R.js.map +1 -0
- package/dist/tags-EWXZSZYE.js +20 -0
- package/dist/tags-EWXZSZYE.js.map +1 -0
- package/dist/tags-SZCNPE2D.js +224 -0
- package/dist/tags-SZCNPE2D.js.map +1 -0
- package/dist/tags-TCFFP534.js +20 -0
- package/dist/tags-TCFFP534.js.map +1 -0
- package/dist/targeting-constants-D64YO3E7.js +118 -0
- package/dist/targeting-constants-D64YO3E7.js.map +1 -0
- package/dist/targeting-criteria-ESOC7KNX.js +113 -0
- package/dist/targeting-criteria-ESOC7KNX.js.map +1 -0
- package/dist/targets-IPBEB5KU.js +102 -0
- package/dist/targets-IPBEB5KU.js.map +1 -0
- package/dist/templates-IJ7FR3LA.js +178 -0
- package/dist/templates-IJ7FR3LA.js.map +1 -0
- package/dist/testimonials-IXS7CP6P.js +32 -0
- package/dist/testimonials-IXS7CP6P.js.map +1 -0
- package/dist/themes-MXNKJWMW.js +94 -0
- package/dist/themes-MXNKJWMW.js.map +1 -0
- package/dist/top-companies-NO6L2V6M.js +108 -0
- package/dist/top-companies-NO6L2V6M.js.map +1 -0
- package/dist/translate-QCE5ZB7M.js +600 -0
- package/dist/translate-QCE5ZB7M.js.map +1 -0
- package/dist/triggers-KXUDMDSA.js +141 -0
- package/dist/triggers-KXUDMDSA.js.map +1 -0
- package/dist/tweets-ZUKQAAUQ.js +123 -0
- package/dist/tweets-ZUKQAAUQ.js.map +1 -0
- package/dist/unfollow-A4JVCJBF.js +46 -0
- package/dist/unfollow-A4JVCJBF.js.map +1 -0
- package/dist/unlink-E3N36NYQ.js +67 -0
- package/dist/unlink-E3N36NYQ.js.map +1 -0
- package/dist/unstage-TRMHSHED.js +84 -0
- package/dist/unstage-TRMHSHED.js.map +1 -0
- package/dist/unstage-ZRLLCSQF.js +95 -0
- package/dist/unstage-ZRLLCSQF.js.map +1 -0
- package/dist/update-EWGWAXAQ.js +142 -0
- package/dist/update-EWGWAXAQ.js.map +1 -0
- package/dist/update-OKOQE7U2.js +155 -0
- package/dist/update-OKOQE7U2.js.map +1 -0
- package/dist/update-VSFHID2D.js +63 -0
- package/dist/update-VSFHID2D.js.map +1 -0
- package/dist/update-XGCGQDJ4.js +98 -0
- package/dist/update-XGCGQDJ4.js.map +1 -0
- package/dist/upload-BOYMDDEQ.js +126 -0
- package/dist/upload-BOYMDDEQ.js.map +1 -0
- package/dist/upload-XEHWYMJG.js +150 -0
- package/dist/upload-XEHWYMJG.js.map +1 -0
- package/dist/upscale-I5P2OHTN.js +109 -0
- package/dist/upscale-I5P2OHTN.js.map +1 -0
- package/dist/url-options-PCZEQE66.js +130 -0
- package/dist/url-options-PCZEQE66.js.map +1 -0
- package/dist/url-params-DV37GEQF.js +98 -0
- package/dist/url-params-DV37GEQF.js.map +1 -0
- package/dist/use-U4HG2NF3.js +95 -0
- package/dist/use-U4HG2NF3.js.map +1 -0
- package/dist/validate-5AV4FJZ5.js +91 -0
- package/dist/validate-5AV4FJZ5.js.map +1 -0
- package/dist/variant-FOVE6URJ.js +338 -0
- package/dist/variant-FOVE6URJ.js.map +1 -0
- package/dist/videos-IJ67PPJV.js +39 -0
- package/dist/videos-IJ67PPJV.js.map +1 -0
- package/dist/view-HRI3FHCH.js +121 -0
- package/dist/view-HRI3FHCH.js.map +1 -0
- package/dist/viewer-check-JYUE24M6.js +68 -0
- package/dist/viewer-check-JYUE24M6.js.map +1 -0
- package/dist/web-LJ36FRWD.js +140 -0
- package/dist/web-LJ36FRWD.js.map +1 -0
- package/dist/winners-SMMDN6LW.js +113 -0
- package/dist/winners-SMMDN6LW.js.map +1 -0
- package/dist/winning-ads-JIG2MQHJ.js +84 -0
- package/dist/winning-ads-JIG2MQHJ.js.map +1 -0
- package/dist/write-commands-7Z34WG2J.js +206 -0
- package/dist/write-commands-7Z34WG2J.js.map +1 -0
- package/dist/write-commands-BLT2SEC4.js +713 -0
- package/dist/write-commands-BLT2SEC4.js.map +1 -0
- package/dist/write-commands-GOZU6ENR.js +1015 -0
- package/dist/write-commands-GOZU6ENR.js.map +1 -0
- package/dist/write-commands-KA3QXVSF.js +737 -0
- package/dist/write-commands-KA3QXVSF.js.map +1 -0
- package/dist/x-6HBVXIKH.js +47 -0
- package/dist/x-6HBVXIKH.js.map +1 -0
- package/package.json +9 -2
- package/dist/chunk-HJEMOSPH.js +0 -1292
- package/dist/chunk-HJEMOSPH.js.map +0 -1
- package/dist/chunk-JHKW6IDX.js +0 -9989
- package/dist/chunk-JHKW6IDX.js.map +0 -1
- package/dist/chunk-MF7YA62W.js.map +0 -1
- package/dist/chunk-VZEDAFAR.js.map +0 -1
- package/dist/chunk-WWCLT3RG.js.map +0 -1
- package/dist/client-GR6YL3YX.js +0 -17
- package/dist/output-VQSTVRH7.js +0 -18
- /package/dist/{chunk-JTZXQRXI.js.map → chunk-TPXI2GCW.js.map} +0 -0
- /package/dist/{client-GR6YL3YX.js.map → chunk-YQSBHWOI.js.map} +0 -0
- /package/dist/{env-4P5HOGNA.js.map → client-26SAJ46D.js.map} +0 -0
- /package/dist/{output-VQSTVRH7.js.map → connect-WYUYS5V4.js.map} +0 -0
- /package/dist/{shared-AVM74EX7.js.map → customers-HYE7N2H5.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/avatars/casting.ts","../src/commands/avatars/failures.ts"],"sourcesContent":["import type { AvatarLikeness, AvatarStatus, AvatarSummary } from \"@baker/api\";\nimport { optionalChatId } from \"../../env.ts\";\n\n/** What an avatar has to look like before it can be put on screen. */\nexport interface CastingSubject {\n handle: string;\n status: AvatarStatus;\n sheetUrl?: string;\n errorMessage?: string;\n /** Parked on a face the user has not picked. `generating` with nothing rendering. */\n needsFace?: boolean;\n}\n\n// Observed failure, end to end: the agent cast an avatar, gave it a voice, then\n// rendered two clips by PASTING the subject description into the prompt and\n// leaving `--avatar` off. Every hint here used to teach exactly that shape, so\n// the rule now leads with the flag and only then explains the words.\nconst CAST_FLAG_RULE =\n \"Cast with `--avatar <handle>` on `baker studio generate`, `baker studio animate`, `baker canvas scaffold-ad`, `baker canvas scaffold-static-ad` and `baker canvas scaffold-video`. Don't hand-roll it by pasting `subjectDescription` into the prompt or by passing the sheet through `--reference` — both render something that merely resembles them. `--avatar` is also the only thing that carries their accent and delivery into a clip. An avatar has no pinned voice by design (ADR 0005): the video model renders the voice, and the region on their profile is the only thing steering it — without the flag the clip is performed flat, in whatever accent the model picks on its own. `baker canvas scaffold-video` casts only their face: a reproduced video keeps the source ad's accent direction, so never tell the user it speaks in theirs.\";\n\nconst VERBATIM_RULE =\n \"When you do write the description yourself — a hand-built canvas node, a landing image, anywhere `--avatar` does not exist — copy `subjectDescription` verbatim, word for word. Re-phrasing it per generation is the other reason a face drifts across a set.\";\n\n// ByteDance's filter refuses photoreal human faces, AI-generated ones included,\n// so a presenter clip routed to Seedance is a paid refusal every time.\nconst VIDEO_ROUTING =\n \"In video, a photoreal presenter renders on `google/veo-3.1` (or `google/veo-3.1-fast`), never `bytedance/seedance-2.0` — it refuses photoreal human faces, AI-generated ones included. Reproducing a video the user gave you: `baker canvas scaffold-video … --avatar <handle> --real-face`.\";\n\n/**\n * What the agent should do next with this avatar, keyed off its status.\n *\n * The two lines that matter on a ready avatar are the same two things that make\n * a face hold still across a set: ground on the identity sheet, and reuse the\n * subject description word for word.\n */\nexport function castingHints(avatar: CastingSubject): string[] {\n // Before the building hint, and deliberately loud. `generating` normally means a\n // render is running, so every piece of advice below reads as \"come back in a moment\"\n // — and an agent that acts on it here waits out a deadline on work that has not\n // started. Observed end to end: two 90s `--wait` calls against this exact state, then\n // a delete and a recreate with `--face auto`, which took the choice off the user\n // while the four portraits were still on their screen.\n if (avatar.status === \"generating\" && avatar.needsFace) {\n return [\n `The user is picking @${avatar.handle}'s face right now — portraits are on their screen and nothing renders until they answer. There is NOTHING to wait for and nothing to check: do not poll, do not block on it, do not ask about the face in a question of your own, and do not delete or recreate this avatar. Whatever you do next simply runs after they have chosen.`,\n ];\n }\n\n if (avatar.status === \"generating\") {\n return [\n `Still building — a ~30s render that settles on its own, and this avatar is castable only once it reads \\`ready\\`. If the next thing you do needs it (a clip, a still, anything with --avatar), block on it: \\`baker avatars get ${avatar.handle} --wait\\` returns the moment it is ready. Otherwise do other work first and read it back with \\`baker avatars get ${avatar.handle}\\`. Never write your own sleep or poll loop, and never end the turn waiting — the user would have to come back and tell you it is ready.`,\n ];\n }\n\n if (avatar.status === \"error\") {\n return [\n `The identity sheet could not be built${avatar.errorMessage ? `: ${avatar.errorMessage}` : \"\"}. This avatar cannot be cast. Sharpen the subject description (one person, plain description, no scene) and rebuild: \\`baker avatars update ${avatar.handle} --subject \"…\" --regenerate-sheet\\`.`,\n ];\n }\n\n if (avatar.status === \"archived\") {\n return [\n `Retired. Work that already used it still resolves, but do not cast it into anything new — \\`baker avatars list\\` shows the roster you can cast from.`,\n ];\n }\n\n if (!avatar.sheetUrl) {\n return [\n `No identity sheet on this avatar yet, so there is nothing to ground a render on. Re-read it with \\`baker avatars get ${avatar.handle}\\`; if it stays this way, rebuild the sheet with \\`baker avatars update ${avatar.handle} --regenerate-sheet\\`.`,\n ];\n }\n\n return [\n `Ready to cast: \\`baker studio generate \"<your scene>\" --avatar ${avatar.handle}\\` for a still, \\`baker studio animate \"<the motion, and the line they say>\" --avatar ${avatar.handle}\\` for a clip.`,\n CAST_FLAG_RULE,\n VERBATIM_RULE,\n VIDEO_ROUTING,\n ];\n}\n\n/**\n * One line of the roster.\n *\n * `subjectDescription` is deliberately absent: it has to reach a prompt word for\n * word, and a list is exactly where a long description gets skimmed, wrapped, or\n * half-copied. `baker avatars get <handle>` is the one place it is read.\n */\nexport function rosterRow(avatar: AvatarSummary): Record<string, unknown> {\n return {\n handle: avatar.handle,\n name: avatar.name,\n status: avatar.status,\n likeness: avatar.likeness,\n sheetUrl: avatar.sheetUrl ?? null,\n avatarId: avatar.avatarId,\n ...(avatar.errorMessage ? { errorMessage: avatar.errorMessage } : {}),\n };\n}\n\n/** Next steps after reading the roster. */\n/**\n * The chat this command is running inside, when it is running inside one.\n *\n * Attribution is best-effort: a direct caller outside a chat still works, it just isn't\n * tied to a Session. Shared with the roster, which uses it to say which avatar the\n * current conversation is about.\n */\nexport function chatIdFromEnv(): string | undefined {\n return optionalChatId();\n}\n\nexport function rosterHints(\n roster: ReadonlyArray<{ handle: string; status: AvatarStatus; fromThisChat?: boolean }>,\n statusFilter: string | undefined,\n): string[] {\n if (roster.length === 0) {\n return [\n statusFilter\n ? `No avatars with status \"${statusFilter}\". Drop \\`--status\\` to see the whole roster.`\n : `No avatars yet — and retired ones are hidden unless you pass \\`--status archived\\`. Cast a new presenter with \\`baker avatars create --name \"…\" --subject \"…\"\\`.`,\n ];\n }\n\n // Leads the list, because the roster is the moment the agent picks who to use and the\n // rest of it is noise at that moment. Observed: the user had just chosen a face for an\n // avatar in this conversation, and the agent came back offering two from earlier chats\n // and asking which one to use — a question they had already answered by picking.\n const mine = roster.filter((avatar) => avatar.fromThisChat).map((avatar) => avatar.handle);\n const hints = mine.length\n ? [\n `@${mine[0]} was made in this conversation${\n mine.length > 1\n ? ` (with ${mine\n .slice(1)\n .map((h) => `@${h}`)\n .join(\", \")})`\n : \"\"\n } — that is the avatar this chat is about, and the user chose its face. Use it. The others belong to earlier conversations: only reach for one if the user names it, and never ask which to use when the answer is the one you just cast.`,\n ]\n : [];\n // Says what `CAST_FLAG_RULE` says, because this is the hint read at the moment the\n // agent picks who to use. It used to hand back \"the identity sheet URL for\n // `--reference`\" — the exact hand-rolled shape that rule bans — and an agent that\n // lists the roster and then casts never reads the rule itself.\n hints.push(\n \"Casting one of these? Cast them with `--avatar <handle>` on `baker studio generate` / `baker studio animate` — that flag carries their face AND their accent. `baker avatars get <handle>` returns the written profile behind it; the roster leaves the description out on purpose, because it must never be read half-way.\",\n );\n const building = roster.filter((avatar) => avatar.status === \"generating\").map((avatar) => avatar.handle);\n if (building.length > 0) {\n hints.push(\n `Still building, not castable yet: ${building.join(\", \")}. Check with \\`baker avatars get ${building[0]}\\` after your next piece of work.`,\n );\n }\n const failed = roster.filter((avatar) => avatar.status === \"error\").map((avatar) => avatar.handle);\n if (failed.length > 0) {\n hints.push(\n `Could not be built: ${failed.join(\", \")}. Read why with \\`baker avatars get ${failed[0]}\\`, then rebuild with \\`baker avatars update ${failed[0]} --subject \"…\" --regenerate-sheet\\`.`,\n );\n }\n return hints;\n}\n\n/** The parts of a profile that describe a PERFORMANCE rather than a photograph. */\nexport interface AvatarPerformanceProfile {\n persona?: string;\n speech?: string;\n accent?: string;\n motion?: string;\n wardrobe?: string;\n setting?: string;\n}\n\n/**\n * Warn when an avatar was cast on a bare description.\n *\n * A subject description alone is enough to keep a FACE consistent and nothing\n * else, so every clip built on it comes back stiff and generic — the fields that\n * tell a video model how this person moves, dresses and stands are simply absent\n * from the render.\n *\n * Measured on one avatar, same sheet, same 5s brief, inter-frame motion averaged\n * over the clip: a bare profile with a flat prompt scored 1.28; adding a real\n * motion brief took it to 3.28; filling `motion`/`persona`/`speech`/`wardrobe`/\n * `setting` as well reached 4.91 — 3.8x the movement, for text that costs\n * nothing. The prompt is the bigger lever of the two, but the profile is the one\n * that keeps paying out on every future clip instead of just this one.\n */\nexport function thinProfileHint(profile: AvatarPerformanceProfile | undefined, handle: string): string | null {\n const missing = ([\"motion\", \"persona\", \"speech\", \"accent\", \"wardrobe\", \"setting\"] as const).filter(\n (field) => !profile?.[field]?.trim(),\n );\n if (missing.length === 0) return null;\n return `MISSING ${missing.map((field) => `--${field}`).join(\" \")}. A bare subject description holds the face still and nothing else, so clips of @${handle} come out stiff and generic — measured, filling these in nearly doubled the movement in the same brief. --accent is the one nobody guesses and the only one that fails silently: it decides the LANGUAGE and accent the avatar speaks in, in every clip. Name the region whose language the USER is writing to you in (\"Spanish from Spain, Madrid accent\") — \"Spanish\" on its own renders as no accent at all, and a region taken from how the person LOOKS (\"European\", \"Nordic\") renders as that region's language: an ad for a Spanish client shipped with --accent \"German\" and came back spoken in German. The user almost certainly told you how this person talks and carries themselves; put it in: \\`baker avatars update ${handle} ${missing.map((field) => `--${field} \"…\"`).join(\" \")}\\`.`;\n}\n\n/**\n * Who picks the avatar's face.\n *\n * `ask` blocks on the user; `auto` lets the build cast one and keep it. Both are real\n * modes, not a default and a fallback: a scheduled agent rendering overnight has nobody to ask,\n * and blocking there would park the run until it times out.\n */\nexport type FaceChoice = \"ask\" | \"auto\";\n\n/**\n * Read `--face`. Null for a value this does not know.\n *\n * Defaulting to `ask` rather than `auto` is the deliberate half: an unasked face is\n * silent — the avatar comes back ready and looks finished, and nothing about it says the\n * user was skipped. A blocked turn is loud, and a person who is there can answer it.\n */\nexport function parseFaceChoice(raw: string | undefined): FaceChoice | null {\n if (raw === undefined) return \"ask\";\n const value = raw.trim().toLowerCase();\n if (value === \"ask\" || value === \"auto\") return value;\n return null;\n}\n\n/** Next steps straight after casting a new avatar — it is never ready yet. */\nexport function creationHints(\n created: { handle: string; status: AvatarStatus; likeness: AvatarLikeness; faceChoice?: FaceChoice },\n profile?: AvatarPerformanceProfile,\n): string[] {\n const thin = thinProfileHint(profile, created.handle);\n // First, ahead of everything — including \"still building, come back later\", which is\n // true and is also the hint an agent acts on. Left to that one it goes off and does\n // other work, and when it does want the user to choose a face it invents a question of\n // its own: four text options, no portraits, a choice nobody can actually make. The\n // sheet this avatar is building right now is fused from a face nobody has seen.\n const casting =\n created.likeness === \"synthetic\" && created.faceChoice === \"auto\"\n ? [\n `No one was asked about this face — \\`--face auto\\` cast it and it is kept. Do not tell the user they chose it, and do not offer them a pick you are not going to run. If this should have been theirs, say so and create it again with \\`--face ask\\`.`,\n ]\n : created.likeness === \"synthetic\"\n ? [\n `The user is being shown real portraits of @${created.handle} right now, and the turn waits for them to pick — this happens on its own, triggered by the command you just ran. The picker is already showing, so don't call request_avatar_casting, don't ask about the face in a question of your own, and don't wait or poll: whatever you do next simply runs after they have chosen — or, if they have not picked within 30 seconds of the faces appearing, after the first face is kept for them (then never say they chose it). Say what you created, then carry on with what the user asked for: when that was only the avatar, or they said to stop after it, stop there and render nothing.`,\n ]\n : [];\n const hints = [\n ...casting,\n ...(thin ? [thin] : []),\n ...castingHints({ handle: created.handle, status: created.status }),\n `Once it is ready, cast it with \\`--avatar ${created.handle}\\` on \\`baker studio generate\\` / \\`baker studio animate\\` — that flag is what grounds the render on its identity sheet and, for a clip, what carries their accent and delivery into the read.`,\n ];\n if (created.likeness === \"licensed\") {\n hints.push(\n \"This avatar carries a real person's likeness, used on the company's confirmation that it may appear in their advertising. Keep it out of any creative that would misrepresent them, and out of claims they did not make.\",\n );\n }\n return hints;\n}\n\n/** Next steps after an edit — mostly about keeping sheet and description in sync. */\nexport function updateHints(update: {\n avatar: CastingSubject;\n subjectChanged: boolean;\n regeneratedSheet: boolean;\n previousHandle: string;\n}): string[] {\n const hints: string[] = [];\n if (update.previousHandle !== update.avatar.handle) {\n hints.push(\n `Renamed to @${update.avatar.handle}. @${update.previousHandle} no longer resolves — update anything that mentioned it.`,\n );\n }\n\n if (update.regeneratedSheet) {\n hints.push(\n `Rebuilding the identity sheet (~30s). The avatar is back to building and cannot be cast until \\`baker avatars get ${update.avatar.handle}\\` shows \\`ready\\` — and the sheet URL changes, so drop any \\`--reference\\` you were reusing and read the new one.`,\n );\n return hints;\n }\n\n if (update.subjectChanged) {\n hints.push(\n `MISSING --regenerate-sheet. You changed the subject description but the identity sheet still shows the person you described before, so the words and the face no longer match and every new render will drift. Re-run: \\`baker avatars update ${update.avatar.handle} --regenerate-sheet\\` (a ~30s rebuild, billed).`,\n );\n return hints;\n }\n\n hints.push(...castingHints(update.avatar));\n return hints;\n}\n\n/** Next steps after retiring or deleting an avatar. */\nexport function removalHints(removal: { handle: string; archived: boolean }): string[] {\n if (removal.archived) {\n return [\n `Retired @${removal.handle}. Work that already used it still resolves and its images stay as they are; it no longer shows in \\`baker avatars list\\` and must not be cast into anything new.`,\n ];\n }\n return [\n `Deleted @${removal.handle} for good. The mention no longer resolves anywhere — creatives that already rendered keep their images, but nothing new can be grounded on this identity. \\`--archive\\` is the reversible option next time.`,\n ];\n}\n\n/**\n * Flatten one avatar for `--output md|files`, which can only print scalars.\n * JSON output is untouched — it already carries the shape the API returned.\n */\nexport function avatarRowNormalizer(record: Record<string, unknown>): Record<string, unknown> {\n const flat: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(record)) {\n if (Array.isArray(value)) {\n flat[key] = value.join(\"; \");\n continue;\n }\n if (value !== null && typeof value === \"object\") {\n for (const [nested, nestedValue] of Object.entries(value as Record<string, unknown>)) {\n flat[nested] = Array.isArray(nestedValue) ? nestedValue.join(\"; \") : nestedValue;\n }\n continue;\n }\n flat[key] = value;\n }\n return flat;\n}\n","import { ApiError } from \"../../client.ts\";\nimport { writeJson } from \"../../output.ts\";\n\ntype Remediation = { action: string; explanation: string } & Record<string, unknown>;\n\nexport function failValidation(message: string, fix?: Remediation): never {\n writeJson({ ok: false, error: { code: \"VALIDATION_ERROR\", message, ...(fix ? { fix } : {}) } });\n process.exit(1);\n}\n\n/**\n * The remedy for a failed avatar call, when there is one.\n *\n * An unknown handle and a taken one are the two failures the agent can act on, and each\n * has exactly one right move — which is the point: left with a bare message it invents a\n * third. A taken handle became a silent rename (\"Elena\" already existed from an earlier\n * chat, so it created \"Marta\"), which left the user reading about one avatar and looking\n * at another.\n */\n/** Which call failed. A CONFLICT means two different things on create and on remove. */\nexport interface AvatarFailureContext {\n operation?: \"remove\";\n}\n\nexport function avatarFailureFix(\n err: ApiError,\n handle?: string,\n context: AvatarFailureContext = {},\n): Remediation | undefined {\n if (err.code === \"NOT_FOUND\") {\n return {\n action: \"list_avatars\",\n explanation: `Run \\`baker avatars list\\` to see which avatars this company has${handle ? ` — \"${handle}\" is not one of them` : \"\"}. Handles are lowercase letters, numbers and dashes (\"maria-founder\", not \"Maria Founder\"). If the roster is empty, create the avatar first with \\`baker avatars create\\`. Do not abandon the wider job over this — carry on without the avatar and say so.`,\n };\n }\n // A removal is refused for one reason only: the user is choosing this avatar's face.\n // Falling through to the handle-collision remedy below answered that with \"use the\n // existing avatar\", which is both wrong and an invitation to go find another one.\n if (err.code === \"CONFLICT\" && context.operation === \"remove\") {\n return {\n action: \"wait_for_the_user\",\n explanation: `Do not remove or recreate${handle ? ` @${handle}` : \" this avatar\"} — wait. The portraits are on the user's screen and the turn continues once they answer. If you think the faces are wrong, say so in your reply and let them turn all four down; that recasts the same avatar from what they tell you was missing, and keeps everything already pointing at it.`,\n };\n }\n if (err.code === \"CONFLICT\" && handle) {\n return {\n action: \"use_the_existing_avatar\",\n explanation: `@${handle} already exists in this company — avatars belong to the company, not to a chat, so one made in an earlier conversation is still here and still castable. If it is the person you want, use it as it is: \\`--avatar ${handle}\\`. Read it first with \\`baker avatars get ${handle} --full\\` and say who they already are. Do not create the same person under a second name: the user would be told about one avatar and handed another, and the company ends up with duplicates nobody chose a face for. If you genuinely need a different person, ask the user what to call them.`,\n };\n }\n return undefined;\n}\n\n/**\n * Report a failed avatar call.\n */\nexport function failAvatarApi(err: unknown, handle?: string, context: AvatarFailureContext = {}): never {\n if (err instanceof ApiError) {\n const fix = avatarFailureFix(err, handle, context);\n writeJson({ ok: false, error: { code: err.code, message: err.message, ...(fix ? { fix } : {}) } });\n process.exit(1);\n }\n if (err instanceof Error) {\n writeJson({ ok: false, error: { code: \"INTERNAL_ERROR\", message: err.message } });\n process.exit(1);\n }\n writeJson({ ok: false, error: { code: \"INTERNAL_ERROR\", message: \"Unexpected error\" } });\n process.exit(1);\n}\n"],"mappings":";;;;;;;;;;;AAiBA,IAAM,iBACJ;AAEF,IAAM,gBACJ;AAIF,IAAM,gBACJ;AASK,SAAS,aAAa,QAAkC;AAO7D,MAAI,OAAO,WAAW,gBAAgB,OAAO,WAAW;AACtD,WAAO;AAAA,MACL,wBAAwB,OAAO,MAAM;AAAA,IACvC;AAAA,EACF;AAEA,MAAI,OAAO,WAAW,cAAc;AAClC,WAAO;AAAA,MACL,wOAAmO,OAAO,MAAM,qHAAqH,OAAO,MAAM;AAAA,IACpX;AAAA,EACF;AAEA,MAAI,OAAO,WAAW,SAAS;AAC7B,WAAO;AAAA,MACL,wCAAwC,OAAO,eAAe,KAAK,OAAO,YAAY,KAAK,EAAE,+IAA+I,OAAO,MAAM;AAAA,IAC3P;AAAA,EACF;AAEA,MAAI,OAAO,WAAW,YAAY;AAChC,WAAO;AAAA,MACL;AAAA,IACF;AAAA,EACF;AAEA,MAAI,CAA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AACvF,UAAQ,KAAK,CAAC;AAChB;","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/connected-resources.ts
|
|
2
|
+
function listed(resources) {
|
|
3
|
+
return resources.map((resource) => resource.label ? `${resource.id} (${resource.label})` : resource.id).join("; ");
|
|
4
|
+
}
|
|
5
|
+
function connectedResourceHints({ plural, singular, flag, resources }) {
|
|
6
|
+
if (resources.length === 0) {
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
if (resources.length === 1) {
|
|
10
|
+
return [`This company connected one ${singular}: ${listed(resources)}. Commands use it unless you pass ${flag}.`];
|
|
11
|
+
}
|
|
12
|
+
return [
|
|
13
|
+
`This company connected ${resources.length} ${plural}: ${listed(resources)}. Each command works on one, so pass ${flag} \u2014 nothing is picked for you. A question about the whole business covers all ${resources.length}: answering from one and reporting it as the total is wrong.`
|
|
14
|
+
];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
connectedResourceHints
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=chunk-P4NSJS54.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/connected-resources.ts"],"sourcesContent":["/**\n * What an agent must be told about what a company actually connected.\n *\n * Every connection picker is multi-select — GA4 properties, Search Console\n * sites, ad accounts, Tag Manager containers — so \"the property\" is an\n * assumption, not a fact. Two failures follow from that assumption, and this\n * hint heads off both: a command that names no resource is refused (each one\n * works on a single resource, and nothing is picked for the agent), and an\n * answer built from whichever came back first gets reported as the whole\n * business. The list rides along with the hint so the agent can act on it\n * without a second call.\n */\n\nexport interface ConnectedResource {\n /** What the flag takes: property id, customer id, site url, container id. */\n id: string;\n /** How the user knows it. */\n label?: string;\n}\n\nexport interface ConnectedResourceHintSpec {\n /** Plural noun in the user's words: \"GA4 properties\", \"Google Ads accounts\". */\n plural: string;\n /** Singular of the same noun. */\n singular: string;\n /** The flag that names one: \"--property-id\", \"--customer-id\". */\n flag: string;\n resources: ConnectedResource[];\n}\n\nfunction listed(resources: ConnectedResource[]): string {\n return resources.map((resource) => (resource.label ? `${resource.id} (${resource.label})` : resource.id)).join(\"; \");\n}\n\nexport function connectedResourceHints({ plural, singular, flag, resources }: ConnectedResourceHintSpec): string[] {\n if (resources.length === 0) {\n return [];\n }\n if (resources.length === 1) {\n return [`This company connected one ${singular}: ${listed(resources)}. Commands use it unless you pass ${flag}.`];\n }\n return [\n `This company connected ${resources.length} ${plural}: ${listed(resources)}. Each command works on one, so pass ` +\n `${flag} — nothing is picked for you. A question about the whole business covers all ${resources.length}: ` +\n \"answering from one and reporting it as the total is wrong.\",\n ];\n}\n"],"mappings":";AA8BA,SAAS,OAAO,WAAwC;AACtD,SAAO,UAAU,IAAI,CAAC,aAAc,SAAS,QAAQ,GAAG,SAAS,EAAE,KAAK,SAAS,KAAK,MAAM,SAAS,EAAG,EAAE,KAAK,IAAI;AACrH;AAEO,SAAS,uBAAuB,EAAE,QAAQ,UAAU,MAAM,UAAU,GAAwC;AACjH,MAAI,UAAU,WAAW,GAAG;AAC1B,WAAO,CAAC;AAAA,EACV;AACA,MAAI,UAAU,WAAW,GAAG;AAC1B,WAAO,CAAC,8BAA8B,QAAQ,KAAK,OAAO,SAAS,CAAC,qCAAqC,IAAI,GAAG;AAAA,EAClH;AACA,SAAO;AAAA,IACL,0BAA0B,UAAU,MAAM,IAAI,MAAM,KAAK,OAAO,SAAS,CAAC,wCACrE,IAAI,qFAAgF,UAAU,MAAM;AAAA,EAE3G;AACF;","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_VIDEO_GENERATE_MODEL,
|
|
3
|
+
clipAudioMode,
|
|
4
|
+
spokenWordsIn
|
|
5
|
+
} from "./chunk-CAMX6OHF.js";
|
|
6
|
+
|
|
7
|
+
// src/commands/studio/avatarModel.ts
|
|
8
|
+
function pinnedModelHint(input) {
|
|
9
|
+
if (!input.avatar || !input.model) return null;
|
|
10
|
+
if (input.model === DEFAULT_VIDEO_GENERATE_MODEL) return null;
|
|
11
|
+
const speaks = input.generateAudio ?? true;
|
|
12
|
+
if (!speaks) return null;
|
|
13
|
+
return `You pinned --model ${input.model} on a speaking avatar. Without it this clip routes to ${DEFAULT_VIDEO_GENERATE_MODEL}, which was chosen for exactly this case: the better picture, both orientations, and audio always on. Drop --model unless the user asked for a specific one \u2014 and note ${input.model} may not take the length or the reference you are counting on.`;
|
|
14
|
+
}
|
|
15
|
+
function silentModelHint(model, prompt) {
|
|
16
|
+
if (!model || !prompt) return null;
|
|
17
|
+
if (clipAudioMode(model) !== "never") return null;
|
|
18
|
+
if (spokenWordsIn(prompt) === 0) return null;
|
|
19
|
+
return `${model} renders no audio \u2014 the line in this prompt will be mouthed and never heard. For a shot where someone speaks use ${DEFAULT_VIDEO_GENERATE_MODEL} (audio always on), or alibaba/wan-3.0 past 10 seconds. Keep this model for shots with no voice in them.`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
pinnedModelHint,
|
|
24
|
+
silentModelHint
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=chunk-P5T7OZKV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/studio/avatarModel.ts"],"sourcesContent":["import { clipAudioMode, DEFAULT_VIDEO_GENERATE_MODEL, spokenWordsIn } from \"@baker/canvas-contract\";\n\n/**\n * Pinning a model on a speaking avatar, which the routing had already decided better.\n *\n * A cast avatar with sound routes to Gemini Omni on purpose: it is the better picture, it\n * renders both orientations, and its audio is always on — which is what a talking clip\n * needs. Pin something else and that decision is discarded silently.\n *\n * Observed: the agent pinned `google/veo-3.1` unasked. Veo takes a first frame but no\n * reference, and renders 4, 6 or 8 seconds only — so its first attempt, at 15 seconds,\n * was refused outright. Nothing in the docs pointed there; it simply assumed.\n */\nexport function pinnedModelHint(input: { avatar?: string; model?: string; generateAudio?: boolean }): string | null {\n if (!input.avatar || !input.model) return null;\n if (input.model === DEFAULT_VIDEO_GENERATE_MODEL) return null;\n const speaks = input.generateAudio ?? true;\n if (!speaks) return null;\n return `You pinned --model ${input.model} on a speaking avatar. Without it this clip routes to ${DEFAULT_VIDEO_GENERATE_MODEL}, which was chosen for exactly this case: the better picture, both orientations, and audio always on. Drop --model unless the user asked for a specific one — and note ${input.model} may not take the length or the reference you are counting on.`;\n}\n\n/**\n * A spoken line handed to a model that renders picture only.\n *\n * Runway and both Groks carry no audio at all. The line still gets mouthed — the take\n * looks almost right, and the silence is discovered by watching it, after paying. The\n * Studio now prints \"No sound\" for these; this is the same fact where the agent works.\n */\nexport function silentModelHint(model: string | undefined, prompt: string | undefined): string | null {\n if (!model || !prompt) return null;\n if (clipAudioMode(model) !== \"never\") return null;\n if (spokenWordsIn(prompt) === 0) return null;\n return `${model} renders no audio — the line in this prompt will be mouthed and never heard. For a shot where someone speaks use ${DEFAULT_VIDEO_GENERATE_MODEL} (audio always on), or alibaba/wan-3.0 past 10 seconds. Keep this model for shots with no voice in them.`;\n}\n"],"mappings":";;;;;;;AAaO,SAAS,gBAAgB,OAAoF;AAClH,MAAI,CAAC,MAAM,UAAU,CAAC,MAAM,MAAO,QAAO;AAC1C,MAAI,MAAM,UAAU,6BAA8B,QAAO;AACzD,QAAM,SAAS,MAAM,iBAAiB;AACtC,MAAI,CAAC,OAAQ,QAAO;AACpB,SAAO,sBAAsB,MAAM,KAAK,yDAAyD,4BAA4B,+KAA0K,MAAM,KAAK;AACpT;AASO,SAAS,gBAAgB,OAA2B,QAA2C;AACpG,MAAI,CAAC,SAAS,CAAC,OAAQ,QAAO;AAC9B,MAAI,cAAc,KAAK,MAAM,QAAS,QAAO;AAC7C,MAAI,cAAc,MAAM,MAAM,EAAG,QAAO;AACxC,SAAO,GAAG,KAAK,yHAAoH,4BAA4B;AACjK;","names":[]}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import {
|
|
2
|
+
handleConnectionError,
|
|
3
|
+
needsConnectionFix,
|
|
4
|
+
writeAdsJson
|
|
5
|
+
} from "./chunk-BVM5IRZW.js";
|
|
6
|
+
import {
|
|
7
|
+
LINKEDIN_SEARCH_STATUSES,
|
|
8
|
+
unsupportedLinkedinSearchStatuses
|
|
9
|
+
} from "./chunk-KRIK2JR4.js";
|
|
10
|
+
import {
|
|
11
|
+
ApiError
|
|
12
|
+
} from "./chunk-HREWXNTO.js";
|
|
13
|
+
import {
|
|
14
|
+
MissingChatIdError,
|
|
15
|
+
getEnv
|
|
16
|
+
} from "./chunk-O6QKCJE4.js";
|
|
17
|
+
|
|
18
|
+
// src/commands/ads/linkedin/shared.ts
|
|
19
|
+
var DAY_MS = 864e5;
|
|
20
|
+
function handleLinkedinError(err) {
|
|
21
|
+
if (err instanceof ApiError) {
|
|
22
|
+
if (needsConnectionFix(err.code, err.message)) {
|
|
23
|
+
handleConnectionError("linkedin_ads", err.message);
|
|
24
|
+
}
|
|
25
|
+
if (isNoAccountsSelectedError(err.code, err.message)) {
|
|
26
|
+
handleConnectionError("linkedin_ads", err.message);
|
|
27
|
+
}
|
|
28
|
+
const explanation = explainLinkedinError(err);
|
|
29
|
+
const envelope = {
|
|
30
|
+
ok: false,
|
|
31
|
+
error: {
|
|
32
|
+
code: err.code,
|
|
33
|
+
message: err.message,
|
|
34
|
+
fix: {
|
|
35
|
+
action: explanation.action,
|
|
36
|
+
explanation: explanation.message,
|
|
37
|
+
correctedCommand: explanation.correctedCommand
|
|
38
|
+
},
|
|
39
|
+
retryable: err.code === "RATE_LIMITED" || err.code === "UNAVAILABLE" || err.code === "INTERNAL_ERROR"
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
writeAdsJson(envelope);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
writeAdsJson(unexpectedErrorEnvelope(err));
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
function unexpectedErrorEnvelope(err) {
|
|
49
|
+
if (err instanceof MissingChatIdError) {
|
|
50
|
+
return {
|
|
51
|
+
ok: false,
|
|
52
|
+
error: {
|
|
53
|
+
code: err.code,
|
|
54
|
+
message: err.message,
|
|
55
|
+
fix: {
|
|
56
|
+
action: "reject",
|
|
57
|
+
explanation: "LinkedIn changes are staged in a chat and this run has none. Don't retry: carry on with the rest of the job and tell the user this change couldn't be staged from here."
|
|
58
|
+
},
|
|
59
|
+
retryable: false
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const message = err instanceof Error ? err.message : "Unexpected error";
|
|
64
|
+
return { ok: false, error: { code: "NETWORK_ERROR", message } };
|
|
65
|
+
}
|
|
66
|
+
function isNoAccountsSelectedError(code, message) {
|
|
67
|
+
return code === "VALIDATION_ERROR" && /no linkedin ad accounts selected/i.test(message);
|
|
68
|
+
}
|
|
69
|
+
function explainLinkedinError(err) {
|
|
70
|
+
const lower = err.message.toLowerCase();
|
|
71
|
+
if (err.code === "VALIDATION_ERROR" && lower.includes("granularity") && lower.includes("daily")) {
|
|
72
|
+
return {
|
|
73
|
+
action: "retry_with_flag",
|
|
74
|
+
message: "LinkedIn rejects DAILY granularity when pivoting on demographic dims (job-title, company, etc.). Re-run with --granularity ALL or MONTHLY.",
|
|
75
|
+
correctedCommand: void 0
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
if (err.code === "RATE_LIMITED") {
|
|
79
|
+
return {
|
|
80
|
+
action: "wait_and_retry",
|
|
81
|
+
message: "Hit a LinkedIn throttle. The CLI already backs off automatically \u2014 if you see this you've exhausted the retry budget. Wait ~60s and retry."
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
if (err.code === "INTERNAL_ERROR" && lower.includes("deprecat")) {
|
|
85
|
+
return {
|
|
86
|
+
action: "reject",
|
|
87
|
+
message: "LinkedIn-Version header is deprecated. The backend constant LINKEDIN_API_VERSION needs to be bumped \u2014 file an issue or update the constant."
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
return { action: "reject", message: err.message };
|
|
91
|
+
}
|
|
92
|
+
var LI_ACCOUNT_ID_RE = /^(urn:li:sponsoredAccount:)?\d+$/;
|
|
93
|
+
function resolveAccountIdArg(args) {
|
|
94
|
+
const fromArgs = args["account-id"] ?? args["account-urn"];
|
|
95
|
+
const id = fromArgs || getEnv().BAKER_LINKEDIN_AD_ACCOUNT_ID;
|
|
96
|
+
if (!id) {
|
|
97
|
+
writeAdsJson({
|
|
98
|
+
ok: false,
|
|
99
|
+
error: {
|
|
100
|
+
code: "MISSING_ACCOUNT_ID",
|
|
101
|
+
message: "Pass --account-id (numeric) or --account-urn (urn:li:sponsoredAccount:N), or set BAKER_LINKEDIN_AD_ACCOUNT_ID. Run `baker ads linkedin accounts` to find IDs."
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
process.exit(1);
|
|
105
|
+
}
|
|
106
|
+
if (!LI_ACCOUNT_ID_RE.test(id)) {
|
|
107
|
+
writeAdsJson({
|
|
108
|
+
ok: false,
|
|
109
|
+
error: {
|
|
110
|
+
code: "INVALID_ACCOUNT_ID",
|
|
111
|
+
message: `Invalid LinkedIn account ID "${id}". Expected numeric or urn:li:sponsoredAccount:N.`
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
process.exit(1);
|
|
115
|
+
}
|
|
116
|
+
return id.startsWith("urn:") ? id.split(":").pop() ?? id : id;
|
|
117
|
+
}
|
|
118
|
+
function todayIso() {
|
|
119
|
+
return (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
120
|
+
}
|
|
121
|
+
function daysAgoIso(days) {
|
|
122
|
+
return new Date(Date.now() - days * DAY_MS).toISOString().slice(0, 10);
|
|
123
|
+
}
|
|
124
|
+
function csvOrJson(args) {
|
|
125
|
+
return args.output ?? "json";
|
|
126
|
+
}
|
|
127
|
+
function statusesArgDescription(level) {
|
|
128
|
+
return `CSV of statuses (${LINKEDIN_SEARCH_STATUSES[level].join(",")})`;
|
|
129
|
+
}
|
|
130
|
+
function statusFilterError(level, statuses) {
|
|
131
|
+
const unsupported = unsupportedLinkedinSearchStatuses(level, statuses);
|
|
132
|
+
if (unsupported.length === 0) {
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
const accepted = LINKEDIN_SEARCH_STATUSES[level].join(",");
|
|
136
|
+
return {
|
|
137
|
+
ok: false,
|
|
138
|
+
error: {
|
|
139
|
+
code: "INVALID_STATUS",
|
|
140
|
+
message: `LinkedIn does not accept status ${unsupported.join(", ")} for this listing.`,
|
|
141
|
+
fix: {
|
|
142
|
+
action: "retry_with_flag",
|
|
143
|
+
explanation: `Re-run with --statuses from ${accepted}, or --all-statuses to drop the filter.`
|
|
144
|
+
},
|
|
145
|
+
retryable: false
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function resolveStatusFilter(args, level) {
|
|
150
|
+
if (args["all-statuses"]) {
|
|
151
|
+
return void 0;
|
|
152
|
+
}
|
|
153
|
+
const explicit = args.statuses;
|
|
154
|
+
if (!explicit) {
|
|
155
|
+
return ["ACTIVE"];
|
|
156
|
+
}
|
|
157
|
+
const statuses = explicit.split(",").map((s) => s.trim().toUpperCase()).filter(Boolean);
|
|
158
|
+
const error = statusFilterError(level, statuses);
|
|
159
|
+
if (error) {
|
|
160
|
+
writeAdsJson(error);
|
|
161
|
+
process.exit(1);
|
|
162
|
+
}
|
|
163
|
+
return statuses;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export {
|
|
167
|
+
handleLinkedinError,
|
|
168
|
+
resolveAccountIdArg,
|
|
169
|
+
todayIso,
|
|
170
|
+
daysAgoIso,
|
|
171
|
+
csvOrJson,
|
|
172
|
+
statusesArgDescription,
|
|
173
|
+
resolveStatusFilter
|
|
174
|
+
};
|
|
175
|
+
//# sourceMappingURL=chunk-PAHLJMC3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/ads/linkedin/shared.ts"],"sourcesContent":["import { LINKEDIN_SEARCH_STATUSES, type LinkedinSearchLevel, unsupportedLinkedinSearchStatuses } from \"@baker/api\";\nimport { ApiError } from \"../../../client.ts\";\nimport { getEnv, MissingChatIdError } from \"../../../env.ts\";\nimport { handleConnectionError, needsConnectionFix } from \"../../../error-handler.ts\";\nimport { writeAdsJson } from \"../output.ts\";\nimport type { AdsErrorEnvelope } from \"../types.ts\";\n\nconst DAY_MS = 86_400_000;\n\n/**\n * Map LinkedIn-flavored API errors into the shared CLI error envelope. The\n * backend already maps LinkedIn `serviceErrorCode` → tagged HTTP status, so by\n * the time we get here we just need to attach an actionable `fix` and exit.\n */\nexport function handleLinkedinError(err: unknown): never {\n if (err instanceof ApiError) {\n if (needsConnectionFix(err.code, err.message)) {\n handleConnectionError(\"linkedin_ads\", err.message);\n }\n if (isNoAccountsSelectedError(err.code, err.message)) {\n handleConnectionError(\"linkedin_ads\", err.message);\n }\n const explanation = explainLinkedinError(err);\n const envelope: AdsErrorEnvelope = {\n ok: false,\n error: {\n code: err.code,\n message: err.message,\n fix: {\n action: explanation.action,\n explanation: explanation.message,\n correctedCommand: explanation.correctedCommand,\n },\n retryable: err.code === \"RATE_LIMITED\" || err.code === \"UNAVAILABLE\" || err.code === \"INTERNAL_ERROR\",\n },\n };\n writeAdsJson(envelope);\n process.exit(1);\n }\n writeAdsJson(unexpectedErrorEnvelope(err));\n process.exit(1);\n}\n\n/**\n * Any failure that is not an API answer. A missing chat id gets its own code\n * and a fix — no retry can supply it — and anything else reads as the network.\n */\nexport function unexpectedErrorEnvelope(err: unknown): {\n ok: false;\n error: Pick<AdsErrorEnvelope[\"error\"], \"code\" | \"message\"> &\n Partial<Pick<AdsErrorEnvelope[\"error\"], \"fix\" | \"retryable\">>;\n} {\n if (err instanceof MissingChatIdError) {\n return {\n ok: false,\n error: {\n code: err.code,\n message: err.message,\n fix: {\n action: \"reject\",\n explanation:\n \"LinkedIn changes are staged in a chat and this run has none. Don't retry: carry on with the rest of the job and tell the user this change couldn't be staged from here.\",\n },\n retryable: false,\n },\n };\n }\n const message = err instanceof Error ? err.message : \"Unexpected error\";\n return { ok: false, error: { code: \"NETWORK_ERROR\", message } };\n}\n\n/**\n * \"No ad accounts selected\" comes back as a 400 (→ VALIDATION_ERROR), which\n * reads like a bad flag but is really an unfinished connection: the user has to\n * pick their accounts again. Route it to the connect flow, not flag advice.\n */\nexport function isNoAccountsSelectedError(code: string, message: string): boolean {\n return code === \"VALIDATION_ERROR\" && /no linkedin ad accounts selected/i.test(message);\n}\n\nfunction explainLinkedinError(err: ApiError): {\n action: AdsErrorEnvelope[\"error\"][\"fix\"][\"action\"];\n message: string;\n correctedCommand?: string;\n} {\n const lower = err.message.toLowerCase();\n if (err.code === \"VALIDATION_ERROR\" && lower.includes(\"granularity\") && lower.includes(\"daily\")) {\n return {\n action: \"retry_with_flag\",\n message:\n \"LinkedIn rejects DAILY granularity when pivoting on demographic dims (job-title, company, etc.). Re-run with --granularity ALL or MONTHLY.\",\n correctedCommand: undefined,\n };\n }\n if (err.code === \"RATE_LIMITED\") {\n return {\n action: \"wait_and_retry\",\n message:\n \"Hit a LinkedIn throttle. The CLI already backs off automatically — if you see this you've exhausted the retry budget. Wait ~60s and retry.\",\n };\n }\n if (err.code === \"INTERNAL_ERROR\" && lower.includes(\"deprecat\")) {\n return {\n action: \"reject\",\n message:\n \"LinkedIn-Version header is deprecated. The backend constant LINKEDIN_API_VERSION needs to be bumped — file an issue or update the constant.\",\n };\n }\n return { action: \"reject\", message: err.message };\n}\n\nconst LI_ACCOUNT_ID_RE = /^(urn:li:sponsoredAccount:)?\\d+$/;\n\n/** Pull the default LinkedIn ad account ID from `--account-id` arg or env. */\nexport function resolveAccountIdArg(args: Record<string, unknown>): string {\n const fromArgs = (args[\"account-id\"] as string | undefined) ?? (args[\"account-urn\"] as string | undefined);\n const id = fromArgs || getEnv().BAKER_LINKEDIN_AD_ACCOUNT_ID;\n if (!id) {\n writeAdsJson({\n ok: false,\n error: {\n code: \"MISSING_ACCOUNT_ID\",\n message:\n \"Pass --account-id (numeric) or --account-urn (urn:li:sponsoredAccount:N), or set BAKER_LINKEDIN_AD_ACCOUNT_ID. Run `baker ads linkedin accounts` to find IDs.\",\n },\n });\n process.exit(1);\n }\n if (!LI_ACCOUNT_ID_RE.test(id)) {\n writeAdsJson({\n ok: false,\n error: {\n code: \"INVALID_ACCOUNT_ID\",\n message: `Invalid LinkedIn account ID \"${id}\". Expected numeric or urn:li:sponsoredAccount:N.`,\n },\n });\n process.exit(1);\n }\n return id.startsWith(\"urn:\") ? (id.split(\":\").pop() ?? id) : id;\n}\n\nexport function todayIso(): string {\n return new Date().toISOString().slice(0, 10);\n}\n\nexport function daysAgoIso(days: number): string {\n return new Date(Date.now() - days * DAY_MS).toISOString().slice(0, 10);\n}\n\nexport function csvOrJson(args: Record<string, unknown>): string {\n return (args.output as string | undefined) ?? \"json\";\n}\n\n/** The `--statuses` help line, listing exactly what LinkedIn accepts at this level. */\nexport function statusesArgDescription(level: LinkedinSearchLevel): string {\n return `CSV of statuses (${LINKEDIN_SEARCH_STATUSES[level].join(\",\")})`;\n}\n\n/**\n * One status LinkedIn does not know fails the whole listing, so refuse it here\n * with the accepted values instead of forwarding LinkedIn's enum error.\n */\nexport function statusFilterError(level: LinkedinSearchLevel, statuses: readonly string[]): AdsErrorEnvelope | null {\n const unsupported = unsupportedLinkedinSearchStatuses(level, statuses);\n if (unsupported.length === 0) {\n return null;\n }\n const accepted = LINKEDIN_SEARCH_STATUSES[level].join(\",\");\n return {\n ok: false,\n error: {\n code: \"INVALID_STATUS\",\n message: `LinkedIn does not accept status ${unsupported.join(\", \")} for this listing.`,\n fix: {\n action: \"retry_with_flag\",\n explanation: `Re-run with --statuses from ${accepted}, or --all-statuses to drop the filter.`,\n },\n retryable: false,\n },\n };\n}\n\n/**\n * Default to ACTIVE-only on listings — almost always what an AI agent or human\n * glance wants. `--all-statuses` widens; `--statuses ACTIVE,PAUSED` overrides.\n */\nexport function resolveStatusFilter(args: Record<string, unknown>, level: LinkedinSearchLevel): string[] | undefined {\n if (args[\"all-statuses\"]) {\n return undefined;\n }\n const explicit = args.statuses as string | undefined;\n if (!explicit) {\n return [\"ACTIVE\"];\n }\n const statuses = explicit\n .split(\",\")\n .map((s) => s.trim().toUpperCase())\n .filter(Boolean);\n const error = statusFilterError(level, statuses);\n if (error) {\n writeAdsJson(error);\n process.exit(1);\n }\n return statuses;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAOA,IAAM,SAAS;AAOR,SAAS,oBAAoB,KAAqB;AACvD,MAAI,eAAe,UAAU;AAC3B,QAAI,mBAAmB,IAAI,MAAM,IAAI,OAAO,GAAG;AAC7C,4BAAsB,gBAAgB,IAAI,OAAO;AAAA,IACnD;AACA,QAAI,0BAA0B,IAAI,MAAM,IAAI,OAAO,GAAG;AACpD,4BAAsB,gBAAgB,IAAI,OAAO;AAAA,IACnD;AACA,UAAM,cAAc,qBAAqB,GAAG;AAC5C,UAAM,WAA6B;AAAA,MACjC,IAAI;AAAA,MACJ,OAAO;AAAA,QACL,MAAM,IAAI;AAAA,QACV,SAAS,IAAI;AAAA,QACb,KAAK;AAAA,UACH,QAAQ,YAAY;AAAA,UACpB,aAAa,YAAY;AAAA,UACzB,kBAAkB,YAAY;AAAA,QAChC;AAAA,QACA,WAAW,IAAI,SAAS,kBAAkB,IAAI,SAAS,iBAAiB,IAAI,SAAS;AAAA,MACvF;AAAA,IACF;AACA,iBAAa,QAAQ;AACrB,YAAQ,KAAK,CAAC;AAAA,EAChB;AACA,eAAa,wBAAwB,GAAG,CAAC;AACzC,UAAQ,KAAK,CAAC;AAChB;AAMO,SAAS,wBAAwB,KAItC;AACA,MAAI,eAAe,oBAAoB;AACrC,WAAO;AAAA,MACL,IAAI;AAAA,MACJ,OAAO;AAAA,QACL,MAAM,IAAI;AAAA,QACV,SAAS,IAAI;AAAA,QACb,KAAK;AAAA,UACH,QAAQ;AAAA,UACR,aACE;AAAA,QACJ;AAAA,QACA,WAAW;AAAA,MACb;AAAA,IACF;AAAA,EACF;A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CAAC;AAAA,EAChB;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import {
|
|
2
|
+
parseXApiError
|
|
3
|
+
} from "./chunk-M6UNISGO.js";
|
|
4
|
+
import {
|
|
5
|
+
resolveXAccountId
|
|
6
|
+
} from "./chunk-G7AFVTUS.js";
|
|
7
|
+
import {
|
|
8
|
+
writeAdsJson,
|
|
9
|
+
writeJsonEnvelope
|
|
10
|
+
} from "./chunk-BVM5IRZW.js";
|
|
11
|
+
import {
|
|
12
|
+
X_DRAFT_BATCH_MAX,
|
|
13
|
+
xDraftOpInputSchema
|
|
14
|
+
} from "./chunk-KRIK2JR4.js";
|
|
15
|
+
import {
|
|
16
|
+
ApiError,
|
|
17
|
+
apiPost
|
|
18
|
+
} from "./chunk-HREWXNTO.js";
|
|
19
|
+
import {
|
|
20
|
+
requireChatId
|
|
21
|
+
} from "./chunk-O6QKCJE4.js";
|
|
22
|
+
|
|
23
|
+
// src/commands/ads/x/write-shared.ts
|
|
24
|
+
function failWriteValidation(message) {
|
|
25
|
+
writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
function failPreflight(fields) {
|
|
29
|
+
writeJsonEnvelope({
|
|
30
|
+
ok: false,
|
|
31
|
+
error: {
|
|
32
|
+
code: "VALIDATION_ERROR",
|
|
33
|
+
message: fields.map((f) => f.path ? `${f.path}: ${f.message}` : f.message).join("; "),
|
|
34
|
+
fields,
|
|
35
|
+
fix: {
|
|
36
|
+
action: "reject",
|
|
37
|
+
explanation: "Fix the named fields and stage again. Nothing was staged \u2014 the draft is exactly as it was before this call."
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
function handleXWriteError(err, accountId) {
|
|
44
|
+
if (err instanceof ApiError) {
|
|
45
|
+
writeAdsJson(parseXApiError(err.message, accountId));
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
writeAdsJson({ ok: false, error: { code: "NETWORK_ERROR", message: "Unexpected error" } });
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
function decimalPlaces(value) {
|
|
52
|
+
const [mantissa, exponent] = String(value).trim().split(/e/i);
|
|
53
|
+
const written = (mantissa?.split(".")[1] ?? "").length;
|
|
54
|
+
return Math.max(0, written - (exponent ? Number(exponent) : 0));
|
|
55
|
+
}
|
|
56
|
+
function parseXMoney(value) {
|
|
57
|
+
if (value === void 0 || value === "") {
|
|
58
|
+
return { ok: true, micros: void 0 };
|
|
59
|
+
}
|
|
60
|
+
const amount = Number(value);
|
|
61
|
+
if (!Number.isFinite(amount) || amount <= 0) {
|
|
62
|
+
return { ok: false, reason: "must be a positive amount, for example 12.50" };
|
|
63
|
+
}
|
|
64
|
+
if (decimalPlaces(value) > 6) {
|
|
65
|
+
return { ok: false, reason: "is finer than X can express \u2014 it takes whole micros" };
|
|
66
|
+
}
|
|
67
|
+
return { ok: true, micros: Math.round(amount * 1e6) };
|
|
68
|
+
}
|
|
69
|
+
function microsFromArg(value, flag) {
|
|
70
|
+
const parsed = parseXMoney(value);
|
|
71
|
+
if (!parsed.ok) {
|
|
72
|
+
failWriteValidation(`${flag} ${parsed.reason}`);
|
|
73
|
+
}
|
|
74
|
+
return parsed.micros;
|
|
75
|
+
}
|
|
76
|
+
function csvArg(value) {
|
|
77
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
78
|
+
return void 0;
|
|
79
|
+
}
|
|
80
|
+
const parts = value.split(",").map((s) => s.trim()).filter(Boolean);
|
|
81
|
+
return parts.length > 0 ? parts : void 0;
|
|
82
|
+
}
|
|
83
|
+
function compact(payload) {
|
|
84
|
+
return Object.fromEntries(Object.entries(payload).filter(([, value]) => value !== void 0));
|
|
85
|
+
}
|
|
86
|
+
function batchNudge(data) {
|
|
87
|
+
const count = data?.sameKindStaged;
|
|
88
|
+
if (!count) {
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
return [
|
|
92
|
+
`${count} other change${count === 1 ? "" : "s"} of this kind and payload ${count === 1 ? "is" : "are"} already staged \u2014 pass every id to one call (\`--ids a,b,c\`) instead of one call each.`
|
|
93
|
+
];
|
|
94
|
+
}
|
|
95
|
+
async function stageXOp(raw, hints) {
|
|
96
|
+
const preflight = xDraftOpInputSchema.safeParse(raw);
|
|
97
|
+
if (!preflight.success) {
|
|
98
|
+
failPreflight(preflight.error.issues.map((issue) => ({ path: issue.path.join("."), message: issue.message })));
|
|
99
|
+
}
|
|
100
|
+
const accountId = String(raw.accountId ?? "\u2014");
|
|
101
|
+
try {
|
|
102
|
+
const chatId = requireChatId();
|
|
103
|
+
const response = await apiPost("/api/ads/x/draft/stage", { chatId, op: preflight.data });
|
|
104
|
+
const allHints = [...batchNudge(response.data), ...hints ?? []];
|
|
105
|
+
writeJsonEnvelope(allHints.length > 0 ? { ...response, hints: allHints } : response);
|
|
106
|
+
} catch (err) {
|
|
107
|
+
handleXWriteError(err, accountId);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
async function stageXOps(rawOps, hints) {
|
|
111
|
+
if (rawOps.length === 1 && rawOps[0]) {
|
|
112
|
+
await stageXOp(rawOps[0], hints);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (rawOps.length > X_DRAFT_BATCH_MAX) {
|
|
116
|
+
failWriteValidation(`at most ${X_DRAFT_BATCH_MAX} changes can be staged in one call`);
|
|
117
|
+
}
|
|
118
|
+
const ops = [];
|
|
119
|
+
for (const [index, raw] of rawOps.entries()) {
|
|
120
|
+
const preflight = xDraftOpInputSchema.safeParse(raw);
|
|
121
|
+
if (!preflight.success) {
|
|
122
|
+
failPreflight(
|
|
123
|
+
preflight.error.issues.map((issue) => ({
|
|
124
|
+
path: `ops[${index}]${issue.path.length > 0 ? `.${issue.path.join(".")}` : ""}`,
|
|
125
|
+
message: issue.message
|
|
126
|
+
}))
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
ops.push(preflight.data);
|
|
130
|
+
}
|
|
131
|
+
const accountId = String(rawOps[0]?.accountId ?? "\u2014");
|
|
132
|
+
try {
|
|
133
|
+
const chatId = requireChatId();
|
|
134
|
+
const response = await apiPost("/api/ads/x/draft/stage-batch", { chatId, ops });
|
|
135
|
+
writeJsonEnvelope(hints && hints.length > 0 ? { ...response, hints } : response);
|
|
136
|
+
} catch (err) {
|
|
137
|
+
handleXWriteError(err, accountId);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
async function stageAccountId(args) {
|
|
141
|
+
return await resolveXAccountId(args);
|
|
142
|
+
}
|
|
143
|
+
function requireTarget(args, name) {
|
|
144
|
+
const value = args[name];
|
|
145
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
146
|
+
failWriteValidation(`${name} is required`);
|
|
147
|
+
}
|
|
148
|
+
return value;
|
|
149
|
+
}
|
|
150
|
+
function requireTargets(args, name) {
|
|
151
|
+
const ids = csvArg(args[name]);
|
|
152
|
+
if (!ids) {
|
|
153
|
+
failWriteValidation(`${name} is required \u2014 pass one or more ids, comma-separated`);
|
|
154
|
+
}
|
|
155
|
+
return ids;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export {
|
|
159
|
+
failWriteValidation,
|
|
160
|
+
microsFromArg,
|
|
161
|
+
csvArg,
|
|
162
|
+
compact,
|
|
163
|
+
stageXOp,
|
|
164
|
+
stageXOps,
|
|
165
|
+
stageAccountId,
|
|
166
|
+
requireTarget,
|
|
167
|
+
requireTargets
|
|
168
|
+
};
|
|
169
|
+
//# sourceMappingURL=chunk-PBVLPFJ6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/ads/x/write-shared.ts"],"sourcesContent":["import {\n X_DRAFT_BATCH_MAX,\n type XDraftStageBatchResponse,\n type XDraftStageResponse,\n xDraftOpInputSchema,\n} from \"@baker/api\";\nimport { ApiError, apiPost } from \"../../../client.ts\";\nimport { requireChatId } from \"../../../env.ts\";\nimport { writeAdsJson, writeJsonEnvelope } from \"../output.ts\";\nimport { parseXApiError } from \"./error-parser.ts\";\nimport { resolveXAccountId } from \"./output.ts\";\n\n/**\n * Shared plumbing for the staged X write commands.\n *\n * Writes NEVER reach X directly: every command stages an op against this chat's\n * draft (`/api/ads/x/draft/stage`), the dashboard shows it as a pending X\n * change, and it applies only when the chat is published.\n */\n\nexport function failWriteValidation(message: string): never {\n writeJsonEnvelope({ ok: false, error: { code: \"VALIDATION_ERROR\", message } });\n process.exit(1);\n}\n\nfunction failPreflight(fields: Array<{ path: string; message: string }>): never {\n writeJsonEnvelope({\n ok: false,\n error: {\n code: \"VALIDATION_ERROR\",\n message: fields.map((f) => (f.path ? `${f.path}: ${f.message}` : f.message)).join(\"; \"),\n fields,\n fix: {\n action: \"reject\",\n explanation:\n \"Fix the named fields and stage again. Nothing was staged — the draft is exactly as it was before this call.\",\n },\n },\n });\n process.exit(1);\n}\n\nexport function handleXWriteError(err: unknown, accountId: string): never {\n if (err instanceof ApiError) {\n writeAdsJson(parseXApiError(err.message, accountId));\n process.exit(1);\n }\n writeAdsJson({ ok: false, error: { code: \"NETWORK_ERROR\", message: \"Unexpected error\" } });\n process.exit(1);\n}\n\n/**\n * Digits after the decimal point, read off the written amount rather than\n * measured on the product.\n *\n * Exponent form is what makes this worth a helper: `String(0.0000005)` is\n * `\"5e-7\"`, whose mantissa has no decimals at all.\n */\nfunction decimalPlaces(value: unknown): number {\n const [mantissa, exponent] = String(value).trim().split(/e/i);\n const written = (mantissa?.split(\".\")[1] ?? \"\").length;\n return Math.max(0, written - (exponent ? Number(exponent) : 0));\n}\n\nexport type XMoneyParse = { ok: true; micros: number | undefined } | { ok: false; reason: string };\n\n/**\n * Money on X is integer micros of the account currency, and the CLI takes the\n * human amount so nobody has to count zeros. Rejecting a fraction of a micro\n * here is what keeps the staged payload byte-identical to the request X gets.\n *\n * The precision test counts the decimals the caller wrote instead of comparing\n * `amount * 1e6` against its rounding. That comparison needed a tolerance, and\n * any absolute one is wrong somewhere: `1e-6` is finer than a double's own\n * spacing once the product passes 2^34, so `--total-budget 16384.01` — a whole\n * number of cents — was refused as finer than X can express. Counting decimals\n * is exact at every magnitude and needs no tolerance at all.\n */\nexport function parseXMoney(value: unknown): XMoneyParse {\n if (value === undefined || value === \"\") {\n return { ok: true, micros: undefined };\n }\n const amount = Number(value);\n if (!Number.isFinite(amount) || amount <= 0) {\n return { ok: false, reason: \"must be a positive amount, for example 12.50\" };\n }\n if (decimalPlaces(value) > 6) {\n return { ok: false, reason: \"is finer than X can express — it takes whole micros\" };\n }\n return { ok: true, micros: Math.round(amount * 1_000_000) };\n}\n\nexport function microsFromArg(value: unknown, flag: string): number | undefined {\n const parsed = parseXMoney(value);\n if (!parsed.ok) {\n failWriteValidation(`${flag} ${parsed.reason}`);\n }\n return parsed.micros;\n}\n\nexport function csvArg(value: unknown): string[] | undefined {\n if (typeof value !== \"string\" || value.length === 0) {\n return undefined;\n }\n const parts = value\n .split(\",\")\n .map((s) => s.trim())\n .filter(Boolean);\n return parts.length > 0 ? parts : undefined;\n}\n\n/** Drop undefined keys so an omitted flag never stages as an explicit value. */\nexport function compact(payload: Record<string, unknown>): Record<string, unknown> {\n return Object.fromEntries(Object.entries(payload).filter(([, value]) => value !== undefined));\n}\n\ninterface StageEnvelope extends Record<string, unknown> {\n ok: true;\n data: XDraftStageResponse;\n}\n\n/**\n * The nudge to pass every id in one call instead of looping. Gated on\n * `sameKindStaged`, which the backend only sets for a command that really does\n * take an id list — a nudge pointed at a single-id command fails when obeyed.\n */\nfunction batchNudge(data: XDraftStageResponse | undefined): string[] {\n const count = data?.sameKindStaged;\n if (!count) {\n return [];\n }\n return [\n `${count} other change${count === 1 ? \"\" : \"s\"} of this kind and payload ${count === 1 ? \"is\" : \"are\"} already staged — pass every id to one call (\\`--ids a,b,c\\`) instead of one call each.`,\n ];\n}\n\nexport async function stageXOp(raw: Record<string, unknown>, hints?: string[]): Promise<void> {\n const preflight = xDraftOpInputSchema.safeParse(raw);\n if (!preflight.success) {\n failPreflight(preflight.error.issues.map((issue) => ({ path: issue.path.join(\".\"), message: issue.message })));\n }\n const accountId = String(raw.accountId ?? \"—\");\n try {\n const chatId = requireChatId();\n const response = await apiPost<StageEnvelope>(\"/api/ads/x/draft/stage\", { chatId, op: preflight.data });\n const allHints = [...batchNudge(response.data), ...(hints ?? [])];\n writeJsonEnvelope(allHints.length > 0 ? { ...response, hints: allHints } : response);\n } catch (err) {\n handleXWriteError(err, accountId);\n }\n}\n\ninterface StageBatchEnvelope extends Record<string, unknown> {\n ok: true;\n data: XDraftStageBatchResponse;\n}\n\n/**\n * Stage several ops as ONE request — all-or-nothing on the backend, one\n * rate-limit hit instead of one per id. A single op falls through to the plain\n * stage path so its envelope, amend behaviour and hints stay identical.\n */\nexport async function stageXOps(rawOps: Array<Record<string, unknown>>, hints?: string[]): Promise<void> {\n if (rawOps.length === 1 && rawOps[0]) {\n await stageXOp(rawOps[0], hints);\n return;\n }\n if (rawOps.length > X_DRAFT_BATCH_MAX) {\n failWriteValidation(`at most ${X_DRAFT_BATCH_MAX} changes can be staged in one call`);\n }\n const ops: unknown[] = [];\n for (const [index, raw] of rawOps.entries()) {\n const preflight = xDraftOpInputSchema.safeParse(raw);\n if (!preflight.success) {\n failPreflight(\n preflight.error.issues.map((issue) => ({\n path: `ops[${index}]${issue.path.length > 0 ? `.${issue.path.join(\".\")}` : \"\"}`,\n message: issue.message,\n })),\n );\n }\n ops.push(preflight.data);\n }\n const accountId = String(rawOps[0]?.accountId ?? \"—\");\n try {\n const chatId = requireChatId();\n const response = await apiPost<StageBatchEnvelope>(\"/api/ads/x/draft/stage-batch\", { chatId, ops });\n writeJsonEnvelope(hints && hints.length > 0 ? { ...response, hints } : response);\n } catch (err) {\n handleXWriteError(err, accountId);\n }\n}\n\n/** The account every staged write is scoped to. */\nexport async function stageAccountId(args: Record<string, unknown>): Promise<string> {\n return await resolveXAccountId(args);\n}\n\n/** One required positional id. */\nexport function requireTarget(args: Record<string, unknown>, name: string): string {\n const value = args[name];\n if (typeof value !== \"string\" || value.length === 0) {\n failWriteValidation(`${name} is required`);\n }\n return value;\n}\n\n/**\n * A comma-separated list of ids, for the commands that apply one payload to\n * many entities. Reading `process.argv` is deliberate for repeated flags\n * elsewhere in this CLI; here a single `--ids a,b,c` is the contract, so the\n * citty value is enough and there is nothing to lose.\n */\nexport function requireTargets(args: Record<string, unknown>, name: string): string[] {\n const ids = csvArg(args[name]);\n if (!ids) {\n failWriteValidation(`${name} is required — pass one or more ids, comma-separated`);\n }\n return ids;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAoBO,SAAS,oBAAoB,SAAwB;AAC1D,oBAAkB,EAAE,IAAI,OAAO,OAAO,EAAE,MAAM,oBAAoB,QAAQ,EAAE,CAAC;AAC7E,UAAQ,KAAK,CAAC;AAChB;AAEA,SAAS,cAAc,QAAyD;AAC9E,oBAAkB;AAAA,IAChB,IAAI;AAAA,IACJ,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS,OAAO,IAAI,CAAC,MAAO,EAAE,OAAO,GAAG,EAAE,IAAI,KAAK,EAAE,OAAO,KAAK,EAAE,OAAQ,EAAE,KAAK,IAAI;AAAA,MACtF;AAAA,MACA,KAAK;AAAA,QACH,QAAQ;AAAA,QACR,aACE;AAAA,MACJ;AAAA,IACF;AAAA,EACF,CAAC;AACD,UAAQ,KAAK,CAAC;AAChB;AAEO,SAAS,kBAAkB,KAAc,WAA0B;AACxE,MAAI,eAAe,UAAU;AAC3B,iBAAa,eAAe,IAAI,SAAS,SAAS,CAAC;AACnD,YAAQ,KAAK,CAAC;AAAA,EAChB;AACA,eAAa,EAAE,IAAI,OAAO,OAAO,EAAE,MAAM,iBAAiB,SAAS,mBAAmB,EAAE,CAAC;AACzF,UAAQ,KAAK,CAAC;AAChB;AASA,SAAS,cAAc,OAAwB;AAC7C,QAAM,CAAC,UAAU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,MAAM,KAAK,SAAS,IAAI,IAAI,MAAM,KAAK,KAAK,GAAG,CAAC,KAAK,EAAE;AAAA,UAC7E,SAAS,MAAM;AAAA,QACjB,EAAE;AAAA,MACJ;AAAA,IACF;AACA,QAAI,KAAK,UAAU,IAAI;AAAA,EACzB;AACA,QAAM,YAAY,OAAO,OAAO,CAAC,GAAG,aAAa,QAAG;AACpD,MAAI;AACF,UAAM,SAAS,cAAc;AAC7B,UAAM,WAAW,MAAM,QAA4B,gCAAgC,EAAE,QAAQ,IAAI,CAAC;AAClG,sBAAkB,SAAS,MAAM,SAAS,IAAI,EAAE,GAAG,UAAU,MAAM,IAAI,QAAQ;AAAA,EACjF,SAAS,KAAK;AACZ,sBAAkB,KAAK,SAAS;AAAA,EAClC;AACF;AAGA,eAAsB,eAAe,MAAgD;AACnF,SAAO,MAAM,kBAAkB,IAAI;AACrC;AAGO,SAAS,cAAc,MAA+B,MAAsB;AACjF,QAAM,QAAQ,KAAK,IAAI;AACvB,MAAI,OAAO,UAAU,YAAY,MAAM,WAAW,GAAG;AACnD,wBAAoB,GAAG,IAAI,cAAc;AAAA,EAC3C;AACA,SAAO;AACT;AAQO,SAAS,eAAe,MAA+B,MAAwB;AACpF,QAAM,MAAM,OAAO,KAAK,IAAI,CAAC;AAC7B,MAAI,CAAC,KAAK;AACR,wBAAoB,GAAG,IAAI,2DAAsD;AAAA,EACnF;AACA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/commands/chat-arg.ts
|
|
2
|
+
var CHAT_READ_ARG = {
|
|
3
|
+
type: "string",
|
|
4
|
+
description: "Read another chat's staged changes instead of this one's. Start here when asked to redo, reapply or explain what an earlier chat did \u2014 its changes are kept verbatim, including what happened to each one on publish. Never retype an earlier chat's work from a summary."
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
CHAT_READ_ARG
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-PFBQERWX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/chat-arg.ts"],"sourcesContent":["/**\n * The `--chat` flag every draft-read command shares.\n *\n * A staged change is kept exactly as it was written, and it outlives the chat that wrote it — so\n * \"redo what that chat did\" is a read, not a reconstruction. One definition rather than seven so\n * the flag means the same thing on Google, Meta, LinkedIn, Tag Manager, Tasks, tags and schedules.\n *\n * Read commands only. Anything that stages, amends or discards keeps using `requireChatId`.\n */\nexport const CHAT_READ_ARG = {\n type: \"string\",\n description:\n \"Read another chat's staged changes instead of this one's. Start here when asked to redo, reapply or explain what an earlier chat did — its changes are kept verbatim, including what happened to each one on publish. Never retype an earlier chat's work from a summary.\",\n} as const;\n"],"mappings":";AASO,IAAM,gBAAgB;AAAA,EAC3B,MAAM;AAAA,EACN,aACE;AACJ;","names":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// src/commands/images/searchHints.ts
|
|
2
|
+
var SUBJECT_PLACEHOLDER = {
|
|
3
|
+
stock: "<query>",
|
|
4
|
+
google: "<query>",
|
|
5
|
+
library: "<query>",
|
|
6
|
+
find: "<query>",
|
|
7
|
+
logo: "<domain>",
|
|
8
|
+
icon: "<name>"
|
|
9
|
+
};
|
|
10
|
+
var FALLBACK = {
|
|
11
|
+
stock: () => "Still empty \u2192 `baker images find <query> --sources library,pinterest,google` (one call across the providers stock does not cover \u2014 `--sources` is required, `find` alone searches the library only) or `baker studio generate` to make the asset. Do not re-run this search with reshuffled flags.",
|
|
12
|
+
google: () => "Still empty \u2192 `baker studio generate` to make the asset. Google is the last-resort provider; there is nothing below it to retry.",
|
|
13
|
+
// The library is step 1 of the sourcing recipe, so its empty result is the
|
|
14
|
+
// most common one an agent hits — and the one that previously steered nowhere.
|
|
15
|
+
library: () => "The library does not hold this yet \u2014 that is a normal starting state, not a failure. Source it externally, which also files it into the library for next time: `baker images find <query> --sources library,pexels,pixabay,pinterest,google` for a broad sweep, `baker images stock <query>` for photography or `--type vector` for artwork, `baker images logo <domain>` for a brand mark, or `baker studio generate` to make it. Do not re-run this search with reshuffled filters.",
|
|
16
|
+
find: () => "`find` searches only the sources you name \u2014 with no `--sources` it searches the library alone, which is the usual cause of an empty fanout. Re-run as `baker images find <query> --sources library,pexels,pixabay,pinterest,google`. If that is still empty, `baker studio generate` makes the asset.",
|
|
17
|
+
logo: (subject) => `Brandfetch does not know this domain \u2014 that is normal for small or recently renamed brands, and is not a failure. Pull the mark off the brand's own site instead: \`baker images extract https://${subject}\`. For a tech or product mark also try \`baker images icon <name> --set logos\`.`,
|
|
18
|
+
icon: (subject) => `No icon matched. Iconify is set-scoped, so the set is usually the problem, not the name: retry with \`baker images icon ${subject} --set lucide\` (UI glyphs), \`--set simple-icons\` or \`--set logos\` (brand marks), \`--set devicon\` (tech stack). Still nothing \u2192 \`baker images stock ${subject} --type vector\`, then \`baker studio generate\` with the vector model.`
|
|
19
|
+
};
|
|
20
|
+
function emptyResultHints({ provider, hitCount, activeFilters, subject }) {
|
|
21
|
+
if (hitCount > 0) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
const hints = [];
|
|
25
|
+
if (activeFilters.length > 0) {
|
|
26
|
+
hints.push(
|
|
27
|
+
`No hits. Drop the filters before touching the query \u2014 ${activeFilters.join(", ")} narrowed this search and filter combinations are the usual cause of an empty result.`
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
hints.push(FALLBACK[provider](subject && subject.length > 0 ? subject : SUBJECT_PLACEHOLDER[provider]));
|
|
31
|
+
return hints;
|
|
32
|
+
}
|
|
33
|
+
function activeFilterFlags(args, candidates) {
|
|
34
|
+
return candidates.filter((flag) => args[flag] !== void 0 && args[flag] !== "").map((flag) => `--${flag}`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
emptyResultHints,
|
|
39
|
+
activeFilterFlags
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=chunk-Q6ULQMWG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/images/searchHints.ts"],"sourcesContent":["/**\n * Zero-hit steering for the single-provider image searches.\n *\n * A provider search that returns nothing gives the agent no signal about WHY,\n * so it re-runs the same query with reshuffled flags until it gives up — the\n * dominant time sink in image sourcing. These hints name the two real exits:\n * drop the filters that narrowed the search, then leave the provider entirely.\n */\n\nexport type ImageSearchProvider = \"stock\" | \"google\" | \"library\" | \"find\" | \"logo\" | \"icon\";\n\ninterface EmptyResultInput {\n provider: ImageSearchProvider;\n hitCount: number;\n activeFilters: string[];\n /** What was searched for — a domain for `logo`, an icon name for `icon`.\n * Interpolated into the exit route so the agent gets a runnable command\n * rather than a shape to fill in. */\n subject?: string;\n}\n\n/** Stand-in when the caller passes no subject, so the hint still reads as a command. */\nconst SUBJECT_PLACEHOLDER: Record<ImageSearchProvider, string> = {\n stock: \"<query>\",\n google: \"<query>\",\n library: \"<query>\",\n find: \"<query>\",\n logo: \"<domain>\",\n icon: \"<name>\",\n};\n\nconst FALLBACK: Record<ImageSearchProvider, (subject: string) => string> = {\n stock: () =>\n \"Still empty → `baker images find <query> --sources library,pinterest,google` (one call across the providers stock does not cover — `--sources` is required, `find` alone searches the library only) or `baker studio generate` to make the asset. Do not re-run this search with reshuffled flags.\",\n google: () =>\n \"Still empty → `baker studio generate` to make the asset. Google is the last-resort provider; there is nothing below it to retry.\",\n // The library is step 1 of the sourcing recipe, so its empty result is the\n // most common one an agent hits — and the one that previously steered nowhere.\n library: () =>\n \"The library does not hold this yet — that is a normal starting state, not a failure. Source it externally, which also files it into the library for next time: `baker images find <query> --sources library,pexels,pixabay,pinterest,google` for a broad sweep, `baker images stock <query>` for photography or `--type vector` for artwork, `baker images logo <domain>` for a brand mark, or `baker studio generate` to make it. Do not re-run this search with reshuffled filters.\",\n find: () =>\n \"`find` searches only the sources you name — with no `--sources` it searches the library alone, which is the usual cause of an empty fanout. Re-run as `baker images find <query> --sources library,pexels,pixabay,pinterest,google`. If that is still empty, `baker studio generate` makes the asset.\",\n logo: (subject) =>\n `Brandfetch does not know this domain — that is normal for small or recently renamed brands, and is not a failure. Pull the mark off the brand's own site instead: \\`baker images extract https://${subject}\\`. For a tech or product mark also try \\`baker images icon <name> --set logos\\`.`,\n icon: (subject) =>\n `No icon matched. Iconify is set-scoped, so the set is usually the problem, not the name: retry with \\`baker images icon ${subject} --set lucide\\` (UI glyphs), \\`--set simple-icons\\` or \\`--set logos\\` (brand marks), \\`--set devicon\\` (tech stack). Still nothing → \\`baker images stock ${subject} --type vector\\`, then \\`baker studio generate\\` with the vector model.`,\n};\n\nexport function emptyResultHints({ provider, hitCount, activeFilters, subject }: EmptyResultInput): string[] {\n if (hitCount > 0) {\n return [];\n }\n const hints: string[] = [];\n if (activeFilters.length > 0) {\n hints.push(\n `No hits. Drop the filters before touching the query — ${activeFilters.join(\", \")} narrowed this search and filter combinations are the usual cause of an empty result.`,\n );\n }\n hints.push(FALLBACK[provider](subject && subject.length > 0 ? subject : SUBJECT_PLACEHOLDER[provider]));\n return hints;\n}\n\n/** The flags the caller actually passed, in the agent's own vocabulary. */\nexport function activeFilterFlags(args: Record<string, unknown>, candidates: string[]): string[] {\n return candidates.filter((flag) => args[flag] !== undefined && args[flag] !== \"\").map((flag) => `--${flag}`);\n}\n"],"mappings":";AAsBA,IAAM,sBAA2D;AAAA,EAC/D,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEA,IAAM,WAAqE;AAAA,EACzE,OAAO,MACL;AAAA,EACF,QAAQ,MACN;AAAA;AAAA;AAAA,EAGF,SAAS,MACP;AAAA,EACF,MAAM,MACJ;AAAA,EACF,MAAM,CAAC,YACL,yMAAoM,OAAO;AAAA,EAC7M,MAAM,CAAC,YACL,2HAA2H,OAAO,mKAA8J,OAAO;AAC3S;AAEO,SAAS,iBAAiB,EAAE,UAAU,UAAU,eAAe,QAAQ,GAA+B;AAC3G,MAAI,WAAW,GAAG;AAChB,WAAO,CAAC;AAAA,EACV;AACA,QAAM,QAAkB,CAAC;AACzB,MAAI,cAAc,SAAS,GAAG;AAC5B,UAAM;AAAA,MACJ,8DAAyD,cAAc,KAAK,IAAI,CAAC;AAAA,IACnF;AAAA,EACF;AACA,QAAM,KAAK,SAAS,QAAQ,EAAE,WAAW,QAAQ,SAAS,IAAI,UAAU,oBAAoB,QAAQ,CAAC,CAAC;AACtG,SAAO;AACT;AAGO,SAAS,kBAAkB,MAA+B,YAAgC;AAC/F,SAAO,WAAW,OAAO,CAAC,SAAS,KAAK,IAAI,MAAM,UAAa,KAAK,IAAI,MAAM,EAAE,EAAE,IAAI,CAAC,SAAS,KAAK,IAAI,EAAE;AAC7G;","names":[]}
|