@koda-sl/baker-cli 0.201.0-dev.6e39c93b9 → 0.202.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -14
- package/dist/{chunk-N3PUPOWW.js → chunk-5MPIOGRO.js} +4 -4
- package/dist/chunk-5MPIOGRO.js.map +1 -0
- package/dist/cli.js +701 -701
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-N3PUPOWW.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
toModelSafeImage,
|
|
51
51
|
ulid,
|
|
52
52
|
validateCanvasDeep
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-5MPIOGRO.js";
|
|
54
54
|
import {
|
|
55
55
|
csvOrJson,
|
|
56
56
|
daysAgoIso,
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
} from "./chunk-6NZG2TCM.js";
|
|
100
100
|
|
|
101
101
|
// src/cli.ts
|
|
102
|
-
import { defineCommand as
|
|
102
|
+
import { defineCommand as defineCommand216, runMain } from "citty";
|
|
103
103
|
|
|
104
104
|
// src/commands/actions/index.ts
|
|
105
105
|
import { defineCommand as defineCommand18 } from "citty";
|
|
@@ -587,6 +587,9 @@ function parseTagList(value) {
|
|
|
587
587
|
const tags = value.split(",").map((t) => t.trim()).filter((t) => t.length > 0);
|
|
588
588
|
return [...new Set(tags)];
|
|
589
589
|
}
|
|
590
|
+
function fold(text2) {
|
|
591
|
+
return text2.normalize("NFD").replace(/[̀-ͯ]/g, "");
|
|
592
|
+
}
|
|
590
593
|
var SCHEDULE_SIGNALS = [
|
|
591
594
|
/\brecurr(?:ing|ence)\b/i,
|
|
592
595
|
/\bcadence\b/i,
|
|
@@ -626,28 +629,95 @@ function parsePriority(value, { allowClear }) {
|
|
|
626
629
|
);
|
|
627
630
|
}
|
|
628
631
|
function looksScheduled(name, description) {
|
|
629
|
-
const haystack = `${name}
|
|
630
|
-
${description}
|
|
631
|
-
return SCHEDULE_SIGNALS.some((
|
|
632
|
-
}
|
|
632
|
+
const haystack = fold(`${name}
|
|
633
|
+
${description}`);
|
|
634
|
+
return SCHEDULE_SIGNALS.some((re2) => re2.test(haystack));
|
|
635
|
+
}
|
|
636
|
+
var CAMPAIGN_ENTITY = String.raw`(?:campaigns?|campanas?|ad\s*sets?|adsets?|ad\s*groups?|adgroups?|ads?|anuncios?|conjuntos?\s+de\s+anuncios|grupos?\s+de\s+anuncios)`;
|
|
637
|
+
var LIFECYCLE_VERB = "(?:pause|unpause|enable|disable|launch|restructure|duplicate|clone|rebuild|prune|reweight|split|consolidate|pausar|pausa|activar|podar|poda|reponderar|duplicar|reestructurar|consolidar)";
|
|
638
|
+
var BUDGET_VERB = "(?:cap|raise|lower|increase|decrease|adjust|change|set|update|reallocate|shift|limitar|subir|bajar|ajustar|aplicar|reasignar)";
|
|
639
|
+
var re = (...parts) => new RegExp(parts.join(""), "i");
|
|
633
640
|
var SURFACE_RULES = [
|
|
641
|
+
{
|
|
642
|
+
surface: "ask-user",
|
|
643
|
+
signals: [
|
|
644
|
+
/\bproduction\s+(?:domain|url|site|hostname)\b/i,
|
|
645
|
+
/\b(?:confirm|check|verify|confirmar|verificar)\s+(?:with|w\/|con)\s+(?:the\s+|el\s+|la\s+)?(?:client|user|customer|team|cliente|usuario|equipo)\b/i,
|
|
646
|
+
/\bmissing\s+(?:the\s+)?(?:value|values|id|ids|url|budget|domain|credentials?|account\s+id|measurement\s+id)\b/i,
|
|
647
|
+
/\b(?:ask|get)\s+(?:the\s+)?(?:client|user)\s+for\b/i,
|
|
648
|
+
/\b(?:pedir|solicitar)\s+(?:al\s+)?cliente\b/i
|
|
649
|
+
],
|
|
650
|
+
hint: "This is a missing input, not blocked work. Ask for it with AskUserQuestion (one question), then do the work in the same turn \u2014 filing the Task AND asking the question is the same request twice."
|
|
651
|
+
},
|
|
634
652
|
{
|
|
635
653
|
surface: "analysis",
|
|
636
654
|
nameOnly: true,
|
|
637
655
|
signals: [
|
|
638
|
-
/^\s*(?:re-?)?(?:
|
|
656
|
+
/^\s*(?:re-?)?(?:investigat|analy[sz]|audit|review|document|assess|evaluat|research|map|inventor|examin|diagnos|verif|validat|benchmark)\w*\b/i,
|
|
657
|
+
/^\s*(?:auditar|auditoria|investigar|investigacion|revisar|revision|analizar|analisis|documentar|evaluar|evaluacion|diagnosticar|diagnostico|mapear|inventariar|verificar|verificacion|comprobar|estudiar|estudio)\b/i
|
|
639
658
|
],
|
|
640
659
|
hint: "This names the analysis itself \u2014 investigating, auditing and documenting are work you do now, not work you file. Run it in this chat and deliver the finding; a Task is for a fix something genuinely blocks (bar: `__tooling__/docs/tools/baker/actions.md`)."
|
|
641
660
|
},
|
|
642
661
|
{
|
|
643
|
-
surface: "
|
|
662
|
+
surface: "ads-write",
|
|
663
|
+
// "Approve X" is a human decision, not a staged write — and the budget
|
|
664
|
+
// signals are broad enough to swallow it otherwise. Name-anchored so a
|
|
665
|
+
// description recalling an earlier approval doesn't veto real work.
|
|
666
|
+
exceptName: [/^\s*(?:approve|approval|sign[-\s]?off|aprobar|aprobacion)\b/i],
|
|
667
|
+
// Bare `keywords` is the work when it's the subject of the Task, but plain
|
|
668
|
+
// context when a description happens to discuss search terms.
|
|
669
|
+
nameOnlySignals: [/\b(?:keywords?|palabras\s+clave)\b/i],
|
|
644
670
|
signals: [
|
|
645
|
-
|
|
646
|
-
/\b(?:
|
|
647
|
-
/\
|
|
648
|
-
/\
|
|
671
|
+
// Targeting.
|
|
672
|
+
/\b(?:geo|location|geographic|geografic\w*)[\s-]*(?:targeting|target|segmentacion)\b/i,
|
|
673
|
+
/\bsegmentacion\s+(?:geografica|por\s+ubicacion)\b/i,
|
|
674
|
+
/\bpresence[-\s_]?(?:only|or[-\s_]?interest)\b/i,
|
|
675
|
+
/\b(?:ad\s*schedul\w*|dayparting|calendario\s+de\s+anuncios)\b/i,
|
|
676
|
+
// Extensions / assets.
|
|
677
|
+
/\b(?:callouts?|sitelinks?|site\s*links?|structured\s+snippets?|price\s+extensions?|lead\s+form\s+extensions?|extensiones|asset\s+groups?)\b/i,
|
|
678
|
+
// Ad copy. Compound forms only — bare `headline` and `copy` belong to
|
|
679
|
+
// `landing`, and an RSA headline has to say so.
|
|
680
|
+
/\b(?:rsas?|responsive\s+search\s+ads?|ad\s+copy|copy\s+de\s+(?:los\s+)?anuncios)\b/i,
|
|
681
|
+
/\b(?:headline|titular|description)\s+(?:pool|set|slots?)\b/i,
|
|
682
|
+
/\bdisplay\s+paths?\b|\brutas?\s+visibles?\b/i,
|
|
683
|
+
// Keywords. `negatives` is bare in English because in this product's
|
|
684
|
+
// vocabulary the noun is always negative keywords; the Spanish side is
|
|
685
|
+
// feminine-only, because "resultados negativos" is a real phrase.
|
|
686
|
+
/\bmatch\s+types?\b|\bconcordancias?\b/i,
|
|
687
|
+
/\bnegatives?\b/i,
|
|
688
|
+
/\b(?:palabras\s+clave\s+)?negativas\b/i,
|
|
689
|
+
/\bkeyword\s+lists?\b|\blistas?\s+de\s+palabras\s+clave\b/i,
|
|
690
|
+
// Audiences. `LAL` is the operators' own shorthand for a lookalike and
|
|
691
|
+
// has no other reading in this corpus.
|
|
692
|
+
/\b(?:in-?market|affinity|audience\s+signals?|senales?\s+de\s+audiencia)\b/i,
|
|
693
|
+
/\b(?:audiencias?|lal)\b/i,
|
|
694
|
+
/\blistas?\s+de\s+(?:exclusion|remarketing)\b|\bexclusion\s+lists?\b/i,
|
|
695
|
+
// URLs.
|
|
696
|
+
/\btracking\s+(?:url\s+)?templates?\b|\bfinal\s+urls?\b|\bfinal\s+url\s+suffix\b/i,
|
|
697
|
+
// Bidding.
|
|
698
|
+
/\bbid\s+(?:adjustments?|modifiers?|strateg\w*)\b|\bajustes?\s+de\s+puja\b/i,
|
|
699
|
+
/\b(?:tcpa|troas|target\s+cpa|target\s+roas)\b/i,
|
|
700
|
+
// Lifecycle. Bare `campaign` is deliberately NOT a signal — it appears
|
|
701
|
+
// everywhere and would strip tag-manager and landing of correct
|
|
702
|
+
// routings, so every campaign-shaped rule needs a verb or a specific
|
|
703
|
+
// setting noun next to it.
|
|
704
|
+
// Bounded, and never across the name/description boundary. `ads` is an
|
|
705
|
+
// ordinary word in this domain, so an unbounded gap lets a verb in the
|
|
706
|
+
// name pair with a passing mention in the description — and since
|
|
707
|
+
// ads-write is evaluated first, that spurious match outranks the surface
|
|
708
|
+
// which should have answered.
|
|
709
|
+
re(String.raw`\b`, LIFECYCLE_VERB, String.raw`\b[^\n]{0,40}\b`, CAMPAIGN_ENTITY, String.raw`\b`),
|
|
710
|
+
// Budget. Two complementary shapes — verb before, quantity after — so a
|
|
711
|
+
// change stated either way lands, guarded by the `exceptName` veto above.
|
|
712
|
+
/\b(?:daily|campaign|lifetime|ad\s*set|minimum|min|competitor)\s+budgets?\b/i,
|
|
713
|
+
/\bpresupuestos?\b/i,
|
|
714
|
+
re(String.raw`\b`, BUDGET_VERB, String.raw`\b[\s\S]{0,24}\bbudgets?\b`),
|
|
715
|
+
/\bbudgets?\b[\s\S]{0,24}\b(?:at|to|cap|down|up|\d|%|€|\$)/i,
|
|
716
|
+
/\bnegative\s+keywords?\b/i,
|
|
717
|
+
/\b(?:lookalike|custom)\s+audience\b/i,
|
|
718
|
+
/\bswap\s+(?:the\s+)?creative\b/i
|
|
649
719
|
],
|
|
650
|
-
hint: "This is
|
|
720
|
+
hint: "This is an ad-platform change the write surface covers \u2014 stage it now with `baker ads google|meta|linkedin` and it applies at publish (guides: `__tooling__/docs/tools/baker/ads-google.md`, `__tooling__/docs/tools/baker/ads-meta.md`, `__tooling__/docs/tools/baker/ads-linkedin.md`). Staging is not going live."
|
|
651
721
|
},
|
|
652
722
|
{
|
|
653
723
|
surface: "tag-manager",
|
|
@@ -661,7 +731,10 @@ var SURFACE_RULES = [
|
|
|
661
731
|
/\bga4\s+(?:config|configuration|event)\b/i,
|
|
662
732
|
/\bcontainer\s+(?:tag|trigger|variable)s?\b/i,
|
|
663
733
|
/\b(?:conversion|form|submit|submission|click|purchase|lead|custom)\s+event\b/i,
|
|
664
|
-
/\btrack\w*\b[\s\S]*\bevent\b/i
|
|
734
|
+
/\btrack\w*\b[\s\S]*\bevent\b/i,
|
|
735
|
+
/\beventos?\s+de\s+(?:formulario|conversion|clic|compra)\b/i,
|
|
736
|
+
/\bconsentimiento\b/i,
|
|
737
|
+
/\bmedicion\b/i
|
|
665
738
|
],
|
|
666
739
|
except: [/\bserver-?\s?side\b/i, /\bsgtm\b/i, /\bhosting\b/i],
|
|
667
740
|
hint: "This is a change inside the GTM container \u2014 `baker tag-manager` stages it now and it applies at publish (guide: `__tooling__/docs/tools/baker/tag-manager.md`). Stage it instead of filing it, and if several container fixes really are blocked, they belong in ONE Task, not one per finding."
|
|
@@ -674,30 +747,20 @@ var SURFACE_RULES = [
|
|
|
674
747
|
/\bclarity\b/i,
|
|
675
748
|
/\bhotjar\b/i,
|
|
676
749
|
/\bgtm\s+snippet\b/i,
|
|
677
|
-
/\
|
|
750
|
+
/\bcapi\b/i,
|
|
751
|
+
/\b(?:install|add|remove|swap|instalar|colocar)\b[\s\S]*\b(?:snippet|script|tag)\b/i
|
|
678
752
|
],
|
|
753
|
+
// Two vetoes. A structured snippet is a Google Ads extension, not a script
|
|
754
|
+
// on the page — `ads-write` claims it above, and this stops both rules
|
|
755
|
+
// being able to answer. Server-side delivery is infrastructure nobody here
|
|
756
|
+
// can provision, the same call `tag-manager` already makes for sGTM.
|
|
757
|
+
except: [/\bstructured\s+snippets?\b/i, /\bserver-?\s?side\b/i, /\bhosting\b/i],
|
|
679
758
|
hint: "This is a tag or script on the site \u2014 it goes through the `request_tag_input` approval form in this chat, which also collects any secret values (guide: `__tooling__/docs/tools/baker/tags.md`). Show the form instead of filing a Task."
|
|
680
759
|
},
|
|
681
|
-
{
|
|
682
|
-
surface: "ads-write",
|
|
683
|
-
signals: [
|
|
684
|
-
/\b(?:pause|unpause|enable|disable|launch|restructure|duplicate|clone|rebuild)\b[\s\S]*\b(?:campaign|ad\s*set|ad\s*group|adgroup)\b/i,
|
|
685
|
-
/\b(?:tcpa|troas|target\s+cpa|target\s+roas)\b/i,
|
|
686
|
-
/\b(?:daily|campaign|lifetime|ad\s*set)\s+budget\b/i,
|
|
687
|
-
/\b(?:raise|lower|increase|decrease|adjust|change|set|update)\s+(?:the\s+)?budget\b/i,
|
|
688
|
-
/\bbid\s+strateg/i,
|
|
689
|
-
/\bnegative\s+keywords?\b/i,
|
|
690
|
-
/\b(?:lookalike|custom)\s+audience\b/i,
|
|
691
|
-
/\bswap\s+(?:the\s+)?creative\b/i
|
|
692
|
-
],
|
|
693
|
-
hint: "This is an ad-platform change the write surface covers \u2014 stage it now with `baker ads google|meta|linkedin` and it applies at publish (guides: `__tooling__/docs/tools/baker/ads-google.md`, `__tooling__/docs/tools/baker/ads-meta.md`, `__tooling__/docs/tools/baker/ads-linkedin.md`). Staging is not going live."
|
|
694
|
-
},
|
|
695
760
|
{
|
|
696
761
|
surface: "landing",
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
/\b(?:rewrite|tighten|restyle)\b[\s\S]*\b(?:copy|page|section)\b/i
|
|
700
|
-
],
|
|
762
|
+
nameOnlySignals: [/\b(?:landing\s+pages?|landings?|hero|headline|above\s+the\s+fold|pagina)\b/i],
|
|
763
|
+
signals: [/\b(?:rewrite|tighten|restyle)\b[\s\S]*\b(?:copy|page|section)\b/i],
|
|
701
764
|
hint: "This is a page change \u2014 build it in this chat with the `/landing` skill. Only file it if something outside the page blocks the work."
|
|
702
765
|
},
|
|
703
766
|
{
|
|
@@ -706,17 +769,25 @@ var SURFACE_RULES = [
|
|
|
706
769
|
hint: "This is form behaviour \u2014 change it in this chat with the `/flow-builder` skill. Only file it if something outside the form blocks the work."
|
|
707
770
|
}
|
|
708
771
|
];
|
|
772
|
+
var FAN_OUT_NUDGE_THRESHOLD = 2;
|
|
709
773
|
var FAN_OUT_THRESHOLD = 3;
|
|
710
774
|
var SCHEDULED_HINT = 'This reads as recurring/scheduled work. If it should run on a cadence or a future date, create a Scheduled Action instead \u2014 baker scheduled-actions create --cron "0 9 * * MON" (or --run-at; guide: `__tooling__/docs/tools/baker/scheduled-actions.md`). Do NOT capture "set up a scheduled action" as a Work Action.';
|
|
711
775
|
function looksExecutable(name, description) {
|
|
712
|
-
const
|
|
713
|
-
|
|
776
|
+
const foldedName = fold(name);
|
|
777
|
+
const full = `${foldedName}
|
|
778
|
+
${fold(description)}`;
|
|
714
779
|
for (const rule of SURFACE_RULES) {
|
|
715
|
-
const haystack = rule.nameOnly ?
|
|
716
|
-
if (rule.except?.some((
|
|
780
|
+
const haystack = rule.nameOnly ? foldedName : full;
|
|
781
|
+
if (rule.except?.some((re2) => re2.test(full))) {
|
|
717
782
|
continue;
|
|
718
783
|
}
|
|
719
|
-
if (rule.
|
|
784
|
+
if (rule.exceptName?.some((re2) => re2.test(foldedName))) {
|
|
785
|
+
continue;
|
|
786
|
+
}
|
|
787
|
+
if (rule.signals.some((re2) => re2.test(haystack))) {
|
|
788
|
+
return { surface: rule.surface, hint: rule.hint };
|
|
789
|
+
}
|
|
790
|
+
if (rule.nameOnlySignals?.some((re2) => re2.test(foldedName))) {
|
|
720
791
|
return { surface: rule.surface, hint: rule.hint };
|
|
721
792
|
}
|
|
722
793
|
}
|
|
@@ -741,6 +812,10 @@ function buildCreateHints({
|
|
|
741
812
|
hints.push(
|
|
742
813
|
`${draftCreateCount} Tasks are staged in this chat. Re-read them with \`baker actions draft\`: can any be done now with a surface you already have, and do any two touch the same system (same container, same campaign, same page)? Those belong in ONE Task \u2014 fold them together with \`baker actions update\` and drop the extras with \`baker actions draft remove <tempId>\`.`
|
|
743
814
|
);
|
|
815
|
+
} else if (draftCreateCount === FAN_OUT_NUDGE_THRESHOLD) {
|
|
816
|
+
hints.push(
|
|
817
|
+
`Second Task staged in this chat. If these two land on the same system (same container, same campaign, same page) they are ONE Task \u2014 fold them with \`baker actions update\` and drop the extra with \`baker actions draft remove ${tempId}\`.`
|
|
818
|
+
);
|
|
744
819
|
}
|
|
745
820
|
hints.push(`Link dependencies: baker actions link --blocker <id> --blocked ${tempId}`);
|
|
746
821
|
if (!description) {
|
|
@@ -8357,8 +8432,8 @@ var FALSE_RANGE_PATTERNS = [
|
|
|
8357
8432
|
function countFalseRanges(text2) {
|
|
8358
8433
|
let count = 0;
|
|
8359
8434
|
let first = "";
|
|
8360
|
-
for (const
|
|
8361
|
-
for (const m of text2.matchAll(
|
|
8435
|
+
for (const re2 of FALSE_RANGE_PATTERNS) {
|
|
8436
|
+
for (const m of text2.matchAll(re2)) {
|
|
8362
8437
|
const left = m[1] ?? "";
|
|
8363
8438
|
const right = m[2] ?? "";
|
|
8364
8439
|
if (/\d/.test(left) || /\d/.test(right)) continue;
|
|
@@ -8421,8 +8496,8 @@ function countPhraseTell(text2, id, phrases) {
|
|
|
8421
8496
|
}
|
|
8422
8497
|
return { count, first };
|
|
8423
8498
|
}
|
|
8424
|
-
function countPattern(text2,
|
|
8425
|
-
const matches = text2.match(
|
|
8499
|
+
function countPattern(text2, re2) {
|
|
8500
|
+
const matches = text2.match(re2) ?? [];
|
|
8426
8501
|
return { count: matches.length, first: matches.join("") };
|
|
8427
8502
|
}
|
|
8428
8503
|
function detectCopyTells(text2) {
|
|
@@ -8746,11 +8821,11 @@ function rawTextEntries(value) {
|
|
|
8746
8821
|
const values = Array.isArray(value) ? value : typeof value === "string" ? [value] : [];
|
|
8747
8822
|
return values.filter((v) => typeof v === "string").flatMap((v) => v.split(",")).map((v) => v.trim()).filter(Boolean);
|
|
8748
8823
|
}
|
|
8749
|
-
function rawFileEntries(
|
|
8750
|
-
if (typeof
|
|
8824
|
+
function rawFileEntries(path37) {
|
|
8825
|
+
if (typeof path37 !== "string" || path37.length === 0) {
|
|
8751
8826
|
return [];
|
|
8752
8827
|
}
|
|
8753
|
-
return readFileSync2(
|
|
8828
|
+
return readFileSync2(path37, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
|
|
8754
8829
|
}
|
|
8755
8830
|
function keywordEntries(args) {
|
|
8756
8831
|
const defaultMatch = typeof args["match-type"] === "string" ? args["match-type"].toUpperCase() : void 0;
|
|
@@ -8773,19 +8848,19 @@ function keywordEntries(args) {
|
|
|
8773
8848
|
}
|
|
8774
8849
|
return entries;
|
|
8775
8850
|
}
|
|
8776
|
-
function loadJsonFileArg(
|
|
8777
|
-
if (typeof
|
|
8851
|
+
function loadJsonFileArg(path37) {
|
|
8852
|
+
if (typeof path37 !== "string" || path37.length === 0) {
|
|
8778
8853
|
return {};
|
|
8779
8854
|
}
|
|
8780
8855
|
try {
|
|
8781
|
-
const parsed = JSON.parse(readFileSync2(
|
|
8856
|
+
const parsed = JSON.parse(readFileSync2(path37, "utf8"));
|
|
8782
8857
|
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
8783
|
-
failWriteValidation(`${
|
|
8858
|
+
failWriteValidation(`${path37} must contain a JSON object`);
|
|
8784
8859
|
}
|
|
8785
8860
|
return parsed;
|
|
8786
8861
|
} catch (err) {
|
|
8787
8862
|
if (err instanceof SyntaxError) {
|
|
8788
|
-
failWriteValidation(`${
|
|
8863
|
+
failWriteValidation(`${path37} is not valid JSON: ${err.message}`);
|
|
8789
8864
|
}
|
|
8790
8865
|
throw err;
|
|
8791
8866
|
}
|
|
@@ -8915,10 +8990,10 @@ async function stageUpdate(kind, customerId, target, payload, hints) {
|
|
|
8915
8990
|
async function stageTarget(kind, customerId, target, hints) {
|
|
8916
8991
|
await stageGoogleOp({ kind, customerId, target }, hints);
|
|
8917
8992
|
}
|
|
8918
|
-
async function draftAction(
|
|
8993
|
+
async function draftAction(path37, body, chat) {
|
|
8919
8994
|
try {
|
|
8920
8995
|
const chatId = resolveChatId(chat);
|
|
8921
|
-
const response = await apiPost(
|
|
8996
|
+
const response = await apiPost(path37, { chatId, ...body });
|
|
8922
8997
|
writeJsonEnvelope(response);
|
|
8923
8998
|
} catch (err) {
|
|
8924
8999
|
handleGoogleError(err);
|
|
@@ -11776,19 +11851,19 @@ function failWriteValidation2(message) {
|
|
|
11776
11851
|
writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
11777
11852
|
process.exit(1);
|
|
11778
11853
|
}
|
|
11779
|
-
function loadJsonFileArg2(
|
|
11780
|
-
if (typeof
|
|
11854
|
+
function loadJsonFileArg2(path37) {
|
|
11855
|
+
if (typeof path37 !== "string" || path37.length === 0) {
|
|
11781
11856
|
return {};
|
|
11782
11857
|
}
|
|
11783
11858
|
try {
|
|
11784
|
-
const parsed = JSON.parse(readFileSync4(
|
|
11859
|
+
const parsed = JSON.parse(readFileSync4(path37, "utf8"));
|
|
11785
11860
|
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
11786
|
-
failWriteValidation2(`${
|
|
11861
|
+
failWriteValidation2(`${path37} must contain a JSON object`);
|
|
11787
11862
|
}
|
|
11788
11863
|
return parsed;
|
|
11789
11864
|
} catch (err) {
|
|
11790
11865
|
if (err instanceof SyntaxError) {
|
|
11791
|
-
failWriteValidation2(`${
|
|
11866
|
+
failWriteValidation2(`${path37} is not valid JSON: ${err.message}`);
|
|
11792
11867
|
}
|
|
11793
11868
|
throw err;
|
|
11794
11869
|
}
|
|
@@ -11873,15 +11948,15 @@ function parseLocaleFlag(value) {
|
|
|
11873
11948
|
}
|
|
11874
11949
|
return { language: match[1], country: match[2].toUpperCase() };
|
|
11875
11950
|
}
|
|
11876
|
-
function loadTargetingFileArg(
|
|
11877
|
-
if (typeof
|
|
11951
|
+
function loadTargetingFileArg(path37) {
|
|
11952
|
+
if (typeof path37 !== "string" || path37.length === 0) {
|
|
11878
11953
|
return void 0;
|
|
11879
11954
|
}
|
|
11880
|
-
const parsed = loadJsonFileArg2(
|
|
11955
|
+
const parsed = loadJsonFileArg2(path37);
|
|
11881
11956
|
const criteria = parsed.targetingCriteria ?? parsed;
|
|
11882
11957
|
if (!criteria.include) {
|
|
11883
11958
|
failWriteValidation2(
|
|
11884
|
-
`${
|
|
11959
|
+
`${path37} must contain targeting criteria with an "include" block (see baker schema ads.linkedin.campaigns.create)`
|
|
11885
11960
|
);
|
|
11886
11961
|
}
|
|
11887
11962
|
return criteria;
|
|
@@ -11916,14 +11991,14 @@ function parseCsvLine(line) {
|
|
|
11916
11991
|
cells.push(current);
|
|
11917
11992
|
return cells.map((cell) => cell.trim());
|
|
11918
11993
|
}
|
|
11919
|
-
function parseListFileArg(
|
|
11920
|
-
if (typeof
|
|
11994
|
+
function parseListFileArg(path37, maxRows) {
|
|
11995
|
+
if (typeof path37 !== "string" || path37.length === 0) {
|
|
11921
11996
|
return void 0;
|
|
11922
11997
|
}
|
|
11923
|
-
const raw = readFileSync4(
|
|
11998
|
+
const raw = readFileSync4(path37, "utf8");
|
|
11924
11999
|
const lines = raw.split(/\r?\n/).filter((line) => line.trim().length > 0);
|
|
11925
12000
|
if (lines.length < 2) {
|
|
11926
|
-
failWriteValidation2(`${
|
|
12001
|
+
failWriteValidation2(`${path37} needs a header row and at least one data row`);
|
|
11927
12002
|
}
|
|
11928
12003
|
const columns = parseCsvLine(lines[0]).map((column) => column.trim());
|
|
11929
12004
|
const rows = [];
|
|
@@ -11942,7 +12017,7 @@ function parseListFileArg(path36, maxRows) {
|
|
|
11942
12017
|
}
|
|
11943
12018
|
}
|
|
11944
12019
|
if (rows.length > maxRows) {
|
|
11945
|
-
failWriteValidation2(`${
|
|
12020
|
+
failWriteValidation2(`${path37} has ${rows.length} rows \u2014 the inline limit is ${maxRows}. Split the list.`);
|
|
11946
12021
|
}
|
|
11947
12022
|
return { columns, rows };
|
|
11948
12023
|
}
|
|
@@ -12038,11 +12113,11 @@ function readPositionals(args) {
|
|
|
12038
12113
|
function splitIdList(raw) {
|
|
12039
12114
|
return raw.split(",").map((id) => id.trim()).filter(Boolean);
|
|
12040
12115
|
}
|
|
12041
|
-
function idsFileEntries(
|
|
12042
|
-
if (typeof
|
|
12116
|
+
function idsFileEntries(path37) {
|
|
12117
|
+
if (typeof path37 !== "string" || path37.length === 0) {
|
|
12043
12118
|
return [];
|
|
12044
12119
|
}
|
|
12045
|
-
return readFileSync4(
|
|
12120
|
+
return readFileSync4(path37, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#")).flatMap(splitIdList);
|
|
12046
12121
|
}
|
|
12047
12122
|
function requireTargets(args, entity) {
|
|
12048
12123
|
const positionals = readPositionals(args);
|
|
@@ -14665,9 +14740,9 @@ function compactRow(row) {
|
|
|
14665
14740
|
...destination.postUrn ? { postUrn: destination.postUrn } : {}
|
|
14666
14741
|
};
|
|
14667
14742
|
}
|
|
14668
|
-
function readPath(row,
|
|
14743
|
+
function readPath(row, path37) {
|
|
14669
14744
|
let current = row;
|
|
14670
|
-
for (const segment of
|
|
14745
|
+
for (const segment of path37.split(".")) {
|
|
14671
14746
|
const record = asRecord2(current);
|
|
14672
14747
|
if (!record) return void 0;
|
|
14673
14748
|
current = record[segment];
|
|
@@ -14677,10 +14752,10 @@ function readPath(row, path36) {
|
|
|
14677
14752
|
function projectFields(rows, paths) {
|
|
14678
14753
|
return rows.map((row) => {
|
|
14679
14754
|
const projected = {};
|
|
14680
|
-
for (const
|
|
14681
|
-
const value = readPath(row,
|
|
14755
|
+
for (const path37 of paths) {
|
|
14756
|
+
const value = readPath(row, path37);
|
|
14682
14757
|
if (value !== void 0) {
|
|
14683
|
-
projected[
|
|
14758
|
+
projected[path37] = value;
|
|
14684
14759
|
}
|
|
14685
14760
|
}
|
|
14686
14761
|
return projected;
|
|
@@ -15974,11 +16049,11 @@ var updateStatusSchema = z21.enum(UPDATE_STATUSES);
|
|
|
15974
16049
|
function currencyMinimums2(currencyCode) {
|
|
15975
16050
|
return CURRENCY_MINIMUMS2[currencyCode] ?? DEFAULT_CURRENCY_MINIMUM2;
|
|
15976
16051
|
}
|
|
15977
|
-
function validateDailyBudgetFloor(money, ctx,
|
|
16052
|
+
function validateDailyBudgetFloor(money, ctx, path37) {
|
|
15978
16053
|
if (money?.currencyCode) {
|
|
15979
16054
|
const min = currencyMinimums2(money.currencyCode).dailyBudgetMin;
|
|
15980
16055
|
if (Number(money.amount) < min) {
|
|
15981
|
-
ctx.addIssue({ code: "custom", path:
|
|
16056
|
+
ctx.addIssue({ code: "custom", path: path37, message: `below the ${min} ${money.currencyCode} daily minimum` });
|
|
15982
16057
|
}
|
|
15983
16058
|
}
|
|
15984
16059
|
}
|
|
@@ -16640,19 +16715,19 @@ function failWriteValidation3(message) {
|
|
|
16640
16715
|
writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
16641
16716
|
process.exit(1);
|
|
16642
16717
|
}
|
|
16643
|
-
function loadJsonFileArg3(
|
|
16644
|
-
if (typeof
|
|
16718
|
+
function loadJsonFileArg3(path37) {
|
|
16719
|
+
if (typeof path37 !== "string" || path37.length === 0) {
|
|
16645
16720
|
return {};
|
|
16646
16721
|
}
|
|
16647
16722
|
try {
|
|
16648
|
-
const parsed = JSON.parse(readFileSync8(
|
|
16723
|
+
const parsed = JSON.parse(readFileSync8(path37, "utf8"));
|
|
16649
16724
|
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
16650
|
-
failWriteValidation3(`${
|
|
16725
|
+
failWriteValidation3(`${path37} must contain a JSON object`);
|
|
16651
16726
|
}
|
|
16652
16727
|
return parsed;
|
|
16653
16728
|
} catch (err) {
|
|
16654
16729
|
if (err instanceof SyntaxError) {
|
|
16655
|
-
failWriteValidation3(`${
|
|
16730
|
+
failWriteValidation3(`${path37} is not valid JSON: ${err.message}`);
|
|
16656
16731
|
}
|
|
16657
16732
|
throw err;
|
|
16658
16733
|
}
|
|
@@ -18388,7 +18463,7 @@ Performance (the workhorse):
|
|
|
18388
18463
|
baker ads meta insights --object act_123 --level ad --intent ranking \u2014 flag creatives to refresh
|
|
18389
18464
|
baker ads meta insights --object act_123 --level adset --breakdowns publisher_platform,age \u2014 placement \xD7 age
|
|
18390
18465
|
baker ads meta insights --object act_123 --level ad --since 2026-01-01 --until 2026-03-31 \u2014 auto-async
|
|
18391
|
-
baker ads meta insights --list-
|
|
18466
|
+
baker ads meta insights --list-presets
|
|
18392
18467
|
|
|
18393
18468
|
Audit & review:
|
|
18394
18469
|
baker ads meta activities --account-id act_123 --days 14
|
|
@@ -19922,20 +19997,134 @@ Full guides: __tooling__/docs/tools/baker/ads-<platform>.md (google|meta|linkedi
|
|
|
19922
19997
|
}
|
|
19923
19998
|
});
|
|
19924
19999
|
|
|
19925
|
-
// src/commands/
|
|
20000
|
+
// src/commands/agents/index.ts
|
|
20001
|
+
import { defineCommand as defineCommand89 } from "citty";
|
|
20002
|
+
|
|
20003
|
+
// src/commands/agents/list.ts
|
|
20004
|
+
import { defineCommand as defineCommand87 } from "citty";
|
|
20005
|
+
|
|
20006
|
+
// src/commands/agents/shared.ts
|
|
20007
|
+
function failValidation2(message) {
|
|
20008
|
+
writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
20009
|
+
process.exit(1);
|
|
20010
|
+
}
|
|
20011
|
+
function failApi2(err) {
|
|
20012
|
+
if (err instanceof ApiError) {
|
|
20013
|
+
writeJson({ ok: false, error: { code: err.code, message: err.message } });
|
|
20014
|
+
process.exit(1);
|
|
20015
|
+
}
|
|
20016
|
+
const message = err instanceof Error ? err.message : "Unexpected error";
|
|
20017
|
+
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message } });
|
|
20018
|
+
process.exit(1);
|
|
20019
|
+
}
|
|
20020
|
+
|
|
20021
|
+
// src/commands/agents/list.ts
|
|
20022
|
+
registerSchema({
|
|
20023
|
+
command: "agents.list",
|
|
20024
|
+
description: "The Baker agents that exist, with what each one does. Start here before recommending one, so you name a real teammate rather than inventing one.",
|
|
20025
|
+
args: {}
|
|
20026
|
+
});
|
|
20027
|
+
var listCommand10 = defineCommand87({
|
|
20028
|
+
meta: {
|
|
20029
|
+
name: "list",
|
|
20030
|
+
description: "List the Baker agents and what each does. Example: baker agents list"
|
|
20031
|
+
},
|
|
20032
|
+
run: async () => {
|
|
20033
|
+
try {
|
|
20034
|
+
const response = await apiPost(
|
|
20035
|
+
"/api/official-agents/list",
|
|
20036
|
+
{}
|
|
20037
|
+
);
|
|
20038
|
+
writeJson(response);
|
|
20039
|
+
} catch (err) {
|
|
20040
|
+
failApi2(err);
|
|
20041
|
+
}
|
|
20042
|
+
}
|
|
20043
|
+
});
|
|
20044
|
+
|
|
20045
|
+
// src/commands/agents/recommend.ts
|
|
19926
20046
|
import { defineCommand as defineCommand88 } from "citty";
|
|
20047
|
+
registerSchema({
|
|
20048
|
+
command: "agents.recommend",
|
|
20049
|
+
description: "Suggest the company switch on another Baker agent, because the work you just found belongs to it. Does not block or wait \u2014 it records the suggestion on that agent's card in Tasks and your run carries on. Calling it again refreshes the same suggestion instead of stacking another, and a suggestion the company dismissed stays dismissed. Start here: baker agents list.",
|
|
20050
|
+
args: {
|
|
20051
|
+
agent: { type: "string", description: "Agent id to recommend, from `baker agents list`", required: true },
|
|
20052
|
+
from: { type: "string", description: "Your own agent id \u2014 who is making the suggestion", required: true },
|
|
20053
|
+
reason: {
|
|
20054
|
+
type: "string",
|
|
20055
|
+
description: "Why, in the company's own terms, naming what you found. Shown verbatim next to the switch, so write it for a marketer, not for us.",
|
|
20056
|
+
required: true
|
|
20057
|
+
}
|
|
20058
|
+
}
|
|
20059
|
+
});
|
|
20060
|
+
var recommendCommand = defineCommand88({
|
|
20061
|
+
meta: {
|
|
20062
|
+
name: "recommend",
|
|
20063
|
+
description: 'Suggest switching on another Baker agent. Example: baker agents recommend --agent baker-cro --from baker-analytics-reporter --reason "Your quote page gets the most traffic and converts the worst; Baker CRO is the one that fixes that."'
|
|
20064
|
+
},
|
|
20065
|
+
args: {
|
|
20066
|
+
agent: { type: "string", description: "Agent id to recommend", required: false },
|
|
20067
|
+
from: { type: "string", description: "Your own agent id", required: false },
|
|
20068
|
+
reason: { type: "string", description: "Why, in the company's terms", required: false }
|
|
20069
|
+
},
|
|
20070
|
+
run: async ({ args }) => {
|
|
20071
|
+
try {
|
|
20072
|
+
const agent = args.agent;
|
|
20073
|
+
const from = args.from;
|
|
20074
|
+
const reason = args.reason;
|
|
20075
|
+
if (!agent || !from || !reason) {
|
|
20076
|
+
failValidation2("--agent, --from and --reason are all required.");
|
|
20077
|
+
}
|
|
20078
|
+
if (agent === from) {
|
|
20079
|
+
failValidation2("An agent cannot recommend itself.");
|
|
20080
|
+
}
|
|
20081
|
+
const env = getEnv();
|
|
20082
|
+
const response = await apiPost("/api/official-agents/recommend", {
|
|
20083
|
+
agentId: agent,
|
|
20084
|
+
fromAgentId: from,
|
|
20085
|
+
reason,
|
|
20086
|
+
...env.BAKER_CHAT_ID ? { chatId: env.BAKER_CHAT_ID } : {}
|
|
20087
|
+
});
|
|
20088
|
+
writeJson(response);
|
|
20089
|
+
} catch (err) {
|
|
20090
|
+
failApi2(err);
|
|
20091
|
+
}
|
|
20092
|
+
}
|
|
20093
|
+
});
|
|
20094
|
+
|
|
20095
|
+
// src/commands/agents/index.ts
|
|
20096
|
+
var agentsCommand = defineCommand89({
|
|
20097
|
+
meta: {
|
|
20098
|
+
name: "agents",
|
|
20099
|
+
description: `The other Baker agents, and how to ask for one. Subcommands: list, recommend.
|
|
20100
|
+
|
|
20101
|
+
Use this when the work in front of you belongs to a different agent than the one you are. Recommending does not block your run \u2014 it leaves the suggestion on that agent's card in Tasks, next to the switch that turns it on.
|
|
20102
|
+
|
|
20103
|
+
Examples:
|
|
20104
|
+
baker agents list
|
|
20105
|
+
baker agents recommend --agent baker-cro --from baker-analytics-reporter --reason "Your quote page gets the most traffic and converts the worst."
|
|
20106
|
+
Full guide: __tooling__/docs/tools/baker/agents.md`
|
|
20107
|
+
},
|
|
20108
|
+
subCommands: {
|
|
20109
|
+
list: listCommand10,
|
|
20110
|
+
recommend: recommendCommand
|
|
20111
|
+
}
|
|
20112
|
+
});
|
|
20113
|
+
|
|
20114
|
+
// src/commands/brand/index.ts
|
|
20115
|
+
import { defineCommand as defineCommand91 } from "citty";
|
|
19927
20116
|
|
|
19928
20117
|
// src/commands/brand/fonts.ts
|
|
19929
20118
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
19930
20119
|
import path from "path";
|
|
19931
|
-
import { defineCommand as
|
|
20120
|
+
import { defineCommand as defineCommand90 } from "citty";
|
|
19932
20121
|
|
|
19933
20122
|
// src/engine/brand/fonts.ts
|
|
19934
20123
|
var GOOGLE_CSS2 = "https://fonts.googleapis.com/css2";
|
|
19935
20124
|
function parseGoogleFontFaces(css) {
|
|
19936
20125
|
const faces = [];
|
|
19937
|
-
const
|
|
19938
|
-
for (const match of String(css).matchAll(
|
|
20126
|
+
const re2 = /\/\*\s*([\w-]+)\s*\*\/\s*@font-face\s*\{([^}]*)\}/g;
|
|
20127
|
+
for (const match of String(css).matchAll(re2)) {
|
|
19939
20128
|
const subset = match[1] ?? "";
|
|
19940
20129
|
const body = match[2] ?? "";
|
|
19941
20130
|
const family = body.match(/font-family\s*:\s*['"]?([^'";]+)['"]?\s*;/i)?.[1]?.trim();
|
|
@@ -20100,7 +20289,7 @@ async function readGlobalCss() {
|
|
|
20100
20289
|
return "";
|
|
20101
20290
|
}
|
|
20102
20291
|
}
|
|
20103
|
-
var fontsCheckCommand =
|
|
20292
|
+
var fontsCheckCommand = defineCommand90({
|
|
20104
20293
|
meta: {
|
|
20105
20294
|
name: "check",
|
|
20106
20295
|
description: "Verify the brand's fonts really exist. For every family/weight src/styles/global.css requests from Google Fonts, ask Google what it actually serves and report anything missing \u2014 a weight nobody serves renders as a synthesized fallback and looks off-brand everywhere."
|
|
@@ -20144,7 +20333,7 @@ var fontsCheckCommand = defineCommand87({
|
|
|
20144
20333
|
});
|
|
20145
20334
|
}
|
|
20146
20335
|
});
|
|
20147
|
-
var fontsFetchCommand =
|
|
20336
|
+
var fontsFetchCommand = defineCommand90({
|
|
20148
20337
|
meta: {
|
|
20149
20338
|
name: "fetch",
|
|
20150
20339
|
description: "Download a Google font into src/brand/fonts/ and print the @font-face block to paste above @theme in src/styles/global.css. Use when a brand font should be self-hosted rather than requested from Google on every page load."
|
|
@@ -20226,7 +20415,7 @@ var fontsFetchCommand = defineCommand87({
|
|
|
20226
20415
|
});
|
|
20227
20416
|
}
|
|
20228
20417
|
});
|
|
20229
|
-
var fontsCommand =
|
|
20418
|
+
var fontsCommand = defineCommand90({
|
|
20230
20419
|
meta: {
|
|
20231
20420
|
name: "fonts",
|
|
20232
20421
|
description: `Verify and self-host the brand's typefaces.
|
|
@@ -20244,7 +20433,7 @@ Subcommands:
|
|
|
20244
20433
|
});
|
|
20245
20434
|
|
|
20246
20435
|
// src/commands/brand/index.ts
|
|
20247
|
-
var brandCommand =
|
|
20436
|
+
var brandCommand = defineCommand91({
|
|
20248
20437
|
meta: {
|
|
20249
20438
|
name: "brand",
|
|
20250
20439
|
description: `Brand asset verification for src/brand/.
|
|
@@ -20260,11 +20449,11 @@ Subcommands:
|
|
|
20260
20449
|
});
|
|
20261
20450
|
|
|
20262
20451
|
// src/commands/canvas/index.ts
|
|
20263
|
-
import { defineCommand as
|
|
20452
|
+
import { defineCommand as defineCommand102 } from "citty";
|
|
20264
20453
|
|
|
20265
20454
|
// src/commands/canvas/catalog.ts
|
|
20266
|
-
import { defineCommand as
|
|
20267
|
-
var catalogCommand =
|
|
20455
|
+
import { defineCommand as defineCommand92 } from "citty";
|
|
20456
|
+
var catalogCommand = defineCommand92({
|
|
20268
20457
|
meta: {
|
|
20269
20458
|
name: "catalog",
|
|
20270
20459
|
description: "Print the agent-facing node catalog (JSON Schema). Includes every registered node grouped by category."
|
|
@@ -20279,7 +20468,7 @@ var catalogCommand = defineCommand89({
|
|
|
20279
20468
|
// src/commands/canvas/critique.ts
|
|
20280
20469
|
import { readFile as readFile2 } from "fs/promises";
|
|
20281
20470
|
import path2 from "path";
|
|
20282
|
-
import { defineCommand as
|
|
20471
|
+
import { defineCommand as defineCommand93 } from "citty";
|
|
20283
20472
|
|
|
20284
20473
|
// src/engine/scaffold/lib/critique.ts
|
|
20285
20474
|
var VIBE_CUE = /\b(light|lighting|golden|moody|warm|cool|tone|grade|contrast|shadow|glow|rim|backlit|neon|soft)\b/i;
|
|
@@ -20399,7 +20588,7 @@ function critiqueCanvas(canvas) {
|
|
|
20399
20588
|
}
|
|
20400
20589
|
|
|
20401
20590
|
// src/commands/canvas/critique.ts
|
|
20402
|
-
var critiqueCommand =
|
|
20591
|
+
var critiqueCommand = defineCommand93({
|
|
20403
20592
|
meta: {
|
|
20404
20593
|
name: "critique",
|
|
20405
20594
|
description: "Pre-spend creative critic (ADVISORY \u2014 never blocks). Scores a scaffolded creative BEFORE the billed render, so weak spots get fixed for free. A VIDEO creative is scored on hook strength, sound-off first-frame legibility, retention risk, and mechanism clarity; a STATIC ad on baked-text legibility risk, identity grounding, brand-type fidelity, and mechanism clarity. Ground a video hook against `baker winning-ads hooks` for a proven pattern."
|
|
@@ -20441,9 +20630,9 @@ import { execFile } from "child_process";
|
|
|
20441
20630
|
import { readdir, readFile as readFile3, stat } from "fs/promises";
|
|
20442
20631
|
import path3 from "path";
|
|
20443
20632
|
import { promisify } from "util";
|
|
20444
|
-
import { defineCommand as
|
|
20633
|
+
import { defineCommand as defineCommand94 } from "citty";
|
|
20445
20634
|
var execFileAsync = promisify(execFile);
|
|
20446
|
-
var inspectCommand =
|
|
20635
|
+
var inspectCommand = defineCommand94({
|
|
20447
20636
|
meta: {
|
|
20448
20637
|
name: "inspect",
|
|
20449
20638
|
description: "Dump a one-page summary of a canvas run: per-node duration + cache status, list of output files in the run dir, and optionally three thumbnail frames per video output. Pass either a run_id (resolved against --outputs-dir) or an absolute run directory."
|
|
@@ -20551,12 +20740,12 @@ async function probeDuration(filePath) {
|
|
|
20551
20740
|
|
|
20552
20741
|
// src/commands/canvas/rerun.ts
|
|
20553
20742
|
import path15 from "path";
|
|
20554
|
-
import { defineCommand as
|
|
20743
|
+
import { defineCommand as defineCommand96 } from "citty";
|
|
20555
20744
|
|
|
20556
20745
|
// src/commands/canvas/run.ts
|
|
20557
20746
|
import { readFile as readFile10 } from "fs/promises";
|
|
20558
20747
|
import path14 from "path";
|
|
20559
|
-
import { defineCommand as
|
|
20748
|
+
import { defineCommand as defineCommand95 } from "citty";
|
|
20560
20749
|
|
|
20561
20750
|
// src/commands/canvas/normalize-paths.ts
|
|
20562
20751
|
import { existsSync as existsSync3, realpathSync } from "fs";
|
|
@@ -22531,8 +22720,8 @@ function parseVoiceTraits(description) {
|
|
|
22531
22720
|
const out = {};
|
|
22532
22721
|
if (/\b(female|woman|women|girl|lady)\b/.test(d)) out.gender = "female";
|
|
22533
22722
|
else if (/\b(male|man|men|guy|boy)\b/.test(d)) out.gender = "male";
|
|
22534
|
-
for (const [
|
|
22535
|
-
if (
|
|
22723
|
+
for (const [re2, name] of LANGUAGE_WORDS) {
|
|
22724
|
+
if (re2.test(d)) {
|
|
22536
22725
|
out.language = name;
|
|
22537
22726
|
break;
|
|
22538
22727
|
}
|
|
@@ -24807,7 +24996,7 @@ async function restoreRunSnapshot(manifest, targetDir, opts = {}) {
|
|
|
24807
24996
|
}
|
|
24808
24997
|
|
|
24809
24998
|
// src/commands/canvas/run.ts
|
|
24810
|
-
var runCommand =
|
|
24999
|
+
var runCommand = defineCommand95({
|
|
24811
25000
|
meta: { name: "run", description: "Validate and execute a canvas JSON file." },
|
|
24812
25001
|
args: {
|
|
24813
25002
|
file: { type: "positional", required: true, description: "Path to canvas JSON" },
|
|
@@ -25187,7 +25376,7 @@ async function postInitialRunRecord(client, payload) {
|
|
|
25187
25376
|
|
|
25188
25377
|
// src/commands/canvas/rerun.ts
|
|
25189
25378
|
var SLUG_PATTERN = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
|
|
25190
|
-
var rerunCommand =
|
|
25379
|
+
var rerunCommand = defineCommand96({
|
|
25191
25380
|
meta: {
|
|
25192
25381
|
name: "rerun",
|
|
25193
25382
|
description: "Re-run a creative's latest recorded canvas. Restores its definition files from run history first, so it works in a fresh workspace that never had the source chat's files \u2014 an interrupted run resumes (in-flight jobs re-attach), a completed one re-renders from the cache."
|
|
@@ -25284,7 +25473,7 @@ async function fetchManifest(url) {
|
|
|
25284
25473
|
// src/commands/canvas/scaffold-static-ad.ts
|
|
25285
25474
|
import { access, mkdir as mkdir6, readFile as readFile12, writeFile as writeFile8 } from "fs/promises";
|
|
25286
25475
|
import path19 from "path";
|
|
25287
|
-
import { defineCommand as
|
|
25476
|
+
import { defineCommand as defineCommand98 } from "citty";
|
|
25288
25477
|
|
|
25289
25478
|
// src/engine/scaffold/staticAd.ts
|
|
25290
25479
|
import { z as z24 } from "zod";
|
|
@@ -25634,7 +25823,7 @@ function isValidScaffoldSlug(slug) {
|
|
|
25634
25823
|
// src/commands/canvas/sync-definition.ts
|
|
25635
25824
|
import { readdir as readdir5, readFile as readFile11, stat as stat3 } from "fs/promises";
|
|
25636
25825
|
import path18 from "path";
|
|
25637
|
-
import { defineCommand as
|
|
25826
|
+
import { defineCommand as defineCommand97 } from "citty";
|
|
25638
25827
|
|
|
25639
25828
|
// src/commands/canvas/definition-graph.ts
|
|
25640
25829
|
var MAX_NODES = 300;
|
|
@@ -25747,7 +25936,7 @@ async function resolveCanvasPath(inputPath) {
|
|
|
25747
25936
|
const chosen = (slug ? canvases.find((name) => name === `${slug}.canvas.json`) : void 0) ?? canvases[0];
|
|
25748
25937
|
return chosen ? path18.join(dir, chosen) : null;
|
|
25749
25938
|
}
|
|
25750
|
-
var syncDefinitionCommand =
|
|
25939
|
+
var syncDefinitionCommand = defineCommand97({
|
|
25751
25940
|
meta: {
|
|
25752
25941
|
name: "sync-definition",
|
|
25753
25942
|
description: "Push a creative's current node-graph + input thumbnails to the dashboard without rendering. Runs automatically when you edit a creative's canvas.json or prompt.json."
|
|
@@ -25977,7 +26166,7 @@ async function runVisionPasses(canvas) {
|
|
|
25977
26166
|
return fail3("read_outputs", e instanceof Error ? e.message : String(e));
|
|
25978
26167
|
}
|
|
25979
26168
|
}
|
|
25980
|
-
var scaffoldStaticAdCommand =
|
|
26169
|
+
var scaffoldStaticAdCommand = defineCommand98({
|
|
25981
26170
|
meta: {
|
|
25982
26171
|
name: "scaffold-static-ad",
|
|
25983
26172
|
description: "Turn a source/inspiration image into a runnable static-ad canvas. Runs billed passes \u2014 image_describe (the blueprint, baked to prompt.json as the editable 'prompt'), an AI selection of the image's MAIN identity elements, and a structured global-layout pass (the column/row grid with per-region bounds and text sizes) \u2014 then scaffolds a canvas that wires one [TODO] ingest slot per element (logo/product/subject/badge + brand font) into image_generate. By default it also fans the hero out to the platform's placement ratios (via image_aspect_adapt \u2014 the hero ratio is free, the rest are billed AI recompositions); pass --placements none for a single base ad, or a preset to pick the set. Edit prompt.json and drop the real assets, then `baker canvas run` it."
|
|
@@ -26166,7 +26355,7 @@ var scaffoldStaticAdCommand = defineCommand95({
|
|
|
26166
26355
|
import { access as access2, cp, mkdir as mkdir7, readFile as readFile15, rm as rm6, writeFile as writeFile9 } from "fs/promises";
|
|
26167
26356
|
import { tmpdir as tmpdir2 } from "os";
|
|
26168
26357
|
import path22 from "path";
|
|
26169
|
-
import { defineCommand as
|
|
26358
|
+
import { defineCommand as defineCommand99 } from "citty";
|
|
26170
26359
|
|
|
26171
26360
|
// src/engine/scaffold/lib/model-router.ts
|
|
26172
26361
|
var SEEDANCE = "bytedance/seedance-2.0";
|
|
@@ -26627,7 +26816,7 @@ async function runAnalysisPasses(deconstructCanvas, selectModel) {
|
|
|
26627
26816
|
return fail4("deconstruct", e instanceof Error ? e.message : String(e));
|
|
26628
26817
|
}
|
|
26629
26818
|
}
|
|
26630
|
-
var scaffoldVideoCommand =
|
|
26819
|
+
var scaffoldVideoCommand = defineCommand99({
|
|
26631
26820
|
meta: {
|
|
26632
26821
|
name: "scaffold-video",
|
|
26633
26822
|
description: "Turn a reference video into a runnable reproduction canvas in one command. Runs billed passes \u2014 video_deconstruct (the full scene-by-scene blueprint + transcript, baked to a split, editable blueprint: a global prompt.json plus one small scenes/sNN.json per scene) and an AI selection of the video's RECURRING identity elements (person/animal/product/logo) \u2014 then scaffolds a pipeline where every scene boundary is a static-ad-grade frame (the blueprint as target_blueprint, a reference legend, the real frame as anchor) and each recurring element gets ONE shared [TODO] ingest slot wired into every frame it appears in. The clips feed Seedance an ultra-detailed motion brief (action, camera, dialogue, transcript). Edit a scene's scenes/sNN.json (or prompt.json for global cast/palette/brand), drop the real source images, then `baker canvas run`."
|
|
@@ -26937,7 +27126,7 @@ var scaffoldVideoCommand = defineCommand96({
|
|
|
26937
27126
|
// src/commands/canvas/set-prompt.ts
|
|
26938
27127
|
import { readFile as readFile16, writeFile as writeFile10 } from "fs/promises";
|
|
26939
27128
|
import path23 from "path";
|
|
26940
|
-
import { defineCommand as
|
|
27129
|
+
import { defineCommand as defineCommand100 } from "citty";
|
|
26941
27130
|
function setNodePrompt(canvas, nodeId, text2) {
|
|
26942
27131
|
const nodes = canvas?.nodes;
|
|
26943
27132
|
if (!Array.isArray(nodes)) throw new Error("canvas has no nodes array");
|
|
@@ -26952,7 +27141,7 @@ function setNodePrompt(canvas, nodeId, text2) {
|
|
|
26952
27141
|
newNodes[idx] = newNode;
|
|
26953
27142
|
return { ...canvas, nodes: newNodes };
|
|
26954
27143
|
}
|
|
26955
|
-
var setPromptCommand =
|
|
27144
|
+
var setPromptCommand = defineCommand100({
|
|
26956
27145
|
meta: {
|
|
26957
27146
|
name: "set-prompt",
|
|
26958
27147
|
description: "Safely set a node's params.prompt (a frame description, motion prompt, etc.) without hand-editing the JSON. Prefer --text-file for multi-line/accented copy \u2014 it preserves UTF-8 exactly, unlike shell-quoted jq."
|
|
@@ -27012,8 +27201,8 @@ var setPromptCommand = defineCommand97({
|
|
|
27012
27201
|
// src/commands/canvas/validate.ts
|
|
27013
27202
|
import { readFile as readFile17 } from "fs/promises";
|
|
27014
27203
|
import path24 from "path";
|
|
27015
|
-
import { defineCommand as
|
|
27016
|
-
var validateCommand =
|
|
27204
|
+
import { defineCommand as defineCommand101 } from "citty";
|
|
27205
|
+
var validateCommand = defineCommand101({
|
|
27017
27206
|
meta: {
|
|
27018
27207
|
name: "validate",
|
|
27019
27208
|
description: "Validate a canvas JSON file (no execution). Includes a per-node cost preview and runs each node's deep validators (composition meta checks for hyperframe_render/_snapshot)."
|
|
@@ -27086,7 +27275,7 @@ var validateCommand = defineCommand98({
|
|
|
27086
27275
|
});
|
|
27087
27276
|
|
|
27088
27277
|
// src/commands/canvas/index.ts
|
|
27089
|
-
var canvasCommand =
|
|
27278
|
+
var canvasCommand = defineCommand102({
|
|
27090
27279
|
meta: {
|
|
27091
27280
|
name: "canvas",
|
|
27092
27281
|
description: `Run Baker creative canvas JSON files locally. Local nodes execute in-process; remote nodes POST to the Convex backend gateway.
|
|
@@ -27120,7 +27309,7 @@ Full guide: __tooling__/docs/tools/baker/canvas.md`
|
|
|
27120
27309
|
});
|
|
27121
27310
|
|
|
27122
27311
|
// src/commands/capabilities/index.ts
|
|
27123
|
-
import { defineCommand as
|
|
27312
|
+
import { defineCommand as defineCommand103 } from "citty";
|
|
27124
27313
|
registerSchema({
|
|
27125
27314
|
command: "capabilities",
|
|
27126
27315
|
description: "Start here, before promising the user anything on an ad platform, in Analytics, or in Tag Manager. Answers three questions in one call: what is connected and with what access, what a write on each surface actually does when it lands, and what CANNOT be done here and why. Run it with no arguments for every surface; name one surface to also get the exact fields every change on it accepts.",
|
|
@@ -27163,7 +27352,7 @@ function capabilityHints(surfaces) {
|
|
|
27163
27352
|
}
|
|
27164
27353
|
return hints;
|
|
27165
27354
|
}
|
|
27166
|
-
var runCapabilities =
|
|
27355
|
+
var runCapabilities = defineCommand103({
|
|
27167
27356
|
meta: {
|
|
27168
27357
|
name: "capabilities",
|
|
27169
27358
|
description: `What Baker can and cannot do for this company, before any work starts.
|
|
@@ -27219,7 +27408,7 @@ Full guide: __tooling__/docs/tools/baker/capabilities.md`
|
|
|
27219
27408
|
var capabilitiesCommand = runCapabilities;
|
|
27220
27409
|
|
|
27221
27410
|
// src/commands/chats/index.ts
|
|
27222
|
-
import { defineCommand as
|
|
27411
|
+
import { defineCommand as defineCommand104 } from "citty";
|
|
27223
27412
|
var STATUS_GROUPS = ["active", "archived", "all"];
|
|
27224
27413
|
var REPO_SURFACES = ["knowledge", "company", "brand", "landings", "flows", "creatives"];
|
|
27225
27414
|
function parseBoundedInt(raw, name, min, max) {
|
|
@@ -27241,7 +27430,7 @@ registerSchema({
|
|
|
27241
27430
|
full: { type: "boolean", description: "Include each Session's full change list", required: false, default: false }
|
|
27242
27431
|
}
|
|
27243
27432
|
});
|
|
27244
|
-
var
|
|
27433
|
+
var listCommand11 = defineCommand104({
|
|
27245
27434
|
meta: { name: "list", description: "List other Sessions on this account, newest first." },
|
|
27246
27435
|
args: {
|
|
27247
27436
|
status: { type: "string", description: "Filter: active|archived|all (default: all)", required: false },
|
|
@@ -27296,7 +27485,7 @@ registerSchema({
|
|
|
27296
27485
|
}
|
|
27297
27486
|
}
|
|
27298
27487
|
});
|
|
27299
|
-
var viewCommand =
|
|
27488
|
+
var viewCommand = defineCommand104({
|
|
27300
27489
|
meta: {
|
|
27301
27490
|
name: "view",
|
|
27302
27491
|
description: "Inspect one Session's full effects \u2014 git content + actions/tags/ads, kickoff, commits."
|
|
@@ -27340,7 +27529,7 @@ registerSchema({
|
|
|
27340
27529
|
}
|
|
27341
27530
|
}
|
|
27342
27531
|
});
|
|
27343
|
-
var transcriptCommand =
|
|
27532
|
+
var transcriptCommand = defineCommand104({
|
|
27344
27533
|
meta: { name: "transcript", description: "Read another Session's conversation." },
|
|
27345
27534
|
args: {
|
|
27346
27535
|
id: { type: "positional", description: "The Session id", required: true },
|
|
@@ -27392,7 +27581,7 @@ registerSchema({
|
|
|
27392
27581
|
}
|
|
27393
27582
|
}
|
|
27394
27583
|
});
|
|
27395
|
-
var diffCommand =
|
|
27584
|
+
var diffCommand = defineCommand104({
|
|
27396
27585
|
meta: { name: "diff", description: "See a published Session's real file-level changes." },
|
|
27397
27586
|
args: {
|
|
27398
27587
|
id: { type: "positional", description: "The Session id", required: true },
|
|
@@ -27436,14 +27625,14 @@ var diffCommand = defineCommand101({
|
|
|
27436
27625
|
}
|
|
27437
27626
|
}
|
|
27438
27627
|
});
|
|
27439
|
-
var chatsCommand =
|
|
27628
|
+
var chatsCommand = defineCommand104({
|
|
27440
27629
|
meta: {
|
|
27441
27630
|
name: "chats",
|
|
27442
27631
|
description: `Inspect other Sessions on this account (read-only): list them, view what they produced, read their conversation, and see their real file changes \u2014 so you can reuse past work for a new goal.
|
|
27443
27632
|
Full guide: __tooling__/docs/tools/baker/chats.md`
|
|
27444
27633
|
},
|
|
27445
27634
|
subCommands: {
|
|
27446
|
-
list:
|
|
27635
|
+
list: listCommand11,
|
|
27447
27636
|
view: viewCommand,
|
|
27448
27637
|
transcript: transcriptCommand,
|
|
27449
27638
|
diff: diffCommand
|
|
@@ -27451,10 +27640,10 @@ Full guide: __tooling__/docs/tools/baker/chats.md`
|
|
|
27451
27640
|
});
|
|
27452
27641
|
|
|
27453
27642
|
// src/commands/creatives/index.ts
|
|
27454
|
-
import { defineCommand as
|
|
27643
|
+
import { defineCommand as defineCommand106 } from "citty";
|
|
27455
27644
|
|
|
27456
27645
|
// src/commands/creatives/publish.ts
|
|
27457
|
-
import { defineCommand as
|
|
27646
|
+
import { defineCommand as defineCommand105 } from "citty";
|
|
27458
27647
|
|
|
27459
27648
|
// src/commands/images/api.ts
|
|
27460
27649
|
import { readFile as readFile18 } from "fs/promises";
|
|
@@ -27601,7 +27790,7 @@ async function publishCreative(args, deps = defaultImageApiDeps) {
|
|
|
27601
27790
|
chatId: chatIdFromEnv()
|
|
27602
27791
|
});
|
|
27603
27792
|
}
|
|
27604
|
-
var publishCommand =
|
|
27793
|
+
var publishCommand = defineCommand105({
|
|
27605
27794
|
meta: {
|
|
27606
27795
|
name: "publish",
|
|
27607
27796
|
description: "Publish a final static creative image to Baker Creatives and print the creative reference JSON."
|
|
@@ -27659,7 +27848,7 @@ var publishCommand = defineCommand102({
|
|
|
27659
27848
|
});
|
|
27660
27849
|
|
|
27661
27850
|
// src/commands/creatives/index.ts
|
|
27662
|
-
var creativesCommand3 =
|
|
27851
|
+
var creativesCommand3 = defineCommand106({
|
|
27663
27852
|
meta: {
|
|
27664
27853
|
name: "creatives",
|
|
27665
27854
|
description: `Publish static ad creatives as first-class Baker outputs.
|
|
@@ -27676,7 +27865,7 @@ Full guide: __tooling__/docs/tools/baker/creatives.md`
|
|
|
27676
27865
|
});
|
|
27677
27866
|
|
|
27678
27867
|
// src/commands/flows/index.ts
|
|
27679
|
-
import { defineCommand as
|
|
27868
|
+
import { defineCommand as defineCommand107 } from "citty";
|
|
27680
27869
|
|
|
27681
27870
|
// src/commands/flows/shared.ts
|
|
27682
27871
|
import { existsSync as existsSync5, readdirSync as readdirSync2, readFileSync as readFileSync9 } from "fs";
|
|
@@ -27709,12 +27898,12 @@ function listFlowSlugs() {
|
|
|
27709
27898
|
return readdirSync2(dir, { withFileTypes: true }).filter((entry) => entry.isDirectory() && !entry.name.startsWith("_") && entry.name !== ".gitkeep").map((entry) => entry.name).sort();
|
|
27710
27899
|
}
|
|
27711
27900
|
function readFlowTree(slug) {
|
|
27712
|
-
const
|
|
27713
|
-
if (!existsSync5(
|
|
27901
|
+
const path37 = join3(flowsDir(), slug, "_data.json");
|
|
27902
|
+
if (!existsSync5(path37)) {
|
|
27714
27903
|
failLocal(`No form "${slug}". Run "baker flows list" to see the forms in this workspace.`);
|
|
27715
27904
|
}
|
|
27716
27905
|
try {
|
|
27717
|
-
return JSON.parse(readFileSync9(
|
|
27906
|
+
return JSON.parse(readFileSync9(path37, "utf-8"));
|
|
27718
27907
|
} catch (error) {
|
|
27719
27908
|
failLocal(`Could not read form "${slug}": ${error instanceof Error ? error.message : String(error)}`);
|
|
27720
27909
|
}
|
|
@@ -27831,7 +28020,7 @@ function displayName(slug) {
|
|
|
27831
28020
|
const name = tree.displayName;
|
|
27832
28021
|
return typeof name === "string" && name.trim() ? name.trim() : slug;
|
|
27833
28022
|
}
|
|
27834
|
-
var
|
|
28023
|
+
var listCommand12 = defineCommand107({
|
|
27835
28024
|
meta: {
|
|
27836
28025
|
name: "list",
|
|
27837
28026
|
description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
|
|
@@ -27845,7 +28034,7 @@ var listCommand11 = defineCommand104({
|
|
|
27845
28034
|
writeJson({ ok: true, data: { flows } });
|
|
27846
28035
|
}
|
|
27847
28036
|
});
|
|
27848
|
-
var showCommand3 =
|
|
28037
|
+
var showCommand3 = defineCommand107({
|
|
27849
28038
|
meta: {
|
|
27850
28039
|
name: "show",
|
|
27851
28040
|
description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
|
|
@@ -27866,7 +28055,7 @@ var showCommand3 = defineCommand104({
|
|
|
27866
28055
|
writeJson({ ok: true, data: response });
|
|
27867
28056
|
}
|
|
27868
28057
|
});
|
|
27869
|
-
var flowsCommand =
|
|
28058
|
+
var flowsCommand = defineCommand107({
|
|
27870
28059
|
meta: {
|
|
27871
28060
|
name: "flows",
|
|
27872
28061
|
description: `Read this workspace's Forms (flows) and the configuration status of their confidential fields \u2014 connection secrets, OAuth connections, and third-party field definitions (HubSpot, Calendly, HighLevel, SavvyCal).
|
|
@@ -27880,7 +28069,7 @@ Examples:
|
|
|
27880
28069
|
Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
27881
28070
|
},
|
|
27882
28071
|
subCommands: {
|
|
27883
|
-
list:
|
|
28072
|
+
list: listCommand12,
|
|
27884
28073
|
show: showCommand3
|
|
27885
28074
|
},
|
|
27886
28075
|
// Bare `baker flows` lists the Forms. This must be `default`, not `run`: citty falls
|
|
@@ -27890,10 +28079,10 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
|
27890
28079
|
});
|
|
27891
28080
|
|
|
27892
28081
|
// src/commands/ga4/index.ts
|
|
27893
|
-
import { defineCommand as
|
|
28082
|
+
import { defineCommand as defineCommand114 } from "citty";
|
|
27894
28083
|
|
|
27895
28084
|
// src/commands/ga4/audit.ts
|
|
27896
|
-
import { defineCommand as
|
|
28085
|
+
import { defineCommand as defineCommand108 } from "citty";
|
|
27897
28086
|
|
|
27898
28087
|
// src/commands/ga4/resolve.ts
|
|
27899
28088
|
async function fetchProperties(useCache = true) {
|
|
@@ -27959,7 +28148,7 @@ registerSchema({
|
|
|
27959
28148
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
27960
28149
|
}
|
|
27961
28150
|
});
|
|
27962
|
-
var auditCommand2 =
|
|
28151
|
+
var auditCommand2 = defineCommand108({
|
|
27963
28152
|
meta: {
|
|
27964
28153
|
name: "audit",
|
|
27965
28154
|
description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
|
|
@@ -28014,11 +28203,11 @@ Examples:
|
|
|
28014
28203
|
});
|
|
28015
28204
|
|
|
28016
28205
|
// src/commands/ga4/config.ts
|
|
28017
|
-
import { defineCommand as
|
|
28206
|
+
import { defineCommand as defineCommand109 } from "citty";
|
|
28018
28207
|
|
|
28019
28208
|
// src/commands/ga4/shared.ts
|
|
28020
28209
|
import { readFileSync as readFileSync10 } from "fs";
|
|
28021
|
-
function
|
|
28210
|
+
function failValidation3(message) {
|
|
28022
28211
|
writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
28023
28212
|
process.exit(1);
|
|
28024
28213
|
}
|
|
@@ -28026,7 +28215,7 @@ function requireTarget4(args, entity) {
|
|
|
28026
28215
|
const positional = Array.isArray(args._) ? args._[0] : void 0;
|
|
28027
28216
|
const target = args.id ?? args.target ?? positional;
|
|
28028
28217
|
if (typeof target !== "string" || target.length === 0) {
|
|
28029
|
-
|
|
28218
|
+
failValidation3(`pass the ${entity} id as the positional argument`);
|
|
28030
28219
|
}
|
|
28031
28220
|
return target;
|
|
28032
28221
|
}
|
|
@@ -28035,17 +28224,17 @@ function readJsonSource(args, flag) {
|
|
|
28035
28224
|
const file = args.file;
|
|
28036
28225
|
const raw = typeof file === "string" && file.length > 0 ? readFileSync10(file, "utf8") : typeof inline === "string" && inline.length > 0 ? inline : void 0;
|
|
28037
28226
|
if (raw === void 0) {
|
|
28038
|
-
|
|
28227
|
+
failValidation3(`pass --${flag} with inline JSON or --file with a path to a JSON file`);
|
|
28039
28228
|
}
|
|
28040
28229
|
try {
|
|
28041
28230
|
return JSON.parse(raw);
|
|
28042
28231
|
} catch {
|
|
28043
|
-
return
|
|
28232
|
+
return failValidation3(`--${flag} is not valid JSON`);
|
|
28044
28233
|
}
|
|
28045
28234
|
}
|
|
28046
28235
|
function asObject(value, flag, index) {
|
|
28047
28236
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
28048
|
-
|
|
28237
|
+
failValidation3(
|
|
28049
28238
|
index === void 0 ? `--${flag} must be a JSON object` : `--${flag}[${index}] must be a JSON object`
|
|
28050
28239
|
);
|
|
28051
28240
|
}
|
|
@@ -28060,7 +28249,7 @@ function loadJsonPayloads(args) {
|
|
|
28060
28249
|
return [asObject(parsed, "json")];
|
|
28061
28250
|
}
|
|
28062
28251
|
if (parsed.length === 0) {
|
|
28063
|
-
|
|
28252
|
+
failValidation3("--json is an empty list \u2014 pass at least one definition");
|
|
28064
28253
|
}
|
|
28065
28254
|
return parsed.map((entry, index) => asObject(entry, "json", index));
|
|
28066
28255
|
}
|
|
@@ -28127,10 +28316,10 @@ async function stageOps(ops) {
|
|
|
28127
28316
|
handleError(err);
|
|
28128
28317
|
}
|
|
28129
28318
|
}
|
|
28130
|
-
async function draftAction2(
|
|
28319
|
+
async function draftAction2(path37, body, chat) {
|
|
28131
28320
|
const chatId = resolveChatId(chat);
|
|
28132
28321
|
try {
|
|
28133
|
-
const data = await apiPost(
|
|
28322
|
+
const data = await apiPost(path37, { chatId, ...body });
|
|
28134
28323
|
writeJsonEnvelope({ ok: true, data });
|
|
28135
28324
|
return data;
|
|
28136
28325
|
} catch (err) {
|
|
@@ -28206,7 +28395,7 @@ function configHints(config) {
|
|
|
28206
28395
|
}
|
|
28207
28396
|
return hints;
|
|
28208
28397
|
}
|
|
28209
|
-
var configCommand =
|
|
28398
|
+
var configCommand = defineCommand109({
|
|
28210
28399
|
meta: {
|
|
28211
28400
|
name: "config",
|
|
28212
28401
|
description: `Read how the property is configured to measure \u2014 key events, custom definitions, custom events, retention
|
|
@@ -28234,7 +28423,7 @@ Examples:
|
|
|
28234
28423
|
});
|
|
28235
28424
|
|
|
28236
28425
|
// src/commands/ga4/draft.ts
|
|
28237
|
-
import { defineCommand as
|
|
28426
|
+
import { defineCommand as defineCommand110 } from "citty";
|
|
28238
28427
|
registerSchema({
|
|
28239
28428
|
command: "ga4.draft",
|
|
28240
28429
|
description: "Review and undo the Google Analytics changes staged on this chat. Use `list` to see everything staged, `show` to inspect one change in full before the chat completes, `amend` to correct one in place, and `remove`/`clear` to drop them. `list` and `show` take --chat <id> to read an earlier chat's changes instead.",
|
|
@@ -28243,13 +28432,13 @@ registerSchema({
|
|
|
28243
28432
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
28244
28433
|
}
|
|
28245
28434
|
});
|
|
28246
|
-
var draftCommand3 =
|
|
28435
|
+
var draftCommand3 = defineCommand110({
|
|
28247
28436
|
meta: {
|
|
28248
28437
|
name: "draft",
|
|
28249
28438
|
description: "List, show, amend, remove or clear the Google Analytics changes staged on this chat. `list` and `show` take --chat <id> to read an earlier chat's changes instead."
|
|
28250
28439
|
},
|
|
28251
28440
|
subCommands: {
|
|
28252
|
-
list:
|
|
28441
|
+
list: defineCommand110({
|
|
28253
28442
|
meta: { name: "list", description: "Review everything staged on this chat (--json for the raw envelope)" },
|
|
28254
28443
|
args: {
|
|
28255
28444
|
json: { type: "boolean", description: "Print the raw JSON envelope", required: false },
|
|
@@ -28259,7 +28448,7 @@ var draftCommand3 = defineCommand107({
|
|
|
28259
28448
|
await draftList(args.json === true, args.chat);
|
|
28260
28449
|
}
|
|
28261
28450
|
}),
|
|
28262
|
-
show:
|
|
28451
|
+
show: defineCommand110({
|
|
28263
28452
|
meta: {
|
|
28264
28453
|
name: "show",
|
|
28265
28454
|
description: "Print the full staged payload for one change, alongside how the property looks today \u2014 the receipt to verify it before the chat completes (never truncated)."
|
|
@@ -28276,7 +28465,7 @@ var draftCommand3 = defineCommand107({
|
|
|
28276
28465
|
);
|
|
28277
28466
|
}
|
|
28278
28467
|
}),
|
|
28279
|
-
amend:
|
|
28468
|
+
amend: defineCommand110({
|
|
28280
28469
|
meta: {
|
|
28281
28470
|
name: "amend",
|
|
28282
28471
|
description: "Update a staged change in place \u2014 merges a JSON patch into its payload (objects deep-merge, null deletes a key, arrays/scalars replace) and re-runs every check. Use this instead of remove + re-create."
|
|
@@ -28293,7 +28482,7 @@ var draftCommand3 = defineCommand107({
|
|
|
28293
28482
|
});
|
|
28294
28483
|
}
|
|
28295
28484
|
}),
|
|
28296
|
-
remove:
|
|
28485
|
+
remove: defineCommand110({
|
|
28297
28486
|
meta: { name: "remove", description: "Remove one staged change" },
|
|
28298
28487
|
args: { ref: { type: "positional", description: "Staged ref or target id", required: false } },
|
|
28299
28488
|
run: async ({ args }) => {
|
|
@@ -28302,7 +28491,7 @@ var draftCommand3 = defineCommand107({
|
|
|
28302
28491
|
});
|
|
28303
28492
|
}
|
|
28304
28493
|
}),
|
|
28305
|
-
clear:
|
|
28494
|
+
clear: defineCommand110({
|
|
28306
28495
|
meta: { name: "clear", description: "Discard all Google Analytics changes staged on this chat" },
|
|
28307
28496
|
run: async () => {
|
|
28308
28497
|
await draftAction2("/api/ga4/draft/clear", {});
|
|
@@ -28312,7 +28501,7 @@ var draftCommand3 = defineCommand107({
|
|
|
28312
28501
|
});
|
|
28313
28502
|
|
|
28314
28503
|
// src/commands/ga4/properties.ts
|
|
28315
|
-
import { defineCommand as
|
|
28504
|
+
import { defineCommand as defineCommand111 } from "citty";
|
|
28316
28505
|
registerSchema({
|
|
28317
28506
|
command: "ga4.properties",
|
|
28318
28507
|
description: "List the GA4 properties this company connected \u2014 there can be several, and every one of them is yours to query. Returns the property IDs the query and audit commands take. Run this first to find property IDs.",
|
|
@@ -28328,7 +28517,7 @@ function propertyHints(properties) {
|
|
|
28328
28517
|
resources: properties.map((property) => ({ id: property.externalId, label: property.name }))
|
|
28329
28518
|
});
|
|
28330
28519
|
}
|
|
28331
|
-
var propertiesCommand =
|
|
28520
|
+
var propertiesCommand = defineCommand111({
|
|
28332
28521
|
meta: {
|
|
28333
28522
|
name: "properties",
|
|
28334
28523
|
description: `List accessible GA4 properties.
|
|
@@ -28378,7 +28567,7 @@ Examples:
|
|
|
28378
28567
|
// src/commands/ga4/query.ts
|
|
28379
28568
|
import { appendFileSync as appendFileSync2, existsSync as existsSync6, readFileSync as readFileSync11, writeFileSync as writeFileSync3 } from "fs";
|
|
28380
28569
|
import { resolve as resolve2 } from "path";
|
|
28381
|
-
import { defineCommand as
|
|
28570
|
+
import { defineCommand as defineCommand112 } from "citty";
|
|
28382
28571
|
|
|
28383
28572
|
// src/commands/ga4/presets.ts
|
|
28384
28573
|
var GA4_PRESETS = [
|
|
@@ -28513,7 +28702,7 @@ function handleError2(err) {
|
|
|
28513
28702
|
});
|
|
28514
28703
|
process.exit(1);
|
|
28515
28704
|
}
|
|
28516
|
-
var queryCommand2 =
|
|
28705
|
+
var queryCommand2 = defineCommand112({
|
|
28517
28706
|
meta: {
|
|
28518
28707
|
name: "query",
|
|
28519
28708
|
description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
|
|
@@ -28584,7 +28773,7 @@ Free-form (escape hatch):
|
|
|
28584
28773
|
});
|
|
28585
28774
|
|
|
28586
28775
|
// src/commands/ga4/write-commands.ts
|
|
28587
|
-
import { defineCommand as
|
|
28776
|
+
import { defineCommand as defineCommand113 } from "citty";
|
|
28588
28777
|
var PROPERTY_ARG_DESCRIPTION = "GA4 property id (optional only when one property is connected \u2014 run `baker ga4 properties`)";
|
|
28589
28778
|
var propertyArg = { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false };
|
|
28590
28779
|
function createJsonDescription(noun) {
|
|
@@ -28602,7 +28791,7 @@ registerSchema({
|
|
|
28602
28791
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
28603
28792
|
}
|
|
28604
28793
|
});
|
|
28605
|
-
var keyEventCommand =
|
|
28794
|
+
var keyEventCommand = defineCommand113({
|
|
28606
28795
|
meta: {
|
|
28607
28796
|
name: "key-event",
|
|
28608
28797
|
description: `Stage key-event (conversion) changes
|
|
@@ -28615,7 +28804,7 @@ Examples:
|
|
|
28615
28804
|
baker ga4 key-event delete 4185`
|
|
28616
28805
|
},
|
|
28617
28806
|
subCommands: {
|
|
28618
|
-
create:
|
|
28807
|
+
create: defineCommand113({
|
|
28619
28808
|
meta: {
|
|
28620
28809
|
name: "create",
|
|
28621
28810
|
description: "Stage a new key event. Needs eventName and countingMethod (ONCE_PER_EVENT or ONCE_PER_SESSION); defaultValue sets a monetary value when the event does not send one."
|
|
@@ -28636,7 +28825,7 @@ Examples:
|
|
|
28636
28825
|
);
|
|
28637
28826
|
}
|
|
28638
28827
|
}),
|
|
28639
|
-
update:
|
|
28828
|
+
update: defineCommand113({
|
|
28640
28829
|
meta: {
|
|
28641
28830
|
name: "update",
|
|
28642
28831
|
description: "Stage a change to an existing key event (pass its id). Only countingMethod and defaultValue can change \u2014 Google will not rename a key event."
|
|
@@ -28656,7 +28845,7 @@ Examples:
|
|
|
28656
28845
|
});
|
|
28657
28846
|
}
|
|
28658
28847
|
}),
|
|
28659
|
-
delete:
|
|
28848
|
+
delete: defineCommand113({
|
|
28660
28849
|
meta: {
|
|
28661
28850
|
name: "delete",
|
|
28662
28851
|
description: "Stage removing a key event, so the event stops counting as a conversion. The event itself keeps being collected. Irreversible once the chat completes \u2014 confirm with the user first."
|
|
@@ -28704,7 +28893,7 @@ for (const { kind, noun, createHint } of DEFINITIONS) {
|
|
|
28704
28893
|
}
|
|
28705
28894
|
function definitionCommand(definition) {
|
|
28706
28895
|
const { command, kind, noun, example } = definition;
|
|
28707
|
-
return
|
|
28896
|
+
return defineCommand113({
|
|
28708
28897
|
meta: {
|
|
28709
28898
|
name: command,
|
|
28710
28899
|
description: `Stage ${noun} changes
|
|
@@ -28716,7 +28905,7 @@ Examples:
|
|
|
28716
28905
|
baker ga4 ${command} archive 12`
|
|
28717
28906
|
},
|
|
28718
28907
|
subCommands: {
|
|
28719
|
-
create:
|
|
28908
|
+
create: defineCommand113({
|
|
28720
28909
|
meta: { name: "create", description: `Stage a new ${noun} (or a JSON array of them, staged together)` },
|
|
28721
28910
|
args: {
|
|
28722
28911
|
json: { type: "string", description: createJsonDescription(noun), required: false },
|
|
@@ -28734,7 +28923,7 @@ Examples:
|
|
|
28734
28923
|
);
|
|
28735
28924
|
}
|
|
28736
28925
|
}),
|
|
28737
|
-
update:
|
|
28926
|
+
update: defineCommand113({
|
|
28738
28927
|
meta: {
|
|
28739
28928
|
name: "update",
|
|
28740
28929
|
description: `Stage a change to an existing ${noun} (pass its id). The parameter name and scope cannot change \u2014 archive and recreate for that.`
|
|
@@ -28754,7 +28943,7 @@ Examples:
|
|
|
28754
28943
|
});
|
|
28755
28944
|
}
|
|
28756
28945
|
}),
|
|
28757
|
-
archive:
|
|
28946
|
+
archive: defineCommand113({
|
|
28758
28947
|
meta: {
|
|
28759
28948
|
name: "archive",
|
|
28760
28949
|
description: `Stage archiving a ${noun} (pass its id). It stops collecting and leaves reporting; past data stays. Irreversible once the chat completes \u2014 confirm with the user first.`
|
|
@@ -28799,7 +28988,7 @@ var dataStreamArg = {
|
|
|
28799
28988
|
function withStream(args) {
|
|
28800
28989
|
return typeof args["data-stream"] === "string" ? { dataStream: args["data-stream"] } : {};
|
|
28801
28990
|
}
|
|
28802
|
-
var customEventCommand =
|
|
28991
|
+
var customEventCommand = defineCommand113({
|
|
28803
28992
|
meta: {
|
|
28804
28993
|
name: "custom-event",
|
|
28805
28994
|
description: `Stage custom events \u2014 new events built from events the site already sends
|
|
@@ -28810,7 +28999,7 @@ Examples:
|
|
|
28810
28999
|
baker ga4 custom-event delete 7`
|
|
28811
29000
|
},
|
|
28812
29001
|
subCommands: {
|
|
28813
|
-
create:
|
|
29002
|
+
create: defineCommand113({
|
|
28814
29003
|
meta: {
|
|
28815
29004
|
name: "create",
|
|
28816
29005
|
description: "Stage a new custom event. Conditions match the source event: use field `event_name` to match the event itself, or any parameter name to match its value."
|
|
@@ -28833,7 +29022,7 @@ Examples:
|
|
|
28833
29022
|
);
|
|
28834
29023
|
}
|
|
28835
29024
|
}),
|
|
28836
|
-
update:
|
|
29025
|
+
update: defineCommand113({
|
|
28837
29026
|
meta: { name: "update", description: "Stage a change to an existing custom event (pass its id)" },
|
|
28838
29027
|
args: {
|
|
28839
29028
|
id: { type: "positional", description: "Custom event rule id", required: false },
|
|
@@ -28852,7 +29041,7 @@ Examples:
|
|
|
28852
29041
|
});
|
|
28853
29042
|
}
|
|
28854
29043
|
}),
|
|
28855
|
-
delete:
|
|
29044
|
+
delete: defineCommand113({
|
|
28856
29045
|
meta: {
|
|
28857
29046
|
name: "delete",
|
|
28858
29047
|
description: "Stage removing a custom event (pass its id). The event stops being created from then on; data already collected under it stays. Confirm with the user first."
|
|
@@ -28898,16 +29087,16 @@ function retentionValue(input, flag) {
|
|
|
28898
29087
|
const normalized = input.trim();
|
|
28899
29088
|
const mapped = RETENTION_BY_MONTHS[normalized] ?? (Object.values(RETENTION_BY_MONTHS).includes(normalized.toUpperCase()) ? normalized.toUpperCase() : void 0);
|
|
28900
29089
|
if (!mapped) {
|
|
28901
|
-
|
|
29090
|
+
failValidation3(`--${flag} must be one of 2, 14, 26, 38 or 50 (months)`);
|
|
28902
29091
|
}
|
|
28903
29092
|
return mapped;
|
|
28904
29093
|
}
|
|
28905
29094
|
function booleanArg(input, flag) {
|
|
28906
29095
|
if (input === "true") return true;
|
|
28907
29096
|
if (input === "false") return false;
|
|
28908
|
-
return
|
|
29097
|
+
return failValidation3(`--${flag} must be true or false`);
|
|
28909
29098
|
}
|
|
28910
|
-
var dataRetentionCommand =
|
|
29099
|
+
var dataRetentionCommand = defineCommand113({
|
|
28911
29100
|
meta: {
|
|
28912
29101
|
name: "data-retention",
|
|
28913
29102
|
description: `Stage a change to how long Google Analytics keeps data
|
|
@@ -28917,7 +29106,7 @@ Examples:
|
|
|
28917
29106
|
baker ga4 data-retention set --event-data 14 --user-data 14 --reset-on-activity true`
|
|
28918
29107
|
},
|
|
28919
29108
|
subCommands: {
|
|
28920
|
-
set:
|
|
29109
|
+
set: defineCommand113({
|
|
28921
29110
|
meta: { name: "set", description: "Stage the retention window (months)" },
|
|
28922
29111
|
args: {
|
|
28923
29112
|
"event-data": { type: "string", description: "2, 14, 26, 38 or 50", required: false },
|
|
@@ -28937,7 +29126,7 @@ Examples:
|
|
|
28937
29126
|
payload.resetUserDataOnNewActivity = booleanArg(args["reset-on-activity"], "reset-on-activity");
|
|
28938
29127
|
}
|
|
28939
29128
|
if (Object.keys(payload).length === 0) {
|
|
28940
|
-
|
|
29129
|
+
failValidation3("pass at least one of --event-data, --user-data or --reset-on-activity");
|
|
28941
29130
|
}
|
|
28942
29131
|
await stageOp3({ kind: "ga4.dataRetention.update", payload, ...withProperty(args) });
|
|
28943
29132
|
}
|
|
@@ -28946,7 +29135,7 @@ Examples:
|
|
|
28946
29135
|
});
|
|
28947
29136
|
|
|
28948
29137
|
// src/commands/ga4/index.ts
|
|
28949
|
-
var ga4Command =
|
|
29138
|
+
var ga4Command = defineCommand114({
|
|
28950
29139
|
meta: {
|
|
28951
29140
|
name: "ga4",
|
|
28952
29141
|
description: `Google Analytics 4. Report on a property, audit its config, and change what it measures.
|
|
@@ -28987,12 +29176,12 @@ Full guide: __tooling__/docs/tools/baker/ga4.md`
|
|
|
28987
29176
|
});
|
|
28988
29177
|
|
|
28989
29178
|
// src/commands/gsc/index.ts
|
|
28990
|
-
import { defineCommand as
|
|
29179
|
+
import { defineCommand as defineCommand118 } from "citty";
|
|
28991
29180
|
|
|
28992
29181
|
// src/commands/gsc/query.ts
|
|
28993
29182
|
import { appendFileSync as appendFileSync3, existsSync as existsSync7, readFileSync as readFileSync12, writeFileSync as writeFileSync4 } from "fs";
|
|
28994
29183
|
import { resolve as resolve3 } from "path";
|
|
28995
|
-
import { defineCommand as
|
|
29184
|
+
import { defineCommand as defineCommand115 } from "citty";
|
|
28996
29185
|
|
|
28997
29186
|
// src/commands/gsc/presets.ts
|
|
28998
29187
|
var GSC_PRESETS = [
|
|
@@ -29186,7 +29375,7 @@ function handleError3(err) {
|
|
|
29186
29375
|
});
|
|
29187
29376
|
process.exit(1);
|
|
29188
29377
|
}
|
|
29189
|
-
var queryCommand3 =
|
|
29378
|
+
var queryCommand3 = defineCommand115({
|
|
29190
29379
|
meta: {
|
|
29191
29380
|
name: "query",
|
|
29192
29381
|
description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
|
|
@@ -29264,7 +29453,7 @@ Free-form (escape hatch):
|
|
|
29264
29453
|
});
|
|
29265
29454
|
|
|
29266
29455
|
// src/commands/gsc/sitemaps.ts
|
|
29267
|
-
import { defineCommand as
|
|
29456
|
+
import { defineCommand as defineCommand116 } from "citty";
|
|
29268
29457
|
registerSchema({
|
|
29269
29458
|
command: "gsc.sitemaps",
|
|
29270
29459
|
description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
|
|
@@ -29273,7 +29462,7 @@ registerSchema({
|
|
|
29273
29462
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
29274
29463
|
}
|
|
29275
29464
|
});
|
|
29276
|
-
var sitemapsCommand =
|
|
29465
|
+
var sitemapsCommand = defineCommand116({
|
|
29277
29466
|
meta: {
|
|
29278
29467
|
name: "sitemaps",
|
|
29279
29468
|
description: `List sitemaps for a site. Check health and errors.
|
|
@@ -29326,7 +29515,7 @@ Examples:
|
|
|
29326
29515
|
});
|
|
29327
29516
|
|
|
29328
29517
|
// src/commands/gsc/sites.ts
|
|
29329
|
-
import { defineCommand as
|
|
29518
|
+
import { defineCommand as defineCommand117 } from "citty";
|
|
29330
29519
|
registerSchema({
|
|
29331
29520
|
command: "gsc.sites",
|
|
29332
29521
|
description: "List the Search Console sites this company connected \u2014 there can be several, and every one of them is yours to query. Returns the site URLs the query and sitemaps commands take.",
|
|
@@ -29342,7 +29531,7 @@ function siteHints(sites) {
|
|
|
29342
29531
|
resources: sites.map((site) => ({ id: site.siteUrl, label: site.permissionLevel }))
|
|
29343
29532
|
});
|
|
29344
29533
|
}
|
|
29345
|
-
var sitesCommand =
|
|
29534
|
+
var sitesCommand = defineCommand117({
|
|
29346
29535
|
meta: {
|
|
29347
29536
|
name: "sites",
|
|
29348
29537
|
description: `List verified Search Console sites.
|
|
@@ -29390,7 +29579,7 @@ Examples:
|
|
|
29390
29579
|
});
|
|
29391
29580
|
|
|
29392
29581
|
// src/commands/gsc/index.ts
|
|
29393
|
-
var gscCommand =
|
|
29582
|
+
var gscCommand = defineCommand118({
|
|
29394
29583
|
meta: {
|
|
29395
29584
|
name: "gsc",
|
|
29396
29585
|
description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
|
|
@@ -29414,7 +29603,7 @@ Full guide: __tooling__/docs/tools/baker/gsc.md`
|
|
|
29414
29603
|
});
|
|
29415
29604
|
|
|
29416
29605
|
// src/commands/history/index.ts
|
|
29417
|
-
import { defineCommand as
|
|
29606
|
+
import { defineCommand as defineCommand119 } from "citty";
|
|
29418
29607
|
registerSchema({
|
|
29419
29608
|
command: "history.list",
|
|
29420
29609
|
description: "Start here: unified account history (audit log) \u2014 everything that changed on this account, newest first: publishes, chat lifecycle, backlog actions, team changes, setup links, tags, schedules, ad-platform writes, followed advertisers, media, creatives, reports, domains, and integrations. Use it to see what happened recently before planning work. Compact by default; add --full for raw metadata per entry.",
|
|
@@ -29469,7 +29658,7 @@ function parseBoundedInt2(raw, name, min, max) {
|
|
|
29469
29658
|
}
|
|
29470
29659
|
return value;
|
|
29471
29660
|
}
|
|
29472
|
-
var
|
|
29661
|
+
var listCommand13 = defineCommand119({
|
|
29473
29662
|
meta: {
|
|
29474
29663
|
name: "list",
|
|
29475
29664
|
description: "List recent account changes (unified audit log), newest first."
|
|
@@ -29515,17 +29704,17 @@ var listCommand12 = defineCommand116({
|
|
|
29515
29704
|
}
|
|
29516
29705
|
}
|
|
29517
29706
|
});
|
|
29518
|
-
var historyCommand =
|
|
29707
|
+
var historyCommand = defineCommand119({
|
|
29519
29708
|
meta: {
|
|
29520
29709
|
name: "history",
|
|
29521
29710
|
description: `Unified account history (audit log): what changed, who did it, and when.
|
|
29522
29711
|
Full guide: __tooling__/docs/tools/baker/history.md`
|
|
29523
29712
|
},
|
|
29524
|
-
subCommands: { list:
|
|
29713
|
+
subCommands: { list: listCommand13 }
|
|
29525
29714
|
});
|
|
29526
29715
|
|
|
29527
29716
|
// src/commands/hubspot/index.ts
|
|
29528
|
-
import { defineCommand as
|
|
29717
|
+
import { defineCommand as defineCommand120 } from "citty";
|
|
29529
29718
|
var EMBED_TYPES = ["legacy", "v4", "unknown"];
|
|
29530
29719
|
function failNotConnected(err) {
|
|
29531
29720
|
if (err instanceof ApiError && err.code === "FORBIDDEN" && err.message.includes(HUBSPOT_MISSING_GRANT_MARKER)) {
|
|
@@ -29662,7 +29851,7 @@ registerSchema({
|
|
|
29662
29851
|
}
|
|
29663
29852
|
}
|
|
29664
29853
|
});
|
|
29665
|
-
var formsListCommand =
|
|
29854
|
+
var formsListCommand = defineCommand120({
|
|
29666
29855
|
meta: {
|
|
29667
29856
|
name: "list",
|
|
29668
29857
|
description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
|
|
@@ -29707,7 +29896,7 @@ var formsListCommand = defineCommand117({
|
|
|
29707
29896
|
}
|
|
29708
29897
|
}
|
|
29709
29898
|
});
|
|
29710
|
-
var formsViewCommand =
|
|
29899
|
+
var formsViewCommand = defineCommand120({
|
|
29711
29900
|
meta: {
|
|
29712
29901
|
name: "view",
|
|
29713
29902
|
description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
|
|
@@ -29759,7 +29948,7 @@ var formsViewCommand = defineCommand117({
|
|
|
29759
29948
|
}
|
|
29760
29949
|
}
|
|
29761
29950
|
});
|
|
29762
|
-
var meetingsListCommand =
|
|
29951
|
+
var meetingsListCommand = defineCommand120({
|
|
29763
29952
|
meta: {
|
|
29764
29953
|
name: "list",
|
|
29765
29954
|
description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
|
|
@@ -29801,7 +29990,7 @@ var meetingsListCommand = defineCommand117({
|
|
|
29801
29990
|
}
|
|
29802
29991
|
}
|
|
29803
29992
|
});
|
|
29804
|
-
var meetingsViewCommand =
|
|
29993
|
+
var meetingsViewCommand = defineCommand120({
|
|
29805
29994
|
meta: {
|
|
29806
29995
|
name: "view",
|
|
29807
29996
|
description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
|
|
@@ -29845,7 +30034,7 @@ var meetingsViewCommand = defineCommand117({
|
|
|
29845
30034
|
}
|
|
29846
30035
|
}
|
|
29847
30036
|
});
|
|
29848
|
-
var formsSubmissionsCommand =
|
|
30037
|
+
var formsSubmissionsCommand = defineCommand120({
|
|
29849
30038
|
meta: {
|
|
29850
30039
|
name: "submissions",
|
|
29851
30040
|
description: "How many leads a form received, and when. Example: baker hubspot forms submissions <formId> --days 30"
|
|
@@ -29894,7 +30083,7 @@ var formsSubmissionsCommand = defineCommand117({
|
|
|
29894
30083
|
}
|
|
29895
30084
|
}
|
|
29896
30085
|
});
|
|
29897
|
-
var workflowsListCommand =
|
|
30086
|
+
var workflowsListCommand = defineCommand120({
|
|
29898
30087
|
meta: {
|
|
29899
30088
|
name: "list",
|
|
29900
30089
|
description: "List HubSpot workflows. Example: baker hubspot workflows list --enabled-only"
|
|
@@ -29930,7 +30119,7 @@ var workflowsListCommand = defineCommand117({
|
|
|
29930
30119
|
}
|
|
29931
30120
|
}
|
|
29932
30121
|
});
|
|
29933
|
-
var pipelinesListCommand =
|
|
30122
|
+
var pipelinesListCommand = defineCommand120({
|
|
29934
30123
|
meta: {
|
|
29935
30124
|
name: "list",
|
|
29936
30125
|
description: "List HubSpot deal pipelines and their stages. Example: baker hubspot pipelines list"
|
|
@@ -29947,7 +30136,7 @@ var pipelinesListCommand = defineCommand117({
|
|
|
29947
30136
|
}
|
|
29948
30137
|
}
|
|
29949
30138
|
});
|
|
29950
|
-
var contactsSummaryCommand =
|
|
30139
|
+
var contactsSummaryCommand = defineCommand120({
|
|
29951
30140
|
meta: {
|
|
29952
30141
|
name: "summary",
|
|
29953
30142
|
description: "Whether recent leads are being worked, as counts. Example: baker hubspot contacts summary --days 30"
|
|
@@ -30017,7 +30206,7 @@ function contactLookupHints(data) {
|
|
|
30017
30206
|
}
|
|
30018
30207
|
return hints;
|
|
30019
30208
|
}
|
|
30020
|
-
var contactsLookupCommand =
|
|
30209
|
+
var contactsLookupCommand = defineCommand120({
|
|
30021
30210
|
meta: {
|
|
30022
30211
|
name: "lookup",
|
|
30023
30212
|
description: "Find one contact by email and see whether it was worked. Example: baker hubspot contacts lookup a@b.com"
|
|
@@ -30041,27 +30230,27 @@ var contactsLookupCommand = defineCommand117({
|
|
|
30041
30230
|
}
|
|
30042
30231
|
}
|
|
30043
30232
|
});
|
|
30044
|
-
var contactsCommand =
|
|
30233
|
+
var contactsCommand = defineCommand120({
|
|
30045
30234
|
meta: { name: "contacts", description: "Contacts on the connected HubSpot account." },
|
|
30046
30235
|
subCommands: { summary: contactsSummaryCommand, lookup: contactsLookupCommand }
|
|
30047
30236
|
});
|
|
30048
|
-
var formsCommand =
|
|
30237
|
+
var formsCommand = defineCommand120({
|
|
30049
30238
|
meta: { name: "forms", description: "HubSpot forms on the connected account." },
|
|
30050
30239
|
subCommands: { list: formsListCommand, view: formsViewCommand, submissions: formsSubmissionsCommand }
|
|
30051
30240
|
});
|
|
30052
|
-
var workflowsCommand =
|
|
30241
|
+
var workflowsCommand = defineCommand120({
|
|
30053
30242
|
meta: { name: "workflows", description: "HubSpot workflows on the connected account." },
|
|
30054
30243
|
subCommands: { list: workflowsListCommand }
|
|
30055
30244
|
});
|
|
30056
|
-
var pipelinesCommand =
|
|
30245
|
+
var pipelinesCommand = defineCommand120({
|
|
30057
30246
|
meta: { name: "pipelines", description: "HubSpot deal pipelines on the connected account." },
|
|
30058
30247
|
subCommands: { list: pipelinesListCommand }
|
|
30059
30248
|
});
|
|
30060
|
-
var meetingsCommand =
|
|
30249
|
+
var meetingsCommand = defineCommand120({
|
|
30061
30250
|
meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
|
|
30062
30251
|
subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
|
|
30063
30252
|
});
|
|
30064
|
-
var hubspotCommand =
|
|
30253
|
+
var hubspotCommand = defineCommand120({
|
|
30065
30254
|
meta: {
|
|
30066
30255
|
name: "hubspot",
|
|
30067
30256
|
description: `Read the connected HubSpot account \u2014 forms, the leads they received, workflows, deal pipelines and
|
|
@@ -30098,10 +30287,10 @@ Full guide: __tooling__/docs/tools/baker/hubspot.md`
|
|
|
30098
30287
|
});
|
|
30099
30288
|
|
|
30100
30289
|
// src/commands/images/index.ts
|
|
30101
|
-
import { defineCommand as
|
|
30290
|
+
import { defineCommand as defineCommand146 } from "citty";
|
|
30102
30291
|
|
|
30103
30292
|
// src/commands/images/crop.ts
|
|
30104
|
-
import { defineCommand as
|
|
30293
|
+
import { defineCommand as defineCommand121 } from "citty";
|
|
30105
30294
|
|
|
30106
30295
|
// src/lib/image/crop-sprite.ts
|
|
30107
30296
|
import sharp from "sharp";
|
|
@@ -30151,9 +30340,9 @@ async function readImageBuffer(pathOrUrl) {
|
|
|
30151
30340
|
}
|
|
30152
30341
|
return readFile19(pathOrUrl);
|
|
30153
30342
|
}
|
|
30154
|
-
async function isDirectory(
|
|
30343
|
+
async function isDirectory(path37) {
|
|
30155
30344
|
try {
|
|
30156
|
-
const s = await stat4(
|
|
30345
|
+
const s = await stat4(path37);
|
|
30157
30346
|
return s.isDirectory();
|
|
30158
30347
|
} catch {
|
|
30159
30348
|
return false;
|
|
@@ -30223,7 +30412,7 @@ function emitError2(err) {
|
|
|
30223
30412
|
}
|
|
30224
30413
|
process.exit(1);
|
|
30225
30414
|
}
|
|
30226
|
-
var cropCommand =
|
|
30415
|
+
var cropCommand = defineCommand121({
|
|
30227
30416
|
meta: {
|
|
30228
30417
|
name: "crop",
|
|
30229
30418
|
description: "Crop a rectangular region from an image.\n\nExample: baker images crop sprite.png --x 0 --y 0 --width 64 --height 64 --output icon.png"
|
|
@@ -30259,7 +30448,7 @@ var cropCommand = defineCommand118({
|
|
|
30259
30448
|
});
|
|
30260
30449
|
|
|
30261
30450
|
// src/commands/images/delete.ts
|
|
30262
|
-
import { defineCommand as
|
|
30451
|
+
import { defineCommand as defineCommand122 } from "citty";
|
|
30263
30452
|
registerSchema({
|
|
30264
30453
|
command: "images.delete",
|
|
30265
30454
|
description: "Delete an image by ID",
|
|
@@ -30273,7 +30462,7 @@ registerSchema({
|
|
|
30273
30462
|
}
|
|
30274
30463
|
}
|
|
30275
30464
|
});
|
|
30276
|
-
var deleteCommand =
|
|
30465
|
+
var deleteCommand = defineCommand122({
|
|
30277
30466
|
meta: {
|
|
30278
30467
|
name: "delete",
|
|
30279
30468
|
description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
|
|
@@ -30314,7 +30503,7 @@ var deleteCommand = defineCommand119({
|
|
|
30314
30503
|
});
|
|
30315
30504
|
|
|
30316
30505
|
// src/commands/images/dimensions.ts
|
|
30317
|
-
import { defineCommand as
|
|
30506
|
+
import { defineCommand as defineCommand123 } from "citty";
|
|
30318
30507
|
|
|
30319
30508
|
// src/lib/image/dimensions.ts
|
|
30320
30509
|
import { imageSize } from "image-size";
|
|
@@ -30337,7 +30526,7 @@ registerSchema({
|
|
|
30337
30526
|
target: { type: "string", description: "Local file path or remote http(s) URL", required: true }
|
|
30338
30527
|
}
|
|
30339
30528
|
});
|
|
30340
|
-
var dimensionsCommand =
|
|
30529
|
+
var dimensionsCommand = defineCommand123({
|
|
30341
30530
|
meta: {
|
|
30342
30531
|
name: "dimensions",
|
|
30343
30532
|
description: "Read image dimensions without decoding the full file.\n\nExample: baker images dimensions ./logo.png\nExample: baker images dimensions https://acme.com/hero.png"
|
|
@@ -30381,7 +30570,7 @@ var dimensionsCommand = defineCommand120({
|
|
|
30381
30570
|
});
|
|
30382
30571
|
|
|
30383
30572
|
// src/commands/images/download.ts
|
|
30384
|
-
import { defineCommand as
|
|
30573
|
+
import { defineCommand as defineCommand124 } from "citty";
|
|
30385
30574
|
|
|
30386
30575
|
// src/commands/images/downloadPaths.ts
|
|
30387
30576
|
import { basename as basename2, extname as extname3, join as join5 } from "path";
|
|
@@ -30437,13 +30626,13 @@ function resolveDownloadPath({ baseName, extension, out, outIsDirectory: outIsDi
|
|
|
30437
30626
|
}
|
|
30438
30627
|
function disambiguate(paths) {
|
|
30439
30628
|
const taken = /* @__PURE__ */ new Set();
|
|
30440
|
-
return paths.map((
|
|
30441
|
-
if (!taken.has(
|
|
30442
|
-
taken.add(
|
|
30443
|
-
return
|
|
30629
|
+
return paths.map((path37) => {
|
|
30630
|
+
if (!taken.has(path37)) {
|
|
30631
|
+
taken.add(path37);
|
|
30632
|
+
return path37;
|
|
30444
30633
|
}
|
|
30445
|
-
const ext = extname3(
|
|
30446
|
-
const stem =
|
|
30634
|
+
const ext = extname3(path37);
|
|
30635
|
+
const stem = path37.slice(0, path37.length - ext.length);
|
|
30447
30636
|
let n = 2;
|
|
30448
30637
|
while (taken.has(`${stem}-${n}${ext}`)) n += 1;
|
|
30449
30638
|
const unique = `${stem}-${n}${ext}`;
|
|
@@ -30570,10 +30759,10 @@ async function runDownloads(plan) {
|
|
|
30570
30759
|
const paths = disambiguate(fetched.map((item) => item.path));
|
|
30571
30760
|
const downloaded = [];
|
|
30572
30761
|
for (const [index, item] of fetched.entries()) {
|
|
30573
|
-
const
|
|
30762
|
+
const path37 = paths[index] ?? item.path;
|
|
30574
30763
|
try {
|
|
30575
|
-
await atomicWrite(
|
|
30576
|
-
downloaded.push({ input: item.input, output:
|
|
30764
|
+
await atomicWrite(path37, item.buffer);
|
|
30765
|
+
downloaded.push({ input: item.input, output: path37, bytes: item.buffer.length, contentType: item.contentType });
|
|
30577
30766
|
} catch (err) {
|
|
30578
30767
|
failed.push({ input: item.input, error: failureMessage(err, "Write failed") });
|
|
30579
30768
|
}
|
|
@@ -30606,7 +30795,7 @@ function emitError3(err) {
|
|
|
30606
30795
|
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
|
|
30607
30796
|
process.exit(1);
|
|
30608
30797
|
}
|
|
30609
|
-
var downloadCommand =
|
|
30798
|
+
var downloadCommand = defineCommand124({
|
|
30610
30799
|
meta: {
|
|
30611
30800
|
name: "download",
|
|
30612
30801
|
description: "Download image URLs and/or library images to local files \u2014 the missing first half of `source \u2192 download \u2192 normalize \u2192 place`. Never use `curl` for this.\n\nExamples:\n baker images download https://media.withbaker.com/\u2026/logo.webp\n baker images download j57abc123 j57def456 --out src/pages/pricing/_images/\n baker images download https://\u2026/hero.png --out ./hero.png"
|
|
@@ -30639,7 +30828,7 @@ var downloadCommand = defineCommand121({
|
|
|
30639
30828
|
});
|
|
30640
30829
|
|
|
30641
30830
|
// src/commands/images/extract.ts
|
|
30642
|
-
import { defineCommand as
|
|
30831
|
+
import { defineCommand as defineCommand125 } from "citty";
|
|
30643
30832
|
|
|
30644
30833
|
// src/commands/images/autoIngest.ts
|
|
30645
30834
|
var AUTO_INGEST_MAX = {
|
|
@@ -30686,7 +30875,7 @@ registerSchema({
|
|
|
30686
30875
|
}
|
|
30687
30876
|
}
|
|
30688
30877
|
});
|
|
30689
|
-
var extractCommand =
|
|
30878
|
+
var extractCommand = defineCommand125({
|
|
30690
30879
|
meta: {
|
|
30691
30880
|
name: "extract",
|
|
30692
30881
|
description: "Pull every image from a single URL via Firecrawl. ~$0.001/scrape. Cap auto-ingest at 20.\n\nExample: baker images extract https://stripe.com --auto-ingest 5"
|
|
@@ -30741,7 +30930,7 @@ var extractCommand = defineCommand122({
|
|
|
30741
30930
|
});
|
|
30742
30931
|
|
|
30743
30932
|
// src/commands/images/find.ts
|
|
30744
|
-
import { defineCommand as
|
|
30933
|
+
import { defineCommand as defineCommand126 } from "citty";
|
|
30745
30934
|
|
|
30746
30935
|
// src/commands/images/providerHits.ts
|
|
30747
30936
|
function asRecord3(value) {
|
|
@@ -30879,7 +31068,7 @@ registerSchema({
|
|
|
30879
31068
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
30880
31069
|
}
|
|
30881
31070
|
});
|
|
30882
|
-
var findCommand =
|
|
31071
|
+
var findCommand = defineCommand126({
|
|
30883
31072
|
meta: {
|
|
30884
31073
|
name: "find",
|
|
30885
31074
|
description: "Library-first fanout image search. Opt in to providers with --sources. `--fallback` short-circuits to externals only when library is thin. With --auto-ingest, ingested external hits return Baker-owned URLs.\n\nExample: baker images find 'office' --sources library,magnific --limit 20"
|
|
@@ -30952,7 +31141,7 @@ var findCommand = defineCommand123({
|
|
|
30952
31141
|
});
|
|
30953
31142
|
|
|
30954
31143
|
// src/commands/images/get.ts
|
|
30955
|
-
import { defineCommand as
|
|
31144
|
+
import { defineCommand as defineCommand127 } from "citty";
|
|
30956
31145
|
registerSchema({
|
|
30957
31146
|
command: "images.get",
|
|
30958
31147
|
description: "Get a single image by ID",
|
|
@@ -30960,7 +31149,7 @@ registerSchema({
|
|
|
30960
31149
|
id: { type: "string", description: "Image ID", required: true }
|
|
30961
31150
|
}
|
|
30962
31151
|
});
|
|
30963
|
-
var getCommand2 =
|
|
31152
|
+
var getCommand2 = defineCommand127({
|
|
30964
31153
|
meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
|
|
30965
31154
|
args: {
|
|
30966
31155
|
id: { type: "positional", description: "Image ID", required: false },
|
|
@@ -30996,7 +31185,7 @@ var getCommand2 = defineCommand124({
|
|
|
30996
31185
|
});
|
|
30997
31186
|
|
|
30998
31187
|
// src/commands/images/gif.ts
|
|
30999
|
-
import { defineCommand as
|
|
31188
|
+
import { defineCommand as defineCommand128 } from "citty";
|
|
31000
31189
|
registerSchema({
|
|
31001
31190
|
command: "images.gif",
|
|
31002
31191
|
description: "Search Giphy for GIFs / reaction memes (paid social creative).",
|
|
@@ -31028,7 +31217,7 @@ registerSchema({
|
|
|
31028
31217
|
}
|
|
31029
31218
|
}
|
|
31030
31219
|
});
|
|
31031
|
-
var gifCommand =
|
|
31220
|
+
var gifCommand = defineCommand128({
|
|
31032
31221
|
meta: {
|
|
31033
31222
|
name: "gif",
|
|
31034
31223
|
description: "Search Giphy for GIFs / reaction memes \u2014 built for paid-social creative (Meta, TikTok, LinkedIn, X). Free API. Each hit carries WebP + GIF + MP4 URLs in providerMeta so you can pick the right format per platform.\n\nExample: baker images gif 'this is fine' --limit 10\nExample: baker images gif 'office reaction' --rating pg --auto-ingest 2\nExample: baker images gif --trending --limit 25"
|
|
@@ -31075,7 +31264,7 @@ var gifCommand = defineCommand125({
|
|
|
31075
31264
|
});
|
|
31076
31265
|
|
|
31077
31266
|
// src/commands/images/google.ts
|
|
31078
|
-
import { defineCommand as
|
|
31267
|
+
import { defineCommand as defineCommand129 } from "citty";
|
|
31079
31268
|
var GOOGLE_ERROR_FIX = {
|
|
31080
31269
|
action: "use_different_resource",
|
|
31081
31270
|
explanation: "Generate the asset instead of retrying Google. Google is the last-resort image provider. Run `baker studio generate` to make the asset. Never sleep-and-retry this command \u2014 the CLI already backs off on rate limits. If no image can be sourced, continue the rest of the task with a placeholder rather than aborting it."
|
|
@@ -31115,7 +31304,7 @@ registerSchema({
|
|
|
31115
31304
|
}
|
|
31116
31305
|
}
|
|
31117
31306
|
});
|
|
31118
|
-
var googleCommand2 =
|
|
31307
|
+
var googleCommand2 = defineCommand129({
|
|
31119
31308
|
meta: {
|
|
31120
31309
|
name: "google",
|
|
31121
31310
|
description: "Google Images via the official Custom Search JSON API ($0.005/query, free 100/day). \u26A0 Source unverified \u2014 watermarks, low-res, mislabeled results are common. Use as last resort. With --auto-ingest, ingested hits return Baker-owned URLs.\n\nExample: baker images google 'industrial workshop' --type photo --size large --limit 20"
|
|
@@ -31188,7 +31377,7 @@ var googleCommand2 = defineCommand126({
|
|
|
31188
31377
|
});
|
|
31189
31378
|
|
|
31190
31379
|
// src/commands/images/group.ts
|
|
31191
|
-
import { defineCommand as
|
|
31380
|
+
import { defineCommand as defineCommand130 } from "citty";
|
|
31192
31381
|
|
|
31193
31382
|
// src/commands/mediaGroup.ts
|
|
31194
31383
|
async function runMediaGroupLookup(input) {
|
|
@@ -31241,7 +31430,7 @@ registerSchema({
|
|
|
31241
31430
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
31242
31431
|
}
|
|
31243
31432
|
});
|
|
31244
|
-
var groupCommand =
|
|
31433
|
+
var groupCommand = defineCommand130({
|
|
31245
31434
|
meta: {
|
|
31246
31435
|
name: "group",
|
|
31247
31436
|
description: "List every asset that arrived in the same set \u2014 the slides of one Instagram carousel, the images off one scraped page. Start here whenever a hit looks like part of a sequence: carousel slides are authored to be read in order and usually only make sense together. Takes an image or a video id, since one carousel can contain both. Example: baker images group <imageId>"
|
|
@@ -31261,7 +31450,7 @@ var groupCommand = defineCommand127({
|
|
|
31261
31450
|
});
|
|
31262
31451
|
|
|
31263
31452
|
// src/commands/images/icon.ts
|
|
31264
|
-
import { defineCommand as
|
|
31453
|
+
import { defineCommand as defineCommand131 } from "citty";
|
|
31265
31454
|
|
|
31266
31455
|
// src/commands/images/brandVerification.ts
|
|
31267
31456
|
function brandToken(domain) {
|
|
@@ -31358,7 +31547,7 @@ registerSchema({
|
|
|
31358
31547
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
31359
31548
|
}
|
|
31360
31549
|
});
|
|
31361
|
-
var iconCommand =
|
|
31550
|
+
var iconCommand = defineCommand131({
|
|
31362
31551
|
meta: {
|
|
31363
31552
|
name: "icon",
|
|
31364
31553
|
description: "Icon via Iconify (simple-icons, logos, lucide, devicon, heroicons, tabler, phosphor, material-symbols, \u2026). Free CDN, no API key.\n\nExample: baker images icon react --set devicon\nExample: baker images icon lucide:check --color '#0a0a0a'"
|
|
@@ -31428,7 +31617,7 @@ var iconCommand = defineCommand128({
|
|
|
31428
31617
|
});
|
|
31429
31618
|
|
|
31430
31619
|
// src/commands/images/ingest.ts
|
|
31431
|
-
import { defineCommand as
|
|
31620
|
+
import { defineCommand as defineCommand132 } from "citty";
|
|
31432
31621
|
registerSchema({
|
|
31433
31622
|
command: "images.ingest",
|
|
31434
31623
|
description: "Ingest a remote image URL into the library (full describe + embed).",
|
|
@@ -31442,7 +31631,7 @@ registerSchema({
|
|
|
31442
31631
|
fields: { type: "string", description: "Comma-separated field names to include", required: false }
|
|
31443
31632
|
}
|
|
31444
31633
|
});
|
|
31445
|
-
var ingestCommand =
|
|
31634
|
+
var ingestCommand = defineCommand132({
|
|
31446
31635
|
meta: {
|
|
31447
31636
|
name: "ingest",
|
|
31448
31637
|
description: "Download a remote URL and store it in the library. Hash-deduped on bytes + externalId.\n\nExample: baker images ingest https://img.freepik.com/free-photo/xyz.jpg --source magnific --external-id 12345"
|
|
@@ -31492,7 +31681,7 @@ var ingestCommand = defineCommand129({
|
|
|
31492
31681
|
});
|
|
31493
31682
|
|
|
31494
31683
|
// src/commands/images/layerize.ts
|
|
31495
|
-
import { defineCommand as
|
|
31684
|
+
import { defineCommand as defineCommand133 } from "citty";
|
|
31496
31685
|
registerSchema({
|
|
31497
31686
|
command: "images.layerize",
|
|
31498
31687
|
description: "Split a library image into editable layers: transparent PNG cutouts for each element, plus any headline recovered as EDITABLE TEXT with its font, size, colour and position. Waits for completion by default. Costs credits.",
|
|
@@ -31556,7 +31745,7 @@ async function pollUntilSettled(imageId, maxWait) {
|
|
|
31556
31745
|
}
|
|
31557
31746
|
return null;
|
|
31558
31747
|
}
|
|
31559
|
-
var layerizeCommand =
|
|
31748
|
+
var layerizeCommand = defineCommand133({
|
|
31560
31749
|
meta: {
|
|
31561
31750
|
name: "layerize",
|
|
31562
31751
|
description: "Split a library image into editable layers \u2014 transparent cutouts per element, plus any baked-in headline recovered as editable text with its typography.\n\nStart here: baker images layerize j571abc123def\nExample: baker images layerize j571abc123def --full\nExample: baker images layerize j571abc123def --instructions 'keep the product and its shadow together'"
|
|
@@ -31625,7 +31814,7 @@ registerSchema({
|
|
|
31625
31814
|
full: { type: "boolean", description: "Include geometry and typography for every layer", required: false }
|
|
31626
31815
|
}
|
|
31627
31816
|
});
|
|
31628
|
-
var layersCommand =
|
|
31817
|
+
var layersCommand = defineCommand133({
|
|
31629
31818
|
meta: {
|
|
31630
31819
|
name: "layers",
|
|
31631
31820
|
description: "Read the layers of an image that has already been split. Free \u2014 no provider call.\n\nStart here: baker images layers j571abc123def\nExample: baker images layers j571abc123def --full"
|
|
@@ -31665,7 +31854,7 @@ var layersCommand = defineCommand130({
|
|
|
31665
31854
|
});
|
|
31666
31855
|
|
|
31667
31856
|
// src/commands/images/library.ts
|
|
31668
|
-
import { defineCommand as
|
|
31857
|
+
import { defineCommand as defineCommand134 } from "citty";
|
|
31669
31858
|
registerSchema({
|
|
31670
31859
|
command: "images.library",
|
|
31671
31860
|
description: "Search the company image library. Returns only ready images.",
|
|
@@ -31691,7 +31880,7 @@ registerSchema({
|
|
|
31691
31880
|
}
|
|
31692
31881
|
}
|
|
31693
31882
|
});
|
|
31694
|
-
var libraryCommand =
|
|
31883
|
+
var libraryCommand = defineCommand134({
|
|
31695
31884
|
meta: {
|
|
31696
31885
|
name: "library",
|
|
31697
31886
|
description: "Search the company image library (hybrid BM25 + vector + Cohere rerank). Use this BEFORE any external provider.\n\nExample: baker images library 'hero banner' --aspect-ratio 16:9 --source magnific"
|
|
@@ -31754,7 +31943,7 @@ var libraryCommand = defineCommand131({
|
|
|
31754
31943
|
});
|
|
31755
31944
|
|
|
31756
31945
|
// src/commands/images/logo.ts
|
|
31757
|
-
import { defineCommand as
|
|
31946
|
+
import { defineCommand as defineCommand135 } from "citty";
|
|
31758
31947
|
registerSchema({
|
|
31759
31948
|
command: "images.logo",
|
|
31760
31949
|
description: "Brand logo lookup via Brandfetch. Auto-ingests by default. Returns `brandMatch` \u2014 Brandfetch's own verdict on whose brand the domain is (confirmed | mismatch | unverified). Branch on it: `mismatch` means the mark is another company's, so do not place it. `confirmed` verifies the record, not the artwork \u2014 read the ingested row back to check the mark itself.",
|
|
@@ -31782,7 +31971,7 @@ registerSchema({
|
|
|
31782
31971
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
31783
31972
|
}
|
|
31784
31973
|
});
|
|
31785
|
-
var logoCommand =
|
|
31974
|
+
var logoCommand = defineCommand135({
|
|
31786
31975
|
meta: {
|
|
31787
31976
|
name: "logo",
|
|
31788
31977
|
description: "Brand logo via Brandfetch. Returns up to 5 variants (icon, light/dark logo, light/dark symbol) plus `brandMatch`. Auto-ingests the first variant.\n\nStart here: check `brandMatch.verdict`.\n mismatch \u2192 the mark belongs to `brandMatch.name`, a different company. Do not place it.\n unverified \u2192 nothing confirmed whose logo this is. Treat as unchecked.\n confirmed \u2192 Brandfetch has this brand's record. That verifies the record, NOT the artwork \u2014 a confirmed domain has served another company's logo before.\n\n\u26A0 Whatever the verdict, read the ingested row back with `baker images get <imageId>` and check `textInImage`/`subject` before placing it. That is the only check that looks at the mark.\n\nExample: baker images logo stripe.com --variant logo"
|
|
@@ -31855,7 +32044,7 @@ var logoCommand = defineCommand132({
|
|
|
31855
32044
|
});
|
|
31856
32045
|
|
|
31857
32046
|
// src/commands/images/normalize.ts
|
|
31858
|
-
import { defineCommand as
|
|
32047
|
+
import { defineCommand as defineCommand136 } from "citty";
|
|
31859
32048
|
|
|
31860
32049
|
// src/lib/image/color-changer.ts
|
|
31861
32050
|
import quantize from "quantize";
|
|
@@ -32587,7 +32776,7 @@ function coerceRawArgs(args) {
|
|
|
32587
32776
|
"dry-run": bool(args["dry-run"])
|
|
32588
32777
|
};
|
|
32589
32778
|
}
|
|
32590
|
-
var normalizeCommand =
|
|
32779
|
+
var normalizeCommand = defineCommand136({
|
|
32591
32780
|
meta: {
|
|
32592
32781
|
name: "normalize",
|
|
32593
32782
|
description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
|
|
@@ -32642,7 +32831,7 @@ Examples:
|
|
|
32642
32831
|
});
|
|
32643
32832
|
|
|
32644
32833
|
// src/commands/images/pinterest.ts
|
|
32645
|
-
import { defineCommand as
|
|
32834
|
+
import { defineCommand as defineCommand137 } from "citty";
|
|
32646
32835
|
registerSchema({
|
|
32647
32836
|
command: "images.pinterest",
|
|
32648
32837
|
description: "Pinterest image search via ScrapeCreators. Reference-grade real-world photography, product styling, interiors, fashion, food, and aesthetic mood boards. Inspect before placing \u2014 Pinterest is unverified, trademark-bearing web content.",
|
|
@@ -32662,7 +32851,7 @@ registerSchema({
|
|
|
32662
32851
|
}
|
|
32663
32852
|
}
|
|
32664
32853
|
});
|
|
32665
|
-
var pinterestCommand =
|
|
32854
|
+
var pinterestCommand = defineCommand137({
|
|
32666
32855
|
meta: {
|
|
32667
32856
|
name: "pinterest",
|
|
32668
32857
|
description: "Pinterest image search via ScrapeCreators ($0.00188/request). Best for photo-realistic reference imagery \u2014 lifestyle, interiors, fashion, food, product styling, and mood boards to brief AI generation against. \u26A0 Unverified, trademark-bearing web content \u2014 inspect and respect rights before placing on a customer page. Browse first; auto-ingest only the pins you commit to.\n\nExamples:\n baker images pinterest 'scandinavian living room'\n baker images pinterest 'minimalist skincare product photography' --limit 20\n baker images pinterest 'cozy coffee shop interior' --auto-ingest 2 --context 'Mood reference for hero photography'"
|
|
@@ -32719,7 +32908,7 @@ var pinterestCommand = defineCommand134({
|
|
|
32719
32908
|
});
|
|
32720
32909
|
|
|
32721
32910
|
// src/commands/images/screenshot.ts
|
|
32722
|
-
import { defineCommand as
|
|
32911
|
+
import { defineCommand as defineCommand138 } from "citty";
|
|
32723
32912
|
registerSchema({
|
|
32724
32913
|
command: "images.screenshot",
|
|
32725
32914
|
description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
|
|
@@ -32738,7 +32927,7 @@ registerSchema({
|
|
|
32738
32927
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
32739
32928
|
}
|
|
32740
32929
|
});
|
|
32741
|
-
var screenshotCommand =
|
|
32930
|
+
var screenshotCommand = defineCommand138({
|
|
32742
32931
|
meta: {
|
|
32743
32932
|
name: "screenshot",
|
|
32744
32933
|
description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
|
|
@@ -32802,7 +32991,7 @@ var screenshotCommand = defineCommand135({
|
|
|
32802
32991
|
});
|
|
32803
32992
|
|
|
32804
32993
|
// src/commands/images/search.ts
|
|
32805
|
-
import { defineCommand as
|
|
32994
|
+
import { defineCommand as defineCommand139 } from "citty";
|
|
32806
32995
|
registerSchema({
|
|
32807
32996
|
command: "images.search",
|
|
32808
32997
|
description: "Search images by text query. Only returns ready images.",
|
|
@@ -32818,7 +33007,7 @@ registerSchema({
|
|
|
32818
33007
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
32819
33008
|
}
|
|
32820
33009
|
});
|
|
32821
|
-
var searchCommand =
|
|
33010
|
+
var searchCommand = defineCommand139({
|
|
32822
33011
|
meta: {
|
|
32823
33012
|
name: "search",
|
|
32824
33013
|
description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
|
|
@@ -32878,7 +33067,7 @@ var searchCommand = defineCommand136({
|
|
|
32878
33067
|
});
|
|
32879
33068
|
|
|
32880
33069
|
// src/commands/images/sticker.ts
|
|
32881
|
-
import { defineCommand as
|
|
33070
|
+
import { defineCommand as defineCommand140 } from "citty";
|
|
32882
33071
|
registerSchema({
|
|
32883
33072
|
command: "images.sticker",
|
|
32884
33073
|
description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
|
|
@@ -32910,7 +33099,7 @@ registerSchema({
|
|
|
32910
33099
|
}
|
|
32911
33100
|
}
|
|
32912
33101
|
});
|
|
32913
|
-
var stickerCommand =
|
|
33102
|
+
var stickerCommand = defineCommand140({
|
|
32914
33103
|
meta: {
|
|
32915
33104
|
name: "sticker",
|
|
32916
33105
|
description: "Search Giphy's sticker corpus \u2014 transparent-background WebPs / GIFs ideal for overlaying on ad creative (Meta, TikTok, Stories). Same Giphy free API as `baker images gif`; results carry WebP + GIF + MP4 URLs in providerMeta.\n\nExample: baker images sticker 'thumbs up' --limit 10\nExample: baker images sticker celebration --rating g --auto-ingest 3\nExample: baker images sticker --trending --limit 25"
|
|
@@ -32957,7 +33146,7 @@ var stickerCommand = defineCommand137({
|
|
|
32957
33146
|
});
|
|
32958
33147
|
|
|
32959
33148
|
// src/commands/images/stock.ts
|
|
32960
|
-
import { defineCommand as
|
|
33149
|
+
import { defineCommand as defineCommand141 } from "citty";
|
|
32961
33150
|
var STOCK_ERROR_FIX = {
|
|
32962
33151
|
action: "use_different_resource",
|
|
32963
33152
|
explanation: "Switch provider instead of retrying stock search. Stock search is one of several image sources. Run `baker images find <query> --sources library,pinterest,google` (`--sources` is required \u2014 `find` alone searches the library only) or `baker studio generate` to make the asset. Never sleep-and-retry this command \u2014 the CLI already backs off on rate limits. If no image can be sourced, continue the rest of the task with a placeholder rather than aborting it."
|
|
@@ -33034,7 +33223,7 @@ function buildStockRequest(query, args) {
|
|
|
33034
33223
|
if (args.context) body.descriptionContext = args.context;
|
|
33035
33224
|
return body;
|
|
33036
33225
|
}
|
|
33037
|
-
var stockCommand =
|
|
33226
|
+
var stockCommand = defineCommand141({
|
|
33038
33227
|
meta: {
|
|
33039
33228
|
name: "stock",
|
|
33040
33229
|
description: "Stock search via Magnific \u2014 Freepik's developer API (~250M assets: photos, vectors, illustrations, icons, PSDs). $0.002/req. With --auto-ingest, ingested hits return Baker-owned URLs.\n\nExamples:\n baker images stock 'minimalist office'\n baker images stock 'flat office workers' --type vector\n baker images stock 'hero photo of a kitchen' --type photo --orientation landscape --ai exclude\n baker images stock 'brand pattern' --color '#0a0a0a' --license freemium --auto-ingest 2"
|
|
@@ -33107,7 +33296,7 @@ var stockCommand = defineCommand138({
|
|
|
33107
33296
|
});
|
|
33108
33297
|
|
|
33109
33298
|
// src/lib/tags-command.ts
|
|
33110
|
-
import { defineCommand as
|
|
33299
|
+
import { defineCommand as defineCommand142 } from "citty";
|
|
33111
33300
|
function makeTagsCommand(command, label, endpoint) {
|
|
33112
33301
|
registerSchema({
|
|
33113
33302
|
command: `${command}.tags`,
|
|
@@ -33116,7 +33305,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
33116
33305
|
output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
|
|
33117
33306
|
}
|
|
33118
33307
|
});
|
|
33119
|
-
return
|
|
33308
|
+
return defineCommand142({
|
|
33120
33309
|
meta: {
|
|
33121
33310
|
name: "tags",
|
|
33122
33311
|
description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
|
|
@@ -33152,7 +33341,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
33152
33341
|
var tagsCommand2 = makeTagsCommand("images", "image", "/api/images/tags");
|
|
33153
33342
|
|
|
33154
33343
|
// src/commands/images/upload.ts
|
|
33155
|
-
import { defineCommand as
|
|
33344
|
+
import { defineCommand as defineCommand143 } from "citty";
|
|
33156
33345
|
registerSchema({
|
|
33157
33346
|
command: "images.upload",
|
|
33158
33347
|
description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
|
|
@@ -33190,7 +33379,7 @@ registerSchema({
|
|
|
33190
33379
|
function isRemoteUrl2(value) {
|
|
33191
33380
|
return /^https?:\/\//i.test(value);
|
|
33192
33381
|
}
|
|
33193
|
-
var uploadCommand =
|
|
33382
|
+
var uploadCommand = defineCommand143({
|
|
33194
33383
|
meta: {
|
|
33195
33384
|
name: "upload",
|
|
33196
33385
|
description: "Upload an image to the library \u2014 accepts a local file path OR a remote http(s) URL.\n\nLocal: reads bytes, sends to /api/images/upload, content-type auto-detected from extension.\nRemote: dispatches to /api/images/ingest with hash-dedup on bytes + externalId.\n\nExamples:\n baker images upload ./logo.png --source uploaded\n baker images upload ./cert.png --context 'ISO 27001 badge \u2014 enterprise tier'\n baker images upload https://acme.com/hero.png --source firecrawl --context 'Acme competitor pricing hero'"
|
|
@@ -33283,7 +33472,7 @@ async function uploadLocal(target, args) {
|
|
|
33283
33472
|
}
|
|
33284
33473
|
|
|
33285
33474
|
// src/commands/images/upscale.ts
|
|
33286
|
-
import { defineCommand as
|
|
33475
|
+
import { defineCommand as defineCommand144 } from "citty";
|
|
33287
33476
|
registerSchema({
|
|
33288
33477
|
command: "images.upscale",
|
|
33289
33478
|
description: "Upscale a library image via the backend (Replicate, cost-tracked). Waits for completion by default. The image must be status 'ready' and raster (not SVG/AVIF).",
|
|
@@ -33298,7 +33487,7 @@ registerSchema({
|
|
|
33298
33487
|
}
|
|
33299
33488
|
});
|
|
33300
33489
|
var POLL_INTERVAL_MS4 = 1500;
|
|
33301
|
-
var upscaleCommand =
|
|
33490
|
+
var upscaleCommand = defineCommand144({
|
|
33302
33491
|
meta: {
|
|
33303
33492
|
name: "upscale",
|
|
33304
33493
|
description: "Upscale a library image via the Convex backend (Replicate, cost-tracked at $0.05/image). Waits for completion by default.\n\nExample: baker images upscale j571abc123def\nExample: baker images upscale j571abc123def --max-wait 0 # fire-and-forget"
|
|
@@ -33353,7 +33542,7 @@ var upscaleCommand = defineCommand141({
|
|
|
33353
33542
|
});
|
|
33354
33543
|
|
|
33355
33544
|
// src/commands/images/use.ts
|
|
33356
|
-
import { defineCommand as
|
|
33545
|
+
import { defineCommand as defineCommand145 } from "citty";
|
|
33357
33546
|
registerSchema({
|
|
33358
33547
|
command: "images.use",
|
|
33359
33548
|
description: "Ingest a URL and wait for the library record to be ready.",
|
|
@@ -33382,7 +33571,7 @@ function emitReady(ingestResult, doc, args) {
|
|
|
33382
33571
|
args.full === true
|
|
33383
33572
|
);
|
|
33384
33573
|
}
|
|
33385
|
-
var useCommand =
|
|
33574
|
+
var useCommand = defineCommand145({
|
|
33386
33575
|
meta: {
|
|
33387
33576
|
name: "use",
|
|
33388
33577
|
description: "Sugar over `ingest`: download \u2192 store \u2192 wait until describe + embed complete \u2192 return ready library record.\n\nExample: baker images use https://cdn.example.com/hero.png --source uploaded"
|
|
@@ -33431,7 +33620,7 @@ var useCommand = defineCommand142({
|
|
|
33431
33620
|
});
|
|
33432
33621
|
|
|
33433
33622
|
// src/commands/images/index.ts
|
|
33434
|
-
var imagesCommand =
|
|
33623
|
+
var imagesCommand = defineCommand146({
|
|
33435
33624
|
meta: {
|
|
33436
33625
|
name: "images",
|
|
33437
33626
|
description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
|
|
@@ -33509,12 +33698,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
|
|
|
33509
33698
|
});
|
|
33510
33699
|
|
|
33511
33700
|
// src/commands/landing/index.ts
|
|
33512
|
-
import { defineCommand as
|
|
33701
|
+
import { defineCommand as defineCommand157 } from "citty";
|
|
33513
33702
|
|
|
33514
33703
|
// src/commands/landing/critique.ts
|
|
33515
33704
|
import { readdir as readdir8, stat as stat6 } from "fs/promises";
|
|
33516
33705
|
import path29 from "path";
|
|
33517
|
-
import { defineCommand as
|
|
33706
|
+
import { defineCommand as defineCommand147 } from "citty";
|
|
33518
33707
|
|
|
33519
33708
|
// src/engine/landing/lib/brand-tokens.ts
|
|
33520
33709
|
import { readFile as readFile20 } from "fs/promises";
|
|
@@ -34909,7 +35098,7 @@ function fail5(code, message, fix) {
|
|
|
34909
35098
|
);
|
|
34910
35099
|
process.exit(2);
|
|
34911
35100
|
}
|
|
34912
|
-
var critiqueCommand2 =
|
|
35101
|
+
var critiqueCommand2 = defineCommand147({
|
|
34913
35102
|
meta: {
|
|
34914
35103
|
name: "critique",
|
|
34915
35104
|
description: "Start here: `baker landing critique <slug>` after building or editing a landing. Deterministic design-quality critic (ADVISORY \u2014 findings never fail it). Flags the known AI design tells (gradient text, overused fonts, side-tab borders, cream palettes, buzzword copy, broken images) tiered block/warn/advisory, respecting the client's BRAND.md as the allowlist. Also records the critique that publishing requires \u2014 run it before finishing a landing."
|
|
@@ -35018,10 +35207,10 @@ async function isDir(p) {
|
|
|
35018
35207
|
}
|
|
35019
35208
|
|
|
35020
35209
|
// src/commands/landing/inspiration/index.ts
|
|
35021
|
-
import { defineCommand as
|
|
35210
|
+
import { defineCommand as defineCommand156 } from "citty";
|
|
35022
35211
|
|
|
35023
35212
|
// src/commands/landing/inspiration/add.ts
|
|
35024
|
-
import { defineCommand as
|
|
35213
|
+
import { defineCommand as defineCommand148 } from "citty";
|
|
35025
35214
|
|
|
35026
35215
|
// src/commands/landing/inspiration/shared.ts
|
|
35027
35216
|
var INSPIRATION_HINTS = {
|
|
@@ -35103,7 +35292,7 @@ registerSchema({
|
|
|
35103
35292
|
note: { type: "string", description: "Why this page is worth keeping", required: false }
|
|
35104
35293
|
}
|
|
35105
35294
|
});
|
|
35106
|
-
var addCommand =
|
|
35295
|
+
var addCommand = defineCommand148({
|
|
35107
35296
|
meta: {
|
|
35108
35297
|
name: "add",
|
|
35109
35298
|
description: "Add someone else's landing page to the reference library. Example: baker landing inspiration add https://linear.app --note 'the client likes this density'"
|
|
@@ -35145,7 +35334,7 @@ var addCommand = defineCommand145({
|
|
|
35145
35334
|
// src/commands/landing/inspiration/code.ts
|
|
35146
35335
|
import { mkdir as mkdir10, writeFile as writeFile14 } from "fs/promises";
|
|
35147
35336
|
import path30 from "path";
|
|
35148
|
-
import { defineCommand as
|
|
35337
|
+
import { defineCommand as defineCommand149 } from "citty";
|
|
35149
35338
|
registerSchema({
|
|
35150
35339
|
command: "landing.inspiration.code",
|
|
35151
35340
|
description: "Write a reference section's standalone HTML+CSS to .baker/inspiration/<id>/ so you can read how it is built. Reference only \u2014 the structure is the lesson, the words are not yours to reuse. Consulting a section records it, and `baker landing critique` blocks a publish that ships its copy verbatim.",
|
|
@@ -35154,7 +35343,7 @@ registerSchema({
|
|
|
35154
35343
|
full: { type: "boolean", description: "Print the markup inline as well as writing it", required: false }
|
|
35155
35344
|
}
|
|
35156
35345
|
});
|
|
35157
|
-
var codeCommand =
|
|
35346
|
+
var codeCommand = defineCommand149({
|
|
35158
35347
|
meta: {
|
|
35159
35348
|
name: "code",
|
|
35160
35349
|
description: "Write one reference section's standalone markup to disk. Example: baker landing inspiration code k57abc\u2026 \u2014 read it for structure, then build your own."
|
|
@@ -35211,7 +35400,7 @@ var codeCommand = defineCommand146({
|
|
|
35211
35400
|
});
|
|
35212
35401
|
|
|
35213
35402
|
// src/commands/landing/inspiration/favorites.ts
|
|
35214
|
-
import { defineCommand as
|
|
35403
|
+
import { defineCommand as defineCommand150 } from "citty";
|
|
35215
35404
|
registerSchema({
|
|
35216
35405
|
command: "landing.inspiration.favorites",
|
|
35217
35406
|
description: "List the reference sections this company has saved. This is what `search` looks at by default, so it is the client's own taste profile \u2014 read it before proposing a direction.",
|
|
@@ -35225,7 +35414,7 @@ registerSchema({
|
|
|
35225
35414
|
}
|
|
35226
35415
|
}
|
|
35227
35416
|
});
|
|
35228
|
-
var favoritesCommand =
|
|
35417
|
+
var favoritesCommand = defineCommand150({
|
|
35229
35418
|
meta: {
|
|
35230
35419
|
name: "favorites",
|
|
35231
35420
|
description: "List this company's saved reference sections. Example: baker landing inspiration favorites --type hero,pricing"
|
|
@@ -35305,7 +35494,7 @@ registerSchema({
|
|
|
35305
35494
|
note: { type: "string", description: "Why this is worth keeping", required: false }
|
|
35306
35495
|
}
|
|
35307
35496
|
});
|
|
35308
|
-
var favoriteCommand =
|
|
35497
|
+
var favoriteCommand = defineCommand150({
|
|
35309
35498
|
meta: {
|
|
35310
35499
|
name: "favorite",
|
|
35311
35500
|
description: "Save a reference section to this company. Example: baker landing inspiration favorite k57abc\u2026"
|
|
@@ -35343,7 +35532,7 @@ registerSchema({
|
|
|
35343
35532
|
page: { type: "boolean", description: "Treat the id as a page rather than a section", required: false }
|
|
35344
35533
|
}
|
|
35345
35534
|
});
|
|
35346
|
-
var unfavoriteCommand =
|
|
35535
|
+
var unfavoriteCommand = defineCommand150({
|
|
35347
35536
|
meta: {
|
|
35348
35537
|
name: "unfavorite",
|
|
35349
35538
|
description: "Remove a reference section from this company's saved set. Example: baker landing inspiration unfavorite k57abc\u2026"
|
|
@@ -35365,7 +35554,7 @@ var unfavoriteCommand = defineCommand147({
|
|
|
35365
35554
|
});
|
|
35366
35555
|
|
|
35367
35556
|
// src/commands/landing/inspiration/page.ts
|
|
35368
|
-
import { defineCommand as
|
|
35557
|
+
import { defineCommand as defineCommand151 } from "citty";
|
|
35369
35558
|
registerSchema({
|
|
35370
35559
|
command: "landing.inspiration.page",
|
|
35371
35560
|
description: "Show a whole reference page as a sequence: every section top to bottom with its type and the idea behind it. This is the view to use when the question is how a good page is ORDERED rather than what one section looks like.",
|
|
@@ -35382,7 +35571,7 @@ registerSchema({
|
|
|
35382
35571
|
}
|
|
35383
35572
|
}
|
|
35384
35573
|
});
|
|
35385
|
-
var pageCommand =
|
|
35574
|
+
var pageCommand = defineCommand151({
|
|
35386
35575
|
meta: {
|
|
35387
35576
|
name: "page",
|
|
35388
35577
|
description: "Show how a reference page sequences its sections. Example: baker landing inspiration page j91xyz\u2026 \u2014 the blueprint, not the pixels."
|
|
@@ -35447,7 +35636,7 @@ var pageCommand = defineCommand148({
|
|
|
35447
35636
|
// src/commands/landing/inspiration/scrape.ts
|
|
35448
35637
|
import { readFile as readFile23 } from "fs/promises";
|
|
35449
35638
|
import path33 from "path";
|
|
35450
|
-
import { defineCommand as
|
|
35639
|
+
import { defineCommand as defineCommand152 } from "citty";
|
|
35451
35640
|
|
|
35452
35641
|
// src/engine/landing/lib/capturedReferences.ts
|
|
35453
35642
|
var MAX_STRINGS_PER_SECTION = 40;
|
|
@@ -37588,7 +37777,7 @@ registerSchema({
|
|
|
37588
37777
|
report: { type: "boolean", description: "Write report.html. `--no-report` to skip", required: false }
|
|
37589
37778
|
}
|
|
37590
37779
|
});
|
|
37591
|
-
var scrapeCommand =
|
|
37780
|
+
var scrapeCommand = defineCommand152({
|
|
37592
37781
|
meta: {
|
|
37593
37782
|
name: "scrape",
|
|
37594
37783
|
description: "Capture a landing page to a directory, now. Example: baker landing inspiration scrape https://linear.app --out .baker/inspiration/linear.app"
|
|
@@ -37689,9 +37878,46 @@ var scrapeCommand = defineCommand149({
|
|
|
37689
37878
|
});
|
|
37690
37879
|
|
|
37691
37880
|
// src/commands/landing/inspiration/search.ts
|
|
37881
|
+
import path35 from "path";
|
|
37882
|
+
import { defineCommand as defineCommand153 } from "citty";
|
|
37883
|
+
|
|
37884
|
+
// src/commands/landing/inspiration/shot.ts
|
|
37692
37885
|
import { mkdir as mkdir12, writeFile as writeFile17 } from "fs/promises";
|
|
37693
37886
|
import path34 from "path";
|
|
37694
|
-
import
|
|
37887
|
+
import sharp6 from "sharp";
|
|
37888
|
+
var READABLE_SHOT = {
|
|
37889
|
+
maxWidth: 1440,
|
|
37890
|
+
maxHeight: 4e3,
|
|
37891
|
+
quality: 82,
|
|
37892
|
+
extension: "webp"
|
|
37893
|
+
};
|
|
37894
|
+
async function toReadableShot(original) {
|
|
37895
|
+
try {
|
|
37896
|
+
return await sharp6(original).resize({
|
|
37897
|
+
width: READABLE_SHOT.maxWidth,
|
|
37898
|
+
height: READABLE_SHOT.maxHeight,
|
|
37899
|
+
fit: "inside",
|
|
37900
|
+
withoutEnlargement: true
|
|
37901
|
+
}).webp({ quality: READABLE_SHOT.quality }).toBuffer();
|
|
37902
|
+
} catch {
|
|
37903
|
+
return original;
|
|
37904
|
+
}
|
|
37905
|
+
}
|
|
37906
|
+
async function downloadReadableShot(url, file) {
|
|
37907
|
+
if (!url) return null;
|
|
37908
|
+
try {
|
|
37909
|
+
const response = await fetch(url);
|
|
37910
|
+
if (!response.ok) return null;
|
|
37911
|
+
const shot = await toReadableShot(Buffer.from(await response.arrayBuffer()));
|
|
37912
|
+
await mkdir12(path34.dirname(file), { recursive: true });
|
|
37913
|
+
await writeFile17(file, shot);
|
|
37914
|
+
return path34.relative(process.cwd(), file);
|
|
37915
|
+
} catch {
|
|
37916
|
+
return null;
|
|
37917
|
+
}
|
|
37918
|
+
}
|
|
37919
|
+
|
|
37920
|
+
// src/commands/landing/inspiration/search.ts
|
|
37695
37921
|
registerSchema({
|
|
37696
37922
|
command: "landing.inspiration.search",
|
|
37697
37923
|
description: "Search the shared library of real landing-page sections for reference before you design. Start here: baker landing inspiration search 'pricing with a monthly/annual toggle'. Returns the idea behind each section plus a downloaded screenshot you can Read. Defaults to this company's saved sections; pass --scope all for the whole library.",
|
|
@@ -37777,25 +38003,20 @@ function buildSearchBody(args) {
|
|
|
37777
38003
|
return body;
|
|
37778
38004
|
}
|
|
37779
38005
|
async function downloadShots(results) {
|
|
37780
|
-
const dir =
|
|
37781
|
-
await mkdir12(dir, { recursive: true });
|
|
38006
|
+
const dir = path35.join(process.cwd(), ".baker", "inspiration");
|
|
37782
38007
|
const saved = /* @__PURE__ */ new Map();
|
|
37783
38008
|
await Promise.all(
|
|
37784
38009
|
results.map(async (result) => {
|
|
37785
|
-
|
|
37786
|
-
|
|
37787
|
-
|
|
37788
|
-
|
|
37789
|
-
|
|
37790
|
-
await writeFile17(file, Buffer.from(await response.arrayBuffer()));
|
|
37791
|
-
saved.set(result.id, path34.relative(process.cwd(), file));
|
|
37792
|
-
} catch {
|
|
37793
|
-
}
|
|
38010
|
+
const file = await downloadReadableShot(
|
|
38011
|
+
result.desktopShotUrl,
|
|
38012
|
+
path35.join(dir, `${result.id}.${READABLE_SHOT.extension}`)
|
|
38013
|
+
);
|
|
38014
|
+
if (file) saved.set(result.id, file);
|
|
37794
38015
|
})
|
|
37795
38016
|
);
|
|
37796
38017
|
return saved;
|
|
37797
38018
|
}
|
|
37798
|
-
var searchCommand2 =
|
|
38019
|
+
var searchCommand2 = defineCommand153({
|
|
37799
38020
|
meta: {
|
|
37800
38021
|
name: "search",
|
|
37801
38022
|
description: "Search real landing-page sections for reference. Example: baker landing inspiration search 'dark developer hero with a terminal' --register dev-tool-minimal --scope all"
|
|
@@ -37893,7 +38114,7 @@ var searchCommand2 = defineCommand150({
|
|
|
37893
38114
|
});
|
|
37894
38115
|
|
|
37895
38116
|
// src/commands/landing/inspiration/sequences.ts
|
|
37896
|
-
import { defineCommand as
|
|
38117
|
+
import { defineCommand as defineCommand154 } from "citty";
|
|
37897
38118
|
var COMPACT_TRANSITIONS = 12;
|
|
37898
38119
|
var COMPACT_ENDS = 5;
|
|
37899
38120
|
var MAX_PAGES = 50;
|
|
@@ -37967,7 +38188,7 @@ function sequencesHints(data, { scope, full }) {
|
|
|
37967
38188
|
if (scope === "favorites") hints.push(...favoritesScopeHints(data.favoritesHealth, data.pagesReturned));
|
|
37968
38189
|
return hints;
|
|
37969
38190
|
}
|
|
37970
|
-
var sequencesCommand =
|
|
38191
|
+
var sequencesCommand = defineCommand154({
|
|
37971
38192
|
meta: {
|
|
37972
38193
|
name: "sequences",
|
|
37973
38194
|
description: "What section follows what, across many real pages at once. Example: baker landing inspiration sequences 'developer tool pricing page' --scope all \u2014 the evidence for how to order a page you are about to build."
|
|
@@ -38016,9 +38237,8 @@ var sequencesCommand = defineCommand151({
|
|
|
38016
38237
|
});
|
|
38017
38238
|
|
|
38018
38239
|
// src/commands/landing/inspiration/view.ts
|
|
38019
|
-
import
|
|
38020
|
-
import
|
|
38021
|
-
import { defineCommand as defineCommand152 } from "citty";
|
|
38240
|
+
import path36 from "path";
|
|
38241
|
+
import { defineCommand as defineCommand155 } from "citty";
|
|
38022
38242
|
registerSchema({
|
|
38023
38243
|
command: "landing.inspiration.view",
|
|
38024
38244
|
description: "Everything known about one section: composition, motion, design tokens, the copy it uses, why it works, and what must change to make it yours. Downloads the desktop and mobile screenshots plus the motion filmstrip so you can look at them.",
|
|
@@ -38031,19 +38251,7 @@ registerSchema({
|
|
|
38031
38251
|
}
|
|
38032
38252
|
}
|
|
38033
38253
|
});
|
|
38034
|
-
|
|
38035
|
-
if (!url) return null;
|
|
38036
|
-
try {
|
|
38037
|
-
const response = await fetch(url);
|
|
38038
|
-
if (!response.ok) return null;
|
|
38039
|
-
await mkdir13(path35.dirname(file), { recursive: true });
|
|
38040
|
-
await writeFile18(file, Buffer.from(await response.arrayBuffer()));
|
|
38041
|
-
return path35.relative(process.cwd(), file);
|
|
38042
|
-
} catch {
|
|
38043
|
-
return null;
|
|
38044
|
-
}
|
|
38045
|
-
}
|
|
38046
|
-
var viewCommand2 = defineCommand152({
|
|
38254
|
+
var viewCommand2 = defineCommand155({
|
|
38047
38255
|
meta: {
|
|
38048
38256
|
name: "view",
|
|
38049
38257
|
description: "Full detail for one reference section. Example: baker landing inspiration view k57abc\u2026 \u2014 read the screenshots it saves before you build."
|
|
@@ -38062,11 +38270,12 @@ var viewCommand2 = defineCommand152({
|
|
|
38062
38270
|
const id = args.id;
|
|
38063
38271
|
const data = await apiGet("/api/landing-inspiration/section", { id });
|
|
38064
38272
|
const section = data.section;
|
|
38065
|
-
const dir =
|
|
38273
|
+
const dir = path36.join(process.cwd(), ".baker", "inspiration", id);
|
|
38274
|
+
const ext = READABLE_SHOT.extension;
|
|
38066
38275
|
const [desktop, mobile, filmstrip] = await Promise.all([
|
|
38067
|
-
|
|
38068
|
-
|
|
38069
|
-
|
|
38276
|
+
downloadReadableShot(section.desktopShotUrl, path36.join(dir, `desktop.${ext}`)),
|
|
38277
|
+
downloadReadableShot(section.mobileShotUrl, path36.join(dir, `mobile.${ext}`)),
|
|
38278
|
+
downloadReadableShot(section.motionFilmstripUrl, path36.join(dir, `motion-filmstrip.${ext}`))
|
|
38070
38279
|
]);
|
|
38071
38280
|
const full = args.full;
|
|
38072
38281
|
const hints = [INSPIRATION_HINTS.structureNotCopy, INSPIRATION_HINTS.adapt];
|
|
@@ -38076,7 +38285,7 @@ var viewCommand2 = defineCommand152({
|
|
|
38076
38285
|
if (fidelity) hints.push(fidelity);
|
|
38077
38286
|
if (filmstrip) {
|
|
38078
38287
|
hints.push(
|
|
38079
|
-
|
|
38288
|
+
`${filmstrip} shows this section animating in, six frames left-to-right then top-to-bottom, with the elapsed time on each. Read it if you want the motion, not just the layout.`
|
|
38080
38289
|
);
|
|
38081
38290
|
}
|
|
38082
38291
|
writeJson({
|
|
@@ -38126,7 +38335,7 @@ var viewCommand2 = defineCommand152({
|
|
|
38126
38335
|
});
|
|
38127
38336
|
|
|
38128
38337
|
// src/commands/landing/inspiration/index.ts
|
|
38129
|
-
var inspirationCommand =
|
|
38338
|
+
var inspirationCommand = defineCommand156({
|
|
38130
38339
|
meta: {
|
|
38131
38340
|
name: "inspiration",
|
|
38132
38341
|
description: `Reference library of real landing-page sections \u2014 look at how good pages actually solve a problem before you design one.
|
|
@@ -38171,7 +38380,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
|
|
|
38171
38380
|
});
|
|
38172
38381
|
|
|
38173
38382
|
// src/commands/landing/index.ts
|
|
38174
|
-
var landingCommand =
|
|
38383
|
+
var landingCommand = defineCommand157({
|
|
38175
38384
|
meta: {
|
|
38176
38385
|
name: "landing",
|
|
38177
38386
|
description: `Design-quality tools for landing pages (src/pages/<slug>/).
|
|
@@ -38188,58 +38397,8 @@ Subcommands:
|
|
|
38188
38397
|
}
|
|
38189
38398
|
});
|
|
38190
38399
|
|
|
38191
|
-
// src/commands/marketplace/index.ts
|
|
38192
|
-
import { defineCommand as defineCommand155 } from "citty";
|
|
38193
|
-
|
|
38194
|
-
// src/commands/marketplace/shared.ts
|
|
38195
|
-
function failApi2(err) {
|
|
38196
|
-
if (err instanceof ApiError) {
|
|
38197
|
-
writeJson({ ok: false, error: { code: err.code, message: err.message } });
|
|
38198
|
-
process.exit(1);
|
|
38199
|
-
}
|
|
38200
|
-
const message = err instanceof Error ? err.message : "Unexpected error";
|
|
38201
|
-
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message } });
|
|
38202
|
-
process.exit(1);
|
|
38203
|
-
}
|
|
38204
|
-
|
|
38205
|
-
// src/commands/marketplace/index.ts
|
|
38206
|
-
registerSchema({
|
|
38207
|
-
command: "marketplace.list",
|
|
38208
|
-
description: "The recipes Baker ships: recurring jobs a company can switch on, each with its id, what it produces and how often it is meant to run. Read this before proposing a company's automation, so every recipe you name is one that exists.",
|
|
38209
|
-
args: {
|
|
38210
|
-
list: {
|
|
38211
|
-
type: "boolean",
|
|
38212
|
-
description: "List every recipe in the marketplace. Example: baker marketplace --list",
|
|
38213
|
-
required: false
|
|
38214
|
-
}
|
|
38215
|
-
}
|
|
38216
|
-
});
|
|
38217
|
-
var marketplaceCommand = defineCommand155({
|
|
38218
|
-
meta: {
|
|
38219
|
-
name: "marketplace",
|
|
38220
|
-
description: `The recipes Baker ships \u2014 recurring jobs a company can switch on, with what each one produces.
|
|
38221
|
-
|
|
38222
|
-
Start here when you are deciding what a company should have running: every recipe you propose has to be one of these.
|
|
38223
|
-
|
|
38224
|
-
Examples:
|
|
38225
|
-
baker marketplace --list
|
|
38226
|
-
Full guide: __tooling__/docs/tools/baker/marketplace.md`
|
|
38227
|
-
},
|
|
38228
|
-
args: {
|
|
38229
|
-
list: { type: "boolean", description: "List every recipe in the marketplace", required: false }
|
|
38230
|
-
},
|
|
38231
|
-
run: async () => {
|
|
38232
|
-
try {
|
|
38233
|
-
const response = await apiPost("/api/marketplace/list", {});
|
|
38234
|
-
writeJson(response);
|
|
38235
|
-
} catch (err) {
|
|
38236
|
-
failApi2(err);
|
|
38237
|
-
}
|
|
38238
|
-
}
|
|
38239
|
-
});
|
|
38240
|
-
|
|
38241
38400
|
// src/commands/mcp/index.ts
|
|
38242
|
-
import { defineCommand as
|
|
38401
|
+
import { defineCommand as defineCommand158 } from "citty";
|
|
38243
38402
|
|
|
38244
38403
|
// src/commands/mcp/platforms.ts
|
|
38245
38404
|
function readsKey(label) {
|
|
@@ -38308,7 +38467,7 @@ registerSchema({
|
|
|
38308
38467
|
description: "List everything this chat can reach: managed integrations (Attio, Slack, Gmail, Google Sheets, \u2026), custom MCP servers, and the platforms the company signed in to (HubSpot, Google Ads, GA4, Search Console, Tag Manager) which you read through their own `baker` commands. Start here when the user mentions an external tool or platform.",
|
|
38309
38468
|
args: {}
|
|
38310
38469
|
});
|
|
38311
|
-
var connectedCommand =
|
|
38470
|
+
var connectedCommand = defineCommand158({
|
|
38312
38471
|
meta: {
|
|
38313
38472
|
name: "connected",
|
|
38314
38473
|
description: `Everything this chat can reach \u2014 managed integrations, custom MCP servers, and connected platforms.
|
|
@@ -38367,7 +38526,7 @@ registerSchema({
|
|
|
38367
38526
|
description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
|
|
38368
38527
|
args: {}
|
|
38369
38528
|
});
|
|
38370
|
-
var
|
|
38529
|
+
var listCommand14 = defineCommand158({
|
|
38371
38530
|
meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
|
|
38372
38531
|
run: async () => {
|
|
38373
38532
|
try {
|
|
@@ -38404,7 +38563,7 @@ registerSchema({
|
|
|
38404
38563
|
header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
|
|
38405
38564
|
}
|
|
38406
38565
|
});
|
|
38407
|
-
var addCommand2 =
|
|
38566
|
+
var addCommand2 = defineCommand158({
|
|
38408
38567
|
meta: {
|
|
38409
38568
|
name: "add",
|
|
38410
38569
|
description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
|
|
@@ -38456,7 +38615,7 @@ registerSchema({
|
|
|
38456
38615
|
description: "Remove a company custom MCP server by name.",
|
|
38457
38616
|
args: { name: { type: "string", description: "Server name to remove", required: true } }
|
|
38458
38617
|
});
|
|
38459
|
-
var removeCommand4 =
|
|
38618
|
+
var removeCommand4 = defineCommand158({
|
|
38460
38619
|
meta: {
|
|
38461
38620
|
name: "remove",
|
|
38462
38621
|
description: `Remove a company custom MCP server by name.
|
|
@@ -38478,7 +38637,7 @@ Example:
|
|
|
38478
38637
|
}
|
|
38479
38638
|
}
|
|
38480
38639
|
});
|
|
38481
|
-
var mcpCommand =
|
|
38640
|
+
var mcpCommand = defineCommand158({
|
|
38482
38641
|
meta: {
|
|
38483
38642
|
name: "mcp",
|
|
38484
38643
|
description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
|
|
@@ -38497,17 +38656,17 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
|
|
|
38497
38656
|
},
|
|
38498
38657
|
subCommands: {
|
|
38499
38658
|
connected: connectedCommand,
|
|
38500
|
-
list:
|
|
38659
|
+
list: listCommand14,
|
|
38501
38660
|
add: addCommand2,
|
|
38502
38661
|
remove: removeCommand4
|
|
38503
38662
|
}
|
|
38504
38663
|
});
|
|
38505
38664
|
|
|
38506
38665
|
// src/commands/research/index.ts
|
|
38507
|
-
import { defineCommand as
|
|
38666
|
+
import { defineCommand as defineCommand170 } from "citty";
|
|
38508
38667
|
|
|
38509
38668
|
// src/commands/research/advertisers.ts
|
|
38510
|
-
import { defineCommand as
|
|
38669
|
+
import { defineCommand as defineCommand159 } from "citty";
|
|
38511
38670
|
|
|
38512
38671
|
// src/commands/research/hints.ts
|
|
38513
38672
|
var AD_COPY_ROUTE = 'This returns competing DOMAINS and their SERP economics \u2014 no ad copy, no headlines, no creative. For the actual copy of a competitor\'s ads: `baker winning-ads advertisers "<brand>"` \u2192 `baker winning-ads search "<brief>" --advertiser-id <id>` \u2192 `baker winning-ads content <adId>` (`primary_text` / `headline` / `cta`, plus the spoken transcript and on-screen text for video). That corpus is Meta and LinkedIn only \u2014 Google SERP ad copy is not available through any Baker command, so do not keep querying for it here.';
|
|
@@ -38690,7 +38849,7 @@ var FIELDS3 = {
|
|
|
38690
38849
|
etv: "Estimated traffic value (USD)",
|
|
38691
38850
|
visibility: "SERP visibility score (0-1)"
|
|
38692
38851
|
};
|
|
38693
|
-
var advertisersCommand =
|
|
38852
|
+
var advertisersCommand = defineCommand159({
|
|
38694
38853
|
meta: {
|
|
38695
38854
|
name: "advertisers",
|
|
38696
38855
|
description: `Domains competing for a keyword in Google SERPs, with position, relevance, traffic value and visibility. Returns NO ad copy \u2014 for a competitor's headlines and body copy use \`baker winning-ads content <adId>\` (Meta/LinkedIn only).
|
|
@@ -38746,7 +38905,7 @@ Examples:
|
|
|
38746
38905
|
});
|
|
38747
38906
|
|
|
38748
38907
|
// src/commands/research/autocomplete.ts
|
|
38749
|
-
import { defineCommand as
|
|
38908
|
+
import { defineCommand as defineCommand160 } from "citty";
|
|
38750
38909
|
registerSchema({
|
|
38751
38910
|
command: "research.autocomplete",
|
|
38752
38911
|
description: "Get Google Autocomplete suggestions for a seed keyword. Useful for keyword expansion and discovering what people actually search for. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en).",
|
|
@@ -38769,7 +38928,7 @@ registerSchema({
|
|
|
38769
38928
|
var FIELDS4 = {
|
|
38770
38929
|
suggestion: "Autocomplete suggestion from Google"
|
|
38771
38930
|
};
|
|
38772
|
-
var autocompleteCommand =
|
|
38931
|
+
var autocompleteCommand = defineCommand160({
|
|
38773
38932
|
meta: {
|
|
38774
38933
|
name: "autocomplete",
|
|
38775
38934
|
description: `Get Google Autocomplete suggestions for keyword expansion.
|
|
@@ -38824,7 +38983,7 @@ Examples:
|
|
|
38824
38983
|
});
|
|
38825
38984
|
|
|
38826
38985
|
// src/commands/research/countries.ts
|
|
38827
|
-
import { defineCommand as
|
|
38986
|
+
import { defineCommand as defineCommand161 } from "citty";
|
|
38828
38987
|
registerSchema({
|
|
38829
38988
|
command: "research.countries",
|
|
38830
38989
|
description: "List all supported country codes for --location flag in research commands.",
|
|
@@ -38881,7 +39040,7 @@ var FIELDS5 = {
|
|
|
38881
39040
|
code: "Country code to pass as --location",
|
|
38882
39041
|
name: "Country name"
|
|
38883
39042
|
};
|
|
38884
|
-
var countriesCommand =
|
|
39043
|
+
var countriesCommand = defineCommand161({
|
|
38885
39044
|
meta: {
|
|
38886
39045
|
name: "countries",
|
|
38887
39046
|
description: "List all supported country codes for --location flag."
|
|
@@ -38892,7 +39051,7 @@ var countriesCommand = defineCommand159({
|
|
|
38892
39051
|
});
|
|
38893
39052
|
|
|
38894
39053
|
// src/commands/research/fetch.ts
|
|
38895
|
-
import { defineCommand as
|
|
39054
|
+
import { defineCommand as defineCommand162 } from "citty";
|
|
38896
39055
|
var CONTENT_PREVIEW_CHARS = 2e4;
|
|
38897
39056
|
var TIMEOUT_MS = 18e4;
|
|
38898
39057
|
registerSchema({
|
|
@@ -38965,7 +39124,7 @@ function fetchFix(code) {
|
|
|
38965
39124
|
explanation: "This read failed. Don't build a retry ladder around it \u2014 finish the rest of the job with what you can reach and name this page as a gap."
|
|
38966
39125
|
};
|
|
38967
39126
|
}
|
|
38968
|
-
var fetchCommand =
|
|
39127
|
+
var fetchCommand = defineCommand162({
|
|
38969
39128
|
meta: {
|
|
38970
39129
|
name: "fetch",
|
|
38971
39130
|
description: `Read a page an ordinary web fetch could not. Bot walls and JavaScript-rendered pages are resolved for you \u2014 you never have to retry, wait, or drive a browser yourself.
|
|
@@ -39042,7 +39201,7 @@ Examples:
|
|
|
39042
39201
|
});
|
|
39043
39202
|
|
|
39044
39203
|
// src/commands/research/intent.ts
|
|
39045
|
-
import { defineCommand as
|
|
39204
|
+
import { defineCommand as defineCommand163 } from "citty";
|
|
39046
39205
|
registerSchema({
|
|
39047
39206
|
command: "research.intent",
|
|
39048
39207
|
description: "Classify Google Search intent for keywords. Determines if someone searching is looking to buy, research, or navigate. IMPORTANT: If --language is omitted, defaults to English (en). The response includes a query_context object showing which language was used.",
|
|
@@ -39065,7 +39224,7 @@ var FIELDS7 = {
|
|
|
39065
39224
|
intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
|
|
39066
39225
|
probability: "Confidence score 0.0-1.0"
|
|
39067
39226
|
};
|
|
39068
|
-
var intentCommand =
|
|
39227
|
+
var intentCommand = defineCommand163({
|
|
39069
39228
|
meta: {
|
|
39070
39229
|
name: "intent",
|
|
39071
39230
|
description: `Classify Google Search intent for keywords. Returns intent type and confidence.
|
|
@@ -39113,7 +39272,7 @@ Examples:
|
|
|
39113
39272
|
});
|
|
39114
39273
|
|
|
39115
39274
|
// src/commands/research/keyword-gap.ts
|
|
39116
|
-
import { defineCommand as
|
|
39275
|
+
import { defineCommand as defineCommand164 } from "citty";
|
|
39117
39276
|
registerSchema({
|
|
39118
39277
|
command: "research.keyword-gap",
|
|
39119
39278
|
description: "Find keywords a competitor ranks for (organic or paid) that you don't. Discovers expansion opportunities. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en). The response includes a query_context object showing which location/language were used.",
|
|
@@ -39142,7 +39301,7 @@ var FIELDS8 = {
|
|
|
39142
39301
|
cpc: "Cost per click USD",
|
|
39143
39302
|
their_position: "Competitor's ranking position"
|
|
39144
39303
|
};
|
|
39145
|
-
var keywordGapCommand =
|
|
39304
|
+
var keywordGapCommand = defineCommand164({
|
|
39146
39305
|
meta: {
|
|
39147
39306
|
name: "keyword-gap",
|
|
39148
39307
|
description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
|
|
@@ -39217,7 +39376,7 @@ Examples:
|
|
|
39217
39376
|
});
|
|
39218
39377
|
|
|
39219
39378
|
// src/commands/research/keywords-for-site.ts
|
|
39220
|
-
import { defineCommand as
|
|
39379
|
+
import { defineCommand as defineCommand165 } from "citty";
|
|
39221
39380
|
registerSchema({
|
|
39222
39381
|
command: "research.keywords-for-site",
|
|
39223
39382
|
description: "Get keywords a competitor targets in Google. Use --type paid to see only paid keywords, --type organic for organic only. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en). The response includes a query_context object showing which location/language were used.",
|
|
@@ -39250,7 +39409,7 @@ var FIELDS9 = {
|
|
|
39250
39409
|
competition: "LOW, MEDIUM, or HIGH",
|
|
39251
39410
|
competition_index: "Competition score 0-100"
|
|
39252
39411
|
};
|
|
39253
|
-
var keywordsForSiteCommand =
|
|
39412
|
+
var keywordsForSiteCommand = defineCommand165({
|
|
39254
39413
|
meta: {
|
|
39255
39414
|
name: "keywords-for-site",
|
|
39256
39415
|
description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
|
|
@@ -39312,7 +39471,7 @@ Examples:
|
|
|
39312
39471
|
});
|
|
39313
39472
|
|
|
39314
39473
|
// src/commands/research/languages.ts
|
|
39315
|
-
import { defineCommand as
|
|
39474
|
+
import { defineCommand as defineCommand166 } from "citty";
|
|
39316
39475
|
registerSchema({
|
|
39317
39476
|
command: "research.languages",
|
|
39318
39477
|
description: "List all supported language codes for --language flag in research commands.",
|
|
@@ -39342,7 +39501,7 @@ var FIELDS10 = {
|
|
|
39342
39501
|
code: "Language code to pass as --language",
|
|
39343
39502
|
name: "Language name (also accepted by --language)"
|
|
39344
39503
|
};
|
|
39345
|
-
var languagesCommand2 =
|
|
39504
|
+
var languagesCommand2 = defineCommand166({
|
|
39346
39505
|
meta: {
|
|
39347
39506
|
name: "languages",
|
|
39348
39507
|
description: "List all supported language codes for --language flag."
|
|
@@ -39353,7 +39512,7 @@ var languagesCommand2 = defineCommand164({
|
|
|
39353
39512
|
});
|
|
39354
39513
|
|
|
39355
39514
|
// src/commands/research/lighthouse.ts
|
|
39356
|
-
import { defineCommand as
|
|
39515
|
+
import { defineCommand as defineCommand167 } from "citty";
|
|
39357
39516
|
registerSchema({
|
|
39358
39517
|
command: "research.lighthouse",
|
|
39359
39518
|
description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
|
|
@@ -39372,7 +39531,7 @@ var FIELDS11 = {
|
|
|
39372
39531
|
speed_index_ms: "Speed Index in ms (good: < 3400)",
|
|
39373
39532
|
interactive_ms: "Time to Interactive in ms (good: < 3800)"
|
|
39374
39533
|
};
|
|
39375
|
-
var lighthouseCommand =
|
|
39534
|
+
var lighthouseCommand = defineCommand167({
|
|
39376
39535
|
meta: {
|
|
39377
39536
|
name: "lighthouse",
|
|
39378
39537
|
description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
|
|
@@ -39410,7 +39569,7 @@ Examples:
|
|
|
39410
39569
|
});
|
|
39411
39570
|
|
|
39412
39571
|
// src/commands/research/relevant-pages.ts
|
|
39413
|
-
import { defineCommand as
|
|
39572
|
+
import { defineCommand as defineCommand168 } from "citty";
|
|
39414
39573
|
registerSchema({
|
|
39415
39574
|
command: "research.relevant-pages",
|
|
39416
39575
|
description: "Get the top pages of a competitor domain with organic traffic and ranking data. Shows which pages drive the most traffic. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en).",
|
|
@@ -39436,7 +39595,7 @@ var FIELDS12 = {
|
|
|
39436
39595
|
keywords: "Total organic keywords the page ranks for",
|
|
39437
39596
|
top_10: "Keywords in positions 1-10"
|
|
39438
39597
|
};
|
|
39439
|
-
var relevantPagesCommand =
|
|
39598
|
+
var relevantPagesCommand = defineCommand168({
|
|
39440
39599
|
meta: {
|
|
39441
39600
|
name: "relevant-pages",
|
|
39442
39601
|
description: `Get the top pages of a competitor domain with traffic data.
|
|
@@ -39483,7 +39642,7 @@ Examples:
|
|
|
39483
39642
|
});
|
|
39484
39643
|
|
|
39485
39644
|
// src/commands/research/web.ts
|
|
39486
|
-
import { defineCommand as
|
|
39645
|
+
import { defineCommand as defineCommand169 } from "citty";
|
|
39487
39646
|
registerSchema({
|
|
39488
39647
|
command: "research.web",
|
|
39489
39648
|
description: "Search the web with AI to answer marketing questions \u2014 competitors, ICP, pricing, pain points, market trends. Three depth levels: medium (quick, default), high (thorough), xhigh (exhaustive deep research).",
|
|
@@ -39534,7 +39693,7 @@ async function runDeepResearch(question) {
|
|
|
39534
39693
|
}
|
|
39535
39694
|
throw new Error("Deep research timed out");
|
|
39536
39695
|
}
|
|
39537
|
-
var webCommand =
|
|
39696
|
+
var webCommand = defineCommand169({
|
|
39538
39697
|
meta: {
|
|
39539
39698
|
name: "web",
|
|
39540
39699
|
description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
|
|
@@ -39596,7 +39755,7 @@ Examples:
|
|
|
39596
39755
|
});
|
|
39597
39756
|
|
|
39598
39757
|
// src/commands/research/index.ts
|
|
39599
|
-
var researchCommand =
|
|
39758
|
+
var researchCommand = defineCommand170({
|
|
39600
39759
|
meta: {
|
|
39601
39760
|
name: "research",
|
|
39602
39761
|
description: `Competitive intelligence and AI-powered research commands.
|
|
@@ -39640,10 +39799,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
|
|
|
39640
39799
|
});
|
|
39641
39800
|
|
|
39642
39801
|
// src/commands/scheduled-actions/index.ts
|
|
39643
|
-
import { defineCommand as
|
|
39802
|
+
import { defineCommand as defineCommand177 } from "citty";
|
|
39644
39803
|
|
|
39645
39804
|
// src/commands/scheduled-actions/create.ts
|
|
39646
|
-
import { defineCommand as
|
|
39805
|
+
import { defineCommand as defineCommand171 } from "citty";
|
|
39647
39806
|
|
|
39648
39807
|
// src/commands/scheduled-actions/shared.ts
|
|
39649
39808
|
var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
|
|
@@ -39651,7 +39810,7 @@ var TEMP_ID_PREFIX = "temp_";
|
|
|
39651
39810
|
function writeOk2(data) {
|
|
39652
39811
|
writeJson({ ok: true, data: data ?? null });
|
|
39653
39812
|
}
|
|
39654
|
-
function
|
|
39813
|
+
function failValidation4(message) {
|
|
39655
39814
|
writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
39656
39815
|
process.exit(1);
|
|
39657
39816
|
}
|
|
@@ -39675,7 +39834,7 @@ function isOtherTempId(id) {
|
|
|
39675
39834
|
}
|
|
39676
39835
|
function validateScheduledActionRef(ref) {
|
|
39677
39836
|
if (isOtherTempId(ref)) {
|
|
39678
|
-
|
|
39837
|
+
failValidation4(`Scheduled action temp IDs must start with ${TEMP_SCHEDULED_ACTION_PREFIX}.`);
|
|
39679
39838
|
}
|
|
39680
39839
|
if (!isTempScheduledActionId(ref)) {
|
|
39681
39840
|
validateConvexId(ref);
|
|
@@ -39689,7 +39848,7 @@ function isPromptWithoutAgent(args, agentDisabled) {
|
|
|
39689
39848
|
}
|
|
39690
39849
|
function failIfPromptWithoutAgent(args, agentDisabled) {
|
|
39691
39850
|
if (isPromptWithoutAgent(args, agentDisabled)) {
|
|
39692
|
-
|
|
39851
|
+
failValidation4(
|
|
39693
39852
|
"--prompt only applies when an agent is spawned; it has no effect with --no-spawn-agent or --spawn-agent false."
|
|
39694
39853
|
);
|
|
39695
39854
|
}
|
|
@@ -39704,21 +39863,21 @@ function parseBooleanFlag(raw, flagName) {
|
|
|
39704
39863
|
if (raw === false || raw === "false") {
|
|
39705
39864
|
return false;
|
|
39706
39865
|
}
|
|
39707
|
-
|
|
39866
|
+
failValidation4(`${flagName} must be true or false.`);
|
|
39708
39867
|
}
|
|
39709
39868
|
function buildScheduleBody(args, options) {
|
|
39710
39869
|
const cron = args.cron;
|
|
39711
39870
|
const runAt = args["run-at"];
|
|
39712
39871
|
const timezone = args.timezone;
|
|
39713
39872
|
if (cron && runAt) {
|
|
39714
|
-
|
|
39873
|
+
failValidation4("--cron and --run-at are mutually exclusive.");
|
|
39715
39874
|
}
|
|
39716
39875
|
if (runAt) {
|
|
39717
39876
|
if (!runAt.endsWith("Z")) {
|
|
39718
|
-
|
|
39877
|
+
failValidation4("--run-at must be an ISO UTC timestamp ending in Z.");
|
|
39719
39878
|
}
|
|
39720
39879
|
if (!Number.isFinite(Date.parse(runAt))) {
|
|
39721
|
-
|
|
39880
|
+
failValidation4("--run-at must be a valid ISO timestamp.");
|
|
39722
39881
|
}
|
|
39723
39882
|
return { runAt, ...timezone ? { timezone } : {} };
|
|
39724
39883
|
}
|
|
@@ -39729,7 +39888,7 @@ function buildScheduleBody(args, options) {
|
|
|
39729
39888
|
return { timezone };
|
|
39730
39889
|
}
|
|
39731
39890
|
if (options.required) {
|
|
39732
|
-
|
|
39891
|
+
failValidation4("Provide exactly one of --cron or --run-at.");
|
|
39733
39892
|
}
|
|
39734
39893
|
return void 0;
|
|
39735
39894
|
}
|
|
@@ -39758,7 +39917,7 @@ registerSchema({
|
|
|
39758
39917
|
prompt: { type: "string", description: "Additional prompt instructions for the spawned agent", required: false }
|
|
39759
39918
|
}
|
|
39760
39919
|
});
|
|
39761
|
-
var createCommand2 =
|
|
39920
|
+
var createCommand2 = defineCommand171({
|
|
39762
39921
|
meta: {
|
|
39763
39922
|
name: "create",
|
|
39764
39923
|
description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
|
|
@@ -39778,10 +39937,10 @@ var createCommand2 = defineCommand169({
|
|
|
39778
39937
|
const name = args.name;
|
|
39779
39938
|
const description = args.description;
|
|
39780
39939
|
if (!name || name.trim().length === 0) {
|
|
39781
|
-
|
|
39940
|
+
failValidation4("--name is required.");
|
|
39782
39941
|
}
|
|
39783
39942
|
if (!description || description.trim().length === 0) {
|
|
39784
|
-
|
|
39943
|
+
failValidation4("--description is required.");
|
|
39785
39944
|
}
|
|
39786
39945
|
const schedule = buildScheduleBody(args, { required: true });
|
|
39787
39946
|
const chatId = requireChatId();
|
|
@@ -39807,7 +39966,7 @@ var createCommand2 = defineCommand169({
|
|
|
39807
39966
|
});
|
|
39808
39967
|
|
|
39809
39968
|
// src/commands/scheduled-actions/delete.ts
|
|
39810
|
-
import { defineCommand as
|
|
39969
|
+
import { defineCommand as defineCommand172 } from "citty";
|
|
39811
39970
|
registerSchema({
|
|
39812
39971
|
command: "scheduled-actions.delete",
|
|
39813
39972
|
description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
|
|
@@ -39815,7 +39974,7 @@ registerSchema({
|
|
|
39815
39974
|
id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
|
|
39816
39975
|
}
|
|
39817
39976
|
});
|
|
39818
|
-
var deleteCommand2 =
|
|
39977
|
+
var deleteCommand2 = defineCommand172({
|
|
39819
39978
|
meta: {
|
|
39820
39979
|
name: "delete",
|
|
39821
39980
|
description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
|
|
@@ -39832,7 +39991,7 @@ var deleteCommand2 = defineCommand170({
|
|
|
39832
39991
|
try {
|
|
39833
39992
|
const id = args.id || args["scheduled-action-id"];
|
|
39834
39993
|
if (!id) {
|
|
39835
|
-
|
|
39994
|
+
failValidation4("Scheduled action ID is required.");
|
|
39836
39995
|
}
|
|
39837
39996
|
validateScheduledActionRef(id);
|
|
39838
39997
|
await apiPost("/api/scheduled-actions/delete", { chatId: requireChatId(), id });
|
|
@@ -39844,7 +40003,7 @@ var deleteCommand2 = defineCommand170({
|
|
|
39844
40003
|
});
|
|
39845
40004
|
|
|
39846
40005
|
// src/commands/scheduled-actions/get.ts
|
|
39847
|
-
import { defineCommand as
|
|
40006
|
+
import { defineCommand as defineCommand173 } from "citty";
|
|
39848
40007
|
registerSchema({
|
|
39849
40008
|
command: "scheduled-actions.get",
|
|
39850
40009
|
description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
|
|
@@ -39853,7 +40012,7 @@ registerSchema({
|
|
|
39853
40012
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
39854
40013
|
}
|
|
39855
40014
|
});
|
|
39856
|
-
var getCommand3 =
|
|
40015
|
+
var getCommand3 = defineCommand173({
|
|
39857
40016
|
meta: {
|
|
39858
40017
|
name: "get",
|
|
39859
40018
|
description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
|
|
@@ -39871,13 +40030,13 @@ var getCommand3 = defineCommand171({
|
|
|
39871
40030
|
try {
|
|
39872
40031
|
const id = args.id || args["scheduled-action-id"];
|
|
39873
40032
|
if (!id) {
|
|
39874
|
-
|
|
40033
|
+
failValidation4("Scheduled action ID is required.");
|
|
39875
40034
|
}
|
|
39876
40035
|
validateScheduledActionRef(id);
|
|
39877
40036
|
const env = getEnv();
|
|
39878
40037
|
const chatId = typeof args.chat === "string" && args.chat.length > 0 ? args.chat : env.BAKER_CHAT_ID;
|
|
39879
40038
|
if (isTempScheduledActionId(id) && !chatId) {
|
|
39880
|
-
|
|
40039
|
+
failValidation4("BAKER_CHAT_ID or --chat is required to get a temp scheduled action ID.");
|
|
39881
40040
|
}
|
|
39882
40041
|
const body = { id };
|
|
39883
40042
|
if (chatId) {
|
|
@@ -39892,7 +40051,7 @@ var getCommand3 = defineCommand171({
|
|
|
39892
40051
|
});
|
|
39893
40052
|
|
|
39894
40053
|
// src/commands/scheduled-actions/list.ts
|
|
39895
|
-
import { defineCommand as
|
|
40054
|
+
import { defineCommand as defineCommand174 } from "citty";
|
|
39896
40055
|
registerSchema({
|
|
39897
40056
|
command: "scheduled-actions.list",
|
|
39898
40057
|
description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set, or --chat <id> to read an earlier chat's staged schedules instead.",
|
|
@@ -39900,7 +40059,7 @@ registerSchema({
|
|
|
39900
40059
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
39901
40060
|
}
|
|
39902
40061
|
});
|
|
39903
|
-
var
|
|
40062
|
+
var listCommand15 = defineCommand174({
|
|
39904
40063
|
meta: {
|
|
39905
40064
|
name: "list",
|
|
39906
40065
|
description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set, or --chat <id> to read an earlier chat's staged schedules instead."
|
|
@@ -39923,7 +40082,7 @@ var listCommand14 = defineCommand172({
|
|
|
39923
40082
|
});
|
|
39924
40083
|
|
|
39925
40084
|
// src/commands/scheduled-actions/trigger.ts
|
|
39926
|
-
import { defineCommand as
|
|
40085
|
+
import { defineCommand as defineCommand175 } from "citty";
|
|
39927
40086
|
registerSchema({
|
|
39928
40087
|
command: "scheduled-actions.trigger",
|
|
39929
40088
|
description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
|
|
@@ -39931,7 +40090,7 @@ registerSchema({
|
|
|
39931
40090
|
id: { type: "string", description: "Published scheduled action ID", required: true }
|
|
39932
40091
|
}
|
|
39933
40092
|
});
|
|
39934
|
-
var triggerCommand =
|
|
40093
|
+
var triggerCommand = defineCommand175({
|
|
39935
40094
|
meta: {
|
|
39936
40095
|
name: "trigger",
|
|
39937
40096
|
description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
|
|
@@ -39948,10 +40107,10 @@ var triggerCommand = defineCommand173({
|
|
|
39948
40107
|
try {
|
|
39949
40108
|
const id = args.id || args["scheduled-action-id"];
|
|
39950
40109
|
if (!id) {
|
|
39951
|
-
|
|
40110
|
+
failValidation4("Scheduled action ID is required.");
|
|
39952
40111
|
}
|
|
39953
40112
|
if (isTempScheduledActionId(id)) {
|
|
39954
|
-
|
|
40113
|
+
failValidation4("trigger requires a published scheduled action ID, not temp_sched_*.");
|
|
39955
40114
|
}
|
|
39956
40115
|
validateConvexId(id);
|
|
39957
40116
|
const env = getEnv();
|
|
@@ -39968,7 +40127,7 @@ var triggerCommand = defineCommand173({
|
|
|
39968
40127
|
});
|
|
39969
40128
|
|
|
39970
40129
|
// src/commands/scheduled-actions/update.ts
|
|
39971
|
-
import { defineCommand as
|
|
40130
|
+
import { defineCommand as defineCommand176 } from "citty";
|
|
39972
40131
|
registerSchema({
|
|
39973
40132
|
command: "scheduled-actions.update",
|
|
39974
40133
|
description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
|
|
@@ -39993,7 +40152,7 @@ registerSchema({
|
|
|
39993
40152
|
prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
|
|
39994
40153
|
}
|
|
39995
40154
|
});
|
|
39996
|
-
var updateCommand2 =
|
|
40155
|
+
var updateCommand2 = defineCommand176({
|
|
39997
40156
|
meta: {
|
|
39998
40157
|
name: "update",
|
|
39999
40158
|
description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
|
|
@@ -40018,7 +40177,7 @@ var updateCommand2 = defineCommand174({
|
|
|
40018
40177
|
try {
|
|
40019
40178
|
const id = args.id || args["scheduled-action-id"];
|
|
40020
40179
|
if (!id) {
|
|
40021
|
-
|
|
40180
|
+
failValidation4("Scheduled action ID is required.");
|
|
40022
40181
|
}
|
|
40023
40182
|
validateScheduledActionRef(id);
|
|
40024
40183
|
const body = { id };
|
|
@@ -40050,7 +40209,7 @@ var updateCommand2 = defineCommand174({
|
|
|
40050
40209
|
hasPatch = true;
|
|
40051
40210
|
}
|
|
40052
40211
|
if (!hasPatch) {
|
|
40053
|
-
|
|
40212
|
+
failValidation4(
|
|
40054
40213
|
"Provide at least one of --name, --description, --cron, --run-at, --timezone, --enabled, --spawn-agent, --prompt."
|
|
40055
40214
|
);
|
|
40056
40215
|
}
|
|
@@ -40064,7 +40223,7 @@ var updateCommand2 = defineCommand174({
|
|
|
40064
40223
|
});
|
|
40065
40224
|
|
|
40066
40225
|
// src/commands/scheduled-actions/index.ts
|
|
40067
|
-
var scheduledActionsCommand =
|
|
40226
|
+
var scheduledActionsCommand = defineCommand177({
|
|
40068
40227
|
meta: {
|
|
40069
40228
|
name: "scheduled-actions",
|
|
40070
40229
|
description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger.
|
|
@@ -40081,7 +40240,7 @@ Examples:
|
|
|
40081
40240
|
Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
40082
40241
|
},
|
|
40083
40242
|
subCommands: {
|
|
40084
|
-
list:
|
|
40243
|
+
list: listCommand15,
|
|
40085
40244
|
get: getCommand3,
|
|
40086
40245
|
create: createCommand2,
|
|
40087
40246
|
update: updateCommand2,
|
|
@@ -40091,14 +40250,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
|
40091
40250
|
});
|
|
40092
40251
|
|
|
40093
40252
|
// src/commands/schema.ts
|
|
40094
|
-
import { defineCommand as
|
|
40253
|
+
import { defineCommand as defineCommand178 } from "citty";
|
|
40095
40254
|
function narrowToFamily(commandName, available) {
|
|
40096
40255
|
const segments = commandName.split(".");
|
|
40097
40256
|
const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
|
|
40098
40257
|
const siblings = available.filter((name) => name.startsWith(prefix));
|
|
40099
40258
|
return siblings.length > 0 ? siblings : available;
|
|
40100
40259
|
}
|
|
40101
|
-
var schemaCommand =
|
|
40260
|
+
var schemaCommand = defineCommand178({
|
|
40102
40261
|
meta: {
|
|
40103
40262
|
name: "schema",
|
|
40104
40263
|
description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
|
|
@@ -40142,10 +40301,10 @@ var schemaCommand = defineCommand176({
|
|
|
40142
40301
|
});
|
|
40143
40302
|
|
|
40144
40303
|
// src/commands/studio/index.ts
|
|
40145
|
-
import { defineCommand as
|
|
40304
|
+
import { defineCommand as defineCommand187 } from "citty";
|
|
40146
40305
|
|
|
40147
40306
|
// src/commands/studio/animate.ts
|
|
40148
|
-
import { defineCommand as
|
|
40307
|
+
import { defineCommand as defineCommand179 } from "citty";
|
|
40149
40308
|
|
|
40150
40309
|
// src/commands/studio/batch.ts
|
|
40151
40310
|
function projectBatch(generation, full) {
|
|
@@ -40334,7 +40493,7 @@ function parseImageRefs(spec) {
|
|
|
40334
40493
|
}
|
|
40335
40494
|
var defaultDeps = {
|
|
40336
40495
|
ingest: (url) => apiPost("/api/images/ingest", { url, source: "uploaded" }),
|
|
40337
|
-
upload: (
|
|
40496
|
+
upload: (path37) => uploadLocalImage({ file: path37, contentType: detectImageContentType(path37), source: "uploaded" })
|
|
40338
40497
|
};
|
|
40339
40498
|
async function resolveLibraryImageIds(spec, limit, deps = defaultDeps) {
|
|
40340
40499
|
const refs = parseImageRefs(spec);
|
|
@@ -40354,10 +40513,10 @@ async function resolveLibraryImageIds(spec, limit, deps = defaultDeps) {
|
|
|
40354
40513
|
}
|
|
40355
40514
|
return { imageIds, added };
|
|
40356
40515
|
}
|
|
40357
|
-
function uploadFailure(
|
|
40516
|
+
function uploadFailure(path37) {
|
|
40358
40517
|
return (error) => {
|
|
40359
40518
|
if (error instanceof ApiError) throw error;
|
|
40360
|
-
throw new ApiError("VALIDATION_ERROR", `Could not read "${
|
|
40519
|
+
throw new ApiError("VALIDATION_ERROR", `Could not read "${path37}" as an image.`);
|
|
40361
40520
|
};
|
|
40362
40521
|
}
|
|
40363
40522
|
|
|
@@ -40590,7 +40749,7 @@ function costHintsFor(body) {
|
|
|
40590
40749
|
}
|
|
40591
40750
|
return hints;
|
|
40592
40751
|
}
|
|
40593
|
-
var animateCommand =
|
|
40752
|
+
var animateCommand = defineCommand179({
|
|
40594
40753
|
meta: {
|
|
40595
40754
|
name: "animate",
|
|
40596
40755
|
description: "Render a clip. With an image the look is already fixed, so the prompt describes MOVEMENT \u2014 what the camera does, what the subject does, in what order. With --from text there is no image and the prompt is the whole shot.\n\nA rendered clip is NOT usable anywhere until you keep it: `baker studio keep <id> --slot N` is what puts it in the video library. Takes nobody keeps are never ingested, which is what makes a rejected batch cheap.\n\nFor anything longer than 15 seconds, or to build on footage that already exists, use --model bytedance/seedance-2.5: it renders 4-30s and is the only model that reads an existing clip or an existing soundtrack.\n\nExamples:\n baker studio animate 'slow push in, model turns to camera and smiles' --image j57abc123def456ghi789\n baker studio animate 'handheld drift right, steam rising from the cup' --image './out/hero.png' --duration 6 --quality 1080p\n baker studio animate 'product rotates once on a turntable' --image j57abc\u2026,j57def\u2026 --from references\n baker studio animate 'she keeps walking, camera stays with her, then she stops and looks up' --image j57abc\u2026 --from references --from-clip j57batch\u2026:0 --model bytedance/seedance-2.5 --duration 20\n baker studio animate 'hold on the product, then a slow push-in' --from references --from-video j57vid\u2026 --model bytedance/seedance-2.5\n baker studio animate 'slow drone pull-back over a solar farm at golden hour, no people' --from text --model bytedance/seedance-2.5 --duration 12"
|
|
@@ -40709,7 +40868,7 @@ var animateCommand = defineCommand177({
|
|
|
40709
40868
|
});
|
|
40710
40869
|
|
|
40711
40870
|
// src/commands/studio/generate.ts
|
|
40712
|
-
import { defineCommand as
|
|
40871
|
+
import { defineCommand as defineCommand180 } from "citty";
|
|
40713
40872
|
var MODEL_LIST2 = IMAGE_MODEL_IDS;
|
|
40714
40873
|
var DEFAULT_MAX_WAIT_MS2 = 24e4;
|
|
40715
40874
|
registerSchema({
|
|
@@ -40839,7 +40998,7 @@ function buildGenerateBody(args, prompt) {
|
|
|
40839
40998
|
}
|
|
40840
40999
|
return body;
|
|
40841
41000
|
}
|
|
40842
|
-
var generateCommand =
|
|
41001
|
+
var generateCommand = defineCommand180({
|
|
40843
41002
|
meta: {
|
|
40844
41003
|
name: "generate",
|
|
40845
41004
|
description: "Start here to make an image. Renders 1-8 takes of one brief, ingests each into the media library as it lands, and shows the batch in the dashboard Studio next to the ones the client ran.\n\nModel choice: google/gemini-3.1-flash-image-preview (default \u2014 fast, best at editing a reference and at extreme ratios), google/gemini-3-pro-image-preview (highest fidelity, slower), openai/gpt-image-2 (photoreal and the cleanest in-image text \u2014 no --image-size, no 4:5 / 5:4), recraft/recraft-v4.1-pro-vector (vector/flat marks with palette control).\n\n--reference is the biggest quality lever there is: a real logo, product shot, Pinterest pin or sandbox screenshot beats any amount of adjectives.\n\nExamples:\n baker studio generate 'matte black bottle on wet marble, hard studio light, 35mm' --aspect-ratio 3:2 --count 3\n baker studio generate 'this bottle on a sunlit kitchen counter' --reference './src/brand/product.png,https://\u2026/kitchen.jpg'\n baker studio generate 'founder-style selfie, kitchen background, natural light' --skill ugc-selfie-hook\n baker studio generate 'flat geometric mascot, brand palette' --model recraft/recraft-v4.1-pro-vector --rgb-colors '[[10,10,10],[255,80,0]]'"
|
|
@@ -40917,7 +41076,7 @@ var generateCommand = defineCommand178({
|
|
|
40917
41076
|
});
|
|
40918
41077
|
|
|
40919
41078
|
// src/commands/studio/get.ts
|
|
40920
|
-
import { defineCommand as
|
|
41079
|
+
import { defineCommand as defineCommand181 } from "citty";
|
|
40921
41080
|
registerSchema({
|
|
40922
41081
|
command: "studio.get",
|
|
40923
41082
|
description: "Read one Studio batch: every take, where it lives, and why a take is missing. This is how you pick up a batch that was still rendering when the start command returned.",
|
|
@@ -40926,7 +41085,7 @@ registerSchema({
|
|
|
40926
41085
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
40927
41086
|
}
|
|
40928
41087
|
});
|
|
40929
|
-
var getCommand4 =
|
|
41088
|
+
var getCommand4 = defineCommand181({
|
|
40930
41089
|
meta: {
|
|
40931
41090
|
name: "get",
|
|
40932
41091
|
description: "Read one Studio batch \u2014 the takes, their urls, whether each is in the library, and the reason for any that failed.\n\nExample: baker studio get j57abc123def456ghi789\nExample: baker studio get j57abc123def456ghi789 --full"
|
|
@@ -40955,7 +41114,7 @@ var getCommand4 = defineCommand179({
|
|
|
40955
41114
|
});
|
|
40956
41115
|
|
|
40957
41116
|
// src/commands/studio/improve.ts
|
|
40958
|
-
import { defineCommand as
|
|
41117
|
+
import { defineCommand as defineCommand182 } from "citty";
|
|
40959
41118
|
var DESCRIPTION = "Sharpen a rough brief into directed art direction \u2014 the same rewrite the client gets from the wand in the Studio prompt bar. Reach for it when you are relaying the CLIENT's own words and want them shaped without substituting your voice; when you are writing the art direction yourself, just write it, because you will do a better job than this does.";
|
|
40960
41119
|
registerSchema({
|
|
40961
41120
|
command: "studio.improve",
|
|
@@ -40980,7 +41139,7 @@ registerSchema({
|
|
|
40980
41139
|
}
|
|
40981
41140
|
}
|
|
40982
41141
|
});
|
|
40983
|
-
var improveCommand =
|
|
41142
|
+
var improveCommand = defineCommand182({
|
|
40984
41143
|
meta: {
|
|
40985
41144
|
name: "improve",
|
|
40986
41145
|
description: `${DESCRIPTION}
|
|
@@ -41024,7 +41183,7 @@ Examples:
|
|
|
41024
41183
|
});
|
|
41025
41184
|
|
|
41026
41185
|
// src/commands/studio/keep.ts
|
|
41027
|
-
import { defineCommand as
|
|
41186
|
+
import { defineCommand as defineCommand183 } from "citty";
|
|
41028
41187
|
registerSchema({
|
|
41029
41188
|
command: "studio.keep",
|
|
41030
41189
|
description: "Mark one take as the keeper. For an image this stars it, so the client reviewing the batch sees which one you used. For a CLIP it is the step that puts it in the video library \u2014 until then the clip cannot be used in a canvas, a landing, or an ad.",
|
|
@@ -41034,7 +41193,7 @@ registerSchema({
|
|
|
41034
41193
|
undo: { type: "boolean", description: "Un-star an image, or take a kept clip back out", required: false }
|
|
41035
41194
|
}
|
|
41036
41195
|
});
|
|
41037
|
-
var keepCommand =
|
|
41196
|
+
var keepCommand = defineCommand183({
|
|
41038
41197
|
meta: {
|
|
41039
41198
|
name: "keep",
|
|
41040
41199
|
description: "Mark one take as the keeper. An image gets starred (it was already in the library); a clip gets INGESTED into the video library, which is what makes it usable anywhere else.\n\nExample: baker studio keep j57abc123def456ghi789 --slot 2\nExample: baker studio keep j57abc123def456ghi789 --slot 2 --undo"
|
|
@@ -41085,7 +41244,7 @@ var keepCommand = defineCommand181({
|
|
|
41085
41244
|
});
|
|
41086
41245
|
|
|
41087
41246
|
// src/commands/studio/list.ts
|
|
41088
|
-
import { defineCommand as
|
|
41247
|
+
import { defineCommand as defineCommand184 } from "citty";
|
|
41089
41248
|
registerSchema({
|
|
41090
41249
|
command: "studio.list",
|
|
41091
41250
|
description: "Recent Studio batches for THIS conversation, newest first \u2014 what you have already generated, so you re-use a take instead of paying for it twice. `--all` widens it to everything the company generated, including what people ran themselves in the dashboard.",
|
|
@@ -41096,7 +41255,7 @@ registerSchema({
|
|
|
41096
41255
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
41097
41256
|
}
|
|
41098
41257
|
});
|
|
41099
|
-
var
|
|
41258
|
+
var listCommand16 = defineCommand184({
|
|
41100
41259
|
meta: {
|
|
41101
41260
|
name: "list",
|
|
41102
41261
|
description: "Recent Studio batches, newest first. Scoped to this conversation unless you pass --all.\n\nExample: baker studio list\nExample: baker studio list --kind video --limit 5\nExample: baker studio list --all # includes batches the client ran in the dashboard"
|
|
@@ -41130,7 +41289,7 @@ var listCommand15 = defineCommand182({
|
|
|
41130
41289
|
});
|
|
41131
41290
|
|
|
41132
41291
|
// src/commands/studio/models.ts
|
|
41133
|
-
import { defineCommand as
|
|
41292
|
+
import { defineCommand as defineCommand185 } from "citty";
|
|
41134
41293
|
var DESCRIPTION2 = "What each Studio model actually accepts: its shapes, resolutions, clip lengths, prompt character cap, how many reference images it takes, and which knobs it has. Read this before a batch you care about \u2014 the models disagree far more than they look like they do, and a setting the chosen model does not have is REFUSED, not ignored.";
|
|
41135
41294
|
registerSchema({
|
|
41136
41295
|
command: "studio.models",
|
|
@@ -41217,7 +41376,7 @@ function buildModelCards(kind, model) {
|
|
|
41217
41376
|
const selected = model ? ids.filter((id) => id === model) : ids;
|
|
41218
41377
|
return selected.map((id) => build(id));
|
|
41219
41378
|
}
|
|
41220
|
-
var modelsCommand =
|
|
41379
|
+
var modelsCommand = defineCommand185({
|
|
41221
41380
|
meta: {
|
|
41222
41381
|
name: "models",
|
|
41223
41382
|
description: `${DESCRIPTION2}
|
|
@@ -41264,13 +41423,13 @@ Examples:
|
|
|
41264
41423
|
});
|
|
41265
41424
|
|
|
41266
41425
|
// src/commands/studio/skills.ts
|
|
41267
|
-
import { defineCommand as
|
|
41426
|
+
import { defineCommand as defineCommand186 } from "citty";
|
|
41268
41427
|
registerSchema({
|
|
41269
41428
|
command: "studio.skills",
|
|
41270
41429
|
description: "The craft directions `studio generate --skill <id>` accepts. Each one carries directed art direction plus the model, shape and take count it wants, so you pick a look by name instead of writing the boilerplate yourself.",
|
|
41271
41430
|
args: {}
|
|
41272
41431
|
});
|
|
41273
|
-
var skillsCommand =
|
|
41432
|
+
var skillsCommand = defineCommand186({
|
|
41274
41433
|
meta: {
|
|
41275
41434
|
name: "skills",
|
|
41276
41435
|
description: "List the craft directions available to `baker studio generate --skill <id>` \u2014 what each one is for, whether it wants a reference image, and the model/shape/count it defaults to.\n\nExample: baker studio skills"
|
|
@@ -41294,7 +41453,7 @@ var skillsCommand = defineCommand184({
|
|
|
41294
41453
|
});
|
|
41295
41454
|
|
|
41296
41455
|
// src/commands/studio/index.ts
|
|
41297
|
-
var studioCommand =
|
|
41456
|
+
var studioCommand = defineCommand187({
|
|
41298
41457
|
meta: {
|
|
41299
41458
|
name: "studio",
|
|
41300
41459
|
description: `Make new imagery and clips. Every batch is recorded and shows up in the dashboard Studio for the client to review, labelled with this conversation.
|
|
@@ -41328,7 +41487,7 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
|
|
|
41328
41487
|
generate: generateCommand,
|
|
41329
41488
|
animate: animateCommand,
|
|
41330
41489
|
get: getCommand4,
|
|
41331
|
-
list:
|
|
41490
|
+
list: listCommand16,
|
|
41332
41491
|
keep: keepCommand,
|
|
41333
41492
|
models: modelsCommand,
|
|
41334
41493
|
skills: skillsCommand,
|
|
@@ -41337,14 +41496,14 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
|
|
|
41337
41496
|
});
|
|
41338
41497
|
|
|
41339
41498
|
// src/commands/tag-manager/index.ts
|
|
41340
|
-
import { defineCommand as
|
|
41499
|
+
import { defineCommand as defineCommand191 } from "citty";
|
|
41341
41500
|
|
|
41342
41501
|
// src/commands/tag-manager/draft.ts
|
|
41343
|
-
import { defineCommand as
|
|
41502
|
+
import { defineCommand as defineCommand188 } from "citty";
|
|
41344
41503
|
|
|
41345
41504
|
// src/commands/tag-manager/shared.ts
|
|
41346
41505
|
import { readFileSync as readFileSync13 } from "fs";
|
|
41347
|
-
function
|
|
41506
|
+
function failValidation5(message) {
|
|
41348
41507
|
writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
41349
41508
|
process.exit(1);
|
|
41350
41509
|
}
|
|
@@ -41352,7 +41511,7 @@ function requireTarget5(args, entity) {
|
|
|
41352
41511
|
const positional = Array.isArray(args._) ? args._[0] : void 0;
|
|
41353
41512
|
const target = args.id ?? args.target ?? positional;
|
|
41354
41513
|
if (typeof target !== "string" || target.length === 0) {
|
|
41355
|
-
|
|
41514
|
+
failValidation5(`pass the ${entity} id or path as the positional argument`);
|
|
41356
41515
|
}
|
|
41357
41516
|
return target;
|
|
41358
41517
|
}
|
|
@@ -41361,16 +41520,16 @@ function loadJsonArg2(args, flag = "json") {
|
|
|
41361
41520
|
const file = args.file;
|
|
41362
41521
|
const raw = typeof file === "string" && file.length > 0 ? readFileSync13(file, "utf8") : typeof inline === "string" && inline.length > 0 ? inline : void 0;
|
|
41363
41522
|
if (raw === void 0) {
|
|
41364
|
-
|
|
41523
|
+
failValidation5(`pass --${flag} with inline JSON or --file with a path to a JSON file`);
|
|
41365
41524
|
}
|
|
41366
41525
|
try {
|
|
41367
41526
|
const parsed = JSON.parse(raw);
|
|
41368
41527
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
41369
|
-
|
|
41528
|
+
failValidation5(`--${flag} must be a JSON object`);
|
|
41370
41529
|
}
|
|
41371
41530
|
return parsed;
|
|
41372
41531
|
} catch {
|
|
41373
|
-
return
|
|
41532
|
+
return failValidation5(`--${flag} is not valid JSON`);
|
|
41374
41533
|
}
|
|
41375
41534
|
}
|
|
41376
41535
|
var RETRYABLE_CODES2 = /* @__PURE__ */ new Set(["RATE_LIMITED", "INTERNAL_ERROR", "NETWORK_ERROR", "TIMEOUT"]);
|
|
@@ -41407,10 +41566,10 @@ async function stageOp4(op) {
|
|
|
41407
41566
|
handleError4(err);
|
|
41408
41567
|
}
|
|
41409
41568
|
}
|
|
41410
|
-
async function draftAction3(
|
|
41569
|
+
async function draftAction3(path37, body, chat) {
|
|
41411
41570
|
const chatId = resolveChatId(chat);
|
|
41412
41571
|
try {
|
|
41413
|
-
const data = await apiPost(
|
|
41572
|
+
const data = await apiPost(path37, { chatId, ...body });
|
|
41414
41573
|
writeJsonEnvelope({ ok: true, data });
|
|
41415
41574
|
return data;
|
|
41416
41575
|
} catch (err) {
|
|
@@ -41463,13 +41622,13 @@ registerSchema({
|
|
|
41463
41622
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
41464
41623
|
}
|
|
41465
41624
|
});
|
|
41466
|
-
var draftCommand4 =
|
|
41625
|
+
var draftCommand4 = defineCommand188({
|
|
41467
41626
|
meta: {
|
|
41468
41627
|
name: "draft",
|
|
41469
41628
|
description: "List, show, amend, remove, or clear staged Tag Manager changes for this chat. `list` and `show` take --chat <id> to read an earlier chat's changes instead."
|
|
41470
41629
|
},
|
|
41471
41630
|
subCommands: {
|
|
41472
|
-
list:
|
|
41631
|
+
list: defineCommand188({
|
|
41473
41632
|
meta: {
|
|
41474
41633
|
name: "list",
|
|
41475
41634
|
description: "Review everything staged on this chat (--json for the raw envelope)"
|
|
@@ -41482,7 +41641,7 @@ var draftCommand4 = defineCommand186({
|
|
|
41482
41641
|
await draftList2(args.json === true, args.chat);
|
|
41483
41642
|
}
|
|
41484
41643
|
}),
|
|
41485
|
-
show:
|
|
41644
|
+
show: defineCommand188({
|
|
41486
41645
|
meta: {
|
|
41487
41646
|
name: "show",
|
|
41488
41647
|
description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
|
|
@@ -41499,7 +41658,7 @@ var draftCommand4 = defineCommand186({
|
|
|
41499
41658
|
);
|
|
41500
41659
|
}
|
|
41501
41660
|
}),
|
|
41502
|
-
amend:
|
|
41661
|
+
amend: defineCommand188({
|
|
41503
41662
|
meta: {
|
|
41504
41663
|
name: "amend",
|
|
41505
41664
|
description: "Update a staged change in place \u2014 merges a JSON patch into its payload (objects deep-merge, null deletes a key, arrays/scalars replace) and re-validates. Use this instead of remove + re-create."
|
|
@@ -41516,7 +41675,7 @@ var draftCommand4 = defineCommand186({
|
|
|
41516
41675
|
});
|
|
41517
41676
|
}
|
|
41518
41677
|
}),
|
|
41519
|
-
remove:
|
|
41678
|
+
remove: defineCommand188({
|
|
41520
41679
|
meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
|
|
41521
41680
|
args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
|
|
41522
41681
|
run: async ({ args }) => {
|
|
@@ -41525,7 +41684,7 @@ var draftCommand4 = defineCommand186({
|
|
|
41525
41684
|
});
|
|
41526
41685
|
}
|
|
41527
41686
|
}),
|
|
41528
|
-
clear:
|
|
41687
|
+
clear: defineCommand188({
|
|
41529
41688
|
meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
|
|
41530
41689
|
run: async () => {
|
|
41531
41690
|
await draftAction3("/api/tag-manager/draft/clear", {});
|
|
@@ -41535,7 +41694,7 @@ var draftCommand4 = defineCommand186({
|
|
|
41535
41694
|
});
|
|
41536
41695
|
|
|
41537
41696
|
// src/commands/tag-manager/read.ts
|
|
41538
|
-
import { defineCommand as
|
|
41697
|
+
import { defineCommand as defineCommand189 } from "citty";
|
|
41539
41698
|
registerSchema({
|
|
41540
41699
|
command: "tagManager.containers",
|
|
41541
41700
|
description: "List the Google Tag Manager containers this company's connection can reach. Every container the company connected is flagged `connected: true` \u2014 there can be several, and Baker may read and change all of them. Start here to confirm which containers you are managing.",
|
|
@@ -41576,7 +41735,7 @@ function containersHints(containers) {
|
|
|
41576
41735
|
}))
|
|
41577
41736
|
});
|
|
41578
41737
|
}
|
|
41579
|
-
var containersCommand =
|
|
41738
|
+
var containersCommand = defineCommand189({
|
|
41580
41739
|
meta: {
|
|
41581
41740
|
name: "containers",
|
|
41582
41741
|
description: `List Tag Manager containers reachable by this company's connection.
|
|
@@ -41593,7 +41752,7 @@ Start here:
|
|
|
41593
41752
|
}
|
|
41594
41753
|
}
|
|
41595
41754
|
});
|
|
41596
|
-
var readCommand =
|
|
41755
|
+
var readCommand = defineCommand189({
|
|
41597
41756
|
meta: {
|
|
41598
41757
|
name: "read",
|
|
41599
41758
|
description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
|
|
@@ -41635,7 +41794,7 @@ Examples:
|
|
|
41635
41794
|
});
|
|
41636
41795
|
|
|
41637
41796
|
// src/commands/tag-manager/write-commands.ts
|
|
41638
|
-
import { defineCommand as
|
|
41797
|
+
import { defineCommand as defineCommand190 } from "citty";
|
|
41639
41798
|
var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
|
|
41640
41799
|
var ENTITIES = [
|
|
41641
41800
|
{
|
|
@@ -41691,10 +41850,10 @@ for (const { entity, noun, createHint } of ENTITIES) {
|
|
|
41691
41850
|
});
|
|
41692
41851
|
}
|
|
41693
41852
|
function entityCommand(entity, noun, example) {
|
|
41694
|
-
return
|
|
41853
|
+
return defineCommand190({
|
|
41695
41854
|
meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
|
|
41696
41855
|
subCommands: {
|
|
41697
|
-
create:
|
|
41856
|
+
create: defineCommand190({
|
|
41698
41857
|
meta: {
|
|
41699
41858
|
name: "create",
|
|
41700
41859
|
description: `Stage a new ${noun}
|
|
@@ -41716,7 +41875,7 @@ Examples:
|
|
|
41716
41875
|
});
|
|
41717
41876
|
}
|
|
41718
41877
|
}),
|
|
41719
|
-
update:
|
|
41878
|
+
update: defineCommand190({
|
|
41720
41879
|
meta: {
|
|
41721
41880
|
name: "update",
|
|
41722
41881
|
description: `Stage an update to an existing ${noun} (pass its id or path)`
|
|
@@ -41736,7 +41895,7 @@ Examples:
|
|
|
41736
41895
|
});
|
|
41737
41896
|
}
|
|
41738
41897
|
}),
|
|
41739
|
-
delete:
|
|
41898
|
+
delete: defineCommand190({
|
|
41740
41899
|
meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
|
|
41741
41900
|
args: {
|
|
41742
41901
|
id: { type: "positional", description: `${noun} id or path`, required: false },
|
|
@@ -41777,7 +41936,7 @@ function builtinTypes(args) {
|
|
|
41777
41936
|
}
|
|
41778
41937
|
return raw.split(",").map((entry) => entry.trim());
|
|
41779
41938
|
}
|
|
41780
|
-
var builtinCommand =
|
|
41939
|
+
var builtinCommand = defineCommand190({
|
|
41781
41940
|
meta: {
|
|
41782
41941
|
name: "builtin",
|
|
41783
41942
|
description: `Enable or disable built-in variables
|
|
@@ -41787,7 +41946,7 @@ Examples:
|
|
|
41787
41946
|
baker tag-manager builtin disable --types formId`
|
|
41788
41947
|
},
|
|
41789
41948
|
subCommands: {
|
|
41790
|
-
enable:
|
|
41949
|
+
enable: defineCommand190({
|
|
41791
41950
|
meta: { name: "enable", description: "Stage enabling built-in variables" },
|
|
41792
41951
|
args: {
|
|
41793
41952
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -41801,7 +41960,7 @@ Examples:
|
|
|
41801
41960
|
});
|
|
41802
41961
|
}
|
|
41803
41962
|
}),
|
|
41804
|
-
disable:
|
|
41963
|
+
disable: defineCommand190({
|
|
41805
41964
|
meta: { name: "disable", description: "Stage disabling built-in variables" },
|
|
41806
41965
|
args: {
|
|
41807
41966
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -41819,7 +41978,7 @@ Examples:
|
|
|
41819
41978
|
});
|
|
41820
41979
|
|
|
41821
41980
|
// src/commands/tag-manager/index.ts
|
|
41822
|
-
var tagManagerCommand =
|
|
41981
|
+
var tagManagerCommand = defineCommand191({
|
|
41823
41982
|
meta: {
|
|
41824
41983
|
name: "tag-manager",
|
|
41825
41984
|
description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
|
|
@@ -41856,7 +42015,7 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
|
|
|
41856
42015
|
});
|
|
41857
42016
|
|
|
41858
42017
|
// src/commands/tags/index.ts
|
|
41859
|
-
import { defineCommand as
|
|
42018
|
+
import { defineCommand as defineCommand192 } from "citty";
|
|
41860
42019
|
|
|
41861
42020
|
// src/commands/tags/shared.ts
|
|
41862
42021
|
function failApi4(err) {
|
|
@@ -41925,7 +42084,7 @@ async function listTags(json) {
|
|
|
41925
42084
|
var listArgs9 = {
|
|
41926
42085
|
json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
|
|
41927
42086
|
};
|
|
41928
|
-
var
|
|
42087
|
+
var listCommand17 = defineCommand192({
|
|
41929
42088
|
meta: {
|
|
41930
42089
|
name: "list",
|
|
41931
42090
|
description: "Effective tags for this chat (production + staged), with each tag's full readable config (secrets excluded) \u2014 reuse a stored value to pre-fill a change rather than asking the user. Refs printed here are what flow side-effect tagIds should use. Example: baker tags list"
|
|
@@ -41944,7 +42103,7 @@ async function listDraft3(chat) {
|
|
|
41944
42103
|
failApi4(err);
|
|
41945
42104
|
}
|
|
41946
42105
|
}
|
|
41947
|
-
var draftCommand5 =
|
|
42106
|
+
var draftCommand5 = defineCommand192({
|
|
41948
42107
|
meta: {
|
|
41949
42108
|
name: "draft",
|
|
41950
42109
|
description: "Review the tag changes staged in this chat (read-only). Staged changes were approved via request_tag_input and apply when the chat is published; to amend or drop one, propose a follow-up change through the same tool (a delete on a tag_temp_* ref drops the staged create). Takes --chat <id> to read an earlier chat's staged changes instead."
|
|
@@ -41954,7 +42113,7 @@ var draftCommand5 = defineCommand190({
|
|
|
41954
42113
|
await listDraft3(args.chat);
|
|
41955
42114
|
}
|
|
41956
42115
|
});
|
|
41957
|
-
var tagsCommand3 =
|
|
42116
|
+
var tagsCommand3 = defineCommand192({
|
|
41958
42117
|
meta: {
|
|
41959
42118
|
name: "tags",
|
|
41960
42119
|
description: `Read the client's marketing/analytics tags (Meta pixel, GA4, Google Ads, GTM, Clarity, Hotjar, \u2026) \u2014 production tags plus the changes staged in this chat.
|
|
@@ -41971,7 +42130,7 @@ Examples:
|
|
|
41971
42130
|
Full guide: __tooling__/docs/tools/baker/tags.md`
|
|
41972
42131
|
},
|
|
41973
42132
|
subCommands: {
|
|
41974
|
-
list:
|
|
42133
|
+
list: listCommand17,
|
|
41975
42134
|
draft: draftCommand5
|
|
41976
42135
|
},
|
|
41977
42136
|
// Bare `baker tags` lists the effective tags. `args` stays so citty knows this
|
|
@@ -41983,10 +42142,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
|
|
|
41983
42142
|
});
|
|
41984
42143
|
|
|
41985
42144
|
// src/commands/testimonials/index.ts
|
|
41986
|
-
import { defineCommand as
|
|
42145
|
+
import { defineCommand as defineCommand196 } from "citty";
|
|
41987
42146
|
|
|
41988
42147
|
// src/commands/testimonials/get.ts
|
|
41989
|
-
import { defineCommand as
|
|
42148
|
+
import { defineCommand as defineCommand193 } from "citty";
|
|
41990
42149
|
registerSchema({
|
|
41991
42150
|
command: "testimonials.get",
|
|
41992
42151
|
description: "Get a single testimonial by ID",
|
|
@@ -41994,7 +42153,7 @@ registerSchema({
|
|
|
41994
42153
|
id: { type: "string", description: "Testimonial ID", required: true }
|
|
41995
42154
|
}
|
|
41996
42155
|
});
|
|
41997
|
-
var getCommand5 =
|
|
42156
|
+
var getCommand5 = defineCommand193({
|
|
41998
42157
|
meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
|
|
41999
42158
|
args: {
|
|
42000
42159
|
id: { type: "positional", description: "Testimonial ID", required: false },
|
|
@@ -42031,7 +42190,7 @@ var getCommand5 = defineCommand191({
|
|
|
42031
42190
|
});
|
|
42032
42191
|
|
|
42033
42192
|
// src/commands/testimonials/list.ts
|
|
42034
|
-
import { defineCommand as
|
|
42193
|
+
import { defineCommand as defineCommand194 } from "citty";
|
|
42035
42194
|
|
|
42036
42195
|
// src/commands/testimonials/emptyCorpusHints.ts
|
|
42037
42196
|
var NO_CORPUS_TAIL = 'this company has NO review corpus connected. Testimonials are ingested from the client\'s Google/Trustpilot reviews \u2014 an agent cannot write one \u2014 so no rewording will find quotes. Stop searching and source proof another way: a result or case study the client already published, a named-customer logo (`baker images logo`), or a founder claim attributed as a claim. Otherwise ship without a testimonial block and file the gap: `baker actions create --name "Collect customer quotes for <page>" --priority medium --tags <slug>`. Never invent, paraphrase-into-existence, or pad with unrelated praise.';
|
|
@@ -42107,7 +42266,7 @@ function buildListParams(args) {
|
|
|
42107
42266
|
}
|
|
42108
42267
|
return params;
|
|
42109
42268
|
}
|
|
42110
|
-
var
|
|
42269
|
+
var listCommand18 = defineCommand194({
|
|
42111
42270
|
meta: {
|
|
42112
42271
|
name: "list",
|
|
42113
42272
|
description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
|
|
@@ -42159,7 +42318,7 @@ var listCommand17 = defineCommand192({
|
|
|
42159
42318
|
});
|
|
42160
42319
|
|
|
42161
42320
|
// src/commands/testimonials/search.ts
|
|
42162
|
-
import { defineCommand as
|
|
42321
|
+
import { defineCommand as defineCommand195 } from "citty";
|
|
42163
42322
|
var FILTER_FLAGS2 = ["source", "rating-min", "rating-max", "status", "sentiment", "language", "tags"];
|
|
42164
42323
|
function languageBiasHint(results, requestedLanguage) {
|
|
42165
42324
|
if (requestedLanguage) {
|
|
@@ -42238,7 +42397,7 @@ function buildSearchRequest(query, args) {
|
|
|
42238
42397
|
}
|
|
42239
42398
|
return body;
|
|
42240
42399
|
}
|
|
42241
|
-
var searchCommand3 =
|
|
42400
|
+
var searchCommand3 = defineCommand195({
|
|
42242
42401
|
meta: {
|
|
42243
42402
|
name: "search",
|
|
42244
42403
|
description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
|
|
@@ -42304,7 +42463,7 @@ var searchCommand3 = defineCommand193({
|
|
|
42304
42463
|
var tagsCommand4 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
|
|
42305
42464
|
|
|
42306
42465
|
// src/commands/testimonials/index.ts
|
|
42307
|
-
var testimonialsCommand =
|
|
42466
|
+
var testimonialsCommand = defineCommand196({
|
|
42308
42467
|
meta: {
|
|
42309
42468
|
name: "testimonials",
|
|
42310
42469
|
description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
|
|
@@ -42320,16 +42479,16 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
|
|
|
42320
42479
|
subCommands: {
|
|
42321
42480
|
get: getCommand5,
|
|
42322
42481
|
search: searchCommand3,
|
|
42323
|
-
list:
|
|
42482
|
+
list: listCommand18,
|
|
42324
42483
|
tags: tagsCommand4
|
|
42325
42484
|
}
|
|
42326
42485
|
});
|
|
42327
42486
|
|
|
42328
42487
|
// src/commands/videos/index.ts
|
|
42329
|
-
import { defineCommand as
|
|
42488
|
+
import { defineCommand as defineCommand202 } from "citty";
|
|
42330
42489
|
|
|
42331
42490
|
// src/commands/videos/delete.ts
|
|
42332
|
-
import { defineCommand as
|
|
42491
|
+
import { defineCommand as defineCommand197 } from "citty";
|
|
42333
42492
|
registerSchema({
|
|
42334
42493
|
command: "videos.delete",
|
|
42335
42494
|
description: "Delete a video by ID",
|
|
@@ -42343,7 +42502,7 @@ registerSchema({
|
|
|
42343
42502
|
}
|
|
42344
42503
|
}
|
|
42345
42504
|
});
|
|
42346
|
-
var deleteCommand3 =
|
|
42505
|
+
var deleteCommand3 = defineCommand197({
|
|
42347
42506
|
meta: {
|
|
42348
42507
|
name: "delete",
|
|
42349
42508
|
description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
|
|
@@ -42384,7 +42543,7 @@ var deleteCommand3 = defineCommand195({
|
|
|
42384
42543
|
});
|
|
42385
42544
|
|
|
42386
42545
|
// src/commands/videos/get.ts
|
|
42387
|
-
import { defineCommand as
|
|
42546
|
+
import { defineCommand as defineCommand198 } from "citty";
|
|
42388
42547
|
registerSchema({
|
|
42389
42548
|
command: "videos.get",
|
|
42390
42549
|
description: "Get a single video by ID",
|
|
@@ -42392,7 +42551,7 @@ registerSchema({
|
|
|
42392
42551
|
id: { type: "string", description: "Video ID", required: true }
|
|
42393
42552
|
}
|
|
42394
42553
|
});
|
|
42395
|
-
var getCommand6 =
|
|
42554
|
+
var getCommand6 = defineCommand198({
|
|
42396
42555
|
meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
|
|
42397
42556
|
args: {
|
|
42398
42557
|
id: { type: "positional", description: "Video ID", required: false },
|
|
@@ -42429,7 +42588,7 @@ var getCommand6 = defineCommand196({
|
|
|
42429
42588
|
});
|
|
42430
42589
|
|
|
42431
42590
|
// src/commands/videos/group.ts
|
|
42432
|
-
import { defineCommand as
|
|
42591
|
+
import { defineCommand as defineCommand199 } from "citty";
|
|
42433
42592
|
registerSchema({
|
|
42434
42593
|
command: "videos.group",
|
|
42435
42594
|
description: "List every clip and image that arrived in the same set as this video (carousel slides, one page)",
|
|
@@ -42438,7 +42597,7 @@ registerSchema({
|
|
|
42438
42597
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
42439
42598
|
}
|
|
42440
42599
|
});
|
|
42441
|
-
var groupCommand2 =
|
|
42600
|
+
var groupCommand2 = defineCommand199({
|
|
42442
42601
|
meta: {
|
|
42443
42602
|
name: "group",
|
|
42444
42603
|
description: "List every asset that arrived in the same set as this clip \u2014 the other slides of the Instagram post it came from, stills included. A carousel is authored to be read in order, so a clip pulled out of one is usually missing half its meaning. Example: baker videos group <videoId>"
|
|
@@ -42458,7 +42617,7 @@ var groupCommand2 = defineCommand197({
|
|
|
42458
42617
|
});
|
|
42459
42618
|
|
|
42460
42619
|
// src/commands/videos/search.ts
|
|
42461
|
-
import { defineCommand as
|
|
42620
|
+
import { defineCommand as defineCommand200 } from "citty";
|
|
42462
42621
|
registerSchema({
|
|
42463
42622
|
command: "videos.search",
|
|
42464
42623
|
description: "Search videos by text query. Only returns ready videos.",
|
|
@@ -42468,7 +42627,7 @@ registerSchema({
|
|
|
42468
42627
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
42469
42628
|
}
|
|
42470
42629
|
});
|
|
42471
|
-
var searchCommand4 =
|
|
42630
|
+
var searchCommand4 = defineCommand200({
|
|
42472
42631
|
meta: {
|
|
42473
42632
|
name: "search",
|
|
42474
42633
|
description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
|
|
@@ -42520,7 +42679,7 @@ var tagsCommand5 = makeTagsCommand("videos", "video", "/api/videos/tags");
|
|
|
42520
42679
|
// src/commands/videos/upload.ts
|
|
42521
42680
|
import { readFile as readFile24, stat as stat7 } from "fs/promises";
|
|
42522
42681
|
import { basename as basename3, extname as extname4 } from "path";
|
|
42523
|
-
import { defineCommand as
|
|
42682
|
+
import { defineCommand as defineCommand201 } from "citty";
|
|
42524
42683
|
var MIME_MAP = {
|
|
42525
42684
|
".mp4": "video/mp4",
|
|
42526
42685
|
".mov": "video/quicktime",
|
|
@@ -42559,7 +42718,7 @@ function detectContentType(filePath) {
|
|
|
42559
42718
|
}
|
|
42560
42719
|
return mime;
|
|
42561
42720
|
}
|
|
42562
|
-
var uploadCommand2 =
|
|
42721
|
+
var uploadCommand2 = defineCommand201({
|
|
42563
42722
|
meta: {
|
|
42564
42723
|
name: "upload",
|
|
42565
42724
|
description: "Upload a video file to Baker via Mux direct upload. Auto-detects content type. Example: baker videos upload ./demo.mp4"
|
|
@@ -42629,7 +42788,7 @@ var uploadCommand2 = defineCommand199({
|
|
|
42629
42788
|
});
|
|
42630
42789
|
|
|
42631
42790
|
// src/commands/videos/index.ts
|
|
42632
|
-
var videosCommand =
|
|
42791
|
+
var videosCommand = defineCommand202({
|
|
42633
42792
|
meta: {
|
|
42634
42793
|
name: "videos",
|
|
42635
42794
|
description: `Find and manage videos in Baker. Subcommands: search, get, upload, delete, tags.
|
|
@@ -42654,10 +42813,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
|
|
|
42654
42813
|
});
|
|
42655
42814
|
|
|
42656
42815
|
// src/commands/winning-ads/index.ts
|
|
42657
|
-
import { defineCommand as
|
|
42816
|
+
import { defineCommand as defineCommand215 } from "citty";
|
|
42658
42817
|
|
|
42659
42818
|
// src/commands/winning-ads/advertisers.ts
|
|
42660
|
-
import { defineCommand as
|
|
42819
|
+
import { defineCommand as defineCommand203 } from "citty";
|
|
42661
42820
|
|
|
42662
42821
|
// src/commands/winning-ads/shared.ts
|
|
42663
42822
|
function splitList2(value) {
|
|
@@ -42710,7 +42869,7 @@ function advertiserNormalizer(record, full) {
|
|
|
42710
42869
|
last_synced_at: record.last_synced_at ?? null
|
|
42711
42870
|
};
|
|
42712
42871
|
}
|
|
42713
|
-
var advertisersCommand2 =
|
|
42872
|
+
var advertisersCommand2 = defineCommand203({
|
|
42714
42873
|
meta: {
|
|
42715
42874
|
name: "advertisers",
|
|
42716
42875
|
description: 'List corpus advertisers by name or domain. Find your own advertiser for --exclude-advertiser, or a competitor for --advertiser-id / winners. Example: baker winning-ads advertisers "Deel" --output md'
|
|
@@ -42768,7 +42927,7 @@ var advertisersCommand2 = defineCommand201({
|
|
|
42768
42927
|
});
|
|
42769
42928
|
|
|
42770
42929
|
// src/commands/winning-ads/brief.ts
|
|
42771
|
-
import { defineCommand as
|
|
42930
|
+
import { defineCommand as defineCommand204 } from "citty";
|
|
42772
42931
|
registerSchema({
|
|
42773
42932
|
command: "winning-ads.brief",
|
|
42774
42933
|
description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
|
|
@@ -42814,7 +42973,7 @@ function parseDna(raw) {
|
|
|
42814
42973
|
}
|
|
42815
42974
|
return parsed;
|
|
42816
42975
|
}
|
|
42817
|
-
var briefCommand =
|
|
42976
|
+
var briefCommand = defineCommand204({
|
|
42818
42977
|
meta: {
|
|
42819
42978
|
name: "brief",
|
|
42820
42979
|
description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
|
|
@@ -42850,7 +43009,7 @@ var briefCommand = defineCommand202({
|
|
|
42850
43009
|
});
|
|
42851
43010
|
|
|
42852
43011
|
// src/commands/winning-ads/content.ts
|
|
42853
|
-
import { defineCommand as
|
|
43012
|
+
import { defineCommand as defineCommand205 } from "citty";
|
|
42854
43013
|
registerSchema({
|
|
42855
43014
|
command: "winning-ads.content",
|
|
42856
43015
|
description: "Read what's INSIDE one winning ad: the spoken transcript, the on-screen text, and the ad copy. Use this after `search`/`winners`/`feed` return a shortlist \u2014 pass an ad_id to understand a reference before reproducing it. Add --full for speech, pacing, and soundtrack detail. Video ads carry the transcript/on-screen text; static ads carry only the copy.",
|
|
@@ -42863,7 +43022,7 @@ registerSchema({
|
|
|
42863
43022
|
}
|
|
42864
43023
|
}
|
|
42865
43024
|
});
|
|
42866
|
-
var contentCommand =
|
|
43025
|
+
var contentCommand = defineCommand205({
|
|
42867
43026
|
meta: {
|
|
42868
43027
|
name: "content",
|
|
42869
43028
|
description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
|
|
@@ -42912,7 +43071,7 @@ var contentCommand = defineCommand203({
|
|
|
42912
43071
|
});
|
|
42913
43072
|
|
|
42914
43073
|
// src/commands/winning-ads/feed.ts
|
|
42915
|
-
import { defineCommand as
|
|
43074
|
+
import { defineCommand as defineCommand206 } from "citty";
|
|
42916
43075
|
function buildFeedParams(input) {
|
|
42917
43076
|
const params = {};
|
|
42918
43077
|
const advertiser = splitList2(input.advertiser);
|
|
@@ -42964,7 +43123,7 @@ registerSchema({
|
|
|
42964
43123
|
format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
|
|
42965
43124
|
}
|
|
42966
43125
|
});
|
|
42967
|
-
var feedCommand =
|
|
43126
|
+
var feedCommand = defineCommand206({
|
|
42968
43127
|
meta: {
|
|
42969
43128
|
name: "feed",
|
|
42970
43129
|
description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
|
|
@@ -43049,7 +43208,7 @@ var feedCommand = defineCommand204({
|
|
|
43049
43208
|
});
|
|
43050
43209
|
|
|
43051
43210
|
// src/commands/winning-ads/follow.ts
|
|
43052
|
-
import { defineCommand as
|
|
43211
|
+
import { defineCommand as defineCommand207 } from "citty";
|
|
43053
43212
|
var PLATFORMS = ["meta", "linkedin"];
|
|
43054
43213
|
registerSchema({
|
|
43055
43214
|
command: "winning-ads.follow",
|
|
@@ -43064,7 +43223,7 @@ registerSchema({
|
|
|
43064
43223
|
label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
|
|
43065
43224
|
}
|
|
43066
43225
|
});
|
|
43067
|
-
var followCommand =
|
|
43226
|
+
var followCommand = defineCommand207({
|
|
43068
43227
|
meta: {
|
|
43069
43228
|
name: "follow",
|
|
43070
43229
|
description: 'Follow a brand to track ALL its ads \u2014 every platform and country. --platform is how we read your input, not a limit. A domain tracks both Meta + LinkedIn. Example: baker winning-ads follow "deel.com" --platform meta'
|
|
@@ -43111,7 +43270,7 @@ var followCommand = defineCommand205({
|
|
|
43111
43270
|
});
|
|
43112
43271
|
|
|
43113
43272
|
// src/commands/winning-ads/follow-competitors.ts
|
|
43114
|
-
import { defineCommand as
|
|
43273
|
+
import { defineCommand as defineCommand208 } from "citty";
|
|
43115
43274
|
var PLATFORMS2 = ["meta", "linkedin"];
|
|
43116
43275
|
var BATCH_TIMEOUT_MS = 3e5;
|
|
43117
43276
|
function buildFollowBatchBody(input) {
|
|
@@ -43144,7 +43303,7 @@ registerSchema({
|
|
|
43144
43303
|
}
|
|
43145
43304
|
}
|
|
43146
43305
|
});
|
|
43147
|
-
var followCompetitorsCommand =
|
|
43306
|
+
var followCompetitorsCommand = defineCommand208({
|
|
43148
43307
|
meta: {
|
|
43149
43308
|
name: "follow-competitors",
|
|
43150
43309
|
description: 'Follow many brands at once by domain \u2014 add every competitor in one call. Example: baker winning-ads follow-competitors "deel.com,notion.so,hubspot.com"'
|
|
@@ -43219,7 +43378,7 @@ var followCompetitorsCommand = defineCommand206({
|
|
|
43219
43378
|
});
|
|
43220
43379
|
|
|
43221
43380
|
// src/commands/winning-ads/following.ts
|
|
43222
|
-
import { defineCommand as
|
|
43381
|
+
import { defineCommand as defineCommand209 } from "citty";
|
|
43223
43382
|
registerSchema({
|
|
43224
43383
|
command: "winning-ads.following",
|
|
43225
43384
|
description: "List the brands you follow in your ad-dna library, with each one's status (ready vs still adding) and cached ad counts.",
|
|
@@ -43252,7 +43411,7 @@ function followingNormalizer(record, full) {
|
|
|
43252
43411
|
platforms: Array.isArray(record.platforms) ? record.platforms : []
|
|
43253
43412
|
};
|
|
43254
43413
|
}
|
|
43255
|
-
var followingCommand =
|
|
43414
|
+
var followingCommand = defineCommand209({
|
|
43256
43415
|
meta: {
|
|
43257
43416
|
name: "following",
|
|
43258
43417
|
description: "List brands you follow, with status (ready / adding\u2026) and cached counts. Example: baker winning-ads following --output md"
|
|
@@ -43287,7 +43446,7 @@ var followingCommand = defineCommand207({
|
|
|
43287
43446
|
});
|
|
43288
43447
|
|
|
43289
43448
|
// src/commands/winning-ads/patterns.ts
|
|
43290
|
-
import { defineCommand as
|
|
43449
|
+
import { defineCommand as defineCommand210 } from "citty";
|
|
43291
43450
|
registerSchema({
|
|
43292
43451
|
command: "winning-ads.patterns",
|
|
43293
43452
|
description: "Mine what separates two cohorts of ads: pass a comma-list of winning ad ids (--winners) and a comma-list of weaker ad ids (--duds). Returns the discriminating DNA fields.",
|
|
@@ -43326,7 +43485,7 @@ function discriminatorRow(record) {
|
|
|
43326
43485
|
top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
|
|
43327
43486
|
};
|
|
43328
43487
|
}
|
|
43329
|
-
var patternsCommand =
|
|
43488
|
+
var patternsCommand = defineCommand210({
|
|
43330
43489
|
meta: {
|
|
43331
43490
|
name: "patterns",
|
|
43332
43491
|
description: "Discover what separates winning ads from weak ones. Example: baker winning-ads patterns --winners a_1,a_2,a_3 --duds a_9,a_8 --output md"
|
|
@@ -43382,7 +43541,7 @@ var patternsCommand = defineCommand208({
|
|
|
43382
43541
|
});
|
|
43383
43542
|
|
|
43384
43543
|
// src/commands/winning-ads/search.ts
|
|
43385
|
-
import { defineCommand as
|
|
43544
|
+
import { defineCommand as defineCommand211 } from "citty";
|
|
43386
43545
|
registerSchema({
|
|
43387
43546
|
command: "winning-ads.search",
|
|
43388
43547
|
description: "Search the ad-dna corpus of scored winning ads. Returns a lean shortlist (advertiser, summary, scores, media_url) to pick a reference to reproduce.",
|
|
@@ -43490,7 +43649,7 @@ function buildSearchBody2(args) {
|
|
|
43490
43649
|
}
|
|
43491
43650
|
return body;
|
|
43492
43651
|
}
|
|
43493
|
-
var searchCommand5 =
|
|
43652
|
+
var searchCommand5 = defineCommand211({
|
|
43494
43653
|
meta: {
|
|
43495
43654
|
name: "search",
|
|
43496
43655
|
description: "Search winning reference ads. Example: baker winning-ads search 'B2B SaaS before/after AI automation' --platform meta --format static --winner-category winner --exclude-advertiser adv_123 --output md"
|
|
@@ -43605,7 +43764,7 @@ var searchCommand5 = defineCommand209({
|
|
|
43605
43764
|
});
|
|
43606
43765
|
|
|
43607
43766
|
// src/commands/winning-ads/seeds.ts
|
|
43608
|
-
import { defineCommand as
|
|
43767
|
+
import { defineCommand as defineCommand212 } from "citty";
|
|
43609
43768
|
function leanRow(r) {
|
|
43610
43769
|
return {
|
|
43611
43770
|
key: r.key,
|
|
@@ -43633,7 +43792,7 @@ function makeSeedCommand(opts) {
|
|
|
43633
43792
|
limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
|
|
43634
43793
|
}
|
|
43635
43794
|
});
|
|
43636
|
-
return
|
|
43795
|
+
return defineCommand212({
|
|
43637
43796
|
meta: { name: opts.name, description: opts.description },
|
|
43638
43797
|
args: {
|
|
43639
43798
|
platform: { type: "string", description: "Single platform to segment on", required: false },
|
|
@@ -43682,7 +43841,7 @@ var formatsCommand = makeSeedCommand({
|
|
|
43682
43841
|
});
|
|
43683
43842
|
|
|
43684
43843
|
// src/commands/winning-ads/unfollow.ts
|
|
43685
|
-
import { defineCommand as
|
|
43844
|
+
import { defineCommand as defineCommand213 } from "citty";
|
|
43686
43845
|
registerSchema({
|
|
43687
43846
|
command: "winning-ads.unfollow",
|
|
43688
43847
|
description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
|
|
@@ -43690,7 +43849,7 @@ registerSchema({
|
|
|
43690
43849
|
advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
|
|
43691
43850
|
}
|
|
43692
43851
|
});
|
|
43693
|
-
var unfollowCommand =
|
|
43852
|
+
var unfollowCommand = defineCommand213({
|
|
43694
43853
|
meta: {
|
|
43695
43854
|
name: "unfollow",
|
|
43696
43855
|
description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
|
|
@@ -43711,7 +43870,7 @@ var unfollowCommand = defineCommand211({
|
|
|
43711
43870
|
});
|
|
43712
43871
|
|
|
43713
43872
|
// src/commands/winning-ads/winners.ts
|
|
43714
|
-
import { defineCommand as
|
|
43873
|
+
import { defineCommand as defineCommand214 } from "citty";
|
|
43715
43874
|
registerSchema({
|
|
43716
43875
|
command: "winning-ads.winners",
|
|
43717
43876
|
description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
|
|
@@ -43721,7 +43880,7 @@ registerSchema({
|
|
|
43721
43880
|
platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
|
|
43722
43881
|
}
|
|
43723
43882
|
});
|
|
43724
|
-
var winnersCommand =
|
|
43883
|
+
var winnersCommand = defineCommand214({
|
|
43725
43884
|
meta: {
|
|
43726
43885
|
name: "winners",
|
|
43727
43886
|
description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
|
|
@@ -43771,7 +43930,7 @@ var winnersCommand = defineCommand212({
|
|
|
43771
43930
|
});
|
|
43772
43931
|
|
|
43773
43932
|
// src/commands/winning-ads/index.ts
|
|
43774
|
-
var winningAdsCommand =
|
|
43933
|
+
var winningAdsCommand = defineCommand215({
|
|
43775
43934
|
meta: {
|
|
43776
43935
|
name: "winning-ads",
|
|
43777
43936
|
description: `Search the ad-dna corpus of scored "winning" ads for reference creatives to reproduce, and manage the brands your library tracks. Proxied through the Baker backend (BAKER_API_KEY) \u2014 no separate token needed.
|
|
@@ -43826,164 +43985,6 @@ Full guide: __tooling__/docs/tools/baker/winning-ads.md`
|
|
|
43826
43985
|
}
|
|
43827
43986
|
});
|
|
43828
43987
|
|
|
43829
|
-
// src/unknown-flags.ts
|
|
43830
|
-
var ALWAYS_ACCEPTED = /* @__PURE__ */ new Set(["help", "h", "version"]);
|
|
43831
|
-
function subCommandsOf(command) {
|
|
43832
|
-
const sub = command.subCommands;
|
|
43833
|
-
return sub && typeof sub === "object" ? sub : null;
|
|
43834
|
-
}
|
|
43835
|
-
function argsOf(command) {
|
|
43836
|
-
const args = command.args;
|
|
43837
|
-
return args && typeof args === "object" ? args : null;
|
|
43838
|
-
}
|
|
43839
|
-
function resolveCommand2(root, argv) {
|
|
43840
|
-
let command = root;
|
|
43841
|
-
for (const token of argv) {
|
|
43842
|
-
if (token === "--" || token.startsWith("-")) {
|
|
43843
|
-
break;
|
|
43844
|
-
}
|
|
43845
|
-
const subCommands = subCommandsOf(command);
|
|
43846
|
-
if (!subCommands) {
|
|
43847
|
-
break;
|
|
43848
|
-
}
|
|
43849
|
-
const next = subCommands[token];
|
|
43850
|
-
if (next === void 0) {
|
|
43851
|
-
break;
|
|
43852
|
-
}
|
|
43853
|
-
if (typeof next !== "object") {
|
|
43854
|
-
return { command, resolved: false };
|
|
43855
|
-
}
|
|
43856
|
-
command = next;
|
|
43857
|
-
}
|
|
43858
|
-
return { command, resolved: true };
|
|
43859
|
-
}
|
|
43860
|
-
function typeOf(def) {
|
|
43861
|
-
return def && typeof def === "object" ? def.type : void 0;
|
|
43862
|
-
}
|
|
43863
|
-
function acceptedNames(command) {
|
|
43864
|
-
const args = argsOf(command);
|
|
43865
|
-
if (!args) {
|
|
43866
|
-
return null;
|
|
43867
|
-
}
|
|
43868
|
-
const names = new Set(ALWAYS_ACCEPTED);
|
|
43869
|
-
for (const [name, def] of Object.entries(args)) {
|
|
43870
|
-
if (typeOf(def) === "positional") {
|
|
43871
|
-
continue;
|
|
43872
|
-
}
|
|
43873
|
-
names.add(name);
|
|
43874
|
-
if (typeOf(def) === "boolean") {
|
|
43875
|
-
names.add(`no-${name}`);
|
|
43876
|
-
}
|
|
43877
|
-
}
|
|
43878
|
-
return names;
|
|
43879
|
-
}
|
|
43880
|
-
function findUnknownFlags(root, argv) {
|
|
43881
|
-
const { command, resolved } = resolveCommand2(root, argv);
|
|
43882
|
-
if (!resolved) {
|
|
43883
|
-
return [];
|
|
43884
|
-
}
|
|
43885
|
-
const accepted = acceptedNames(command);
|
|
43886
|
-
if (!accepted) {
|
|
43887
|
-
return [];
|
|
43888
|
-
}
|
|
43889
|
-
const unknown = [];
|
|
43890
|
-
for (const token of argv) {
|
|
43891
|
-
if (token === "--") {
|
|
43892
|
-
break;
|
|
43893
|
-
}
|
|
43894
|
-
if (!token.startsWith("--")) {
|
|
43895
|
-
continue;
|
|
43896
|
-
}
|
|
43897
|
-
const name = token.slice(2).split("=")[0] ?? "";
|
|
43898
|
-
if (name.length > 0 && !accepted.has(name) && !unknown.includes(token)) {
|
|
43899
|
-
unknown.push(token);
|
|
43900
|
-
}
|
|
43901
|
-
}
|
|
43902
|
-
return unknown;
|
|
43903
|
-
}
|
|
43904
|
-
function closestFlag(unknown, command) {
|
|
43905
|
-
const accepted = acceptedNames(command);
|
|
43906
|
-
if (!accepted) {
|
|
43907
|
-
return null;
|
|
43908
|
-
}
|
|
43909
|
-
const name = unknown.replace(/^--/, "").split("=")[0] ?? "";
|
|
43910
|
-
const scored = [...accepted].filter((candidate) => !ALWAYS_ACCEPTED.has(candidate)).map((candidate) => ({
|
|
43911
|
-
candidate,
|
|
43912
|
-
prefix: sharedPrefix(name, candidate),
|
|
43913
|
-
distance: editDistance(name, candidate)
|
|
43914
|
-
})).filter(({ prefix, distance }) => prefix >= 4 || distance <= 3).sort((a, b) => b.prefix - a.prefix || a.distance - b.distance);
|
|
43915
|
-
return scored[0] ? `--${scored[0].candidate}` : null;
|
|
43916
|
-
}
|
|
43917
|
-
function sharedPrefix(a, b) {
|
|
43918
|
-
let i = 0;
|
|
43919
|
-
while (i < a.length && i < b.length && a[i] === b[i]) {
|
|
43920
|
-
i++;
|
|
43921
|
-
}
|
|
43922
|
-
return i;
|
|
43923
|
-
}
|
|
43924
|
-
function editDistance(a, b) {
|
|
43925
|
-
let previous = Array.from({ length: b.length + 1 }, (_, j) => j);
|
|
43926
|
-
for (let i = 1; i <= a.length; i++) {
|
|
43927
|
-
const current = [i];
|
|
43928
|
-
for (let j = 1; j <= b.length; j++) {
|
|
43929
|
-
const substitution = (previous[j - 1] ?? 0) + (a[i - 1] === b[j - 1] ? 0 : 1);
|
|
43930
|
-
current.push(Math.min((previous[j] ?? 0) + 1, (current[j - 1] ?? 0) + 1, substitution));
|
|
43931
|
-
}
|
|
43932
|
-
previous = current;
|
|
43933
|
-
}
|
|
43934
|
-
return previous[b.length] ?? 0;
|
|
43935
|
-
}
|
|
43936
|
-
function commandFor(root, argv) {
|
|
43937
|
-
const { command, resolved } = resolveCommand2(root, argv);
|
|
43938
|
-
return resolved ? command : null;
|
|
43939
|
-
}
|
|
43940
|
-
function unknownFlagEnvelope(unknown, commandPath, suggestion) {
|
|
43941
|
-
const list = unknown.join(", ");
|
|
43942
|
-
return {
|
|
43943
|
-
ok: false,
|
|
43944
|
-
error: {
|
|
43945
|
-
code: "UNKNOWN_ARGUMENT",
|
|
43946
|
-
message: `${list} ${unknown.length > 1 ? "are not options" : "is not an option"} of \`baker ${commandPath}\`.`,
|
|
43947
|
-
fix: {
|
|
43948
|
-
action: "check_schema",
|
|
43949
|
-
explanation: (suggestion ? `Did you mean ${suggestion}? ` : "") + `Run \`baker schema ${commandPath}\` to see every option this command takes. Do not re-run the same call: until this version an unrecognised option was accepted and ignored, so a command that looked like it had filtered or narrowed the result was in fact answering the unfiltered question.`
|
|
43950
|
-
},
|
|
43951
|
-
retryable: false
|
|
43952
|
-
}
|
|
43953
|
-
};
|
|
43954
|
-
}
|
|
43955
|
-
function commandPathOf(root, argv) {
|
|
43956
|
-
const path36 = [];
|
|
43957
|
-
let command = root;
|
|
43958
|
-
for (const token of argv) {
|
|
43959
|
-
if (token === "--" || token.startsWith("-")) {
|
|
43960
|
-
break;
|
|
43961
|
-
}
|
|
43962
|
-
const subCommands = subCommandsOf(command);
|
|
43963
|
-
const next = subCommands?.[token];
|
|
43964
|
-
if (next === void 0 || typeof next !== "object") {
|
|
43965
|
-
break;
|
|
43966
|
-
}
|
|
43967
|
-
path36.push(token);
|
|
43968
|
-
command = next;
|
|
43969
|
-
}
|
|
43970
|
-
return path36.join(" ");
|
|
43971
|
-
}
|
|
43972
|
-
function refuseUnknownFlags(root, argv) {
|
|
43973
|
-
const unknown = findUnknownFlags(root, argv);
|
|
43974
|
-
if (unknown.length === 0) {
|
|
43975
|
-
return;
|
|
43976
|
-
}
|
|
43977
|
-
const command = commandFor(root, argv);
|
|
43978
|
-
const first = unknown[0];
|
|
43979
|
-
const suggestion = command && first ? closestFlag(first, command) : null;
|
|
43980
|
-
process.stdout.write(
|
|
43981
|
-
`${JSON.stringify(unknownFlagEnvelope(unknown, commandPathOf(root, argv), suggestion), null, 2)}
|
|
43982
|
-
`
|
|
43983
|
-
);
|
|
43984
|
-
process.exit(1);
|
|
43985
|
-
}
|
|
43986
|
-
|
|
43987
43988
|
// src/version.ts
|
|
43988
43989
|
import { readFileSync as readFileSync14 } from "fs";
|
|
43989
43990
|
function packageJsonUrl() {
|
|
@@ -44001,7 +44002,7 @@ function getCliVersion() {
|
|
|
44001
44002
|
}
|
|
44002
44003
|
|
|
44003
44004
|
// src/cli.ts
|
|
44004
|
-
var main =
|
|
44005
|
+
var main = defineCommand216({
|
|
44005
44006
|
meta: {
|
|
44006
44007
|
name: "baker",
|
|
44007
44008
|
version: getCliVersion(),
|
|
@@ -44016,6 +44017,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
|
|
|
44016
44017
|
subCommands: {
|
|
44017
44018
|
capabilities: capabilitiesCommand,
|
|
44018
44019
|
actions: actionsCommand,
|
|
44020
|
+
agents: agentsCommand,
|
|
44019
44021
|
"scheduled-actions": scheduledActionsCommand,
|
|
44020
44022
|
ads: adsCommand2,
|
|
44021
44023
|
brand: brandCommand,
|
|
@@ -44036,13 +44038,11 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
|
|
|
44036
44038
|
history: historyCommand,
|
|
44037
44039
|
hubspot: hubspotCommand,
|
|
44038
44040
|
"winning-ads": winningAdsCommand,
|
|
44039
|
-
marketplace: marketplaceCommand,
|
|
44040
44041
|
mcp: mcpCommand,
|
|
44041
44042
|
schema: schemaCommand
|
|
44042
44043
|
}
|
|
44043
44044
|
});
|
|
44044
44045
|
installStreamTaps();
|
|
44045
44046
|
logInvocation(process.argv.slice(2));
|
|
44046
|
-
refuseUnknownFlags(main, process.argv.slice(2));
|
|
44047
44047
|
runMain(main);
|
|
44048
44048
|
//# sourceMappingURL=cli.js.map
|