@koda-sl/baker-cli 0.237.0-dev.b9732c021 → 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/cli.js +639 -341
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -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"]);
|
|
@@ -12559,9 +12586,7 @@ var analyticsDimensionRowSchema = z24.object({
|
|
|
12559
12586
|
var analyticsFunnelStepSchema = z24.object({
|
|
12560
12587
|
stepId: z24.string(),
|
|
12561
12588
|
stepIndex: z24.number().int().nonnegative(),
|
|
12562
|
-
/** Visits that moved forward into this step. Never events — see `visits`. */
|
|
12563
12589
|
views: z24.number().int().nonnegative(),
|
|
12564
|
-
/** Visits that finished this step and moved on. */
|
|
12565
12590
|
completions: z24.number().int().nonnegative(),
|
|
12566
12591
|
/** Share of viewers who did not complete this step, 0–1. */
|
|
12567
12592
|
dropRate: z24.number().min(0).max(1).nullable(),
|
|
@@ -12577,25 +12602,9 @@ var analyticsFunnelStepSchema = z24.object({
|
|
|
12577
12602
|
});
|
|
12578
12603
|
var analyticsFunnelSchema = z24.object({
|
|
12579
12604
|
flowSlug: z24.string(),
|
|
12580
|
-
/**
|
|
12581
|
-
* Visits that saw the Form at all — the denominator for every share here.
|
|
12582
|
-
*
|
|
12583
|
-
* Read this, not `starts`, whenever the question is "out of how many". A
|
|
12584
|
-
* start is recorded at the visitor's FIRST INTERACTION, so the two differ by
|
|
12585
|
-
* exactly the people who looked at the Form and never touched it — usually
|
|
12586
|
-
* most of them, and always the group a drop-off chart exists to find.
|
|
12587
|
-
*
|
|
12588
|
-
* Every count in this object is distinct visits, including each step's
|
|
12589
|
-
* `views` and `completions`. That is load-bearing rather than incidental:
|
|
12590
|
-
* the screen divides these by each other, and while the steps counted events
|
|
12591
|
-
* a Form four people had opened reported one step reached fifteen times and
|
|
12592
|
-
* fourteen people lost.
|
|
12593
|
-
*/
|
|
12594
|
-
visits: z24.number().int().nonnegative(),
|
|
12595
|
-
/** Visits that interacted with the Form at all — typed, picked, or advanced. */
|
|
12596
12605
|
starts: z24.number().int().nonnegative(),
|
|
12597
12606
|
submits: z24.number().int().nonnegative(),
|
|
12598
|
-
/**
|
|
12607
|
+
/** Submits per start, 0–1. */
|
|
12599
12608
|
completionRate: z24.number().min(0).max(1).nullable(),
|
|
12600
12609
|
/** The step losing the most people. The single most useful field here. */
|
|
12601
12610
|
worstStep: analyticsFunnelStepSchema.nullable(),
|
|
@@ -23705,7 +23714,7 @@ var funnelCommand = presetCommand({
|
|
|
23705
23714
|
var flowCommand = presetCommand({
|
|
23706
23715
|
name: "flow",
|
|
23707
23716
|
preset: "flow",
|
|
23708
|
-
description: "One Form in depth: how many people it converted, where they went between steps, the per-step table, and every trigger it raised.
|
|
23717
|
+
description: "One Form in depth: how many people it converted, where they went between steps, the per-step table, and every trigger it raised. Read `flowSummary.convertedSessions`, not `submits` \u2014 a Form that books a call on a scheduling node in the MIDDLE of the flow never emits a submit, so it reports zero submits and every one of its real bookings as conversions. `flowPaths` is the flow as edges between steps, bracketed by __flow_start__, __flow_converted__ and __flow_exit__, which is how a branching Form is read at all: a per-step table cannot say that of the people who left step two, forty went to the booking branch and ninety went nowhere.",
|
|
23709
23718
|
extraArgs: { flow: { type: "string", description: "Form slug (default: every Form)", required: false } },
|
|
23710
23719
|
resolve: (args) => ({ preset: "flow", flowSlug: args.flow ? String(args.flow) : void 0 })
|
|
23711
23720
|
});
|
|
@@ -32637,7 +32646,7 @@ registerSchema({
|
|
|
32637
32646
|
}
|
|
32638
32647
|
}
|
|
32639
32648
|
});
|
|
32640
|
-
function capabilityHints(surfaces) {
|
|
32649
|
+
function capabilityHints(surfaces, tools = []) {
|
|
32641
32650
|
const hints = [];
|
|
32642
32651
|
const immediate = surfaces.filter((surface) => surface.writeMode === "applies-at-publish");
|
|
32643
32652
|
if (immediate.length > 0) {
|
|
@@ -32660,6 +32669,18 @@ function capabilityHints(surfaces) {
|
|
|
32660
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."
|
|
32661
32670
|
);
|
|
32662
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
|
+
}
|
|
32663
32684
|
return hints;
|
|
32664
32685
|
}
|
|
32665
32686
|
var runCapabilities = defineCommand108({
|
|
@@ -32669,6 +32690,8 @@ var runCapabilities = defineCommand108({
|
|
|
32669
32690
|
|
|
32670
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.
|
|
32671
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
|
+
|
|
32672
32695
|
Examples:
|
|
32673
32696
|
baker capabilities
|
|
32674
32697
|
baker capabilities google-ads
|
|
@@ -32704,7 +32727,7 @@ Full guide: __tooling__/docs/tools/baker/capabilities.md`
|
|
|
32704
32727
|
body.full = true;
|
|
32705
32728
|
}
|
|
32706
32729
|
const response = await apiPost("/api/capabilities", body);
|
|
32707
|
-
const hints = capabilityHints(response.data.surfaces);
|
|
32730
|
+
const hints = capabilityHints(response.data.surfaces, response.data.tools);
|
|
32708
32731
|
writeJson({
|
|
32709
32732
|
...response,
|
|
32710
32733
|
meta: { count: response.data.surfaces.length },
|
|
@@ -33174,12 +33197,286 @@ Full guide: __tooling__/docs/tools/baker/creatives.md`
|
|
|
33174
33197
|
}
|
|
33175
33198
|
});
|
|
33176
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
|
+
|
|
33177
33474
|
// src/commands/flows/index.ts
|
|
33178
|
-
import { defineCommand as
|
|
33475
|
+
import { defineCommand as defineCommand117 } from "citty";
|
|
33179
33476
|
|
|
33180
33477
|
// src/commands/flows/add.ts
|
|
33181
33478
|
import { randomUUID } from "crypto";
|
|
33182
|
-
import { defineCommand as
|
|
33479
|
+
import { defineCommand as defineCommand113 } from "citty";
|
|
33183
33480
|
|
|
33184
33481
|
// src/commands/flows/shared.ts
|
|
33185
33482
|
import { existsSync as existsSync5, readdirSync as readdirSync2, readFileSync as readFileSync9, writeFileSync as writeFileSync3 } from "fs";
|
|
@@ -33389,7 +33686,7 @@ registerSchema({
|
|
|
33389
33686
|
parent: { type: "string", description: "Parent node id. Omit to append to the root's children.", required: false }
|
|
33390
33687
|
}
|
|
33391
33688
|
});
|
|
33392
|
-
var addNodeCommand =
|
|
33689
|
+
var addNodeCommand = defineCommand113({
|
|
33393
33690
|
meta: {
|
|
33394
33691
|
name: "add-node",
|
|
33395
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"'
|
|
@@ -33485,7 +33782,7 @@ registerSchema({
|
|
|
33485
33782
|
}
|
|
33486
33783
|
}
|
|
33487
33784
|
});
|
|
33488
|
-
var addSideEffectCommand =
|
|
33785
|
+
var addSideEffectCommand = defineCommand113({
|
|
33489
33786
|
meta: {
|
|
33490
33787
|
name: "add-side-effect",
|
|
33491
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"
|
|
@@ -33567,7 +33864,7 @@ var addSideEffectCommand = defineCommand112({
|
|
|
33567
33864
|
|
|
33568
33865
|
// src/commands/flows/map.ts
|
|
33569
33866
|
import { readFileSync as readFileSync11 } from "fs";
|
|
33570
|
-
import { defineCommand as
|
|
33867
|
+
import { defineCommand as defineCommand114 } from "citty";
|
|
33571
33868
|
|
|
33572
33869
|
// src/commands/flows/value-expression.ts
|
|
33573
33870
|
import { existsSync as existsSync6, readFileSync as readFileSync10 } from "fs";
|
|
@@ -34340,7 +34637,7 @@ async function mapOptions(args, fromFile, into) {
|
|
|
34340
34637
|
destinationFields: hubspotForm ? await hubspotFieldCatalog(hubspotForm) : void 0
|
|
34341
34638
|
};
|
|
34342
34639
|
}
|
|
34343
|
-
var mapCommand2 =
|
|
34640
|
+
var mapCommand2 = defineCommand114({
|
|
34344
34641
|
meta: {
|
|
34345
34642
|
name: "map",
|
|
34346
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"
|
|
@@ -34438,7 +34735,7 @@ var mapCommand2 = defineCommand113({
|
|
|
34438
34735
|
});
|
|
34439
34736
|
|
|
34440
34737
|
// src/commands/flows/normalize.ts
|
|
34441
|
-
import { defineCommand as
|
|
34738
|
+
import { defineCommand as defineCommand115 } from "citty";
|
|
34442
34739
|
var OPTIONAL_STRINGS = ["oauthProviderId"];
|
|
34443
34740
|
var ARRAY_FIELDS = [
|
|
34444
34741
|
"fieldMapping",
|
|
@@ -34507,7 +34804,7 @@ registerSchema({
|
|
|
34507
34804
|
}
|
|
34508
34805
|
}
|
|
34509
34806
|
});
|
|
34510
|
-
var normalizeCommand =
|
|
34807
|
+
var normalizeCommand = defineCommand115({
|
|
34511
34808
|
meta: {
|
|
34512
34809
|
name: "normalize",
|
|
34513
34810
|
description: "Repair the shapes a form file is allowed to get slightly wrong. Example: baker flows normalize contact --write"
|
|
@@ -34538,7 +34835,7 @@ var normalizeCommand = defineCommand114({
|
|
|
34538
34835
|
});
|
|
34539
34836
|
|
|
34540
34837
|
// src/commands/flows/schema.ts
|
|
34541
|
-
import { defineCommand as
|
|
34838
|
+
import { defineCommand as defineCommand116 } from "citty";
|
|
34542
34839
|
registerSchema({
|
|
34543
34840
|
command: "flows.schema",
|
|
34544
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.",
|
|
@@ -34563,7 +34860,7 @@ function triggerHints(triggers) {
|
|
|
34563
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(", ")}.` : "")
|
|
34564
34861
|
];
|
|
34565
34862
|
}
|
|
34566
|
-
var schemaCommand =
|
|
34863
|
+
var schemaCommand = defineCommand116({
|
|
34567
34864
|
meta: {
|
|
34568
34865
|
name: "schema",
|
|
34569
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)"
|
|
@@ -34697,7 +34994,7 @@ function displayName(slug) {
|
|
|
34697
34994
|
const name = tree.displayName;
|
|
34698
34995
|
return typeof name === "string" && name.trim() ? name.trim() : slug;
|
|
34699
34996
|
}
|
|
34700
|
-
var listCommand12 =
|
|
34997
|
+
var listCommand12 = defineCommand117({
|
|
34701
34998
|
meta: {
|
|
34702
34999
|
name: "list",
|
|
34703
35000
|
description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
|
|
@@ -34718,7 +35015,7 @@ var listCommand12 = defineCommand116({
|
|
|
34718
35015
|
});
|
|
34719
35016
|
}
|
|
34720
35017
|
});
|
|
34721
|
-
var showCommand3 =
|
|
35018
|
+
var showCommand3 = defineCommand117({
|
|
34722
35019
|
meta: {
|
|
34723
35020
|
name: "show",
|
|
34724
35021
|
description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
|
|
@@ -34746,7 +35043,7 @@ var showCommand3 = defineCommand116({
|
|
|
34746
35043
|
});
|
|
34747
35044
|
}
|
|
34748
35045
|
});
|
|
34749
|
-
var flowsCommand =
|
|
35046
|
+
var flowsCommand = defineCommand117({
|
|
34750
35047
|
meta: {
|
|
34751
35048
|
name: "flows",
|
|
34752
35049
|
description: `Read and shape this workspace's Forms (flows).
|
|
@@ -34780,10 +35077,10 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
|
|
|
34780
35077
|
});
|
|
34781
35078
|
|
|
34782
35079
|
// src/commands/ga4/index.ts
|
|
34783
|
-
import { defineCommand as
|
|
35080
|
+
import { defineCommand as defineCommand124 } from "citty";
|
|
34784
35081
|
|
|
34785
35082
|
// src/commands/ga4/audit.ts
|
|
34786
|
-
import { defineCommand as
|
|
35083
|
+
import { defineCommand as defineCommand118 } from "citty";
|
|
34787
35084
|
|
|
34788
35085
|
// src/commands/ga4/resolve.ts
|
|
34789
35086
|
async function fetchProperties(useCache = true) {
|
|
@@ -34849,7 +35146,7 @@ registerSchema({
|
|
|
34849
35146
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
34850
35147
|
}
|
|
34851
35148
|
});
|
|
34852
|
-
var auditCommand2 =
|
|
35149
|
+
var auditCommand2 = defineCommand118({
|
|
34853
35150
|
meta: {
|
|
34854
35151
|
name: "audit",
|
|
34855
35152
|
description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
|
|
@@ -34904,7 +35201,7 @@ Examples:
|
|
|
34904
35201
|
});
|
|
34905
35202
|
|
|
34906
35203
|
// src/commands/ga4/config.ts
|
|
34907
|
-
import { defineCommand as
|
|
35204
|
+
import { defineCommand as defineCommand119 } from "citty";
|
|
34908
35205
|
|
|
34909
35206
|
// src/commands/ga4/shared.ts
|
|
34910
35207
|
import { readFileSync as readFileSync12 } from "fs";
|
|
@@ -35100,7 +35397,7 @@ function configHints(config) {
|
|
|
35100
35397
|
}
|
|
35101
35398
|
return hints;
|
|
35102
35399
|
}
|
|
35103
|
-
var configCommand =
|
|
35400
|
+
var configCommand = defineCommand119({
|
|
35104
35401
|
meta: {
|
|
35105
35402
|
name: "config",
|
|
35106
35403
|
description: `Read how the property is configured to measure \u2014 key events, custom definitions, custom events, retention
|
|
@@ -35132,7 +35429,7 @@ Examples:
|
|
|
35132
35429
|
});
|
|
35133
35430
|
|
|
35134
35431
|
// src/commands/ga4/draft.ts
|
|
35135
|
-
import { defineCommand as
|
|
35432
|
+
import { defineCommand as defineCommand120 } from "citty";
|
|
35136
35433
|
registerSchema({
|
|
35137
35434
|
command: "ga4.draft",
|
|
35138
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.",
|
|
@@ -35141,13 +35438,13 @@ registerSchema({
|
|
|
35141
35438
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
35142
35439
|
}
|
|
35143
35440
|
});
|
|
35144
|
-
var draftCommand3 =
|
|
35441
|
+
var draftCommand3 = defineCommand120({
|
|
35145
35442
|
meta: {
|
|
35146
35443
|
name: "draft",
|
|
35147
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."
|
|
35148
35445
|
},
|
|
35149
35446
|
subCommands: {
|
|
35150
|
-
list:
|
|
35447
|
+
list: defineCommand120({
|
|
35151
35448
|
meta: { name: "list", description: "Review everything staged on this chat (--json for the raw envelope)" },
|
|
35152
35449
|
args: {
|
|
35153
35450
|
json: { type: "boolean", description: "Print the raw JSON envelope", required: false },
|
|
@@ -35157,7 +35454,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35157
35454
|
await draftList(args.json === true, args.chat);
|
|
35158
35455
|
}
|
|
35159
35456
|
}),
|
|
35160
|
-
show:
|
|
35457
|
+
show: defineCommand120({
|
|
35161
35458
|
meta: {
|
|
35162
35459
|
name: "show",
|
|
35163
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)."
|
|
@@ -35174,7 +35471,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35174
35471
|
);
|
|
35175
35472
|
}
|
|
35176
35473
|
}),
|
|
35177
|
-
amend:
|
|
35474
|
+
amend: defineCommand120({
|
|
35178
35475
|
meta: {
|
|
35179
35476
|
name: "amend",
|
|
35180
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."
|
|
@@ -35191,7 +35488,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35191
35488
|
});
|
|
35192
35489
|
}
|
|
35193
35490
|
}),
|
|
35194
|
-
remove:
|
|
35491
|
+
remove: defineCommand120({
|
|
35195
35492
|
meta: { name: "remove", description: "Remove one staged change" },
|
|
35196
35493
|
args: { ref: { type: "positional", description: "Staged ref or target id", required: false } },
|
|
35197
35494
|
run: async ({ args }) => {
|
|
@@ -35200,7 +35497,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35200
35497
|
});
|
|
35201
35498
|
}
|
|
35202
35499
|
}),
|
|
35203
|
-
clear:
|
|
35500
|
+
clear: defineCommand120({
|
|
35204
35501
|
meta: { name: "clear", description: "Discard all Google Analytics changes staged on this chat" },
|
|
35205
35502
|
run: async () => {
|
|
35206
35503
|
await draftAction2("/api/ga4/draft/clear", {});
|
|
@@ -35210,7 +35507,7 @@ var draftCommand3 = defineCommand119({
|
|
|
35210
35507
|
});
|
|
35211
35508
|
|
|
35212
35509
|
// src/commands/ga4/properties.ts
|
|
35213
|
-
import { defineCommand as
|
|
35510
|
+
import { defineCommand as defineCommand121 } from "citty";
|
|
35214
35511
|
registerSchema({
|
|
35215
35512
|
command: "ga4.properties",
|
|
35216
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.",
|
|
@@ -35226,7 +35523,7 @@ function propertyHints(properties) {
|
|
|
35226
35523
|
resources: properties.map((property) => ({ id: property.externalId, label: property.name }))
|
|
35227
35524
|
});
|
|
35228
35525
|
}
|
|
35229
|
-
var propertiesCommand =
|
|
35526
|
+
var propertiesCommand = defineCommand121({
|
|
35230
35527
|
meta: {
|
|
35231
35528
|
name: "properties",
|
|
35232
35529
|
description: `List accessible GA4 properties.
|
|
@@ -35276,7 +35573,7 @@ Examples:
|
|
|
35276
35573
|
// src/commands/ga4/query.ts
|
|
35277
35574
|
import { appendFileSync as appendFileSync2, existsSync as existsSync7, readFileSync as readFileSync13, writeFileSync as writeFileSync4 } from "fs";
|
|
35278
35575
|
import { resolve as resolve2 } from "path";
|
|
35279
|
-
import { defineCommand as
|
|
35576
|
+
import { defineCommand as defineCommand122 } from "citty";
|
|
35280
35577
|
|
|
35281
35578
|
// src/commands/ga4/presets.ts
|
|
35282
35579
|
var GA4_PRESETS = [
|
|
@@ -35411,7 +35708,7 @@ function handleError3(err) {
|
|
|
35411
35708
|
});
|
|
35412
35709
|
process.exit(1);
|
|
35413
35710
|
}
|
|
35414
|
-
var queryCommand2 =
|
|
35711
|
+
var queryCommand2 = defineCommand122({
|
|
35415
35712
|
meta: {
|
|
35416
35713
|
name: "query",
|
|
35417
35714
|
description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
|
|
@@ -35482,7 +35779,7 @@ Free-form (escape hatch):
|
|
|
35482
35779
|
});
|
|
35483
35780
|
|
|
35484
35781
|
// src/commands/ga4/write-commands.ts
|
|
35485
|
-
import { defineCommand as
|
|
35782
|
+
import { defineCommand as defineCommand123 } from "citty";
|
|
35486
35783
|
var PROPERTY_ARG_DESCRIPTION = "GA4 property id (optional only when one property is connected \u2014 run `baker ga4 properties`)";
|
|
35487
35784
|
var propertyArg = { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false };
|
|
35488
35785
|
function createJsonDescription(noun) {
|
|
@@ -35500,7 +35797,7 @@ registerSchema({
|
|
|
35500
35797
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
35501
35798
|
}
|
|
35502
35799
|
});
|
|
35503
|
-
var keyEventCommand =
|
|
35800
|
+
var keyEventCommand = defineCommand123({
|
|
35504
35801
|
meta: {
|
|
35505
35802
|
name: "key-event",
|
|
35506
35803
|
description: `Stage key-event (conversion) changes
|
|
@@ -35513,7 +35810,7 @@ Examples:
|
|
|
35513
35810
|
baker ga4 key-event delete 4185`
|
|
35514
35811
|
},
|
|
35515
35812
|
subCommands: {
|
|
35516
|
-
create:
|
|
35813
|
+
create: defineCommand123({
|
|
35517
35814
|
meta: {
|
|
35518
35815
|
name: "create",
|
|
35519
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."
|
|
@@ -35534,7 +35831,7 @@ Examples:
|
|
|
35534
35831
|
);
|
|
35535
35832
|
}
|
|
35536
35833
|
}),
|
|
35537
|
-
update:
|
|
35834
|
+
update: defineCommand123({
|
|
35538
35835
|
meta: {
|
|
35539
35836
|
name: "update",
|
|
35540
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."
|
|
@@ -35554,7 +35851,7 @@ Examples:
|
|
|
35554
35851
|
});
|
|
35555
35852
|
}
|
|
35556
35853
|
}),
|
|
35557
|
-
delete:
|
|
35854
|
+
delete: defineCommand123({
|
|
35558
35855
|
meta: {
|
|
35559
35856
|
name: "delete",
|
|
35560
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."
|
|
@@ -35602,7 +35899,7 @@ for (const { kind, noun, createHint } of DEFINITIONS) {
|
|
|
35602
35899
|
}
|
|
35603
35900
|
function definitionCommand(definition) {
|
|
35604
35901
|
const { command, kind, noun, example } = definition;
|
|
35605
|
-
return
|
|
35902
|
+
return defineCommand123({
|
|
35606
35903
|
meta: {
|
|
35607
35904
|
name: command,
|
|
35608
35905
|
description: `Stage ${noun} changes
|
|
@@ -35614,7 +35911,7 @@ Examples:
|
|
|
35614
35911
|
baker ga4 ${command} archive 12`
|
|
35615
35912
|
},
|
|
35616
35913
|
subCommands: {
|
|
35617
|
-
create:
|
|
35914
|
+
create: defineCommand123({
|
|
35618
35915
|
meta: { name: "create", description: `Stage a new ${noun} (or a JSON array of them, staged together)` },
|
|
35619
35916
|
args: {
|
|
35620
35917
|
json: { type: "string", description: createJsonDescription(noun), required: false },
|
|
@@ -35632,7 +35929,7 @@ Examples:
|
|
|
35632
35929
|
);
|
|
35633
35930
|
}
|
|
35634
35931
|
}),
|
|
35635
|
-
update:
|
|
35932
|
+
update: defineCommand123({
|
|
35636
35933
|
meta: {
|
|
35637
35934
|
name: "update",
|
|
35638
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.`
|
|
@@ -35652,7 +35949,7 @@ Examples:
|
|
|
35652
35949
|
});
|
|
35653
35950
|
}
|
|
35654
35951
|
}),
|
|
35655
|
-
archive:
|
|
35952
|
+
archive: defineCommand123({
|
|
35656
35953
|
meta: {
|
|
35657
35954
|
name: "archive",
|
|
35658
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.`
|
|
@@ -35697,7 +35994,7 @@ var dataStreamArg = {
|
|
|
35697
35994
|
function withStream(args) {
|
|
35698
35995
|
return typeof args["data-stream"] === "string" ? { dataStream: args["data-stream"] } : {};
|
|
35699
35996
|
}
|
|
35700
|
-
var customEventCommand =
|
|
35997
|
+
var customEventCommand = defineCommand123({
|
|
35701
35998
|
meta: {
|
|
35702
35999
|
name: "custom-event",
|
|
35703
36000
|
description: `Stage custom events \u2014 new events built from events the site already sends
|
|
@@ -35708,7 +36005,7 @@ Examples:
|
|
|
35708
36005
|
baker ga4 custom-event delete 7`
|
|
35709
36006
|
},
|
|
35710
36007
|
subCommands: {
|
|
35711
|
-
create:
|
|
36008
|
+
create: defineCommand123({
|
|
35712
36009
|
meta: {
|
|
35713
36010
|
name: "create",
|
|
35714
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."
|
|
@@ -35731,7 +36028,7 @@ Examples:
|
|
|
35731
36028
|
);
|
|
35732
36029
|
}
|
|
35733
36030
|
}),
|
|
35734
|
-
update:
|
|
36031
|
+
update: defineCommand123({
|
|
35735
36032
|
meta: { name: "update", description: "Stage a change to an existing custom event (pass its id)" },
|
|
35736
36033
|
args: {
|
|
35737
36034
|
id: { type: "positional", description: "Custom event rule id", required: false },
|
|
@@ -35750,7 +36047,7 @@ Examples:
|
|
|
35750
36047
|
});
|
|
35751
36048
|
}
|
|
35752
36049
|
}),
|
|
35753
|
-
delete:
|
|
36050
|
+
delete: defineCommand123({
|
|
35754
36051
|
meta: {
|
|
35755
36052
|
name: "delete",
|
|
35756
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."
|
|
@@ -35805,7 +36102,7 @@ function booleanArg(input, flag) {
|
|
|
35805
36102
|
if (input === "false") return false;
|
|
35806
36103
|
return failValidation3(`--${flag} must be true or false`);
|
|
35807
36104
|
}
|
|
35808
|
-
var dataRetentionCommand =
|
|
36105
|
+
var dataRetentionCommand = defineCommand123({
|
|
35809
36106
|
meta: {
|
|
35810
36107
|
name: "data-retention",
|
|
35811
36108
|
description: `Stage a change to how long Google Analytics keeps data
|
|
@@ -35815,7 +36112,7 @@ Examples:
|
|
|
35815
36112
|
baker ga4 data-retention set --event-data 14 --user-data 14 --reset-on-activity true`
|
|
35816
36113
|
},
|
|
35817
36114
|
subCommands: {
|
|
35818
|
-
set:
|
|
36115
|
+
set: defineCommand123({
|
|
35819
36116
|
meta: { name: "set", description: "Stage the retention window (months)" },
|
|
35820
36117
|
args: {
|
|
35821
36118
|
"event-data": { type: "string", description: "2, 14, 26, 38 or 50", required: false },
|
|
@@ -35851,7 +36148,7 @@ registerSchema({
|
|
|
35851
36148
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
35852
36149
|
}
|
|
35853
36150
|
});
|
|
35854
|
-
var audienceCommand =
|
|
36151
|
+
var audienceCommand = defineCommand123({
|
|
35855
36152
|
meta: {
|
|
35856
36153
|
name: "audience",
|
|
35857
36154
|
description: `Stage audience changes (saved groups of users, for retargeting and analysis)
|
|
@@ -35883,7 +36180,7 @@ Examples:
|
|
|
35883
36180
|
baker ga4 audience archive 8813`
|
|
35884
36181
|
},
|
|
35885
36182
|
subCommands: {
|
|
35886
|
-
create:
|
|
36183
|
+
create: defineCommand123({
|
|
35887
36184
|
meta: { name: "create", description: createJsonDescription("audience") },
|
|
35888
36185
|
args: {
|
|
35889
36186
|
json: { type: "string", description: createJsonDescription("audience"), required: false },
|
|
@@ -35901,7 +36198,7 @@ Examples:
|
|
|
35901
36198
|
);
|
|
35902
36199
|
}
|
|
35903
36200
|
}),
|
|
35904
|
-
update:
|
|
36201
|
+
update: defineCommand123({
|
|
35905
36202
|
meta: {
|
|
35906
36203
|
name: "update",
|
|
35907
36204
|
description: "Stage a new name or description (pass the audience id). Who is in it cannot be changed."
|
|
@@ -35922,7 +36219,7 @@ Examples:
|
|
|
35922
36219
|
});
|
|
35923
36220
|
}
|
|
35924
36221
|
}),
|
|
35925
|
-
archive:
|
|
36222
|
+
archive: defineCommand123({
|
|
35926
36223
|
meta: {
|
|
35927
36224
|
name: "archive",
|
|
35928
36225
|
description: "Stage retiring an audience. Cannot be undone \u2014 the users it gathered do not come back."
|
|
@@ -35951,7 +36248,7 @@ registerSchema({
|
|
|
35951
36248
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
35952
36249
|
}
|
|
35953
36250
|
});
|
|
35954
|
-
var propertyCommand =
|
|
36251
|
+
var propertyCommand = defineCommand123({
|
|
35955
36252
|
meta: {
|
|
35956
36253
|
name: "property",
|
|
35957
36254
|
description: `Stage a change to the property's own settings
|
|
@@ -35961,7 +36258,7 @@ Examples:
|
|
|
35961
36258
|
baker ga4 property set --name "Acme \u2014 Web" --industry REAL_ESTATE`
|
|
35962
36259
|
},
|
|
35963
36260
|
subCommands: {
|
|
35964
|
-
set:
|
|
36261
|
+
set: defineCommand123({
|
|
35965
36262
|
meta: { name: "set", description: "Stage the property name and/or industry category" },
|
|
35966
36263
|
args: {
|
|
35967
36264
|
name: { type: "string", description: "New property display name", required: false },
|
|
@@ -36001,7 +36298,7 @@ registerSchema({
|
|
|
36001
36298
|
"property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
|
|
36002
36299
|
}
|
|
36003
36300
|
});
|
|
36004
|
-
var adsLinkCommand =
|
|
36301
|
+
var adsLinkCommand = defineCommand123({
|
|
36005
36302
|
meta: {
|
|
36006
36303
|
name: "ads-link",
|
|
36007
36304
|
description: `Stage linking this property to a Google Ads account
|
|
@@ -36016,7 +36313,7 @@ Examples:
|
|
|
36016
36313
|
baker ga4 ads-link delete L1234`
|
|
36017
36314
|
},
|
|
36018
36315
|
subCommands: {
|
|
36019
|
-
create:
|
|
36316
|
+
create: defineCommand123({
|
|
36020
36317
|
meta: { name: "create", description: "Stage linking the property to a Google Ads account" },
|
|
36021
36318
|
args: {
|
|
36022
36319
|
"customer-id": { type: "string", description: "Google Ads customer id (123-456-7890)", required: false },
|
|
@@ -36035,7 +36332,7 @@ Examples:
|
|
|
36035
36332
|
await stageOp3({ kind: "ga4.googleAdsLink.create", payload, ...withProperty(args) });
|
|
36036
36333
|
}
|
|
36037
36334
|
}),
|
|
36038
|
-
update:
|
|
36335
|
+
update: defineCommand123({
|
|
36039
36336
|
meta: {
|
|
36040
36337
|
name: "update",
|
|
36041
36338
|
description: "Stage the ads-personalisation setting on an existing link (pass its id)"
|
|
@@ -36057,7 +36354,7 @@ Examples:
|
|
|
36057
36354
|
});
|
|
36058
36355
|
}
|
|
36059
36356
|
}),
|
|
36060
|
-
delete:
|
|
36357
|
+
delete: defineCommand123({
|
|
36061
36358
|
meta: {
|
|
36062
36359
|
name: "delete",
|
|
36063
36360
|
description: "Stage unlinking. Stops conversion imports and strands every audience on this property."
|
|
@@ -36108,7 +36405,7 @@ var MEASUREMENT_FLAGS = {
|
|
|
36108
36405
|
"page-changes": "pageChangesEnabled",
|
|
36109
36406
|
"form-interactions": "formInteractionsEnabled"
|
|
36110
36407
|
};
|
|
36111
|
-
var enhancedMeasurementCommand =
|
|
36408
|
+
var enhancedMeasurementCommand = defineCommand123({
|
|
36112
36409
|
meta: {
|
|
36113
36410
|
name: "enhanced-measurement",
|
|
36114
36411
|
description: `Stage the automatic events GA4 collects on a website stream
|
|
@@ -36122,7 +36419,7 @@ Examples:
|
|
|
36122
36419
|
baker ga4 enhanced-measurement set --video false`
|
|
36123
36420
|
},
|
|
36124
36421
|
subCommands: {
|
|
36125
|
-
set:
|
|
36422
|
+
set: defineCommand123({
|
|
36126
36423
|
meta: { name: "set", description: "Stage which automatic events the website stream collects" },
|
|
36127
36424
|
args: {
|
|
36128
36425
|
scrolls: { type: "string", description: "true|false", required: false },
|
|
@@ -36165,7 +36462,7 @@ Examples:
|
|
|
36165
36462
|
});
|
|
36166
36463
|
|
|
36167
36464
|
// src/commands/ga4/index.ts
|
|
36168
|
-
var ga4Command =
|
|
36465
|
+
var ga4Command = defineCommand124({
|
|
36169
36466
|
meta: {
|
|
36170
36467
|
name: "ga4",
|
|
36171
36468
|
description: `Google Analytics 4. Report on a property, audit its config, and change what it measures.
|
|
@@ -36214,12 +36511,12 @@ Full guide: __tooling__/docs/tools/baker/ga4.md`
|
|
|
36214
36511
|
});
|
|
36215
36512
|
|
|
36216
36513
|
// src/commands/gsc/index.ts
|
|
36217
|
-
import { defineCommand as
|
|
36514
|
+
import { defineCommand as defineCommand128 } from "citty";
|
|
36218
36515
|
|
|
36219
36516
|
// src/commands/gsc/query.ts
|
|
36220
36517
|
import { appendFileSync as appendFileSync3, existsSync as existsSync8, readFileSync as readFileSync14, writeFileSync as writeFileSync5 } from "fs";
|
|
36221
36518
|
import { resolve as resolve3 } from "path";
|
|
36222
|
-
import { defineCommand as
|
|
36519
|
+
import { defineCommand as defineCommand125 } from "citty";
|
|
36223
36520
|
|
|
36224
36521
|
// src/commands/gsc/presets.ts
|
|
36225
36522
|
var GSC_PRESETS = [
|
|
@@ -36413,7 +36710,7 @@ function handleError4(err) {
|
|
|
36413
36710
|
});
|
|
36414
36711
|
process.exit(1);
|
|
36415
36712
|
}
|
|
36416
|
-
var queryCommand3 =
|
|
36713
|
+
var queryCommand3 = defineCommand125({
|
|
36417
36714
|
meta: {
|
|
36418
36715
|
name: "query",
|
|
36419
36716
|
description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
|
|
@@ -36491,7 +36788,7 @@ Free-form (escape hatch):
|
|
|
36491
36788
|
});
|
|
36492
36789
|
|
|
36493
36790
|
// src/commands/gsc/sitemaps.ts
|
|
36494
|
-
import { defineCommand as
|
|
36791
|
+
import { defineCommand as defineCommand126 } from "citty";
|
|
36495
36792
|
registerSchema({
|
|
36496
36793
|
command: "gsc.sitemaps",
|
|
36497
36794
|
description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
|
|
@@ -36500,7 +36797,7 @@ registerSchema({
|
|
|
36500
36797
|
"no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
|
|
36501
36798
|
}
|
|
36502
36799
|
});
|
|
36503
|
-
var sitemapsCommand =
|
|
36800
|
+
var sitemapsCommand = defineCommand126({
|
|
36504
36801
|
meta: {
|
|
36505
36802
|
name: "sitemaps",
|
|
36506
36803
|
description: `List sitemaps for a site. Check health and errors.
|
|
@@ -36553,7 +36850,7 @@ Examples:
|
|
|
36553
36850
|
});
|
|
36554
36851
|
|
|
36555
36852
|
// src/commands/gsc/sites.ts
|
|
36556
|
-
import { defineCommand as
|
|
36853
|
+
import { defineCommand as defineCommand127 } from "citty";
|
|
36557
36854
|
registerSchema({
|
|
36558
36855
|
command: "gsc.sites",
|
|
36559
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.",
|
|
@@ -36569,7 +36866,7 @@ function siteHints(sites) {
|
|
|
36569
36866
|
resources: sites.map((site) => ({ id: site.siteUrl, label: site.permissionLevel }))
|
|
36570
36867
|
});
|
|
36571
36868
|
}
|
|
36572
|
-
var sitesCommand =
|
|
36869
|
+
var sitesCommand = defineCommand127({
|
|
36573
36870
|
meta: {
|
|
36574
36871
|
name: "sites",
|
|
36575
36872
|
description: `List verified Search Console sites.
|
|
@@ -36617,7 +36914,7 @@ Examples:
|
|
|
36617
36914
|
});
|
|
36618
36915
|
|
|
36619
36916
|
// src/commands/gsc/index.ts
|
|
36620
|
-
var gscCommand =
|
|
36917
|
+
var gscCommand = defineCommand128({
|
|
36621
36918
|
meta: {
|
|
36622
36919
|
name: "gsc",
|
|
36623
36920
|
description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
|
|
@@ -36641,7 +36938,7 @@ Full guide: __tooling__/docs/tools/baker/gsc.md`
|
|
|
36641
36938
|
});
|
|
36642
36939
|
|
|
36643
36940
|
// src/commands/history/index.ts
|
|
36644
|
-
import { defineCommand as
|
|
36941
|
+
import { defineCommand as defineCommand129 } from "citty";
|
|
36645
36942
|
registerSchema({
|
|
36646
36943
|
command: "history.list",
|
|
36647
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.",
|
|
@@ -36696,7 +36993,7 @@ function parseBoundedInt2(raw, name, min, max) {
|
|
|
36696
36993
|
}
|
|
36697
36994
|
return value;
|
|
36698
36995
|
}
|
|
36699
|
-
var listCommand13 =
|
|
36996
|
+
var listCommand13 = defineCommand129({
|
|
36700
36997
|
meta: {
|
|
36701
36998
|
name: "list",
|
|
36702
36999
|
description: "List recent account changes (unified audit log), newest first."
|
|
@@ -36742,7 +37039,7 @@ var listCommand13 = defineCommand128({
|
|
|
36742
37039
|
}
|
|
36743
37040
|
}
|
|
36744
37041
|
});
|
|
36745
|
-
var historyCommand =
|
|
37042
|
+
var historyCommand = defineCommand129({
|
|
36746
37043
|
meta: {
|
|
36747
37044
|
name: "history",
|
|
36748
37045
|
description: `Unified account history (audit log): what changed, who did it, and when.
|
|
@@ -36752,7 +37049,7 @@ Full guide: __tooling__/docs/tools/baker/history.md`
|
|
|
36752
37049
|
});
|
|
36753
37050
|
|
|
36754
37051
|
// src/commands/hubspot/index.ts
|
|
36755
|
-
import { defineCommand as
|
|
37052
|
+
import { defineCommand as defineCommand130 } from "citty";
|
|
36756
37053
|
var EMBED_TYPES = ["legacy", "v4", "unknown"];
|
|
36757
37054
|
function failNotConnected(err) {
|
|
36758
37055
|
if (err instanceof ApiError && err.code === "FORBIDDEN" && err.message.includes(HUBSPOT_MISSING_GRANT_MARKER)) {
|
|
@@ -36906,7 +37203,7 @@ registerSchema({
|
|
|
36906
37203
|
}
|
|
36907
37204
|
}
|
|
36908
37205
|
});
|
|
36909
|
-
var formsListCommand =
|
|
37206
|
+
var formsListCommand = defineCommand130({
|
|
36910
37207
|
meta: {
|
|
36911
37208
|
name: "list",
|
|
36912
37209
|
description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
|
|
@@ -36951,7 +37248,7 @@ var formsListCommand = defineCommand129({
|
|
|
36951
37248
|
}
|
|
36952
37249
|
}
|
|
36953
37250
|
});
|
|
36954
|
-
var formsViewCommand =
|
|
37251
|
+
var formsViewCommand = defineCommand130({
|
|
36955
37252
|
meta: {
|
|
36956
37253
|
name: "view",
|
|
36957
37254
|
description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
|
|
@@ -37003,7 +37300,7 @@ var formsViewCommand = defineCommand129({
|
|
|
37003
37300
|
}
|
|
37004
37301
|
}
|
|
37005
37302
|
});
|
|
37006
|
-
var meetingsListCommand =
|
|
37303
|
+
var meetingsListCommand = defineCommand130({
|
|
37007
37304
|
meta: {
|
|
37008
37305
|
name: "list",
|
|
37009
37306
|
description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
|
|
@@ -37045,7 +37342,7 @@ var meetingsListCommand = defineCommand129({
|
|
|
37045
37342
|
}
|
|
37046
37343
|
}
|
|
37047
37344
|
});
|
|
37048
|
-
var meetingsViewCommand =
|
|
37345
|
+
var meetingsViewCommand = defineCommand130({
|
|
37049
37346
|
meta: {
|
|
37050
37347
|
name: "view",
|
|
37051
37348
|
description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
|
|
@@ -37089,7 +37386,7 @@ var meetingsViewCommand = defineCommand129({
|
|
|
37089
37386
|
}
|
|
37090
37387
|
}
|
|
37091
37388
|
});
|
|
37092
|
-
var formsSubmissionsCommand =
|
|
37389
|
+
var formsSubmissionsCommand = defineCommand130({
|
|
37093
37390
|
meta: {
|
|
37094
37391
|
name: "submissions",
|
|
37095
37392
|
description: "How many leads a form received, and when. Example: baker hubspot forms submissions <formId> --days 30"
|
|
@@ -37138,7 +37435,7 @@ var formsSubmissionsCommand = defineCommand129({
|
|
|
37138
37435
|
}
|
|
37139
37436
|
}
|
|
37140
37437
|
});
|
|
37141
|
-
var workflowsListCommand =
|
|
37438
|
+
var workflowsListCommand = defineCommand130({
|
|
37142
37439
|
meta: {
|
|
37143
37440
|
name: "list",
|
|
37144
37441
|
description: "List HubSpot workflows. Example: baker hubspot workflows list --enabled-only"
|
|
@@ -37203,7 +37500,7 @@ function workflowViewHints(workflow) {
|
|
|
37203
37500
|
}
|
|
37204
37501
|
return hints;
|
|
37205
37502
|
}
|
|
37206
|
-
var workflowsViewCommand =
|
|
37503
|
+
var workflowsViewCommand = defineCommand130({
|
|
37207
37504
|
meta: {
|
|
37208
37505
|
name: "view",
|
|
37209
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"
|
|
@@ -37230,7 +37527,7 @@ var workflowsViewCommand = defineCommand129({
|
|
|
37230
37527
|
}
|
|
37231
37528
|
}
|
|
37232
37529
|
});
|
|
37233
|
-
var pipelinesListCommand =
|
|
37530
|
+
var pipelinesListCommand = defineCommand130({
|
|
37234
37531
|
meta: {
|
|
37235
37532
|
name: "list",
|
|
37236
37533
|
description: "List HubSpot deal pipelines and their stages. Example: baker hubspot pipelines list"
|
|
@@ -37247,7 +37544,7 @@ var pipelinesListCommand = defineCommand129({
|
|
|
37247
37544
|
}
|
|
37248
37545
|
}
|
|
37249
37546
|
});
|
|
37250
|
-
var contactsSummaryCommand =
|
|
37547
|
+
var contactsSummaryCommand = defineCommand130({
|
|
37251
37548
|
meta: {
|
|
37252
37549
|
name: "summary",
|
|
37253
37550
|
description: "Whether recent leads are being worked, as counts. Example: baker hubspot contacts summary --days 30"
|
|
@@ -37317,7 +37614,7 @@ function contactLookupHints(data) {
|
|
|
37317
37614
|
}
|
|
37318
37615
|
return hints;
|
|
37319
37616
|
}
|
|
37320
|
-
var contactsLookupCommand =
|
|
37617
|
+
var contactsLookupCommand = defineCommand130({
|
|
37321
37618
|
meta: {
|
|
37322
37619
|
name: "lookup",
|
|
37323
37620
|
description: "Find one contact by email and see whether it was worked. Example: baker hubspot contacts lookup a@b.com"
|
|
@@ -37341,27 +37638,27 @@ var contactsLookupCommand = defineCommand129({
|
|
|
37341
37638
|
}
|
|
37342
37639
|
}
|
|
37343
37640
|
});
|
|
37344
|
-
var contactsCommand =
|
|
37641
|
+
var contactsCommand = defineCommand130({
|
|
37345
37642
|
meta: { name: "contacts", description: "Contacts on the connected HubSpot account." },
|
|
37346
37643
|
subCommands: { summary: contactsSummaryCommand, lookup: contactsLookupCommand }
|
|
37347
37644
|
});
|
|
37348
|
-
var formsCommand =
|
|
37645
|
+
var formsCommand = defineCommand130({
|
|
37349
37646
|
meta: { name: "forms", description: "HubSpot forms on the connected account." },
|
|
37350
37647
|
subCommands: { list: formsListCommand, view: formsViewCommand, submissions: formsSubmissionsCommand }
|
|
37351
37648
|
});
|
|
37352
|
-
var workflowsCommand =
|
|
37649
|
+
var workflowsCommand = defineCommand130({
|
|
37353
37650
|
meta: { name: "workflows", description: "HubSpot workflows on the connected account." },
|
|
37354
37651
|
subCommands: { list: workflowsListCommand, view: workflowsViewCommand }
|
|
37355
37652
|
});
|
|
37356
|
-
var pipelinesCommand =
|
|
37653
|
+
var pipelinesCommand = defineCommand130({
|
|
37357
37654
|
meta: { name: "pipelines", description: "HubSpot deal pipelines on the connected account." },
|
|
37358
37655
|
subCommands: { list: pipelinesListCommand }
|
|
37359
37656
|
});
|
|
37360
|
-
var meetingsCommand =
|
|
37657
|
+
var meetingsCommand = defineCommand130({
|
|
37361
37658
|
meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
|
|
37362
37659
|
subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
|
|
37363
37660
|
});
|
|
37364
|
-
var hubspotCommand =
|
|
37661
|
+
var hubspotCommand = defineCommand130({
|
|
37365
37662
|
meta: {
|
|
37366
37663
|
name: "hubspot",
|
|
37367
37664
|
description: `Read the connected HubSpot account \u2014 forms, the leads they received, workflows, deal pipelines and
|
|
@@ -37399,10 +37696,10 @@ Full guide: __tooling__/docs/tools/baker/hubspot.md`
|
|
|
37399
37696
|
});
|
|
37400
37697
|
|
|
37401
37698
|
// src/commands/images/index.ts
|
|
37402
|
-
import { defineCommand as
|
|
37699
|
+
import { defineCommand as defineCommand156 } from "citty";
|
|
37403
37700
|
|
|
37404
37701
|
// src/commands/images/crop.ts
|
|
37405
|
-
import { defineCommand as
|
|
37702
|
+
import { defineCommand as defineCommand131 } from "citty";
|
|
37406
37703
|
|
|
37407
37704
|
// src/lib/image/crop-sprite.ts
|
|
37408
37705
|
import sharp from "sharp";
|
|
@@ -37524,7 +37821,7 @@ function emitError2(err) {
|
|
|
37524
37821
|
}
|
|
37525
37822
|
process.exit(1);
|
|
37526
37823
|
}
|
|
37527
|
-
var cropCommand =
|
|
37824
|
+
var cropCommand = defineCommand131({
|
|
37528
37825
|
meta: {
|
|
37529
37826
|
name: "crop",
|
|
37530
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"
|
|
@@ -37560,7 +37857,7 @@ var cropCommand = defineCommand130({
|
|
|
37560
37857
|
});
|
|
37561
37858
|
|
|
37562
37859
|
// src/commands/images/delete.ts
|
|
37563
|
-
import { defineCommand as
|
|
37860
|
+
import { defineCommand as defineCommand132 } from "citty";
|
|
37564
37861
|
registerSchema({
|
|
37565
37862
|
command: "images.delete",
|
|
37566
37863
|
description: "Delete an image by ID",
|
|
@@ -37574,7 +37871,7 @@ registerSchema({
|
|
|
37574
37871
|
}
|
|
37575
37872
|
}
|
|
37576
37873
|
});
|
|
37577
|
-
var deleteCommand2 =
|
|
37874
|
+
var deleteCommand2 = defineCommand132({
|
|
37578
37875
|
meta: {
|
|
37579
37876
|
name: "delete",
|
|
37580
37877
|
description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
|
|
@@ -37615,7 +37912,7 @@ var deleteCommand2 = defineCommand131({
|
|
|
37615
37912
|
});
|
|
37616
37913
|
|
|
37617
37914
|
// src/commands/images/dimensions.ts
|
|
37618
|
-
import { defineCommand as
|
|
37915
|
+
import { defineCommand as defineCommand133 } from "citty";
|
|
37619
37916
|
|
|
37620
37917
|
// src/lib/image/dimensions.ts
|
|
37621
37918
|
import { imageSize } from "image-size";
|
|
@@ -37644,7 +37941,7 @@ registerSchema({
|
|
|
37644
37941
|
}
|
|
37645
37942
|
}
|
|
37646
37943
|
});
|
|
37647
|
-
var dimensionsCommand =
|
|
37944
|
+
var dimensionsCommand = defineCommand133({
|
|
37648
37945
|
meta: {
|
|
37649
37946
|
name: "dimensions",
|
|
37650
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"
|
|
@@ -37700,7 +37997,7 @@ var dimensionsCommand = defineCommand132({
|
|
|
37700
37997
|
});
|
|
37701
37998
|
|
|
37702
37999
|
// src/commands/images/download.ts
|
|
37703
|
-
import { defineCommand as
|
|
38000
|
+
import { defineCommand as defineCommand134 } from "citty";
|
|
37704
38001
|
|
|
37705
38002
|
// src/commands/images/downloadPaths.ts
|
|
37706
38003
|
import { basename as basename2, extname as extname3, join as join6 } from "path";
|
|
@@ -37925,7 +38222,7 @@ function emitError3(err) {
|
|
|
37925
38222
|
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
|
|
37926
38223
|
process.exit(1);
|
|
37927
38224
|
}
|
|
37928
|
-
var downloadCommand =
|
|
38225
|
+
var downloadCommand = defineCommand134({
|
|
37929
38226
|
meta: {
|
|
37930
38227
|
name: "download",
|
|
37931
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"
|
|
@@ -37958,7 +38255,7 @@ var downloadCommand = defineCommand133({
|
|
|
37958
38255
|
});
|
|
37959
38256
|
|
|
37960
38257
|
// src/commands/images/extract.ts
|
|
37961
|
-
import { defineCommand as
|
|
38258
|
+
import { defineCommand as defineCommand135 } from "citty";
|
|
37962
38259
|
|
|
37963
38260
|
// src/commands/images/autoIngest.ts
|
|
37964
38261
|
var AUTO_INGEST_MAX = {
|
|
@@ -38005,7 +38302,7 @@ registerSchema({
|
|
|
38005
38302
|
}
|
|
38006
38303
|
}
|
|
38007
38304
|
});
|
|
38008
|
-
var extractCommand =
|
|
38305
|
+
var extractCommand = defineCommand135({
|
|
38009
38306
|
meta: {
|
|
38010
38307
|
name: "extract",
|
|
38011
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"
|
|
@@ -38060,7 +38357,7 @@ var extractCommand = defineCommand134({
|
|
|
38060
38357
|
});
|
|
38061
38358
|
|
|
38062
38359
|
// src/commands/images/find.ts
|
|
38063
|
-
import { defineCommand as
|
|
38360
|
+
import { defineCommand as defineCommand136 } from "citty";
|
|
38064
38361
|
|
|
38065
38362
|
// src/commands/images/providerHits.ts
|
|
38066
38363
|
function asRecord3(value) {
|
|
@@ -38198,7 +38495,7 @@ registerSchema({
|
|
|
38198
38495
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
38199
38496
|
}
|
|
38200
38497
|
});
|
|
38201
|
-
var findCommand =
|
|
38498
|
+
var findCommand = defineCommand136({
|
|
38202
38499
|
meta: {
|
|
38203
38500
|
name: "find",
|
|
38204
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"
|
|
@@ -38271,7 +38568,7 @@ var findCommand = defineCommand135({
|
|
|
38271
38568
|
});
|
|
38272
38569
|
|
|
38273
38570
|
// src/commands/images/get.ts
|
|
38274
|
-
import { defineCommand as
|
|
38571
|
+
import { defineCommand as defineCommand137 } from "citty";
|
|
38275
38572
|
registerSchema({
|
|
38276
38573
|
command: "images.get",
|
|
38277
38574
|
description: "Get a single image by ID",
|
|
@@ -38279,7 +38576,7 @@ registerSchema({
|
|
|
38279
38576
|
id: { type: "string", description: "Image ID", required: true }
|
|
38280
38577
|
}
|
|
38281
38578
|
});
|
|
38282
|
-
var getCommand3 =
|
|
38579
|
+
var getCommand3 = defineCommand137({
|
|
38283
38580
|
meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
|
|
38284
38581
|
args: {
|
|
38285
38582
|
id: { type: "positional", description: "Image ID", required: false },
|
|
@@ -38315,7 +38612,7 @@ var getCommand3 = defineCommand136({
|
|
|
38315
38612
|
});
|
|
38316
38613
|
|
|
38317
38614
|
// src/commands/images/gif.ts
|
|
38318
|
-
import { defineCommand as
|
|
38615
|
+
import { defineCommand as defineCommand138 } from "citty";
|
|
38319
38616
|
registerSchema({
|
|
38320
38617
|
command: "images.gif",
|
|
38321
38618
|
description: "Search Giphy for GIFs / reaction memes (paid social creative).",
|
|
@@ -38347,7 +38644,7 @@ registerSchema({
|
|
|
38347
38644
|
}
|
|
38348
38645
|
}
|
|
38349
38646
|
});
|
|
38350
|
-
var gifCommand =
|
|
38647
|
+
var gifCommand = defineCommand138({
|
|
38351
38648
|
meta: {
|
|
38352
38649
|
name: "gif",
|
|
38353
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"
|
|
@@ -38394,7 +38691,7 @@ var gifCommand = defineCommand137({
|
|
|
38394
38691
|
});
|
|
38395
38692
|
|
|
38396
38693
|
// src/commands/images/google.ts
|
|
38397
|
-
import { defineCommand as
|
|
38694
|
+
import { defineCommand as defineCommand139 } from "citty";
|
|
38398
38695
|
var GOOGLE_ERROR_FIX = {
|
|
38399
38696
|
action: "use_different_resource",
|
|
38400
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."
|
|
@@ -38434,7 +38731,7 @@ registerSchema({
|
|
|
38434
38731
|
}
|
|
38435
38732
|
}
|
|
38436
38733
|
});
|
|
38437
|
-
var googleCommand2 =
|
|
38734
|
+
var googleCommand2 = defineCommand139({
|
|
38438
38735
|
meta: {
|
|
38439
38736
|
name: "google",
|
|
38440
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"
|
|
@@ -38507,7 +38804,7 @@ var googleCommand2 = defineCommand138({
|
|
|
38507
38804
|
});
|
|
38508
38805
|
|
|
38509
38806
|
// src/commands/images/group.ts
|
|
38510
|
-
import { defineCommand as
|
|
38807
|
+
import { defineCommand as defineCommand140 } from "citty";
|
|
38511
38808
|
|
|
38512
38809
|
// src/commands/mediaGroup.ts
|
|
38513
38810
|
async function runMediaGroupLookup(input) {
|
|
@@ -38560,7 +38857,7 @@ registerSchema({
|
|
|
38560
38857
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
38561
38858
|
}
|
|
38562
38859
|
});
|
|
38563
|
-
var groupCommand =
|
|
38860
|
+
var groupCommand = defineCommand140({
|
|
38564
38861
|
meta: {
|
|
38565
38862
|
name: "group",
|
|
38566
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>"
|
|
@@ -38580,7 +38877,7 @@ var groupCommand = defineCommand139({
|
|
|
38580
38877
|
});
|
|
38581
38878
|
|
|
38582
38879
|
// src/commands/images/icon.ts
|
|
38583
|
-
import { defineCommand as
|
|
38880
|
+
import { defineCommand as defineCommand141 } from "citty";
|
|
38584
38881
|
|
|
38585
38882
|
// src/commands/images/brandVerification.ts
|
|
38586
38883
|
function brandToken(domain) {
|
|
@@ -38677,7 +38974,7 @@ registerSchema({
|
|
|
38677
38974
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
38678
38975
|
}
|
|
38679
38976
|
});
|
|
38680
|
-
var iconCommand =
|
|
38977
|
+
var iconCommand = defineCommand141({
|
|
38681
38978
|
meta: {
|
|
38682
38979
|
name: "icon",
|
|
38683
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'"
|
|
@@ -38747,7 +39044,7 @@ var iconCommand = defineCommand140({
|
|
|
38747
39044
|
});
|
|
38748
39045
|
|
|
38749
39046
|
// src/commands/images/ingest.ts
|
|
38750
|
-
import { defineCommand as
|
|
39047
|
+
import { defineCommand as defineCommand142 } from "citty";
|
|
38751
39048
|
var SOURCE_VALUES = imageSourceSchema.options.join(" | ");
|
|
38752
39049
|
registerSchema({
|
|
38753
39050
|
command: "images.ingest",
|
|
@@ -38762,7 +39059,7 @@ registerSchema({
|
|
|
38762
39059
|
fields: { type: "string", description: "Comma-separated field names to include", required: false }
|
|
38763
39060
|
}
|
|
38764
39061
|
});
|
|
38765
|
-
var ingestCommand =
|
|
39062
|
+
var ingestCommand = defineCommand142({
|
|
38766
39063
|
meta: {
|
|
38767
39064
|
name: "ingest",
|
|
38768
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"
|
|
@@ -38831,7 +39128,7 @@ var ingestCommand = defineCommand141({
|
|
|
38831
39128
|
});
|
|
38832
39129
|
|
|
38833
39130
|
// src/commands/images/layerize.ts
|
|
38834
|
-
import { defineCommand as
|
|
39131
|
+
import { defineCommand as defineCommand143 } from "citty";
|
|
38835
39132
|
registerSchema({
|
|
38836
39133
|
command: "images.layerize",
|
|
38837
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.",
|
|
@@ -38895,7 +39192,7 @@ async function pollUntilSettled(imageId, maxWait) {
|
|
|
38895
39192
|
}
|
|
38896
39193
|
return null;
|
|
38897
39194
|
}
|
|
38898
|
-
var layerizeCommand =
|
|
39195
|
+
var layerizeCommand = defineCommand143({
|
|
38899
39196
|
meta: {
|
|
38900
39197
|
name: "layerize",
|
|
38901
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'"
|
|
@@ -38964,7 +39261,7 @@ registerSchema({
|
|
|
38964
39261
|
full: { type: "boolean", description: "Include geometry and typography for every layer", required: false }
|
|
38965
39262
|
}
|
|
38966
39263
|
});
|
|
38967
|
-
var layersCommand =
|
|
39264
|
+
var layersCommand = defineCommand143({
|
|
38968
39265
|
meta: {
|
|
38969
39266
|
name: "layers",
|
|
38970
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"
|
|
@@ -39004,7 +39301,7 @@ var layersCommand = defineCommand142({
|
|
|
39004
39301
|
});
|
|
39005
39302
|
|
|
39006
39303
|
// src/commands/images/library.ts
|
|
39007
|
-
import { defineCommand as
|
|
39304
|
+
import { defineCommand as defineCommand144 } from "citty";
|
|
39008
39305
|
registerSchema({
|
|
39009
39306
|
command: "images.library",
|
|
39010
39307
|
description: "Search the company image library. Returns only ready images.",
|
|
@@ -39030,7 +39327,7 @@ registerSchema({
|
|
|
39030
39327
|
}
|
|
39031
39328
|
}
|
|
39032
39329
|
});
|
|
39033
|
-
var libraryCommand =
|
|
39330
|
+
var libraryCommand = defineCommand144({
|
|
39034
39331
|
meta: {
|
|
39035
39332
|
name: "library",
|
|
39036
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"
|
|
@@ -39093,7 +39390,7 @@ var libraryCommand = defineCommand143({
|
|
|
39093
39390
|
});
|
|
39094
39391
|
|
|
39095
39392
|
// src/commands/images/logo.ts
|
|
39096
|
-
import { defineCommand as
|
|
39393
|
+
import { defineCommand as defineCommand145 } from "citty";
|
|
39097
39394
|
registerSchema({
|
|
39098
39395
|
command: "images.logo",
|
|
39099
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.",
|
|
@@ -39121,7 +39418,7 @@ registerSchema({
|
|
|
39121
39418
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
39122
39419
|
}
|
|
39123
39420
|
});
|
|
39124
|
-
var logoCommand =
|
|
39421
|
+
var logoCommand = defineCommand145({
|
|
39125
39422
|
meta: {
|
|
39126
39423
|
name: "logo",
|
|
39127
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"
|
|
@@ -39194,7 +39491,7 @@ var logoCommand = defineCommand144({
|
|
|
39194
39491
|
});
|
|
39195
39492
|
|
|
39196
39493
|
// src/commands/images/normalize.ts
|
|
39197
|
-
import { defineCommand as
|
|
39494
|
+
import { defineCommand as defineCommand146 } from "citty";
|
|
39198
39495
|
|
|
39199
39496
|
// src/lib/image/color-changer.ts
|
|
39200
39497
|
import quantize from "quantize";
|
|
@@ -39926,7 +40223,7 @@ function coerceRawArgs(args) {
|
|
|
39926
40223
|
"dry-run": bool(args["dry-run"])
|
|
39927
40224
|
};
|
|
39928
40225
|
}
|
|
39929
|
-
var normalizeCommand2 =
|
|
40226
|
+
var normalizeCommand2 = defineCommand146({
|
|
39930
40227
|
meta: {
|
|
39931
40228
|
name: "normalize",
|
|
39932
40229
|
description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
|
|
@@ -39981,7 +40278,7 @@ Examples:
|
|
|
39981
40278
|
});
|
|
39982
40279
|
|
|
39983
40280
|
// src/commands/images/pinterest.ts
|
|
39984
|
-
import { defineCommand as
|
|
40281
|
+
import { defineCommand as defineCommand147 } from "citty";
|
|
39985
40282
|
registerSchema({
|
|
39986
40283
|
command: "images.pinterest",
|
|
39987
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.",
|
|
@@ -40001,7 +40298,7 @@ registerSchema({
|
|
|
40001
40298
|
}
|
|
40002
40299
|
}
|
|
40003
40300
|
});
|
|
40004
|
-
var pinterestCommand =
|
|
40301
|
+
var pinterestCommand = defineCommand147({
|
|
40005
40302
|
meta: {
|
|
40006
40303
|
name: "pinterest",
|
|
40007
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'"
|
|
@@ -40058,7 +40355,7 @@ var pinterestCommand = defineCommand146({
|
|
|
40058
40355
|
});
|
|
40059
40356
|
|
|
40060
40357
|
// src/commands/images/screenshot.ts
|
|
40061
|
-
import { defineCommand as
|
|
40358
|
+
import { defineCommand as defineCommand148 } from "citty";
|
|
40062
40359
|
registerSchema({
|
|
40063
40360
|
command: "images.screenshot",
|
|
40064
40361
|
description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
|
|
@@ -40077,7 +40374,7 @@ registerSchema({
|
|
|
40077
40374
|
full: { type: "boolean", description: "Include full metadata", required: false, default: false }
|
|
40078
40375
|
}
|
|
40079
40376
|
});
|
|
40080
|
-
var screenshotCommand =
|
|
40377
|
+
var screenshotCommand = defineCommand148({
|
|
40081
40378
|
meta: {
|
|
40082
40379
|
name: "screenshot",
|
|
40083
40380
|
description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
|
|
@@ -40141,7 +40438,7 @@ var screenshotCommand = defineCommand147({
|
|
|
40141
40438
|
});
|
|
40142
40439
|
|
|
40143
40440
|
// src/commands/images/search.ts
|
|
40144
|
-
import { defineCommand as
|
|
40441
|
+
import { defineCommand as defineCommand149 } from "citty";
|
|
40145
40442
|
registerSchema({
|
|
40146
40443
|
command: "images.search",
|
|
40147
40444
|
description: "Search images by text query. Only returns ready images.",
|
|
@@ -40157,7 +40454,7 @@ registerSchema({
|
|
|
40157
40454
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
40158
40455
|
}
|
|
40159
40456
|
});
|
|
40160
|
-
var searchCommand =
|
|
40457
|
+
var searchCommand = defineCommand149({
|
|
40161
40458
|
meta: {
|
|
40162
40459
|
name: "search",
|
|
40163
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"
|
|
@@ -40217,7 +40514,7 @@ var searchCommand = defineCommand148({
|
|
|
40217
40514
|
});
|
|
40218
40515
|
|
|
40219
40516
|
// src/commands/images/sticker.ts
|
|
40220
|
-
import { defineCommand as
|
|
40517
|
+
import { defineCommand as defineCommand150 } from "citty";
|
|
40221
40518
|
registerSchema({
|
|
40222
40519
|
command: "images.sticker",
|
|
40223
40520
|
description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
|
|
@@ -40249,7 +40546,7 @@ registerSchema({
|
|
|
40249
40546
|
}
|
|
40250
40547
|
}
|
|
40251
40548
|
});
|
|
40252
|
-
var stickerCommand =
|
|
40549
|
+
var stickerCommand = defineCommand150({
|
|
40253
40550
|
meta: {
|
|
40254
40551
|
name: "sticker",
|
|
40255
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"
|
|
@@ -40296,7 +40593,7 @@ var stickerCommand = defineCommand149({
|
|
|
40296
40593
|
});
|
|
40297
40594
|
|
|
40298
40595
|
// src/commands/images/stock.ts
|
|
40299
|
-
import { defineCommand as
|
|
40596
|
+
import { defineCommand as defineCommand151 } from "citty";
|
|
40300
40597
|
var STOCK_ERROR_FIX = {
|
|
40301
40598
|
action: "use_different_resource",
|
|
40302
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."
|
|
@@ -40373,7 +40670,7 @@ function buildStockRequest(query, args) {
|
|
|
40373
40670
|
if (args.context) body.descriptionContext = args.context;
|
|
40374
40671
|
return body;
|
|
40375
40672
|
}
|
|
40376
|
-
var stockCommand =
|
|
40673
|
+
var stockCommand = defineCommand151({
|
|
40377
40674
|
meta: {
|
|
40378
40675
|
name: "stock",
|
|
40379
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"
|
|
@@ -40446,7 +40743,7 @@ var stockCommand = defineCommand150({
|
|
|
40446
40743
|
});
|
|
40447
40744
|
|
|
40448
40745
|
// src/lib/tags-command.ts
|
|
40449
|
-
import { defineCommand as
|
|
40746
|
+
import { defineCommand as defineCommand152 } from "citty";
|
|
40450
40747
|
function makeTagsCommand(command, label, endpoint) {
|
|
40451
40748
|
registerSchema({
|
|
40452
40749
|
command: `${command}.tags`,
|
|
@@ -40455,7 +40752,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
40455
40752
|
output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
|
|
40456
40753
|
}
|
|
40457
40754
|
});
|
|
40458
|
-
return
|
|
40755
|
+
return defineCommand152({
|
|
40459
40756
|
meta: {
|
|
40460
40757
|
name: "tags",
|
|
40461
40758
|
description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
|
|
@@ -40491,7 +40788,7 @@ function makeTagsCommand(command, label, endpoint) {
|
|
|
40491
40788
|
var tagsCommand3 = makeTagsCommand("images", "image", "/api/images/tags");
|
|
40492
40789
|
|
|
40493
40790
|
// src/commands/images/upload.ts
|
|
40494
|
-
import { defineCommand as
|
|
40791
|
+
import { defineCommand as defineCommand153 } from "citty";
|
|
40495
40792
|
registerSchema({
|
|
40496
40793
|
command: "images.upload",
|
|
40497
40794
|
description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
|
|
@@ -40529,7 +40826,7 @@ registerSchema({
|
|
|
40529
40826
|
function isRemoteUrl2(value) {
|
|
40530
40827
|
return /^https?:\/\//i.test(value);
|
|
40531
40828
|
}
|
|
40532
|
-
var uploadCommand =
|
|
40829
|
+
var uploadCommand = defineCommand153({
|
|
40533
40830
|
meta: {
|
|
40534
40831
|
name: "upload",
|
|
40535
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'"
|
|
@@ -40622,7 +40919,7 @@ async function uploadLocal(target, args) {
|
|
|
40622
40919
|
}
|
|
40623
40920
|
|
|
40624
40921
|
// src/commands/images/upscale.ts
|
|
40625
|
-
import { defineCommand as
|
|
40922
|
+
import { defineCommand as defineCommand154 } from "citty";
|
|
40626
40923
|
registerSchema({
|
|
40627
40924
|
command: "images.upscale",
|
|
40628
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).",
|
|
@@ -40637,7 +40934,7 @@ registerSchema({
|
|
|
40637
40934
|
}
|
|
40638
40935
|
});
|
|
40639
40936
|
var POLL_INTERVAL_MS4 = 1500;
|
|
40640
|
-
var upscaleCommand =
|
|
40937
|
+
var upscaleCommand = defineCommand154({
|
|
40641
40938
|
meta: {
|
|
40642
40939
|
name: "upscale",
|
|
40643
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"
|
|
@@ -40692,7 +40989,7 @@ var upscaleCommand = defineCommand153({
|
|
|
40692
40989
|
});
|
|
40693
40990
|
|
|
40694
40991
|
// src/commands/images/use.ts
|
|
40695
|
-
import { defineCommand as
|
|
40992
|
+
import { defineCommand as defineCommand155 } from "citty";
|
|
40696
40993
|
registerSchema({
|
|
40697
40994
|
command: "images.use",
|
|
40698
40995
|
description: "Ingest a URL and wait for the library record to be ready.",
|
|
@@ -40721,7 +41018,7 @@ function emitReady(ingestResult, doc, args) {
|
|
|
40721
41018
|
args.full === true
|
|
40722
41019
|
);
|
|
40723
41020
|
}
|
|
40724
|
-
var useCommand =
|
|
41021
|
+
var useCommand = defineCommand155({
|
|
40725
41022
|
meta: {
|
|
40726
41023
|
name: "use",
|
|
40727
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"
|
|
@@ -40770,7 +41067,7 @@ var useCommand = defineCommand154({
|
|
|
40770
41067
|
});
|
|
40771
41068
|
|
|
40772
41069
|
// src/commands/images/index.ts
|
|
40773
|
-
var imagesCommand =
|
|
41070
|
+
var imagesCommand = defineCommand156({
|
|
40774
41071
|
meta: {
|
|
40775
41072
|
name: "images",
|
|
40776
41073
|
description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
|
|
@@ -40848,12 +41145,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
|
|
|
40848
41145
|
});
|
|
40849
41146
|
|
|
40850
41147
|
// src/commands/landing/index.ts
|
|
40851
|
-
import { defineCommand as
|
|
41148
|
+
import { defineCommand as defineCommand167 } from "citty";
|
|
40852
41149
|
|
|
40853
41150
|
// src/commands/landing/critique.ts
|
|
40854
41151
|
import { readdir as readdir9, stat as stat6 } from "fs/promises";
|
|
40855
41152
|
import path29 from "path";
|
|
40856
|
-
import { defineCommand as
|
|
41153
|
+
import { defineCommand as defineCommand157 } from "citty";
|
|
40857
41154
|
|
|
40858
41155
|
// src/engine/landing/lib/constants.ts
|
|
40859
41156
|
var OVERUSED_FONTS = /* @__PURE__ */ new Set([
|
|
@@ -42029,14 +42326,14 @@ function parseCritiqueSlugs(args) {
|
|
|
42029
42326
|
const all = [args.slug, ...rest].filter((s) => typeof s === "string" && s.length > 0);
|
|
42030
42327
|
return [...new Set(all.map(String))];
|
|
42031
42328
|
}
|
|
42032
|
-
function
|
|
42329
|
+
function fail6(code, message, fix) {
|
|
42033
42330
|
process.stderr.write(
|
|
42034
42331
|
`${JSON.stringify({ ok: false, error: { code, message, ...fix ? { fix } : {} } }, null, 2)}
|
|
42035
42332
|
`
|
|
42036
42333
|
);
|
|
42037
42334
|
process.exit(2);
|
|
42038
42335
|
}
|
|
42039
|
-
var critiqueCommand2 =
|
|
42336
|
+
var critiqueCommand2 = defineCommand157({
|
|
42040
42337
|
meta: {
|
|
42041
42338
|
name: "critique",
|
|
42042
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."
|
|
@@ -42054,14 +42351,14 @@ var critiqueCommand2 = defineCommand156({
|
|
|
42054
42351
|
const projectRoot = process.cwd();
|
|
42055
42352
|
for (const slug of slugs) {
|
|
42056
42353
|
if (!SLUG_RE.test(slug) || slug.includes("..")) {
|
|
42057
|
-
|
|
42354
|
+
fail6(
|
|
42058
42355
|
"INVALID_SLUG",
|
|
42059
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).`,
|
|
42060
42357
|
{ availableSlugs: await listLandingSlugs(projectRoot) }
|
|
42061
42358
|
);
|
|
42062
42359
|
}
|
|
42063
42360
|
if (!await isDir(path29.resolve(projectRoot, "src", "pages", slug))) {
|
|
42064
|
-
|
|
42361
|
+
fail6("NOT_FOUND", `No landing at src/pages/${slug}/`, {
|
|
42065
42362
|
availableSlugs: await listLandingSlugs(projectRoot)
|
|
42066
42363
|
});
|
|
42067
42364
|
}
|
|
@@ -42145,10 +42442,10 @@ async function isDir(p) {
|
|
|
42145
42442
|
}
|
|
42146
42443
|
|
|
42147
42444
|
// src/commands/landing/inspiration/index.ts
|
|
42148
|
-
import { defineCommand as
|
|
42445
|
+
import { defineCommand as defineCommand166 } from "citty";
|
|
42149
42446
|
|
|
42150
42447
|
// src/commands/landing/inspiration/add.ts
|
|
42151
|
-
import { defineCommand as
|
|
42448
|
+
import { defineCommand as defineCommand158 } from "citty";
|
|
42152
42449
|
|
|
42153
42450
|
// src/commands/landing/inspiration/shared.ts
|
|
42154
42451
|
var INSPIRATION_HINTS = {
|
|
@@ -42230,7 +42527,7 @@ registerSchema({
|
|
|
42230
42527
|
note: { type: "string", description: "Why this page is worth keeping", required: false }
|
|
42231
42528
|
}
|
|
42232
42529
|
});
|
|
42233
|
-
var addCommand =
|
|
42530
|
+
var addCommand = defineCommand158({
|
|
42234
42531
|
meta: {
|
|
42235
42532
|
name: "add",
|
|
42236
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'"
|
|
@@ -42272,7 +42569,7 @@ var addCommand = defineCommand157({
|
|
|
42272
42569
|
// src/commands/landing/inspiration/code.ts
|
|
42273
42570
|
import { mkdir as mkdir10, writeFile as writeFile14 } from "fs/promises";
|
|
42274
42571
|
import path30 from "path";
|
|
42275
|
-
import { defineCommand as
|
|
42572
|
+
import { defineCommand as defineCommand159 } from "citty";
|
|
42276
42573
|
registerSchema({
|
|
42277
42574
|
command: "landing.inspiration.code",
|
|
42278
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.",
|
|
@@ -42281,7 +42578,7 @@ registerSchema({
|
|
|
42281
42578
|
full: { type: "boolean", description: "Print the markup inline as well as writing it", required: false }
|
|
42282
42579
|
}
|
|
42283
42580
|
});
|
|
42284
|
-
var codeCommand =
|
|
42581
|
+
var codeCommand = defineCommand159({
|
|
42285
42582
|
meta: {
|
|
42286
42583
|
name: "code",
|
|
42287
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."
|
|
@@ -42338,7 +42635,7 @@ var codeCommand = defineCommand158({
|
|
|
42338
42635
|
});
|
|
42339
42636
|
|
|
42340
42637
|
// src/commands/landing/inspiration/favorites.ts
|
|
42341
|
-
import { defineCommand as
|
|
42638
|
+
import { defineCommand as defineCommand160 } from "citty";
|
|
42342
42639
|
registerSchema({
|
|
42343
42640
|
command: "landing.inspiration.favorites",
|
|
42344
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.",
|
|
@@ -42352,7 +42649,7 @@ registerSchema({
|
|
|
42352
42649
|
}
|
|
42353
42650
|
}
|
|
42354
42651
|
});
|
|
42355
|
-
var favoritesCommand =
|
|
42652
|
+
var favoritesCommand = defineCommand160({
|
|
42356
42653
|
meta: {
|
|
42357
42654
|
name: "favorites",
|
|
42358
42655
|
description: "List this company's saved reference sections. Example: baker landing inspiration favorites --type hero,pricing"
|
|
@@ -42432,7 +42729,7 @@ registerSchema({
|
|
|
42432
42729
|
note: { type: "string", description: "Why this is worth keeping", required: false }
|
|
42433
42730
|
}
|
|
42434
42731
|
});
|
|
42435
|
-
var favoriteCommand =
|
|
42732
|
+
var favoriteCommand = defineCommand160({
|
|
42436
42733
|
meta: {
|
|
42437
42734
|
name: "favorite",
|
|
42438
42735
|
description: "Save a reference section to this company. Example: baker landing inspiration favorite k57abc\u2026"
|
|
@@ -42470,7 +42767,7 @@ registerSchema({
|
|
|
42470
42767
|
page: { type: "boolean", description: "Treat the id as a page rather than a section", required: false }
|
|
42471
42768
|
}
|
|
42472
42769
|
});
|
|
42473
|
-
var unfavoriteCommand =
|
|
42770
|
+
var unfavoriteCommand = defineCommand160({
|
|
42474
42771
|
meta: {
|
|
42475
42772
|
name: "unfavorite",
|
|
42476
42773
|
description: "Remove a reference section from this company's saved set. Example: baker landing inspiration unfavorite k57abc\u2026"
|
|
@@ -42492,7 +42789,7 @@ var unfavoriteCommand = defineCommand159({
|
|
|
42492
42789
|
});
|
|
42493
42790
|
|
|
42494
42791
|
// src/commands/landing/inspiration/page.ts
|
|
42495
|
-
import { defineCommand as
|
|
42792
|
+
import { defineCommand as defineCommand161 } from "citty";
|
|
42496
42793
|
registerSchema({
|
|
42497
42794
|
command: "landing.inspiration.page",
|
|
42498
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.",
|
|
@@ -42509,7 +42806,7 @@ registerSchema({
|
|
|
42509
42806
|
}
|
|
42510
42807
|
}
|
|
42511
42808
|
});
|
|
42512
|
-
var pageCommand2 =
|
|
42809
|
+
var pageCommand2 = defineCommand161({
|
|
42513
42810
|
meta: {
|
|
42514
42811
|
name: "page",
|
|
42515
42812
|
description: "Show how a reference page sequences its sections. Example: baker landing inspiration page j91xyz\u2026 \u2014 the blueprint, not the pixels."
|
|
@@ -42574,7 +42871,7 @@ var pageCommand2 = defineCommand160({
|
|
|
42574
42871
|
// src/commands/landing/inspiration/scrape.ts
|
|
42575
42872
|
import { readFile as readFile23 } from "fs/promises";
|
|
42576
42873
|
import path33 from "path";
|
|
42577
|
-
import { defineCommand as
|
|
42874
|
+
import { defineCommand as defineCommand162 } from "citty";
|
|
42578
42875
|
|
|
42579
42876
|
// src/engine/landing/lib/capturedReferences.ts
|
|
42580
42877
|
var MAX_STRINGS_PER_SECTION = 40;
|
|
@@ -44715,7 +45012,7 @@ registerSchema({
|
|
|
44715
45012
|
report: { type: "boolean", description: "Write report.html. `--no-report` to skip", required: false }
|
|
44716
45013
|
}
|
|
44717
45014
|
});
|
|
44718
|
-
var scrapeCommand =
|
|
45015
|
+
var scrapeCommand = defineCommand162({
|
|
44719
45016
|
meta: {
|
|
44720
45017
|
name: "scrape",
|
|
44721
45018
|
description: "Capture a landing page to a directory, now. Example: baker landing inspiration scrape https://linear.app --out .baker/inspiration/linear.app"
|
|
@@ -44817,7 +45114,7 @@ var scrapeCommand = defineCommand161({
|
|
|
44817
45114
|
|
|
44818
45115
|
// src/commands/landing/inspiration/search.ts
|
|
44819
45116
|
import path35 from "path";
|
|
44820
|
-
import { defineCommand as
|
|
45117
|
+
import { defineCommand as defineCommand163 } from "citty";
|
|
44821
45118
|
|
|
44822
45119
|
// src/commands/landing/inspiration/shot.ts
|
|
44823
45120
|
import { mkdir as mkdir12, writeFile as writeFile17 } from "fs/promises";
|
|
@@ -44954,7 +45251,7 @@ async function downloadShots(results) {
|
|
|
44954
45251
|
);
|
|
44955
45252
|
return saved;
|
|
44956
45253
|
}
|
|
44957
|
-
var searchCommand2 =
|
|
45254
|
+
var searchCommand2 = defineCommand163({
|
|
44958
45255
|
meta: {
|
|
44959
45256
|
name: "search",
|
|
44960
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"
|
|
@@ -45052,7 +45349,7 @@ var searchCommand2 = defineCommand162({
|
|
|
45052
45349
|
});
|
|
45053
45350
|
|
|
45054
45351
|
// src/commands/landing/inspiration/sequences.ts
|
|
45055
|
-
import { defineCommand as
|
|
45352
|
+
import { defineCommand as defineCommand164 } from "citty";
|
|
45056
45353
|
var COMPACT_TRANSITIONS = 12;
|
|
45057
45354
|
var COMPACT_ENDS = 5;
|
|
45058
45355
|
var MAX_PAGES = 50;
|
|
@@ -45126,7 +45423,7 @@ function sequencesHints(data, { scope, full }) {
|
|
|
45126
45423
|
if (scope === "favorites") hints.push(...favoritesScopeHints(data.favoritesHealth, data.pagesReturned));
|
|
45127
45424
|
return hints;
|
|
45128
45425
|
}
|
|
45129
|
-
var sequencesCommand =
|
|
45426
|
+
var sequencesCommand = defineCommand164({
|
|
45130
45427
|
meta: {
|
|
45131
45428
|
name: "sequences",
|
|
45132
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."
|
|
@@ -45176,7 +45473,7 @@ var sequencesCommand = defineCommand163({
|
|
|
45176
45473
|
|
|
45177
45474
|
// src/commands/landing/inspiration/view.ts
|
|
45178
45475
|
import path36 from "path";
|
|
45179
|
-
import { defineCommand as
|
|
45476
|
+
import { defineCommand as defineCommand165 } from "citty";
|
|
45180
45477
|
registerSchema({
|
|
45181
45478
|
command: "landing.inspiration.view",
|
|
45182
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.",
|
|
@@ -45189,7 +45486,7 @@ registerSchema({
|
|
|
45189
45486
|
}
|
|
45190
45487
|
}
|
|
45191
45488
|
});
|
|
45192
|
-
var viewCommand2 =
|
|
45489
|
+
var viewCommand2 = defineCommand165({
|
|
45193
45490
|
meta: {
|
|
45194
45491
|
name: "view",
|
|
45195
45492
|
description: "Full detail for one reference section. Example: baker landing inspiration view k57abc\u2026 \u2014 read the screenshots it saves before you build."
|
|
@@ -45273,7 +45570,7 @@ var viewCommand2 = defineCommand164({
|
|
|
45273
45570
|
});
|
|
45274
45571
|
|
|
45275
45572
|
// src/commands/landing/inspiration/index.ts
|
|
45276
|
-
var inspirationCommand =
|
|
45573
|
+
var inspirationCommand = defineCommand166({
|
|
45277
45574
|
meta: {
|
|
45278
45575
|
name: "inspiration",
|
|
45279
45576
|
description: `Reference library of real landing-page sections \u2014 look at how good pages actually solve a problem before you design one.
|
|
@@ -45318,7 +45615,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
|
|
|
45318
45615
|
});
|
|
45319
45616
|
|
|
45320
45617
|
// src/commands/landing/index.ts
|
|
45321
|
-
var landingCommand =
|
|
45618
|
+
var landingCommand = defineCommand167({
|
|
45322
45619
|
meta: {
|
|
45323
45620
|
name: "landing",
|
|
45324
45621
|
description: `Design-quality tools for landing pages (src/pages/<slug>/).
|
|
@@ -45336,7 +45633,7 @@ Subcommands:
|
|
|
45336
45633
|
});
|
|
45337
45634
|
|
|
45338
45635
|
// src/commands/mcp/index.ts
|
|
45339
|
-
import { defineCommand as
|
|
45636
|
+
import { defineCommand as defineCommand168 } from "citty";
|
|
45340
45637
|
|
|
45341
45638
|
// src/commands/mcp/platforms.ts
|
|
45342
45639
|
function readsKey(label) {
|
|
@@ -45391,7 +45688,7 @@ function parseHeaders(raw) {
|
|
|
45391
45688
|
}
|
|
45392
45689
|
return Object.keys(headers).length > 0 ? headers : void 0;
|
|
45393
45690
|
}
|
|
45394
|
-
function
|
|
45691
|
+
function fail7(err) {
|
|
45395
45692
|
if (err instanceof ApiError) {
|
|
45396
45693
|
writeJson({ ok: false, error: { code: err.code, message: err.message } });
|
|
45397
45694
|
process.exit(1);
|
|
@@ -45405,7 +45702,7 @@ registerSchema({
|
|
|
45405
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.",
|
|
45406
45703
|
args: {}
|
|
45407
45704
|
});
|
|
45408
|
-
var connectedCommand =
|
|
45705
|
+
var connectedCommand = defineCommand168({
|
|
45409
45706
|
meta: {
|
|
45410
45707
|
name: "connected",
|
|
45411
45708
|
description: `Everything this chat can reach \u2014 managed integrations, custom MCP servers, and connected platforms.
|
|
@@ -45455,7 +45752,7 @@ A tool or platform the user names that is NOT listed anywhere here is simply not
|
|
|
45455
45752
|
hints
|
|
45456
45753
|
});
|
|
45457
45754
|
} catch (err) {
|
|
45458
|
-
|
|
45755
|
+
fail7(err);
|
|
45459
45756
|
}
|
|
45460
45757
|
}
|
|
45461
45758
|
});
|
|
@@ -45464,7 +45761,7 @@ registerSchema({
|
|
|
45464
45761
|
description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
|
|
45465
45762
|
args: {}
|
|
45466
45763
|
});
|
|
45467
|
-
var listCommand14 =
|
|
45764
|
+
var listCommand14 = defineCommand168({
|
|
45468
45765
|
meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
|
|
45469
45766
|
run: async () => {
|
|
45470
45767
|
try {
|
|
@@ -45483,7 +45780,7 @@ var listCommand14 = defineCommand167({
|
|
|
45483
45780
|
} : {}
|
|
45484
45781
|
});
|
|
45485
45782
|
} catch (err) {
|
|
45486
|
-
|
|
45783
|
+
fail7(err);
|
|
45487
45784
|
}
|
|
45488
45785
|
}
|
|
45489
45786
|
});
|
|
@@ -45501,7 +45798,7 @@ registerSchema({
|
|
|
45501
45798
|
header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
|
|
45502
45799
|
}
|
|
45503
45800
|
});
|
|
45504
|
-
var addCommand2 =
|
|
45801
|
+
var addCommand2 = defineCommand168({
|
|
45505
45802
|
meta: {
|
|
45506
45803
|
name: "add",
|
|
45507
45804
|
description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
|
|
@@ -45544,7 +45841,7 @@ Examples:
|
|
|
45544
45841
|
]
|
|
45545
45842
|
});
|
|
45546
45843
|
} catch (err) {
|
|
45547
|
-
|
|
45844
|
+
fail7(err);
|
|
45548
45845
|
}
|
|
45549
45846
|
}
|
|
45550
45847
|
});
|
|
@@ -45553,7 +45850,7 @@ registerSchema({
|
|
|
45553
45850
|
description: "Remove a company custom MCP server by name.",
|
|
45554
45851
|
args: { name: { type: "string", description: "Server name to remove", required: true } }
|
|
45555
45852
|
});
|
|
45556
|
-
var removeCommand4 =
|
|
45853
|
+
var removeCommand4 = defineCommand168({
|
|
45557
45854
|
meta: {
|
|
45558
45855
|
name: "remove",
|
|
45559
45856
|
description: `Remove a company custom MCP server by name.
|
|
@@ -45571,11 +45868,11 @@ Example:
|
|
|
45571
45868
|
});
|
|
45572
45869
|
writeJson({ ok: true, data });
|
|
45573
45870
|
} catch (err) {
|
|
45574
|
-
|
|
45871
|
+
fail7(err);
|
|
45575
45872
|
}
|
|
45576
45873
|
}
|
|
45577
45874
|
});
|
|
45578
|
-
var mcpCommand =
|
|
45875
|
+
var mcpCommand = defineCommand168({
|
|
45579
45876
|
meta: {
|
|
45580
45877
|
name: "mcp",
|
|
45581
45878
|
description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
|
|
@@ -45601,10 +45898,10 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
|
|
|
45601
45898
|
});
|
|
45602
45899
|
|
|
45603
45900
|
// src/commands/research/index.ts
|
|
45604
|
-
import { defineCommand as
|
|
45901
|
+
import { defineCommand as defineCommand180 } from "citty";
|
|
45605
45902
|
|
|
45606
45903
|
// src/commands/research/advertisers.ts
|
|
45607
|
-
import { defineCommand as
|
|
45904
|
+
import { defineCommand as defineCommand169 } from "citty";
|
|
45608
45905
|
|
|
45609
45906
|
// src/commands/research/hints.ts
|
|
45610
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.';
|
|
@@ -45787,7 +46084,7 @@ var FIELDS3 = {
|
|
|
45787
46084
|
etv: "Estimated traffic value (USD)",
|
|
45788
46085
|
visibility: "SERP visibility score (0-1)"
|
|
45789
46086
|
};
|
|
45790
|
-
var advertisersCommand =
|
|
46087
|
+
var advertisersCommand = defineCommand169({
|
|
45791
46088
|
meta: {
|
|
45792
46089
|
name: "advertisers",
|
|
45793
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).
|
|
@@ -45843,7 +46140,7 @@ Examples:
|
|
|
45843
46140
|
});
|
|
45844
46141
|
|
|
45845
46142
|
// src/commands/research/autocomplete.ts
|
|
45846
|
-
import { defineCommand as
|
|
46143
|
+
import { defineCommand as defineCommand170 } from "citty";
|
|
45847
46144
|
registerSchema({
|
|
45848
46145
|
command: "research.autocomplete",
|
|
45849
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).",
|
|
@@ -45866,7 +46163,7 @@ registerSchema({
|
|
|
45866
46163
|
var FIELDS4 = {
|
|
45867
46164
|
suggestion: "Autocomplete suggestion from Google"
|
|
45868
46165
|
};
|
|
45869
|
-
var autocompleteCommand =
|
|
46166
|
+
var autocompleteCommand = defineCommand170({
|
|
45870
46167
|
meta: {
|
|
45871
46168
|
name: "autocomplete",
|
|
45872
46169
|
description: `Get Google Autocomplete suggestions for keyword expansion.
|
|
@@ -45921,7 +46218,7 @@ Examples:
|
|
|
45921
46218
|
});
|
|
45922
46219
|
|
|
45923
46220
|
// src/commands/research/countries.ts
|
|
45924
|
-
import { defineCommand as
|
|
46221
|
+
import { defineCommand as defineCommand171 } from "citty";
|
|
45925
46222
|
registerSchema({
|
|
45926
46223
|
command: "research.countries",
|
|
45927
46224
|
description: "List all supported country codes for --location flag in research commands.",
|
|
@@ -45978,7 +46275,7 @@ var FIELDS5 = {
|
|
|
45978
46275
|
code: "Country code to pass as --location",
|
|
45979
46276
|
name: "Country name"
|
|
45980
46277
|
};
|
|
45981
|
-
var countriesCommand =
|
|
46278
|
+
var countriesCommand = defineCommand171({
|
|
45982
46279
|
meta: {
|
|
45983
46280
|
name: "countries",
|
|
45984
46281
|
description: "List all supported country codes for --location flag."
|
|
@@ -45989,7 +46286,7 @@ var countriesCommand = defineCommand170({
|
|
|
45989
46286
|
});
|
|
45990
46287
|
|
|
45991
46288
|
// src/commands/research/fetch.ts
|
|
45992
|
-
import { defineCommand as
|
|
46289
|
+
import { defineCommand as defineCommand172 } from "citty";
|
|
45993
46290
|
var CONTENT_PREVIEW_CHARS = 2e4;
|
|
45994
46291
|
var TIMEOUT_MS = 18e4;
|
|
45995
46292
|
registerSchema({
|
|
@@ -46062,7 +46359,7 @@ function fetchFix(code) {
|
|
|
46062
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."
|
|
46063
46360
|
};
|
|
46064
46361
|
}
|
|
46065
|
-
var fetchCommand =
|
|
46362
|
+
var fetchCommand = defineCommand172({
|
|
46066
46363
|
meta: {
|
|
46067
46364
|
name: "fetch",
|
|
46068
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.
|
|
@@ -46139,7 +46436,7 @@ Examples:
|
|
|
46139
46436
|
});
|
|
46140
46437
|
|
|
46141
46438
|
// src/commands/research/intent.ts
|
|
46142
|
-
import { defineCommand as
|
|
46439
|
+
import { defineCommand as defineCommand173 } from "citty";
|
|
46143
46440
|
registerSchema({
|
|
46144
46441
|
command: "research.intent",
|
|
46145
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.",
|
|
@@ -46162,7 +46459,7 @@ var FIELDS7 = {
|
|
|
46162
46459
|
intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
|
|
46163
46460
|
probability: "Confidence score 0.0-1.0"
|
|
46164
46461
|
};
|
|
46165
|
-
var intentCommand =
|
|
46462
|
+
var intentCommand = defineCommand173({
|
|
46166
46463
|
meta: {
|
|
46167
46464
|
name: "intent",
|
|
46168
46465
|
description: `Classify Google Search intent for keywords. Returns intent type and confidence.
|
|
@@ -46210,7 +46507,7 @@ Examples:
|
|
|
46210
46507
|
});
|
|
46211
46508
|
|
|
46212
46509
|
// src/commands/research/keyword-gap.ts
|
|
46213
|
-
import { defineCommand as
|
|
46510
|
+
import { defineCommand as defineCommand174 } from "citty";
|
|
46214
46511
|
registerSchema({
|
|
46215
46512
|
command: "research.keyword-gap",
|
|
46216
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.",
|
|
@@ -46239,7 +46536,7 @@ var FIELDS8 = {
|
|
|
46239
46536
|
cpc: "Cost per click USD",
|
|
46240
46537
|
their_position: "Competitor's ranking position"
|
|
46241
46538
|
};
|
|
46242
|
-
var keywordGapCommand =
|
|
46539
|
+
var keywordGapCommand = defineCommand174({
|
|
46243
46540
|
meta: {
|
|
46244
46541
|
name: "keyword-gap",
|
|
46245
46542
|
description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
|
|
@@ -46314,7 +46611,7 @@ Examples:
|
|
|
46314
46611
|
});
|
|
46315
46612
|
|
|
46316
46613
|
// src/commands/research/keywords-for-site.ts
|
|
46317
|
-
import { defineCommand as
|
|
46614
|
+
import { defineCommand as defineCommand175 } from "citty";
|
|
46318
46615
|
registerSchema({
|
|
46319
46616
|
command: "research.keywords-for-site",
|
|
46320
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.",
|
|
@@ -46347,7 +46644,7 @@ var FIELDS9 = {
|
|
|
46347
46644
|
competition: "LOW, MEDIUM, or HIGH",
|
|
46348
46645
|
competition_index: "Competition score 0-100"
|
|
46349
46646
|
};
|
|
46350
|
-
var keywordsForSiteCommand =
|
|
46647
|
+
var keywordsForSiteCommand = defineCommand175({
|
|
46351
46648
|
meta: {
|
|
46352
46649
|
name: "keywords-for-site",
|
|
46353
46650
|
description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
|
|
@@ -46409,7 +46706,7 @@ Examples:
|
|
|
46409
46706
|
});
|
|
46410
46707
|
|
|
46411
46708
|
// src/commands/research/languages.ts
|
|
46412
|
-
import { defineCommand as
|
|
46709
|
+
import { defineCommand as defineCommand176 } from "citty";
|
|
46413
46710
|
registerSchema({
|
|
46414
46711
|
command: "research.languages",
|
|
46415
46712
|
description: "List all supported language codes for --language flag in research commands.",
|
|
@@ -46439,7 +46736,7 @@ var FIELDS10 = {
|
|
|
46439
46736
|
code: "Language code to pass as --language",
|
|
46440
46737
|
name: "Language name (also accepted by --language)"
|
|
46441
46738
|
};
|
|
46442
|
-
var languagesCommand2 =
|
|
46739
|
+
var languagesCommand2 = defineCommand176({
|
|
46443
46740
|
meta: {
|
|
46444
46741
|
name: "languages",
|
|
46445
46742
|
description: "List all supported language codes for --language flag."
|
|
@@ -46450,7 +46747,7 @@ var languagesCommand2 = defineCommand175({
|
|
|
46450
46747
|
});
|
|
46451
46748
|
|
|
46452
46749
|
// src/commands/research/lighthouse.ts
|
|
46453
|
-
import { defineCommand as
|
|
46750
|
+
import { defineCommand as defineCommand177 } from "citty";
|
|
46454
46751
|
registerSchema({
|
|
46455
46752
|
command: "research.lighthouse",
|
|
46456
46753
|
description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
|
|
@@ -46469,7 +46766,7 @@ var FIELDS11 = {
|
|
|
46469
46766
|
speed_index_ms: "Speed Index in ms (good: < 3400)",
|
|
46470
46767
|
interactive_ms: "Time to Interactive in ms (good: < 3800)"
|
|
46471
46768
|
};
|
|
46472
|
-
var lighthouseCommand =
|
|
46769
|
+
var lighthouseCommand = defineCommand177({
|
|
46473
46770
|
meta: {
|
|
46474
46771
|
name: "lighthouse",
|
|
46475
46772
|
description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
|
|
@@ -46507,7 +46804,7 @@ Examples:
|
|
|
46507
46804
|
});
|
|
46508
46805
|
|
|
46509
46806
|
// src/commands/research/relevant-pages.ts
|
|
46510
|
-
import { defineCommand as
|
|
46807
|
+
import { defineCommand as defineCommand178 } from "citty";
|
|
46511
46808
|
registerSchema({
|
|
46512
46809
|
command: "research.relevant-pages",
|
|
46513
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).",
|
|
@@ -46533,7 +46830,7 @@ var FIELDS12 = {
|
|
|
46533
46830
|
keywords: "Total organic keywords the page ranks for",
|
|
46534
46831
|
top_10: "Keywords in positions 1-10"
|
|
46535
46832
|
};
|
|
46536
|
-
var relevantPagesCommand =
|
|
46833
|
+
var relevantPagesCommand = defineCommand178({
|
|
46537
46834
|
meta: {
|
|
46538
46835
|
name: "relevant-pages",
|
|
46539
46836
|
description: `Get the top pages of a competitor domain with traffic data.
|
|
@@ -46580,7 +46877,7 @@ Examples:
|
|
|
46580
46877
|
});
|
|
46581
46878
|
|
|
46582
46879
|
// src/commands/research/web.ts
|
|
46583
|
-
import { defineCommand as
|
|
46880
|
+
import { defineCommand as defineCommand179 } from "citty";
|
|
46584
46881
|
registerSchema({
|
|
46585
46882
|
command: "research.web",
|
|
46586
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).",
|
|
@@ -46631,7 +46928,7 @@ async function runDeepResearch(question) {
|
|
|
46631
46928
|
}
|
|
46632
46929
|
throw new Error("Deep research timed out");
|
|
46633
46930
|
}
|
|
46634
|
-
var webCommand =
|
|
46931
|
+
var webCommand = defineCommand179({
|
|
46635
46932
|
meta: {
|
|
46636
46933
|
name: "web",
|
|
46637
46934
|
description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
|
|
@@ -46693,7 +46990,7 @@ Examples:
|
|
|
46693
46990
|
});
|
|
46694
46991
|
|
|
46695
46992
|
// src/commands/research/index.ts
|
|
46696
|
-
var researchCommand =
|
|
46993
|
+
var researchCommand = defineCommand180({
|
|
46697
46994
|
meta: {
|
|
46698
46995
|
name: "research",
|
|
46699
46996
|
description: `Competitive intelligence and AI-powered research commands.
|
|
@@ -46737,10 +47034,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
|
|
|
46737
47034
|
});
|
|
46738
47035
|
|
|
46739
47036
|
// src/commands/scheduled-actions/index.ts
|
|
46740
|
-
import { defineCommand as
|
|
47037
|
+
import { defineCommand as defineCommand188 } from "citty";
|
|
46741
47038
|
|
|
46742
47039
|
// src/commands/scheduled-actions/create.ts
|
|
46743
|
-
import { defineCommand as
|
|
47040
|
+
import { defineCommand as defineCommand181 } from "citty";
|
|
46744
47041
|
|
|
46745
47042
|
// src/commands/scheduled-actions/shared.ts
|
|
46746
47043
|
var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
|
|
@@ -46887,7 +47184,7 @@ registerSchema({
|
|
|
46887
47184
|
}
|
|
46888
47185
|
}
|
|
46889
47186
|
});
|
|
46890
|
-
var createCommand3 =
|
|
47187
|
+
var createCommand3 = defineCommand181({
|
|
46891
47188
|
meta: {
|
|
46892
47189
|
name: "create",
|
|
46893
47190
|
description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
|
|
@@ -46946,7 +47243,7 @@ var createCommand3 = defineCommand180({
|
|
|
46946
47243
|
});
|
|
46947
47244
|
|
|
46948
47245
|
// src/commands/scheduled-actions/delete.ts
|
|
46949
|
-
import { defineCommand as
|
|
47246
|
+
import { defineCommand as defineCommand182 } from "citty";
|
|
46950
47247
|
registerSchema({
|
|
46951
47248
|
command: "scheduled-actions.delete",
|
|
46952
47249
|
description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
|
|
@@ -46954,7 +47251,7 @@ registerSchema({
|
|
|
46954
47251
|
id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
|
|
46955
47252
|
}
|
|
46956
47253
|
});
|
|
46957
|
-
var deleteCommand3 =
|
|
47254
|
+
var deleteCommand3 = defineCommand182({
|
|
46958
47255
|
meta: {
|
|
46959
47256
|
name: "delete",
|
|
46960
47257
|
description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
|
|
@@ -46983,7 +47280,7 @@ var deleteCommand3 = defineCommand181({
|
|
|
46983
47280
|
});
|
|
46984
47281
|
|
|
46985
47282
|
// src/commands/scheduled-actions/get.ts
|
|
46986
|
-
import { defineCommand as
|
|
47283
|
+
import { defineCommand as defineCommand183 } from "citty";
|
|
46987
47284
|
registerSchema({
|
|
46988
47285
|
command: "scheduled-actions.get",
|
|
46989
47286
|
description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
|
|
@@ -46992,7 +47289,7 @@ registerSchema({
|
|
|
46992
47289
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
46993
47290
|
}
|
|
46994
47291
|
});
|
|
46995
|
-
var getCommand4 =
|
|
47292
|
+
var getCommand4 = defineCommand183({
|
|
46996
47293
|
meta: {
|
|
46997
47294
|
name: "get",
|
|
46998
47295
|
description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
|
|
@@ -47031,7 +47328,7 @@ var getCommand4 = defineCommand182({
|
|
|
47031
47328
|
});
|
|
47032
47329
|
|
|
47033
47330
|
// src/commands/scheduled-actions/list.ts
|
|
47034
|
-
import { defineCommand as
|
|
47331
|
+
import { defineCommand as defineCommand184 } from "citty";
|
|
47035
47332
|
registerSchema({
|
|
47036
47333
|
command: "scheduled-actions.list",
|
|
47037
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.",
|
|
@@ -47039,7 +47336,7 @@ registerSchema({
|
|
|
47039
47336
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
47040
47337
|
}
|
|
47041
47338
|
});
|
|
47042
|
-
var listCommand15 =
|
|
47339
|
+
var listCommand15 = defineCommand184({
|
|
47043
47340
|
meta: {
|
|
47044
47341
|
name: "list",
|
|
47045
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."
|
|
@@ -47064,7 +47361,7 @@ var listCommand15 = defineCommand183({
|
|
|
47064
47361
|
// src/commands/scheduled-actions/templates.ts
|
|
47065
47362
|
import { readFile as readFile24 } from "fs/promises";
|
|
47066
47363
|
import path37 from "path";
|
|
47067
|
-
import { defineCommand as
|
|
47364
|
+
import { defineCommand as defineCommand185 } from "citty";
|
|
47068
47365
|
registerSchema({
|
|
47069
47366
|
command: "scheduled-actions.templates",
|
|
47070
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.",
|
|
@@ -47119,7 +47416,7 @@ registerSchema({
|
|
|
47119
47416
|
}
|
|
47120
47417
|
}
|
|
47121
47418
|
});
|
|
47122
|
-
var templatesCommand =
|
|
47419
|
+
var templatesCommand = defineCommand185({
|
|
47123
47420
|
meta: {
|
|
47124
47421
|
name: "templates",
|
|
47125
47422
|
description: `The recipes this company can run \u2014 Baker's own plus theirs, with what each one produces.
|
|
@@ -47211,7 +47508,7 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
|
47211
47508
|
});
|
|
47212
47509
|
|
|
47213
47510
|
// src/commands/scheduled-actions/trigger.ts
|
|
47214
|
-
import { defineCommand as
|
|
47511
|
+
import { defineCommand as defineCommand186 } from "citty";
|
|
47215
47512
|
registerSchema({
|
|
47216
47513
|
command: "scheduled-actions.trigger",
|
|
47217
47514
|
description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
|
|
@@ -47219,7 +47516,7 @@ registerSchema({
|
|
|
47219
47516
|
id: { type: "string", description: "Published scheduled action ID", required: true }
|
|
47220
47517
|
}
|
|
47221
47518
|
});
|
|
47222
|
-
var triggerCommand =
|
|
47519
|
+
var triggerCommand = defineCommand186({
|
|
47223
47520
|
meta: {
|
|
47224
47521
|
name: "trigger",
|
|
47225
47522
|
description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
|
|
@@ -47256,7 +47553,7 @@ var triggerCommand = defineCommand185({
|
|
|
47256
47553
|
});
|
|
47257
47554
|
|
|
47258
47555
|
// src/commands/scheduled-actions/update.ts
|
|
47259
|
-
import { defineCommand as
|
|
47556
|
+
import { defineCommand as defineCommand187 } from "citty";
|
|
47260
47557
|
registerSchema({
|
|
47261
47558
|
command: "scheduled-actions.update",
|
|
47262
47559
|
description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
|
|
@@ -47287,7 +47584,7 @@ registerSchema({
|
|
|
47287
47584
|
prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
|
|
47288
47585
|
}
|
|
47289
47586
|
});
|
|
47290
|
-
var updateCommand3 =
|
|
47587
|
+
var updateCommand3 = defineCommand187({
|
|
47291
47588
|
meta: {
|
|
47292
47589
|
name: "update",
|
|
47293
47590
|
description: "Stage a scheduled action update. Examples: baker scheduled-actions update <id> --enabled false | baker scheduled-actions update <id> --mode publish"
|
|
@@ -47365,7 +47662,7 @@ var updateCommand3 = defineCommand186({
|
|
|
47365
47662
|
});
|
|
47366
47663
|
|
|
47367
47664
|
// src/commands/scheduled-actions/index.ts
|
|
47368
|
-
var scheduledActionsCommand =
|
|
47665
|
+
var scheduledActionsCommand = defineCommand188({
|
|
47369
47666
|
meta: {
|
|
47370
47667
|
name: "scheduled-actions",
|
|
47371
47668
|
description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger, templates.
|
|
@@ -47394,14 +47691,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
|
|
|
47394
47691
|
});
|
|
47395
47692
|
|
|
47396
47693
|
// src/commands/schema.ts
|
|
47397
|
-
import { defineCommand as
|
|
47694
|
+
import { defineCommand as defineCommand189 } from "citty";
|
|
47398
47695
|
function narrowToFamily(commandName, available) {
|
|
47399
47696
|
const segments = commandName.split(".");
|
|
47400
47697
|
const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
|
|
47401
47698
|
const siblings = available.filter((name) => name.startsWith(prefix));
|
|
47402
47699
|
return siblings.length > 0 ? siblings : available;
|
|
47403
47700
|
}
|
|
47404
|
-
var schemaCommand2 =
|
|
47701
|
+
var schemaCommand2 = defineCommand189({
|
|
47405
47702
|
meta: {
|
|
47406
47703
|
name: "schema",
|
|
47407
47704
|
description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
|
|
@@ -47445,10 +47742,10 @@ var schemaCommand2 = defineCommand188({
|
|
|
47445
47742
|
});
|
|
47446
47743
|
|
|
47447
47744
|
// src/commands/studio/index.ts
|
|
47448
|
-
import { defineCommand as
|
|
47745
|
+
import { defineCommand as defineCommand198 } from "citty";
|
|
47449
47746
|
|
|
47450
47747
|
// src/commands/studio/animate.ts
|
|
47451
|
-
import { defineCommand as
|
|
47748
|
+
import { defineCommand as defineCommand190 } from "citty";
|
|
47452
47749
|
|
|
47453
47750
|
// src/commands/studio/batch.ts
|
|
47454
47751
|
function projectBatch(generation, full) {
|
|
@@ -47899,7 +48196,7 @@ function costHintsFor(body) {
|
|
|
47899
48196
|
}
|
|
47900
48197
|
return hints;
|
|
47901
48198
|
}
|
|
47902
|
-
var animateCommand =
|
|
48199
|
+
var animateCommand = defineCommand190({
|
|
47903
48200
|
meta: {
|
|
47904
48201
|
name: "animate",
|
|
47905
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"
|
|
@@ -48018,7 +48315,7 @@ var animateCommand = defineCommand189({
|
|
|
48018
48315
|
});
|
|
48019
48316
|
|
|
48020
48317
|
// src/commands/studio/generate.ts
|
|
48021
|
-
import { defineCommand as
|
|
48318
|
+
import { defineCommand as defineCommand191 } from "citty";
|
|
48022
48319
|
var MODEL_LIST2 = IMAGE_MODEL_IDS;
|
|
48023
48320
|
var DEFAULT_MAX_WAIT_MS2 = 24e4;
|
|
48024
48321
|
registerSchema({
|
|
@@ -48154,7 +48451,7 @@ function buildGenerateBody(args, prompt) {
|
|
|
48154
48451
|
}
|
|
48155
48452
|
return body;
|
|
48156
48453
|
}
|
|
48157
|
-
var generateCommand =
|
|
48454
|
+
var generateCommand = defineCommand191({
|
|
48158
48455
|
meta: {
|
|
48159
48456
|
name: "generate",
|
|
48160
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]]'"
|
|
@@ -48232,7 +48529,7 @@ var generateCommand = defineCommand190({
|
|
|
48232
48529
|
});
|
|
48233
48530
|
|
|
48234
48531
|
// src/commands/studio/get.ts
|
|
48235
|
-
import { defineCommand as
|
|
48532
|
+
import { defineCommand as defineCommand192 } from "citty";
|
|
48236
48533
|
registerSchema({
|
|
48237
48534
|
command: "studio.get",
|
|
48238
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.",
|
|
@@ -48241,7 +48538,7 @@ registerSchema({
|
|
|
48241
48538
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
48242
48539
|
}
|
|
48243
48540
|
});
|
|
48244
|
-
var getCommand5 =
|
|
48541
|
+
var getCommand5 = defineCommand192({
|
|
48245
48542
|
meta: {
|
|
48246
48543
|
name: "get",
|
|
48247
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"
|
|
@@ -48270,7 +48567,7 @@ var getCommand5 = defineCommand191({
|
|
|
48270
48567
|
});
|
|
48271
48568
|
|
|
48272
48569
|
// src/commands/studio/improve.ts
|
|
48273
|
-
import { defineCommand as
|
|
48570
|
+
import { defineCommand as defineCommand193 } from "citty";
|
|
48274
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.";
|
|
48275
48572
|
registerSchema({
|
|
48276
48573
|
command: "studio.improve",
|
|
@@ -48295,7 +48592,7 @@ registerSchema({
|
|
|
48295
48592
|
}
|
|
48296
48593
|
}
|
|
48297
48594
|
});
|
|
48298
|
-
var improveCommand =
|
|
48595
|
+
var improveCommand = defineCommand193({
|
|
48299
48596
|
meta: {
|
|
48300
48597
|
name: "improve",
|
|
48301
48598
|
description: `${DESCRIPTION}
|
|
@@ -48339,7 +48636,7 @@ Examples:
|
|
|
48339
48636
|
});
|
|
48340
48637
|
|
|
48341
48638
|
// src/commands/studio/keep.ts
|
|
48342
|
-
import { defineCommand as
|
|
48639
|
+
import { defineCommand as defineCommand194 } from "citty";
|
|
48343
48640
|
registerSchema({
|
|
48344
48641
|
command: "studio.keep",
|
|
48345
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.",
|
|
@@ -48349,7 +48646,7 @@ registerSchema({
|
|
|
48349
48646
|
undo: { type: "boolean", description: "Un-star an image, or take a kept clip back out", required: false }
|
|
48350
48647
|
}
|
|
48351
48648
|
});
|
|
48352
|
-
var keepCommand =
|
|
48649
|
+
var keepCommand = defineCommand194({
|
|
48353
48650
|
meta: {
|
|
48354
48651
|
name: "keep",
|
|
48355
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"
|
|
@@ -48400,7 +48697,7 @@ var keepCommand = defineCommand193({
|
|
|
48400
48697
|
});
|
|
48401
48698
|
|
|
48402
48699
|
// src/commands/studio/list.ts
|
|
48403
|
-
import { defineCommand as
|
|
48700
|
+
import { defineCommand as defineCommand195 } from "citty";
|
|
48404
48701
|
registerSchema({
|
|
48405
48702
|
command: "studio.list",
|
|
48406
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.",
|
|
@@ -48411,7 +48708,7 @@ registerSchema({
|
|
|
48411
48708
|
full: { type: "boolean", description: "Include settings, references and attribution", required: false }
|
|
48412
48709
|
}
|
|
48413
48710
|
});
|
|
48414
|
-
var listCommand16 =
|
|
48711
|
+
var listCommand16 = defineCommand195({
|
|
48415
48712
|
meta: {
|
|
48416
48713
|
name: "list",
|
|
48417
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"
|
|
@@ -48445,7 +48742,7 @@ var listCommand16 = defineCommand194({
|
|
|
48445
48742
|
});
|
|
48446
48743
|
|
|
48447
48744
|
// src/commands/studio/models.ts
|
|
48448
|
-
import { defineCommand as
|
|
48745
|
+
import { defineCommand as defineCommand196 } from "citty";
|
|
48449
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.";
|
|
48450
48747
|
registerSchema({
|
|
48451
48748
|
command: "studio.models",
|
|
@@ -48532,7 +48829,7 @@ function buildModelCards(kind, model) {
|
|
|
48532
48829
|
const selected = model ? ids.filter((id) => id === model) : ids;
|
|
48533
48830
|
return selected.map((id) => build(id));
|
|
48534
48831
|
}
|
|
48535
|
-
var modelsCommand =
|
|
48832
|
+
var modelsCommand = defineCommand196({
|
|
48536
48833
|
meta: {
|
|
48537
48834
|
name: "models",
|
|
48538
48835
|
description: `${DESCRIPTION2}
|
|
@@ -48579,13 +48876,13 @@ Examples:
|
|
|
48579
48876
|
});
|
|
48580
48877
|
|
|
48581
48878
|
// src/commands/studio/skills.ts
|
|
48582
|
-
import { defineCommand as
|
|
48879
|
+
import { defineCommand as defineCommand197 } from "citty";
|
|
48583
48880
|
registerSchema({
|
|
48584
48881
|
command: "studio.skills",
|
|
48585
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.",
|
|
48586
48883
|
args: {}
|
|
48587
48884
|
});
|
|
48588
|
-
var skillsCommand =
|
|
48885
|
+
var skillsCommand = defineCommand197({
|
|
48589
48886
|
meta: {
|
|
48590
48887
|
name: "skills",
|
|
48591
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"
|
|
@@ -48609,7 +48906,7 @@ var skillsCommand = defineCommand196({
|
|
|
48609
48906
|
});
|
|
48610
48907
|
|
|
48611
48908
|
// src/commands/studio/index.ts
|
|
48612
|
-
var studioCommand =
|
|
48909
|
+
var studioCommand = defineCommand198({
|
|
48613
48910
|
meta: {
|
|
48614
48911
|
name: "studio",
|
|
48615
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.
|
|
@@ -48652,10 +48949,10 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
|
|
|
48652
48949
|
});
|
|
48653
48950
|
|
|
48654
48951
|
// src/commands/tag-manager/index.ts
|
|
48655
|
-
import { defineCommand as
|
|
48952
|
+
import { defineCommand as defineCommand202 } from "citty";
|
|
48656
48953
|
|
|
48657
48954
|
// src/commands/tag-manager/draft.ts
|
|
48658
|
-
import { defineCommand as
|
|
48955
|
+
import { defineCommand as defineCommand199 } from "citty";
|
|
48659
48956
|
|
|
48660
48957
|
// src/commands/tag-manager/shared.ts
|
|
48661
48958
|
import { readFileSync as readFileSync15 } from "fs";
|
|
@@ -48778,13 +49075,13 @@ registerSchema({
|
|
|
48778
49075
|
chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
|
|
48779
49076
|
}
|
|
48780
49077
|
});
|
|
48781
|
-
var draftCommand4 =
|
|
49078
|
+
var draftCommand4 = defineCommand199({
|
|
48782
49079
|
meta: {
|
|
48783
49080
|
name: "draft",
|
|
48784
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."
|
|
48785
49082
|
},
|
|
48786
49083
|
subCommands: {
|
|
48787
|
-
list:
|
|
49084
|
+
list: defineCommand199({
|
|
48788
49085
|
meta: {
|
|
48789
49086
|
name: "list",
|
|
48790
49087
|
description: "Review everything staged on this chat (--json for the raw envelope)"
|
|
@@ -48797,7 +49094,7 @@ var draftCommand4 = defineCommand198({
|
|
|
48797
49094
|
await draftList2(args.json === true, args.chat);
|
|
48798
49095
|
}
|
|
48799
49096
|
}),
|
|
48800
|
-
show:
|
|
49097
|
+
show: defineCommand199({
|
|
48801
49098
|
meta: {
|
|
48802
49099
|
name: "show",
|
|
48803
49100
|
description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
|
|
@@ -48814,7 +49111,7 @@ var draftCommand4 = defineCommand198({
|
|
|
48814
49111
|
);
|
|
48815
49112
|
}
|
|
48816
49113
|
}),
|
|
48817
|
-
amend:
|
|
49114
|
+
amend: defineCommand199({
|
|
48818
49115
|
meta: {
|
|
48819
49116
|
name: "amend",
|
|
48820
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."
|
|
@@ -48831,7 +49128,7 @@ var draftCommand4 = defineCommand198({
|
|
|
48831
49128
|
});
|
|
48832
49129
|
}
|
|
48833
49130
|
}),
|
|
48834
|
-
remove:
|
|
49131
|
+
remove: defineCommand199({
|
|
48835
49132
|
meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
|
|
48836
49133
|
args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
|
|
48837
49134
|
run: async ({ args }) => {
|
|
@@ -48840,7 +49137,7 @@ var draftCommand4 = defineCommand198({
|
|
|
48840
49137
|
});
|
|
48841
49138
|
}
|
|
48842
49139
|
}),
|
|
48843
|
-
clear:
|
|
49140
|
+
clear: defineCommand199({
|
|
48844
49141
|
meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
|
|
48845
49142
|
run: async () => {
|
|
48846
49143
|
await draftAction3("/api/tag-manager/draft/clear", {});
|
|
@@ -48850,7 +49147,7 @@ var draftCommand4 = defineCommand198({
|
|
|
48850
49147
|
});
|
|
48851
49148
|
|
|
48852
49149
|
// src/commands/tag-manager/read.ts
|
|
48853
|
-
import { defineCommand as
|
|
49150
|
+
import { defineCommand as defineCommand200 } from "citty";
|
|
48854
49151
|
registerSchema({
|
|
48855
49152
|
command: "tagManager.containers",
|
|
48856
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.",
|
|
@@ -48891,7 +49188,7 @@ function containersHints(containers) {
|
|
|
48891
49188
|
}))
|
|
48892
49189
|
});
|
|
48893
49190
|
}
|
|
48894
|
-
var containersCommand =
|
|
49191
|
+
var containersCommand = defineCommand200({
|
|
48895
49192
|
meta: {
|
|
48896
49193
|
name: "containers",
|
|
48897
49194
|
description: `List Tag Manager containers reachable by this company's connection.
|
|
@@ -48908,7 +49205,7 @@ Start here:
|
|
|
48908
49205
|
}
|
|
48909
49206
|
}
|
|
48910
49207
|
});
|
|
48911
|
-
var readCommand =
|
|
49208
|
+
var readCommand = defineCommand200({
|
|
48912
49209
|
meta: {
|
|
48913
49210
|
name: "read",
|
|
48914
49211
|
description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
|
|
@@ -48950,7 +49247,7 @@ Examples:
|
|
|
48950
49247
|
});
|
|
48951
49248
|
|
|
48952
49249
|
// src/commands/tag-manager/write-commands.ts
|
|
48953
|
-
import { defineCommand as
|
|
49250
|
+
import { defineCommand as defineCommand201 } from "citty";
|
|
48954
49251
|
var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
|
|
48955
49252
|
var ENTITIES = [
|
|
48956
49253
|
{
|
|
@@ -49006,10 +49303,10 @@ for (const { entity, noun, createHint } of ENTITIES) {
|
|
|
49006
49303
|
});
|
|
49007
49304
|
}
|
|
49008
49305
|
function entityCommand(entity, noun, example) {
|
|
49009
|
-
return
|
|
49306
|
+
return defineCommand201({
|
|
49010
49307
|
meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
|
|
49011
49308
|
subCommands: {
|
|
49012
|
-
create:
|
|
49309
|
+
create: defineCommand201({
|
|
49013
49310
|
meta: {
|
|
49014
49311
|
name: "create",
|
|
49015
49312
|
description: `Stage a new ${noun}
|
|
@@ -49031,7 +49328,7 @@ Examples:
|
|
|
49031
49328
|
});
|
|
49032
49329
|
}
|
|
49033
49330
|
}),
|
|
49034
|
-
update:
|
|
49331
|
+
update: defineCommand201({
|
|
49035
49332
|
meta: {
|
|
49036
49333
|
name: "update",
|
|
49037
49334
|
description: `Stage an update to an existing ${noun} (pass its id or path)`
|
|
@@ -49051,7 +49348,7 @@ Examples:
|
|
|
49051
49348
|
});
|
|
49052
49349
|
}
|
|
49053
49350
|
}),
|
|
49054
|
-
delete:
|
|
49351
|
+
delete: defineCommand201({
|
|
49055
49352
|
meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
|
|
49056
49353
|
args: {
|
|
49057
49354
|
id: { type: "positional", description: `${noun} id or path`, required: false },
|
|
@@ -49092,7 +49389,7 @@ function builtinTypes(args) {
|
|
|
49092
49389
|
}
|
|
49093
49390
|
return raw.split(",").map((entry) => entry.trim());
|
|
49094
49391
|
}
|
|
49095
|
-
var builtinCommand =
|
|
49392
|
+
var builtinCommand = defineCommand201({
|
|
49096
49393
|
meta: {
|
|
49097
49394
|
name: "builtin",
|
|
49098
49395
|
description: `Enable or disable built-in variables
|
|
@@ -49102,7 +49399,7 @@ Examples:
|
|
|
49102
49399
|
baker tag-manager builtin disable --types formId`
|
|
49103
49400
|
},
|
|
49104
49401
|
subCommands: {
|
|
49105
|
-
enable:
|
|
49402
|
+
enable: defineCommand201({
|
|
49106
49403
|
meta: { name: "enable", description: "Stage enabling built-in variables" },
|
|
49107
49404
|
args: {
|
|
49108
49405
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -49116,7 +49413,7 @@ Examples:
|
|
|
49116
49413
|
});
|
|
49117
49414
|
}
|
|
49118
49415
|
}),
|
|
49119
|
-
disable:
|
|
49416
|
+
disable: defineCommand201({
|
|
49120
49417
|
meta: { name: "disable", description: "Stage disabling built-in variables" },
|
|
49121
49418
|
args: {
|
|
49122
49419
|
types: { type: "string", description: "Comma-separated types", required: false },
|
|
@@ -49134,7 +49431,7 @@ Examples:
|
|
|
49134
49431
|
});
|
|
49135
49432
|
|
|
49136
49433
|
// src/commands/tag-manager/index.ts
|
|
49137
|
-
var tagManagerCommand =
|
|
49434
|
+
var tagManagerCommand = defineCommand202({
|
|
49138
49435
|
meta: {
|
|
49139
49436
|
name: "tag-manager",
|
|
49140
49437
|
description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
|
|
@@ -49171,7 +49468,7 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
|
|
|
49171
49468
|
});
|
|
49172
49469
|
|
|
49173
49470
|
// src/commands/tags/index.ts
|
|
49174
|
-
import { defineCommand as
|
|
49471
|
+
import { defineCommand as defineCommand203 } from "citty";
|
|
49175
49472
|
|
|
49176
49473
|
// src/commands/tags/shared.ts
|
|
49177
49474
|
function failApi3(err) {
|
|
@@ -49240,7 +49537,7 @@ async function listTags(json) {
|
|
|
49240
49537
|
var listArgs9 = {
|
|
49241
49538
|
json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
|
|
49242
49539
|
};
|
|
49243
|
-
var listCommand17 =
|
|
49540
|
+
var listCommand17 = defineCommand203({
|
|
49244
49541
|
meta: {
|
|
49245
49542
|
name: "list",
|
|
49246
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"
|
|
@@ -49259,7 +49556,7 @@ async function listDraft3(chat) {
|
|
|
49259
49556
|
failApi3(err);
|
|
49260
49557
|
}
|
|
49261
49558
|
}
|
|
49262
|
-
var draftCommand5 =
|
|
49559
|
+
var draftCommand5 = defineCommand203({
|
|
49263
49560
|
meta: {
|
|
49264
49561
|
name: "draft",
|
|
49265
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."
|
|
@@ -49269,7 +49566,7 @@ var draftCommand5 = defineCommand202({
|
|
|
49269
49566
|
await listDraft3(args.chat);
|
|
49270
49567
|
}
|
|
49271
49568
|
});
|
|
49272
|
-
var tagsCommand4 =
|
|
49569
|
+
var tagsCommand4 = defineCommand203({
|
|
49273
49570
|
meta: {
|
|
49274
49571
|
name: "tags",
|
|
49275
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.
|
|
@@ -49298,10 +49595,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
|
|
|
49298
49595
|
});
|
|
49299
49596
|
|
|
49300
49597
|
// src/commands/testimonials/index.ts
|
|
49301
|
-
import { defineCommand as
|
|
49598
|
+
import { defineCommand as defineCommand207 } from "citty";
|
|
49302
49599
|
|
|
49303
49600
|
// src/commands/testimonials/get.ts
|
|
49304
|
-
import { defineCommand as
|
|
49601
|
+
import { defineCommand as defineCommand204 } from "citty";
|
|
49305
49602
|
registerSchema({
|
|
49306
49603
|
command: "testimonials.get",
|
|
49307
49604
|
description: "Get a single testimonial by ID",
|
|
@@ -49309,7 +49606,7 @@ registerSchema({
|
|
|
49309
49606
|
id: { type: "string", description: "Testimonial ID", required: true }
|
|
49310
49607
|
}
|
|
49311
49608
|
});
|
|
49312
|
-
var getCommand6 =
|
|
49609
|
+
var getCommand6 = defineCommand204({
|
|
49313
49610
|
meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
|
|
49314
49611
|
args: {
|
|
49315
49612
|
id: { type: "positional", description: "Testimonial ID", required: false },
|
|
@@ -49346,7 +49643,7 @@ var getCommand6 = defineCommand203({
|
|
|
49346
49643
|
});
|
|
49347
49644
|
|
|
49348
49645
|
// src/commands/testimonials/list.ts
|
|
49349
|
-
import { defineCommand as
|
|
49646
|
+
import { defineCommand as defineCommand205 } from "citty";
|
|
49350
49647
|
|
|
49351
49648
|
// src/commands/testimonials/emptyCorpusHints.ts
|
|
49352
49649
|
function resolveEmptyReason({
|
|
@@ -49481,7 +49778,7 @@ function buildListParams(args) {
|
|
|
49481
49778
|
}
|
|
49482
49779
|
return params;
|
|
49483
49780
|
}
|
|
49484
|
-
var listCommand18 =
|
|
49781
|
+
var listCommand18 = defineCommand205({
|
|
49485
49782
|
meta: {
|
|
49486
49783
|
name: "list",
|
|
49487
49784
|
description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
|
|
@@ -49533,7 +49830,7 @@ var listCommand18 = defineCommand204({
|
|
|
49533
49830
|
});
|
|
49534
49831
|
|
|
49535
49832
|
// src/commands/testimonials/search.ts
|
|
49536
|
-
import { defineCommand as
|
|
49833
|
+
import { defineCommand as defineCommand206 } from "citty";
|
|
49537
49834
|
var FILTER_FLAGS2 = ["source", "rating-min", "rating-max", "status", "sentiment", "language", "tags"];
|
|
49538
49835
|
function languageBiasHint(results, requestedLanguage) {
|
|
49539
49836
|
if (requestedLanguage) {
|
|
@@ -49612,7 +49909,7 @@ function buildSearchRequest(query, args) {
|
|
|
49612
49909
|
}
|
|
49613
49910
|
return body;
|
|
49614
49911
|
}
|
|
49615
|
-
var searchCommand3 =
|
|
49912
|
+
var searchCommand3 = defineCommand206({
|
|
49616
49913
|
meta: {
|
|
49617
49914
|
name: "search",
|
|
49618
49915
|
description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
|
|
@@ -49676,7 +49973,7 @@ var searchCommand3 = defineCommand205({
|
|
|
49676
49973
|
var tagsCommand5 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
|
|
49677
49974
|
|
|
49678
49975
|
// src/commands/testimonials/index.ts
|
|
49679
|
-
var testimonialsCommand =
|
|
49976
|
+
var testimonialsCommand = defineCommand207({
|
|
49680
49977
|
meta: {
|
|
49681
49978
|
name: "testimonials",
|
|
49682
49979
|
description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
|
|
@@ -49698,10 +49995,10 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
|
|
|
49698
49995
|
});
|
|
49699
49996
|
|
|
49700
49997
|
// src/commands/videos/index.ts
|
|
49701
|
-
import { defineCommand as
|
|
49998
|
+
import { defineCommand as defineCommand214 } from "citty";
|
|
49702
49999
|
|
|
49703
50000
|
// src/commands/videos/delete.ts
|
|
49704
|
-
import { defineCommand as
|
|
50001
|
+
import { defineCommand as defineCommand208 } from "citty";
|
|
49705
50002
|
registerSchema({
|
|
49706
50003
|
command: "videos.delete",
|
|
49707
50004
|
description: "Delete a video by ID",
|
|
@@ -49715,7 +50012,7 @@ registerSchema({
|
|
|
49715
50012
|
}
|
|
49716
50013
|
}
|
|
49717
50014
|
});
|
|
49718
|
-
var deleteCommand4 =
|
|
50015
|
+
var deleteCommand4 = defineCommand208({
|
|
49719
50016
|
meta: {
|
|
49720
50017
|
name: "delete",
|
|
49721
50018
|
description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
|
|
@@ -49756,7 +50053,7 @@ var deleteCommand4 = defineCommand207({
|
|
|
49756
50053
|
});
|
|
49757
50054
|
|
|
49758
50055
|
// src/commands/videos/get.ts
|
|
49759
|
-
import { defineCommand as
|
|
50056
|
+
import { defineCommand as defineCommand209 } from "citty";
|
|
49760
50057
|
registerSchema({
|
|
49761
50058
|
command: "videos.get",
|
|
49762
50059
|
description: "Get a single video by ID",
|
|
@@ -49764,7 +50061,7 @@ registerSchema({
|
|
|
49764
50061
|
id: { type: "string", description: "Video ID", required: true }
|
|
49765
50062
|
}
|
|
49766
50063
|
});
|
|
49767
|
-
var getCommand7 =
|
|
50064
|
+
var getCommand7 = defineCommand209({
|
|
49768
50065
|
meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
|
|
49769
50066
|
args: {
|
|
49770
50067
|
id: { type: "positional", description: "Video ID", required: false },
|
|
@@ -49801,7 +50098,7 @@ var getCommand7 = defineCommand208({
|
|
|
49801
50098
|
});
|
|
49802
50099
|
|
|
49803
50100
|
// src/commands/videos/group.ts
|
|
49804
|
-
import { defineCommand as
|
|
50101
|
+
import { defineCommand as defineCommand210 } from "citty";
|
|
49805
50102
|
registerSchema({
|
|
49806
50103
|
command: "videos.group",
|
|
49807
50104
|
description: "List every clip and image that arrived in the same set as this video (carousel slides, one page)",
|
|
@@ -49810,7 +50107,7 @@ registerSchema({
|
|
|
49810
50107
|
"group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
|
|
49811
50108
|
}
|
|
49812
50109
|
});
|
|
49813
|
-
var groupCommand2 =
|
|
50110
|
+
var groupCommand2 = defineCommand210({
|
|
49814
50111
|
meta: {
|
|
49815
50112
|
name: "group",
|
|
49816
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>"
|
|
@@ -49833,7 +50130,7 @@ var groupCommand2 = defineCommand209({
|
|
|
49833
50130
|
import { mkdtemp as mkdtemp2, rm as rm7, stat as stat7 } from "fs/promises";
|
|
49834
50131
|
import { tmpdir as tmpdir3 } from "os";
|
|
49835
50132
|
import path38 from "path";
|
|
49836
|
-
import { defineCommand as
|
|
50133
|
+
import { defineCommand as defineCommand211 } from "citty";
|
|
49837
50134
|
|
|
49838
50135
|
// src/lib/streamUpload.ts
|
|
49839
50136
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -49997,7 +50294,7 @@ registerSchema({
|
|
|
49997
50294
|
"dry-run": { type: "boolean", description: "Preview the operation without executing", required: false }
|
|
49998
50295
|
}
|
|
49999
50296
|
});
|
|
50000
|
-
var ingestCommand2 =
|
|
50297
|
+
var ingestCommand2 = defineCommand211({
|
|
50001
50298
|
meta: {
|
|
50002
50299
|
name: "ingest",
|
|
50003
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"
|
|
@@ -50113,35 +50410,35 @@ async function ingestByRoute(args, direct, country) {
|
|
|
50113
50410
|
function reportYtDlpFailure(err) {
|
|
50114
50411
|
const detail = `${err.stderrTail} ${err.message}`;
|
|
50115
50412
|
if (isProxyFailure(ytDlpBlockSignal(detail))) {
|
|
50116
|
-
|
|
50413
|
+
fail8(
|
|
50117
50414
|
"Couldn't download that video: our connection to the internet was refused.",
|
|
50118
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."
|
|
50119
50416
|
);
|
|
50120
50417
|
}
|
|
50121
50418
|
if (isDrmProtected(detail)) {
|
|
50122
|
-
|
|
50419
|
+
fail8(
|
|
50123
50420
|
"That video is copy-protected, so it can't be added to the library.",
|
|
50124
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>`."
|
|
50125
50422
|
);
|
|
50126
50423
|
}
|
|
50127
50424
|
if (isVimeoAuthFailure(detail)) {
|
|
50128
|
-
|
|
50425
|
+
fail8(
|
|
50129
50426
|
"Vimeo wouldn't hand over that video \u2014 Baker isn't signed in to Vimeo.",
|
|
50130
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>`."
|
|
50131
50428
|
);
|
|
50132
50429
|
}
|
|
50133
50430
|
if (isRegionBlocked(detail)) {
|
|
50134
|
-
|
|
50431
|
+
fail8(
|
|
50135
50432
|
`That video isn't available in the region we're fetching from. ${err.stderrTail || err.message}`,
|
|
50136
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."
|
|
50137
50434
|
);
|
|
50138
50435
|
}
|
|
50139
|
-
|
|
50436
|
+
fail8(
|
|
50140
50437
|
`Couldn't download that video. ${err.stderrTail || err.message}`,
|
|
50141
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>`."
|
|
50142
50439
|
);
|
|
50143
50440
|
}
|
|
50144
|
-
function
|
|
50441
|
+
function fail8(message, fix, code = "INGEST_FAILED") {
|
|
50145
50442
|
writeJson({ ok: false, error: { code, message, fix } });
|
|
50146
50443
|
process.exit(1);
|
|
50147
50444
|
}
|
|
@@ -50153,13 +50450,13 @@ function reportIngestFailure(err) {
|
|
|
50153
50450
|
if (err instanceof YtDlpError) reportYtDlpFailure(err);
|
|
50154
50451
|
const detail = err instanceof Error ? err.message : String(err);
|
|
50155
50452
|
if (detail.includes("timed out after")) {
|
|
50156
|
-
|
|
50453
|
+
fail8(
|
|
50157
50454
|
"That video took too long to download and was stopped part-way.",
|
|
50158
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>`.",
|
|
50159
50456
|
"INTERNAL_ERROR"
|
|
50160
50457
|
);
|
|
50161
50458
|
}
|
|
50162
|
-
|
|
50459
|
+
fail8(
|
|
50163
50460
|
`Couldn't add that video. ${detail}`,
|
|
50164
50461
|
"This is a fault on Baker's side, not a problem with the link. Report it.",
|
|
50165
50462
|
"INTERNAL_ERROR"
|
|
@@ -50259,7 +50556,7 @@ async function uploadToAssetStore(filePath, sizeBytes) {
|
|
|
50259
50556
|
}
|
|
50260
50557
|
|
|
50261
50558
|
// src/commands/videos/search.ts
|
|
50262
|
-
import { defineCommand as
|
|
50559
|
+
import { defineCommand as defineCommand212 } from "citty";
|
|
50263
50560
|
registerSchema({
|
|
50264
50561
|
command: "videos.search",
|
|
50265
50562
|
description: "Search videos by text query. Only returns ready videos.",
|
|
@@ -50269,7 +50566,7 @@ registerSchema({
|
|
|
50269
50566
|
tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
|
|
50270
50567
|
}
|
|
50271
50568
|
});
|
|
50272
|
-
var searchCommand4 =
|
|
50569
|
+
var searchCommand4 = defineCommand212({
|
|
50273
50570
|
meta: {
|
|
50274
50571
|
name: "search",
|
|
50275
50572
|
description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
|
|
@@ -50321,7 +50618,7 @@ var tagsCommand6 = makeTagsCommand("videos", "video", "/api/videos/tags");
|
|
|
50321
50618
|
// src/commands/videos/upload.ts
|
|
50322
50619
|
import { readFile as readFile25, stat as stat8 } from "fs/promises";
|
|
50323
50620
|
import { basename as basename3, extname as extname4 } from "path";
|
|
50324
|
-
import { defineCommand as
|
|
50621
|
+
import { defineCommand as defineCommand213 } from "citty";
|
|
50325
50622
|
var MIME_MAP = {
|
|
50326
50623
|
".mp4": "video/mp4",
|
|
50327
50624
|
".mov": "video/quicktime",
|
|
@@ -50363,7 +50660,7 @@ function detectContentType(filePath) {
|
|
|
50363
50660
|
function isRemoteUrl3(value) {
|
|
50364
50661
|
return /^https?:\/\//i.test(value);
|
|
50365
50662
|
}
|
|
50366
|
-
var uploadCommand2 =
|
|
50663
|
+
var uploadCommand2 = defineCommand213({
|
|
50367
50664
|
meta: {
|
|
50368
50665
|
name: "upload",
|
|
50369
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"
|
|
@@ -50447,7 +50744,7 @@ var uploadCommand2 = defineCommand212({
|
|
|
50447
50744
|
});
|
|
50448
50745
|
|
|
50449
50746
|
// src/commands/videos/index.ts
|
|
50450
|
-
var videosCommand =
|
|
50747
|
+
var videosCommand = defineCommand214({
|
|
50451
50748
|
meta: {
|
|
50452
50749
|
name: "videos",
|
|
50453
50750
|
description: `Find and manage videos in Baker. Subcommands: search, get, upload, ingest, delete, tags.
|
|
@@ -50474,10 +50771,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
|
|
|
50474
50771
|
});
|
|
50475
50772
|
|
|
50476
50773
|
// src/commands/winning-ads/index.ts
|
|
50477
|
-
import { defineCommand as
|
|
50774
|
+
import { defineCommand as defineCommand227 } from "citty";
|
|
50478
50775
|
|
|
50479
50776
|
// src/commands/winning-ads/advertisers.ts
|
|
50480
|
-
import { defineCommand as
|
|
50777
|
+
import { defineCommand as defineCommand215 } from "citty";
|
|
50481
50778
|
|
|
50482
50779
|
// src/commands/winning-ads/shared.ts
|
|
50483
50780
|
function splitList2(value) {
|
|
@@ -50530,7 +50827,7 @@ function advertiserNormalizer(record, full) {
|
|
|
50530
50827
|
last_synced_at: record.last_synced_at ?? null
|
|
50531
50828
|
};
|
|
50532
50829
|
}
|
|
50533
|
-
var advertisersCommand2 =
|
|
50830
|
+
var advertisersCommand2 = defineCommand215({
|
|
50534
50831
|
meta: {
|
|
50535
50832
|
name: "advertisers",
|
|
50536
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'
|
|
@@ -50588,7 +50885,7 @@ var advertisersCommand2 = defineCommand214({
|
|
|
50588
50885
|
});
|
|
50589
50886
|
|
|
50590
50887
|
// src/commands/winning-ads/brief.ts
|
|
50591
|
-
import { defineCommand as
|
|
50888
|
+
import { defineCommand as defineCommand216 } from "citty";
|
|
50592
50889
|
registerSchema({
|
|
50593
50890
|
command: "winning-ads.brief",
|
|
50594
50891
|
description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
|
|
@@ -50634,7 +50931,7 @@ function parseDna(raw) {
|
|
|
50634
50931
|
}
|
|
50635
50932
|
return parsed;
|
|
50636
50933
|
}
|
|
50637
|
-
var briefCommand =
|
|
50934
|
+
var briefCommand = defineCommand216({
|
|
50638
50935
|
meta: {
|
|
50639
50936
|
name: "brief",
|
|
50640
50937
|
description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
|
|
@@ -50670,7 +50967,7 @@ var briefCommand = defineCommand215({
|
|
|
50670
50967
|
});
|
|
50671
50968
|
|
|
50672
50969
|
// src/commands/winning-ads/content.ts
|
|
50673
|
-
import { defineCommand as
|
|
50970
|
+
import { defineCommand as defineCommand217 } from "citty";
|
|
50674
50971
|
registerSchema({
|
|
50675
50972
|
command: "winning-ads.content",
|
|
50676
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.",
|
|
@@ -50683,7 +50980,7 @@ registerSchema({
|
|
|
50683
50980
|
}
|
|
50684
50981
|
}
|
|
50685
50982
|
});
|
|
50686
|
-
var contentCommand =
|
|
50983
|
+
var contentCommand = defineCommand217({
|
|
50687
50984
|
meta: {
|
|
50688
50985
|
name: "content",
|
|
50689
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"
|
|
@@ -50732,7 +51029,7 @@ var contentCommand = defineCommand216({
|
|
|
50732
51029
|
});
|
|
50733
51030
|
|
|
50734
51031
|
// src/commands/winning-ads/feed.ts
|
|
50735
|
-
import { defineCommand as
|
|
51032
|
+
import { defineCommand as defineCommand218 } from "citty";
|
|
50736
51033
|
function buildFeedParams(input) {
|
|
50737
51034
|
const params = {};
|
|
50738
51035
|
const advertiser = splitList2(input.advertiser);
|
|
@@ -50784,7 +51081,7 @@ registerSchema({
|
|
|
50784
51081
|
format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
|
|
50785
51082
|
}
|
|
50786
51083
|
});
|
|
50787
|
-
var feedCommand =
|
|
51084
|
+
var feedCommand = defineCommand218({
|
|
50788
51085
|
meta: {
|
|
50789
51086
|
name: "feed",
|
|
50790
51087
|
description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
|
|
@@ -50869,7 +51166,7 @@ var feedCommand = defineCommand217({
|
|
|
50869
51166
|
});
|
|
50870
51167
|
|
|
50871
51168
|
// src/commands/winning-ads/follow.ts
|
|
50872
|
-
import { defineCommand as
|
|
51169
|
+
import { defineCommand as defineCommand219 } from "citty";
|
|
50873
51170
|
var PLATFORMS = ["meta", "linkedin"];
|
|
50874
51171
|
registerSchema({
|
|
50875
51172
|
command: "winning-ads.follow",
|
|
@@ -50884,7 +51181,7 @@ registerSchema({
|
|
|
50884
51181
|
label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
|
|
50885
51182
|
}
|
|
50886
51183
|
});
|
|
50887
|
-
var followCommand =
|
|
51184
|
+
var followCommand = defineCommand219({
|
|
50888
51185
|
meta: {
|
|
50889
51186
|
name: "follow",
|
|
50890
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'
|
|
@@ -50931,7 +51228,7 @@ var followCommand = defineCommand218({
|
|
|
50931
51228
|
});
|
|
50932
51229
|
|
|
50933
51230
|
// src/commands/winning-ads/follow-competitors.ts
|
|
50934
|
-
import { defineCommand as
|
|
51231
|
+
import { defineCommand as defineCommand220 } from "citty";
|
|
50935
51232
|
var PLATFORMS2 = ["meta", "linkedin"];
|
|
50936
51233
|
var BATCH_TIMEOUT_MS = 3e5;
|
|
50937
51234
|
function buildFollowBatchBody(input) {
|
|
@@ -50964,7 +51261,7 @@ registerSchema({
|
|
|
50964
51261
|
}
|
|
50965
51262
|
}
|
|
50966
51263
|
});
|
|
50967
|
-
var followCompetitorsCommand =
|
|
51264
|
+
var followCompetitorsCommand = defineCommand220({
|
|
50968
51265
|
meta: {
|
|
50969
51266
|
name: "follow-competitors",
|
|
50970
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"'
|
|
@@ -51039,7 +51336,7 @@ var followCompetitorsCommand = defineCommand219({
|
|
|
51039
51336
|
});
|
|
51040
51337
|
|
|
51041
51338
|
// src/commands/winning-ads/following.ts
|
|
51042
|
-
import { defineCommand as
|
|
51339
|
+
import { defineCommand as defineCommand221 } from "citty";
|
|
51043
51340
|
registerSchema({
|
|
51044
51341
|
command: "winning-ads.following",
|
|
51045
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.",
|
|
@@ -51093,7 +51390,7 @@ function followingNormalizer(record, full) {
|
|
|
51093
51390
|
platforms: Array.isArray(record.platforms) ? record.platforms : []
|
|
51094
51391
|
};
|
|
51095
51392
|
}
|
|
51096
|
-
var followingCommand =
|
|
51393
|
+
var followingCommand = defineCommand221({
|
|
51097
51394
|
meta: {
|
|
51098
51395
|
name: "following",
|
|
51099
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"
|
|
@@ -51129,7 +51426,7 @@ var followingCommand = defineCommand220({
|
|
|
51129
51426
|
});
|
|
51130
51427
|
|
|
51131
51428
|
// src/commands/winning-ads/patterns.ts
|
|
51132
|
-
import { defineCommand as
|
|
51429
|
+
import { defineCommand as defineCommand222 } from "citty";
|
|
51133
51430
|
registerSchema({
|
|
51134
51431
|
command: "winning-ads.patterns",
|
|
51135
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.",
|
|
@@ -51168,7 +51465,7 @@ function discriminatorRow(record) {
|
|
|
51168
51465
|
top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
|
|
51169
51466
|
};
|
|
51170
51467
|
}
|
|
51171
|
-
var patternsCommand =
|
|
51468
|
+
var patternsCommand = defineCommand222({
|
|
51172
51469
|
meta: {
|
|
51173
51470
|
name: "patterns",
|
|
51174
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"
|
|
@@ -51224,7 +51521,7 @@ var patternsCommand = defineCommand221({
|
|
|
51224
51521
|
});
|
|
51225
51522
|
|
|
51226
51523
|
// src/commands/winning-ads/search.ts
|
|
51227
|
-
import { defineCommand as
|
|
51524
|
+
import { defineCommand as defineCommand223 } from "citty";
|
|
51228
51525
|
registerSchema({
|
|
51229
51526
|
command: "winning-ads.search",
|
|
51230
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.",
|
|
@@ -51332,7 +51629,7 @@ function buildSearchBody2(args) {
|
|
|
51332
51629
|
}
|
|
51333
51630
|
return body;
|
|
51334
51631
|
}
|
|
51335
|
-
var searchCommand5 =
|
|
51632
|
+
var searchCommand5 = defineCommand223({
|
|
51336
51633
|
meta: {
|
|
51337
51634
|
name: "search",
|
|
51338
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"
|
|
@@ -51447,7 +51744,7 @@ var searchCommand5 = defineCommand222({
|
|
|
51447
51744
|
});
|
|
51448
51745
|
|
|
51449
51746
|
// src/commands/winning-ads/seeds.ts
|
|
51450
|
-
import { defineCommand as
|
|
51747
|
+
import { defineCommand as defineCommand224 } from "citty";
|
|
51451
51748
|
function leanRow(r) {
|
|
51452
51749
|
return {
|
|
51453
51750
|
key: r.key,
|
|
@@ -51475,7 +51772,7 @@ function makeSeedCommand(opts) {
|
|
|
51475
51772
|
limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
|
|
51476
51773
|
}
|
|
51477
51774
|
});
|
|
51478
|
-
return
|
|
51775
|
+
return defineCommand224({
|
|
51479
51776
|
meta: { name: opts.name, description: opts.description },
|
|
51480
51777
|
args: {
|
|
51481
51778
|
platform: { type: "string", description: "Single platform to segment on", required: false },
|
|
@@ -51524,7 +51821,7 @@ var formatsCommand = makeSeedCommand({
|
|
|
51524
51821
|
});
|
|
51525
51822
|
|
|
51526
51823
|
// src/commands/winning-ads/unfollow.ts
|
|
51527
|
-
import { defineCommand as
|
|
51824
|
+
import { defineCommand as defineCommand225 } from "citty";
|
|
51528
51825
|
registerSchema({
|
|
51529
51826
|
command: "winning-ads.unfollow",
|
|
51530
51827
|
description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
|
|
@@ -51532,7 +51829,7 @@ registerSchema({
|
|
|
51532
51829
|
advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
|
|
51533
51830
|
}
|
|
51534
51831
|
});
|
|
51535
|
-
var unfollowCommand =
|
|
51832
|
+
var unfollowCommand = defineCommand225({
|
|
51536
51833
|
meta: {
|
|
51537
51834
|
name: "unfollow",
|
|
51538
51835
|
description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
|
|
@@ -51553,7 +51850,7 @@ var unfollowCommand = defineCommand224({
|
|
|
51553
51850
|
});
|
|
51554
51851
|
|
|
51555
51852
|
// src/commands/winning-ads/winners.ts
|
|
51556
|
-
import { defineCommand as
|
|
51853
|
+
import { defineCommand as defineCommand226 } from "citty";
|
|
51557
51854
|
registerSchema({
|
|
51558
51855
|
command: "winning-ads.winners",
|
|
51559
51856
|
description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
|
|
@@ -51563,7 +51860,7 @@ registerSchema({
|
|
|
51563
51860
|
platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
|
|
51564
51861
|
}
|
|
51565
51862
|
});
|
|
51566
|
-
var winnersCommand =
|
|
51863
|
+
var winnersCommand = defineCommand226({
|
|
51567
51864
|
meta: {
|
|
51568
51865
|
name: "winners",
|
|
51569
51866
|
description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
|
|
@@ -51613,7 +51910,7 @@ var winnersCommand = defineCommand225({
|
|
|
51613
51910
|
});
|
|
51614
51911
|
|
|
51615
51912
|
// src/commands/winning-ads/index.ts
|
|
51616
|
-
var winningAdsCommand =
|
|
51913
|
+
var winningAdsCommand = defineCommand227({
|
|
51617
51914
|
meta: {
|
|
51618
51915
|
name: "winning-ads",
|
|
51619
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.
|
|
@@ -51851,7 +52148,7 @@ function getCliVersion() {
|
|
|
51851
52148
|
}
|
|
51852
52149
|
|
|
51853
52150
|
// src/cli.ts
|
|
51854
|
-
var main =
|
|
52151
|
+
var main = defineCommand228({
|
|
51855
52152
|
meta: {
|
|
51856
52153
|
name: "baker",
|
|
51857
52154
|
version: getCliVersion(),
|
|
@@ -51870,6 +52167,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
|
|
|
51870
52167
|
ads: adsCommand2,
|
|
51871
52168
|
brand: brandCommand,
|
|
51872
52169
|
analytics: analyticsCommand2,
|
|
52170
|
+
experiment: experimentCommand,
|
|
51873
52171
|
ga4: ga4Command,
|
|
51874
52172
|
gsc: gscCommand,
|
|
51875
52173
|
research: researchCommand,
|