@koda-sl/baker-cli 0.241.0 → 0.243.0-dev.9a9142645
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 +39 -0
- package/dist/{chunk-EKLAHWSF.js → chunk-CMPAHYLB.js} +4 -4
- package/dist/chunk-CMPAHYLB.js.map +1 -0
- package/dist/cli.js +690 -324
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-EKLAHWSF.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
ulid,
|
|
59
59
|
validateCanvasDeep,
|
|
60
60
|
ytDlpBlockSignal
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-CMPAHYLB.js";
|
|
62
62
|
import {
|
|
63
63
|
csvOrJson,
|
|
64
64
|
daysAgoIso,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
} from "./chunk-DZUVUGEP.js";
|
|
109
109
|
|
|
110
110
|
// src/cli.ts
|
|
111
|
-
import { defineCommand as
|
|
111
|
+
import { defineCommand as defineCommand228, runMain } from "citty";
|
|
112
112
|
|
|
113
113
|
// src/cache-flag.ts
|
|
114
114
|
var NO_CACHE_ARG = {
|
|
@@ -3920,10 +3920,35 @@ var capabilitySurfaceReportSchema = z9.object({
|
|
|
3920
3920
|
/** Where to look next: `baker ads google`, `baker ga4`, … */
|
|
3921
3921
|
commands: z9.string()
|
|
3922
3922
|
});
|
|
3923
|
+
var capabilityToolSchema = z9.object({
|
|
3924
|
+
/** `microsoft_clarity`, `hubspot`, or the name the user gave a custom server. */
|
|
3925
|
+
key: z9.string(),
|
|
3926
|
+
label: z9.string(),
|
|
3927
|
+
/** `mcp` — tools in the agent's own list. `platform` — signed in, read through the CLI. */
|
|
3928
|
+
kind: z9.enum(["mcp", "platform"]),
|
|
3929
|
+
/** How to actually reach it, in one phrase the agent can act on. */
|
|
3930
|
+
reach: z9.string(),
|
|
3931
|
+
/**
|
|
3932
|
+
* Whether it can be used right now.
|
|
3933
|
+
*
|
|
3934
|
+
* A connection that exists and is expired is worse than one that is absent:
|
|
3935
|
+
* it reads as available and fails at the moment it is needed, which on an
|
|
3936
|
+
* unattended run is a report with a hole in it and no explanation.
|
|
3937
|
+
*/
|
|
3938
|
+
ready: z9.boolean(),
|
|
3939
|
+
/** Why it is not ready, or what it is for. Absent when neither needs saying. */
|
|
3940
|
+
note: z9.string().optional()
|
|
3941
|
+
});
|
|
3923
3942
|
var capabilitiesResponseSchema = z9.object({
|
|
3924
3943
|
ok: z9.literal(true),
|
|
3925
3944
|
data: z9.object({
|
|
3926
|
-
surfaces: z9.array(capabilitySurfaceReportSchema)
|
|
3945
|
+
surfaces: z9.array(capabilitySurfaceReportSchema),
|
|
3946
|
+
/**
|
|
3947
|
+
* Everything else this company can reach. Shared connections only —
|
|
3948
|
+
* a teammate's private per-user connection belongs to whoever started the
|
|
3949
|
+
* session and is visible in the agent's own tool list, not here.
|
|
3950
|
+
*/
|
|
3951
|
+
tools: z9.array(capabilityToolSchema)
|
|
3927
3952
|
})
|
|
3928
3953
|
});
|
|
3929
3954
|
|
|
@@ -3970,6 +3995,8 @@ var chatChangeTypeSchema = z10.enum([
|
|
|
3970
3995
|
// what the edge captures and one held until Publish would not measure the
|
|
3971
3996
|
// campaign it was written for.
|
|
3972
3997
|
"analytics-mapping",
|
|
3998
|
+
// An A/B test between a landing and its alternative. Staged, not immediate.
|
|
3999
|
+
"experiment",
|
|
3973
4000
|
"briefs"
|
|
3974
4001
|
]);
|
|
3975
4002
|
var chatChangeActionSchema = z10.enum(["created", "updated", "deleted"]);
|
|
@@ -12529,6 +12556,20 @@ var analyticsCampaignRowSchema = z24.object({
|
|
|
12529
12556
|
utmSource: z24.string(),
|
|
12530
12557
|
utmMedium: z24.string(),
|
|
12531
12558
|
utmCampaign: z24.string(),
|
|
12559
|
+
/**
|
|
12560
|
+
* The platform a click id proves, or `""` when the visit carried none.
|
|
12561
|
+
*
|
|
12562
|
+
* What separates a campaign the ad breakdown already reports — with its
|
|
12563
|
+
* platform proven and its ad set and ad underneath — from one nothing else
|
|
12564
|
+
* can show: the newsletter, the partner link, the hand-tagged post. The two
|
|
12565
|
+
* are otherwise identical, because `utm_campaign={campaignid}` is the normal
|
|
12566
|
+
* tagging convention and produces the same ids in both places.
|
|
12567
|
+
*
|
|
12568
|
+
* Kept on the row rather than filtered out here: a CLI hint reads an empty
|
|
12569
|
+
* campaign list as "no campaign tagging on any traffic", and dropping the
|
|
12570
|
+
* paid ones would make that fire on a perfectly tagged account.
|
|
12571
|
+
*/
|
|
12572
|
+
clickPlatform: z24.string(),
|
|
12532
12573
|
sessions: z24.number().int().nonnegative(),
|
|
12533
12574
|
conversions: z24.number().int().nonnegative(),
|
|
12534
12575
|
conversionRate: z24.number().min(0).max(1).nullable()
|
|
@@ -13241,7 +13282,8 @@ var analyticsTrackingPlatformSchema = z24.object({
|
|
|
13241
13282
|
/** The pairs to append to the account's tagging, or `""`. */
|
|
13242
13283
|
suffix: z24.string(),
|
|
13243
13284
|
whereItGoes: z24.string(),
|
|
13244
|
-
|
|
13285
|
+
/** Which level to put them at, who can write it, and how an existing value is treated. */
|
|
13286
|
+
fix: z24.string()
|
|
13245
13287
|
});
|
|
13246
13288
|
var analyticsTrackingResponseSchema = z24.object({
|
|
13247
13289
|
ok: z24.literal(true),
|
|
@@ -23296,8 +23338,18 @@ function buildAnalyticsHints(data, platform) {
|
|
|
23296
23338
|
"No campaign tagging on any traffic \u2014 ad clicks cannot be attributed to a campaign until the destination URLs carry utm parameters."
|
|
23297
23339
|
);
|
|
23298
23340
|
}
|
|
23341
|
+
hints.push(...campaignOriginHints(data.topCampaigns));
|
|
23299
23342
|
return hints;
|
|
23300
23343
|
}
|
|
23344
|
+
function campaignOriginHints(rows) {
|
|
23345
|
+
const campaigns = rows ?? [];
|
|
23346
|
+
const fromAds = campaigns.filter((row) => row.clickPlatform !== "");
|
|
23347
|
+
if (fromAds.length === 0) return [];
|
|
23348
|
+
const own = campaigns.length - fromAds.length;
|
|
23349
|
+
return [
|
|
23350
|
+
`${fromAds.length} of these campaigns arrived on an ad click (\`clickPlatform\` is set). \`baker analytics ads --role campaign_id\` MAY report the same campaigns under the platform's own ids \u2014 check before you quote both, or you will count one campaign twice. It may equally report nothing: \`ads\` only reads parameters the account tags separately, and \`utm_campaign\` is reserved and never reaches it, so an account whose only campaign signal is \`utm_campaign\` has its campaigns HERE and nowhere else. Never report "no campaigns" on the strength of an empty \`ads\`. ${own === 0 ? "Every row here came from an ad." : `The other ${own} carry no click id at all \u2014 a newsletter, a partner link, a tagged post \u2014 and only this report can show them.`}`
|
|
23351
|
+
];
|
|
23352
|
+
}
|
|
23301
23353
|
|
|
23302
23354
|
// src/commands/analytics/presets.ts
|
|
23303
23355
|
var ANALYTICS_PRESET_INFO = [
|
|
@@ -24019,7 +24071,7 @@ var trackingCommand = (() => {
|
|
|
24019
24071
|
Read this before auditing an ad account and before answering any "which ad performed best" question. Each dimension comes back in one of four states, and they need different things:
|
|
24020
24072
|
covered \u2014 arriving and understood, nothing to do
|
|
24021
24073
|
unmapped \u2014 the URLs carry it under a name Baker does not read yet. Free to fix, and it repairs the traffic already collected: run the \`mapCommand\` in the response
|
|
24022
|
-
missing \u2014 nothing carries it.
|
|
24074
|
+
missing \u2014 nothing carries it. \`fix\` says which LEVELS that platform accepts tagging at (widest first \u2014 prefer it), which Baker can stage and which the user must do by hand, and how each field treats what is already in it. \`suffix\` is only the MISSING pairs, so read the current value, add them, write the union. This one cannot be filled in later \u2014 a parameter's values are only stored once it starts arriving
|
|
24023
24075
|
unknown \u2014 no visit arrived AND the account could not be read. Not a finding; do not report it as untagged
|
|
24024
24076
|
|
|
24025
24077
|
Baker reads the client's own Google tracking templates and Meta URL parameters, so a platform that has not run yet still gets a real answer.
|
|
@@ -32787,7 +32839,7 @@ registerSchema({
|
|
|
32787
32839
|
}
|
|
32788
32840
|
}
|
|
32789
32841
|
});
|
|
32790
|
-
function capabilityHints(surfaces) {
|
|
32842
|
+
function capabilityHints(surfaces, tools = []) {
|
|
32791
32843
|
const hints = [];
|
|
32792
32844
|
const immediate = surfaces.filter((surface) => surface.writeMode === "applies-at-publish");
|
|
32793
32845
|
if (immediate.length > 0) {
|
|
@@ -32810,6 +32862,18 @@ function capabilityHints(surfaces) {
|
|
|
32810
32862
|
"Naming one surface (`baker capabilities google-ads`) adds `ops` \u2014 the exact fields and accepted values of every change there. Read that instead of guessing a field name."
|
|
32811
32863
|
);
|
|
32812
32864
|
}
|
|
32865
|
+
const usable = tools.filter((tool) => tool.ready);
|
|
32866
|
+
if (usable.length > 0) {
|
|
32867
|
+
hints.push(
|
|
32868
|
+
`ALSO AVAILABLE, and not on any surface above: ${usable.map((tool) => tool.label).join(", ")}. These answer WHY a page behaves as it does, which no surface here can. See \`tools[].reach\` for how to call each one.`
|
|
32869
|
+
);
|
|
32870
|
+
}
|
|
32871
|
+
const broken = tools.filter((tool) => !tool.ready);
|
|
32872
|
+
if (broken.length > 0) {
|
|
32873
|
+
hints.push(
|
|
32874
|
+
`CONNECTED BUT UNUSABLE: ${broken.map((tool) => `${tool.label} \u2014 ${tool.note ?? "not reachable"}`).join(" ")} Tell the user rather than planning around it silently.`
|
|
32875
|
+
);
|
|
32876
|
+
}
|
|
32813
32877
|
return hints;
|
|
32814
32878
|
}
|
|
32815
32879
|
var runCapabilities = defineCommand108({
|
|
@@ -32819,6 +32883,8 @@ var runCapabilities = defineCommand108({
|
|
|
32819
32883
|
|
|
32820
32884
|
Reports, per surface: what is connected and with what access, what a write there does when it lands, the entities that can be changed, and \u2014 the part nothing else tells you \u2014 what cannot be changed and why.
|
|
32821
32885
|
|
|
32886
|
+
Also returns \`tools\`: everything else this company can reach that is not one of those surfaces \u2014 Microsoft Clarity and any other MCP toolkit, custom servers, HubSpot. This is the one call that answers "what do I actually have".
|
|
32887
|
+
|
|
32822
32888
|
Examples:
|
|
32823
32889
|
baker capabilities
|
|
32824
32890
|
baker capabilities google-ads
|
|
@@ -32854,7 +32920,7 @@ Full guide: __tooling__/docs/tools/baker/capabilities.md`
|
|
|
32854
32920
|
body.full = true;
|
|
32855
32921
|
}
|
|
32856
32922
|
const response = await apiPost("/api/capabilities", body);
|
|
32857
|
-
const hints = capabilityHints(response.data.surfaces);
|
|
32923
|
+
const hints = capabilityHints(response.data.surfaces, response.data.tools);
|
|
32858
32924
|
writeJson({
|
|
32859
32925
|
...response,
|
|
32860
32926
|
meta: { count: response.data.surfaces.length },
|
|
@@ -33324,12 +33390,311 @@ Full guide: __tooling__/docs/tools/baker/creatives.md`
|
|
|
33324
33390
|
}
|
|
33325
33391
|
});
|
|
33326
33392
|
|
|
33393
|
+
// src/commands/experiment/index.ts
|
|
33394
|
+
import { defineCommand as defineCommand112 } from "citty";
|
|
33395
|
+
|
|
33396
|
+
// src/commands/experiment/goal.ts
|
|
33397
|
+
function parseEventGoal(argument) {
|
|
33398
|
+
const [name, filter] = argument.split("/");
|
|
33399
|
+
if (!name) return { error: "Name the event: --goal event:request_demo" };
|
|
33400
|
+
if (!filter) return { kind: "custom_event", name };
|
|
33401
|
+
const separator = filter.indexOf("=");
|
|
33402
|
+
if (separator === -1) {
|
|
33403
|
+
return { error: `Write the property as key=value: --goal event:${name}/section=pricing` };
|
|
33404
|
+
}
|
|
33405
|
+
return { kind: "custom_event", name, property: filter.slice(0, separator), value: filter.slice(separator + 1) };
|
|
33406
|
+
}
|
|
33407
|
+
function parseGoal(raw) {
|
|
33408
|
+
if (raw === void 0 || raw === "") return void 0;
|
|
33409
|
+
const separator = raw.indexOf(":");
|
|
33410
|
+
const kind = separator === -1 ? raw : raw.slice(0, separator);
|
|
33411
|
+
const argument = separator === -1 ? "" : raw.slice(separator + 1);
|
|
33412
|
+
if (kind === "leads") return argument ? { kind: "conversion", flowSlug: argument } : { kind: "conversion" };
|
|
33413
|
+
if (kind === "click") return argument ? { kind: "outbound_click", targetHost: argument } : { kind: "outbound_click" };
|
|
33414
|
+
if (kind === "event") return parseEventGoal(argument);
|
|
33415
|
+
return {
|
|
33416
|
+
error: `Unknown goal "${raw}". Use leads, leads:<form>, event:<name>, event:<name>/<key>=<value>, click, or click:<host>`
|
|
33417
|
+
};
|
|
33418
|
+
}
|
|
33419
|
+
|
|
33420
|
+
// src/commands/experiment/hints.ts
|
|
33421
|
+
var RUNNING_HINT = {
|
|
33422
|
+
keep_running: (row) => `${row.experimentId} is not finished \u2014 do not read its numbers as a result, and do not end it hoping for one.${row.earliestDecisionAt ? ` Earliest it could say anything: ${new Date(row.earliestDecisionAt).toISOString().slice(0, 10)}.` : " This page has too little traffic to project a finish date yet."}`,
|
|
33423
|
+
winner: (row) => `${row.experimentId} has a winner. Run \`baker experiment finish --id ${row.experimentId}\` to send all the traffic to it. That only re-routes between two pages already published \u2014 it does not edit either.`,
|
|
33424
|
+
no_difference: (row) => `${row.experimentId} found no difference. Finish it (the page you have stays live) and test a bigger change \u2014 a headline, an offer, the shape of the page, not a button colour.`,
|
|
33425
|
+
stopped_early_harmful: (row) => `${row.experimentId} is doing damage. Finish it now \u2014 traffic goes back to the original page.`,
|
|
33426
|
+
// Unreachable in practice — only `finish --abandon` produces it, and that
|
|
33427
|
+
// leaves the test finished. The Record is exhaustive by type so a verdict
|
|
33428
|
+
// added upstream fails to compile here rather than printing nothing.
|
|
33429
|
+
abandoned: (row) => `${row.experimentId} was stopped before it concluded and found nothing.`,
|
|
33430
|
+
invalid: (row) => `${row.experimentId} cannot be read: ${row.invalidReason === "crossover" ? "too many visitors saw both versions" : "the traffic did not split evenly"}. Finish it and start again rather than reporting anything from it.`
|
|
33431
|
+
};
|
|
33432
|
+
function buildStatusHints(experiments) {
|
|
33433
|
+
const hints = experiments.filter((row) => row.status === "running").map((row) => RUNNING_HINT[row.verdict](row));
|
|
33434
|
+
if (experiments.length === 0) {
|
|
33435
|
+
hints.push(
|
|
33436
|
+
"No tests yet. `baker experiment plan --landing <slug> --variant <slug>` says whether a page has enough traffic for one before you build the alternative."
|
|
33437
|
+
);
|
|
33438
|
+
}
|
|
33439
|
+
return hints;
|
|
33440
|
+
}
|
|
33441
|
+
function asLift(value) {
|
|
33442
|
+
return `+${Math.round(value * 100)}%`;
|
|
33443
|
+
}
|
|
33444
|
+
function windowHint(days, detectable) {
|
|
33445
|
+
if (days === void 0) return null;
|
|
33446
|
+
if (detectable === null || detectable === void 0) {
|
|
33447
|
+
return `In ${days} days this page would not gather enough visitors to settle anything, at any size of change. The constraint is the traffic, not the test.`;
|
|
33448
|
+
}
|
|
33449
|
+
return `In ${days} days this page could only settle a change of ${asLift(detectable)} or more. Design the alternative to be at least that different \u2014 a smaller change needs traffic these ${days} days will not deliver, and the test would end saying nothing.`;
|
|
33450
|
+
}
|
|
33451
|
+
function buildPlanHints(plan, days) {
|
|
33452
|
+
const window2 = windowHint(days, plan.detectableLiftInDays);
|
|
33453
|
+
if (!plan.canRun) {
|
|
33454
|
+
return [
|
|
33455
|
+
plan.reason ?? "This test cannot run on this page.",
|
|
33456
|
+
...window2 ? [window2] : [],
|
|
33457
|
+
"A test that cannot conclude is worse than no test \u2014 it still produces a number, and somebody acts on it."
|
|
33458
|
+
];
|
|
33459
|
+
}
|
|
33460
|
+
const hints = [
|
|
33461
|
+
`This test measures ${plan.goalLabel}. That is fixed when it starts and cannot be changed later.`,
|
|
33462
|
+
// Fires at the exact moment the hypothesis gets invented, whether or not
|
|
33463
|
+
// the agent read the family doc. `plan` says a question CAN be settled here
|
|
33464
|
+
// and says nothing about which question is worth asking — and a well-run
|
|
33465
|
+
// test of a bad idea costs three weeks and returns `no_difference`.
|
|
33466
|
+
"Now decide WHAT to change, from evidence rather than taste. These numbers say which page and which step; they cannot say why. A second opinion answers why \u2014 Microsoft Clarity for what visitors actually do on the page, `baker gsc` for what they searched, `baker ads <platform>` for what the ad promised, `baker ga4` for the client's own measurement. `baker capabilities` lists everything this client has in one call \u2014 the surfaces, and under `tools` everything else that is reachable. Message match \u2014 what the ad or the search promised against what the page opens with \u2014 is the cheapest hypothesis worth testing and is wrong surprisingly often.",
|
|
33467
|
+
// The base always works, so a missing integration is never a reason to
|
|
33468
|
+
// stop. Naming what it would have shown is worth more to the client than
|
|
33469
|
+
// either a silent gap or a run that waited.
|
|
33470
|
+
"If none of that is connected, this page's own drop-off is enough to test on \u2014 say which source you lacked and what it would have told you, then run the test anyway. A test never waits on an integration."
|
|
33471
|
+
];
|
|
33472
|
+
if (plan.estimatedDays !== null && plan.estimatedDays > 60) {
|
|
33473
|
+
hints.push(
|
|
33474
|
+
`At this page's traffic it would take about ${plan.estimatedDays} days. Consider testing a bigger change, which needs less traffic to detect.`
|
|
33475
|
+
);
|
|
33476
|
+
}
|
|
33477
|
+
if (window2) hints.push(window2);
|
|
33478
|
+
return hints;
|
|
33479
|
+
}
|
|
33480
|
+
|
|
33481
|
+
// src/commands/experiment/index.ts
|
|
33482
|
+
var GOAL_ARG = {
|
|
33483
|
+
type: "string",
|
|
33484
|
+
description: "What counts as success, and it is fixed for the life of the test. `leads` (default \u2014 whatever this company already marks as a conversion), `leads:<form>`, `event:<name>` for an event the page declares itself (see `baker analytics events`), `event:<name>/<key>=<value>` to narrow it, `click` or `click:<host>` for leaving the site. Pick the thing the business actually wants; a test that measures the wrong outcome can have the variant win and the revenue fall.",
|
|
33485
|
+
required: false
|
|
33486
|
+
};
|
|
33487
|
+
var LIFT_ARG = {
|
|
33488
|
+
type: "string",
|
|
33489
|
+
description: "The smallest improvement worth detecting, relative \u2014 0.2 is +20% (default). The single most consequential number here: halving it roughly quadruples the traffic needed. Ask for the smallest lift that would actually change what the client does, not the smallest one you would like to see.",
|
|
33490
|
+
required: false
|
|
33491
|
+
};
|
|
33492
|
+
var DAYS_ARG = {
|
|
33493
|
+
type: "string",
|
|
33494
|
+
description: "How many days you have, if that is the constraint. This does NOT shorten the test \u2014 the finish line is a visitor count fixed before it starts \u2014 it answers the other question: what a window that long could settle on this page's traffic. Use it when `plan` refuses and you need to know what WOULD fit.",
|
|
33495
|
+
required: false
|
|
33496
|
+
};
|
|
33497
|
+
function fail5(message) {
|
|
33498
|
+
writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
33499
|
+
process.exit(1);
|
|
33500
|
+
}
|
|
33501
|
+
function reportApiError(error) {
|
|
33502
|
+
if (error instanceof ApiError) {
|
|
33503
|
+
writeJsonEnvelope({ ok: false, error: { code: error.code ?? "ERROR", message: error.message } });
|
|
33504
|
+
process.exit(1);
|
|
33505
|
+
}
|
|
33506
|
+
throw error;
|
|
33507
|
+
}
|
|
33508
|
+
registerSchema({
|
|
33509
|
+
command: "experiment.plan",
|
|
33510
|
+
description: "Whether a page has enough traffic to settle a question, before anything is built",
|
|
33511
|
+
args: {
|
|
33512
|
+
landing: { type: "string", description: "The page under test, by slug", required: true },
|
|
33513
|
+
variant: { type: "string", description: "The alternative page's slug", required: true },
|
|
33514
|
+
goal: GOAL_ARG,
|
|
33515
|
+
lift: LIFT_ARG,
|
|
33516
|
+
days: DAYS_ARG
|
|
33517
|
+
}
|
|
33518
|
+
});
|
|
33519
|
+
var planCommand = defineCommand112({
|
|
33520
|
+
meta: {
|
|
33521
|
+
name: "plan",
|
|
33522
|
+
description: "Start here, BEFORE building the alternative page. Says whether this page gets enough traffic to settle the question, how long it would take, and whether the thing you want to measure has ever happened on it. Most landing pages cannot run most tests \u2014 finding that out now costs one call, and finding it out later costs three weeks and a decision made on noise."
|
|
33523
|
+
},
|
|
33524
|
+
args: {
|
|
33525
|
+
landing: { type: "string", description: "The page under test, by slug", required: true },
|
|
33526
|
+
variant: { type: "string", description: "The alternative page's slug", required: true },
|
|
33527
|
+
goal: GOAL_ARG,
|
|
33528
|
+
lift: LIFT_ARG,
|
|
33529
|
+
days: DAYS_ARG
|
|
33530
|
+
},
|
|
33531
|
+
run: async ({ args }) => {
|
|
33532
|
+
const goal = parseGoal(args.goal ? String(args.goal) : void 0);
|
|
33533
|
+
if (goal && "error" in goal) fail5(goal.error);
|
|
33534
|
+
try {
|
|
33535
|
+
const response = await apiPost("/api/experiments/plan", {
|
|
33536
|
+
landingSlug: String(args.landing),
|
|
33537
|
+
variantSlug: String(args.variant),
|
|
33538
|
+
...goal ? { goal } : {},
|
|
33539
|
+
...args.lift ? { minDetectableRelativeLift: Number(args.lift) } : {},
|
|
33540
|
+
...args.days ? { days: Number(args.days) } : {}
|
|
33541
|
+
});
|
|
33542
|
+
writeJsonEnvelope({
|
|
33543
|
+
ok: true,
|
|
33544
|
+
data: response.data,
|
|
33545
|
+
hints: buildPlanHints(response.data, args.days ? Number(args.days) : void 0)
|
|
33546
|
+
});
|
|
33547
|
+
} catch (error) {
|
|
33548
|
+
reportApiError(error);
|
|
33549
|
+
}
|
|
33550
|
+
}
|
|
33551
|
+
});
|
|
33552
|
+
registerSchema({
|
|
33553
|
+
command: "experiment.start",
|
|
33554
|
+
description: "Stage an A/B test between a page and its alternative",
|
|
33555
|
+
args: {
|
|
33556
|
+
landing: { type: "string", description: "The page under test, by slug", required: true },
|
|
33557
|
+
variant: { type: "string", description: "The alternative page's slug", required: true },
|
|
33558
|
+
hypothesis: { type: "string", description: "What should change and why it should convert better", required: true },
|
|
33559
|
+
goal: GOAL_ARG,
|
|
33560
|
+
lift: LIFT_ARG
|
|
33561
|
+
}
|
|
33562
|
+
});
|
|
33563
|
+
var startCommand = defineCommand112({
|
|
33564
|
+
meta: {
|
|
33565
|
+
name: "start",
|
|
33566
|
+
description: "Stage a test between the page and its alternative. Both are ordinary published pages; visitors are split 50/50 at the edge, so there is no flicker and nothing for an ad blocker to suppress. Nothing goes live until the session is published \u2014 the person publishing is the review of the alternative page. Re-runs `plan` first and refuses on the same grounds."
|
|
33567
|
+
},
|
|
33568
|
+
args: {
|
|
33569
|
+
landing: { type: "string", description: "The page under test, by slug", required: true },
|
|
33570
|
+
variant: { type: "string", description: "The alternative page's slug", required: true },
|
|
33571
|
+
hypothesis: { type: "string", description: "What should change and why it should convert better", required: true },
|
|
33572
|
+
goal: GOAL_ARG,
|
|
33573
|
+
lift: LIFT_ARG
|
|
33574
|
+
},
|
|
33575
|
+
run: async ({ args }) => {
|
|
33576
|
+
const goal = parseGoal(args.goal ? String(args.goal) : void 0);
|
|
33577
|
+
if (goal && "error" in goal) fail5(goal.error);
|
|
33578
|
+
try {
|
|
33579
|
+
const response = await apiPost("/api/experiments/start", {
|
|
33580
|
+
landingSlug: String(args.landing),
|
|
33581
|
+
variantSlug: String(args.variant),
|
|
33582
|
+
hypothesis: String(args.hypothesis),
|
|
33583
|
+
...goal ? { goal } : {},
|
|
33584
|
+
...args.lift ? { minDetectableRelativeLift: Number(args.lift) } : {}
|
|
33585
|
+
});
|
|
33586
|
+
writeJsonEnvelope({
|
|
33587
|
+
ok: true,
|
|
33588
|
+
data: response.data,
|
|
33589
|
+
hints: [
|
|
33590
|
+
"Staged. The split starts when this session is published \u2014 publishing is the review of the alternative page.",
|
|
33591
|
+
"Do not read the numbers before the test says it has finished. A weekly check IS peeking: stopping the first time a probability looks good has several times the false-positive rate that probability implies."
|
|
33592
|
+
]
|
|
33593
|
+
});
|
|
33594
|
+
} catch (error) {
|
|
33595
|
+
reportApiError(error);
|
|
33596
|
+
}
|
|
33597
|
+
}
|
|
33598
|
+
});
|
|
33599
|
+
registerSchema({
|
|
33600
|
+
command: "experiment.status",
|
|
33601
|
+
description: "The verdict on every A/B test, running and finished",
|
|
33602
|
+
args: {
|
|
33603
|
+
id: { type: "string", description: "One test, by its id", required: false },
|
|
33604
|
+
full: { type: "boolean", description: "Include the posteriors behind the verdict", required: false }
|
|
33605
|
+
}
|
|
33606
|
+
});
|
|
33607
|
+
var statusCommand4 = defineCommand112({
|
|
33608
|
+
meta: {
|
|
33609
|
+
name: "status",
|
|
33610
|
+
description: "The verdict on each test. Read `verdict` and nothing else to decide: keep_running | winner | no_difference | invalid | stopped_early_harmful. `summary` is one sentence you can show the client. The numbers under `--full` are for printing, never for deciding \u2014 a test that says keep_running has not finished, however good its numbers look."
|
|
33611
|
+
},
|
|
33612
|
+
args: {
|
|
33613
|
+
id: { type: "string", description: "One test, by its id", required: false },
|
|
33614
|
+
full: { type: "boolean", description: "Include the posteriors behind the verdict", required: false }
|
|
33615
|
+
},
|
|
33616
|
+
run: async ({ args }) => {
|
|
33617
|
+
try {
|
|
33618
|
+
const response = await apiPost("/api/experiments/status", {
|
|
33619
|
+
...args.id ? { experimentId: String(args.id) } : {},
|
|
33620
|
+
...args.full === true ? { full: true } : {}
|
|
33621
|
+
});
|
|
33622
|
+
writeJsonEnvelope({
|
|
33623
|
+
ok: true,
|
|
33624
|
+
data: response.data,
|
|
33625
|
+
hints: buildStatusHints(response.data.experiments)
|
|
33626
|
+
});
|
|
33627
|
+
} catch (error) {
|
|
33628
|
+
reportApiError(error);
|
|
33629
|
+
}
|
|
33630
|
+
}
|
|
33631
|
+
});
|
|
33632
|
+
registerSchema({
|
|
33633
|
+
command: "experiment.finish",
|
|
33634
|
+
description: "End a test and send all its traffic to the surviving page",
|
|
33635
|
+
args: {
|
|
33636
|
+
id: { type: "string", description: "The test, by its id", required: true },
|
|
33637
|
+
abandon: {
|
|
33638
|
+
type: "boolean",
|
|
33639
|
+
description: "Stop the test, keep the original page, and record no result. The only way to end a test that has not concluded \u2014 and it OVERRIDES a verdict if there is one, throwing that finding away. Do not pass it by reflex.",
|
|
33640
|
+
required: false
|
|
33641
|
+
}
|
|
33642
|
+
}
|
|
33643
|
+
});
|
|
33644
|
+
var finishCommand = defineCommand112({
|
|
33645
|
+
meta: {
|
|
33646
|
+
name: "finish",
|
|
33647
|
+
description: "End a test and send all its traffic to whichever page survived. Only a test whose verdict has concluded can be finished with a result \u2014 a `keep_running` test can only be `--abandon`ed, which keeps the original page and records no finding. Promotion is a traffic change over two pages that were both already published and reviewed; it does not edit either page."
|
|
33648
|
+
},
|
|
33649
|
+
args: {
|
|
33650
|
+
id: { type: "string", description: "The test, by its id", required: true },
|
|
33651
|
+
abandon: {
|
|
33652
|
+
type: "boolean",
|
|
33653
|
+
description: "Stop the test, keep the original page, and record no result. The only way to end a test that has not concluded \u2014 and it OVERRIDES a verdict if there is one, throwing that finding away. Do not pass it by reflex.",
|
|
33654
|
+
required: false
|
|
33655
|
+
}
|
|
33656
|
+
},
|
|
33657
|
+
run: async ({ args }) => {
|
|
33658
|
+
try {
|
|
33659
|
+
const response = await apiPost("/api/experiments/finish", {
|
|
33660
|
+
experimentId: String(args.id),
|
|
33661
|
+
...args.abandon === true ? { abandon: true } : {}
|
|
33662
|
+
});
|
|
33663
|
+
writeJsonEnvelope({
|
|
33664
|
+
ok: true,
|
|
33665
|
+
data: response.data,
|
|
33666
|
+
hints: [
|
|
33667
|
+
`Staged. All the traffic goes to the ${response.data.survivor === "variant" ? "alternative" : "original"} page when this session is published.`,
|
|
33668
|
+
...response.data.discardedVerdict ? [
|
|
33669
|
+
`You abandoned a test that HAD concluded (${response.data.discardedVerdict}). The original page keeps the traffic and no result is recorded \u2014 the finding is gone. If that was not what you meant, run this again without --abandon.`
|
|
33670
|
+
] : [],
|
|
33671
|
+
"If the alternative won and you want it to become the page itself, that is an ordinary page edit afterwards \u2014 copy its content over and delete the alternative."
|
|
33672
|
+
]
|
|
33673
|
+
});
|
|
33674
|
+
} catch (error) {
|
|
33675
|
+
reportApiError(error);
|
|
33676
|
+
}
|
|
33677
|
+
}
|
|
33678
|
+
});
|
|
33679
|
+
var experimentCommand = defineCommand112({
|
|
33680
|
+
meta: {
|
|
33681
|
+
name: "experiment",
|
|
33682
|
+
description: "Run an A/B test between a landing page and an alternative version of it, and be told which one is better. Always `plan` first: most pages do not get enough traffic to settle most questions, and a test that cannot conclude still produces a number somebody will act on."
|
|
33683
|
+
},
|
|
33684
|
+
subCommands: {
|
|
33685
|
+
plan: planCommand,
|
|
33686
|
+
start: startCommand,
|
|
33687
|
+
status: statusCommand4,
|
|
33688
|
+
finish: finishCommand
|
|
33689
|
+
}
|
|
33690
|
+
});
|
|
33691
|
+
|
|
33327
33692
|
// src/commands/flows/index.ts
|
|
33328
|
-
import { defineCommand as
|
|
33693
|
+
import { defineCommand as defineCommand117 } from "citty";
|
|
33329
33694
|
|
|
33330
33695
|
// src/commands/flows/add.ts
|
|
33331
33696
|
import { randomUUID } from "crypto";
|
|
33332
|
-
import { defineCommand as
|
|
33697
|
+
import { defineCommand as defineCommand113 } from "citty";
|
|
33333
33698
|
|
|
33334
33699
|
// src/commands/flows/shared.ts
|
|
33335
33700
|
import { existsSync as existsSync5, readdirSync as readdirSync2, readFileSync as readFileSync9, writeFileSync as writeFileSync3 } from "fs";
|
|
@@ -33539,7 +33904,7 @@ registerSchema({
|
|
|
33539
33904
|
parent: { type: "string", description: "Parent node id. Omit to append to the root's children.", required: false }
|
|
33540
33905
|
}
|
|
33541
33906
|
});
|
|
33542
|
-
var addNodeCommand =
|
|
33907
|
+
var addNodeCommand = defineCommand113({
|
|
33543
33908
|
meta: {
|
|
33544
33909
|
name: "add-node",
|
|
33545
33910
|
description: 'Add a step to a form, with the skeleton its type requires. Example: baker flows add-node contact --type customForm --name "Contact Info"'
|
|
@@ -33635,7 +34000,7 @@ registerSchema({
|
|
|
33635
34000
|
}
|
|
33636
34001
|
}
|
|
33637
34002
|
});
|
|
33638
|
-
var addSideEffectCommand =
|
|
34003
|
+
var addSideEffectCommand = defineCommand113({
|
|
33639
34004
|
meta: {
|
|
33640
34005
|
name: "add-side-effect",
|
|
33641
34006
|
description: "Add a side effect to a step, with the skeleton its type requires. Example: baker flows add-side-effect contact --node <id> --type googleSpreadsheet"
|
|
@@ -33717,7 +34082,7 @@ var addSideEffectCommand = defineCommand112({
|
|
|
33717
34082
|
|
|
33718
34083
|
// src/commands/flows/map.ts
|
|
33719
34084
|
import { readFileSync as readFileSync11 } from "fs";
|
|
33720
|
-
import { defineCommand as
|
|
34085
|
+
import { defineCommand as defineCommand114 } from "citty";
|
|
33721
34086
|
|
|
33722
34087
|
// src/commands/flows/value-expression.ts
|
|
33723
34088
|
import { existsSync as existsSync6, readFileSync as readFileSync10 } from "fs";
|
|
@@ -34490,7 +34855,7 @@ async function mapOptions(args, fromFile, into) {
|
|
|
34490
34855
|
destinationFields: hubspotForm ? await hubspotFieldCatalog(hubspotForm) : void 0
|
|
34491
34856
|
};
|
|
34492
34857
|
}
|
|
34493
|
-
var mapCommand2 =
|
|
34858
|
+
var mapCommand2 = defineCommand114({
|
|
34494
34859
|
meta: {
|
|
34495
34860
|
name: "map",
|
|
34496
34861
|
description: "Map form fields onto any value a side effect sends \u2014 never hand-write a mapping. Start here: baker flows map contact --from map.json --write"
|
|
@@ -34588,7 +34953,7 @@ var mapCommand2 = defineCommand113({
|
|
|
34588
34953
|
});
|
|
34589
34954
|
|
|
34590
34955
|
// src/commands/flows/normalize.ts
|
|
34591
|
-
import { defineCommand as
|
|
34956
|
+
import { defineCommand as defineCommand115 } from "citty";
|
|
34592
34957
|
var OPTIONAL_STRINGS = ["oauthProviderId"];
|
|
34593
34958
|
var ARRAY_FIELDS = [
|
|
34594
34959
|
"fieldMapping",
|
|
@@ -34657,7 +35022,7 @@ registerSchema({
|
|
|
34657
35022
|
}
|
|
34658
35023
|
}
|
|
34659
35024
|
});
|
|
34660
|
-
var normalizeCommand =
|
|
35025
|
+
var normalizeCommand = defineCommand115({
|
|
34661
35026
|
meta: {
|
|
34662
35027
|
name: "normalize",
|
|
34663
35028
|
description: "Repair the shapes a form file is allowed to get slightly wrong. Example: baker flows normalize contact --write"
|
|
@@ -34688,7 +35053,7 @@ var normalizeCommand = defineCommand114({
|
|
|
34688
35053
|
});
|
|
34689
35054
|
|
|
34690
35055
|
// src/commands/flows/schema.ts
|
|
34691
|
-
import { defineCommand as
|
|
35056
|
+
import { defineCommand as defineCommand116 } from "citty";
|
|
34692
35057
|
registerSchema({
|
|
34693
35058
|
command: "flows.schema",
|
|
34694
35059
|
description: "The shape of one node or side-effect type: a pasteable skeleton, who fills each part, and the reference file with the craft. Start here before authoring anything in a form's _data.json.",
|
|
@@ -34713,7 +35078,7 @@ function triggerHints(triggers) {
|
|
|
34713
35078
|
`A side effect on this step carries \`triggerId: "${triggers.completion}"\`, and \`baker flows add-side-effect\` writes it for you. The trigger belongs to the STEP, not to the side-effect type: one that does not match is valid, ships, and never runs.` + (others.length > 0 ? ` Other moments this step raises: ${others.join(", ")}.` : "")
|
|
34714
35079
|
];
|
|
34715
35080
|
}
|
|
34716
|
-
var schemaCommand =
|
|
35081
|
+
var schemaCommand = defineCommand116({
|
|
34717
35082
|
meta: {
|
|
34718
35083
|
name: "schema",
|
|
34719
35084
|
description: "Show a node or side-effect type's shape. Start here: baker flows schema node customForm \xB7 baker flows schema side-effect googleSpreadsheet \xB7 baker flows schema (lists both)"
|
|
@@ -34847,7 +35212,7 @@ function displayName(slug) {
|
|
|
34847
35212
|
const name = tree.displayName;
|
|
34848
35213
|
return typeof name === "string" && name.trim() ? name.trim() : slug;
|
|
34849
35214
|
}
|
|
34850
|
-
var listCommand12 =
|
|
35215
|
+
var listCommand12 = defineCommand117({
|
|
34851
35216
|
meta: {
|
|
34852
35217
|
name: "list",
|
|
34853
35218
|
description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
|
|
@@ -34868,7 +35233,7 @@ var listCommand12 = defineCommand116({
|
|
|
34868
35233
|
});
|
|
34869
35234
|
}
|
|
34870
35235
|
});
|
|
34871
|
-
var showCommand3 =
|
|
35236
|
+
var showCommand3 = defineCommand117({
|
|
34872
35237
|
meta: {
|
|
34873
35238
|
name: "show",
|
|
34874
35239
|
description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
|
|
@@ -34896,7 +35261,7 @@ var showCommand3 = defineCommand116({
|
|
|
34896
35261
|
});
|
|
34897
35262
|
}
|
|
34898
35263
|
});
|
|
34899
|
-
var flowsCommand =
|
|
35264
|
+
var flowsCommand = defineCommand117({
|
|
34900
35265
|
meta: {
|
|
34901
35266
|
name: "flows",
|
|
34902
35267
|
description: `Read and shape this workspace's Forms (flows).
|
|
@@ -34930,10 +35295,10 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
|
34930
35295
|
});
|
|
34931
35296
|
|
|
34932
35297
|
// src/commands/ga4/index.ts
|
|
34933
|
-
import { defineCommand as
|
|
35298
|
+
import { defineCommand as defineCommand124 } from "citty";
|
|
34934
35299
|
|
|
34935
35300
|
// src/commands/ga4/audit.ts
|
|
34936
|
-
import { defineCommand as
|
|
35301
|
+
import { defineCommand as defineCommand118 } from "citty";
|
|
34937
35302
|
|
|
34938
35303
|
// src/commands/ga4/resolve.ts
|
|
34939
35304
|
async function fetchProperties(useCache = true) {
|
|
@@ -34999,7 +35364,7 @@ registerSchema({
|
|
|
34999
35364
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
35000
35365
|
}
|
|
35001
35366
|
});
|
|
35002
|
-
var auditCommand2 =
|
|
35367
|
+
var auditCommand2 = defineCommand118({
|
|
35003
35368
|
meta: {
|
|
35004
35369
|
name: "audit",
|
|
35005
35370
|
description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
|
|
@@ -35054,7 +35419,7 @@ Examples:
|
|
|
35054
35419
|
});
|
|
35055
35420
|
|
|
35056
35421
|
// src/commands/ga4/config.ts
|
|
35057
|
-
import { defineCommand as
|
|
35422
|
+
import { defineCommand as defineCommand119 } from "citty";
|
|
35058
35423
|
|
|
35059
35424
|
// src/commands/ga4/shared.ts
|
|
35060
35425
|
import { readFileSync as readFileSync12 } from "fs";
|
|
@@ -35250,7 +35615,7 @@ function configHints(config) {
|
|
|
35250
35615
|
}
|
|
35251
35616
|
return hints;
|
|
35252
35617
|
}
|
|
35253
|
-
var configCommand =
|
|
35618
|
+
var configCommand = defineCommand119({
|
|
35254
35619
|
meta: {
|
|
35255
35620
|
name: "config",
|
|
35256
35621
|
description: `Read how the property is configured to measure \u2014 key events, custom definitions, custom events, retention
|
|
@@ -35282,7 +35647,7 @@ Examples:
|
|
|
35282
35647
|
});
|
|
35283
35648
|
|
|
35284
35649
|
// src/commands/ga4/draft.ts
|
|
35285
|
-
import { defineCommand as
|
|
35650
|
+
import { defineCommand as defineCommand120 } from "citty";
|
|
35286
35651
|
registerSchema({
|
|
35287
35652
|
command: "ga4.draft",
|
|
35288
35653
|
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.",
|
|
@@ -35291,13 +35656,13 @@ registerSchema({
|
|
|
35291
35656
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
35292
35657
|
}
|
|
35293
35658
|
});
|
|
35294
|
-
var draftCommand3 =
|
|
35659
|
+
var draftCommand3 = defineCommand120({
|
|
35295
35660
|
meta: {
|
|
35296
35661
|
name: "draft",
|
|
35297
35662
|
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."
|
|
35298
35663
|
},
|
|
35299
35664
|
subCommands: {
|
|
35300
|
-
list:
|
|
35665
|
+
list: defineCommand120({
|
|
35301
35666
|
meta: { name: "list", description: "Review everything staged on this chat (--json for the raw envelope)" },
|
|
35302
35667
|
args: {
|
|
35303
35668
|
json: { type: "boolean", description: "Print the raw JSON envelope", required: false },
|
|
@@ -35307,7 +35672,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35307
35672
|
await draftList(args.json === true, args.chat);
|
|
35308
35673
|
}
|
|
35309
35674
|
}),
|
|
35310
|
-
show:
|
|
35675
|
+
show: defineCommand120({
|
|
35311
35676
|
meta: {
|
|
35312
35677
|
name: "show",
|
|
35313
35678
|
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)."
|
|
@@ -35324,7 +35689,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35324
35689
|
);
|
|
35325
35690
|
}
|
|
35326
35691
|
}),
|
|
35327
|
-
amend:
|
|
35692
|
+
amend: defineCommand120({
|
|
35328
35693
|
meta: {
|
|
35329
35694
|
name: "amend",
|
|
35330
35695
|
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."
|
|
@@ -35341,7 +35706,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35341
35706
|
});
|
|
35342
35707
|
}
|
|
35343
35708
|
}),
|
|
35344
|
-
remove:
|
|
35709
|
+
remove: defineCommand120({
|
|
35345
35710
|
meta: { name: "remove", description: "Remove one staged change" },
|
|
35346
35711
|
args: { ref: { type: "positional", description: "Staged ref or target id", required: false } },
|
|
35347
35712
|
run: async ({ args }) => {
|
|
@@ -35350,7 +35715,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35350
35715
|
});
|
|
35351
35716
|
}
|
|
35352
35717
|
}),
|
|
35353
|
-
clear:
|
|
35718
|
+
clear: defineCommand120({
|
|
35354
35719
|
meta: { name: "clear", description: "Discard all Google Analytics changes staged on this chat" },
|
|
35355
35720
|
run: async () => {
|
|
35356
35721
|
await draftAction2("/api/ga4/draft/clear", {});
|
|
@@ -35360,7 +35725,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35360
35725
|
});
|
|
35361
35726
|
|
|
35362
35727
|
// src/commands/ga4/properties.ts
|
|
35363
|
-
import { defineCommand as
|
|
35728
|
+
import { defineCommand as defineCommand121 } from "citty";
|
|
35364
35729
|
registerSchema({
|
|
35365
35730
|
command: "ga4.properties",
|
|
35366
35731
|
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.",
|
|
@@ -35376,7 +35741,7 @@ function propertyHints(properties) {
|
|
|
35376
35741
|
resources: properties.map((property) => ({ id: property.externalId, label: property.name }))
|
|
35377
35742
|
});
|
|
35378
35743
|
}
|
|
35379
|
-
var propertiesCommand =
|
|
35744
|
+
var propertiesCommand = defineCommand121({
|
|
35380
35745
|
meta: {
|
|
35381
35746
|
name: "properties",
|
|
35382
35747
|
description: `List accessible GA4 properties.
|
|
@@ -35426,7 +35791,7 @@ Examples:
|
|
|
35426
35791
|
// src/commands/ga4/query.ts
|
|
35427
35792
|
import { appendFileSync as appendFileSync2, existsSync as existsSync7, readFileSync as readFileSync13, writeFileSync as writeFileSync4 } from "fs";
|
|
35428
35793
|
import { resolve as resolve2 } from "path";
|
|
35429
|
-
import { defineCommand as
|
|
35794
|
+
import { defineCommand as defineCommand122 } from "citty";
|
|
35430
35795
|
|
|
35431
35796
|
// src/commands/ga4/presets.ts
|
|
35432
35797
|
var GA4_PRESETS = [
|
|
@@ -35561,7 +35926,7 @@ function handleError3(err) {
|
|
|
35561
35926
|
});
|
|
35562
35927
|
process.exit(1);
|
|
35563
35928
|
}
|
|
35564
|
-
var queryCommand2 =
|
|
35929
|
+
var queryCommand2 = defineCommand122({
|
|
35565
35930
|
meta: {
|
|
35566
35931
|
name: "query",
|
|
35567
35932
|
description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
|
|
@@ -35632,7 +35997,7 @@ Free-form (escape hatch):
|
|
|
35632
35997
|
});
|
|
35633
35998
|
|
|
35634
35999
|
// src/commands/ga4/write-commands.ts
|
|
35635
|
-
import { defineCommand as
|
|
36000
|
+
import { defineCommand as defineCommand123 } from "citty";
|
|
35636
36001
|
var PROPERTY_ARG_DESCRIPTION = "GA4 property id (optional only when one property is connected \u2014 run `baker ga4 properties`)";
|
|
35637
36002
|
var propertyArg = { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false };
|
|
35638
36003
|
function createJsonDescription(noun) {
|
|
@@ -35650,7 +36015,7 @@ registerSchema({
|
|
|
35650
36015
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
35651
36016
|
}
|
|
35652
36017
|
});
|
|
35653
|
-
var keyEventCommand =
|
|
36018
|
+
var keyEventCommand = defineCommand123({
|
|
35654
36019
|
meta: {
|
|
35655
36020
|
name: "key-event",
|
|
35656
36021
|
description: `Stage key-event (conversion) changes
|
|
@@ -35663,7 +36028,7 @@ Examples:
|
|
|
35663
36028
|
baker ga4 key-event delete 4185`
|
|
35664
36029
|
},
|
|
35665
36030
|
subCommands: {
|
|
35666
|
-
create:
|
|
36031
|
+
create: defineCommand123({
|
|
35667
36032
|
meta: {
|
|
35668
36033
|
name: "create",
|
|
35669
36034
|
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."
|
|
@@ -35684,7 +36049,7 @@ Examples:
|
|
|
35684
36049
|
);
|
|
35685
36050
|
}
|
|
35686
36051
|
}),
|
|
35687
|
-
update:
|
|
36052
|
+
update: defineCommand123({
|
|
35688
36053
|
meta: {
|
|
35689
36054
|
name: "update",
|
|
35690
36055
|
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."
|
|
@@ -35704,7 +36069,7 @@ Examples:
|
|
|
35704
36069
|
});
|
|
35705
36070
|
}
|
|
35706
36071
|
}),
|
|
35707
|
-
delete:
|
|
36072
|
+
delete: defineCommand123({
|
|
35708
36073
|
meta: {
|
|
35709
36074
|
name: "delete",
|
|
35710
36075
|
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."
|
|
@@ -35752,7 +36117,7 @@ for (const { kind, noun, createHint } of DEFINITIONS) {
|
|
|
35752
36117
|
}
|
|
35753
36118
|
function definitionCommand(definition) {
|
|
35754
36119
|
const { command, kind, noun, example } = definition;
|
|
35755
|
-
return
|
|
36120
|
+
return defineCommand123({
|
|
35756
36121
|
meta: {
|
|
35757
36122
|
name: command,
|
|
35758
36123
|
description: `Stage ${noun} changes
|
|
@@ -35764,7 +36129,7 @@ Examples:
|
|
|
35764
36129
|
baker ga4 ${command} archive 12`
|
|
35765
36130
|
},
|
|
35766
36131
|
subCommands: {
|
|
35767
|
-
create:
|
|
36132
|
+
create: defineCommand123({
|
|
35768
36133
|
meta: { name: "create", description: `Stage a new ${noun} (or a JSON array of them, staged together)` },
|
|
35769
36134
|
args: {
|
|
35770
36135
|
json: { type: "string", description: createJsonDescription(noun), required: false },
|
|
@@ -35782,7 +36147,7 @@ Examples:
|
|
|
35782
36147
|
);
|
|
35783
36148
|
}
|
|
35784
36149
|
}),
|
|
35785
|
-
update:
|
|
36150
|
+
update: defineCommand123({
|
|
35786
36151
|
meta: {
|
|
35787
36152
|
name: "update",
|
|
35788
36153
|
description: `Stage a change to an existing ${noun} (pass its id). The parameter name and scope cannot change \u2014 archive and recreate for that.`
|
|
@@ -35802,7 +36167,7 @@ Examples:
|
|
|
35802
36167
|
});
|
|
35803
36168
|
}
|
|
35804
36169
|
}),
|
|
35805
|
-
archive:
|
|
36170
|
+
archive: defineCommand123({
|
|
35806
36171
|
meta: {
|
|
35807
36172
|
name: "archive",
|
|
35808
36173
|
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.`
|
|
@@ -35847,7 +36212,7 @@ var dataStreamArg = {
|
|
|
35847
36212
|
function withStream(args) {
|
|
35848
36213
|
return typeof args["data-stream"] === "string" ? { dataStream: args["data-stream"] } : {};
|
|
35849
36214
|
}
|
|
35850
|
-
var customEventCommand =
|
|
36215
|
+
var customEventCommand = defineCommand123({
|
|
35851
36216
|
meta: {
|
|
35852
36217
|
name: "custom-event",
|
|
35853
36218
|
description: `Stage custom events \u2014 new events built from events the site already sends
|
|
@@ -35858,7 +36223,7 @@ Examples:
|
|
|
35858
36223
|
baker ga4 custom-event delete 7`
|
|
35859
36224
|
},
|
|
35860
36225
|
subCommands: {
|
|
35861
|
-
create:
|
|
36226
|
+
create: defineCommand123({
|
|
35862
36227
|
meta: {
|
|
35863
36228
|
name: "create",
|
|
35864
36229
|
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."
|
|
@@ -35881,7 +36246,7 @@ Examples:
|
|
|
35881
36246
|
);
|
|
35882
36247
|
}
|
|
35883
36248
|
}),
|
|
35884
|
-
update:
|
|
36249
|
+
update: defineCommand123({
|
|
35885
36250
|
meta: { name: "update", description: "Stage a change to an existing custom event (pass its id)" },
|
|
35886
36251
|
args: {
|
|
35887
36252
|
id: { type: "positional", description: "Custom event rule id", required: false },
|
|
@@ -35900,7 +36265,7 @@ Examples:
|
|
|
35900
36265
|
});
|
|
35901
36266
|
}
|
|
35902
36267
|
}),
|
|
35903
|
-
delete:
|
|
36268
|
+
delete: defineCommand123({
|
|
35904
36269
|
meta: {
|
|
35905
36270
|
name: "delete",
|
|
35906
36271
|
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."
|
|
@@ -35955,7 +36320,7 @@ function booleanArg(input, flag) {
|
|
|
35955
36320
|
if (input === "false") return false;
|
|
35956
36321
|
return failValidation3(`--${flag} must be true or false`);
|
|
35957
36322
|
}
|
|
35958
|
-
var dataRetentionCommand =
|
|
36323
|
+
var dataRetentionCommand = defineCommand123({
|
|
35959
36324
|
meta: {
|
|
35960
36325
|
name: "data-retention",
|
|
35961
36326
|
description: `Stage a change to how long Google Analytics keeps data
|
|
@@ -35965,7 +36330,7 @@ Examples:
|
|
|
35965
36330
|
baker ga4 data-retention set --event-data 14 --user-data 14 --reset-on-activity true`
|
|
35966
36331
|
},
|
|
35967
36332
|
subCommands: {
|
|
35968
|
-
set:
|
|
36333
|
+
set: defineCommand123({
|
|
35969
36334
|
meta: { name: "set", description: "Stage the retention window (months)" },
|
|
35970
36335
|
args: {
|
|
35971
36336
|
"event-data": { type: "string", description: "2, 14, 26, 38 or 50", required: false },
|
|
@@ -36001,7 +36366,7 @@ registerSchema({
|
|
|
36001
36366
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
36002
36367
|
}
|
|
36003
36368
|
});
|
|
36004
|
-
var audienceCommand =
|
|
36369
|
+
var audienceCommand = defineCommand123({
|
|
36005
36370
|
meta: {
|
|
36006
36371
|
name: "audience",
|
|
36007
36372
|
description: `Stage audience changes (saved groups of users, for retargeting and analysis)
|
|
@@ -36033,7 +36398,7 @@ Examples:
|
|
|
36033
36398
|
baker ga4 audience archive 8813`
|
|
36034
36399
|
},
|
|
36035
36400
|
subCommands: {
|
|
36036
|
-
create:
|
|
36401
|
+
create: defineCommand123({
|
|
36037
36402
|
meta: { name: "create", description: createJsonDescription("audience") },
|
|
36038
36403
|
args: {
|
|
36039
36404
|
json: { type: "string", description: createJsonDescription("audience"), required: false },
|
|
@@ -36051,7 +36416,7 @@ Examples:
|
|
|
36051
36416
|
);
|
|
36052
36417
|
}
|
|
36053
36418
|
}),
|
|
36054
|
-
update:
|
|
36419
|
+
update: defineCommand123({
|
|
36055
36420
|
meta: {
|
|
36056
36421
|
name: "update",
|
|
36057
36422
|
description: "Stage a new name or description (pass the audience id). Who is in it cannot be changed."
|
|
@@ -36072,7 +36437,7 @@ Examples:
|
|
|
36072
36437
|
});
|
|
36073
36438
|
}
|
|
36074
36439
|
}),
|
|
36075
|
-
archive:
|
|
36440
|
+
archive: defineCommand123({
|
|
36076
36441
|
meta: {
|
|
36077
36442
|
name: "archive",
|
|
36078
36443
|
description: "Stage retiring an audience. Cannot be undone \u2014 the users it gathered do not come back."
|
|
@@ -36101,7 +36466,7 @@ registerSchema({
|
|
|
36101
36466
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
36102
36467
|
}
|
|
36103
36468
|
});
|
|
36104
|
-
var propertyCommand =
|
|
36469
|
+
var propertyCommand = defineCommand123({
|
|
36105
36470
|
meta: {
|
|
36106
36471
|
name: "property",
|
|
36107
36472
|
description: `Stage a change to the property's own settings
|
|
@@ -36111,7 +36476,7 @@ Examples:
|
|
|
36111
36476
|
baker ga4 property set --name "Acme \u2014 Web" --industry REAL_ESTATE`
|
|
36112
36477
|
},
|
|
36113
36478
|
subCommands: {
|
|
36114
|
-
set:
|
|
36479
|
+
set: defineCommand123({
|
|
36115
36480
|
meta: { name: "set", description: "Stage the property name and/or industry category" },
|
|
36116
36481
|
args: {
|
|
36117
36482
|
name: { type: "string", description: "New property display name", required: false },
|
|
@@ -36151,7 +36516,7 @@ registerSchema({
|
|
|
36151
36516
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
36152
36517
|
}
|
|
36153
36518
|
});
|
|
36154
|
-
var adsLinkCommand =
|
|
36519
|
+
var adsLinkCommand = defineCommand123({
|
|
36155
36520
|
meta: {
|
|
36156
36521
|
name: "ads-link",
|
|
36157
36522
|
description: `Stage linking this property to a Google Ads account
|
|
@@ -36166,7 +36531,7 @@ Examples:
|
|
|
36166
36531
|
baker ga4 ads-link delete L1234`
|
|
36167
36532
|
},
|
|
36168
36533
|
subCommands: {
|
|
36169
|
-
create:
|
|
36534
|
+
create: defineCommand123({
|
|
36170
36535
|
meta: { name: "create", description: "Stage linking the property to a Google Ads account" },
|
|
36171
36536
|
args: {
|
|
36172
36537
|
"customer-id": { type: "string", description: "Google Ads customer id (123-456-7890)", required: false },
|
|
@@ -36185,7 +36550,7 @@ Examples:
|
|
|
36185
36550
|
await stageOp3({ kind: "ga4.googleAdsLink.create", payload, ...withProperty(args) });
|
|
36186
36551
|
}
|
|
36187
36552
|
}),
|
|
36188
|
-
update:
|
|
36553
|
+
update: defineCommand123({
|
|
36189
36554
|
meta: {
|
|
36190
36555
|
name: "update",
|
|
36191
36556
|
description: "Stage the ads-personalisation setting on an existing link (pass its id)"
|
|
@@ -36207,7 +36572,7 @@ Examples:
|
|
|
36207
36572
|
});
|
|
36208
36573
|
}
|
|
36209
36574
|
}),
|
|
36210
|
-
delete:
|
|
36575
|
+
delete: defineCommand123({
|
|
36211
36576
|
meta: {
|
|
36212
36577
|
name: "delete",
|
|
36213
36578
|
description: "Stage unlinking. Stops conversion imports and strands every audience on this property."
|
|
@@ -36258,7 +36623,7 @@ var MEASUREMENT_FLAGS = {
|
|
|
36258
36623
|
"page-changes": "pageChangesEnabled",
|
|
36259
36624
|
"form-interactions": "formInteractionsEnabled"
|
|
36260
36625
|
};
|
|
36261
|
-
var enhancedMeasurementCommand =
|
|
36626
|
+
var enhancedMeasurementCommand = defineCommand123({
|
|
36262
36627
|
meta: {
|
|
36263
36628
|
name: "enhanced-measurement",
|
|
36264
36629
|
description: `Stage the automatic events GA4 collects on a website stream
|
|
@@ -36272,7 +36637,7 @@ Examples:
|
|
|
36272
36637
|
baker ga4 enhanced-measurement set --video false`
|
|
36273
36638
|
},
|
|
36274
36639
|
subCommands: {
|
|
36275
|
-
set:
|
|
36640
|
+
set: defineCommand123({
|
|
36276
36641
|
meta: { name: "set", description: "Stage which automatic events the website stream collects" },
|
|
36277
36642
|
args: {
|
|
36278
36643
|
scrolls: { type: "string", description: "true|false", required: false },
|
|
@@ -36315,7 +36680,7 @@ Examples:
|
|
|
36315
36680
|
});
|
|
36316
36681
|
|
|
36317
36682
|
// src/commands/ga4/index.ts
|
|
36318
|
-
var ga4Command =
|
|
36683
|
+
var ga4Command = defineCommand124({
|
|
36319
36684
|
meta: {
|
|
36320
36685
|
name: "ga4",
|
|
36321
36686
|
description: `Google Analytics 4. Report on a property, audit its config, and change what it measures.
|
|
@@ -36364,12 +36729,12 @@ Full guide: __tooling__/docs/tools/baker/ga4.md`
|
|
|
36364
36729
|
});
|
|
36365
36730
|
|
|
36366
36731
|
// src/commands/gsc/index.ts
|
|
36367
|
-
import { defineCommand as
|
|
36732
|
+
import { defineCommand as defineCommand128 } from "citty";
|
|
36368
36733
|
|
|
36369
36734
|
// src/commands/gsc/query.ts
|
|
36370
36735
|
import { appendFileSync as appendFileSync3, existsSync as existsSync8, readFileSync as readFileSync14, writeFileSync as writeFileSync5 } from "fs";
|
|
36371
36736
|
import { resolve as resolve3 } from "path";
|
|
36372
|
-
import { defineCommand as
|
|
36737
|
+
import { defineCommand as defineCommand125 } from "citty";
|
|
36373
36738
|
|
|
36374
36739
|
// src/commands/gsc/presets.ts
|
|
36375
36740
|
var GSC_PRESETS = [
|
|
@@ -36563,7 +36928,7 @@ function handleError4(err) {
|
|
|
36563
36928
|
});
|
|
36564
36929
|
process.exit(1);
|
|
36565
36930
|
}
|
|
36566
|
-
var queryCommand3 =
|
|
36931
|
+
var queryCommand3 = defineCommand125({
|
|
36567
36932
|
meta: {
|
|
36568
36933
|
name: "query",
|
|
36569
36934
|
description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
|
|
@@ -36641,7 +37006,7 @@ Free-form (escape hatch):
|
|
|
36641
37006
|
});
|
|
36642
37007
|
|
|
36643
37008
|
// src/commands/gsc/sitemaps.ts
|
|
36644
|
-
import { defineCommand as
|
|
37009
|
+
import { defineCommand as defineCommand126 } from "citty";
|
|
36645
37010
|
registerSchema({
|
|
36646
37011
|
command: "gsc.sitemaps",
|
|
36647
37012
|
description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
|
|
@@ -36650,7 +37015,7 @@ registerSchema({
|
|
|
36650
37015
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
36651
37016
|
}
|
|
36652
37017
|
});
|
|
36653
|
-
var sitemapsCommand =
|
|
37018
|
+
var sitemapsCommand = defineCommand126({
|
|
36654
37019
|
meta: {
|
|
36655
37020
|
name: "sitemaps",
|
|
36656
37021
|
description: `List sitemaps for a site. Check health and errors.
|
|
@@ -36703,7 +37068,7 @@ Examples:
|
|
|
36703
37068
|
});
|
|
36704
37069
|
|
|
36705
37070
|
// src/commands/gsc/sites.ts
|
|
36706
|
-
import { defineCommand as
|
|
37071
|
+
import { defineCommand as defineCommand127 } from "citty";
|
|
36707
37072
|
registerSchema({
|
|
36708
37073
|
command: "gsc.sites",
|
|
36709
37074
|
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.",
|
|
@@ -36719,7 +37084,7 @@ function siteHints(sites) {
|
|
|
36719
37084
|
resources: sites.map((site) => ({ id: site.siteUrl, label: site.permissionLevel }))
|
|
36720
37085
|
});
|
|
36721
37086
|
}
|
|
36722
|
-
var sitesCommand =
|
|
37087
|
+
var sitesCommand = defineCommand127({
|
|
36723
37088
|
meta: {
|
|
36724
37089
|
name: "sites",
|
|
36725
37090
|
description: `List verified Search Console sites.
|
|
@@ -36767,7 +37132,7 @@ Examples:
|
|
|
36767
37132
|
});
|
|
36768
37133
|
|
|
36769
37134
|
// src/commands/gsc/index.ts
|
|
36770
|
-
var gscCommand =
|
|
37135
|
+
var gscCommand = defineCommand128({
|
|
36771
37136
|
meta: {
|
|
36772
37137
|
name: "gsc",
|
|
36773
37138
|
description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
|
|
@@ -36791,7 +37156,7 @@ Full guide: __tooling__/docs/tools/baker/gsc.md`
|
|
|
36791
37156
|
});
|
|
36792
37157
|
|
|
36793
37158
|
// src/commands/history/index.ts
|
|
36794
|
-
import { defineCommand as
|
|
37159
|
+
import { defineCommand as defineCommand129 } from "citty";
|
|
36795
37160
|
registerSchema({
|
|
36796
37161
|
command: "history.list",
|
|
36797
37162
|
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.",
|
|
@@ -36846,7 +37211,7 @@ function parseBoundedInt2(raw, name, min, max) {
|
|
|
36846
37211
|
}
|
|
36847
37212
|
return value;
|
|
36848
37213
|
}
|
|
36849
|
-
var listCommand13 =
|
|
37214
|
+
var listCommand13 = defineCommand129({
|
|
36850
37215
|
meta: {
|
|
36851
37216
|
name: "list",
|
|
36852
37217
|
description: "List recent account changes (unified audit log), newest first."
|
|
@@ -36892,7 +37257,7 @@ var listCommand13 = defineCommand128({
|
|
|
36892
37257
|
}
|
|
36893
37258
|
}
|
|
36894
37259
|
});
|
|
36895
|
-
var historyCommand =
|
|
37260
|
+
var historyCommand = defineCommand129({
|
|
36896
37261
|
meta: {
|
|
36897
37262
|
name: "history",
|
|
36898
37263
|
description: `Unified account history (audit log): what changed, who did it, and when.
|
|
@@ -36902,7 +37267,7 @@ Full guide: __tooling__/docs/tools/baker/history.md`
|
|
|
36902
37267
|
});
|
|
36903
37268
|
|
|
36904
37269
|
// src/commands/hubspot/index.ts
|
|
36905
|
-
import { defineCommand as
|
|
37270
|
+
import { defineCommand as defineCommand130 } from "citty";
|
|
36906
37271
|
var EMBED_TYPES = ["legacy", "v4", "unknown"];
|
|
36907
37272
|
function failNotConnected(err) {
|
|
36908
37273
|
if (err instanceof ApiError && err.code === "FORBIDDEN" && err.message.includes(HUBSPOT_MISSING_GRANT_MARKER)) {
|
|
@@ -37056,7 +37421,7 @@ registerSchema({
|
|
|
37056
37421
|
}
|
|
37057
37422
|
}
|
|
37058
37423
|
});
|
|
37059
|
-
var formsListCommand =
|
|
37424
|
+
var formsListCommand = defineCommand130({
|
|
37060
37425
|
meta: {
|
|
37061
37426
|
name: "list",
|
|
37062
37427
|
description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
|
|
@@ -37101,7 +37466,7 @@ var formsListCommand = defineCommand129({
|
|
|
37101
37466
|
}
|
|
37102
37467
|
}
|
|
37103
37468
|
});
|
|
37104
|
-
var formsViewCommand =
|
|
37469
|
+
var formsViewCommand = defineCommand130({
|
|
37105
37470
|
meta: {
|
|
37106
37471
|
name: "view",
|
|
37107
37472
|
description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
|
|
@@ -37153,7 +37518,7 @@ var formsViewCommand = defineCommand129({
|
|
|
37153
37518
|
}
|
|
37154
37519
|
}
|
|
37155
37520
|
});
|
|
37156
|
-
var meetingsListCommand =
|
|
37521
|
+
var meetingsListCommand = defineCommand130({
|
|
37157
37522
|
meta: {
|
|
37158
37523
|
name: "list",
|
|
37159
37524
|
description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
|
|
@@ -37195,7 +37560,7 @@ var meetingsListCommand = defineCommand129({
|
|
|
37195
37560
|
}
|
|
37196
37561
|
}
|
|
37197
37562
|
});
|
|
37198
|
-
var meetingsViewCommand =
|
|
37563
|
+
var meetingsViewCommand = defineCommand130({
|
|
37199
37564
|
meta: {
|
|
37200
37565
|
name: "view",
|
|
37201
37566
|
description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
|
|
@@ -37239,7 +37604,7 @@ var meetingsViewCommand = defineCommand129({
|
|
|
37239
37604
|
}
|
|
37240
37605
|
}
|
|
37241
37606
|
});
|
|
37242
|
-
var formsSubmissionsCommand =
|
|
37607
|
+
var formsSubmissionsCommand = defineCommand130({
|
|
37243
37608
|
meta: {
|
|
37244
37609
|
name: "submissions",
|
|
37245
37610
|
description: "How many leads a form received, and when. Example: baker hubspot forms submissions <formId> --days 30"
|
|
@@ -37288,7 +37653,7 @@ var formsSubmissionsCommand = defineCommand129({
|
|
|
37288
37653
|
}
|
|
37289
37654
|
}
|
|
37290
37655
|
});
|
|
37291
|
-
var workflowsListCommand =
|
|
37656
|
+
var workflowsListCommand = defineCommand130({
|
|
37292
37657
|
meta: {
|
|
37293
37658
|
name: "list",
|
|
37294
37659
|
description: "List HubSpot workflows. Example: baker hubspot workflows list --enabled-only"
|
|
@@ -37353,7 +37718,7 @@ function workflowViewHints(workflow) {
|
|
|
37353
37718
|
}
|
|
37354
37719
|
return hints;
|
|
37355
37720
|
}
|
|
37356
|
-
var workflowsViewCommand =
|
|
37721
|
+
var workflowsViewCommand = defineCommand130({
|
|
37357
37722
|
meta: {
|
|
37358
37723
|
name: "view",
|
|
37359
37724
|
description: "Read one workflow's real configuration \u2014 enrolment, branches in order, and what each step writes. Example: baker hubspot workflows view 121183594 --full"
|
|
@@ -37380,7 +37745,7 @@ var workflowsViewCommand = defineCommand129({
|
|
|
37380
37745
|
}
|
|
37381
37746
|
}
|
|
37382
37747
|
});
|
|
37383
|
-
var pipelinesListCommand =
|
|
37748
|
+
var pipelinesListCommand = defineCommand130({
|
|
37384
37749
|
meta: {
|
|
37385
37750
|
name: "list",
|
|
37386
37751
|
description: "List HubSpot deal pipelines and their stages. Example: baker hubspot pipelines list"
|
|
@@ -37397,7 +37762,7 @@ var pipelinesListCommand = defineCommand129({
|
|
|
37397
37762
|
}
|
|
37398
37763
|
}
|
|
37399
37764
|
});
|
|
37400
|
-
var contactsSummaryCommand =
|
|
37765
|
+
var contactsSummaryCommand = defineCommand130({
|
|
37401
37766
|
meta: {
|
|
37402
37767
|
name: "summary",
|
|
37403
37768
|
description: "Whether recent leads are being worked, as counts. Example: baker hubspot contacts summary --days 30"
|
|
@@ -37467,7 +37832,7 @@ function contactLookupHints(data) {
|
|
|
37467
37832
|
}
|
|
37468
37833
|
return hints;
|
|
37469
37834
|
}
|
|
37470
|
-
var contactsLookupCommand =
|
|
37835
|
+
var contactsLookupCommand = defineCommand130({
|
|
37471
37836
|
meta: {
|
|
37472
37837
|
name: "lookup",
|
|
37473
37838
|
description: "Find one contact by email and see whether it was worked. Example: baker hubspot contacts lookup a@b.com"
|
|
@@ -37491,27 +37856,27 @@ var contactsLookupCommand = defineCommand129({
|
|
|
37491
37856
|
}
|
|
37492
37857
|
}
|
|
37493
37858
|
});
|
|
37494
|
-
var contactsCommand =
|
|
37859
|
+
var contactsCommand = defineCommand130({
|
|
37495
37860
|
meta: { name: "contacts", description: "Contacts on the connected HubSpot account." },
|
|
37496
37861
|
subCommands: { summary: contactsSummaryCommand, lookup: contactsLookupCommand }
|
|
37497
37862
|
});
|
|
37498
|
-
var formsCommand =
|
|
37863
|
+
var formsCommand = defineCommand130({
|
|
37499
37864
|
meta: { name: "forms", description: "HubSpot forms on the connected account." },
|
|
37500
37865
|
subCommands: { list: formsListCommand, view: formsViewCommand, submissions: formsSubmissionsCommand }
|
|
37501
37866
|
});
|
|
37502
|
-
var workflowsCommand =
|
|
37867
|
+
var workflowsCommand = defineCommand130({
|
|
37503
37868
|
meta: { name: "workflows", description: "HubSpot workflows on the connected account." },
|
|
37504
37869
|
subCommands: { list: workflowsListCommand, view: workflowsViewCommand }
|
|
37505
37870
|
});
|
|
37506
|
-
var pipelinesCommand =
|
|
37871
|
+
var pipelinesCommand = defineCommand130({
|
|
37507
37872
|
meta: { name: "pipelines", description: "HubSpot deal pipelines on the connected account." },
|
|
37508
37873
|
subCommands: { list: pipelinesListCommand }
|
|
37509
37874
|
});
|
|
37510
|
-
var meetingsCommand =
|
|
37875
|
+
var meetingsCommand = defineCommand130({
|
|
37511
37876
|
meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
|
|
37512
37877
|
subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
|
|
37513
37878
|
});
|
|
37514
|
-
var hubspotCommand =
|
|
37879
|
+
var hubspotCommand = defineCommand130({
|
|
37515
37880
|
meta: {
|
|
37516
37881
|
name: "hubspot",
|
|
37517
37882
|
description: `Read the connected HubSpot account \u2014 forms, the leads they received, workflows, deal pipelines and
|
|
@@ -37549,10 +37914,10 @@ Full guide: __tooling__/docs/tools/baker/hubspot.md`
|
|
|
37549
37914
|
});
|
|
37550
37915
|
|
|
37551
37916
|
// src/commands/images/index.ts
|
|
37552
|
-
import { defineCommand as
|
|
37917
|
+
import { defineCommand as defineCommand156 } from "citty";
|
|
37553
37918
|
|
|
37554
37919
|
// src/commands/images/crop.ts
|
|
37555
|
-
import { defineCommand as
|
|
37920
|
+
import { defineCommand as defineCommand131 } from "citty";
|
|
37556
37921
|
|
|
37557
37922
|
// src/lib/image/crop-sprite.ts
|
|
37558
37923
|
import sharp from "sharp";
|
|
@@ -37674,7 +38039,7 @@ function emitError2(err) {
|
|
|
37674
38039
|
}
|
|
37675
38040
|
process.exit(1);
|
|
37676
38041
|
}
|
|
37677
|
-
var cropCommand =
|
|
38042
|
+
var cropCommand = defineCommand131({
|
|
37678
38043
|
meta: {
|
|
37679
38044
|
name: "crop",
|
|
37680
38045
|
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"
|
|
@@ -37710,7 +38075,7 @@ var cropCommand = defineCommand130({
|
|
|
37710
38075
|
});
|
|
37711
38076
|
|
|
37712
38077
|
// src/commands/images/delete.ts
|
|
37713
|
-
import { defineCommand as
|
|
38078
|
+
import { defineCommand as defineCommand132 } from "citty";
|
|
37714
38079
|
registerSchema({
|
|
37715
38080
|
command: "images.delete",
|
|
37716
38081
|
description: "Delete an image by ID",
|
|
@@ -37724,7 +38089,7 @@ registerSchema({
|
|
|
37724
38089
|
}
|
|
37725
38090
|
}
|
|
37726
38091
|
});
|
|
37727
|
-
var deleteCommand2 =
|
|
38092
|
+
var deleteCommand2 = defineCommand132({
|
|
37728
38093
|
meta: {
|
|
37729
38094
|
name: "delete",
|
|
37730
38095
|
description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
|
|
@@ -37765,7 +38130,7 @@ var deleteCommand2 = defineCommand131({
|
|
|
37765
38130
|
});
|
|
37766
38131
|
|
|
37767
38132
|
// src/commands/images/dimensions.ts
|
|
37768
|
-
import { defineCommand as
|
|
38133
|
+
import { defineCommand as defineCommand133 } from "citty";
|
|
37769
38134
|
|
|
37770
38135
|
// src/lib/image/dimensions.ts
|
|
37771
38136
|
import { imageSize } from "image-size";
|
|
@@ -37794,7 +38159,7 @@ registerSchema({
|
|
|
37794
38159
|
}
|
|
37795
38160
|
}
|
|
37796
38161
|
});
|
|
37797
|
-
var dimensionsCommand =
|
|
38162
|
+
var dimensionsCommand = defineCommand133({
|
|
37798
38163
|
meta: {
|
|
37799
38164
|
name: "dimensions",
|
|
37800
38165
|
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"
|
|
@@ -37850,7 +38215,7 @@ var dimensionsCommand = defineCommand132({
|
|
|
37850
38215
|
});
|
|
37851
38216
|
|
|
37852
38217
|
// src/commands/images/download.ts
|
|
37853
|
-
import { defineCommand as
|
|
38218
|
+
import { defineCommand as defineCommand134 } from "citty";
|
|
37854
38219
|
|
|
37855
38220
|
// src/commands/images/downloadPaths.ts
|
|
37856
38221
|
import { basename as basename2, extname as extname3, join as join6 } from "path";
|
|
@@ -38075,7 +38440,7 @@ function emitError3(err) {
|
|
|
38075
38440
|
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
|
|
38076
38441
|
process.exit(1);
|
|
38077
38442
|
}
|
|
38078
|
-
var downloadCommand =
|
|
38443
|
+
var downloadCommand = defineCommand134({
|
|
38079
38444
|
meta: {
|
|
38080
38445
|
name: "download",
|
|
38081
38446
|
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"
|
|
@@ -38108,7 +38473,7 @@ var downloadCommand = defineCommand133({
|
|
|
38108
38473
|
});
|
|
38109
38474
|
|
|
38110
38475
|
// src/commands/images/extract.ts
|
|
38111
|
-
import { defineCommand as
|
|
38476
|
+
import { defineCommand as defineCommand135 } from "citty";
|
|
38112
38477
|
|
|
38113
38478
|
// src/commands/images/autoIngest.ts
|
|
38114
38479
|
var AUTO_INGEST_MAX = {
|
|
@@ -38155,7 +38520,7 @@ registerSchema({
|
|
|
38155
38520
|
}
|
|
38156
38521
|
}
|
|
38157
38522
|
});
|
|
38158
|
-
var extractCommand =
|
|
38523
|
+
var extractCommand = defineCommand135({
|
|
38159
38524
|
meta: {
|
|
38160
38525
|
name: "extract",
|
|
38161
38526
|
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"
|
|
@@ -38210,7 +38575,7 @@ var extractCommand = defineCommand134({
|
|
|
38210
38575
|
});
|
|
38211
38576
|
|
|
38212
38577
|
// src/commands/images/find.ts
|
|
38213
|
-
import { defineCommand as
|
|
38578
|
+
import { defineCommand as defineCommand136 } from "citty";
|
|
38214
38579
|
|
|
38215
38580
|
// src/commands/images/providerHits.ts
|
|
38216
38581
|
function asRecord3(value) {
|
|
@@ -38348,7 +38713,7 @@ registerSchema({
|
|
|
38348
38713
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
38349
38714
|
}
|
|
38350
38715
|
});
|
|
38351
|
-
var findCommand =
|
|
38716
|
+
var findCommand = defineCommand136({
|
|
38352
38717
|
meta: {
|
|
38353
38718
|
name: "find",
|
|
38354
38719
|
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"
|
|
@@ -38421,7 +38786,7 @@ var findCommand = defineCommand135({
|
|
|
38421
38786
|
});
|
|
38422
38787
|
|
|
38423
38788
|
// src/commands/images/get.ts
|
|
38424
|
-
import { defineCommand as
|
|
38789
|
+
import { defineCommand as defineCommand137 } from "citty";
|
|
38425
38790
|
registerSchema({
|
|
38426
38791
|
command: "images.get",
|
|
38427
38792
|
description: "Get a single image by ID",
|
|
@@ -38429,7 +38794,7 @@ registerSchema({
|
|
|
38429
38794
|
id: { type: "string", description: "Image ID", required: true }
|
|
38430
38795
|
}
|
|
38431
38796
|
});
|
|
38432
|
-
var getCommand3 =
|
|
38797
|
+
var getCommand3 = defineCommand137({
|
|
38433
38798
|
meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
|
|
38434
38799
|
args: {
|
|
38435
38800
|
id: { type: "positional", description: "Image ID", required: false },
|
|
@@ -38465,7 +38830,7 @@ var getCommand3 = defineCommand136({
|
|
|
38465
38830
|
});
|
|
38466
38831
|
|
|
38467
38832
|
// src/commands/images/gif.ts
|
|
38468
|
-
import { defineCommand as
|
|
38833
|
+
import { defineCommand as defineCommand138 } from "citty";
|
|
38469
38834
|
registerSchema({
|
|
38470
38835
|
command: "images.gif",
|
|
38471
38836
|
description: "Search Giphy for GIFs / reaction memes (paid social creative).",
|
|
@@ -38497,7 +38862,7 @@ registerSchema({
|
|
|
38497
38862
|
}
|
|
38498
38863
|
}
|
|
38499
38864
|
});
|
|
38500
|
-
var gifCommand =
|
|
38865
|
+
var gifCommand = defineCommand138({
|
|
38501
38866
|
meta: {
|
|
38502
38867
|
name: "gif",
|
|
38503
38868
|
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"
|
|
@@ -38544,7 +38909,7 @@ var gifCommand = defineCommand137({
|
|
|
38544
38909
|
});
|
|
38545
38910
|
|
|
38546
38911
|
// src/commands/images/google.ts
|
|
38547
|
-
import { defineCommand as
|
|
38912
|
+
import { defineCommand as defineCommand139 } from "citty";
|
|
38548
38913
|
var GOOGLE_ERROR_FIX = {
|
|
38549
38914
|
action: "use_different_resource",
|
|
38550
38915
|
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."
|
|
@@ -38584,7 +38949,7 @@ registerSchema({
|
|
|
38584
38949
|
}
|
|
38585
38950
|
}
|
|
38586
38951
|
});
|
|
38587
|
-
var googleCommand2 =
|
|
38952
|
+
var googleCommand2 = defineCommand139({
|
|
38588
38953
|
meta: {
|
|
38589
38954
|
name: "google",
|
|
38590
38955
|
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"
|
|
@@ -38657,7 +39022,7 @@ var googleCommand2 = defineCommand138({
|
|
|
38657
39022
|
});
|
|
38658
39023
|
|
|
38659
39024
|
// src/commands/images/group.ts
|
|
38660
|
-
import { defineCommand as
|
|
39025
|
+
import { defineCommand as defineCommand140 } from "citty";
|
|
38661
39026
|
|
|
38662
39027
|
// src/commands/mediaGroup.ts
|
|
38663
39028
|
async function runMediaGroupLookup(input) {
|
|
@@ -38710,7 +39075,7 @@ registerSchema({
|
|
|
38710
39075
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
38711
39076
|
}
|
|
38712
39077
|
});
|
|
38713
|
-
var groupCommand =
|
|
39078
|
+
var groupCommand = defineCommand140({
|
|
38714
39079
|
meta: {
|
|
38715
39080
|
name: "group",
|
|
38716
39081
|
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>"
|
|
@@ -38730,7 +39095,7 @@ var groupCommand = defineCommand139({
|
|
|
38730
39095
|
});
|
|
38731
39096
|
|
|
38732
39097
|
// src/commands/images/icon.ts
|
|
38733
|
-
import { defineCommand as
|
|
39098
|
+
import { defineCommand as defineCommand141 } from "citty";
|
|
38734
39099
|
|
|
38735
39100
|
// src/commands/images/brandVerification.ts
|
|
38736
39101
|
function brandToken(domain) {
|
|
@@ -38827,7 +39192,7 @@ registerSchema({
|
|
|
38827
39192
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
38828
39193
|
}
|
|
38829
39194
|
});
|
|
38830
|
-
var iconCommand =
|
|
39195
|
+
var iconCommand = defineCommand141({
|
|
38831
39196
|
meta: {
|
|
38832
39197
|
name: "icon",
|
|
38833
39198
|
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'"
|
|
@@ -38897,7 +39262,7 @@ var iconCommand = defineCommand140({
|
|
|
38897
39262
|
});
|
|
38898
39263
|
|
|
38899
39264
|
// src/commands/images/ingest.ts
|
|
38900
|
-
import { defineCommand as
|
|
39265
|
+
import { defineCommand as defineCommand142 } from "citty";
|
|
38901
39266
|
var SOURCE_VALUES = imageSourceSchema.options.join(" | ");
|
|
38902
39267
|
registerSchema({
|
|
38903
39268
|
command: "images.ingest",
|
|
@@ -38912,7 +39277,7 @@ registerSchema({
|
|
|
38912
39277
|
fields: { type: "string", description: "Comma-separated field names to include", required: false }
|
|
38913
39278
|
}
|
|
38914
39279
|
});
|
|
38915
|
-
var ingestCommand =
|
|
39280
|
+
var ingestCommand = defineCommand142({
|
|
38916
39281
|
meta: {
|
|
38917
39282
|
name: "ingest",
|
|
38918
39283
|
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"
|
|
@@ -38981,7 +39346,7 @@ var ingestCommand = defineCommand141({
|
|
|
38981
39346
|
});
|
|
38982
39347
|
|
|
38983
39348
|
// src/commands/images/layerize.ts
|
|
38984
|
-
import { defineCommand as
|
|
39349
|
+
import { defineCommand as defineCommand143 } from "citty";
|
|
38985
39350
|
registerSchema({
|
|
38986
39351
|
command: "images.layerize",
|
|
38987
39352
|
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.",
|
|
@@ -39045,7 +39410,7 @@ async function pollUntilSettled(imageId, maxWait) {
|
|
|
39045
39410
|
}
|
|
39046
39411
|
return null;
|
|
39047
39412
|
}
|
|
39048
|
-
var layerizeCommand =
|
|
39413
|
+
var layerizeCommand = defineCommand143({
|
|
39049
39414
|
meta: {
|
|
39050
39415
|
name: "layerize",
|
|
39051
39416
|
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'"
|
|
@@ -39114,7 +39479,7 @@ registerSchema({
|
|
|
39114
39479
|
full: { type: "boolean", description: "Include geometry and typography for every layer", required: false }
|
|
39115
39480
|
}
|
|
39116
39481
|
});
|
|
39117
|
-
var layersCommand =
|
|
39482
|
+
var layersCommand = defineCommand143({
|
|
39118
39483
|
meta: {
|
|
39119
39484
|
name: "layers",
|
|
39120
39485
|
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"
|
|
@@ -39154,7 +39519,7 @@ var layersCommand = defineCommand142({
|
|
|
39154
39519
|
});
|
|
39155
39520
|
|
|
39156
39521
|
// src/commands/images/library.ts
|
|
39157
|
-
import { defineCommand as
|
|
39522
|
+
import { defineCommand as defineCommand144 } from "citty";
|
|
39158
39523
|
registerSchema({
|
|
39159
39524
|
command: "images.library",
|
|
39160
39525
|
description: "Search the company image library. Returns only ready images.",
|
|
@@ -39180,7 +39545,7 @@ registerSchema({
|
|
|
39180
39545
|
}
|
|
39181
39546
|
}
|
|
39182
39547
|
});
|
|
39183
|
-
var libraryCommand =
|
|
39548
|
+
var libraryCommand = defineCommand144({
|
|
39184
39549
|
meta: {
|
|
39185
39550
|
name: "library",
|
|
39186
39551
|
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"
|
|
@@ -39243,7 +39608,7 @@ var libraryCommand = defineCommand143({
|
|
|
39243
39608
|
});
|
|
39244
39609
|
|
|
39245
39610
|
// src/commands/images/logo.ts
|
|
39246
|
-
import { defineCommand as
|
|
39611
|
+
import { defineCommand as defineCommand145 } from "citty";
|
|
39247
39612
|
registerSchema({
|
|
39248
39613
|
command: "images.logo",
|
|
39249
39614
|
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.",
|
|
@@ -39271,7 +39636,7 @@ registerSchema({
|
|
|
39271
39636
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
39272
39637
|
}
|
|
39273
39638
|
});
|
|
39274
|
-
var logoCommand =
|
|
39639
|
+
var logoCommand = defineCommand145({
|
|
39275
39640
|
meta: {
|
|
39276
39641
|
name: "logo",
|
|
39277
39642
|
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"
|
|
@@ -39344,7 +39709,7 @@ var logoCommand = defineCommand144({
|
|
|
39344
39709
|
});
|
|
39345
39710
|
|
|
39346
39711
|
// src/commands/images/normalize.ts
|
|
39347
|
-
import { defineCommand as
|
|
39712
|
+
import { defineCommand as defineCommand146 } from "citty";
|
|
39348
39713
|
|
|
39349
39714
|
// src/lib/image/color-changer.ts
|
|
39350
39715
|
import quantize from "quantize";
|
|
@@ -40076,7 +40441,7 @@ function coerceRawArgs(args) {
|
|
|
40076
40441
|
"dry-run": bool(args["dry-run"])
|
|
40077
40442
|
};
|
|
40078
40443
|
}
|
|
40079
|
-
var normalizeCommand2 =
|
|
40444
|
+
var normalizeCommand2 = defineCommand146({
|
|
40080
40445
|
meta: {
|
|
40081
40446
|
name: "normalize",
|
|
40082
40447
|
description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
|
|
@@ -40131,7 +40496,7 @@ Examples:
|
|
|
40131
40496
|
});
|
|
40132
40497
|
|
|
40133
40498
|
// src/commands/images/pinterest.ts
|
|
40134
|
-
import { defineCommand as
|
|
40499
|
+
import { defineCommand as defineCommand147 } from "citty";
|
|
40135
40500
|
registerSchema({
|
|
40136
40501
|
command: "images.pinterest",
|
|
40137
40502
|
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.",
|
|
@@ -40151,7 +40516,7 @@ registerSchema({
|
|
|
40151
40516
|
}
|
|
40152
40517
|
}
|
|
40153
40518
|
});
|
|
40154
|
-
var pinterestCommand =
|
|
40519
|
+
var pinterestCommand = defineCommand147({
|
|
40155
40520
|
meta: {
|
|
40156
40521
|
name: "pinterest",
|
|
40157
40522
|
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'"
|
|
@@ -40208,7 +40573,7 @@ var pinterestCommand = defineCommand146({
|
|
|
40208
40573
|
});
|
|
40209
40574
|
|
|
40210
40575
|
// src/commands/images/screenshot.ts
|
|
40211
|
-
import { defineCommand as
|
|
40576
|
+
import { defineCommand as defineCommand148 } from "citty";
|
|
40212
40577
|
registerSchema({
|
|
40213
40578
|
command: "images.screenshot",
|
|
40214
40579
|
description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
|
|
@@ -40227,7 +40592,7 @@ registerSchema({
|
|
|
40227
40592
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
40228
40593
|
}
|
|
40229
40594
|
});
|
|
40230
|
-
var screenshotCommand =
|
|
40595
|
+
var screenshotCommand = defineCommand148({
|
|
40231
40596
|
meta: {
|
|
40232
40597
|
name: "screenshot",
|
|
40233
40598
|
description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
|
|
@@ -40291,7 +40656,7 @@ var screenshotCommand = defineCommand147({
|
|
|
40291
40656
|
});
|
|
40292
40657
|
|
|
40293
40658
|
// src/commands/images/search.ts
|
|
40294
|
-
import { defineCommand as
|
|
40659
|
+
import { defineCommand as defineCommand149 } from "citty";
|
|
40295
40660
|
registerSchema({
|
|
40296
40661
|
command: "images.search",
|
|
40297
40662
|
description: "Search images by text query. Only returns ready images.",
|
|
@@ -40307,7 +40672,7 @@ registerSchema({
|
|
|
40307
40672
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
40308
40673
|
}
|
|
40309
40674
|
});
|
|
40310
|
-
var searchCommand =
|
|
40675
|
+
var searchCommand = defineCommand149({
|
|
40311
40676
|
meta: {
|
|
40312
40677
|
name: "search",
|
|
40313
40678
|
description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
|
|
@@ -40367,7 +40732,7 @@ var searchCommand = defineCommand148({
|
|
|
40367
40732
|
});
|
|
40368
40733
|
|
|
40369
40734
|
// src/commands/images/sticker.ts
|
|
40370
|
-
import { defineCommand as
|
|
40735
|
+
import { defineCommand as defineCommand150 } from "citty";
|
|
40371
40736
|
registerSchema({
|
|
40372
40737
|
command: "images.sticker",
|
|
40373
40738
|
description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
|
|
@@ -40399,7 +40764,7 @@ registerSchema({
|
|
|
40399
40764
|
}
|
|
40400
40765
|
}
|
|
40401
40766
|
});
|
|
40402
|
-
var stickerCommand =
|
|
40767
|
+
var stickerCommand = defineCommand150({
|
|
40403
40768
|
meta: {
|
|
40404
40769
|
name: "sticker",
|
|
40405
40770
|
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"
|
|
@@ -40446,7 +40811,7 @@ var stickerCommand = defineCommand149({
|
|
|
40446
40811
|
});
|
|
40447
40812
|
|
|
40448
40813
|
// src/commands/images/stock.ts
|
|
40449
|
-
import { defineCommand as
|
|
40814
|
+
import { defineCommand as defineCommand151 } from "citty";
|
|
40450
40815
|
var STOCK_ERROR_FIX = {
|
|
40451
40816
|
action: "use_different_resource",
|
|
40452
40817
|
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."
|
|
@@ -40523,7 +40888,7 @@ function buildStockRequest(query, args) {
|
|
|
40523
40888
|
if (args.context) body.descriptionContext = args.context;
|
|
40524
40889
|
return body;
|
|
40525
40890
|
}
|
|
40526
|
-
var stockCommand =
|
|
40891
|
+
var stockCommand = defineCommand151({
|
|
40527
40892
|
meta: {
|
|
40528
40893
|
name: "stock",
|
|
40529
40894
|
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"
|
|
@@ -40596,7 +40961,7 @@ var stockCommand = defineCommand150({
|
|
|
40596
40961
|
});
|
|
40597
40962
|
|
|
40598
40963
|
// src/lib/tags-command.ts
|
|
40599
|
-
import { defineCommand as
|
|
40964
|
+
import { defineCommand as defineCommand152 } from "citty";
|
|
40600
40965
|
function makeTagsCommand(command, label, endpoint) {
|
|
40601
40966
|
registerSchema({
|
|
40602
40967
|
command: `${command}.tags`,
|
|
@@ -40605,7 +40970,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
40605
40970
|
output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
|
|
40606
40971
|
}
|
|
40607
40972
|
});
|
|
40608
|
-
return
|
|
40973
|
+
return defineCommand152({
|
|
40609
40974
|
meta: {
|
|
40610
40975
|
name: "tags",
|
|
40611
40976
|
description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
|
|
@@ -40641,7 +41006,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
40641
41006
|
var tagsCommand3 = makeTagsCommand("images", "image", "/api/images/tags");
|
|
40642
41007
|
|
|
40643
41008
|
// src/commands/images/upload.ts
|
|
40644
|
-
import { defineCommand as
|
|
41009
|
+
import { defineCommand as defineCommand153 } from "citty";
|
|
40645
41010
|
registerSchema({
|
|
40646
41011
|
command: "images.upload",
|
|
40647
41012
|
description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
|
|
@@ -40679,7 +41044,7 @@ registerSchema({
|
|
|
40679
41044
|
function isRemoteUrl2(value) {
|
|
40680
41045
|
return /^https?:\/\//i.test(value);
|
|
40681
41046
|
}
|
|
40682
|
-
var uploadCommand =
|
|
41047
|
+
var uploadCommand = defineCommand153({
|
|
40683
41048
|
meta: {
|
|
40684
41049
|
name: "upload",
|
|
40685
41050
|
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'"
|
|
@@ -40772,7 +41137,7 @@ async function uploadLocal(target, args) {
|
|
|
40772
41137
|
}
|
|
40773
41138
|
|
|
40774
41139
|
// src/commands/images/upscale.ts
|
|
40775
|
-
import { defineCommand as
|
|
41140
|
+
import { defineCommand as defineCommand154 } from "citty";
|
|
40776
41141
|
registerSchema({
|
|
40777
41142
|
command: "images.upscale",
|
|
40778
41143
|
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).",
|
|
@@ -40787,7 +41152,7 @@ registerSchema({
|
|
|
40787
41152
|
}
|
|
40788
41153
|
});
|
|
40789
41154
|
var POLL_INTERVAL_MS4 = 1500;
|
|
40790
|
-
var upscaleCommand =
|
|
41155
|
+
var upscaleCommand = defineCommand154({
|
|
40791
41156
|
meta: {
|
|
40792
41157
|
name: "upscale",
|
|
40793
41158
|
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"
|
|
@@ -40842,7 +41207,7 @@ var upscaleCommand = defineCommand153({
|
|
|
40842
41207
|
});
|
|
40843
41208
|
|
|
40844
41209
|
// src/commands/images/use.ts
|
|
40845
|
-
import { defineCommand as
|
|
41210
|
+
import { defineCommand as defineCommand155 } from "citty";
|
|
40846
41211
|
registerSchema({
|
|
40847
41212
|
command: "images.use",
|
|
40848
41213
|
description: "Ingest a URL and wait for the library record to be ready.",
|
|
@@ -40871,7 +41236,7 @@ function emitReady(ingestResult, doc, args) {
|
|
|
40871
41236
|
args.full === true
|
|
40872
41237
|
);
|
|
40873
41238
|
}
|
|
40874
|
-
var useCommand =
|
|
41239
|
+
var useCommand = defineCommand155({
|
|
40875
41240
|
meta: {
|
|
40876
41241
|
name: "use",
|
|
40877
41242
|
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"
|
|
@@ -40920,7 +41285,7 @@ var useCommand = defineCommand154({
|
|
|
40920
41285
|
});
|
|
40921
41286
|
|
|
40922
41287
|
// src/commands/images/index.ts
|
|
40923
|
-
var imagesCommand =
|
|
41288
|
+
var imagesCommand = defineCommand156({
|
|
40924
41289
|
meta: {
|
|
40925
41290
|
name: "images",
|
|
40926
41291
|
description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
|
|
@@ -40998,12 +41363,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
|
|
|
40998
41363
|
});
|
|
40999
41364
|
|
|
41000
41365
|
// src/commands/landing/index.ts
|
|
41001
|
-
import { defineCommand as
|
|
41366
|
+
import { defineCommand as defineCommand167 } from "citty";
|
|
41002
41367
|
|
|
41003
41368
|
// src/commands/landing/critique.ts
|
|
41004
41369
|
import { readdir as readdir9, stat as stat6 } from "fs/promises";
|
|
41005
41370
|
import path29 from "path";
|
|
41006
|
-
import { defineCommand as
|
|
41371
|
+
import { defineCommand as defineCommand157 } from "citty";
|
|
41007
41372
|
|
|
41008
41373
|
// src/engine/landing/lib/constants.ts
|
|
41009
41374
|
var OVERUSED_FONTS = /* @__PURE__ */ new Set([
|
|
@@ -42179,14 +42544,14 @@ function parseCritiqueSlugs(args) {
|
|
|
42179
42544
|
const all = [args.slug, ...rest].filter((s) => typeof s === "string" && s.length > 0);
|
|
42180
42545
|
return [...new Set(all.map(String))];
|
|
42181
42546
|
}
|
|
42182
|
-
function
|
|
42547
|
+
function fail6(code, message, fix) {
|
|
42183
42548
|
process.stderr.write(
|
|
42184
42549
|
`${JSON.stringify({ ok: false, error: { code, message, ...fix ? { fix } : {} } }, null, 2)}
|
|
42185
42550
|
`
|
|
42186
42551
|
);
|
|
42187
42552
|
process.exit(2);
|
|
42188
42553
|
}
|
|
42189
|
-
var critiqueCommand2 =
|
|
42554
|
+
var critiqueCommand2 = defineCommand157({
|
|
42190
42555
|
meta: {
|
|
42191
42556
|
name: "critique",
|
|
42192
42557
|
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."
|
|
@@ -42204,14 +42569,14 @@ var critiqueCommand2 = defineCommand156({
|
|
|
42204
42569
|
const projectRoot = process.cwd();
|
|
42205
42570
|
for (const slug of slugs) {
|
|
42206
42571
|
if (!SLUG_RE.test(slug) || slug.includes("..")) {
|
|
42207
|
-
|
|
42572
|
+
fail6(
|
|
42208
42573
|
"INVALID_SLUG",
|
|
42209
42574
|
`"${slug}" is not a landing slug \u2014 use the folder name directly under src/pages/ (letters, digits, dashes; not a path, not a _-private folder).`,
|
|
42210
42575
|
{ availableSlugs: await listLandingSlugs(projectRoot) }
|
|
42211
42576
|
);
|
|
42212
42577
|
}
|
|
42213
42578
|
if (!await isDir(path29.resolve(projectRoot, "src", "pages", slug))) {
|
|
42214
|
-
|
|
42579
|
+
fail6("NOT_FOUND", `No landing at src/pages/${slug}/`, {
|
|
42215
42580
|
availableSlugs: await listLandingSlugs(projectRoot)
|
|
42216
42581
|
});
|
|
42217
42582
|
}
|
|
@@ -42295,10 +42660,10 @@ async function isDir(p) {
|
|
|
42295
42660
|
}
|
|
42296
42661
|
|
|
42297
42662
|
// src/commands/landing/inspiration/index.ts
|
|
42298
|
-
import { defineCommand as
|
|
42663
|
+
import { defineCommand as defineCommand166 } from "citty";
|
|
42299
42664
|
|
|
42300
42665
|
// src/commands/landing/inspiration/add.ts
|
|
42301
|
-
import { defineCommand as
|
|
42666
|
+
import { defineCommand as defineCommand158 } from "citty";
|
|
42302
42667
|
|
|
42303
42668
|
// src/commands/landing/inspiration/shared.ts
|
|
42304
42669
|
var INSPIRATION_HINTS = {
|
|
@@ -42380,7 +42745,7 @@ registerSchema({
|
|
|
42380
42745
|
note: { type: "string", description: "Why this page is worth keeping", required: false }
|
|
42381
42746
|
}
|
|
42382
42747
|
});
|
|
42383
|
-
var addCommand =
|
|
42748
|
+
var addCommand = defineCommand158({
|
|
42384
42749
|
meta: {
|
|
42385
42750
|
name: "add",
|
|
42386
42751
|
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'"
|
|
@@ -42422,7 +42787,7 @@ var addCommand = defineCommand157({
|
|
|
42422
42787
|
// src/commands/landing/inspiration/code.ts
|
|
42423
42788
|
import { mkdir as mkdir10, writeFile as writeFile14 } from "fs/promises";
|
|
42424
42789
|
import path30 from "path";
|
|
42425
|
-
import { defineCommand as
|
|
42790
|
+
import { defineCommand as defineCommand159 } from "citty";
|
|
42426
42791
|
registerSchema({
|
|
42427
42792
|
command: "landing.inspiration.code",
|
|
42428
42793
|
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.",
|
|
@@ -42431,7 +42796,7 @@ registerSchema({
|
|
|
42431
42796
|
full: { type: "boolean", description: "Print the markup inline as well as writing it", required: false }
|
|
42432
42797
|
}
|
|
42433
42798
|
});
|
|
42434
|
-
var codeCommand =
|
|
42799
|
+
var codeCommand = defineCommand159({
|
|
42435
42800
|
meta: {
|
|
42436
42801
|
name: "code",
|
|
42437
42802
|
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."
|
|
@@ -42488,7 +42853,7 @@ var codeCommand = defineCommand158({
|
|
|
42488
42853
|
});
|
|
42489
42854
|
|
|
42490
42855
|
// src/commands/landing/inspiration/favorites.ts
|
|
42491
|
-
import { defineCommand as
|
|
42856
|
+
import { defineCommand as defineCommand160 } from "citty";
|
|
42492
42857
|
registerSchema({
|
|
42493
42858
|
command: "landing.inspiration.favorites",
|
|
42494
42859
|
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.",
|
|
@@ -42502,7 +42867,7 @@ registerSchema({
|
|
|
42502
42867
|
}
|
|
42503
42868
|
}
|
|
42504
42869
|
});
|
|
42505
|
-
var favoritesCommand =
|
|
42870
|
+
var favoritesCommand = defineCommand160({
|
|
42506
42871
|
meta: {
|
|
42507
42872
|
name: "favorites",
|
|
42508
42873
|
description: "List this company's saved reference sections. Example: baker landing inspiration favorites --type hero,pricing"
|
|
@@ -42582,7 +42947,7 @@ registerSchema({
|
|
|
42582
42947
|
note: { type: "string", description: "Why this is worth keeping", required: false }
|
|
42583
42948
|
}
|
|
42584
42949
|
});
|
|
42585
|
-
var favoriteCommand =
|
|
42950
|
+
var favoriteCommand = defineCommand160({
|
|
42586
42951
|
meta: {
|
|
42587
42952
|
name: "favorite",
|
|
42588
42953
|
description: "Save a reference section to this company. Example: baker landing inspiration favorite k57abc\u2026"
|
|
@@ -42620,7 +42985,7 @@ registerSchema({
|
|
|
42620
42985
|
page: { type: "boolean", description: "Treat the id as a page rather than a section", required: false }
|
|
42621
42986
|
}
|
|
42622
42987
|
});
|
|
42623
|
-
var unfavoriteCommand =
|
|
42988
|
+
var unfavoriteCommand = defineCommand160({
|
|
42624
42989
|
meta: {
|
|
42625
42990
|
name: "unfavorite",
|
|
42626
42991
|
description: "Remove a reference section from this company's saved set. Example: baker landing inspiration unfavorite k57abc\u2026"
|
|
@@ -42642,7 +43007,7 @@ var unfavoriteCommand = defineCommand159({
|
|
|
42642
43007
|
});
|
|
42643
43008
|
|
|
42644
43009
|
// src/commands/landing/inspiration/page.ts
|
|
42645
|
-
import { defineCommand as
|
|
43010
|
+
import { defineCommand as defineCommand161 } from "citty";
|
|
42646
43011
|
registerSchema({
|
|
42647
43012
|
command: "landing.inspiration.page",
|
|
42648
43013
|
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.",
|
|
@@ -42659,7 +43024,7 @@ registerSchema({
|
|
|
42659
43024
|
}
|
|
42660
43025
|
}
|
|
42661
43026
|
});
|
|
42662
|
-
var pageCommand2 =
|
|
43027
|
+
var pageCommand2 = defineCommand161({
|
|
42663
43028
|
meta: {
|
|
42664
43029
|
name: "page",
|
|
42665
43030
|
description: "Show how a reference page sequences its sections. Example: baker landing inspiration page j91xyz\u2026 \u2014 the blueprint, not the pixels."
|
|
@@ -42724,7 +43089,7 @@ var pageCommand2 = defineCommand160({
|
|
|
42724
43089
|
// src/commands/landing/inspiration/scrape.ts
|
|
42725
43090
|
import { readFile as readFile23 } from "fs/promises";
|
|
42726
43091
|
import path34 from "path";
|
|
42727
|
-
import { defineCommand as
|
|
43092
|
+
import { defineCommand as defineCommand162 } from "citty";
|
|
42728
43093
|
|
|
42729
43094
|
// src/engine/landing/lib/capturedReferences.ts
|
|
42730
43095
|
var MAX_STRINGS_PER_SECTION = 40;
|
|
@@ -44903,7 +45268,7 @@ registerSchema({
|
|
|
44903
45268
|
report: { type: "boolean", description: "Write report.html. `--no-report` to skip", required: false }
|
|
44904
45269
|
}
|
|
44905
45270
|
});
|
|
44906
|
-
var scrapeCommand =
|
|
45271
|
+
var scrapeCommand = defineCommand162({
|
|
44907
45272
|
meta: {
|
|
44908
45273
|
name: "scrape",
|
|
44909
45274
|
description: "Capture a landing page to a directory, now. Example: baker landing inspiration scrape https://linear.app --out .baker/inspiration/linear.app"
|
|
@@ -45013,7 +45378,7 @@ var scrapeCommand = defineCommand161({
|
|
|
45013
45378
|
|
|
45014
45379
|
// src/commands/landing/inspiration/search.ts
|
|
45015
45380
|
import path36 from "path";
|
|
45016
|
-
import { defineCommand as
|
|
45381
|
+
import { defineCommand as defineCommand163 } from "citty";
|
|
45017
45382
|
|
|
45018
45383
|
// src/commands/landing/inspiration/shot.ts
|
|
45019
45384
|
import { mkdir as mkdir12, writeFile as writeFile17 } from "fs/promises";
|
|
@@ -45150,7 +45515,7 @@ async function downloadShots(results) {
|
|
|
45150
45515
|
);
|
|
45151
45516
|
return saved;
|
|
45152
45517
|
}
|
|
45153
|
-
var searchCommand2 =
|
|
45518
|
+
var searchCommand2 = defineCommand163({
|
|
45154
45519
|
meta: {
|
|
45155
45520
|
name: "search",
|
|
45156
45521
|
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"
|
|
@@ -45248,7 +45613,7 @@ var searchCommand2 = defineCommand162({
|
|
|
45248
45613
|
});
|
|
45249
45614
|
|
|
45250
45615
|
// src/commands/landing/inspiration/sequences.ts
|
|
45251
|
-
import { defineCommand as
|
|
45616
|
+
import { defineCommand as defineCommand164 } from "citty";
|
|
45252
45617
|
var COMPACT_TRANSITIONS = 12;
|
|
45253
45618
|
var COMPACT_ENDS = 5;
|
|
45254
45619
|
var MAX_PAGES = 50;
|
|
@@ -45322,7 +45687,7 @@ function sequencesHints(data, { scope, full }) {
|
|
|
45322
45687
|
if (scope === "favorites") hints.push(...favoritesScopeHints(data.favoritesHealth, data.pagesReturned));
|
|
45323
45688
|
return hints;
|
|
45324
45689
|
}
|
|
45325
|
-
var sequencesCommand =
|
|
45690
|
+
var sequencesCommand = defineCommand164({
|
|
45326
45691
|
meta: {
|
|
45327
45692
|
name: "sequences",
|
|
45328
45693
|
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."
|
|
@@ -45372,7 +45737,7 @@ var sequencesCommand = defineCommand163({
|
|
|
45372
45737
|
|
|
45373
45738
|
// src/commands/landing/inspiration/view.ts
|
|
45374
45739
|
import path37 from "path";
|
|
45375
|
-
import { defineCommand as
|
|
45740
|
+
import { defineCommand as defineCommand165 } from "citty";
|
|
45376
45741
|
registerSchema({
|
|
45377
45742
|
command: "landing.inspiration.view",
|
|
45378
45743
|
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.",
|
|
@@ -45385,7 +45750,7 @@ registerSchema({
|
|
|
45385
45750
|
}
|
|
45386
45751
|
}
|
|
45387
45752
|
});
|
|
45388
|
-
var viewCommand2 =
|
|
45753
|
+
var viewCommand2 = defineCommand165({
|
|
45389
45754
|
meta: {
|
|
45390
45755
|
name: "view",
|
|
45391
45756
|
description: "Full detail for one reference section. Example: baker landing inspiration view k57abc\u2026 \u2014 read the screenshots it saves before you build."
|
|
@@ -45469,7 +45834,7 @@ var viewCommand2 = defineCommand164({
|
|
|
45469
45834
|
});
|
|
45470
45835
|
|
|
45471
45836
|
// src/commands/landing/inspiration/index.ts
|
|
45472
|
-
var inspirationCommand =
|
|
45837
|
+
var inspirationCommand = defineCommand166({
|
|
45473
45838
|
meta: {
|
|
45474
45839
|
name: "inspiration",
|
|
45475
45840
|
description: `Reference library of real landing-page sections \u2014 look at how good pages actually solve a problem before you design one.
|
|
@@ -45514,7 +45879,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
|
|
|
45514
45879
|
});
|
|
45515
45880
|
|
|
45516
45881
|
// src/commands/landing/index.ts
|
|
45517
|
-
var landingCommand =
|
|
45882
|
+
var landingCommand = defineCommand167({
|
|
45518
45883
|
meta: {
|
|
45519
45884
|
name: "landing",
|
|
45520
45885
|
description: `Design-quality tools for landing pages (src/pages/<slug>/).
|
|
@@ -45532,7 +45897,7 @@ Subcommands:
|
|
|
45532
45897
|
});
|
|
45533
45898
|
|
|
45534
45899
|
// src/commands/mcp/index.ts
|
|
45535
|
-
import { defineCommand as
|
|
45900
|
+
import { defineCommand as defineCommand168 } from "citty";
|
|
45536
45901
|
|
|
45537
45902
|
// src/commands/mcp/platforms.ts
|
|
45538
45903
|
function readsKey(label) {
|
|
@@ -45587,7 +45952,7 @@ function parseHeaders(raw) {
|
|
|
45587
45952
|
}
|
|
45588
45953
|
return Object.keys(headers).length > 0 ? headers : void 0;
|
|
45589
45954
|
}
|
|
45590
|
-
function
|
|
45955
|
+
function fail7(err) {
|
|
45591
45956
|
if (err instanceof ApiError) {
|
|
45592
45957
|
writeJson({ ok: false, error: { code: err.code, message: err.message } });
|
|
45593
45958
|
process.exit(1);
|
|
@@ -45601,7 +45966,7 @@ registerSchema({
|
|
|
45601
45966
|
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.",
|
|
45602
45967
|
args: {}
|
|
45603
45968
|
});
|
|
45604
|
-
var connectedCommand =
|
|
45969
|
+
var connectedCommand = defineCommand168({
|
|
45605
45970
|
meta: {
|
|
45606
45971
|
name: "connected",
|
|
45607
45972
|
description: `Everything this chat can reach \u2014 managed integrations, custom MCP servers, and connected platforms.
|
|
@@ -45651,7 +46016,7 @@ A tool or platform the user names that is NOT listed anywhere here is simply not
|
|
|
45651
46016
|
hints
|
|
45652
46017
|
});
|
|
45653
46018
|
} catch (err) {
|
|
45654
|
-
|
|
46019
|
+
fail7(err);
|
|
45655
46020
|
}
|
|
45656
46021
|
}
|
|
45657
46022
|
});
|
|
@@ -45660,7 +46025,7 @@ registerSchema({
|
|
|
45660
46025
|
description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
|
|
45661
46026
|
args: {}
|
|
45662
46027
|
});
|
|
45663
|
-
var listCommand14 =
|
|
46028
|
+
var listCommand14 = defineCommand168({
|
|
45664
46029
|
meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
|
|
45665
46030
|
run: async () => {
|
|
45666
46031
|
try {
|
|
@@ -45679,7 +46044,7 @@ var listCommand14 = defineCommand167({
|
|
|
45679
46044
|
} : {}
|
|
45680
46045
|
});
|
|
45681
46046
|
} catch (err) {
|
|
45682
|
-
|
|
46047
|
+
fail7(err);
|
|
45683
46048
|
}
|
|
45684
46049
|
}
|
|
45685
46050
|
});
|
|
@@ -45697,7 +46062,7 @@ registerSchema({
|
|
|
45697
46062
|
header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
|
|
45698
46063
|
}
|
|
45699
46064
|
});
|
|
45700
|
-
var addCommand2 =
|
|
46065
|
+
var addCommand2 = defineCommand168({
|
|
45701
46066
|
meta: {
|
|
45702
46067
|
name: "add",
|
|
45703
46068
|
description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
|
|
@@ -45740,7 +46105,7 @@ Examples:
|
|
|
45740
46105
|
]
|
|
45741
46106
|
});
|
|
45742
46107
|
} catch (err) {
|
|
45743
|
-
|
|
46108
|
+
fail7(err);
|
|
45744
46109
|
}
|
|
45745
46110
|
}
|
|
45746
46111
|
});
|
|
@@ -45749,7 +46114,7 @@ registerSchema({
|
|
|
45749
46114
|
description: "Remove a company custom MCP server by name.",
|
|
45750
46115
|
args: { name: { type: "string", description: "Server name to remove", required: true } }
|
|
45751
46116
|
});
|
|
45752
|
-
var removeCommand4 =
|
|
46117
|
+
var removeCommand4 = defineCommand168({
|
|
45753
46118
|
meta: {
|
|
45754
46119
|
name: "remove",
|
|
45755
46120
|
description: `Remove a company custom MCP server by name.
|
|
@@ -45767,11 +46132,11 @@ Example:
|
|
|
45767
46132
|
});
|
|
45768
46133
|
writeJson({ ok: true, data });
|
|
45769
46134
|
} catch (err) {
|
|
45770
|
-
|
|
46135
|
+
fail7(err);
|
|
45771
46136
|
}
|
|
45772
46137
|
}
|
|
45773
46138
|
});
|
|
45774
|
-
var mcpCommand =
|
|
46139
|
+
var mcpCommand = defineCommand168({
|
|
45775
46140
|
meta: {
|
|
45776
46141
|
name: "mcp",
|
|
45777
46142
|
description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
|
|
@@ -45797,10 +46162,10 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
|
|
|
45797
46162
|
});
|
|
45798
46163
|
|
|
45799
46164
|
// src/commands/research/index.ts
|
|
45800
|
-
import { defineCommand as
|
|
46165
|
+
import { defineCommand as defineCommand180 } from "citty";
|
|
45801
46166
|
|
|
45802
46167
|
// src/commands/research/advertisers.ts
|
|
45803
|
-
import { defineCommand as
|
|
46168
|
+
import { defineCommand as defineCommand169 } from "citty";
|
|
45804
46169
|
|
|
45805
46170
|
// src/commands/research/hints.ts
|
|
45806
46171
|
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.';
|
|
@@ -45983,7 +46348,7 @@ var FIELDS3 = {
|
|
|
45983
46348
|
etv: "Estimated traffic value (USD)",
|
|
45984
46349
|
visibility: "SERP visibility score (0-1)"
|
|
45985
46350
|
};
|
|
45986
|
-
var advertisersCommand =
|
|
46351
|
+
var advertisersCommand = defineCommand169({
|
|
45987
46352
|
meta: {
|
|
45988
46353
|
name: "advertisers",
|
|
45989
46354
|
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).
|
|
@@ -46039,7 +46404,7 @@ Examples:
|
|
|
46039
46404
|
});
|
|
46040
46405
|
|
|
46041
46406
|
// src/commands/research/autocomplete.ts
|
|
46042
|
-
import { defineCommand as
|
|
46407
|
+
import { defineCommand as defineCommand170 } from "citty";
|
|
46043
46408
|
registerSchema({
|
|
46044
46409
|
command: "research.autocomplete",
|
|
46045
46410
|
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).",
|
|
@@ -46062,7 +46427,7 @@ registerSchema({
|
|
|
46062
46427
|
var FIELDS4 = {
|
|
46063
46428
|
suggestion: "Autocomplete suggestion from Google"
|
|
46064
46429
|
};
|
|
46065
|
-
var autocompleteCommand =
|
|
46430
|
+
var autocompleteCommand = defineCommand170({
|
|
46066
46431
|
meta: {
|
|
46067
46432
|
name: "autocomplete",
|
|
46068
46433
|
description: `Get Google Autocomplete suggestions for keyword expansion.
|
|
@@ -46117,7 +46482,7 @@ Examples:
|
|
|
46117
46482
|
});
|
|
46118
46483
|
|
|
46119
46484
|
// src/commands/research/countries.ts
|
|
46120
|
-
import { defineCommand as
|
|
46485
|
+
import { defineCommand as defineCommand171 } from "citty";
|
|
46121
46486
|
registerSchema({
|
|
46122
46487
|
command: "research.countries",
|
|
46123
46488
|
description: "List all supported country codes for --location flag in research commands.",
|
|
@@ -46174,7 +46539,7 @@ var FIELDS5 = {
|
|
|
46174
46539
|
code: "Country code to pass as --location",
|
|
46175
46540
|
name: "Country name"
|
|
46176
46541
|
};
|
|
46177
|
-
var countriesCommand =
|
|
46542
|
+
var countriesCommand = defineCommand171({
|
|
46178
46543
|
meta: {
|
|
46179
46544
|
name: "countries",
|
|
46180
46545
|
description: "List all supported country codes for --location flag."
|
|
@@ -46185,7 +46550,7 @@ var countriesCommand = defineCommand170({
|
|
|
46185
46550
|
});
|
|
46186
46551
|
|
|
46187
46552
|
// src/commands/research/fetch.ts
|
|
46188
|
-
import { defineCommand as
|
|
46553
|
+
import { defineCommand as defineCommand172 } from "citty";
|
|
46189
46554
|
var CONTENT_PREVIEW_CHARS = 2e4;
|
|
46190
46555
|
var TIMEOUT_MS = 18e4;
|
|
46191
46556
|
registerSchema({
|
|
@@ -46258,7 +46623,7 @@ function fetchFix(code) {
|
|
|
46258
46623
|
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."
|
|
46259
46624
|
};
|
|
46260
46625
|
}
|
|
46261
|
-
var fetchCommand =
|
|
46626
|
+
var fetchCommand = defineCommand172({
|
|
46262
46627
|
meta: {
|
|
46263
46628
|
name: "fetch",
|
|
46264
46629
|
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.
|
|
@@ -46335,7 +46700,7 @@ Examples:
|
|
|
46335
46700
|
});
|
|
46336
46701
|
|
|
46337
46702
|
// src/commands/research/intent.ts
|
|
46338
|
-
import { defineCommand as
|
|
46703
|
+
import { defineCommand as defineCommand173 } from "citty";
|
|
46339
46704
|
registerSchema({
|
|
46340
46705
|
command: "research.intent",
|
|
46341
46706
|
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.",
|
|
@@ -46358,7 +46723,7 @@ var FIELDS7 = {
|
|
|
46358
46723
|
intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
|
|
46359
46724
|
probability: "Confidence score 0.0-1.0"
|
|
46360
46725
|
};
|
|
46361
|
-
var intentCommand =
|
|
46726
|
+
var intentCommand = defineCommand173({
|
|
46362
46727
|
meta: {
|
|
46363
46728
|
name: "intent",
|
|
46364
46729
|
description: `Classify Google Search intent for keywords. Returns intent type and confidence.
|
|
@@ -46406,7 +46771,7 @@ Examples:
|
|
|
46406
46771
|
});
|
|
46407
46772
|
|
|
46408
46773
|
// src/commands/research/keyword-gap.ts
|
|
46409
|
-
import { defineCommand as
|
|
46774
|
+
import { defineCommand as defineCommand174 } from "citty";
|
|
46410
46775
|
registerSchema({
|
|
46411
46776
|
command: "research.keyword-gap",
|
|
46412
46777
|
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.",
|
|
@@ -46435,7 +46800,7 @@ var FIELDS8 = {
|
|
|
46435
46800
|
cpc: "Cost per click USD",
|
|
46436
46801
|
their_position: "Competitor's ranking position"
|
|
46437
46802
|
};
|
|
46438
|
-
var keywordGapCommand =
|
|
46803
|
+
var keywordGapCommand = defineCommand174({
|
|
46439
46804
|
meta: {
|
|
46440
46805
|
name: "keyword-gap",
|
|
46441
46806
|
description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
|
|
@@ -46510,7 +46875,7 @@ Examples:
|
|
|
46510
46875
|
});
|
|
46511
46876
|
|
|
46512
46877
|
// src/commands/research/keywords-for-site.ts
|
|
46513
|
-
import { defineCommand as
|
|
46878
|
+
import { defineCommand as defineCommand175 } from "citty";
|
|
46514
46879
|
registerSchema({
|
|
46515
46880
|
command: "research.keywords-for-site",
|
|
46516
46881
|
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.",
|
|
@@ -46543,7 +46908,7 @@ var FIELDS9 = {
|
|
|
46543
46908
|
competition: "LOW, MEDIUM, or HIGH",
|
|
46544
46909
|
competition_index: "Competition score 0-100"
|
|
46545
46910
|
};
|
|
46546
|
-
var keywordsForSiteCommand =
|
|
46911
|
+
var keywordsForSiteCommand = defineCommand175({
|
|
46547
46912
|
meta: {
|
|
46548
46913
|
name: "keywords-for-site",
|
|
46549
46914
|
description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
|
|
@@ -46605,7 +46970,7 @@ Examples:
|
|
|
46605
46970
|
});
|
|
46606
46971
|
|
|
46607
46972
|
// src/commands/research/languages.ts
|
|
46608
|
-
import { defineCommand as
|
|
46973
|
+
import { defineCommand as defineCommand176 } from "citty";
|
|
46609
46974
|
registerSchema({
|
|
46610
46975
|
command: "research.languages",
|
|
46611
46976
|
description: "List all supported language codes for --language flag in research commands.",
|
|
@@ -46635,7 +47000,7 @@ var FIELDS10 = {
|
|
|
46635
47000
|
code: "Language code to pass as --language",
|
|
46636
47001
|
name: "Language name (also accepted by --language)"
|
|
46637
47002
|
};
|
|
46638
|
-
var languagesCommand2 =
|
|
47003
|
+
var languagesCommand2 = defineCommand176({
|
|
46639
47004
|
meta: {
|
|
46640
47005
|
name: "languages",
|
|
46641
47006
|
description: "List all supported language codes for --language flag."
|
|
@@ -46646,7 +47011,7 @@ var languagesCommand2 = defineCommand175({
|
|
|
46646
47011
|
});
|
|
46647
47012
|
|
|
46648
47013
|
// src/commands/research/lighthouse.ts
|
|
46649
|
-
import { defineCommand as
|
|
47014
|
+
import { defineCommand as defineCommand177 } from "citty";
|
|
46650
47015
|
registerSchema({
|
|
46651
47016
|
command: "research.lighthouse",
|
|
46652
47017
|
description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
|
|
@@ -46665,7 +47030,7 @@ var FIELDS11 = {
|
|
|
46665
47030
|
speed_index_ms: "Speed Index in ms (good: < 3400)",
|
|
46666
47031
|
interactive_ms: "Time to Interactive in ms (good: < 3800)"
|
|
46667
47032
|
};
|
|
46668
|
-
var lighthouseCommand =
|
|
47033
|
+
var lighthouseCommand = defineCommand177({
|
|
46669
47034
|
meta: {
|
|
46670
47035
|
name: "lighthouse",
|
|
46671
47036
|
description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
|
|
@@ -46703,7 +47068,7 @@ Examples:
|
|
|
46703
47068
|
});
|
|
46704
47069
|
|
|
46705
47070
|
// src/commands/research/relevant-pages.ts
|
|
46706
|
-
import { defineCommand as
|
|
47071
|
+
import { defineCommand as defineCommand178 } from "citty";
|
|
46707
47072
|
registerSchema({
|
|
46708
47073
|
command: "research.relevant-pages",
|
|
46709
47074
|
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).",
|
|
@@ -46729,7 +47094,7 @@ var FIELDS12 = {
|
|
|
46729
47094
|
keywords: "Total organic keywords the page ranks for",
|
|
46730
47095
|
top_10: "Keywords in positions 1-10"
|
|
46731
47096
|
};
|
|
46732
|
-
var relevantPagesCommand =
|
|
47097
|
+
var relevantPagesCommand = defineCommand178({
|
|
46733
47098
|
meta: {
|
|
46734
47099
|
name: "relevant-pages",
|
|
46735
47100
|
description: `Get the top pages of a competitor domain with traffic data.
|
|
@@ -46776,7 +47141,7 @@ Examples:
|
|
|
46776
47141
|
});
|
|
46777
47142
|
|
|
46778
47143
|
// src/commands/research/web.ts
|
|
46779
|
-
import { defineCommand as
|
|
47144
|
+
import { defineCommand as defineCommand179 } from "citty";
|
|
46780
47145
|
registerSchema({
|
|
46781
47146
|
command: "research.web",
|
|
46782
47147
|
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).",
|
|
@@ -46827,7 +47192,7 @@ async function runDeepResearch(question) {
|
|
|
46827
47192
|
}
|
|
46828
47193
|
throw new Error("Deep research timed out");
|
|
46829
47194
|
}
|
|
46830
|
-
var webCommand =
|
|
47195
|
+
var webCommand = defineCommand179({
|
|
46831
47196
|
meta: {
|
|
46832
47197
|
name: "web",
|
|
46833
47198
|
description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
|
|
@@ -46889,7 +47254,7 @@ Examples:
|
|
|
46889
47254
|
});
|
|
46890
47255
|
|
|
46891
47256
|
// src/commands/research/index.ts
|
|
46892
|
-
var researchCommand =
|
|
47257
|
+
var researchCommand = defineCommand180({
|
|
46893
47258
|
meta: {
|
|
46894
47259
|
name: "research",
|
|
46895
47260
|
description: `Competitive intelligence and AI-powered research commands.
|
|
@@ -46933,10 +47298,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
|
|
|
46933
47298
|
});
|
|
46934
47299
|
|
|
46935
47300
|
// src/commands/scheduled-actions/index.ts
|
|
46936
|
-
import { defineCommand as
|
|
47301
|
+
import { defineCommand as defineCommand188 } from "citty";
|
|
46937
47302
|
|
|
46938
47303
|
// src/commands/scheduled-actions/create.ts
|
|
46939
|
-
import { defineCommand as
|
|
47304
|
+
import { defineCommand as defineCommand181 } from "citty";
|
|
46940
47305
|
|
|
46941
47306
|
// src/commands/scheduled-actions/shared.ts
|
|
46942
47307
|
var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
|
|
@@ -47083,7 +47448,7 @@ registerSchema({
|
|
|
47083
47448
|
}
|
|
47084
47449
|
}
|
|
47085
47450
|
});
|
|
47086
|
-
var createCommand3 =
|
|
47451
|
+
var createCommand3 = defineCommand181({
|
|
47087
47452
|
meta: {
|
|
47088
47453
|
name: "create",
|
|
47089
47454
|
description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
|
|
@@ -47142,7 +47507,7 @@ var createCommand3 = defineCommand180({
|
|
|
47142
47507
|
});
|
|
47143
47508
|
|
|
47144
47509
|
// src/commands/scheduled-actions/delete.ts
|
|
47145
|
-
import { defineCommand as
|
|
47510
|
+
import { defineCommand as defineCommand182 } from "citty";
|
|
47146
47511
|
registerSchema({
|
|
47147
47512
|
command: "scheduled-actions.delete",
|
|
47148
47513
|
description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
|
|
@@ -47150,7 +47515,7 @@ registerSchema({
|
|
|
47150
47515
|
id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
|
|
47151
47516
|
}
|
|
47152
47517
|
});
|
|
47153
|
-
var deleteCommand3 =
|
|
47518
|
+
var deleteCommand3 = defineCommand182({
|
|
47154
47519
|
meta: {
|
|
47155
47520
|
name: "delete",
|
|
47156
47521
|
description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
|
|
@@ -47179,7 +47544,7 @@ var deleteCommand3 = defineCommand181({
|
|
|
47179
47544
|
});
|
|
47180
47545
|
|
|
47181
47546
|
// src/commands/scheduled-actions/get.ts
|
|
47182
|
-
import { defineCommand as
|
|
47547
|
+
import { defineCommand as defineCommand183 } from "citty";
|
|
47183
47548
|
registerSchema({
|
|
47184
47549
|
command: "scheduled-actions.get",
|
|
47185
47550
|
description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
|
|
@@ -47188,7 +47553,7 @@ registerSchema({
|
|
|
47188
47553
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
47189
47554
|
}
|
|
47190
47555
|
});
|
|
47191
|
-
var getCommand4 =
|
|
47556
|
+
var getCommand4 = defineCommand183({
|
|
47192
47557
|
meta: {
|
|
47193
47558
|
name: "get",
|
|
47194
47559
|
description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
|
|
@@ -47227,7 +47592,7 @@ var getCommand4 = defineCommand182({
|
|
|
47227
47592
|
});
|
|
47228
47593
|
|
|
47229
47594
|
// src/commands/scheduled-actions/list.ts
|
|
47230
|
-
import { defineCommand as
|
|
47595
|
+
import { defineCommand as defineCommand184 } from "citty";
|
|
47231
47596
|
registerSchema({
|
|
47232
47597
|
command: "scheduled-actions.list",
|
|
47233
47598
|
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.",
|
|
@@ -47235,7 +47600,7 @@ registerSchema({
|
|
|
47235
47600
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
47236
47601
|
}
|
|
47237
47602
|
});
|
|
47238
|
-
var listCommand15 =
|
|
47603
|
+
var listCommand15 = defineCommand184({
|
|
47239
47604
|
meta: {
|
|
47240
47605
|
name: "list",
|
|
47241
47606
|
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."
|
|
@@ -47260,7 +47625,7 @@ var listCommand15 = defineCommand183({
|
|
|
47260
47625
|
// src/commands/scheduled-actions/templates.ts
|
|
47261
47626
|
import { readFile as readFile24 } from "fs/promises";
|
|
47262
47627
|
import path38 from "path";
|
|
47263
|
-
import { defineCommand as
|
|
47628
|
+
import { defineCommand as defineCommand185 } from "citty";
|
|
47264
47629
|
registerSchema({
|
|
47265
47630
|
command: "scheduled-actions.templates",
|
|
47266
47631
|
description: "The recipes available to this company: the ones Baker ships plus the ones they wrote themselves, 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. Also how a company gets a recipe of its own \u2014 save a brief, prove it runs, then publish it.",
|
|
@@ -47315,7 +47680,7 @@ registerSchema({
|
|
|
47315
47680
|
}
|
|
47316
47681
|
}
|
|
47317
47682
|
});
|
|
47318
|
-
var templatesCommand =
|
|
47683
|
+
var templatesCommand = defineCommand185({
|
|
47319
47684
|
meta: {
|
|
47320
47685
|
name: "templates",
|
|
47321
47686
|
description: `The recipes this company can run \u2014 Baker's own plus theirs, with what each one produces.
|
|
@@ -47407,7 +47772,7 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
|
47407
47772
|
});
|
|
47408
47773
|
|
|
47409
47774
|
// src/commands/scheduled-actions/trigger.ts
|
|
47410
|
-
import { defineCommand as
|
|
47775
|
+
import { defineCommand as defineCommand186 } from "citty";
|
|
47411
47776
|
registerSchema({
|
|
47412
47777
|
command: "scheduled-actions.trigger",
|
|
47413
47778
|
description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
|
|
@@ -47415,7 +47780,7 @@ registerSchema({
|
|
|
47415
47780
|
id: { type: "string", description: "Published scheduled action ID", required: true }
|
|
47416
47781
|
}
|
|
47417
47782
|
});
|
|
47418
|
-
var triggerCommand =
|
|
47783
|
+
var triggerCommand = defineCommand186({
|
|
47419
47784
|
meta: {
|
|
47420
47785
|
name: "trigger",
|
|
47421
47786
|
description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
|
|
@@ -47452,7 +47817,7 @@ var triggerCommand = defineCommand185({
|
|
|
47452
47817
|
});
|
|
47453
47818
|
|
|
47454
47819
|
// src/commands/scheduled-actions/update.ts
|
|
47455
|
-
import { defineCommand as
|
|
47820
|
+
import { defineCommand as defineCommand187 } from "citty";
|
|
47456
47821
|
registerSchema({
|
|
47457
47822
|
command: "scheduled-actions.update",
|
|
47458
47823
|
description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
|
|
@@ -47483,7 +47848,7 @@ registerSchema({
|
|
|
47483
47848
|
prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
|
|
47484
47849
|
}
|
|
47485
47850
|
});
|
|
47486
|
-
var updateCommand3 =
|
|
47851
|
+
var updateCommand3 = defineCommand187({
|
|
47487
47852
|
meta: {
|
|
47488
47853
|
name: "update",
|
|
47489
47854
|
description: "Stage a scheduled action update. Examples: baker scheduled-actions update <id> --enabled false | baker scheduled-actions update <id> --mode publish"
|
|
@@ -47561,7 +47926,7 @@ var updateCommand3 = defineCommand186({
|
|
|
47561
47926
|
});
|
|
47562
47927
|
|
|
47563
47928
|
// src/commands/scheduled-actions/index.ts
|
|
47564
|
-
var scheduledActionsCommand =
|
|
47929
|
+
var scheduledActionsCommand = defineCommand188({
|
|
47565
47930
|
meta: {
|
|
47566
47931
|
name: "scheduled-actions",
|
|
47567
47932
|
description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger, templates.
|
|
@@ -47590,14 +47955,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
|
47590
47955
|
});
|
|
47591
47956
|
|
|
47592
47957
|
// src/commands/schema.ts
|
|
47593
|
-
import { defineCommand as
|
|
47958
|
+
import { defineCommand as defineCommand189 } from "citty";
|
|
47594
47959
|
function narrowToFamily(commandName, available) {
|
|
47595
47960
|
const segments = commandName.split(".");
|
|
47596
47961
|
const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
|
|
47597
47962
|
const siblings = available.filter((name) => name.startsWith(prefix));
|
|
47598
47963
|
return siblings.length > 0 ? siblings : available;
|
|
47599
47964
|
}
|
|
47600
|
-
var schemaCommand2 =
|
|
47965
|
+
var schemaCommand2 = defineCommand189({
|
|
47601
47966
|
meta: {
|
|
47602
47967
|
name: "schema",
|
|
47603
47968
|
description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
|
|
@@ -47641,10 +48006,10 @@ var schemaCommand2 = defineCommand188({
|
|
|
47641
48006
|
});
|
|
47642
48007
|
|
|
47643
48008
|
// src/commands/studio/index.ts
|
|
47644
|
-
import { defineCommand as
|
|
48009
|
+
import { defineCommand as defineCommand198 } from "citty";
|
|
47645
48010
|
|
|
47646
48011
|
// src/commands/studio/animate.ts
|
|
47647
|
-
import { defineCommand as
|
|
48012
|
+
import { defineCommand as defineCommand190 } from "citty";
|
|
47648
48013
|
|
|
47649
48014
|
// src/commands/studio/batch.ts
|
|
47650
48015
|
function projectBatch(generation, full) {
|
|
@@ -48095,7 +48460,7 @@ function costHintsFor(body) {
|
|
|
48095
48460
|
}
|
|
48096
48461
|
return hints;
|
|
48097
48462
|
}
|
|
48098
|
-
var animateCommand =
|
|
48463
|
+
var animateCommand = defineCommand190({
|
|
48099
48464
|
meta: {
|
|
48100
48465
|
name: "animate",
|
|
48101
48466
|
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"
|
|
@@ -48214,7 +48579,7 @@ var animateCommand = defineCommand189({
|
|
|
48214
48579
|
});
|
|
48215
48580
|
|
|
48216
48581
|
// src/commands/studio/generate.ts
|
|
48217
|
-
import { defineCommand as
|
|
48582
|
+
import { defineCommand as defineCommand191 } from "citty";
|
|
48218
48583
|
var MODEL_LIST2 = IMAGE_MODEL_IDS;
|
|
48219
48584
|
var DEFAULT_MAX_WAIT_MS2 = 24e4;
|
|
48220
48585
|
registerSchema({
|
|
@@ -48350,7 +48715,7 @@ function buildGenerateBody(args, prompt) {
|
|
|
48350
48715
|
}
|
|
48351
48716
|
return body;
|
|
48352
48717
|
}
|
|
48353
|
-
var generateCommand =
|
|
48718
|
+
var generateCommand = defineCommand191({
|
|
48354
48719
|
meta: {
|
|
48355
48720
|
name: "generate",
|
|
48356
48721
|
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]]'"
|
|
@@ -48428,7 +48793,7 @@ var generateCommand = defineCommand190({
|
|
|
48428
48793
|
});
|
|
48429
48794
|
|
|
48430
48795
|
// src/commands/studio/get.ts
|
|
48431
|
-
import { defineCommand as
|
|
48796
|
+
import { defineCommand as defineCommand192 } from "citty";
|
|
48432
48797
|
registerSchema({
|
|
48433
48798
|
command: "studio.get",
|
|
48434
48799
|
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.",
|
|
@@ -48437,7 +48802,7 @@ registerSchema({
|
|
|
48437
48802
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
48438
48803
|
}
|
|
48439
48804
|
});
|
|
48440
|
-
var getCommand5 =
|
|
48805
|
+
var getCommand5 = defineCommand192({
|
|
48441
48806
|
meta: {
|
|
48442
48807
|
name: "get",
|
|
48443
48808
|
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"
|
|
@@ -48466,7 +48831,7 @@ var getCommand5 = defineCommand191({
|
|
|
48466
48831
|
});
|
|
48467
48832
|
|
|
48468
48833
|
// src/commands/studio/improve.ts
|
|
48469
|
-
import { defineCommand as
|
|
48834
|
+
import { defineCommand as defineCommand193 } from "citty";
|
|
48470
48835
|
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.";
|
|
48471
48836
|
registerSchema({
|
|
48472
48837
|
command: "studio.improve",
|
|
@@ -48491,7 +48856,7 @@ registerSchema({
|
|
|
48491
48856
|
}
|
|
48492
48857
|
}
|
|
48493
48858
|
});
|
|
48494
|
-
var improveCommand =
|
|
48859
|
+
var improveCommand = defineCommand193({
|
|
48495
48860
|
meta: {
|
|
48496
48861
|
name: "improve",
|
|
48497
48862
|
description: `${DESCRIPTION}
|
|
@@ -48535,7 +48900,7 @@ Examples:
|
|
|
48535
48900
|
});
|
|
48536
48901
|
|
|
48537
48902
|
// src/commands/studio/keep.ts
|
|
48538
|
-
import { defineCommand as
|
|
48903
|
+
import { defineCommand as defineCommand194 } from "citty";
|
|
48539
48904
|
registerSchema({
|
|
48540
48905
|
command: "studio.keep",
|
|
48541
48906
|
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.",
|
|
@@ -48545,7 +48910,7 @@ registerSchema({
|
|
|
48545
48910
|
undo: { type: "boolean", description: "Un-star an image, or take a kept clip back out", required: false }
|
|
48546
48911
|
}
|
|
48547
48912
|
});
|
|
48548
|
-
var keepCommand =
|
|
48913
|
+
var keepCommand = defineCommand194({
|
|
48549
48914
|
meta: {
|
|
48550
48915
|
name: "keep",
|
|
48551
48916
|
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"
|
|
@@ -48596,7 +48961,7 @@ var keepCommand = defineCommand193({
|
|
|
48596
48961
|
});
|
|
48597
48962
|
|
|
48598
48963
|
// src/commands/studio/list.ts
|
|
48599
|
-
import { defineCommand as
|
|
48964
|
+
import { defineCommand as defineCommand195 } from "citty";
|
|
48600
48965
|
registerSchema({
|
|
48601
48966
|
command: "studio.list",
|
|
48602
48967
|
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.",
|
|
@@ -48607,7 +48972,7 @@ registerSchema({
|
|
|
48607
48972
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
48608
48973
|
}
|
|
48609
48974
|
});
|
|
48610
|
-
var listCommand16 =
|
|
48975
|
+
var listCommand16 = defineCommand195({
|
|
48611
48976
|
meta: {
|
|
48612
48977
|
name: "list",
|
|
48613
48978
|
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"
|
|
@@ -48641,7 +49006,7 @@ var listCommand16 = defineCommand194({
|
|
|
48641
49006
|
});
|
|
48642
49007
|
|
|
48643
49008
|
// src/commands/studio/models.ts
|
|
48644
|
-
import { defineCommand as
|
|
49009
|
+
import { defineCommand as defineCommand196 } from "citty";
|
|
48645
49010
|
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.";
|
|
48646
49011
|
registerSchema({
|
|
48647
49012
|
command: "studio.models",
|
|
@@ -48728,7 +49093,7 @@ function buildModelCards(kind, model) {
|
|
|
48728
49093
|
const selected = model ? ids.filter((id) => id === model) : ids;
|
|
48729
49094
|
return selected.map((id) => build(id));
|
|
48730
49095
|
}
|
|
48731
|
-
var modelsCommand =
|
|
49096
|
+
var modelsCommand = defineCommand196({
|
|
48732
49097
|
meta: {
|
|
48733
49098
|
name: "models",
|
|
48734
49099
|
description: `${DESCRIPTION2}
|
|
@@ -48775,13 +49140,13 @@ Examples:
|
|
|
48775
49140
|
});
|
|
48776
49141
|
|
|
48777
49142
|
// src/commands/studio/skills.ts
|
|
48778
|
-
import { defineCommand as
|
|
49143
|
+
import { defineCommand as defineCommand197 } from "citty";
|
|
48779
49144
|
registerSchema({
|
|
48780
49145
|
command: "studio.skills",
|
|
48781
49146
|
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.",
|
|
48782
49147
|
args: {}
|
|
48783
49148
|
});
|
|
48784
|
-
var skillsCommand =
|
|
49149
|
+
var skillsCommand = defineCommand197({
|
|
48785
49150
|
meta: {
|
|
48786
49151
|
name: "skills",
|
|
48787
49152
|
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"
|
|
@@ -48805,7 +49170,7 @@ var skillsCommand = defineCommand196({
|
|
|
48805
49170
|
});
|
|
48806
49171
|
|
|
48807
49172
|
// src/commands/studio/index.ts
|
|
48808
|
-
var studioCommand =
|
|
49173
|
+
var studioCommand = defineCommand198({
|
|
48809
49174
|
meta: {
|
|
48810
49175
|
name: "studio",
|
|
48811
49176
|
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.
|
|
@@ -48848,10 +49213,10 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
|
|
|
48848
49213
|
});
|
|
48849
49214
|
|
|
48850
49215
|
// src/commands/tag-manager/index.ts
|
|
48851
|
-
import { defineCommand as
|
|
49216
|
+
import { defineCommand as defineCommand202 } from "citty";
|
|
48852
49217
|
|
|
48853
49218
|
// src/commands/tag-manager/draft.ts
|
|
48854
|
-
import { defineCommand as
|
|
49219
|
+
import { defineCommand as defineCommand199 } from "citty";
|
|
48855
49220
|
|
|
48856
49221
|
// src/commands/tag-manager/shared.ts
|
|
48857
49222
|
import { readFileSync as readFileSync15 } from "fs";
|
|
@@ -48974,13 +49339,13 @@ registerSchema({
|
|
|
48974
49339
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
48975
49340
|
}
|
|
48976
49341
|
});
|
|
48977
|
-
var draftCommand4 =
|
|
49342
|
+
var draftCommand4 = defineCommand199({
|
|
48978
49343
|
meta: {
|
|
48979
49344
|
name: "draft",
|
|
48980
49345
|
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."
|
|
48981
49346
|
},
|
|
48982
49347
|
subCommands: {
|
|
48983
|
-
list:
|
|
49348
|
+
list: defineCommand199({
|
|
48984
49349
|
meta: {
|
|
48985
49350
|
name: "list",
|
|
48986
49351
|
description: "Review everything staged on this chat (--json for the raw envelope)"
|
|
@@ -48993,7 +49358,7 @@ var draftCommand4 = defineCommand198({
|
|
|
48993
49358
|
await draftList2(args.json === true, args.chat);
|
|
48994
49359
|
}
|
|
48995
49360
|
}),
|
|
48996
|
-
show:
|
|
49361
|
+
show: defineCommand199({
|
|
48997
49362
|
meta: {
|
|
48998
49363
|
name: "show",
|
|
48999
49364
|
description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
|
|
@@ -49010,7 +49375,7 @@ var draftCommand4 = defineCommand198({
|
|
|
49010
49375
|
);
|
|
49011
49376
|
}
|
|
49012
49377
|
}),
|
|
49013
|
-
amend:
|
|
49378
|
+
amend: defineCommand199({
|
|
49014
49379
|
meta: {
|
|
49015
49380
|
name: "amend",
|
|
49016
49381
|
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."
|
|
@@ -49027,7 +49392,7 @@ var draftCommand4 = defineCommand198({
|
|
|
49027
49392
|
});
|
|
49028
49393
|
}
|
|
49029
49394
|
}),
|
|
49030
|
-
remove:
|
|
49395
|
+
remove: defineCommand199({
|
|
49031
49396
|
meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
|
|
49032
49397
|
args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
|
|
49033
49398
|
run: async ({ args }) => {
|
|
@@ -49036,7 +49401,7 @@ var draftCommand4 = defineCommand198({
|
|
|
49036
49401
|
});
|
|
49037
49402
|
}
|
|
49038
49403
|
}),
|
|
49039
|
-
clear:
|
|
49404
|
+
clear: defineCommand199({
|
|
49040
49405
|
meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
|
|
49041
49406
|
run: async () => {
|
|
49042
49407
|
await draftAction3("/api/tag-manager/draft/clear", {});
|
|
@@ -49046,7 +49411,7 @@ var draftCommand4 = defineCommand198({
|
|
|
49046
49411
|
});
|
|
49047
49412
|
|
|
49048
49413
|
// src/commands/tag-manager/read.ts
|
|
49049
|
-
import { defineCommand as
|
|
49414
|
+
import { defineCommand as defineCommand200 } from "citty";
|
|
49050
49415
|
registerSchema({
|
|
49051
49416
|
command: "tagManager.containers",
|
|
49052
49417
|
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.",
|
|
@@ -49087,7 +49452,7 @@ function containersHints(containers) {
|
|
|
49087
49452
|
}))
|
|
49088
49453
|
});
|
|
49089
49454
|
}
|
|
49090
|
-
var containersCommand =
|
|
49455
|
+
var containersCommand = defineCommand200({
|
|
49091
49456
|
meta: {
|
|
49092
49457
|
name: "containers",
|
|
49093
49458
|
description: `List Tag Manager containers reachable by this company's connection.
|
|
@@ -49104,7 +49469,7 @@ Start here:
|
|
|
49104
49469
|
}
|
|
49105
49470
|
}
|
|
49106
49471
|
});
|
|
49107
|
-
var readCommand =
|
|
49472
|
+
var readCommand = defineCommand200({
|
|
49108
49473
|
meta: {
|
|
49109
49474
|
name: "read",
|
|
49110
49475
|
description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
|
|
@@ -49146,7 +49511,7 @@ Examples:
|
|
|
49146
49511
|
});
|
|
49147
49512
|
|
|
49148
49513
|
// src/commands/tag-manager/write-commands.ts
|
|
49149
|
-
import { defineCommand as
|
|
49514
|
+
import { defineCommand as defineCommand201 } from "citty";
|
|
49150
49515
|
var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
|
|
49151
49516
|
var ENTITIES = [
|
|
49152
49517
|
{
|
|
@@ -49202,10 +49567,10 @@ for (const { entity, noun, createHint } of ENTITIES) {
|
|
|
49202
49567
|
});
|
|
49203
49568
|
}
|
|
49204
49569
|
function entityCommand(entity, noun, example) {
|
|
49205
|
-
return
|
|
49570
|
+
return defineCommand201({
|
|
49206
49571
|
meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
|
|
49207
49572
|
subCommands: {
|
|
49208
|
-
create:
|
|
49573
|
+
create: defineCommand201({
|
|
49209
49574
|
meta: {
|
|
49210
49575
|
name: "create",
|
|
49211
49576
|
description: `Stage a new ${noun}
|
|
@@ -49227,7 +49592,7 @@ Examples:
|
|
|
49227
49592
|
});
|
|
49228
49593
|
}
|
|
49229
49594
|
}),
|
|
49230
|
-
update:
|
|
49595
|
+
update: defineCommand201({
|
|
49231
49596
|
meta: {
|
|
49232
49597
|
name: "update",
|
|
49233
49598
|
description: `Stage an update to an existing ${noun} (pass its id or path)`
|
|
@@ -49247,7 +49612,7 @@ Examples:
|
|
|
49247
49612
|
});
|
|
49248
49613
|
}
|
|
49249
49614
|
}),
|
|
49250
|
-
delete:
|
|
49615
|
+
delete: defineCommand201({
|
|
49251
49616
|
meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
|
|
49252
49617
|
args: {
|
|
49253
49618
|
id: { type: "positional", description: `${noun} id or path`, required: false },
|
|
@@ -49288,7 +49653,7 @@ function builtinTypes(args) {
|
|
|
49288
49653
|
}
|
|
49289
49654
|
return raw.split(",").map((entry) => entry.trim());
|
|
49290
49655
|
}
|
|
49291
|
-
var builtinCommand =
|
|
49656
|
+
var builtinCommand = defineCommand201({
|
|
49292
49657
|
meta: {
|
|
49293
49658
|
name: "builtin",
|
|
49294
49659
|
description: `Enable or disable built-in variables
|
|
@@ -49298,7 +49663,7 @@ Examples:
|
|
|
49298
49663
|
baker tag-manager builtin disable --types formId`
|
|
49299
49664
|
},
|
|
49300
49665
|
subCommands: {
|
|
49301
|
-
enable:
|
|
49666
|
+
enable: defineCommand201({
|
|
49302
49667
|
meta: { name: "enable", description: "Stage enabling built-in variables" },
|
|
49303
49668
|
args: {
|
|
49304
49669
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -49312,7 +49677,7 @@ Examples:
|
|
|
49312
49677
|
});
|
|
49313
49678
|
}
|
|
49314
49679
|
}),
|
|
49315
|
-
disable:
|
|
49680
|
+
disable: defineCommand201({
|
|
49316
49681
|
meta: { name: "disable", description: "Stage disabling built-in variables" },
|
|
49317
49682
|
args: {
|
|
49318
49683
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -49330,7 +49695,7 @@ Examples:
|
|
|
49330
49695
|
});
|
|
49331
49696
|
|
|
49332
49697
|
// src/commands/tag-manager/index.ts
|
|
49333
|
-
var tagManagerCommand =
|
|
49698
|
+
var tagManagerCommand = defineCommand202({
|
|
49334
49699
|
meta: {
|
|
49335
49700
|
name: "tag-manager",
|
|
49336
49701
|
description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
|
|
@@ -49367,7 +49732,7 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
|
|
|
49367
49732
|
});
|
|
49368
49733
|
|
|
49369
49734
|
// src/commands/tags/index.ts
|
|
49370
|
-
import { defineCommand as
|
|
49735
|
+
import { defineCommand as defineCommand203 } from "citty";
|
|
49371
49736
|
|
|
49372
49737
|
// src/commands/tags/shared.ts
|
|
49373
49738
|
function failApi3(err) {
|
|
@@ -49436,7 +49801,7 @@ async function listTags(json) {
|
|
|
49436
49801
|
var listArgs9 = {
|
|
49437
49802
|
json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
|
|
49438
49803
|
};
|
|
49439
|
-
var listCommand17 =
|
|
49804
|
+
var listCommand17 = defineCommand203({
|
|
49440
49805
|
meta: {
|
|
49441
49806
|
name: "list",
|
|
49442
49807
|
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"
|
|
@@ -49455,7 +49820,7 @@ async function listDraft3(chat) {
|
|
|
49455
49820
|
failApi3(err);
|
|
49456
49821
|
}
|
|
49457
49822
|
}
|
|
49458
|
-
var draftCommand5 =
|
|
49823
|
+
var draftCommand5 = defineCommand203({
|
|
49459
49824
|
meta: {
|
|
49460
49825
|
name: "draft",
|
|
49461
49826
|
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."
|
|
@@ -49465,7 +49830,7 @@ var draftCommand5 = defineCommand202({
|
|
|
49465
49830
|
await listDraft3(args.chat);
|
|
49466
49831
|
}
|
|
49467
49832
|
});
|
|
49468
|
-
var tagsCommand4 =
|
|
49833
|
+
var tagsCommand4 = defineCommand203({
|
|
49469
49834
|
meta: {
|
|
49470
49835
|
name: "tags",
|
|
49471
49836
|
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.
|
|
@@ -49494,10 +49859,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
|
|
|
49494
49859
|
});
|
|
49495
49860
|
|
|
49496
49861
|
// src/commands/testimonials/index.ts
|
|
49497
|
-
import { defineCommand as
|
|
49862
|
+
import { defineCommand as defineCommand207 } from "citty";
|
|
49498
49863
|
|
|
49499
49864
|
// src/commands/testimonials/get.ts
|
|
49500
|
-
import { defineCommand as
|
|
49865
|
+
import { defineCommand as defineCommand204 } from "citty";
|
|
49501
49866
|
registerSchema({
|
|
49502
49867
|
command: "testimonials.get",
|
|
49503
49868
|
description: "Get a single testimonial by ID",
|
|
@@ -49505,7 +49870,7 @@ registerSchema({
|
|
|
49505
49870
|
id: { type: "string", description: "Testimonial ID", required: true }
|
|
49506
49871
|
}
|
|
49507
49872
|
});
|
|
49508
|
-
var getCommand6 =
|
|
49873
|
+
var getCommand6 = defineCommand204({
|
|
49509
49874
|
meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
|
|
49510
49875
|
args: {
|
|
49511
49876
|
id: { type: "positional", description: "Testimonial ID", required: false },
|
|
@@ -49542,7 +49907,7 @@ var getCommand6 = defineCommand203({
|
|
|
49542
49907
|
});
|
|
49543
49908
|
|
|
49544
49909
|
// src/commands/testimonials/list.ts
|
|
49545
|
-
import { defineCommand as
|
|
49910
|
+
import { defineCommand as defineCommand205 } from "citty";
|
|
49546
49911
|
|
|
49547
49912
|
// src/commands/testimonials/emptyCorpusHints.ts
|
|
49548
49913
|
function resolveEmptyReason({
|
|
@@ -49677,7 +50042,7 @@ function buildListParams(args) {
|
|
|
49677
50042
|
}
|
|
49678
50043
|
return params;
|
|
49679
50044
|
}
|
|
49680
|
-
var listCommand18 =
|
|
50045
|
+
var listCommand18 = defineCommand205({
|
|
49681
50046
|
meta: {
|
|
49682
50047
|
name: "list",
|
|
49683
50048
|
description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
|
|
@@ -49729,7 +50094,7 @@ var listCommand18 = defineCommand204({
|
|
|
49729
50094
|
});
|
|
49730
50095
|
|
|
49731
50096
|
// src/commands/testimonials/search.ts
|
|
49732
|
-
import { defineCommand as
|
|
50097
|
+
import { defineCommand as defineCommand206 } from "citty";
|
|
49733
50098
|
var FILTER_FLAGS2 = ["source", "rating-min", "rating-max", "status", "sentiment", "language", "tags"];
|
|
49734
50099
|
function languageBiasHint(results, requestedLanguage) {
|
|
49735
50100
|
if (requestedLanguage) {
|
|
@@ -49808,7 +50173,7 @@ function buildSearchRequest(query, args) {
|
|
|
49808
50173
|
}
|
|
49809
50174
|
return body;
|
|
49810
50175
|
}
|
|
49811
|
-
var searchCommand3 =
|
|
50176
|
+
var searchCommand3 = defineCommand206({
|
|
49812
50177
|
meta: {
|
|
49813
50178
|
name: "search",
|
|
49814
50179
|
description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
|
|
@@ -49872,7 +50237,7 @@ var searchCommand3 = defineCommand205({
|
|
|
49872
50237
|
var tagsCommand5 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
|
|
49873
50238
|
|
|
49874
50239
|
// src/commands/testimonials/index.ts
|
|
49875
|
-
var testimonialsCommand =
|
|
50240
|
+
var testimonialsCommand = defineCommand207({
|
|
49876
50241
|
meta: {
|
|
49877
50242
|
name: "testimonials",
|
|
49878
50243
|
description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
|
|
@@ -49894,10 +50259,10 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
|
|
|
49894
50259
|
});
|
|
49895
50260
|
|
|
49896
50261
|
// src/commands/videos/index.ts
|
|
49897
|
-
import { defineCommand as
|
|
50262
|
+
import { defineCommand as defineCommand214 } from "citty";
|
|
49898
50263
|
|
|
49899
50264
|
// src/commands/videos/delete.ts
|
|
49900
|
-
import { defineCommand as
|
|
50265
|
+
import { defineCommand as defineCommand208 } from "citty";
|
|
49901
50266
|
registerSchema({
|
|
49902
50267
|
command: "videos.delete",
|
|
49903
50268
|
description: "Delete a video by ID",
|
|
@@ -49911,7 +50276,7 @@ registerSchema({
|
|
|
49911
50276
|
}
|
|
49912
50277
|
}
|
|
49913
50278
|
});
|
|
49914
|
-
var deleteCommand4 =
|
|
50279
|
+
var deleteCommand4 = defineCommand208({
|
|
49915
50280
|
meta: {
|
|
49916
50281
|
name: "delete",
|
|
49917
50282
|
description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
|
|
@@ -49952,7 +50317,7 @@ var deleteCommand4 = defineCommand207({
|
|
|
49952
50317
|
});
|
|
49953
50318
|
|
|
49954
50319
|
// src/commands/videos/get.ts
|
|
49955
|
-
import { defineCommand as
|
|
50320
|
+
import { defineCommand as defineCommand209 } from "citty";
|
|
49956
50321
|
registerSchema({
|
|
49957
50322
|
command: "videos.get",
|
|
49958
50323
|
description: "Get a single video by ID",
|
|
@@ -49960,7 +50325,7 @@ registerSchema({
|
|
|
49960
50325
|
id: { type: "string", description: "Video ID", required: true }
|
|
49961
50326
|
}
|
|
49962
50327
|
});
|
|
49963
|
-
var getCommand7 =
|
|
50328
|
+
var getCommand7 = defineCommand209({
|
|
49964
50329
|
meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
|
|
49965
50330
|
args: {
|
|
49966
50331
|
id: { type: "positional", description: "Video ID", required: false },
|
|
@@ -49997,7 +50362,7 @@ var getCommand7 = defineCommand208({
|
|
|
49997
50362
|
});
|
|
49998
50363
|
|
|
49999
50364
|
// src/commands/videos/group.ts
|
|
50000
|
-
import { defineCommand as
|
|
50365
|
+
import { defineCommand as defineCommand210 } from "citty";
|
|
50001
50366
|
registerSchema({
|
|
50002
50367
|
command: "videos.group",
|
|
50003
50368
|
description: "List every clip and image that arrived in the same set as this video (carousel slides, one page)",
|
|
@@ -50006,7 +50371,7 @@ registerSchema({
|
|
|
50006
50371
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
50007
50372
|
}
|
|
50008
50373
|
});
|
|
50009
|
-
var groupCommand2 =
|
|
50374
|
+
var groupCommand2 = defineCommand210({
|
|
50010
50375
|
meta: {
|
|
50011
50376
|
name: "group",
|
|
50012
50377
|
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>"
|
|
@@ -50029,7 +50394,7 @@ var groupCommand2 = defineCommand209({
|
|
|
50029
50394
|
import { mkdtemp as mkdtemp2, rm as rm7, stat as stat7 } from "fs/promises";
|
|
50030
50395
|
import { tmpdir as tmpdir3 } from "os";
|
|
50031
50396
|
import path39 from "path";
|
|
50032
|
-
import { defineCommand as
|
|
50397
|
+
import { defineCommand as defineCommand211 } from "citty";
|
|
50033
50398
|
|
|
50034
50399
|
// src/lib/streamUpload.ts
|
|
50035
50400
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -50193,7 +50558,7 @@ registerSchema({
|
|
|
50193
50558
|
"dry-run": { type: "boolean", description: "Preview the operation without executing", required: false }
|
|
50194
50559
|
}
|
|
50195
50560
|
});
|
|
50196
|
-
var ingestCommand2 =
|
|
50561
|
+
var ingestCommand2 = defineCommand211({
|
|
50197
50562
|
meta: {
|
|
50198
50563
|
name: "ingest",
|
|
50199
50564
|
description: "Add a video to the library from a URL. A direct file URL is handed straight to Baker, which fetches it. A page URL (YouTube, TikTok, Vimeo, Instagram) is downloaded here first, then uploaded \u2014 and a direct URL that Baker cannot fetch falls back to that same path automatically.\n\nExample: baker videos ingest https://www.youtube.com/watch?v=abc123"
|
|
@@ -50309,35 +50674,35 @@ async function ingestByRoute(args, direct, country) {
|
|
|
50309
50674
|
function reportYtDlpFailure(err) {
|
|
50310
50675
|
const detail = `${err.stderrTail} ${err.message}`;
|
|
50311
50676
|
if (isProxyFailure(ytDlpBlockSignal(detail))) {
|
|
50312
|
-
|
|
50677
|
+
fail8(
|
|
50313
50678
|
"Couldn't download that video: our connection to the internet was refused.",
|
|
50314
50679
|
"This is Baker's egress proxy, not the link \u2014 its credentials look wrong or expired. The link is probably fine. Report it; retrying won't help until the proxy is fixed."
|
|
50315
50680
|
);
|
|
50316
50681
|
}
|
|
50317
50682
|
if (isDrmProtected(detail)) {
|
|
50318
|
-
|
|
50683
|
+
fail8(
|
|
50319
50684
|
"That video is copy-protected, so it can't be added to the library.",
|
|
50320
50685
|
"The publisher encrypted this one against downloading. Nothing will change that \u2014 not retrying, not a different region. Ask whoever owns the video for the original file and add it with `baker videos upload <file>`."
|
|
50321
50686
|
);
|
|
50322
50687
|
}
|
|
50323
50688
|
if (isVimeoAuthFailure(detail)) {
|
|
50324
|
-
|
|
50689
|
+
fail8(
|
|
50325
50690
|
"Vimeo wouldn't hand over that video \u2014 Baker isn't signed in to Vimeo.",
|
|
50326
50691
|
"Vimeo now refuses anonymous downloads entirely, so this needs a signed-in session and the one Baker holds has either expired or was never set. Nothing is wrong with the link. Report it so the Vimeo cookie can be refreshed; meanwhile download the file and use `baker videos upload <file>`."
|
|
50327
50692
|
);
|
|
50328
50693
|
}
|
|
50329
50694
|
if (isRegionBlocked(detail)) {
|
|
50330
|
-
|
|
50695
|
+
fail8(
|
|
50331
50696
|
`That video isn't available in the region we're fetching from. ${err.stderrTail || err.message}`,
|
|
50332
50697
|
"Re-run with `--country <two-letter code>` for a country where the video plays \u2014 e.g. `--country US`. Pick the one the video belongs to (the uploader's country is the usual answer); each attempt costs a paid connection, so choose rather than work through the list."
|
|
50333
50698
|
);
|
|
50334
50699
|
}
|
|
50335
|
-
|
|
50700
|
+
fail8(
|
|
50336
50701
|
`Couldn't download that video. ${err.stderrTail || err.message}`,
|
|
50337
50702
|
isToolingOrBlockFailure(detail) ? "The site wouldn't hand over the video \u2014 usually the downloader being out of date against a site that changed, or the request being blocked. Retrying won't help, and the link is probably fine. Report it so the tool can be updated; meanwhile download the file and use `baker videos upload <file>`." : "Check the link is public and playable. Private or age-restricted videos can't be downloaded \u2014 download the file yourself and use `baker videos upload <file>`."
|
|
50338
50703
|
);
|
|
50339
50704
|
}
|
|
50340
|
-
function
|
|
50705
|
+
function fail8(message, fix, code = "INGEST_FAILED") {
|
|
50341
50706
|
writeJson({ ok: false, error: { code, message, fix } });
|
|
50342
50707
|
process.exit(1);
|
|
50343
50708
|
}
|
|
@@ -50349,13 +50714,13 @@ function reportIngestFailure(err) {
|
|
|
50349
50714
|
if (err instanceof YtDlpError) reportYtDlpFailure(err);
|
|
50350
50715
|
const detail = err instanceof Error ? err.message : String(err);
|
|
50351
50716
|
if (detail.includes("timed out after")) {
|
|
50352
|
-
|
|
50717
|
+
fail8(
|
|
50353
50718
|
"That video took too long to download and was stopped part-way.",
|
|
50354
50719
|
"Long or slow-serving videos can outrun the download window. Try a shorter clip, or download this one yourself and use `baker videos upload <file>`.",
|
|
50355
50720
|
"INTERNAL_ERROR"
|
|
50356
50721
|
);
|
|
50357
50722
|
}
|
|
50358
|
-
|
|
50723
|
+
fail8(
|
|
50359
50724
|
`Couldn't add that video. ${detail}`,
|
|
50360
50725
|
"This is a fault on Baker's side, not a problem with the link. Report it.",
|
|
50361
50726
|
"INTERNAL_ERROR"
|
|
@@ -50455,7 +50820,7 @@ async function uploadToAssetStore(filePath, sizeBytes) {
|
|
|
50455
50820
|
}
|
|
50456
50821
|
|
|
50457
50822
|
// src/commands/videos/search.ts
|
|
50458
|
-
import { defineCommand as
|
|
50823
|
+
import { defineCommand as defineCommand212 } from "citty";
|
|
50459
50824
|
registerSchema({
|
|
50460
50825
|
command: "videos.search",
|
|
50461
50826
|
description: "Search videos by text query. Only returns ready videos.",
|
|
@@ -50465,7 +50830,7 @@ registerSchema({
|
|
|
50465
50830
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
50466
50831
|
}
|
|
50467
50832
|
});
|
|
50468
|
-
var searchCommand4 =
|
|
50833
|
+
var searchCommand4 = defineCommand212({
|
|
50469
50834
|
meta: {
|
|
50470
50835
|
name: "search",
|
|
50471
50836
|
description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
|
|
@@ -50517,7 +50882,7 @@ var tagsCommand6 = makeTagsCommand("videos", "video", "/api/videos/tags");
|
|
|
50517
50882
|
// src/commands/videos/upload.ts
|
|
50518
50883
|
import { readFile as readFile25, stat as stat8 } from "fs/promises";
|
|
50519
50884
|
import { basename as basename3, extname as extname4 } from "path";
|
|
50520
|
-
import { defineCommand as
|
|
50885
|
+
import { defineCommand as defineCommand213 } from "citty";
|
|
50521
50886
|
var MIME_MAP = {
|
|
50522
50887
|
".mp4": "video/mp4",
|
|
50523
50888
|
".mov": "video/quicktime",
|
|
@@ -50559,7 +50924,7 @@ function detectContentType(filePath) {
|
|
|
50559
50924
|
function isRemoteUrl3(value) {
|
|
50560
50925
|
return /^https?:\/\//i.test(value);
|
|
50561
50926
|
}
|
|
50562
|
-
var uploadCommand2 =
|
|
50927
|
+
var uploadCommand2 = defineCommand213({
|
|
50563
50928
|
meta: {
|
|
50564
50929
|
name: "upload",
|
|
50565
50930
|
description: "Upload a video to Baker \u2014 accepts a local file path OR a remote http(s) URL.\n\nLocal: auto-detects content type and uploads via Mux direct upload.\nRemote: hands off to `videos ingest` (direct fetch, or download-then-upload for a YouTube/TikTok/Vimeo page).\n\nExamples:\n baker videos upload ./demo.mp4\n baker videos upload https://www.youtube.com/watch?v=abc123"
|
|
@@ -50643,7 +51008,7 @@ var uploadCommand2 = defineCommand212({
|
|
|
50643
51008
|
});
|
|
50644
51009
|
|
|
50645
51010
|
// src/commands/videos/index.ts
|
|
50646
|
-
var videosCommand =
|
|
51011
|
+
var videosCommand = defineCommand214({
|
|
50647
51012
|
meta: {
|
|
50648
51013
|
name: "videos",
|
|
50649
51014
|
description: `Find and manage videos in Baker. Subcommands: search, get, upload, ingest, delete, tags.
|
|
@@ -50670,10 +51035,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
|
|
|
50670
51035
|
});
|
|
50671
51036
|
|
|
50672
51037
|
// src/commands/winning-ads/index.ts
|
|
50673
|
-
import { defineCommand as
|
|
51038
|
+
import { defineCommand as defineCommand227 } from "citty";
|
|
50674
51039
|
|
|
50675
51040
|
// src/commands/winning-ads/advertisers.ts
|
|
50676
|
-
import { defineCommand as
|
|
51041
|
+
import { defineCommand as defineCommand215 } from "citty";
|
|
50677
51042
|
|
|
50678
51043
|
// src/commands/winning-ads/shared.ts
|
|
50679
51044
|
function splitList2(value) {
|
|
@@ -50726,7 +51091,7 @@ function advertiserNormalizer(record, full) {
|
|
|
50726
51091
|
last_synced_at: record.last_synced_at ?? null
|
|
50727
51092
|
};
|
|
50728
51093
|
}
|
|
50729
|
-
var advertisersCommand2 =
|
|
51094
|
+
var advertisersCommand2 = defineCommand215({
|
|
50730
51095
|
meta: {
|
|
50731
51096
|
name: "advertisers",
|
|
50732
51097
|
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'
|
|
@@ -50784,7 +51149,7 @@ var advertisersCommand2 = defineCommand214({
|
|
|
50784
51149
|
});
|
|
50785
51150
|
|
|
50786
51151
|
// src/commands/winning-ads/brief.ts
|
|
50787
|
-
import { defineCommand as
|
|
51152
|
+
import { defineCommand as defineCommand216 } from "citty";
|
|
50788
51153
|
registerSchema({
|
|
50789
51154
|
command: "winning-ads.brief",
|
|
50790
51155
|
description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
|
|
@@ -50830,7 +51195,7 @@ function parseDna(raw) {
|
|
|
50830
51195
|
}
|
|
50831
51196
|
return parsed;
|
|
50832
51197
|
}
|
|
50833
|
-
var briefCommand =
|
|
51198
|
+
var briefCommand = defineCommand216({
|
|
50834
51199
|
meta: {
|
|
50835
51200
|
name: "brief",
|
|
50836
51201
|
description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
|
|
@@ -50866,7 +51231,7 @@ var briefCommand = defineCommand215({
|
|
|
50866
51231
|
});
|
|
50867
51232
|
|
|
50868
51233
|
// src/commands/winning-ads/content.ts
|
|
50869
|
-
import { defineCommand as
|
|
51234
|
+
import { defineCommand as defineCommand217 } from "citty";
|
|
50870
51235
|
registerSchema({
|
|
50871
51236
|
command: "winning-ads.content",
|
|
50872
51237
|
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.",
|
|
@@ -50879,7 +51244,7 @@ registerSchema({
|
|
|
50879
51244
|
}
|
|
50880
51245
|
}
|
|
50881
51246
|
});
|
|
50882
|
-
var contentCommand =
|
|
51247
|
+
var contentCommand = defineCommand217({
|
|
50883
51248
|
meta: {
|
|
50884
51249
|
name: "content",
|
|
50885
51250
|
description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
|
|
@@ -50928,7 +51293,7 @@ var contentCommand = defineCommand216({
|
|
|
50928
51293
|
});
|
|
50929
51294
|
|
|
50930
51295
|
// src/commands/winning-ads/feed.ts
|
|
50931
|
-
import { defineCommand as
|
|
51296
|
+
import { defineCommand as defineCommand218 } from "citty";
|
|
50932
51297
|
function buildFeedParams(input) {
|
|
50933
51298
|
const params = {};
|
|
50934
51299
|
const advertiser = splitList2(input.advertiser);
|
|
@@ -50980,7 +51345,7 @@ registerSchema({
|
|
|
50980
51345
|
format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
|
|
50981
51346
|
}
|
|
50982
51347
|
});
|
|
50983
|
-
var feedCommand =
|
|
51348
|
+
var feedCommand = defineCommand218({
|
|
50984
51349
|
meta: {
|
|
50985
51350
|
name: "feed",
|
|
50986
51351
|
description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
|
|
@@ -51065,7 +51430,7 @@ var feedCommand = defineCommand217({
|
|
|
51065
51430
|
});
|
|
51066
51431
|
|
|
51067
51432
|
// src/commands/winning-ads/follow.ts
|
|
51068
|
-
import { defineCommand as
|
|
51433
|
+
import { defineCommand as defineCommand219 } from "citty";
|
|
51069
51434
|
var PLATFORMS = ["meta", "linkedin"];
|
|
51070
51435
|
registerSchema({
|
|
51071
51436
|
command: "winning-ads.follow",
|
|
@@ -51080,7 +51445,7 @@ registerSchema({
|
|
|
51080
51445
|
label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
|
|
51081
51446
|
}
|
|
51082
51447
|
});
|
|
51083
|
-
var followCommand =
|
|
51448
|
+
var followCommand = defineCommand219({
|
|
51084
51449
|
meta: {
|
|
51085
51450
|
name: "follow",
|
|
51086
51451
|
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'
|
|
@@ -51127,7 +51492,7 @@ var followCommand = defineCommand218({
|
|
|
51127
51492
|
});
|
|
51128
51493
|
|
|
51129
51494
|
// src/commands/winning-ads/follow-competitors.ts
|
|
51130
|
-
import { defineCommand as
|
|
51495
|
+
import { defineCommand as defineCommand220 } from "citty";
|
|
51131
51496
|
var PLATFORMS2 = ["meta", "linkedin"];
|
|
51132
51497
|
var BATCH_TIMEOUT_MS = 3e5;
|
|
51133
51498
|
function buildFollowBatchBody(input) {
|
|
@@ -51160,7 +51525,7 @@ registerSchema({
|
|
|
51160
51525
|
}
|
|
51161
51526
|
}
|
|
51162
51527
|
});
|
|
51163
|
-
var followCompetitorsCommand =
|
|
51528
|
+
var followCompetitorsCommand = defineCommand220({
|
|
51164
51529
|
meta: {
|
|
51165
51530
|
name: "follow-competitors",
|
|
51166
51531
|
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"'
|
|
@@ -51235,7 +51600,7 @@ var followCompetitorsCommand = defineCommand219({
|
|
|
51235
51600
|
});
|
|
51236
51601
|
|
|
51237
51602
|
// src/commands/winning-ads/following.ts
|
|
51238
|
-
import { defineCommand as
|
|
51603
|
+
import { defineCommand as defineCommand221 } from "citty";
|
|
51239
51604
|
registerSchema({
|
|
51240
51605
|
command: "winning-ads.following",
|
|
51241
51606
|
description: "List the brands you follow in your ad-dna library, with each one's status (ready vs still adding) and cached ad counts. A brand still adding has counts that are a lie in progress; one with `discovery_failed` has counts that are short because we couldn't finish looking, which is not the same as it running no ads.",
|
|
@@ -51289,7 +51654,7 @@ function followingNormalizer(record, full) {
|
|
|
51289
51654
|
platforms: Array.isArray(record.platforms) ? record.platforms : []
|
|
51290
51655
|
};
|
|
51291
51656
|
}
|
|
51292
|
-
var followingCommand =
|
|
51657
|
+
var followingCommand = defineCommand221({
|
|
51293
51658
|
meta: {
|
|
51294
51659
|
name: "following",
|
|
51295
51660
|
description: "List brands you follow, with status (ready / adding\u2026) and cached counts. A brand's counts are only final once it is ready. Example: baker winning-ads following --output md"
|
|
@@ -51325,7 +51690,7 @@ var followingCommand = defineCommand220({
|
|
|
51325
51690
|
});
|
|
51326
51691
|
|
|
51327
51692
|
// src/commands/winning-ads/patterns.ts
|
|
51328
|
-
import { defineCommand as
|
|
51693
|
+
import { defineCommand as defineCommand222 } from "citty";
|
|
51329
51694
|
registerSchema({
|
|
51330
51695
|
command: "winning-ads.patterns",
|
|
51331
51696
|
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.",
|
|
@@ -51364,7 +51729,7 @@ function discriminatorRow(record) {
|
|
|
51364
51729
|
top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
|
|
51365
51730
|
};
|
|
51366
51731
|
}
|
|
51367
|
-
var patternsCommand =
|
|
51732
|
+
var patternsCommand = defineCommand222({
|
|
51368
51733
|
meta: {
|
|
51369
51734
|
name: "patterns",
|
|
51370
51735
|
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"
|
|
@@ -51420,7 +51785,7 @@ var patternsCommand = defineCommand221({
|
|
|
51420
51785
|
});
|
|
51421
51786
|
|
|
51422
51787
|
// src/commands/winning-ads/search.ts
|
|
51423
|
-
import { defineCommand as
|
|
51788
|
+
import { defineCommand as defineCommand223 } from "citty";
|
|
51424
51789
|
registerSchema({
|
|
51425
51790
|
command: "winning-ads.search",
|
|
51426
51791
|
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.",
|
|
@@ -51528,7 +51893,7 @@ function buildSearchBody2(args) {
|
|
|
51528
51893
|
}
|
|
51529
51894
|
return body;
|
|
51530
51895
|
}
|
|
51531
|
-
var searchCommand5 =
|
|
51896
|
+
var searchCommand5 = defineCommand223({
|
|
51532
51897
|
meta: {
|
|
51533
51898
|
name: "search",
|
|
51534
51899
|
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"
|
|
@@ -51643,7 +52008,7 @@ var searchCommand5 = defineCommand222({
|
|
|
51643
52008
|
});
|
|
51644
52009
|
|
|
51645
52010
|
// src/commands/winning-ads/seeds.ts
|
|
51646
|
-
import { defineCommand as
|
|
52011
|
+
import { defineCommand as defineCommand224 } from "citty";
|
|
51647
52012
|
function leanRow(r) {
|
|
51648
52013
|
return {
|
|
51649
52014
|
key: r.key,
|
|
@@ -51671,7 +52036,7 @@ function makeSeedCommand(opts) {
|
|
|
51671
52036
|
limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
|
|
51672
52037
|
}
|
|
51673
52038
|
});
|
|
51674
|
-
return
|
|
52039
|
+
return defineCommand224({
|
|
51675
52040
|
meta: { name: opts.name, description: opts.description },
|
|
51676
52041
|
args: {
|
|
51677
52042
|
platform: { type: "string", description: "Single platform to segment on", required: false },
|
|
@@ -51720,7 +52085,7 @@ var formatsCommand = makeSeedCommand({
|
|
|
51720
52085
|
});
|
|
51721
52086
|
|
|
51722
52087
|
// src/commands/winning-ads/unfollow.ts
|
|
51723
|
-
import { defineCommand as
|
|
52088
|
+
import { defineCommand as defineCommand225 } from "citty";
|
|
51724
52089
|
registerSchema({
|
|
51725
52090
|
command: "winning-ads.unfollow",
|
|
51726
52091
|
description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
|
|
@@ -51728,7 +52093,7 @@ registerSchema({
|
|
|
51728
52093
|
advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
|
|
51729
52094
|
}
|
|
51730
52095
|
});
|
|
51731
|
-
var unfollowCommand =
|
|
52096
|
+
var unfollowCommand = defineCommand225({
|
|
51732
52097
|
meta: {
|
|
51733
52098
|
name: "unfollow",
|
|
51734
52099
|
description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
|
|
@@ -51749,7 +52114,7 @@ var unfollowCommand = defineCommand224({
|
|
|
51749
52114
|
});
|
|
51750
52115
|
|
|
51751
52116
|
// src/commands/winning-ads/winners.ts
|
|
51752
|
-
import { defineCommand as
|
|
52117
|
+
import { defineCommand as defineCommand226 } from "citty";
|
|
51753
52118
|
registerSchema({
|
|
51754
52119
|
command: "winning-ads.winners",
|
|
51755
52120
|
description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
|
|
@@ -51759,7 +52124,7 @@ registerSchema({
|
|
|
51759
52124
|
platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
|
|
51760
52125
|
}
|
|
51761
52126
|
});
|
|
51762
|
-
var winnersCommand =
|
|
52127
|
+
var winnersCommand = defineCommand226({
|
|
51763
52128
|
meta: {
|
|
51764
52129
|
name: "winners",
|
|
51765
52130
|
description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
|
|
@@ -51809,7 +52174,7 @@ var winnersCommand = defineCommand225({
|
|
|
51809
52174
|
});
|
|
51810
52175
|
|
|
51811
52176
|
// src/commands/winning-ads/index.ts
|
|
51812
|
-
var winningAdsCommand =
|
|
52177
|
+
var winningAdsCommand = defineCommand227({
|
|
51813
52178
|
meta: {
|
|
51814
52179
|
name: "winning-ads",
|
|
51815
52180
|
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.
|
|
@@ -52047,7 +52412,7 @@ function getCliVersion() {
|
|
|
52047
52412
|
}
|
|
52048
52413
|
|
|
52049
52414
|
// src/cli.ts
|
|
52050
|
-
var main =
|
|
52415
|
+
var main = defineCommand228({
|
|
52051
52416
|
meta: {
|
|
52052
52417
|
name: "baker",
|
|
52053
52418
|
version: getCliVersion(),
|
|
@@ -52066,6 +52431,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
|
|
|
52066
52431
|
ads: adsCommand2,
|
|
52067
52432
|
brand: brandCommand,
|
|
52068
52433
|
analytics: analyticsCommand2,
|
|
52434
|
+
experiment: experimentCommand,
|
|
52069
52435
|
ga4: ga4Command,
|
|
52070
52436
|
gsc: gscCommand,
|
|
52071
52437
|
research: researchCommand,
|