@koda-sl/baker-cli 0.237.0 → 0.238.0-dev.43aacdb9e
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 +36 -0
- package/dist/{chunk-EKLAHWSF.js → chunk-CMPAHYLB.js} +4 -4
- package/dist/chunk-CMPAHYLB.js.map +1 -0
- package/dist/cli.js +638 -322
- 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"]);
|
|
@@ -32619,7 +32646,7 @@ registerSchema({
|
|
|
32619
32646
|
}
|
|
32620
32647
|
}
|
|
32621
32648
|
});
|
|
32622
|
-
function capabilityHints(surfaces) {
|
|
32649
|
+
function capabilityHints(surfaces, tools = []) {
|
|
32623
32650
|
const hints = [];
|
|
32624
32651
|
const immediate = surfaces.filter((surface) => surface.writeMode === "applies-at-publish");
|
|
32625
32652
|
if (immediate.length > 0) {
|
|
@@ -32642,6 +32669,18 @@ function capabilityHints(surfaces) {
|
|
|
32642
32669
|
"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."
|
|
32643
32670
|
);
|
|
32644
32671
|
}
|
|
32672
|
+
const usable = tools.filter((tool) => tool.ready);
|
|
32673
|
+
if (usable.length > 0) {
|
|
32674
|
+
hints.push(
|
|
32675
|
+
`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.`
|
|
32676
|
+
);
|
|
32677
|
+
}
|
|
32678
|
+
const broken = tools.filter((tool) => !tool.ready);
|
|
32679
|
+
if (broken.length > 0) {
|
|
32680
|
+
hints.push(
|
|
32681
|
+
`CONNECTED BUT UNUSABLE: ${broken.map((tool) => `${tool.label} \u2014 ${tool.note ?? "not reachable"}`).join(" ")} Tell the user rather than planning around it silently.`
|
|
32682
|
+
);
|
|
32683
|
+
}
|
|
32645
32684
|
return hints;
|
|
32646
32685
|
}
|
|
32647
32686
|
var runCapabilities = defineCommand108({
|
|
@@ -32651,6 +32690,8 @@ var runCapabilities = defineCommand108({
|
|
|
32651
32690
|
|
|
32652
32691
|
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.
|
|
32653
32692
|
|
|
32693
|
+
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".
|
|
32694
|
+
|
|
32654
32695
|
Examples:
|
|
32655
32696
|
baker capabilities
|
|
32656
32697
|
baker capabilities google-ads
|
|
@@ -32686,7 +32727,7 @@ Full guide: __tooling__/docs/tools/baker/capabilities.md`
|
|
|
32686
32727
|
body.full = true;
|
|
32687
32728
|
}
|
|
32688
32729
|
const response = await apiPost("/api/capabilities", body);
|
|
32689
|
-
const hints = capabilityHints(response.data.surfaces);
|
|
32730
|
+
const hints = capabilityHints(response.data.surfaces, response.data.tools);
|
|
32690
32731
|
writeJson({
|
|
32691
32732
|
...response,
|
|
32692
32733
|
meta: { count: response.data.surfaces.length },
|
|
@@ -33156,12 +33197,286 @@ Full guide: __tooling__/docs/tools/baker/creatives.md`
|
|
|
33156
33197
|
}
|
|
33157
33198
|
});
|
|
33158
33199
|
|
|
33200
|
+
// src/commands/experiment/index.ts
|
|
33201
|
+
import { defineCommand as defineCommand112 } from "citty";
|
|
33202
|
+
|
|
33203
|
+
// src/commands/experiment/goal.ts
|
|
33204
|
+
function parseEventGoal(argument) {
|
|
33205
|
+
const [name, filter] = argument.split("/");
|
|
33206
|
+
if (!name) return { error: "Name the event: --goal event:request_demo" };
|
|
33207
|
+
if (!filter) return { kind: "custom_event", name };
|
|
33208
|
+
const separator = filter.indexOf("=");
|
|
33209
|
+
if (separator === -1) {
|
|
33210
|
+
return { error: `Write the property as key=value: --goal event:${name}/section=pricing` };
|
|
33211
|
+
}
|
|
33212
|
+
return { kind: "custom_event", name, property: filter.slice(0, separator), value: filter.slice(separator + 1) };
|
|
33213
|
+
}
|
|
33214
|
+
function parseGoal(raw) {
|
|
33215
|
+
if (raw === void 0 || raw === "") return void 0;
|
|
33216
|
+
const separator = raw.indexOf(":");
|
|
33217
|
+
const kind = separator === -1 ? raw : raw.slice(0, separator);
|
|
33218
|
+
const argument = separator === -1 ? "" : raw.slice(separator + 1);
|
|
33219
|
+
if (kind === "leads") return argument ? { kind: "conversion", flowSlug: argument } : { kind: "conversion" };
|
|
33220
|
+
if (kind === "click") return argument ? { kind: "outbound_click", targetHost: argument } : { kind: "outbound_click" };
|
|
33221
|
+
if (kind === "event") return parseEventGoal(argument);
|
|
33222
|
+
return {
|
|
33223
|
+
error: `Unknown goal "${raw}". Use leads, leads:<form>, event:<name>, event:<name>/<key>=<value>, click, or click:<host>`
|
|
33224
|
+
};
|
|
33225
|
+
}
|
|
33226
|
+
|
|
33227
|
+
// src/commands/experiment/hints.ts
|
|
33228
|
+
var RUNNING_HINT = {
|
|
33229
|
+
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."}`,
|
|
33230
|
+
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.`,
|
|
33231
|
+
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.`,
|
|
33232
|
+
stopped_early_harmful: (row) => `${row.experimentId} is doing damage. Finish it now \u2014 traffic goes back to the original page.`,
|
|
33233
|
+
// Unreachable in practice — only `finish --abandon` produces it, and that
|
|
33234
|
+
// leaves the test finished. The Record is exhaustive by type so a verdict
|
|
33235
|
+
// added upstream fails to compile here rather than printing nothing.
|
|
33236
|
+
abandoned: (row) => `${row.experimentId} was stopped before it concluded and found nothing.`,
|
|
33237
|
+
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.`
|
|
33238
|
+
};
|
|
33239
|
+
function buildStatusHints(experiments) {
|
|
33240
|
+
const hints = experiments.filter((row) => row.status === "running").map((row) => RUNNING_HINT[row.verdict](row));
|
|
33241
|
+
if (experiments.length === 0) {
|
|
33242
|
+
hints.push(
|
|
33243
|
+
"No tests yet. `baker experiment plan --landing <slug> --variant <slug>` says whether a page has enough traffic for one before you build the alternative."
|
|
33244
|
+
);
|
|
33245
|
+
}
|
|
33246
|
+
return hints;
|
|
33247
|
+
}
|
|
33248
|
+
function buildPlanHints(plan) {
|
|
33249
|
+
if (!plan.canRun) {
|
|
33250
|
+
return [
|
|
33251
|
+
plan.reason ?? "This test cannot run on this page.",
|
|
33252
|
+
"A test that cannot conclude is worse than no test \u2014 it still produces a number, and somebody acts on it."
|
|
33253
|
+
];
|
|
33254
|
+
}
|
|
33255
|
+
const hints = [
|
|
33256
|
+
`This test measures ${plan.goalLabel}. That is fixed when it starts and cannot be changed later.`,
|
|
33257
|
+
// Fires at the exact moment the hypothesis gets invented, whether or not
|
|
33258
|
+
// the agent read the family doc. `plan` says a question CAN be settled here
|
|
33259
|
+
// and says nothing about which question is worth asking — and a well-run
|
|
33260
|
+
// test of a bad idea costs three weeks and returns `no_difference`.
|
|
33261
|
+
"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.",
|
|
33262
|
+
// The base always works, so a missing integration is never a reason to
|
|
33263
|
+
// stop. Naming what it would have shown is worth more to the client than
|
|
33264
|
+
// either a silent gap or a run that waited.
|
|
33265
|
+
"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."
|
|
33266
|
+
];
|
|
33267
|
+
if (plan.estimatedDays !== null && plan.estimatedDays > 60) {
|
|
33268
|
+
hints.push(
|
|
33269
|
+
`At this page's traffic it would take about ${plan.estimatedDays} days. Consider testing a bigger change, which needs less traffic to detect.`
|
|
33270
|
+
);
|
|
33271
|
+
}
|
|
33272
|
+
return hints;
|
|
33273
|
+
}
|
|
33274
|
+
|
|
33275
|
+
// src/commands/experiment/index.ts
|
|
33276
|
+
var GOAL_ARG = {
|
|
33277
|
+
type: "string",
|
|
33278
|
+
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.",
|
|
33279
|
+
required: false
|
|
33280
|
+
};
|
|
33281
|
+
var LIFT_ARG = {
|
|
33282
|
+
type: "string",
|
|
33283
|
+
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.",
|
|
33284
|
+
required: false
|
|
33285
|
+
};
|
|
33286
|
+
function fail5(message) {
|
|
33287
|
+
writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
|
|
33288
|
+
process.exit(1);
|
|
33289
|
+
}
|
|
33290
|
+
function reportApiError(error) {
|
|
33291
|
+
if (error instanceof ApiError) {
|
|
33292
|
+
writeJsonEnvelope({ ok: false, error: { code: error.code ?? "ERROR", message: error.message } });
|
|
33293
|
+
process.exit(1);
|
|
33294
|
+
}
|
|
33295
|
+
throw error;
|
|
33296
|
+
}
|
|
33297
|
+
registerSchema({
|
|
33298
|
+
command: "experiment.plan",
|
|
33299
|
+
description: "Whether a page has enough traffic to settle a question, before anything is built",
|
|
33300
|
+
args: {
|
|
33301
|
+
landing: { type: "string", description: "The page under test, by slug", required: true },
|
|
33302
|
+
variant: { type: "string", description: "The alternative page's slug", required: true },
|
|
33303
|
+
goal: GOAL_ARG,
|
|
33304
|
+
lift: LIFT_ARG
|
|
33305
|
+
}
|
|
33306
|
+
});
|
|
33307
|
+
var planCommand = defineCommand112({
|
|
33308
|
+
meta: {
|
|
33309
|
+
name: "plan",
|
|
33310
|
+
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."
|
|
33311
|
+
},
|
|
33312
|
+
args: {
|
|
33313
|
+
landing: { type: "string", description: "The page under test, by slug", required: true },
|
|
33314
|
+
variant: { type: "string", description: "The alternative page's slug", required: true },
|
|
33315
|
+
goal: GOAL_ARG,
|
|
33316
|
+
lift: LIFT_ARG
|
|
33317
|
+
},
|
|
33318
|
+
run: async ({ args }) => {
|
|
33319
|
+
const goal = parseGoal(args.goal ? String(args.goal) : void 0);
|
|
33320
|
+
if (goal && "error" in goal) fail5(goal.error);
|
|
33321
|
+
try {
|
|
33322
|
+
const response = await apiPost("/api/experiments/plan", {
|
|
33323
|
+
landingSlug: String(args.landing),
|
|
33324
|
+
variantSlug: String(args.variant),
|
|
33325
|
+
...goal ? { goal } : {},
|
|
33326
|
+
...args.lift ? { minDetectableRelativeLift: Number(args.lift) } : {}
|
|
33327
|
+
});
|
|
33328
|
+
writeJsonEnvelope({ ok: true, data: response.data, hints: buildPlanHints(response.data) });
|
|
33329
|
+
} catch (error) {
|
|
33330
|
+
reportApiError(error);
|
|
33331
|
+
}
|
|
33332
|
+
}
|
|
33333
|
+
});
|
|
33334
|
+
registerSchema({
|
|
33335
|
+
command: "experiment.start",
|
|
33336
|
+
description: "Stage an A/B test between a page and its alternative",
|
|
33337
|
+
args: {
|
|
33338
|
+
landing: { type: "string", description: "The page under test, by slug", required: true },
|
|
33339
|
+
variant: { type: "string", description: "The alternative page's slug", required: true },
|
|
33340
|
+
hypothesis: { type: "string", description: "What should change and why it should convert better", required: true },
|
|
33341
|
+
goal: GOAL_ARG,
|
|
33342
|
+
lift: LIFT_ARG
|
|
33343
|
+
}
|
|
33344
|
+
});
|
|
33345
|
+
var startCommand = defineCommand112({
|
|
33346
|
+
meta: {
|
|
33347
|
+
name: "start",
|
|
33348
|
+
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."
|
|
33349
|
+
},
|
|
33350
|
+
args: {
|
|
33351
|
+
landing: { type: "string", description: "The page under test, by slug", required: true },
|
|
33352
|
+
variant: { type: "string", description: "The alternative page's slug", required: true },
|
|
33353
|
+
hypothesis: { type: "string", description: "What should change and why it should convert better", required: true },
|
|
33354
|
+
goal: GOAL_ARG,
|
|
33355
|
+
lift: LIFT_ARG
|
|
33356
|
+
},
|
|
33357
|
+
run: async ({ args }) => {
|
|
33358
|
+
const goal = parseGoal(args.goal ? String(args.goal) : void 0);
|
|
33359
|
+
if (goal && "error" in goal) fail5(goal.error);
|
|
33360
|
+
try {
|
|
33361
|
+
const response = await apiPost("/api/experiments/start", {
|
|
33362
|
+
landingSlug: String(args.landing),
|
|
33363
|
+
variantSlug: String(args.variant),
|
|
33364
|
+
hypothesis: String(args.hypothesis),
|
|
33365
|
+
...goal ? { goal } : {},
|
|
33366
|
+
...args.lift ? { minDetectableRelativeLift: Number(args.lift) } : {}
|
|
33367
|
+
});
|
|
33368
|
+
writeJsonEnvelope({
|
|
33369
|
+
ok: true,
|
|
33370
|
+
data: response.data,
|
|
33371
|
+
hints: [
|
|
33372
|
+
"Staged. The split starts when this session is published \u2014 publishing is the review of the alternative page.",
|
|
33373
|
+
"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."
|
|
33374
|
+
]
|
|
33375
|
+
});
|
|
33376
|
+
} catch (error) {
|
|
33377
|
+
reportApiError(error);
|
|
33378
|
+
}
|
|
33379
|
+
}
|
|
33380
|
+
});
|
|
33381
|
+
registerSchema({
|
|
33382
|
+
command: "experiment.status",
|
|
33383
|
+
description: "The verdict on every A/B test, running and finished",
|
|
33384
|
+
args: {
|
|
33385
|
+
id: { type: "string", description: "One test, by its id", required: false },
|
|
33386
|
+
full: { type: "boolean", description: "Include the posteriors behind the verdict", required: false }
|
|
33387
|
+
}
|
|
33388
|
+
});
|
|
33389
|
+
var statusCommand4 = defineCommand112({
|
|
33390
|
+
meta: {
|
|
33391
|
+
name: "status",
|
|
33392
|
+
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."
|
|
33393
|
+
},
|
|
33394
|
+
args: {
|
|
33395
|
+
id: { type: "string", description: "One test, by its id", required: false },
|
|
33396
|
+
full: { type: "boolean", description: "Include the posteriors behind the verdict", required: false }
|
|
33397
|
+
},
|
|
33398
|
+
run: async ({ args }) => {
|
|
33399
|
+
try {
|
|
33400
|
+
const response = await apiPost("/api/experiments/status", {
|
|
33401
|
+
...args.id ? { experimentId: String(args.id) } : {},
|
|
33402
|
+
...args.full === true ? { full: true } : {}
|
|
33403
|
+
});
|
|
33404
|
+
writeJsonEnvelope({
|
|
33405
|
+
ok: true,
|
|
33406
|
+
data: response.data,
|
|
33407
|
+
hints: buildStatusHints(response.data.experiments)
|
|
33408
|
+
});
|
|
33409
|
+
} catch (error) {
|
|
33410
|
+
reportApiError(error);
|
|
33411
|
+
}
|
|
33412
|
+
}
|
|
33413
|
+
});
|
|
33414
|
+
registerSchema({
|
|
33415
|
+
command: "experiment.finish",
|
|
33416
|
+
description: "End a test and send all its traffic to the surviving page",
|
|
33417
|
+
args: {
|
|
33418
|
+
id: { type: "string", description: "The test, by its id", required: true },
|
|
33419
|
+
abandon: {
|
|
33420
|
+
type: "boolean",
|
|
33421
|
+
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.",
|
|
33422
|
+
required: false
|
|
33423
|
+
}
|
|
33424
|
+
}
|
|
33425
|
+
});
|
|
33426
|
+
var finishCommand = defineCommand112({
|
|
33427
|
+
meta: {
|
|
33428
|
+
name: "finish",
|
|
33429
|
+
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."
|
|
33430
|
+
},
|
|
33431
|
+
args: {
|
|
33432
|
+
id: { type: "string", description: "The test, by its id", required: true },
|
|
33433
|
+
abandon: {
|
|
33434
|
+
type: "boolean",
|
|
33435
|
+
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.",
|
|
33436
|
+
required: false
|
|
33437
|
+
}
|
|
33438
|
+
},
|
|
33439
|
+
run: async ({ args }) => {
|
|
33440
|
+
try {
|
|
33441
|
+
const response = await apiPost("/api/experiments/finish", {
|
|
33442
|
+
experimentId: String(args.id),
|
|
33443
|
+
...args.abandon === true ? { abandon: true } : {}
|
|
33444
|
+
});
|
|
33445
|
+
writeJsonEnvelope({
|
|
33446
|
+
ok: true,
|
|
33447
|
+
data: response.data,
|
|
33448
|
+
hints: [
|
|
33449
|
+
`Staged. All the traffic goes to the ${response.data.survivor === "variant" ? "alternative" : "original"} page when this session is published.`,
|
|
33450
|
+
...response.data.discardedVerdict ? [
|
|
33451
|
+
`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.`
|
|
33452
|
+
] : [],
|
|
33453
|
+
"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."
|
|
33454
|
+
]
|
|
33455
|
+
});
|
|
33456
|
+
} catch (error) {
|
|
33457
|
+
reportApiError(error);
|
|
33458
|
+
}
|
|
33459
|
+
}
|
|
33460
|
+
});
|
|
33461
|
+
var experimentCommand = defineCommand112({
|
|
33462
|
+
meta: {
|
|
33463
|
+
name: "experiment",
|
|
33464
|
+
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."
|
|
33465
|
+
},
|
|
33466
|
+
subCommands: {
|
|
33467
|
+
plan: planCommand,
|
|
33468
|
+
start: startCommand,
|
|
33469
|
+
status: statusCommand4,
|
|
33470
|
+
finish: finishCommand
|
|
33471
|
+
}
|
|
33472
|
+
});
|
|
33473
|
+
|
|
33159
33474
|
// src/commands/flows/index.ts
|
|
33160
|
-
import { defineCommand as
|
|
33475
|
+
import { defineCommand as defineCommand117 } from "citty";
|
|
33161
33476
|
|
|
33162
33477
|
// src/commands/flows/add.ts
|
|
33163
33478
|
import { randomUUID } from "crypto";
|
|
33164
|
-
import { defineCommand as
|
|
33479
|
+
import { defineCommand as defineCommand113 } from "citty";
|
|
33165
33480
|
|
|
33166
33481
|
// src/commands/flows/shared.ts
|
|
33167
33482
|
import { existsSync as existsSync5, readdirSync as readdirSync2, readFileSync as readFileSync9, writeFileSync as writeFileSync3 } from "fs";
|
|
@@ -33371,7 +33686,7 @@ registerSchema({
|
|
|
33371
33686
|
parent: { type: "string", description: "Parent node id. Omit to append to the root's children.", required: false }
|
|
33372
33687
|
}
|
|
33373
33688
|
});
|
|
33374
|
-
var addNodeCommand =
|
|
33689
|
+
var addNodeCommand = defineCommand113({
|
|
33375
33690
|
meta: {
|
|
33376
33691
|
name: "add-node",
|
|
33377
33692
|
description: 'Add a step to a form, with the skeleton its type requires. Example: baker flows add-node contact --type customForm --name "Contact Info"'
|
|
@@ -33467,7 +33782,7 @@ registerSchema({
|
|
|
33467
33782
|
}
|
|
33468
33783
|
}
|
|
33469
33784
|
});
|
|
33470
|
-
var addSideEffectCommand =
|
|
33785
|
+
var addSideEffectCommand = defineCommand113({
|
|
33471
33786
|
meta: {
|
|
33472
33787
|
name: "add-side-effect",
|
|
33473
33788
|
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"
|
|
@@ -33549,7 +33864,7 @@ var addSideEffectCommand = defineCommand112({
|
|
|
33549
33864
|
|
|
33550
33865
|
// src/commands/flows/map.ts
|
|
33551
33866
|
import { readFileSync as readFileSync11 } from "fs";
|
|
33552
|
-
import { defineCommand as
|
|
33867
|
+
import { defineCommand as defineCommand114 } from "citty";
|
|
33553
33868
|
|
|
33554
33869
|
// src/commands/flows/value-expression.ts
|
|
33555
33870
|
import { existsSync as existsSync6, readFileSync as readFileSync10 } from "fs";
|
|
@@ -34322,7 +34637,7 @@ async function mapOptions(args, fromFile, into) {
|
|
|
34322
34637
|
destinationFields: hubspotForm ? await hubspotFieldCatalog(hubspotForm) : void 0
|
|
34323
34638
|
};
|
|
34324
34639
|
}
|
|
34325
|
-
var mapCommand2 =
|
|
34640
|
+
var mapCommand2 = defineCommand114({
|
|
34326
34641
|
meta: {
|
|
34327
34642
|
name: "map",
|
|
34328
34643
|
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"
|
|
@@ -34420,7 +34735,7 @@ var mapCommand2 = defineCommand113({
|
|
|
34420
34735
|
});
|
|
34421
34736
|
|
|
34422
34737
|
// src/commands/flows/normalize.ts
|
|
34423
|
-
import { defineCommand as
|
|
34738
|
+
import { defineCommand as defineCommand115 } from "citty";
|
|
34424
34739
|
var OPTIONAL_STRINGS = ["oauthProviderId"];
|
|
34425
34740
|
var ARRAY_FIELDS = [
|
|
34426
34741
|
"fieldMapping",
|
|
@@ -34489,7 +34804,7 @@ registerSchema({
|
|
|
34489
34804
|
}
|
|
34490
34805
|
}
|
|
34491
34806
|
});
|
|
34492
|
-
var normalizeCommand =
|
|
34807
|
+
var normalizeCommand = defineCommand115({
|
|
34493
34808
|
meta: {
|
|
34494
34809
|
name: "normalize",
|
|
34495
34810
|
description: "Repair the shapes a form file is allowed to get slightly wrong. Example: baker flows normalize contact --write"
|
|
@@ -34520,7 +34835,7 @@ var normalizeCommand = defineCommand114({
|
|
|
34520
34835
|
});
|
|
34521
34836
|
|
|
34522
34837
|
// src/commands/flows/schema.ts
|
|
34523
|
-
import { defineCommand as
|
|
34838
|
+
import { defineCommand as defineCommand116 } from "citty";
|
|
34524
34839
|
registerSchema({
|
|
34525
34840
|
command: "flows.schema",
|
|
34526
34841
|
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.",
|
|
@@ -34545,7 +34860,7 @@ function triggerHints(triggers) {
|
|
|
34545
34860
|
`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(", ")}.` : "")
|
|
34546
34861
|
];
|
|
34547
34862
|
}
|
|
34548
|
-
var schemaCommand =
|
|
34863
|
+
var schemaCommand = defineCommand116({
|
|
34549
34864
|
meta: {
|
|
34550
34865
|
name: "schema",
|
|
34551
34866
|
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)"
|
|
@@ -34679,7 +34994,7 @@ function displayName(slug) {
|
|
|
34679
34994
|
const name = tree.displayName;
|
|
34680
34995
|
return typeof name === "string" && name.trim() ? name.trim() : slug;
|
|
34681
34996
|
}
|
|
34682
|
-
var listCommand12 =
|
|
34997
|
+
var listCommand12 = defineCommand117({
|
|
34683
34998
|
meta: {
|
|
34684
34999
|
name: "list",
|
|
34685
35000
|
description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
|
|
@@ -34700,7 +35015,7 @@ var listCommand12 = defineCommand116({
|
|
|
34700
35015
|
});
|
|
34701
35016
|
}
|
|
34702
35017
|
});
|
|
34703
|
-
var showCommand3 =
|
|
35018
|
+
var showCommand3 = defineCommand117({
|
|
34704
35019
|
meta: {
|
|
34705
35020
|
name: "show",
|
|
34706
35021
|
description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
|
|
@@ -34728,7 +35043,7 @@ var showCommand3 = defineCommand116({
|
|
|
34728
35043
|
});
|
|
34729
35044
|
}
|
|
34730
35045
|
});
|
|
34731
|
-
var flowsCommand =
|
|
35046
|
+
var flowsCommand = defineCommand117({
|
|
34732
35047
|
meta: {
|
|
34733
35048
|
name: "flows",
|
|
34734
35049
|
description: `Read and shape this workspace's Forms (flows).
|
|
@@ -34762,10 +35077,10 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
|
34762
35077
|
});
|
|
34763
35078
|
|
|
34764
35079
|
// src/commands/ga4/index.ts
|
|
34765
|
-
import { defineCommand as
|
|
35080
|
+
import { defineCommand as defineCommand124 } from "citty";
|
|
34766
35081
|
|
|
34767
35082
|
// src/commands/ga4/audit.ts
|
|
34768
|
-
import { defineCommand as
|
|
35083
|
+
import { defineCommand as defineCommand118 } from "citty";
|
|
34769
35084
|
|
|
34770
35085
|
// src/commands/ga4/resolve.ts
|
|
34771
35086
|
async function fetchProperties(useCache = true) {
|
|
@@ -34831,7 +35146,7 @@ registerSchema({
|
|
|
34831
35146
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
34832
35147
|
}
|
|
34833
35148
|
});
|
|
34834
|
-
var auditCommand2 =
|
|
35149
|
+
var auditCommand2 = defineCommand118({
|
|
34835
35150
|
meta: {
|
|
34836
35151
|
name: "audit",
|
|
34837
35152
|
description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
|
|
@@ -34886,7 +35201,7 @@ Examples:
|
|
|
34886
35201
|
});
|
|
34887
35202
|
|
|
34888
35203
|
// src/commands/ga4/config.ts
|
|
34889
|
-
import { defineCommand as
|
|
35204
|
+
import { defineCommand as defineCommand119 } from "citty";
|
|
34890
35205
|
|
|
34891
35206
|
// src/commands/ga4/shared.ts
|
|
34892
35207
|
import { readFileSync as readFileSync12 } from "fs";
|
|
@@ -35082,7 +35397,7 @@ function configHints(config) {
|
|
|
35082
35397
|
}
|
|
35083
35398
|
return hints;
|
|
35084
35399
|
}
|
|
35085
|
-
var configCommand =
|
|
35400
|
+
var configCommand = defineCommand119({
|
|
35086
35401
|
meta: {
|
|
35087
35402
|
name: "config",
|
|
35088
35403
|
description: `Read how the property is configured to measure \u2014 key events, custom definitions, custom events, retention
|
|
@@ -35114,7 +35429,7 @@ Examples:
|
|
|
35114
35429
|
});
|
|
35115
35430
|
|
|
35116
35431
|
// src/commands/ga4/draft.ts
|
|
35117
|
-
import { defineCommand as
|
|
35432
|
+
import { defineCommand as defineCommand120 } from "citty";
|
|
35118
35433
|
registerSchema({
|
|
35119
35434
|
command: "ga4.draft",
|
|
35120
35435
|
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.",
|
|
@@ -35123,13 +35438,13 @@ registerSchema({
|
|
|
35123
35438
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
35124
35439
|
}
|
|
35125
35440
|
});
|
|
35126
|
-
var draftCommand3 =
|
|
35441
|
+
var draftCommand3 = defineCommand120({
|
|
35127
35442
|
meta: {
|
|
35128
35443
|
name: "draft",
|
|
35129
35444
|
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."
|
|
35130
35445
|
},
|
|
35131
35446
|
subCommands: {
|
|
35132
|
-
list:
|
|
35447
|
+
list: defineCommand120({
|
|
35133
35448
|
meta: { name: "list", description: "Review everything staged on this chat (--json for the raw envelope)" },
|
|
35134
35449
|
args: {
|
|
35135
35450
|
json: { type: "boolean", description: "Print the raw JSON envelope", required: false },
|
|
@@ -35139,7 +35454,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35139
35454
|
await draftList(args.json === true, args.chat);
|
|
35140
35455
|
}
|
|
35141
35456
|
}),
|
|
35142
|
-
show:
|
|
35457
|
+
show: defineCommand120({
|
|
35143
35458
|
meta: {
|
|
35144
35459
|
name: "show",
|
|
35145
35460
|
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)."
|
|
@@ -35156,7 +35471,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35156
35471
|
);
|
|
35157
35472
|
}
|
|
35158
35473
|
}),
|
|
35159
|
-
amend:
|
|
35474
|
+
amend: defineCommand120({
|
|
35160
35475
|
meta: {
|
|
35161
35476
|
name: "amend",
|
|
35162
35477
|
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."
|
|
@@ -35173,7 +35488,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35173
35488
|
});
|
|
35174
35489
|
}
|
|
35175
35490
|
}),
|
|
35176
|
-
remove:
|
|
35491
|
+
remove: defineCommand120({
|
|
35177
35492
|
meta: { name: "remove", description: "Remove one staged change" },
|
|
35178
35493
|
args: { ref: { type: "positional", description: "Staged ref or target id", required: false } },
|
|
35179
35494
|
run: async ({ args }) => {
|
|
@@ -35182,7 +35497,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35182
35497
|
});
|
|
35183
35498
|
}
|
|
35184
35499
|
}),
|
|
35185
|
-
clear:
|
|
35500
|
+
clear: defineCommand120({
|
|
35186
35501
|
meta: { name: "clear", description: "Discard all Google Analytics changes staged on this chat" },
|
|
35187
35502
|
run: async () => {
|
|
35188
35503
|
await draftAction2("/api/ga4/draft/clear", {});
|
|
@@ -35192,7 +35507,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35192
35507
|
});
|
|
35193
35508
|
|
|
35194
35509
|
// src/commands/ga4/properties.ts
|
|
35195
|
-
import { defineCommand as
|
|
35510
|
+
import { defineCommand as defineCommand121 } from "citty";
|
|
35196
35511
|
registerSchema({
|
|
35197
35512
|
command: "ga4.properties",
|
|
35198
35513
|
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.",
|
|
@@ -35208,7 +35523,7 @@ function propertyHints(properties) {
|
|
|
35208
35523
|
resources: properties.map((property) => ({ id: property.externalId, label: property.name }))
|
|
35209
35524
|
});
|
|
35210
35525
|
}
|
|
35211
|
-
var propertiesCommand =
|
|
35526
|
+
var propertiesCommand = defineCommand121({
|
|
35212
35527
|
meta: {
|
|
35213
35528
|
name: "properties",
|
|
35214
35529
|
description: `List accessible GA4 properties.
|
|
@@ -35258,7 +35573,7 @@ Examples:
|
|
|
35258
35573
|
// src/commands/ga4/query.ts
|
|
35259
35574
|
import { appendFileSync as appendFileSync2, existsSync as existsSync7, readFileSync as readFileSync13, writeFileSync as writeFileSync4 } from "fs";
|
|
35260
35575
|
import { resolve as resolve2 } from "path";
|
|
35261
|
-
import { defineCommand as
|
|
35576
|
+
import { defineCommand as defineCommand122 } from "citty";
|
|
35262
35577
|
|
|
35263
35578
|
// src/commands/ga4/presets.ts
|
|
35264
35579
|
var GA4_PRESETS = [
|
|
@@ -35393,7 +35708,7 @@ function handleError3(err) {
|
|
|
35393
35708
|
});
|
|
35394
35709
|
process.exit(1);
|
|
35395
35710
|
}
|
|
35396
|
-
var queryCommand2 =
|
|
35711
|
+
var queryCommand2 = defineCommand122({
|
|
35397
35712
|
meta: {
|
|
35398
35713
|
name: "query",
|
|
35399
35714
|
description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
|
|
@@ -35464,7 +35779,7 @@ Free-form (escape hatch):
|
|
|
35464
35779
|
});
|
|
35465
35780
|
|
|
35466
35781
|
// src/commands/ga4/write-commands.ts
|
|
35467
|
-
import { defineCommand as
|
|
35782
|
+
import { defineCommand as defineCommand123 } from "citty";
|
|
35468
35783
|
var PROPERTY_ARG_DESCRIPTION = "GA4 property id (optional only when one property is connected \u2014 run `baker ga4 properties`)";
|
|
35469
35784
|
var propertyArg = { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false };
|
|
35470
35785
|
function createJsonDescription(noun) {
|
|
@@ -35482,7 +35797,7 @@ registerSchema({
|
|
|
35482
35797
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
35483
35798
|
}
|
|
35484
35799
|
});
|
|
35485
|
-
var keyEventCommand =
|
|
35800
|
+
var keyEventCommand = defineCommand123({
|
|
35486
35801
|
meta: {
|
|
35487
35802
|
name: "key-event",
|
|
35488
35803
|
description: `Stage key-event (conversion) changes
|
|
@@ -35495,7 +35810,7 @@ Examples:
|
|
|
35495
35810
|
baker ga4 key-event delete 4185`
|
|
35496
35811
|
},
|
|
35497
35812
|
subCommands: {
|
|
35498
|
-
create:
|
|
35813
|
+
create: defineCommand123({
|
|
35499
35814
|
meta: {
|
|
35500
35815
|
name: "create",
|
|
35501
35816
|
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."
|
|
@@ -35516,7 +35831,7 @@ Examples:
|
|
|
35516
35831
|
);
|
|
35517
35832
|
}
|
|
35518
35833
|
}),
|
|
35519
|
-
update:
|
|
35834
|
+
update: defineCommand123({
|
|
35520
35835
|
meta: {
|
|
35521
35836
|
name: "update",
|
|
35522
35837
|
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."
|
|
@@ -35536,7 +35851,7 @@ Examples:
|
|
|
35536
35851
|
});
|
|
35537
35852
|
}
|
|
35538
35853
|
}),
|
|
35539
|
-
delete:
|
|
35854
|
+
delete: defineCommand123({
|
|
35540
35855
|
meta: {
|
|
35541
35856
|
name: "delete",
|
|
35542
35857
|
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."
|
|
@@ -35584,7 +35899,7 @@ for (const { kind, noun, createHint } of DEFINITIONS) {
|
|
|
35584
35899
|
}
|
|
35585
35900
|
function definitionCommand(definition) {
|
|
35586
35901
|
const { command, kind, noun, example } = definition;
|
|
35587
|
-
return
|
|
35902
|
+
return defineCommand123({
|
|
35588
35903
|
meta: {
|
|
35589
35904
|
name: command,
|
|
35590
35905
|
description: `Stage ${noun} changes
|
|
@@ -35596,7 +35911,7 @@ Examples:
|
|
|
35596
35911
|
baker ga4 ${command} archive 12`
|
|
35597
35912
|
},
|
|
35598
35913
|
subCommands: {
|
|
35599
|
-
create:
|
|
35914
|
+
create: defineCommand123({
|
|
35600
35915
|
meta: { name: "create", description: `Stage a new ${noun} (or a JSON array of them, staged together)` },
|
|
35601
35916
|
args: {
|
|
35602
35917
|
json: { type: "string", description: createJsonDescription(noun), required: false },
|
|
@@ -35614,7 +35929,7 @@ Examples:
|
|
|
35614
35929
|
);
|
|
35615
35930
|
}
|
|
35616
35931
|
}),
|
|
35617
|
-
update:
|
|
35932
|
+
update: defineCommand123({
|
|
35618
35933
|
meta: {
|
|
35619
35934
|
name: "update",
|
|
35620
35935
|
description: `Stage a change to an existing ${noun} (pass its id). The parameter name and scope cannot change \u2014 archive and recreate for that.`
|
|
@@ -35634,7 +35949,7 @@ Examples:
|
|
|
35634
35949
|
});
|
|
35635
35950
|
}
|
|
35636
35951
|
}),
|
|
35637
|
-
archive:
|
|
35952
|
+
archive: defineCommand123({
|
|
35638
35953
|
meta: {
|
|
35639
35954
|
name: "archive",
|
|
35640
35955
|
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.`
|
|
@@ -35679,7 +35994,7 @@ var dataStreamArg = {
|
|
|
35679
35994
|
function withStream(args) {
|
|
35680
35995
|
return typeof args["data-stream"] === "string" ? { dataStream: args["data-stream"] } : {};
|
|
35681
35996
|
}
|
|
35682
|
-
var customEventCommand =
|
|
35997
|
+
var customEventCommand = defineCommand123({
|
|
35683
35998
|
meta: {
|
|
35684
35999
|
name: "custom-event",
|
|
35685
36000
|
description: `Stage custom events \u2014 new events built from events the site already sends
|
|
@@ -35690,7 +36005,7 @@ Examples:
|
|
|
35690
36005
|
baker ga4 custom-event delete 7`
|
|
35691
36006
|
},
|
|
35692
36007
|
subCommands: {
|
|
35693
|
-
create:
|
|
36008
|
+
create: defineCommand123({
|
|
35694
36009
|
meta: {
|
|
35695
36010
|
name: "create",
|
|
35696
36011
|
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."
|
|
@@ -35713,7 +36028,7 @@ Examples:
|
|
|
35713
36028
|
);
|
|
35714
36029
|
}
|
|
35715
36030
|
}),
|
|
35716
|
-
update:
|
|
36031
|
+
update: defineCommand123({
|
|
35717
36032
|
meta: { name: "update", description: "Stage a change to an existing custom event (pass its id)" },
|
|
35718
36033
|
args: {
|
|
35719
36034
|
id: { type: "positional", description: "Custom event rule id", required: false },
|
|
@@ -35732,7 +36047,7 @@ Examples:
|
|
|
35732
36047
|
});
|
|
35733
36048
|
}
|
|
35734
36049
|
}),
|
|
35735
|
-
delete:
|
|
36050
|
+
delete: defineCommand123({
|
|
35736
36051
|
meta: {
|
|
35737
36052
|
name: "delete",
|
|
35738
36053
|
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."
|
|
@@ -35787,7 +36102,7 @@ function booleanArg(input, flag) {
|
|
|
35787
36102
|
if (input === "false") return false;
|
|
35788
36103
|
return failValidation3(`--${flag} must be true or false`);
|
|
35789
36104
|
}
|
|
35790
|
-
var dataRetentionCommand =
|
|
36105
|
+
var dataRetentionCommand = defineCommand123({
|
|
35791
36106
|
meta: {
|
|
35792
36107
|
name: "data-retention",
|
|
35793
36108
|
description: `Stage a change to how long Google Analytics keeps data
|
|
@@ -35797,7 +36112,7 @@ Examples:
|
|
|
35797
36112
|
baker ga4 data-retention set --event-data 14 --user-data 14 --reset-on-activity true`
|
|
35798
36113
|
},
|
|
35799
36114
|
subCommands: {
|
|
35800
|
-
set:
|
|
36115
|
+
set: defineCommand123({
|
|
35801
36116
|
meta: { name: "set", description: "Stage the retention window (months)" },
|
|
35802
36117
|
args: {
|
|
35803
36118
|
"event-data": { type: "string", description: "2, 14, 26, 38 or 50", required: false },
|
|
@@ -35833,7 +36148,7 @@ registerSchema({
|
|
|
35833
36148
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
35834
36149
|
}
|
|
35835
36150
|
});
|
|
35836
|
-
var audienceCommand =
|
|
36151
|
+
var audienceCommand = defineCommand123({
|
|
35837
36152
|
meta: {
|
|
35838
36153
|
name: "audience",
|
|
35839
36154
|
description: `Stage audience changes (saved groups of users, for retargeting and analysis)
|
|
@@ -35865,7 +36180,7 @@ Examples:
|
|
|
35865
36180
|
baker ga4 audience archive 8813`
|
|
35866
36181
|
},
|
|
35867
36182
|
subCommands: {
|
|
35868
|
-
create:
|
|
36183
|
+
create: defineCommand123({
|
|
35869
36184
|
meta: { name: "create", description: createJsonDescription("audience") },
|
|
35870
36185
|
args: {
|
|
35871
36186
|
json: { type: "string", description: createJsonDescription("audience"), required: false },
|
|
@@ -35883,7 +36198,7 @@ Examples:
|
|
|
35883
36198
|
);
|
|
35884
36199
|
}
|
|
35885
36200
|
}),
|
|
35886
|
-
update:
|
|
36201
|
+
update: defineCommand123({
|
|
35887
36202
|
meta: {
|
|
35888
36203
|
name: "update",
|
|
35889
36204
|
description: "Stage a new name or description (pass the audience id). Who is in it cannot be changed."
|
|
@@ -35904,7 +36219,7 @@ Examples:
|
|
|
35904
36219
|
});
|
|
35905
36220
|
}
|
|
35906
36221
|
}),
|
|
35907
|
-
archive:
|
|
36222
|
+
archive: defineCommand123({
|
|
35908
36223
|
meta: {
|
|
35909
36224
|
name: "archive",
|
|
35910
36225
|
description: "Stage retiring an audience. Cannot be undone \u2014 the users it gathered do not come back."
|
|
@@ -35933,7 +36248,7 @@ registerSchema({
|
|
|
35933
36248
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
35934
36249
|
}
|
|
35935
36250
|
});
|
|
35936
|
-
var propertyCommand =
|
|
36251
|
+
var propertyCommand = defineCommand123({
|
|
35937
36252
|
meta: {
|
|
35938
36253
|
name: "property",
|
|
35939
36254
|
description: `Stage a change to the property's own settings
|
|
@@ -35943,7 +36258,7 @@ Examples:
|
|
|
35943
36258
|
baker ga4 property set --name "Acme \u2014 Web" --industry REAL_ESTATE`
|
|
35944
36259
|
},
|
|
35945
36260
|
subCommands: {
|
|
35946
|
-
set:
|
|
36261
|
+
set: defineCommand123({
|
|
35947
36262
|
meta: { name: "set", description: "Stage the property name and/or industry category" },
|
|
35948
36263
|
args: {
|
|
35949
36264
|
name: { type: "string", description: "New property display name", required: false },
|
|
@@ -35983,7 +36298,7 @@ registerSchema({
|
|
|
35983
36298
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
35984
36299
|
}
|
|
35985
36300
|
});
|
|
35986
|
-
var adsLinkCommand =
|
|
36301
|
+
var adsLinkCommand = defineCommand123({
|
|
35987
36302
|
meta: {
|
|
35988
36303
|
name: "ads-link",
|
|
35989
36304
|
description: `Stage linking this property to a Google Ads account
|
|
@@ -35998,7 +36313,7 @@ Examples:
|
|
|
35998
36313
|
baker ga4 ads-link delete L1234`
|
|
35999
36314
|
},
|
|
36000
36315
|
subCommands: {
|
|
36001
|
-
create:
|
|
36316
|
+
create: defineCommand123({
|
|
36002
36317
|
meta: { name: "create", description: "Stage linking the property to a Google Ads account" },
|
|
36003
36318
|
args: {
|
|
36004
36319
|
"customer-id": { type: "string", description: "Google Ads customer id (123-456-7890)", required: false },
|
|
@@ -36017,7 +36332,7 @@ Examples:
|
|
|
36017
36332
|
await stageOp3({ kind: "ga4.googleAdsLink.create", payload, ...withProperty(args) });
|
|
36018
36333
|
}
|
|
36019
36334
|
}),
|
|
36020
|
-
update:
|
|
36335
|
+
update: defineCommand123({
|
|
36021
36336
|
meta: {
|
|
36022
36337
|
name: "update",
|
|
36023
36338
|
description: "Stage the ads-personalisation setting on an existing link (pass its id)"
|
|
@@ -36039,7 +36354,7 @@ Examples:
|
|
|
36039
36354
|
});
|
|
36040
36355
|
}
|
|
36041
36356
|
}),
|
|
36042
|
-
delete:
|
|
36357
|
+
delete: defineCommand123({
|
|
36043
36358
|
meta: {
|
|
36044
36359
|
name: "delete",
|
|
36045
36360
|
description: "Stage unlinking. Stops conversion imports and strands every audience on this property."
|
|
@@ -36090,7 +36405,7 @@ var MEASUREMENT_FLAGS = {
|
|
|
36090
36405
|
"page-changes": "pageChangesEnabled",
|
|
36091
36406
|
"form-interactions": "formInteractionsEnabled"
|
|
36092
36407
|
};
|
|
36093
|
-
var enhancedMeasurementCommand =
|
|
36408
|
+
var enhancedMeasurementCommand = defineCommand123({
|
|
36094
36409
|
meta: {
|
|
36095
36410
|
name: "enhanced-measurement",
|
|
36096
36411
|
description: `Stage the automatic events GA4 collects on a website stream
|
|
@@ -36104,7 +36419,7 @@ Examples:
|
|
|
36104
36419
|
baker ga4 enhanced-measurement set --video false`
|
|
36105
36420
|
},
|
|
36106
36421
|
subCommands: {
|
|
36107
|
-
set:
|
|
36422
|
+
set: defineCommand123({
|
|
36108
36423
|
meta: { name: "set", description: "Stage which automatic events the website stream collects" },
|
|
36109
36424
|
args: {
|
|
36110
36425
|
scrolls: { type: "string", description: "true|false", required: false },
|
|
@@ -36147,7 +36462,7 @@ Examples:
|
|
|
36147
36462
|
});
|
|
36148
36463
|
|
|
36149
36464
|
// src/commands/ga4/index.ts
|
|
36150
|
-
var ga4Command =
|
|
36465
|
+
var ga4Command = defineCommand124({
|
|
36151
36466
|
meta: {
|
|
36152
36467
|
name: "ga4",
|
|
36153
36468
|
description: `Google Analytics 4. Report on a property, audit its config, and change what it measures.
|
|
@@ -36196,12 +36511,12 @@ Full guide: __tooling__/docs/tools/baker/ga4.md`
|
|
|
36196
36511
|
});
|
|
36197
36512
|
|
|
36198
36513
|
// src/commands/gsc/index.ts
|
|
36199
|
-
import { defineCommand as
|
|
36514
|
+
import { defineCommand as defineCommand128 } from "citty";
|
|
36200
36515
|
|
|
36201
36516
|
// src/commands/gsc/query.ts
|
|
36202
36517
|
import { appendFileSync as appendFileSync3, existsSync as existsSync8, readFileSync as readFileSync14, writeFileSync as writeFileSync5 } from "fs";
|
|
36203
36518
|
import { resolve as resolve3 } from "path";
|
|
36204
|
-
import { defineCommand as
|
|
36519
|
+
import { defineCommand as defineCommand125 } from "citty";
|
|
36205
36520
|
|
|
36206
36521
|
// src/commands/gsc/presets.ts
|
|
36207
36522
|
var GSC_PRESETS = [
|
|
@@ -36395,7 +36710,7 @@ function handleError4(err) {
|
|
|
36395
36710
|
});
|
|
36396
36711
|
process.exit(1);
|
|
36397
36712
|
}
|
|
36398
|
-
var queryCommand3 =
|
|
36713
|
+
var queryCommand3 = defineCommand125({
|
|
36399
36714
|
meta: {
|
|
36400
36715
|
name: "query",
|
|
36401
36716
|
description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
|
|
@@ -36473,7 +36788,7 @@ Free-form (escape hatch):
|
|
|
36473
36788
|
});
|
|
36474
36789
|
|
|
36475
36790
|
// src/commands/gsc/sitemaps.ts
|
|
36476
|
-
import { defineCommand as
|
|
36791
|
+
import { defineCommand as defineCommand126 } from "citty";
|
|
36477
36792
|
registerSchema({
|
|
36478
36793
|
command: "gsc.sitemaps",
|
|
36479
36794
|
description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
|
|
@@ -36482,7 +36797,7 @@ registerSchema({
|
|
|
36482
36797
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
36483
36798
|
}
|
|
36484
36799
|
});
|
|
36485
|
-
var sitemapsCommand =
|
|
36800
|
+
var sitemapsCommand = defineCommand126({
|
|
36486
36801
|
meta: {
|
|
36487
36802
|
name: "sitemaps",
|
|
36488
36803
|
description: `List sitemaps for a site. Check health and errors.
|
|
@@ -36535,7 +36850,7 @@ Examples:
|
|
|
36535
36850
|
});
|
|
36536
36851
|
|
|
36537
36852
|
// src/commands/gsc/sites.ts
|
|
36538
|
-
import { defineCommand as
|
|
36853
|
+
import { defineCommand as defineCommand127 } from "citty";
|
|
36539
36854
|
registerSchema({
|
|
36540
36855
|
command: "gsc.sites",
|
|
36541
36856
|
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.",
|
|
@@ -36551,7 +36866,7 @@ function siteHints(sites) {
|
|
|
36551
36866
|
resources: sites.map((site) => ({ id: site.siteUrl, label: site.permissionLevel }))
|
|
36552
36867
|
});
|
|
36553
36868
|
}
|
|
36554
|
-
var sitesCommand =
|
|
36869
|
+
var sitesCommand = defineCommand127({
|
|
36555
36870
|
meta: {
|
|
36556
36871
|
name: "sites",
|
|
36557
36872
|
description: `List verified Search Console sites.
|
|
@@ -36599,7 +36914,7 @@ Examples:
|
|
|
36599
36914
|
});
|
|
36600
36915
|
|
|
36601
36916
|
// src/commands/gsc/index.ts
|
|
36602
|
-
var gscCommand =
|
|
36917
|
+
var gscCommand = defineCommand128({
|
|
36603
36918
|
meta: {
|
|
36604
36919
|
name: "gsc",
|
|
36605
36920
|
description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
|
|
@@ -36623,7 +36938,7 @@ Full guide: __tooling__/docs/tools/baker/gsc.md`
|
|
|
36623
36938
|
});
|
|
36624
36939
|
|
|
36625
36940
|
// src/commands/history/index.ts
|
|
36626
|
-
import { defineCommand as
|
|
36941
|
+
import { defineCommand as defineCommand129 } from "citty";
|
|
36627
36942
|
registerSchema({
|
|
36628
36943
|
command: "history.list",
|
|
36629
36944
|
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.",
|
|
@@ -36678,7 +36993,7 @@ function parseBoundedInt2(raw, name, min, max) {
|
|
|
36678
36993
|
}
|
|
36679
36994
|
return value;
|
|
36680
36995
|
}
|
|
36681
|
-
var listCommand13 =
|
|
36996
|
+
var listCommand13 = defineCommand129({
|
|
36682
36997
|
meta: {
|
|
36683
36998
|
name: "list",
|
|
36684
36999
|
description: "List recent account changes (unified audit log), newest first."
|
|
@@ -36724,7 +37039,7 @@ var listCommand13 = defineCommand128({
|
|
|
36724
37039
|
}
|
|
36725
37040
|
}
|
|
36726
37041
|
});
|
|
36727
|
-
var historyCommand =
|
|
37042
|
+
var historyCommand = defineCommand129({
|
|
36728
37043
|
meta: {
|
|
36729
37044
|
name: "history",
|
|
36730
37045
|
description: `Unified account history (audit log): what changed, who did it, and when.
|
|
@@ -36734,7 +37049,7 @@ Full guide: __tooling__/docs/tools/baker/history.md`
|
|
|
36734
37049
|
});
|
|
36735
37050
|
|
|
36736
37051
|
// src/commands/hubspot/index.ts
|
|
36737
|
-
import { defineCommand as
|
|
37052
|
+
import { defineCommand as defineCommand130 } from "citty";
|
|
36738
37053
|
var EMBED_TYPES = ["legacy", "v4", "unknown"];
|
|
36739
37054
|
function failNotConnected(err) {
|
|
36740
37055
|
if (err instanceof ApiError && err.code === "FORBIDDEN" && err.message.includes(HUBSPOT_MISSING_GRANT_MARKER)) {
|
|
@@ -36888,7 +37203,7 @@ registerSchema({
|
|
|
36888
37203
|
}
|
|
36889
37204
|
}
|
|
36890
37205
|
});
|
|
36891
|
-
var formsListCommand =
|
|
37206
|
+
var formsListCommand = defineCommand130({
|
|
36892
37207
|
meta: {
|
|
36893
37208
|
name: "list",
|
|
36894
37209
|
description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
|
|
@@ -36933,7 +37248,7 @@ var formsListCommand = defineCommand129({
|
|
|
36933
37248
|
}
|
|
36934
37249
|
}
|
|
36935
37250
|
});
|
|
36936
|
-
var formsViewCommand =
|
|
37251
|
+
var formsViewCommand = defineCommand130({
|
|
36937
37252
|
meta: {
|
|
36938
37253
|
name: "view",
|
|
36939
37254
|
description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
|
|
@@ -36985,7 +37300,7 @@ var formsViewCommand = defineCommand129({
|
|
|
36985
37300
|
}
|
|
36986
37301
|
}
|
|
36987
37302
|
});
|
|
36988
|
-
var meetingsListCommand =
|
|
37303
|
+
var meetingsListCommand = defineCommand130({
|
|
36989
37304
|
meta: {
|
|
36990
37305
|
name: "list",
|
|
36991
37306
|
description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
|
|
@@ -37027,7 +37342,7 @@ var meetingsListCommand = defineCommand129({
|
|
|
37027
37342
|
}
|
|
37028
37343
|
}
|
|
37029
37344
|
});
|
|
37030
|
-
var meetingsViewCommand =
|
|
37345
|
+
var meetingsViewCommand = defineCommand130({
|
|
37031
37346
|
meta: {
|
|
37032
37347
|
name: "view",
|
|
37033
37348
|
description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
|
|
@@ -37071,7 +37386,7 @@ var meetingsViewCommand = defineCommand129({
|
|
|
37071
37386
|
}
|
|
37072
37387
|
}
|
|
37073
37388
|
});
|
|
37074
|
-
var formsSubmissionsCommand =
|
|
37389
|
+
var formsSubmissionsCommand = defineCommand130({
|
|
37075
37390
|
meta: {
|
|
37076
37391
|
name: "submissions",
|
|
37077
37392
|
description: "How many leads a form received, and when. Example: baker hubspot forms submissions <formId> --days 30"
|
|
@@ -37120,7 +37435,7 @@ var formsSubmissionsCommand = defineCommand129({
|
|
|
37120
37435
|
}
|
|
37121
37436
|
}
|
|
37122
37437
|
});
|
|
37123
|
-
var workflowsListCommand =
|
|
37438
|
+
var workflowsListCommand = defineCommand130({
|
|
37124
37439
|
meta: {
|
|
37125
37440
|
name: "list",
|
|
37126
37441
|
description: "List HubSpot workflows. Example: baker hubspot workflows list --enabled-only"
|
|
@@ -37185,7 +37500,7 @@ function workflowViewHints(workflow) {
|
|
|
37185
37500
|
}
|
|
37186
37501
|
return hints;
|
|
37187
37502
|
}
|
|
37188
|
-
var workflowsViewCommand =
|
|
37503
|
+
var workflowsViewCommand = defineCommand130({
|
|
37189
37504
|
meta: {
|
|
37190
37505
|
name: "view",
|
|
37191
37506
|
description: "Read one workflow's real configuration \u2014 enrolment, branches in order, and what each step writes. Example: baker hubspot workflows view 121183594 --full"
|
|
@@ -37212,7 +37527,7 @@ var workflowsViewCommand = defineCommand129({
|
|
|
37212
37527
|
}
|
|
37213
37528
|
}
|
|
37214
37529
|
});
|
|
37215
|
-
var pipelinesListCommand =
|
|
37530
|
+
var pipelinesListCommand = defineCommand130({
|
|
37216
37531
|
meta: {
|
|
37217
37532
|
name: "list",
|
|
37218
37533
|
description: "List HubSpot deal pipelines and their stages. Example: baker hubspot pipelines list"
|
|
@@ -37229,7 +37544,7 @@ var pipelinesListCommand = defineCommand129({
|
|
|
37229
37544
|
}
|
|
37230
37545
|
}
|
|
37231
37546
|
});
|
|
37232
|
-
var contactsSummaryCommand =
|
|
37547
|
+
var contactsSummaryCommand = defineCommand130({
|
|
37233
37548
|
meta: {
|
|
37234
37549
|
name: "summary",
|
|
37235
37550
|
description: "Whether recent leads are being worked, as counts. Example: baker hubspot contacts summary --days 30"
|
|
@@ -37299,7 +37614,7 @@ function contactLookupHints(data) {
|
|
|
37299
37614
|
}
|
|
37300
37615
|
return hints;
|
|
37301
37616
|
}
|
|
37302
|
-
var contactsLookupCommand =
|
|
37617
|
+
var contactsLookupCommand = defineCommand130({
|
|
37303
37618
|
meta: {
|
|
37304
37619
|
name: "lookup",
|
|
37305
37620
|
description: "Find one contact by email and see whether it was worked. Example: baker hubspot contacts lookup a@b.com"
|
|
@@ -37323,27 +37638,27 @@ var contactsLookupCommand = defineCommand129({
|
|
|
37323
37638
|
}
|
|
37324
37639
|
}
|
|
37325
37640
|
});
|
|
37326
|
-
var contactsCommand =
|
|
37641
|
+
var contactsCommand = defineCommand130({
|
|
37327
37642
|
meta: { name: "contacts", description: "Contacts on the connected HubSpot account." },
|
|
37328
37643
|
subCommands: { summary: contactsSummaryCommand, lookup: contactsLookupCommand }
|
|
37329
37644
|
});
|
|
37330
|
-
var formsCommand =
|
|
37645
|
+
var formsCommand = defineCommand130({
|
|
37331
37646
|
meta: { name: "forms", description: "HubSpot forms on the connected account." },
|
|
37332
37647
|
subCommands: { list: formsListCommand, view: formsViewCommand, submissions: formsSubmissionsCommand }
|
|
37333
37648
|
});
|
|
37334
|
-
var workflowsCommand =
|
|
37649
|
+
var workflowsCommand = defineCommand130({
|
|
37335
37650
|
meta: { name: "workflows", description: "HubSpot workflows on the connected account." },
|
|
37336
37651
|
subCommands: { list: workflowsListCommand, view: workflowsViewCommand }
|
|
37337
37652
|
});
|
|
37338
|
-
var pipelinesCommand =
|
|
37653
|
+
var pipelinesCommand = defineCommand130({
|
|
37339
37654
|
meta: { name: "pipelines", description: "HubSpot deal pipelines on the connected account." },
|
|
37340
37655
|
subCommands: { list: pipelinesListCommand }
|
|
37341
37656
|
});
|
|
37342
|
-
var meetingsCommand =
|
|
37657
|
+
var meetingsCommand = defineCommand130({
|
|
37343
37658
|
meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
|
|
37344
37659
|
subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
|
|
37345
37660
|
});
|
|
37346
|
-
var hubspotCommand =
|
|
37661
|
+
var hubspotCommand = defineCommand130({
|
|
37347
37662
|
meta: {
|
|
37348
37663
|
name: "hubspot",
|
|
37349
37664
|
description: `Read the connected HubSpot account \u2014 forms, the leads they received, workflows, deal pipelines and
|
|
@@ -37381,10 +37696,10 @@ Full guide: __tooling__/docs/tools/baker/hubspot.md`
|
|
|
37381
37696
|
});
|
|
37382
37697
|
|
|
37383
37698
|
// src/commands/images/index.ts
|
|
37384
|
-
import { defineCommand as
|
|
37699
|
+
import { defineCommand as defineCommand156 } from "citty";
|
|
37385
37700
|
|
|
37386
37701
|
// src/commands/images/crop.ts
|
|
37387
|
-
import { defineCommand as
|
|
37702
|
+
import { defineCommand as defineCommand131 } from "citty";
|
|
37388
37703
|
|
|
37389
37704
|
// src/lib/image/crop-sprite.ts
|
|
37390
37705
|
import sharp from "sharp";
|
|
@@ -37506,7 +37821,7 @@ function emitError2(err) {
|
|
|
37506
37821
|
}
|
|
37507
37822
|
process.exit(1);
|
|
37508
37823
|
}
|
|
37509
|
-
var cropCommand =
|
|
37824
|
+
var cropCommand = defineCommand131({
|
|
37510
37825
|
meta: {
|
|
37511
37826
|
name: "crop",
|
|
37512
37827
|
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"
|
|
@@ -37542,7 +37857,7 @@ var cropCommand = defineCommand130({
|
|
|
37542
37857
|
});
|
|
37543
37858
|
|
|
37544
37859
|
// src/commands/images/delete.ts
|
|
37545
|
-
import { defineCommand as
|
|
37860
|
+
import { defineCommand as defineCommand132 } from "citty";
|
|
37546
37861
|
registerSchema({
|
|
37547
37862
|
command: "images.delete",
|
|
37548
37863
|
description: "Delete an image by ID",
|
|
@@ -37556,7 +37871,7 @@ registerSchema({
|
|
|
37556
37871
|
}
|
|
37557
37872
|
}
|
|
37558
37873
|
});
|
|
37559
|
-
var deleteCommand2 =
|
|
37874
|
+
var deleteCommand2 = defineCommand132({
|
|
37560
37875
|
meta: {
|
|
37561
37876
|
name: "delete",
|
|
37562
37877
|
description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
|
|
@@ -37597,7 +37912,7 @@ var deleteCommand2 = defineCommand131({
|
|
|
37597
37912
|
});
|
|
37598
37913
|
|
|
37599
37914
|
// src/commands/images/dimensions.ts
|
|
37600
|
-
import { defineCommand as
|
|
37915
|
+
import { defineCommand as defineCommand133 } from "citty";
|
|
37601
37916
|
|
|
37602
37917
|
// src/lib/image/dimensions.ts
|
|
37603
37918
|
import { imageSize } from "image-size";
|
|
@@ -37626,7 +37941,7 @@ registerSchema({
|
|
|
37626
37941
|
}
|
|
37627
37942
|
}
|
|
37628
37943
|
});
|
|
37629
|
-
var dimensionsCommand =
|
|
37944
|
+
var dimensionsCommand = defineCommand133({
|
|
37630
37945
|
meta: {
|
|
37631
37946
|
name: "dimensions",
|
|
37632
37947
|
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"
|
|
@@ -37682,7 +37997,7 @@ var dimensionsCommand = defineCommand132({
|
|
|
37682
37997
|
});
|
|
37683
37998
|
|
|
37684
37999
|
// src/commands/images/download.ts
|
|
37685
|
-
import { defineCommand as
|
|
38000
|
+
import { defineCommand as defineCommand134 } from "citty";
|
|
37686
38001
|
|
|
37687
38002
|
// src/commands/images/downloadPaths.ts
|
|
37688
38003
|
import { basename as basename2, extname as extname3, join as join6 } from "path";
|
|
@@ -37907,7 +38222,7 @@ function emitError3(err) {
|
|
|
37907
38222
|
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
|
|
37908
38223
|
process.exit(1);
|
|
37909
38224
|
}
|
|
37910
|
-
var downloadCommand =
|
|
38225
|
+
var downloadCommand = defineCommand134({
|
|
37911
38226
|
meta: {
|
|
37912
38227
|
name: "download",
|
|
37913
38228
|
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"
|
|
@@ -37940,7 +38255,7 @@ var downloadCommand = defineCommand133({
|
|
|
37940
38255
|
});
|
|
37941
38256
|
|
|
37942
38257
|
// src/commands/images/extract.ts
|
|
37943
|
-
import { defineCommand as
|
|
38258
|
+
import { defineCommand as defineCommand135 } from "citty";
|
|
37944
38259
|
|
|
37945
38260
|
// src/commands/images/autoIngest.ts
|
|
37946
38261
|
var AUTO_INGEST_MAX = {
|
|
@@ -37987,7 +38302,7 @@ registerSchema({
|
|
|
37987
38302
|
}
|
|
37988
38303
|
}
|
|
37989
38304
|
});
|
|
37990
|
-
var extractCommand =
|
|
38305
|
+
var extractCommand = defineCommand135({
|
|
37991
38306
|
meta: {
|
|
37992
38307
|
name: "extract",
|
|
37993
38308
|
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"
|
|
@@ -38042,7 +38357,7 @@ var extractCommand = defineCommand134({
|
|
|
38042
38357
|
});
|
|
38043
38358
|
|
|
38044
38359
|
// src/commands/images/find.ts
|
|
38045
|
-
import { defineCommand as
|
|
38360
|
+
import { defineCommand as defineCommand136 } from "citty";
|
|
38046
38361
|
|
|
38047
38362
|
// src/commands/images/providerHits.ts
|
|
38048
38363
|
function asRecord3(value) {
|
|
@@ -38180,7 +38495,7 @@ registerSchema({
|
|
|
38180
38495
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
38181
38496
|
}
|
|
38182
38497
|
});
|
|
38183
|
-
var findCommand =
|
|
38498
|
+
var findCommand = defineCommand136({
|
|
38184
38499
|
meta: {
|
|
38185
38500
|
name: "find",
|
|
38186
38501
|
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"
|
|
@@ -38253,7 +38568,7 @@ var findCommand = defineCommand135({
|
|
|
38253
38568
|
});
|
|
38254
38569
|
|
|
38255
38570
|
// src/commands/images/get.ts
|
|
38256
|
-
import { defineCommand as
|
|
38571
|
+
import { defineCommand as defineCommand137 } from "citty";
|
|
38257
38572
|
registerSchema({
|
|
38258
38573
|
command: "images.get",
|
|
38259
38574
|
description: "Get a single image by ID",
|
|
@@ -38261,7 +38576,7 @@ registerSchema({
|
|
|
38261
38576
|
id: { type: "string", description: "Image ID", required: true }
|
|
38262
38577
|
}
|
|
38263
38578
|
});
|
|
38264
|
-
var getCommand3 =
|
|
38579
|
+
var getCommand3 = defineCommand137({
|
|
38265
38580
|
meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
|
|
38266
38581
|
args: {
|
|
38267
38582
|
id: { type: "positional", description: "Image ID", required: false },
|
|
@@ -38297,7 +38612,7 @@ var getCommand3 = defineCommand136({
|
|
|
38297
38612
|
});
|
|
38298
38613
|
|
|
38299
38614
|
// src/commands/images/gif.ts
|
|
38300
|
-
import { defineCommand as
|
|
38615
|
+
import { defineCommand as defineCommand138 } from "citty";
|
|
38301
38616
|
registerSchema({
|
|
38302
38617
|
command: "images.gif",
|
|
38303
38618
|
description: "Search Giphy for GIFs / reaction memes (paid social creative).",
|
|
@@ -38329,7 +38644,7 @@ registerSchema({
|
|
|
38329
38644
|
}
|
|
38330
38645
|
}
|
|
38331
38646
|
});
|
|
38332
|
-
var gifCommand =
|
|
38647
|
+
var gifCommand = defineCommand138({
|
|
38333
38648
|
meta: {
|
|
38334
38649
|
name: "gif",
|
|
38335
38650
|
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"
|
|
@@ -38376,7 +38691,7 @@ var gifCommand = defineCommand137({
|
|
|
38376
38691
|
});
|
|
38377
38692
|
|
|
38378
38693
|
// src/commands/images/google.ts
|
|
38379
|
-
import { defineCommand as
|
|
38694
|
+
import { defineCommand as defineCommand139 } from "citty";
|
|
38380
38695
|
var GOOGLE_ERROR_FIX = {
|
|
38381
38696
|
action: "use_different_resource",
|
|
38382
38697
|
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."
|
|
@@ -38416,7 +38731,7 @@ registerSchema({
|
|
|
38416
38731
|
}
|
|
38417
38732
|
}
|
|
38418
38733
|
});
|
|
38419
|
-
var googleCommand2 =
|
|
38734
|
+
var googleCommand2 = defineCommand139({
|
|
38420
38735
|
meta: {
|
|
38421
38736
|
name: "google",
|
|
38422
38737
|
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"
|
|
@@ -38489,7 +38804,7 @@ var googleCommand2 = defineCommand138({
|
|
|
38489
38804
|
});
|
|
38490
38805
|
|
|
38491
38806
|
// src/commands/images/group.ts
|
|
38492
|
-
import { defineCommand as
|
|
38807
|
+
import { defineCommand as defineCommand140 } from "citty";
|
|
38493
38808
|
|
|
38494
38809
|
// src/commands/mediaGroup.ts
|
|
38495
38810
|
async function runMediaGroupLookup(input) {
|
|
@@ -38542,7 +38857,7 @@ registerSchema({
|
|
|
38542
38857
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
38543
38858
|
}
|
|
38544
38859
|
});
|
|
38545
|
-
var groupCommand =
|
|
38860
|
+
var groupCommand = defineCommand140({
|
|
38546
38861
|
meta: {
|
|
38547
38862
|
name: "group",
|
|
38548
38863
|
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>"
|
|
@@ -38562,7 +38877,7 @@ var groupCommand = defineCommand139({
|
|
|
38562
38877
|
});
|
|
38563
38878
|
|
|
38564
38879
|
// src/commands/images/icon.ts
|
|
38565
|
-
import { defineCommand as
|
|
38880
|
+
import { defineCommand as defineCommand141 } from "citty";
|
|
38566
38881
|
|
|
38567
38882
|
// src/commands/images/brandVerification.ts
|
|
38568
38883
|
function brandToken(domain) {
|
|
@@ -38659,7 +38974,7 @@ registerSchema({
|
|
|
38659
38974
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
38660
38975
|
}
|
|
38661
38976
|
});
|
|
38662
|
-
var iconCommand =
|
|
38977
|
+
var iconCommand = defineCommand141({
|
|
38663
38978
|
meta: {
|
|
38664
38979
|
name: "icon",
|
|
38665
38980
|
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'"
|
|
@@ -38729,7 +39044,7 @@ var iconCommand = defineCommand140({
|
|
|
38729
39044
|
});
|
|
38730
39045
|
|
|
38731
39046
|
// src/commands/images/ingest.ts
|
|
38732
|
-
import { defineCommand as
|
|
39047
|
+
import { defineCommand as defineCommand142 } from "citty";
|
|
38733
39048
|
var SOURCE_VALUES = imageSourceSchema.options.join(" | ");
|
|
38734
39049
|
registerSchema({
|
|
38735
39050
|
command: "images.ingest",
|
|
@@ -38744,7 +39059,7 @@ registerSchema({
|
|
|
38744
39059
|
fields: { type: "string", description: "Comma-separated field names to include", required: false }
|
|
38745
39060
|
}
|
|
38746
39061
|
});
|
|
38747
|
-
var ingestCommand =
|
|
39062
|
+
var ingestCommand = defineCommand142({
|
|
38748
39063
|
meta: {
|
|
38749
39064
|
name: "ingest",
|
|
38750
39065
|
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"
|
|
@@ -38813,7 +39128,7 @@ var ingestCommand = defineCommand141({
|
|
|
38813
39128
|
});
|
|
38814
39129
|
|
|
38815
39130
|
// src/commands/images/layerize.ts
|
|
38816
|
-
import { defineCommand as
|
|
39131
|
+
import { defineCommand as defineCommand143 } from "citty";
|
|
38817
39132
|
registerSchema({
|
|
38818
39133
|
command: "images.layerize",
|
|
38819
39134
|
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.",
|
|
@@ -38877,7 +39192,7 @@ async function pollUntilSettled(imageId, maxWait) {
|
|
|
38877
39192
|
}
|
|
38878
39193
|
return null;
|
|
38879
39194
|
}
|
|
38880
|
-
var layerizeCommand =
|
|
39195
|
+
var layerizeCommand = defineCommand143({
|
|
38881
39196
|
meta: {
|
|
38882
39197
|
name: "layerize",
|
|
38883
39198
|
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'"
|
|
@@ -38946,7 +39261,7 @@ registerSchema({
|
|
|
38946
39261
|
full: { type: "boolean", description: "Include geometry and typography for every layer", required: false }
|
|
38947
39262
|
}
|
|
38948
39263
|
});
|
|
38949
|
-
var layersCommand =
|
|
39264
|
+
var layersCommand = defineCommand143({
|
|
38950
39265
|
meta: {
|
|
38951
39266
|
name: "layers",
|
|
38952
39267
|
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"
|
|
@@ -38986,7 +39301,7 @@ var layersCommand = defineCommand142({
|
|
|
38986
39301
|
});
|
|
38987
39302
|
|
|
38988
39303
|
// src/commands/images/library.ts
|
|
38989
|
-
import { defineCommand as
|
|
39304
|
+
import { defineCommand as defineCommand144 } from "citty";
|
|
38990
39305
|
registerSchema({
|
|
38991
39306
|
command: "images.library",
|
|
38992
39307
|
description: "Search the company image library. Returns only ready images.",
|
|
@@ -39012,7 +39327,7 @@ registerSchema({
|
|
|
39012
39327
|
}
|
|
39013
39328
|
}
|
|
39014
39329
|
});
|
|
39015
|
-
var libraryCommand =
|
|
39330
|
+
var libraryCommand = defineCommand144({
|
|
39016
39331
|
meta: {
|
|
39017
39332
|
name: "library",
|
|
39018
39333
|
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"
|
|
@@ -39075,7 +39390,7 @@ var libraryCommand = defineCommand143({
|
|
|
39075
39390
|
});
|
|
39076
39391
|
|
|
39077
39392
|
// src/commands/images/logo.ts
|
|
39078
|
-
import { defineCommand as
|
|
39393
|
+
import { defineCommand as defineCommand145 } from "citty";
|
|
39079
39394
|
registerSchema({
|
|
39080
39395
|
command: "images.logo",
|
|
39081
39396
|
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.",
|
|
@@ -39103,7 +39418,7 @@ registerSchema({
|
|
|
39103
39418
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
39104
39419
|
}
|
|
39105
39420
|
});
|
|
39106
|
-
var logoCommand =
|
|
39421
|
+
var logoCommand = defineCommand145({
|
|
39107
39422
|
meta: {
|
|
39108
39423
|
name: "logo",
|
|
39109
39424
|
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"
|
|
@@ -39176,7 +39491,7 @@ var logoCommand = defineCommand144({
|
|
|
39176
39491
|
});
|
|
39177
39492
|
|
|
39178
39493
|
// src/commands/images/normalize.ts
|
|
39179
|
-
import { defineCommand as
|
|
39494
|
+
import { defineCommand as defineCommand146 } from "citty";
|
|
39180
39495
|
|
|
39181
39496
|
// src/lib/image/color-changer.ts
|
|
39182
39497
|
import quantize from "quantize";
|
|
@@ -39908,7 +40223,7 @@ function coerceRawArgs(args) {
|
|
|
39908
40223
|
"dry-run": bool(args["dry-run"])
|
|
39909
40224
|
};
|
|
39910
40225
|
}
|
|
39911
|
-
var normalizeCommand2 =
|
|
40226
|
+
var normalizeCommand2 = defineCommand146({
|
|
39912
40227
|
meta: {
|
|
39913
40228
|
name: "normalize",
|
|
39914
40229
|
description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
|
|
@@ -39963,7 +40278,7 @@ Examples:
|
|
|
39963
40278
|
});
|
|
39964
40279
|
|
|
39965
40280
|
// src/commands/images/pinterest.ts
|
|
39966
|
-
import { defineCommand as
|
|
40281
|
+
import { defineCommand as defineCommand147 } from "citty";
|
|
39967
40282
|
registerSchema({
|
|
39968
40283
|
command: "images.pinterest",
|
|
39969
40284
|
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.",
|
|
@@ -39983,7 +40298,7 @@ registerSchema({
|
|
|
39983
40298
|
}
|
|
39984
40299
|
}
|
|
39985
40300
|
});
|
|
39986
|
-
var pinterestCommand =
|
|
40301
|
+
var pinterestCommand = defineCommand147({
|
|
39987
40302
|
meta: {
|
|
39988
40303
|
name: "pinterest",
|
|
39989
40304
|
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'"
|
|
@@ -40040,7 +40355,7 @@ var pinterestCommand = defineCommand146({
|
|
|
40040
40355
|
});
|
|
40041
40356
|
|
|
40042
40357
|
// src/commands/images/screenshot.ts
|
|
40043
|
-
import { defineCommand as
|
|
40358
|
+
import { defineCommand as defineCommand148 } from "citty";
|
|
40044
40359
|
registerSchema({
|
|
40045
40360
|
command: "images.screenshot",
|
|
40046
40361
|
description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
|
|
@@ -40059,7 +40374,7 @@ registerSchema({
|
|
|
40059
40374
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
40060
40375
|
}
|
|
40061
40376
|
});
|
|
40062
|
-
var screenshotCommand =
|
|
40377
|
+
var screenshotCommand = defineCommand148({
|
|
40063
40378
|
meta: {
|
|
40064
40379
|
name: "screenshot",
|
|
40065
40380
|
description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
|
|
@@ -40123,7 +40438,7 @@ var screenshotCommand = defineCommand147({
|
|
|
40123
40438
|
});
|
|
40124
40439
|
|
|
40125
40440
|
// src/commands/images/search.ts
|
|
40126
|
-
import { defineCommand as
|
|
40441
|
+
import { defineCommand as defineCommand149 } from "citty";
|
|
40127
40442
|
registerSchema({
|
|
40128
40443
|
command: "images.search",
|
|
40129
40444
|
description: "Search images by text query. Only returns ready images.",
|
|
@@ -40139,7 +40454,7 @@ registerSchema({
|
|
|
40139
40454
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
40140
40455
|
}
|
|
40141
40456
|
});
|
|
40142
|
-
var searchCommand =
|
|
40457
|
+
var searchCommand = defineCommand149({
|
|
40143
40458
|
meta: {
|
|
40144
40459
|
name: "search",
|
|
40145
40460
|
description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
|
|
@@ -40199,7 +40514,7 @@ var searchCommand = defineCommand148({
|
|
|
40199
40514
|
});
|
|
40200
40515
|
|
|
40201
40516
|
// src/commands/images/sticker.ts
|
|
40202
|
-
import { defineCommand as
|
|
40517
|
+
import { defineCommand as defineCommand150 } from "citty";
|
|
40203
40518
|
registerSchema({
|
|
40204
40519
|
command: "images.sticker",
|
|
40205
40520
|
description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
|
|
@@ -40231,7 +40546,7 @@ registerSchema({
|
|
|
40231
40546
|
}
|
|
40232
40547
|
}
|
|
40233
40548
|
});
|
|
40234
|
-
var stickerCommand =
|
|
40549
|
+
var stickerCommand = defineCommand150({
|
|
40235
40550
|
meta: {
|
|
40236
40551
|
name: "sticker",
|
|
40237
40552
|
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"
|
|
@@ -40278,7 +40593,7 @@ var stickerCommand = defineCommand149({
|
|
|
40278
40593
|
});
|
|
40279
40594
|
|
|
40280
40595
|
// src/commands/images/stock.ts
|
|
40281
|
-
import { defineCommand as
|
|
40596
|
+
import { defineCommand as defineCommand151 } from "citty";
|
|
40282
40597
|
var STOCK_ERROR_FIX = {
|
|
40283
40598
|
action: "use_different_resource",
|
|
40284
40599
|
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."
|
|
@@ -40355,7 +40670,7 @@ function buildStockRequest(query, args) {
|
|
|
40355
40670
|
if (args.context) body.descriptionContext = args.context;
|
|
40356
40671
|
return body;
|
|
40357
40672
|
}
|
|
40358
|
-
var stockCommand =
|
|
40673
|
+
var stockCommand = defineCommand151({
|
|
40359
40674
|
meta: {
|
|
40360
40675
|
name: "stock",
|
|
40361
40676
|
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"
|
|
@@ -40428,7 +40743,7 @@ var stockCommand = defineCommand150({
|
|
|
40428
40743
|
});
|
|
40429
40744
|
|
|
40430
40745
|
// src/lib/tags-command.ts
|
|
40431
|
-
import { defineCommand as
|
|
40746
|
+
import { defineCommand as defineCommand152 } from "citty";
|
|
40432
40747
|
function makeTagsCommand(command, label, endpoint) {
|
|
40433
40748
|
registerSchema({
|
|
40434
40749
|
command: `${command}.tags`,
|
|
@@ -40437,7 +40752,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
40437
40752
|
output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
|
|
40438
40753
|
}
|
|
40439
40754
|
});
|
|
40440
|
-
return
|
|
40755
|
+
return defineCommand152({
|
|
40441
40756
|
meta: {
|
|
40442
40757
|
name: "tags",
|
|
40443
40758
|
description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
|
|
@@ -40473,7 +40788,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
40473
40788
|
var tagsCommand3 = makeTagsCommand("images", "image", "/api/images/tags");
|
|
40474
40789
|
|
|
40475
40790
|
// src/commands/images/upload.ts
|
|
40476
|
-
import { defineCommand as
|
|
40791
|
+
import { defineCommand as defineCommand153 } from "citty";
|
|
40477
40792
|
registerSchema({
|
|
40478
40793
|
command: "images.upload",
|
|
40479
40794
|
description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
|
|
@@ -40511,7 +40826,7 @@ registerSchema({
|
|
|
40511
40826
|
function isRemoteUrl2(value) {
|
|
40512
40827
|
return /^https?:\/\//i.test(value);
|
|
40513
40828
|
}
|
|
40514
|
-
var uploadCommand =
|
|
40829
|
+
var uploadCommand = defineCommand153({
|
|
40515
40830
|
meta: {
|
|
40516
40831
|
name: "upload",
|
|
40517
40832
|
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'"
|
|
@@ -40604,7 +40919,7 @@ async function uploadLocal(target, args) {
|
|
|
40604
40919
|
}
|
|
40605
40920
|
|
|
40606
40921
|
// src/commands/images/upscale.ts
|
|
40607
|
-
import { defineCommand as
|
|
40922
|
+
import { defineCommand as defineCommand154 } from "citty";
|
|
40608
40923
|
registerSchema({
|
|
40609
40924
|
command: "images.upscale",
|
|
40610
40925
|
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).",
|
|
@@ -40619,7 +40934,7 @@ registerSchema({
|
|
|
40619
40934
|
}
|
|
40620
40935
|
});
|
|
40621
40936
|
var POLL_INTERVAL_MS4 = 1500;
|
|
40622
|
-
var upscaleCommand =
|
|
40937
|
+
var upscaleCommand = defineCommand154({
|
|
40623
40938
|
meta: {
|
|
40624
40939
|
name: "upscale",
|
|
40625
40940
|
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"
|
|
@@ -40674,7 +40989,7 @@ var upscaleCommand = defineCommand153({
|
|
|
40674
40989
|
});
|
|
40675
40990
|
|
|
40676
40991
|
// src/commands/images/use.ts
|
|
40677
|
-
import { defineCommand as
|
|
40992
|
+
import { defineCommand as defineCommand155 } from "citty";
|
|
40678
40993
|
registerSchema({
|
|
40679
40994
|
command: "images.use",
|
|
40680
40995
|
description: "Ingest a URL and wait for the library record to be ready.",
|
|
@@ -40703,7 +41018,7 @@ function emitReady(ingestResult, doc, args) {
|
|
|
40703
41018
|
args.full === true
|
|
40704
41019
|
);
|
|
40705
41020
|
}
|
|
40706
|
-
var useCommand =
|
|
41021
|
+
var useCommand = defineCommand155({
|
|
40707
41022
|
meta: {
|
|
40708
41023
|
name: "use",
|
|
40709
41024
|
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"
|
|
@@ -40752,7 +41067,7 @@ var useCommand = defineCommand154({
|
|
|
40752
41067
|
});
|
|
40753
41068
|
|
|
40754
41069
|
// src/commands/images/index.ts
|
|
40755
|
-
var imagesCommand =
|
|
41070
|
+
var imagesCommand = defineCommand156({
|
|
40756
41071
|
meta: {
|
|
40757
41072
|
name: "images",
|
|
40758
41073
|
description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
|
|
@@ -40830,12 +41145,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
|
|
|
40830
41145
|
});
|
|
40831
41146
|
|
|
40832
41147
|
// src/commands/landing/index.ts
|
|
40833
|
-
import { defineCommand as
|
|
41148
|
+
import { defineCommand as defineCommand167 } from "citty";
|
|
40834
41149
|
|
|
40835
41150
|
// src/commands/landing/critique.ts
|
|
40836
41151
|
import { readdir as readdir9, stat as stat6 } from "fs/promises";
|
|
40837
41152
|
import path29 from "path";
|
|
40838
|
-
import { defineCommand as
|
|
41153
|
+
import { defineCommand as defineCommand157 } from "citty";
|
|
40839
41154
|
|
|
40840
41155
|
// src/engine/landing/lib/constants.ts
|
|
40841
41156
|
var OVERUSED_FONTS = /* @__PURE__ */ new Set([
|
|
@@ -42011,14 +42326,14 @@ function parseCritiqueSlugs(args) {
|
|
|
42011
42326
|
const all = [args.slug, ...rest].filter((s) => typeof s === "string" && s.length > 0);
|
|
42012
42327
|
return [...new Set(all.map(String))];
|
|
42013
42328
|
}
|
|
42014
|
-
function
|
|
42329
|
+
function fail6(code, message, fix) {
|
|
42015
42330
|
process.stderr.write(
|
|
42016
42331
|
`${JSON.stringify({ ok: false, error: { code, message, ...fix ? { fix } : {} } }, null, 2)}
|
|
42017
42332
|
`
|
|
42018
42333
|
);
|
|
42019
42334
|
process.exit(2);
|
|
42020
42335
|
}
|
|
42021
|
-
var critiqueCommand2 =
|
|
42336
|
+
var critiqueCommand2 = defineCommand157({
|
|
42022
42337
|
meta: {
|
|
42023
42338
|
name: "critique",
|
|
42024
42339
|
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."
|
|
@@ -42036,14 +42351,14 @@ var critiqueCommand2 = defineCommand156({
|
|
|
42036
42351
|
const projectRoot = process.cwd();
|
|
42037
42352
|
for (const slug of slugs) {
|
|
42038
42353
|
if (!SLUG_RE.test(slug) || slug.includes("..")) {
|
|
42039
|
-
|
|
42354
|
+
fail6(
|
|
42040
42355
|
"INVALID_SLUG",
|
|
42041
42356
|
`"${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).`,
|
|
42042
42357
|
{ availableSlugs: await listLandingSlugs(projectRoot) }
|
|
42043
42358
|
);
|
|
42044
42359
|
}
|
|
42045
42360
|
if (!await isDir(path29.resolve(projectRoot, "src", "pages", slug))) {
|
|
42046
|
-
|
|
42361
|
+
fail6("NOT_FOUND", `No landing at src/pages/${slug}/`, {
|
|
42047
42362
|
availableSlugs: await listLandingSlugs(projectRoot)
|
|
42048
42363
|
});
|
|
42049
42364
|
}
|
|
@@ -42127,10 +42442,10 @@ async function isDir(p) {
|
|
|
42127
42442
|
}
|
|
42128
42443
|
|
|
42129
42444
|
// src/commands/landing/inspiration/index.ts
|
|
42130
|
-
import { defineCommand as
|
|
42445
|
+
import { defineCommand as defineCommand166 } from "citty";
|
|
42131
42446
|
|
|
42132
42447
|
// src/commands/landing/inspiration/add.ts
|
|
42133
|
-
import { defineCommand as
|
|
42448
|
+
import { defineCommand as defineCommand158 } from "citty";
|
|
42134
42449
|
|
|
42135
42450
|
// src/commands/landing/inspiration/shared.ts
|
|
42136
42451
|
var INSPIRATION_HINTS = {
|
|
@@ -42212,7 +42527,7 @@ registerSchema({
|
|
|
42212
42527
|
note: { type: "string", description: "Why this page is worth keeping", required: false }
|
|
42213
42528
|
}
|
|
42214
42529
|
});
|
|
42215
|
-
var addCommand =
|
|
42530
|
+
var addCommand = defineCommand158({
|
|
42216
42531
|
meta: {
|
|
42217
42532
|
name: "add",
|
|
42218
42533
|
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'"
|
|
@@ -42254,7 +42569,7 @@ var addCommand = defineCommand157({
|
|
|
42254
42569
|
// src/commands/landing/inspiration/code.ts
|
|
42255
42570
|
import { mkdir as mkdir10, writeFile as writeFile14 } from "fs/promises";
|
|
42256
42571
|
import path30 from "path";
|
|
42257
|
-
import { defineCommand as
|
|
42572
|
+
import { defineCommand as defineCommand159 } from "citty";
|
|
42258
42573
|
registerSchema({
|
|
42259
42574
|
command: "landing.inspiration.code",
|
|
42260
42575
|
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.",
|
|
@@ -42263,7 +42578,7 @@ registerSchema({
|
|
|
42263
42578
|
full: { type: "boolean", description: "Print the markup inline as well as writing it", required: false }
|
|
42264
42579
|
}
|
|
42265
42580
|
});
|
|
42266
|
-
var codeCommand =
|
|
42581
|
+
var codeCommand = defineCommand159({
|
|
42267
42582
|
meta: {
|
|
42268
42583
|
name: "code",
|
|
42269
42584
|
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."
|
|
@@ -42320,7 +42635,7 @@ var codeCommand = defineCommand158({
|
|
|
42320
42635
|
});
|
|
42321
42636
|
|
|
42322
42637
|
// src/commands/landing/inspiration/favorites.ts
|
|
42323
|
-
import { defineCommand as
|
|
42638
|
+
import { defineCommand as defineCommand160 } from "citty";
|
|
42324
42639
|
registerSchema({
|
|
42325
42640
|
command: "landing.inspiration.favorites",
|
|
42326
42641
|
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.",
|
|
@@ -42334,7 +42649,7 @@ registerSchema({
|
|
|
42334
42649
|
}
|
|
42335
42650
|
}
|
|
42336
42651
|
});
|
|
42337
|
-
var favoritesCommand =
|
|
42652
|
+
var favoritesCommand = defineCommand160({
|
|
42338
42653
|
meta: {
|
|
42339
42654
|
name: "favorites",
|
|
42340
42655
|
description: "List this company's saved reference sections. Example: baker landing inspiration favorites --type hero,pricing"
|
|
@@ -42414,7 +42729,7 @@ registerSchema({
|
|
|
42414
42729
|
note: { type: "string", description: "Why this is worth keeping", required: false }
|
|
42415
42730
|
}
|
|
42416
42731
|
});
|
|
42417
|
-
var favoriteCommand =
|
|
42732
|
+
var favoriteCommand = defineCommand160({
|
|
42418
42733
|
meta: {
|
|
42419
42734
|
name: "favorite",
|
|
42420
42735
|
description: "Save a reference section to this company. Example: baker landing inspiration favorite k57abc\u2026"
|
|
@@ -42452,7 +42767,7 @@ registerSchema({
|
|
|
42452
42767
|
page: { type: "boolean", description: "Treat the id as a page rather than a section", required: false }
|
|
42453
42768
|
}
|
|
42454
42769
|
});
|
|
42455
|
-
var unfavoriteCommand =
|
|
42770
|
+
var unfavoriteCommand = defineCommand160({
|
|
42456
42771
|
meta: {
|
|
42457
42772
|
name: "unfavorite",
|
|
42458
42773
|
description: "Remove a reference section from this company's saved set. Example: baker landing inspiration unfavorite k57abc\u2026"
|
|
@@ -42474,7 +42789,7 @@ var unfavoriteCommand = defineCommand159({
|
|
|
42474
42789
|
});
|
|
42475
42790
|
|
|
42476
42791
|
// src/commands/landing/inspiration/page.ts
|
|
42477
|
-
import { defineCommand as
|
|
42792
|
+
import { defineCommand as defineCommand161 } from "citty";
|
|
42478
42793
|
registerSchema({
|
|
42479
42794
|
command: "landing.inspiration.page",
|
|
42480
42795
|
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.",
|
|
@@ -42491,7 +42806,7 @@ registerSchema({
|
|
|
42491
42806
|
}
|
|
42492
42807
|
}
|
|
42493
42808
|
});
|
|
42494
|
-
var pageCommand2 =
|
|
42809
|
+
var pageCommand2 = defineCommand161({
|
|
42495
42810
|
meta: {
|
|
42496
42811
|
name: "page",
|
|
42497
42812
|
description: "Show how a reference page sequences its sections. Example: baker landing inspiration page j91xyz\u2026 \u2014 the blueprint, not the pixels."
|
|
@@ -42556,7 +42871,7 @@ var pageCommand2 = defineCommand160({
|
|
|
42556
42871
|
// src/commands/landing/inspiration/scrape.ts
|
|
42557
42872
|
import { readFile as readFile23 } from "fs/promises";
|
|
42558
42873
|
import path33 from "path";
|
|
42559
|
-
import { defineCommand as
|
|
42874
|
+
import { defineCommand as defineCommand162 } from "citty";
|
|
42560
42875
|
|
|
42561
42876
|
// src/engine/landing/lib/capturedReferences.ts
|
|
42562
42877
|
var MAX_STRINGS_PER_SECTION = 40;
|
|
@@ -44697,7 +45012,7 @@ registerSchema({
|
|
|
44697
45012
|
report: { type: "boolean", description: "Write report.html. `--no-report` to skip", required: false }
|
|
44698
45013
|
}
|
|
44699
45014
|
});
|
|
44700
|
-
var scrapeCommand =
|
|
45015
|
+
var scrapeCommand = defineCommand162({
|
|
44701
45016
|
meta: {
|
|
44702
45017
|
name: "scrape",
|
|
44703
45018
|
description: "Capture a landing page to a directory, now. Example: baker landing inspiration scrape https://linear.app --out .baker/inspiration/linear.app"
|
|
@@ -44799,7 +45114,7 @@ var scrapeCommand = defineCommand161({
|
|
|
44799
45114
|
|
|
44800
45115
|
// src/commands/landing/inspiration/search.ts
|
|
44801
45116
|
import path35 from "path";
|
|
44802
|
-
import { defineCommand as
|
|
45117
|
+
import { defineCommand as defineCommand163 } from "citty";
|
|
44803
45118
|
|
|
44804
45119
|
// src/commands/landing/inspiration/shot.ts
|
|
44805
45120
|
import { mkdir as mkdir12, writeFile as writeFile17 } from "fs/promises";
|
|
@@ -44936,7 +45251,7 @@ async function downloadShots(results) {
|
|
|
44936
45251
|
);
|
|
44937
45252
|
return saved;
|
|
44938
45253
|
}
|
|
44939
|
-
var searchCommand2 =
|
|
45254
|
+
var searchCommand2 = defineCommand163({
|
|
44940
45255
|
meta: {
|
|
44941
45256
|
name: "search",
|
|
44942
45257
|
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"
|
|
@@ -45034,7 +45349,7 @@ var searchCommand2 = defineCommand162({
|
|
|
45034
45349
|
});
|
|
45035
45350
|
|
|
45036
45351
|
// src/commands/landing/inspiration/sequences.ts
|
|
45037
|
-
import { defineCommand as
|
|
45352
|
+
import { defineCommand as defineCommand164 } from "citty";
|
|
45038
45353
|
var COMPACT_TRANSITIONS = 12;
|
|
45039
45354
|
var COMPACT_ENDS = 5;
|
|
45040
45355
|
var MAX_PAGES = 50;
|
|
@@ -45108,7 +45423,7 @@ function sequencesHints(data, { scope, full }) {
|
|
|
45108
45423
|
if (scope === "favorites") hints.push(...favoritesScopeHints(data.favoritesHealth, data.pagesReturned));
|
|
45109
45424
|
return hints;
|
|
45110
45425
|
}
|
|
45111
|
-
var sequencesCommand =
|
|
45426
|
+
var sequencesCommand = defineCommand164({
|
|
45112
45427
|
meta: {
|
|
45113
45428
|
name: "sequences",
|
|
45114
45429
|
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."
|
|
@@ -45158,7 +45473,7 @@ var sequencesCommand = defineCommand163({
|
|
|
45158
45473
|
|
|
45159
45474
|
// src/commands/landing/inspiration/view.ts
|
|
45160
45475
|
import path36 from "path";
|
|
45161
|
-
import { defineCommand as
|
|
45476
|
+
import { defineCommand as defineCommand165 } from "citty";
|
|
45162
45477
|
registerSchema({
|
|
45163
45478
|
command: "landing.inspiration.view",
|
|
45164
45479
|
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.",
|
|
@@ -45171,7 +45486,7 @@ registerSchema({
|
|
|
45171
45486
|
}
|
|
45172
45487
|
}
|
|
45173
45488
|
});
|
|
45174
|
-
var viewCommand2 =
|
|
45489
|
+
var viewCommand2 = defineCommand165({
|
|
45175
45490
|
meta: {
|
|
45176
45491
|
name: "view",
|
|
45177
45492
|
description: "Full detail for one reference section. Example: baker landing inspiration view k57abc\u2026 \u2014 read the screenshots it saves before you build."
|
|
@@ -45255,7 +45570,7 @@ var viewCommand2 = defineCommand164({
|
|
|
45255
45570
|
});
|
|
45256
45571
|
|
|
45257
45572
|
// src/commands/landing/inspiration/index.ts
|
|
45258
|
-
var inspirationCommand =
|
|
45573
|
+
var inspirationCommand = defineCommand166({
|
|
45259
45574
|
meta: {
|
|
45260
45575
|
name: "inspiration",
|
|
45261
45576
|
description: `Reference library of real landing-page sections \u2014 look at how good pages actually solve a problem before you design one.
|
|
@@ -45300,7 +45615,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
|
|
|
45300
45615
|
});
|
|
45301
45616
|
|
|
45302
45617
|
// src/commands/landing/index.ts
|
|
45303
|
-
var landingCommand =
|
|
45618
|
+
var landingCommand = defineCommand167({
|
|
45304
45619
|
meta: {
|
|
45305
45620
|
name: "landing",
|
|
45306
45621
|
description: `Design-quality tools for landing pages (src/pages/<slug>/).
|
|
@@ -45318,7 +45633,7 @@ Subcommands:
|
|
|
45318
45633
|
});
|
|
45319
45634
|
|
|
45320
45635
|
// src/commands/mcp/index.ts
|
|
45321
|
-
import { defineCommand as
|
|
45636
|
+
import { defineCommand as defineCommand168 } from "citty";
|
|
45322
45637
|
|
|
45323
45638
|
// src/commands/mcp/platforms.ts
|
|
45324
45639
|
function readsKey(label) {
|
|
@@ -45373,7 +45688,7 @@ function parseHeaders(raw) {
|
|
|
45373
45688
|
}
|
|
45374
45689
|
return Object.keys(headers).length > 0 ? headers : void 0;
|
|
45375
45690
|
}
|
|
45376
|
-
function
|
|
45691
|
+
function fail7(err) {
|
|
45377
45692
|
if (err instanceof ApiError) {
|
|
45378
45693
|
writeJson({ ok: false, error: { code: err.code, message: err.message } });
|
|
45379
45694
|
process.exit(1);
|
|
@@ -45387,7 +45702,7 @@ registerSchema({
|
|
|
45387
45702
|
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.",
|
|
45388
45703
|
args: {}
|
|
45389
45704
|
});
|
|
45390
|
-
var connectedCommand =
|
|
45705
|
+
var connectedCommand = defineCommand168({
|
|
45391
45706
|
meta: {
|
|
45392
45707
|
name: "connected",
|
|
45393
45708
|
description: `Everything this chat can reach \u2014 managed integrations, custom MCP servers, and connected platforms.
|
|
@@ -45437,7 +45752,7 @@ A tool or platform the user names that is NOT listed anywhere here is simply not
|
|
|
45437
45752
|
hints
|
|
45438
45753
|
});
|
|
45439
45754
|
} catch (err) {
|
|
45440
|
-
|
|
45755
|
+
fail7(err);
|
|
45441
45756
|
}
|
|
45442
45757
|
}
|
|
45443
45758
|
});
|
|
@@ -45446,7 +45761,7 @@ registerSchema({
|
|
|
45446
45761
|
description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
|
|
45447
45762
|
args: {}
|
|
45448
45763
|
});
|
|
45449
|
-
var listCommand14 =
|
|
45764
|
+
var listCommand14 = defineCommand168({
|
|
45450
45765
|
meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
|
|
45451
45766
|
run: async () => {
|
|
45452
45767
|
try {
|
|
@@ -45465,7 +45780,7 @@ var listCommand14 = defineCommand167({
|
|
|
45465
45780
|
} : {}
|
|
45466
45781
|
});
|
|
45467
45782
|
} catch (err) {
|
|
45468
|
-
|
|
45783
|
+
fail7(err);
|
|
45469
45784
|
}
|
|
45470
45785
|
}
|
|
45471
45786
|
});
|
|
@@ -45483,7 +45798,7 @@ registerSchema({
|
|
|
45483
45798
|
header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
|
|
45484
45799
|
}
|
|
45485
45800
|
});
|
|
45486
|
-
var addCommand2 =
|
|
45801
|
+
var addCommand2 = defineCommand168({
|
|
45487
45802
|
meta: {
|
|
45488
45803
|
name: "add",
|
|
45489
45804
|
description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
|
|
@@ -45526,7 +45841,7 @@ Examples:
|
|
|
45526
45841
|
]
|
|
45527
45842
|
});
|
|
45528
45843
|
} catch (err) {
|
|
45529
|
-
|
|
45844
|
+
fail7(err);
|
|
45530
45845
|
}
|
|
45531
45846
|
}
|
|
45532
45847
|
});
|
|
@@ -45535,7 +45850,7 @@ registerSchema({
|
|
|
45535
45850
|
description: "Remove a company custom MCP server by name.",
|
|
45536
45851
|
args: { name: { type: "string", description: "Server name to remove", required: true } }
|
|
45537
45852
|
});
|
|
45538
|
-
var removeCommand4 =
|
|
45853
|
+
var removeCommand4 = defineCommand168({
|
|
45539
45854
|
meta: {
|
|
45540
45855
|
name: "remove",
|
|
45541
45856
|
description: `Remove a company custom MCP server by name.
|
|
@@ -45553,11 +45868,11 @@ Example:
|
|
|
45553
45868
|
});
|
|
45554
45869
|
writeJson({ ok: true, data });
|
|
45555
45870
|
} catch (err) {
|
|
45556
|
-
|
|
45871
|
+
fail7(err);
|
|
45557
45872
|
}
|
|
45558
45873
|
}
|
|
45559
45874
|
});
|
|
45560
|
-
var mcpCommand =
|
|
45875
|
+
var mcpCommand = defineCommand168({
|
|
45561
45876
|
meta: {
|
|
45562
45877
|
name: "mcp",
|
|
45563
45878
|
description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
|
|
@@ -45583,10 +45898,10 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
|
|
|
45583
45898
|
});
|
|
45584
45899
|
|
|
45585
45900
|
// src/commands/research/index.ts
|
|
45586
|
-
import { defineCommand as
|
|
45901
|
+
import { defineCommand as defineCommand180 } from "citty";
|
|
45587
45902
|
|
|
45588
45903
|
// src/commands/research/advertisers.ts
|
|
45589
|
-
import { defineCommand as
|
|
45904
|
+
import { defineCommand as defineCommand169 } from "citty";
|
|
45590
45905
|
|
|
45591
45906
|
// src/commands/research/hints.ts
|
|
45592
45907
|
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.';
|
|
@@ -45769,7 +46084,7 @@ var FIELDS3 = {
|
|
|
45769
46084
|
etv: "Estimated traffic value (USD)",
|
|
45770
46085
|
visibility: "SERP visibility score (0-1)"
|
|
45771
46086
|
};
|
|
45772
|
-
var advertisersCommand =
|
|
46087
|
+
var advertisersCommand = defineCommand169({
|
|
45773
46088
|
meta: {
|
|
45774
46089
|
name: "advertisers",
|
|
45775
46090
|
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).
|
|
@@ -45825,7 +46140,7 @@ Examples:
|
|
|
45825
46140
|
});
|
|
45826
46141
|
|
|
45827
46142
|
// src/commands/research/autocomplete.ts
|
|
45828
|
-
import { defineCommand as
|
|
46143
|
+
import { defineCommand as defineCommand170 } from "citty";
|
|
45829
46144
|
registerSchema({
|
|
45830
46145
|
command: "research.autocomplete",
|
|
45831
46146
|
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).",
|
|
@@ -45848,7 +46163,7 @@ registerSchema({
|
|
|
45848
46163
|
var FIELDS4 = {
|
|
45849
46164
|
suggestion: "Autocomplete suggestion from Google"
|
|
45850
46165
|
};
|
|
45851
|
-
var autocompleteCommand =
|
|
46166
|
+
var autocompleteCommand = defineCommand170({
|
|
45852
46167
|
meta: {
|
|
45853
46168
|
name: "autocomplete",
|
|
45854
46169
|
description: `Get Google Autocomplete suggestions for keyword expansion.
|
|
@@ -45903,7 +46218,7 @@ Examples:
|
|
|
45903
46218
|
});
|
|
45904
46219
|
|
|
45905
46220
|
// src/commands/research/countries.ts
|
|
45906
|
-
import { defineCommand as
|
|
46221
|
+
import { defineCommand as defineCommand171 } from "citty";
|
|
45907
46222
|
registerSchema({
|
|
45908
46223
|
command: "research.countries",
|
|
45909
46224
|
description: "List all supported country codes for --location flag in research commands.",
|
|
@@ -45960,7 +46275,7 @@ var FIELDS5 = {
|
|
|
45960
46275
|
code: "Country code to pass as --location",
|
|
45961
46276
|
name: "Country name"
|
|
45962
46277
|
};
|
|
45963
|
-
var countriesCommand =
|
|
46278
|
+
var countriesCommand = defineCommand171({
|
|
45964
46279
|
meta: {
|
|
45965
46280
|
name: "countries",
|
|
45966
46281
|
description: "List all supported country codes for --location flag."
|
|
@@ -45971,7 +46286,7 @@ var countriesCommand = defineCommand170({
|
|
|
45971
46286
|
});
|
|
45972
46287
|
|
|
45973
46288
|
// src/commands/research/fetch.ts
|
|
45974
|
-
import { defineCommand as
|
|
46289
|
+
import { defineCommand as defineCommand172 } from "citty";
|
|
45975
46290
|
var CONTENT_PREVIEW_CHARS = 2e4;
|
|
45976
46291
|
var TIMEOUT_MS = 18e4;
|
|
45977
46292
|
registerSchema({
|
|
@@ -46044,7 +46359,7 @@ function fetchFix(code) {
|
|
|
46044
46359
|
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."
|
|
46045
46360
|
};
|
|
46046
46361
|
}
|
|
46047
|
-
var fetchCommand =
|
|
46362
|
+
var fetchCommand = defineCommand172({
|
|
46048
46363
|
meta: {
|
|
46049
46364
|
name: "fetch",
|
|
46050
46365
|
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.
|
|
@@ -46121,7 +46436,7 @@ Examples:
|
|
|
46121
46436
|
});
|
|
46122
46437
|
|
|
46123
46438
|
// src/commands/research/intent.ts
|
|
46124
|
-
import { defineCommand as
|
|
46439
|
+
import { defineCommand as defineCommand173 } from "citty";
|
|
46125
46440
|
registerSchema({
|
|
46126
46441
|
command: "research.intent",
|
|
46127
46442
|
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.",
|
|
@@ -46144,7 +46459,7 @@ var FIELDS7 = {
|
|
|
46144
46459
|
intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
|
|
46145
46460
|
probability: "Confidence score 0.0-1.0"
|
|
46146
46461
|
};
|
|
46147
|
-
var intentCommand =
|
|
46462
|
+
var intentCommand = defineCommand173({
|
|
46148
46463
|
meta: {
|
|
46149
46464
|
name: "intent",
|
|
46150
46465
|
description: `Classify Google Search intent for keywords. Returns intent type and confidence.
|
|
@@ -46192,7 +46507,7 @@ Examples:
|
|
|
46192
46507
|
});
|
|
46193
46508
|
|
|
46194
46509
|
// src/commands/research/keyword-gap.ts
|
|
46195
|
-
import { defineCommand as
|
|
46510
|
+
import { defineCommand as defineCommand174 } from "citty";
|
|
46196
46511
|
registerSchema({
|
|
46197
46512
|
command: "research.keyword-gap",
|
|
46198
46513
|
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.",
|
|
@@ -46221,7 +46536,7 @@ var FIELDS8 = {
|
|
|
46221
46536
|
cpc: "Cost per click USD",
|
|
46222
46537
|
their_position: "Competitor's ranking position"
|
|
46223
46538
|
};
|
|
46224
|
-
var keywordGapCommand =
|
|
46539
|
+
var keywordGapCommand = defineCommand174({
|
|
46225
46540
|
meta: {
|
|
46226
46541
|
name: "keyword-gap",
|
|
46227
46542
|
description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
|
|
@@ -46296,7 +46611,7 @@ Examples:
|
|
|
46296
46611
|
});
|
|
46297
46612
|
|
|
46298
46613
|
// src/commands/research/keywords-for-site.ts
|
|
46299
|
-
import { defineCommand as
|
|
46614
|
+
import { defineCommand as defineCommand175 } from "citty";
|
|
46300
46615
|
registerSchema({
|
|
46301
46616
|
command: "research.keywords-for-site",
|
|
46302
46617
|
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.",
|
|
@@ -46329,7 +46644,7 @@ var FIELDS9 = {
|
|
|
46329
46644
|
competition: "LOW, MEDIUM, or HIGH",
|
|
46330
46645
|
competition_index: "Competition score 0-100"
|
|
46331
46646
|
};
|
|
46332
|
-
var keywordsForSiteCommand =
|
|
46647
|
+
var keywordsForSiteCommand = defineCommand175({
|
|
46333
46648
|
meta: {
|
|
46334
46649
|
name: "keywords-for-site",
|
|
46335
46650
|
description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
|
|
@@ -46391,7 +46706,7 @@ Examples:
|
|
|
46391
46706
|
});
|
|
46392
46707
|
|
|
46393
46708
|
// src/commands/research/languages.ts
|
|
46394
|
-
import { defineCommand as
|
|
46709
|
+
import { defineCommand as defineCommand176 } from "citty";
|
|
46395
46710
|
registerSchema({
|
|
46396
46711
|
command: "research.languages",
|
|
46397
46712
|
description: "List all supported language codes for --language flag in research commands.",
|
|
@@ -46421,7 +46736,7 @@ var FIELDS10 = {
|
|
|
46421
46736
|
code: "Language code to pass as --language",
|
|
46422
46737
|
name: "Language name (also accepted by --language)"
|
|
46423
46738
|
};
|
|
46424
|
-
var languagesCommand2 =
|
|
46739
|
+
var languagesCommand2 = defineCommand176({
|
|
46425
46740
|
meta: {
|
|
46426
46741
|
name: "languages",
|
|
46427
46742
|
description: "List all supported language codes for --language flag."
|
|
@@ -46432,7 +46747,7 @@ var languagesCommand2 = defineCommand175({
|
|
|
46432
46747
|
});
|
|
46433
46748
|
|
|
46434
46749
|
// src/commands/research/lighthouse.ts
|
|
46435
|
-
import { defineCommand as
|
|
46750
|
+
import { defineCommand as defineCommand177 } from "citty";
|
|
46436
46751
|
registerSchema({
|
|
46437
46752
|
command: "research.lighthouse",
|
|
46438
46753
|
description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
|
|
@@ -46451,7 +46766,7 @@ var FIELDS11 = {
|
|
|
46451
46766
|
speed_index_ms: "Speed Index in ms (good: < 3400)",
|
|
46452
46767
|
interactive_ms: "Time to Interactive in ms (good: < 3800)"
|
|
46453
46768
|
};
|
|
46454
|
-
var lighthouseCommand =
|
|
46769
|
+
var lighthouseCommand = defineCommand177({
|
|
46455
46770
|
meta: {
|
|
46456
46771
|
name: "lighthouse",
|
|
46457
46772
|
description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
|
|
@@ -46489,7 +46804,7 @@ Examples:
|
|
|
46489
46804
|
});
|
|
46490
46805
|
|
|
46491
46806
|
// src/commands/research/relevant-pages.ts
|
|
46492
|
-
import { defineCommand as
|
|
46807
|
+
import { defineCommand as defineCommand178 } from "citty";
|
|
46493
46808
|
registerSchema({
|
|
46494
46809
|
command: "research.relevant-pages",
|
|
46495
46810
|
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).",
|
|
@@ -46515,7 +46830,7 @@ var FIELDS12 = {
|
|
|
46515
46830
|
keywords: "Total organic keywords the page ranks for",
|
|
46516
46831
|
top_10: "Keywords in positions 1-10"
|
|
46517
46832
|
};
|
|
46518
|
-
var relevantPagesCommand =
|
|
46833
|
+
var relevantPagesCommand = defineCommand178({
|
|
46519
46834
|
meta: {
|
|
46520
46835
|
name: "relevant-pages",
|
|
46521
46836
|
description: `Get the top pages of a competitor domain with traffic data.
|
|
@@ -46562,7 +46877,7 @@ Examples:
|
|
|
46562
46877
|
});
|
|
46563
46878
|
|
|
46564
46879
|
// src/commands/research/web.ts
|
|
46565
|
-
import { defineCommand as
|
|
46880
|
+
import { defineCommand as defineCommand179 } from "citty";
|
|
46566
46881
|
registerSchema({
|
|
46567
46882
|
command: "research.web",
|
|
46568
46883
|
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).",
|
|
@@ -46613,7 +46928,7 @@ async function runDeepResearch(question) {
|
|
|
46613
46928
|
}
|
|
46614
46929
|
throw new Error("Deep research timed out");
|
|
46615
46930
|
}
|
|
46616
|
-
var webCommand =
|
|
46931
|
+
var webCommand = defineCommand179({
|
|
46617
46932
|
meta: {
|
|
46618
46933
|
name: "web",
|
|
46619
46934
|
description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
|
|
@@ -46675,7 +46990,7 @@ Examples:
|
|
|
46675
46990
|
});
|
|
46676
46991
|
|
|
46677
46992
|
// src/commands/research/index.ts
|
|
46678
|
-
var researchCommand =
|
|
46993
|
+
var researchCommand = defineCommand180({
|
|
46679
46994
|
meta: {
|
|
46680
46995
|
name: "research",
|
|
46681
46996
|
description: `Competitive intelligence and AI-powered research commands.
|
|
@@ -46719,10 +47034,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
|
|
|
46719
47034
|
});
|
|
46720
47035
|
|
|
46721
47036
|
// src/commands/scheduled-actions/index.ts
|
|
46722
|
-
import { defineCommand as
|
|
47037
|
+
import { defineCommand as defineCommand188 } from "citty";
|
|
46723
47038
|
|
|
46724
47039
|
// src/commands/scheduled-actions/create.ts
|
|
46725
|
-
import { defineCommand as
|
|
47040
|
+
import { defineCommand as defineCommand181 } from "citty";
|
|
46726
47041
|
|
|
46727
47042
|
// src/commands/scheduled-actions/shared.ts
|
|
46728
47043
|
var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
|
|
@@ -46869,7 +47184,7 @@ registerSchema({
|
|
|
46869
47184
|
}
|
|
46870
47185
|
}
|
|
46871
47186
|
});
|
|
46872
|
-
var createCommand3 =
|
|
47187
|
+
var createCommand3 = defineCommand181({
|
|
46873
47188
|
meta: {
|
|
46874
47189
|
name: "create",
|
|
46875
47190
|
description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
|
|
@@ -46928,7 +47243,7 @@ var createCommand3 = defineCommand180({
|
|
|
46928
47243
|
});
|
|
46929
47244
|
|
|
46930
47245
|
// src/commands/scheduled-actions/delete.ts
|
|
46931
|
-
import { defineCommand as
|
|
47246
|
+
import { defineCommand as defineCommand182 } from "citty";
|
|
46932
47247
|
registerSchema({
|
|
46933
47248
|
command: "scheduled-actions.delete",
|
|
46934
47249
|
description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
|
|
@@ -46936,7 +47251,7 @@ registerSchema({
|
|
|
46936
47251
|
id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
|
|
46937
47252
|
}
|
|
46938
47253
|
});
|
|
46939
|
-
var deleteCommand3 =
|
|
47254
|
+
var deleteCommand3 = defineCommand182({
|
|
46940
47255
|
meta: {
|
|
46941
47256
|
name: "delete",
|
|
46942
47257
|
description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
|
|
@@ -46965,7 +47280,7 @@ var deleteCommand3 = defineCommand181({
|
|
|
46965
47280
|
});
|
|
46966
47281
|
|
|
46967
47282
|
// src/commands/scheduled-actions/get.ts
|
|
46968
|
-
import { defineCommand as
|
|
47283
|
+
import { defineCommand as defineCommand183 } from "citty";
|
|
46969
47284
|
registerSchema({
|
|
46970
47285
|
command: "scheduled-actions.get",
|
|
46971
47286
|
description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
|
|
@@ -46974,7 +47289,7 @@ registerSchema({
|
|
|
46974
47289
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
46975
47290
|
}
|
|
46976
47291
|
});
|
|
46977
|
-
var getCommand4 =
|
|
47292
|
+
var getCommand4 = defineCommand183({
|
|
46978
47293
|
meta: {
|
|
46979
47294
|
name: "get",
|
|
46980
47295
|
description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
|
|
@@ -47013,7 +47328,7 @@ var getCommand4 = defineCommand182({
|
|
|
47013
47328
|
});
|
|
47014
47329
|
|
|
47015
47330
|
// src/commands/scheduled-actions/list.ts
|
|
47016
|
-
import { defineCommand as
|
|
47331
|
+
import { defineCommand as defineCommand184 } from "citty";
|
|
47017
47332
|
registerSchema({
|
|
47018
47333
|
command: "scheduled-actions.list",
|
|
47019
47334
|
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.",
|
|
@@ -47021,7 +47336,7 @@ registerSchema({
|
|
|
47021
47336
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
47022
47337
|
}
|
|
47023
47338
|
});
|
|
47024
|
-
var listCommand15 =
|
|
47339
|
+
var listCommand15 = defineCommand184({
|
|
47025
47340
|
meta: {
|
|
47026
47341
|
name: "list",
|
|
47027
47342
|
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."
|
|
@@ -47046,7 +47361,7 @@ var listCommand15 = defineCommand183({
|
|
|
47046
47361
|
// src/commands/scheduled-actions/templates.ts
|
|
47047
47362
|
import { readFile as readFile24 } from "fs/promises";
|
|
47048
47363
|
import path37 from "path";
|
|
47049
|
-
import { defineCommand as
|
|
47364
|
+
import { defineCommand as defineCommand185 } from "citty";
|
|
47050
47365
|
registerSchema({
|
|
47051
47366
|
command: "scheduled-actions.templates",
|
|
47052
47367
|
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.",
|
|
@@ -47101,7 +47416,7 @@ registerSchema({
|
|
|
47101
47416
|
}
|
|
47102
47417
|
}
|
|
47103
47418
|
});
|
|
47104
|
-
var templatesCommand =
|
|
47419
|
+
var templatesCommand = defineCommand185({
|
|
47105
47420
|
meta: {
|
|
47106
47421
|
name: "templates",
|
|
47107
47422
|
description: `The recipes this company can run \u2014 Baker's own plus theirs, with what each one produces.
|
|
@@ -47193,7 +47508,7 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
|
47193
47508
|
});
|
|
47194
47509
|
|
|
47195
47510
|
// src/commands/scheduled-actions/trigger.ts
|
|
47196
|
-
import { defineCommand as
|
|
47511
|
+
import { defineCommand as defineCommand186 } from "citty";
|
|
47197
47512
|
registerSchema({
|
|
47198
47513
|
command: "scheduled-actions.trigger",
|
|
47199
47514
|
description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
|
|
@@ -47201,7 +47516,7 @@ registerSchema({
|
|
|
47201
47516
|
id: { type: "string", description: "Published scheduled action ID", required: true }
|
|
47202
47517
|
}
|
|
47203
47518
|
});
|
|
47204
|
-
var triggerCommand =
|
|
47519
|
+
var triggerCommand = defineCommand186({
|
|
47205
47520
|
meta: {
|
|
47206
47521
|
name: "trigger",
|
|
47207
47522
|
description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
|
|
@@ -47238,7 +47553,7 @@ var triggerCommand = defineCommand185({
|
|
|
47238
47553
|
});
|
|
47239
47554
|
|
|
47240
47555
|
// src/commands/scheduled-actions/update.ts
|
|
47241
|
-
import { defineCommand as
|
|
47556
|
+
import { defineCommand as defineCommand187 } from "citty";
|
|
47242
47557
|
registerSchema({
|
|
47243
47558
|
command: "scheduled-actions.update",
|
|
47244
47559
|
description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
|
|
@@ -47269,7 +47584,7 @@ registerSchema({
|
|
|
47269
47584
|
prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
|
|
47270
47585
|
}
|
|
47271
47586
|
});
|
|
47272
|
-
var updateCommand3 =
|
|
47587
|
+
var updateCommand3 = defineCommand187({
|
|
47273
47588
|
meta: {
|
|
47274
47589
|
name: "update",
|
|
47275
47590
|
description: "Stage a scheduled action update. Examples: baker scheduled-actions update <id> --enabled false | baker scheduled-actions update <id> --mode publish"
|
|
@@ -47347,7 +47662,7 @@ var updateCommand3 = defineCommand186({
|
|
|
47347
47662
|
});
|
|
47348
47663
|
|
|
47349
47664
|
// src/commands/scheduled-actions/index.ts
|
|
47350
|
-
var scheduledActionsCommand =
|
|
47665
|
+
var scheduledActionsCommand = defineCommand188({
|
|
47351
47666
|
meta: {
|
|
47352
47667
|
name: "scheduled-actions",
|
|
47353
47668
|
description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger, templates.
|
|
@@ -47376,14 +47691,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
|
47376
47691
|
});
|
|
47377
47692
|
|
|
47378
47693
|
// src/commands/schema.ts
|
|
47379
|
-
import { defineCommand as
|
|
47694
|
+
import { defineCommand as defineCommand189 } from "citty";
|
|
47380
47695
|
function narrowToFamily(commandName, available) {
|
|
47381
47696
|
const segments = commandName.split(".");
|
|
47382
47697
|
const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
|
|
47383
47698
|
const siblings = available.filter((name) => name.startsWith(prefix));
|
|
47384
47699
|
return siblings.length > 0 ? siblings : available;
|
|
47385
47700
|
}
|
|
47386
|
-
var schemaCommand2 =
|
|
47701
|
+
var schemaCommand2 = defineCommand189({
|
|
47387
47702
|
meta: {
|
|
47388
47703
|
name: "schema",
|
|
47389
47704
|
description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
|
|
@@ -47427,10 +47742,10 @@ var schemaCommand2 = defineCommand188({
|
|
|
47427
47742
|
});
|
|
47428
47743
|
|
|
47429
47744
|
// src/commands/studio/index.ts
|
|
47430
|
-
import { defineCommand as
|
|
47745
|
+
import { defineCommand as defineCommand198 } from "citty";
|
|
47431
47746
|
|
|
47432
47747
|
// src/commands/studio/animate.ts
|
|
47433
|
-
import { defineCommand as
|
|
47748
|
+
import { defineCommand as defineCommand190 } from "citty";
|
|
47434
47749
|
|
|
47435
47750
|
// src/commands/studio/batch.ts
|
|
47436
47751
|
function projectBatch(generation, full) {
|
|
@@ -47881,7 +48196,7 @@ function costHintsFor(body) {
|
|
|
47881
48196
|
}
|
|
47882
48197
|
return hints;
|
|
47883
48198
|
}
|
|
47884
|
-
var animateCommand =
|
|
48199
|
+
var animateCommand = defineCommand190({
|
|
47885
48200
|
meta: {
|
|
47886
48201
|
name: "animate",
|
|
47887
48202
|
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"
|
|
@@ -48000,7 +48315,7 @@ var animateCommand = defineCommand189({
|
|
|
48000
48315
|
});
|
|
48001
48316
|
|
|
48002
48317
|
// src/commands/studio/generate.ts
|
|
48003
|
-
import { defineCommand as
|
|
48318
|
+
import { defineCommand as defineCommand191 } from "citty";
|
|
48004
48319
|
var MODEL_LIST2 = IMAGE_MODEL_IDS;
|
|
48005
48320
|
var DEFAULT_MAX_WAIT_MS2 = 24e4;
|
|
48006
48321
|
registerSchema({
|
|
@@ -48136,7 +48451,7 @@ function buildGenerateBody(args, prompt) {
|
|
|
48136
48451
|
}
|
|
48137
48452
|
return body;
|
|
48138
48453
|
}
|
|
48139
|
-
var generateCommand =
|
|
48454
|
+
var generateCommand = defineCommand191({
|
|
48140
48455
|
meta: {
|
|
48141
48456
|
name: "generate",
|
|
48142
48457
|
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]]'"
|
|
@@ -48214,7 +48529,7 @@ var generateCommand = defineCommand190({
|
|
|
48214
48529
|
});
|
|
48215
48530
|
|
|
48216
48531
|
// src/commands/studio/get.ts
|
|
48217
|
-
import { defineCommand as
|
|
48532
|
+
import { defineCommand as defineCommand192 } from "citty";
|
|
48218
48533
|
registerSchema({
|
|
48219
48534
|
command: "studio.get",
|
|
48220
48535
|
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.",
|
|
@@ -48223,7 +48538,7 @@ registerSchema({
|
|
|
48223
48538
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
48224
48539
|
}
|
|
48225
48540
|
});
|
|
48226
|
-
var getCommand5 =
|
|
48541
|
+
var getCommand5 = defineCommand192({
|
|
48227
48542
|
meta: {
|
|
48228
48543
|
name: "get",
|
|
48229
48544
|
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"
|
|
@@ -48252,7 +48567,7 @@ var getCommand5 = defineCommand191({
|
|
|
48252
48567
|
});
|
|
48253
48568
|
|
|
48254
48569
|
// src/commands/studio/improve.ts
|
|
48255
|
-
import { defineCommand as
|
|
48570
|
+
import { defineCommand as defineCommand193 } from "citty";
|
|
48256
48571
|
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.";
|
|
48257
48572
|
registerSchema({
|
|
48258
48573
|
command: "studio.improve",
|
|
@@ -48277,7 +48592,7 @@ registerSchema({
|
|
|
48277
48592
|
}
|
|
48278
48593
|
}
|
|
48279
48594
|
});
|
|
48280
|
-
var improveCommand =
|
|
48595
|
+
var improveCommand = defineCommand193({
|
|
48281
48596
|
meta: {
|
|
48282
48597
|
name: "improve",
|
|
48283
48598
|
description: `${DESCRIPTION}
|
|
@@ -48321,7 +48636,7 @@ Examples:
|
|
|
48321
48636
|
});
|
|
48322
48637
|
|
|
48323
48638
|
// src/commands/studio/keep.ts
|
|
48324
|
-
import { defineCommand as
|
|
48639
|
+
import { defineCommand as defineCommand194 } from "citty";
|
|
48325
48640
|
registerSchema({
|
|
48326
48641
|
command: "studio.keep",
|
|
48327
48642
|
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.",
|
|
@@ -48331,7 +48646,7 @@ registerSchema({
|
|
|
48331
48646
|
undo: { type: "boolean", description: "Un-star an image, or take a kept clip back out", required: false }
|
|
48332
48647
|
}
|
|
48333
48648
|
});
|
|
48334
|
-
var keepCommand =
|
|
48649
|
+
var keepCommand = defineCommand194({
|
|
48335
48650
|
meta: {
|
|
48336
48651
|
name: "keep",
|
|
48337
48652
|
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"
|
|
@@ -48382,7 +48697,7 @@ var keepCommand = defineCommand193({
|
|
|
48382
48697
|
});
|
|
48383
48698
|
|
|
48384
48699
|
// src/commands/studio/list.ts
|
|
48385
|
-
import { defineCommand as
|
|
48700
|
+
import { defineCommand as defineCommand195 } from "citty";
|
|
48386
48701
|
registerSchema({
|
|
48387
48702
|
command: "studio.list",
|
|
48388
48703
|
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.",
|
|
@@ -48393,7 +48708,7 @@ registerSchema({
|
|
|
48393
48708
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
48394
48709
|
}
|
|
48395
48710
|
});
|
|
48396
|
-
var listCommand16 =
|
|
48711
|
+
var listCommand16 = defineCommand195({
|
|
48397
48712
|
meta: {
|
|
48398
48713
|
name: "list",
|
|
48399
48714
|
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"
|
|
@@ -48427,7 +48742,7 @@ var listCommand16 = defineCommand194({
|
|
|
48427
48742
|
});
|
|
48428
48743
|
|
|
48429
48744
|
// src/commands/studio/models.ts
|
|
48430
|
-
import { defineCommand as
|
|
48745
|
+
import { defineCommand as defineCommand196 } from "citty";
|
|
48431
48746
|
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.";
|
|
48432
48747
|
registerSchema({
|
|
48433
48748
|
command: "studio.models",
|
|
@@ -48514,7 +48829,7 @@ function buildModelCards(kind, model) {
|
|
|
48514
48829
|
const selected = model ? ids.filter((id) => id === model) : ids;
|
|
48515
48830
|
return selected.map((id) => build(id));
|
|
48516
48831
|
}
|
|
48517
|
-
var modelsCommand =
|
|
48832
|
+
var modelsCommand = defineCommand196({
|
|
48518
48833
|
meta: {
|
|
48519
48834
|
name: "models",
|
|
48520
48835
|
description: `${DESCRIPTION2}
|
|
@@ -48561,13 +48876,13 @@ Examples:
|
|
|
48561
48876
|
});
|
|
48562
48877
|
|
|
48563
48878
|
// src/commands/studio/skills.ts
|
|
48564
|
-
import { defineCommand as
|
|
48879
|
+
import { defineCommand as defineCommand197 } from "citty";
|
|
48565
48880
|
registerSchema({
|
|
48566
48881
|
command: "studio.skills",
|
|
48567
48882
|
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.",
|
|
48568
48883
|
args: {}
|
|
48569
48884
|
});
|
|
48570
|
-
var skillsCommand =
|
|
48885
|
+
var skillsCommand = defineCommand197({
|
|
48571
48886
|
meta: {
|
|
48572
48887
|
name: "skills",
|
|
48573
48888
|
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"
|
|
@@ -48591,7 +48906,7 @@ var skillsCommand = defineCommand196({
|
|
|
48591
48906
|
});
|
|
48592
48907
|
|
|
48593
48908
|
// src/commands/studio/index.ts
|
|
48594
|
-
var studioCommand =
|
|
48909
|
+
var studioCommand = defineCommand198({
|
|
48595
48910
|
meta: {
|
|
48596
48911
|
name: "studio",
|
|
48597
48912
|
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.
|
|
@@ -48634,10 +48949,10 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
|
|
|
48634
48949
|
});
|
|
48635
48950
|
|
|
48636
48951
|
// src/commands/tag-manager/index.ts
|
|
48637
|
-
import { defineCommand as
|
|
48952
|
+
import { defineCommand as defineCommand202 } from "citty";
|
|
48638
48953
|
|
|
48639
48954
|
// src/commands/tag-manager/draft.ts
|
|
48640
|
-
import { defineCommand as
|
|
48955
|
+
import { defineCommand as defineCommand199 } from "citty";
|
|
48641
48956
|
|
|
48642
48957
|
// src/commands/tag-manager/shared.ts
|
|
48643
48958
|
import { readFileSync as readFileSync15 } from "fs";
|
|
@@ -48760,13 +49075,13 @@ registerSchema({
|
|
|
48760
49075
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
48761
49076
|
}
|
|
48762
49077
|
});
|
|
48763
|
-
var draftCommand4 =
|
|
49078
|
+
var draftCommand4 = defineCommand199({
|
|
48764
49079
|
meta: {
|
|
48765
49080
|
name: "draft",
|
|
48766
49081
|
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."
|
|
48767
49082
|
},
|
|
48768
49083
|
subCommands: {
|
|
48769
|
-
list:
|
|
49084
|
+
list: defineCommand199({
|
|
48770
49085
|
meta: {
|
|
48771
49086
|
name: "list",
|
|
48772
49087
|
description: "Review everything staged on this chat (--json for the raw envelope)"
|
|
@@ -48779,7 +49094,7 @@ var draftCommand4 = defineCommand198({
|
|
|
48779
49094
|
await draftList2(args.json === true, args.chat);
|
|
48780
49095
|
}
|
|
48781
49096
|
}),
|
|
48782
|
-
show:
|
|
49097
|
+
show: defineCommand199({
|
|
48783
49098
|
meta: {
|
|
48784
49099
|
name: "show",
|
|
48785
49100
|
description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
|
|
@@ -48796,7 +49111,7 @@ var draftCommand4 = defineCommand198({
|
|
|
48796
49111
|
);
|
|
48797
49112
|
}
|
|
48798
49113
|
}),
|
|
48799
|
-
amend:
|
|
49114
|
+
amend: defineCommand199({
|
|
48800
49115
|
meta: {
|
|
48801
49116
|
name: "amend",
|
|
48802
49117
|
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."
|
|
@@ -48813,7 +49128,7 @@ var draftCommand4 = defineCommand198({
|
|
|
48813
49128
|
});
|
|
48814
49129
|
}
|
|
48815
49130
|
}),
|
|
48816
|
-
remove:
|
|
49131
|
+
remove: defineCommand199({
|
|
48817
49132
|
meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
|
|
48818
49133
|
args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
|
|
48819
49134
|
run: async ({ args }) => {
|
|
@@ -48822,7 +49137,7 @@ var draftCommand4 = defineCommand198({
|
|
|
48822
49137
|
});
|
|
48823
49138
|
}
|
|
48824
49139
|
}),
|
|
48825
|
-
clear:
|
|
49140
|
+
clear: defineCommand199({
|
|
48826
49141
|
meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
|
|
48827
49142
|
run: async () => {
|
|
48828
49143
|
await draftAction3("/api/tag-manager/draft/clear", {});
|
|
@@ -48832,7 +49147,7 @@ var draftCommand4 = defineCommand198({
|
|
|
48832
49147
|
});
|
|
48833
49148
|
|
|
48834
49149
|
// src/commands/tag-manager/read.ts
|
|
48835
|
-
import { defineCommand as
|
|
49150
|
+
import { defineCommand as defineCommand200 } from "citty";
|
|
48836
49151
|
registerSchema({
|
|
48837
49152
|
command: "tagManager.containers",
|
|
48838
49153
|
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.",
|
|
@@ -48873,7 +49188,7 @@ function containersHints(containers) {
|
|
|
48873
49188
|
}))
|
|
48874
49189
|
});
|
|
48875
49190
|
}
|
|
48876
|
-
var containersCommand =
|
|
49191
|
+
var containersCommand = defineCommand200({
|
|
48877
49192
|
meta: {
|
|
48878
49193
|
name: "containers",
|
|
48879
49194
|
description: `List Tag Manager containers reachable by this company's connection.
|
|
@@ -48890,7 +49205,7 @@ Start here:
|
|
|
48890
49205
|
}
|
|
48891
49206
|
}
|
|
48892
49207
|
});
|
|
48893
|
-
var readCommand =
|
|
49208
|
+
var readCommand = defineCommand200({
|
|
48894
49209
|
meta: {
|
|
48895
49210
|
name: "read",
|
|
48896
49211
|
description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
|
|
@@ -48932,7 +49247,7 @@ Examples:
|
|
|
48932
49247
|
});
|
|
48933
49248
|
|
|
48934
49249
|
// src/commands/tag-manager/write-commands.ts
|
|
48935
|
-
import { defineCommand as
|
|
49250
|
+
import { defineCommand as defineCommand201 } from "citty";
|
|
48936
49251
|
var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
|
|
48937
49252
|
var ENTITIES = [
|
|
48938
49253
|
{
|
|
@@ -48988,10 +49303,10 @@ for (const { entity, noun, createHint } of ENTITIES) {
|
|
|
48988
49303
|
});
|
|
48989
49304
|
}
|
|
48990
49305
|
function entityCommand(entity, noun, example) {
|
|
48991
|
-
return
|
|
49306
|
+
return defineCommand201({
|
|
48992
49307
|
meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
|
|
48993
49308
|
subCommands: {
|
|
48994
|
-
create:
|
|
49309
|
+
create: defineCommand201({
|
|
48995
49310
|
meta: {
|
|
48996
49311
|
name: "create",
|
|
48997
49312
|
description: `Stage a new ${noun}
|
|
@@ -49013,7 +49328,7 @@ Examples:
|
|
|
49013
49328
|
});
|
|
49014
49329
|
}
|
|
49015
49330
|
}),
|
|
49016
|
-
update:
|
|
49331
|
+
update: defineCommand201({
|
|
49017
49332
|
meta: {
|
|
49018
49333
|
name: "update",
|
|
49019
49334
|
description: `Stage an update to an existing ${noun} (pass its id or path)`
|
|
@@ -49033,7 +49348,7 @@ Examples:
|
|
|
49033
49348
|
});
|
|
49034
49349
|
}
|
|
49035
49350
|
}),
|
|
49036
|
-
delete:
|
|
49351
|
+
delete: defineCommand201({
|
|
49037
49352
|
meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
|
|
49038
49353
|
args: {
|
|
49039
49354
|
id: { type: "positional", description: `${noun} id or path`, required: false },
|
|
@@ -49074,7 +49389,7 @@ function builtinTypes(args) {
|
|
|
49074
49389
|
}
|
|
49075
49390
|
return raw.split(",").map((entry) => entry.trim());
|
|
49076
49391
|
}
|
|
49077
|
-
var builtinCommand =
|
|
49392
|
+
var builtinCommand = defineCommand201({
|
|
49078
49393
|
meta: {
|
|
49079
49394
|
name: "builtin",
|
|
49080
49395
|
description: `Enable or disable built-in variables
|
|
@@ -49084,7 +49399,7 @@ Examples:
|
|
|
49084
49399
|
baker tag-manager builtin disable --types formId`
|
|
49085
49400
|
},
|
|
49086
49401
|
subCommands: {
|
|
49087
|
-
enable:
|
|
49402
|
+
enable: defineCommand201({
|
|
49088
49403
|
meta: { name: "enable", description: "Stage enabling built-in variables" },
|
|
49089
49404
|
args: {
|
|
49090
49405
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -49098,7 +49413,7 @@ Examples:
|
|
|
49098
49413
|
});
|
|
49099
49414
|
}
|
|
49100
49415
|
}),
|
|
49101
|
-
disable:
|
|
49416
|
+
disable: defineCommand201({
|
|
49102
49417
|
meta: { name: "disable", description: "Stage disabling built-in variables" },
|
|
49103
49418
|
args: {
|
|
49104
49419
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -49116,7 +49431,7 @@ Examples:
|
|
|
49116
49431
|
});
|
|
49117
49432
|
|
|
49118
49433
|
// src/commands/tag-manager/index.ts
|
|
49119
|
-
var tagManagerCommand =
|
|
49434
|
+
var tagManagerCommand = defineCommand202({
|
|
49120
49435
|
meta: {
|
|
49121
49436
|
name: "tag-manager",
|
|
49122
49437
|
description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
|
|
@@ -49153,7 +49468,7 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
|
|
|
49153
49468
|
});
|
|
49154
49469
|
|
|
49155
49470
|
// src/commands/tags/index.ts
|
|
49156
|
-
import { defineCommand as
|
|
49471
|
+
import { defineCommand as defineCommand203 } from "citty";
|
|
49157
49472
|
|
|
49158
49473
|
// src/commands/tags/shared.ts
|
|
49159
49474
|
function failApi3(err) {
|
|
@@ -49222,7 +49537,7 @@ async function listTags(json) {
|
|
|
49222
49537
|
var listArgs9 = {
|
|
49223
49538
|
json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
|
|
49224
49539
|
};
|
|
49225
|
-
var listCommand17 =
|
|
49540
|
+
var listCommand17 = defineCommand203({
|
|
49226
49541
|
meta: {
|
|
49227
49542
|
name: "list",
|
|
49228
49543
|
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"
|
|
@@ -49241,7 +49556,7 @@ async function listDraft3(chat) {
|
|
|
49241
49556
|
failApi3(err);
|
|
49242
49557
|
}
|
|
49243
49558
|
}
|
|
49244
|
-
var draftCommand5 =
|
|
49559
|
+
var draftCommand5 = defineCommand203({
|
|
49245
49560
|
meta: {
|
|
49246
49561
|
name: "draft",
|
|
49247
49562
|
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."
|
|
@@ -49251,7 +49566,7 @@ var draftCommand5 = defineCommand202({
|
|
|
49251
49566
|
await listDraft3(args.chat);
|
|
49252
49567
|
}
|
|
49253
49568
|
});
|
|
49254
|
-
var tagsCommand4 =
|
|
49569
|
+
var tagsCommand4 = defineCommand203({
|
|
49255
49570
|
meta: {
|
|
49256
49571
|
name: "tags",
|
|
49257
49572
|
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.
|
|
@@ -49280,10 +49595,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
|
|
|
49280
49595
|
});
|
|
49281
49596
|
|
|
49282
49597
|
// src/commands/testimonials/index.ts
|
|
49283
|
-
import { defineCommand as
|
|
49598
|
+
import { defineCommand as defineCommand207 } from "citty";
|
|
49284
49599
|
|
|
49285
49600
|
// src/commands/testimonials/get.ts
|
|
49286
|
-
import { defineCommand as
|
|
49601
|
+
import { defineCommand as defineCommand204 } from "citty";
|
|
49287
49602
|
registerSchema({
|
|
49288
49603
|
command: "testimonials.get",
|
|
49289
49604
|
description: "Get a single testimonial by ID",
|
|
@@ -49291,7 +49606,7 @@ registerSchema({
|
|
|
49291
49606
|
id: { type: "string", description: "Testimonial ID", required: true }
|
|
49292
49607
|
}
|
|
49293
49608
|
});
|
|
49294
|
-
var getCommand6 =
|
|
49609
|
+
var getCommand6 = defineCommand204({
|
|
49295
49610
|
meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
|
|
49296
49611
|
args: {
|
|
49297
49612
|
id: { type: "positional", description: "Testimonial ID", required: false },
|
|
@@ -49328,7 +49643,7 @@ var getCommand6 = defineCommand203({
|
|
|
49328
49643
|
});
|
|
49329
49644
|
|
|
49330
49645
|
// src/commands/testimonials/list.ts
|
|
49331
|
-
import { defineCommand as
|
|
49646
|
+
import { defineCommand as defineCommand205 } from "citty";
|
|
49332
49647
|
|
|
49333
49648
|
// src/commands/testimonials/emptyCorpusHints.ts
|
|
49334
49649
|
function resolveEmptyReason({
|
|
@@ -49463,7 +49778,7 @@ function buildListParams(args) {
|
|
|
49463
49778
|
}
|
|
49464
49779
|
return params;
|
|
49465
49780
|
}
|
|
49466
|
-
var listCommand18 =
|
|
49781
|
+
var listCommand18 = defineCommand205({
|
|
49467
49782
|
meta: {
|
|
49468
49783
|
name: "list",
|
|
49469
49784
|
description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
|
|
@@ -49515,7 +49830,7 @@ var listCommand18 = defineCommand204({
|
|
|
49515
49830
|
});
|
|
49516
49831
|
|
|
49517
49832
|
// src/commands/testimonials/search.ts
|
|
49518
|
-
import { defineCommand as
|
|
49833
|
+
import { defineCommand as defineCommand206 } from "citty";
|
|
49519
49834
|
var FILTER_FLAGS2 = ["source", "rating-min", "rating-max", "status", "sentiment", "language", "tags"];
|
|
49520
49835
|
function languageBiasHint(results, requestedLanguage) {
|
|
49521
49836
|
if (requestedLanguage) {
|
|
@@ -49594,7 +49909,7 @@ function buildSearchRequest(query, args) {
|
|
|
49594
49909
|
}
|
|
49595
49910
|
return body;
|
|
49596
49911
|
}
|
|
49597
|
-
var searchCommand3 =
|
|
49912
|
+
var searchCommand3 = defineCommand206({
|
|
49598
49913
|
meta: {
|
|
49599
49914
|
name: "search",
|
|
49600
49915
|
description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
|
|
@@ -49658,7 +49973,7 @@ var searchCommand3 = defineCommand205({
|
|
|
49658
49973
|
var tagsCommand5 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
|
|
49659
49974
|
|
|
49660
49975
|
// src/commands/testimonials/index.ts
|
|
49661
|
-
var testimonialsCommand =
|
|
49976
|
+
var testimonialsCommand = defineCommand207({
|
|
49662
49977
|
meta: {
|
|
49663
49978
|
name: "testimonials",
|
|
49664
49979
|
description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
|
|
@@ -49680,10 +49995,10 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
|
|
|
49680
49995
|
});
|
|
49681
49996
|
|
|
49682
49997
|
// src/commands/videos/index.ts
|
|
49683
|
-
import { defineCommand as
|
|
49998
|
+
import { defineCommand as defineCommand214 } from "citty";
|
|
49684
49999
|
|
|
49685
50000
|
// src/commands/videos/delete.ts
|
|
49686
|
-
import { defineCommand as
|
|
50001
|
+
import { defineCommand as defineCommand208 } from "citty";
|
|
49687
50002
|
registerSchema({
|
|
49688
50003
|
command: "videos.delete",
|
|
49689
50004
|
description: "Delete a video by ID",
|
|
@@ -49697,7 +50012,7 @@ registerSchema({
|
|
|
49697
50012
|
}
|
|
49698
50013
|
}
|
|
49699
50014
|
});
|
|
49700
|
-
var deleteCommand4 =
|
|
50015
|
+
var deleteCommand4 = defineCommand208({
|
|
49701
50016
|
meta: {
|
|
49702
50017
|
name: "delete",
|
|
49703
50018
|
description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
|
|
@@ -49738,7 +50053,7 @@ var deleteCommand4 = defineCommand207({
|
|
|
49738
50053
|
});
|
|
49739
50054
|
|
|
49740
50055
|
// src/commands/videos/get.ts
|
|
49741
|
-
import { defineCommand as
|
|
50056
|
+
import { defineCommand as defineCommand209 } from "citty";
|
|
49742
50057
|
registerSchema({
|
|
49743
50058
|
command: "videos.get",
|
|
49744
50059
|
description: "Get a single video by ID",
|
|
@@ -49746,7 +50061,7 @@ registerSchema({
|
|
|
49746
50061
|
id: { type: "string", description: "Video ID", required: true }
|
|
49747
50062
|
}
|
|
49748
50063
|
});
|
|
49749
|
-
var getCommand7 =
|
|
50064
|
+
var getCommand7 = defineCommand209({
|
|
49750
50065
|
meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
|
|
49751
50066
|
args: {
|
|
49752
50067
|
id: { type: "positional", description: "Video ID", required: false },
|
|
@@ -49783,7 +50098,7 @@ var getCommand7 = defineCommand208({
|
|
|
49783
50098
|
});
|
|
49784
50099
|
|
|
49785
50100
|
// src/commands/videos/group.ts
|
|
49786
|
-
import { defineCommand as
|
|
50101
|
+
import { defineCommand as defineCommand210 } from "citty";
|
|
49787
50102
|
registerSchema({
|
|
49788
50103
|
command: "videos.group",
|
|
49789
50104
|
description: "List every clip and image that arrived in the same set as this video (carousel slides, one page)",
|
|
@@ -49792,7 +50107,7 @@ registerSchema({
|
|
|
49792
50107
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
49793
50108
|
}
|
|
49794
50109
|
});
|
|
49795
|
-
var groupCommand2 =
|
|
50110
|
+
var groupCommand2 = defineCommand210({
|
|
49796
50111
|
meta: {
|
|
49797
50112
|
name: "group",
|
|
49798
50113
|
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>"
|
|
@@ -49815,7 +50130,7 @@ var groupCommand2 = defineCommand209({
|
|
|
49815
50130
|
import { mkdtemp as mkdtemp2, rm as rm7, stat as stat7 } from "fs/promises";
|
|
49816
50131
|
import { tmpdir as tmpdir3 } from "os";
|
|
49817
50132
|
import path38 from "path";
|
|
49818
|
-
import { defineCommand as
|
|
50133
|
+
import { defineCommand as defineCommand211 } from "citty";
|
|
49819
50134
|
|
|
49820
50135
|
// src/lib/streamUpload.ts
|
|
49821
50136
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -49979,7 +50294,7 @@ registerSchema({
|
|
|
49979
50294
|
"dry-run": { type: "boolean", description: "Preview the operation without executing", required: false }
|
|
49980
50295
|
}
|
|
49981
50296
|
});
|
|
49982
|
-
var ingestCommand2 =
|
|
50297
|
+
var ingestCommand2 = defineCommand211({
|
|
49983
50298
|
meta: {
|
|
49984
50299
|
name: "ingest",
|
|
49985
50300
|
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"
|
|
@@ -50095,35 +50410,35 @@ async function ingestByRoute(args, direct, country) {
|
|
|
50095
50410
|
function reportYtDlpFailure(err) {
|
|
50096
50411
|
const detail = `${err.stderrTail} ${err.message}`;
|
|
50097
50412
|
if (isProxyFailure(ytDlpBlockSignal(detail))) {
|
|
50098
|
-
|
|
50413
|
+
fail8(
|
|
50099
50414
|
"Couldn't download that video: our connection to the internet was refused.",
|
|
50100
50415
|
"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."
|
|
50101
50416
|
);
|
|
50102
50417
|
}
|
|
50103
50418
|
if (isDrmProtected(detail)) {
|
|
50104
|
-
|
|
50419
|
+
fail8(
|
|
50105
50420
|
"That video is copy-protected, so it can't be added to the library.",
|
|
50106
50421
|
"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>`."
|
|
50107
50422
|
);
|
|
50108
50423
|
}
|
|
50109
50424
|
if (isVimeoAuthFailure(detail)) {
|
|
50110
|
-
|
|
50425
|
+
fail8(
|
|
50111
50426
|
"Vimeo wouldn't hand over that video \u2014 Baker isn't signed in to Vimeo.",
|
|
50112
50427
|
"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>`."
|
|
50113
50428
|
);
|
|
50114
50429
|
}
|
|
50115
50430
|
if (isRegionBlocked(detail)) {
|
|
50116
|
-
|
|
50431
|
+
fail8(
|
|
50117
50432
|
`That video isn't available in the region we're fetching from. ${err.stderrTail || err.message}`,
|
|
50118
50433
|
"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."
|
|
50119
50434
|
);
|
|
50120
50435
|
}
|
|
50121
|
-
|
|
50436
|
+
fail8(
|
|
50122
50437
|
`Couldn't download that video. ${err.stderrTail || err.message}`,
|
|
50123
50438
|
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>`."
|
|
50124
50439
|
);
|
|
50125
50440
|
}
|
|
50126
|
-
function
|
|
50441
|
+
function fail8(message, fix, code = "INGEST_FAILED") {
|
|
50127
50442
|
writeJson({ ok: false, error: { code, message, fix } });
|
|
50128
50443
|
process.exit(1);
|
|
50129
50444
|
}
|
|
@@ -50135,13 +50450,13 @@ function reportIngestFailure(err) {
|
|
|
50135
50450
|
if (err instanceof YtDlpError) reportYtDlpFailure(err);
|
|
50136
50451
|
const detail = err instanceof Error ? err.message : String(err);
|
|
50137
50452
|
if (detail.includes("timed out after")) {
|
|
50138
|
-
|
|
50453
|
+
fail8(
|
|
50139
50454
|
"That video took too long to download and was stopped part-way.",
|
|
50140
50455
|
"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>`.",
|
|
50141
50456
|
"INTERNAL_ERROR"
|
|
50142
50457
|
);
|
|
50143
50458
|
}
|
|
50144
|
-
|
|
50459
|
+
fail8(
|
|
50145
50460
|
`Couldn't add that video. ${detail}`,
|
|
50146
50461
|
"This is a fault on Baker's side, not a problem with the link. Report it.",
|
|
50147
50462
|
"INTERNAL_ERROR"
|
|
@@ -50241,7 +50556,7 @@ async function uploadToAssetStore(filePath, sizeBytes) {
|
|
|
50241
50556
|
}
|
|
50242
50557
|
|
|
50243
50558
|
// src/commands/videos/search.ts
|
|
50244
|
-
import { defineCommand as
|
|
50559
|
+
import { defineCommand as defineCommand212 } from "citty";
|
|
50245
50560
|
registerSchema({
|
|
50246
50561
|
command: "videos.search",
|
|
50247
50562
|
description: "Search videos by text query. Only returns ready videos.",
|
|
@@ -50251,7 +50566,7 @@ registerSchema({
|
|
|
50251
50566
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
50252
50567
|
}
|
|
50253
50568
|
});
|
|
50254
|
-
var searchCommand4 =
|
|
50569
|
+
var searchCommand4 = defineCommand212({
|
|
50255
50570
|
meta: {
|
|
50256
50571
|
name: "search",
|
|
50257
50572
|
description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
|
|
@@ -50303,7 +50618,7 @@ var tagsCommand6 = makeTagsCommand("videos", "video", "/api/videos/tags");
|
|
|
50303
50618
|
// src/commands/videos/upload.ts
|
|
50304
50619
|
import { readFile as readFile25, stat as stat8 } from "fs/promises";
|
|
50305
50620
|
import { basename as basename3, extname as extname4 } from "path";
|
|
50306
|
-
import { defineCommand as
|
|
50621
|
+
import { defineCommand as defineCommand213 } from "citty";
|
|
50307
50622
|
var MIME_MAP = {
|
|
50308
50623
|
".mp4": "video/mp4",
|
|
50309
50624
|
".mov": "video/quicktime",
|
|
@@ -50345,7 +50660,7 @@ function detectContentType(filePath) {
|
|
|
50345
50660
|
function isRemoteUrl3(value) {
|
|
50346
50661
|
return /^https?:\/\//i.test(value);
|
|
50347
50662
|
}
|
|
50348
|
-
var uploadCommand2 =
|
|
50663
|
+
var uploadCommand2 = defineCommand213({
|
|
50349
50664
|
meta: {
|
|
50350
50665
|
name: "upload",
|
|
50351
50666
|
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"
|
|
@@ -50429,7 +50744,7 @@ var uploadCommand2 = defineCommand212({
|
|
|
50429
50744
|
});
|
|
50430
50745
|
|
|
50431
50746
|
// src/commands/videos/index.ts
|
|
50432
|
-
var videosCommand =
|
|
50747
|
+
var videosCommand = defineCommand214({
|
|
50433
50748
|
meta: {
|
|
50434
50749
|
name: "videos",
|
|
50435
50750
|
description: `Find and manage videos in Baker. Subcommands: search, get, upload, ingest, delete, tags.
|
|
@@ -50456,10 +50771,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
|
|
|
50456
50771
|
});
|
|
50457
50772
|
|
|
50458
50773
|
// src/commands/winning-ads/index.ts
|
|
50459
|
-
import { defineCommand as
|
|
50774
|
+
import { defineCommand as defineCommand227 } from "citty";
|
|
50460
50775
|
|
|
50461
50776
|
// src/commands/winning-ads/advertisers.ts
|
|
50462
|
-
import { defineCommand as
|
|
50777
|
+
import { defineCommand as defineCommand215 } from "citty";
|
|
50463
50778
|
|
|
50464
50779
|
// src/commands/winning-ads/shared.ts
|
|
50465
50780
|
function splitList2(value) {
|
|
@@ -50512,7 +50827,7 @@ function advertiserNormalizer(record, full) {
|
|
|
50512
50827
|
last_synced_at: record.last_synced_at ?? null
|
|
50513
50828
|
};
|
|
50514
50829
|
}
|
|
50515
|
-
var advertisersCommand2 =
|
|
50830
|
+
var advertisersCommand2 = defineCommand215({
|
|
50516
50831
|
meta: {
|
|
50517
50832
|
name: "advertisers",
|
|
50518
50833
|
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'
|
|
@@ -50570,7 +50885,7 @@ var advertisersCommand2 = defineCommand214({
|
|
|
50570
50885
|
});
|
|
50571
50886
|
|
|
50572
50887
|
// src/commands/winning-ads/brief.ts
|
|
50573
|
-
import { defineCommand as
|
|
50888
|
+
import { defineCommand as defineCommand216 } from "citty";
|
|
50574
50889
|
registerSchema({
|
|
50575
50890
|
command: "winning-ads.brief",
|
|
50576
50891
|
description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
|
|
@@ -50616,7 +50931,7 @@ function parseDna(raw) {
|
|
|
50616
50931
|
}
|
|
50617
50932
|
return parsed;
|
|
50618
50933
|
}
|
|
50619
|
-
var briefCommand =
|
|
50934
|
+
var briefCommand = defineCommand216({
|
|
50620
50935
|
meta: {
|
|
50621
50936
|
name: "brief",
|
|
50622
50937
|
description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
|
|
@@ -50652,7 +50967,7 @@ var briefCommand = defineCommand215({
|
|
|
50652
50967
|
});
|
|
50653
50968
|
|
|
50654
50969
|
// src/commands/winning-ads/content.ts
|
|
50655
|
-
import { defineCommand as
|
|
50970
|
+
import { defineCommand as defineCommand217 } from "citty";
|
|
50656
50971
|
registerSchema({
|
|
50657
50972
|
command: "winning-ads.content",
|
|
50658
50973
|
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.",
|
|
@@ -50665,7 +50980,7 @@ registerSchema({
|
|
|
50665
50980
|
}
|
|
50666
50981
|
}
|
|
50667
50982
|
});
|
|
50668
|
-
var contentCommand =
|
|
50983
|
+
var contentCommand = defineCommand217({
|
|
50669
50984
|
meta: {
|
|
50670
50985
|
name: "content",
|
|
50671
50986
|
description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
|
|
@@ -50714,7 +51029,7 @@ var contentCommand = defineCommand216({
|
|
|
50714
51029
|
});
|
|
50715
51030
|
|
|
50716
51031
|
// src/commands/winning-ads/feed.ts
|
|
50717
|
-
import { defineCommand as
|
|
51032
|
+
import { defineCommand as defineCommand218 } from "citty";
|
|
50718
51033
|
function buildFeedParams(input) {
|
|
50719
51034
|
const params = {};
|
|
50720
51035
|
const advertiser = splitList2(input.advertiser);
|
|
@@ -50766,7 +51081,7 @@ registerSchema({
|
|
|
50766
51081
|
format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
|
|
50767
51082
|
}
|
|
50768
51083
|
});
|
|
50769
|
-
var feedCommand =
|
|
51084
|
+
var feedCommand = defineCommand218({
|
|
50770
51085
|
meta: {
|
|
50771
51086
|
name: "feed",
|
|
50772
51087
|
description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
|
|
@@ -50851,7 +51166,7 @@ var feedCommand = defineCommand217({
|
|
|
50851
51166
|
});
|
|
50852
51167
|
|
|
50853
51168
|
// src/commands/winning-ads/follow.ts
|
|
50854
|
-
import { defineCommand as
|
|
51169
|
+
import { defineCommand as defineCommand219 } from "citty";
|
|
50855
51170
|
var PLATFORMS = ["meta", "linkedin"];
|
|
50856
51171
|
registerSchema({
|
|
50857
51172
|
command: "winning-ads.follow",
|
|
@@ -50866,7 +51181,7 @@ registerSchema({
|
|
|
50866
51181
|
label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
|
|
50867
51182
|
}
|
|
50868
51183
|
});
|
|
50869
|
-
var followCommand =
|
|
51184
|
+
var followCommand = defineCommand219({
|
|
50870
51185
|
meta: {
|
|
50871
51186
|
name: "follow",
|
|
50872
51187
|
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'
|
|
@@ -50913,7 +51228,7 @@ var followCommand = defineCommand218({
|
|
|
50913
51228
|
});
|
|
50914
51229
|
|
|
50915
51230
|
// src/commands/winning-ads/follow-competitors.ts
|
|
50916
|
-
import { defineCommand as
|
|
51231
|
+
import { defineCommand as defineCommand220 } from "citty";
|
|
50917
51232
|
var PLATFORMS2 = ["meta", "linkedin"];
|
|
50918
51233
|
var BATCH_TIMEOUT_MS = 3e5;
|
|
50919
51234
|
function buildFollowBatchBody(input) {
|
|
@@ -50946,7 +51261,7 @@ registerSchema({
|
|
|
50946
51261
|
}
|
|
50947
51262
|
}
|
|
50948
51263
|
});
|
|
50949
|
-
var followCompetitorsCommand =
|
|
51264
|
+
var followCompetitorsCommand = defineCommand220({
|
|
50950
51265
|
meta: {
|
|
50951
51266
|
name: "follow-competitors",
|
|
50952
51267
|
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"'
|
|
@@ -51021,7 +51336,7 @@ var followCompetitorsCommand = defineCommand219({
|
|
|
51021
51336
|
});
|
|
51022
51337
|
|
|
51023
51338
|
// src/commands/winning-ads/following.ts
|
|
51024
|
-
import { defineCommand as
|
|
51339
|
+
import { defineCommand as defineCommand221 } from "citty";
|
|
51025
51340
|
registerSchema({
|
|
51026
51341
|
command: "winning-ads.following",
|
|
51027
51342
|
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.",
|
|
@@ -51075,7 +51390,7 @@ function followingNormalizer(record, full) {
|
|
|
51075
51390
|
platforms: Array.isArray(record.platforms) ? record.platforms : []
|
|
51076
51391
|
};
|
|
51077
51392
|
}
|
|
51078
|
-
var followingCommand =
|
|
51393
|
+
var followingCommand = defineCommand221({
|
|
51079
51394
|
meta: {
|
|
51080
51395
|
name: "following",
|
|
51081
51396
|
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"
|
|
@@ -51111,7 +51426,7 @@ var followingCommand = defineCommand220({
|
|
|
51111
51426
|
});
|
|
51112
51427
|
|
|
51113
51428
|
// src/commands/winning-ads/patterns.ts
|
|
51114
|
-
import { defineCommand as
|
|
51429
|
+
import { defineCommand as defineCommand222 } from "citty";
|
|
51115
51430
|
registerSchema({
|
|
51116
51431
|
command: "winning-ads.patterns",
|
|
51117
51432
|
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.",
|
|
@@ -51150,7 +51465,7 @@ function discriminatorRow(record) {
|
|
|
51150
51465
|
top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
|
|
51151
51466
|
};
|
|
51152
51467
|
}
|
|
51153
|
-
var patternsCommand =
|
|
51468
|
+
var patternsCommand = defineCommand222({
|
|
51154
51469
|
meta: {
|
|
51155
51470
|
name: "patterns",
|
|
51156
51471
|
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"
|
|
@@ -51206,7 +51521,7 @@ var patternsCommand = defineCommand221({
|
|
|
51206
51521
|
});
|
|
51207
51522
|
|
|
51208
51523
|
// src/commands/winning-ads/search.ts
|
|
51209
|
-
import { defineCommand as
|
|
51524
|
+
import { defineCommand as defineCommand223 } from "citty";
|
|
51210
51525
|
registerSchema({
|
|
51211
51526
|
command: "winning-ads.search",
|
|
51212
51527
|
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.",
|
|
@@ -51314,7 +51629,7 @@ function buildSearchBody2(args) {
|
|
|
51314
51629
|
}
|
|
51315
51630
|
return body;
|
|
51316
51631
|
}
|
|
51317
|
-
var searchCommand5 =
|
|
51632
|
+
var searchCommand5 = defineCommand223({
|
|
51318
51633
|
meta: {
|
|
51319
51634
|
name: "search",
|
|
51320
51635
|
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"
|
|
@@ -51429,7 +51744,7 @@ var searchCommand5 = defineCommand222({
|
|
|
51429
51744
|
});
|
|
51430
51745
|
|
|
51431
51746
|
// src/commands/winning-ads/seeds.ts
|
|
51432
|
-
import { defineCommand as
|
|
51747
|
+
import { defineCommand as defineCommand224 } from "citty";
|
|
51433
51748
|
function leanRow(r) {
|
|
51434
51749
|
return {
|
|
51435
51750
|
key: r.key,
|
|
@@ -51457,7 +51772,7 @@ function makeSeedCommand(opts) {
|
|
|
51457
51772
|
limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
|
|
51458
51773
|
}
|
|
51459
51774
|
});
|
|
51460
|
-
return
|
|
51775
|
+
return defineCommand224({
|
|
51461
51776
|
meta: { name: opts.name, description: opts.description },
|
|
51462
51777
|
args: {
|
|
51463
51778
|
platform: { type: "string", description: "Single platform to segment on", required: false },
|
|
@@ -51506,7 +51821,7 @@ var formatsCommand = makeSeedCommand({
|
|
|
51506
51821
|
});
|
|
51507
51822
|
|
|
51508
51823
|
// src/commands/winning-ads/unfollow.ts
|
|
51509
|
-
import { defineCommand as
|
|
51824
|
+
import { defineCommand as defineCommand225 } from "citty";
|
|
51510
51825
|
registerSchema({
|
|
51511
51826
|
command: "winning-ads.unfollow",
|
|
51512
51827
|
description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
|
|
@@ -51514,7 +51829,7 @@ registerSchema({
|
|
|
51514
51829
|
advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
|
|
51515
51830
|
}
|
|
51516
51831
|
});
|
|
51517
|
-
var unfollowCommand =
|
|
51832
|
+
var unfollowCommand = defineCommand225({
|
|
51518
51833
|
meta: {
|
|
51519
51834
|
name: "unfollow",
|
|
51520
51835
|
description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
|
|
@@ -51535,7 +51850,7 @@ var unfollowCommand = defineCommand224({
|
|
|
51535
51850
|
});
|
|
51536
51851
|
|
|
51537
51852
|
// src/commands/winning-ads/winners.ts
|
|
51538
|
-
import { defineCommand as
|
|
51853
|
+
import { defineCommand as defineCommand226 } from "citty";
|
|
51539
51854
|
registerSchema({
|
|
51540
51855
|
command: "winning-ads.winners",
|
|
51541
51856
|
description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
|
|
@@ -51545,7 +51860,7 @@ registerSchema({
|
|
|
51545
51860
|
platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
|
|
51546
51861
|
}
|
|
51547
51862
|
});
|
|
51548
|
-
var winnersCommand =
|
|
51863
|
+
var winnersCommand = defineCommand226({
|
|
51549
51864
|
meta: {
|
|
51550
51865
|
name: "winners",
|
|
51551
51866
|
description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
|
|
@@ -51595,7 +51910,7 @@ var winnersCommand = defineCommand225({
|
|
|
51595
51910
|
});
|
|
51596
51911
|
|
|
51597
51912
|
// src/commands/winning-ads/index.ts
|
|
51598
|
-
var winningAdsCommand =
|
|
51913
|
+
var winningAdsCommand = defineCommand227({
|
|
51599
51914
|
meta: {
|
|
51600
51915
|
name: "winning-ads",
|
|
51601
51916
|
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.
|
|
@@ -51833,7 +52148,7 @@ function getCliVersion() {
|
|
|
51833
52148
|
}
|
|
51834
52149
|
|
|
51835
52150
|
// src/cli.ts
|
|
51836
|
-
var main =
|
|
52151
|
+
var main = defineCommand228({
|
|
51837
52152
|
meta: {
|
|
51838
52153
|
name: "baker",
|
|
51839
52154
|
version: getCliVersion(),
|
|
@@ -51852,6 +52167,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
|
|
|
51852
52167
|
ads: adsCommand2,
|
|
51853
52168
|
brand: brandCommand,
|
|
51854
52169
|
analytics: analyticsCommand2,
|
|
52170
|
+
experiment: experimentCommand,
|
|
51855
52171
|
ga4: ga4Command,
|
|
51856
52172
|
gsc: gscCommand,
|
|
51857
52173
|
research: researchCommand,
|