@koda-sl/baker-cli 0.242.0 → 0.243.0-dev.9a9142645

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -58,7 +58,7 @@ import {
58
58
  ulid,
59
59
  validateCanvasDeep,
60
60
  ytDlpBlockSignal
61
- } from "./chunk-EKLAHWSF.js";
61
+ } from "./chunk-CMPAHYLB.js";
62
62
  import {
63
63
  csvOrJson,
64
64
  daysAgoIso,
@@ -108,7 +108,7 @@ import {
108
108
  } from "./chunk-DZUVUGEP.js";
109
109
 
110
110
  // src/cli.ts
111
- import { defineCommand as defineCommand227, runMain } from "citty";
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"]);
@@ -32812,7 +32839,7 @@ registerSchema({
32812
32839
  }
32813
32840
  }
32814
32841
  });
32815
- function capabilityHints(surfaces) {
32842
+ function capabilityHints(surfaces, tools = []) {
32816
32843
  const hints = [];
32817
32844
  const immediate = surfaces.filter((surface) => surface.writeMode === "applies-at-publish");
32818
32845
  if (immediate.length > 0) {
@@ -32835,6 +32862,18 @@ function capabilityHints(surfaces) {
32835
32862
  "Naming one surface (`baker capabilities google-ads`) adds `ops` \u2014 the exact fields and accepted values of every change there. Read that instead of guessing a field name."
32836
32863
  );
32837
32864
  }
32865
+ const usable = tools.filter((tool) => tool.ready);
32866
+ if (usable.length > 0) {
32867
+ hints.push(
32868
+ `ALSO AVAILABLE, and not on any surface above: ${usable.map((tool) => tool.label).join(", ")}. These answer WHY a page behaves as it does, which no surface here can. See \`tools[].reach\` for how to call each one.`
32869
+ );
32870
+ }
32871
+ const broken = tools.filter((tool) => !tool.ready);
32872
+ if (broken.length > 0) {
32873
+ hints.push(
32874
+ `CONNECTED BUT UNUSABLE: ${broken.map((tool) => `${tool.label} \u2014 ${tool.note ?? "not reachable"}`).join(" ")} Tell the user rather than planning around it silently.`
32875
+ );
32876
+ }
32838
32877
  return hints;
32839
32878
  }
32840
32879
  var runCapabilities = defineCommand108({
@@ -32844,6 +32883,8 @@ var runCapabilities = defineCommand108({
32844
32883
 
32845
32884
  Reports, per surface: what is connected and with what access, what a write there does when it lands, the entities that can be changed, and \u2014 the part nothing else tells you \u2014 what cannot be changed and why.
32846
32885
 
32886
+ Also returns \`tools\`: everything else this company can reach that is not one of those surfaces \u2014 Microsoft Clarity and any other MCP toolkit, custom servers, HubSpot. This is the one call that answers "what do I actually have".
32887
+
32847
32888
  Examples:
32848
32889
  baker capabilities
32849
32890
  baker capabilities google-ads
@@ -32879,7 +32920,7 @@ Full guide: __tooling__/docs/tools/baker/capabilities.md`
32879
32920
  body.full = true;
32880
32921
  }
32881
32922
  const response = await apiPost("/api/capabilities", body);
32882
- const hints = capabilityHints(response.data.surfaces);
32923
+ const hints = capabilityHints(response.data.surfaces, response.data.tools);
32883
32924
  writeJson({
32884
32925
  ...response,
32885
32926
  meta: { count: response.data.surfaces.length },
@@ -33349,12 +33390,311 @@ Full guide: __tooling__/docs/tools/baker/creatives.md`
33349
33390
  }
33350
33391
  });
33351
33392
 
33393
+ // src/commands/experiment/index.ts
33394
+ import { defineCommand as defineCommand112 } from "citty";
33395
+
33396
+ // src/commands/experiment/goal.ts
33397
+ function parseEventGoal(argument) {
33398
+ const [name, filter] = argument.split("/");
33399
+ if (!name) return { error: "Name the event: --goal event:request_demo" };
33400
+ if (!filter) return { kind: "custom_event", name };
33401
+ const separator = filter.indexOf("=");
33402
+ if (separator === -1) {
33403
+ return { error: `Write the property as key=value: --goal event:${name}/section=pricing` };
33404
+ }
33405
+ return { kind: "custom_event", name, property: filter.slice(0, separator), value: filter.slice(separator + 1) };
33406
+ }
33407
+ function parseGoal(raw) {
33408
+ if (raw === void 0 || raw === "") return void 0;
33409
+ const separator = raw.indexOf(":");
33410
+ const kind = separator === -1 ? raw : raw.slice(0, separator);
33411
+ const argument = separator === -1 ? "" : raw.slice(separator + 1);
33412
+ if (kind === "leads") return argument ? { kind: "conversion", flowSlug: argument } : { kind: "conversion" };
33413
+ if (kind === "click") return argument ? { kind: "outbound_click", targetHost: argument } : { kind: "outbound_click" };
33414
+ if (kind === "event") return parseEventGoal(argument);
33415
+ return {
33416
+ error: `Unknown goal "${raw}". Use leads, leads:<form>, event:<name>, event:<name>/<key>=<value>, click, or click:<host>`
33417
+ };
33418
+ }
33419
+
33420
+ // src/commands/experiment/hints.ts
33421
+ var RUNNING_HINT = {
33422
+ keep_running: (row) => `${row.experimentId} is not finished \u2014 do not read its numbers as a result, and do not end it hoping for one.${row.earliestDecisionAt ? ` Earliest it could say anything: ${new Date(row.earliestDecisionAt).toISOString().slice(0, 10)}.` : " This page has too little traffic to project a finish date yet."}`,
33423
+ winner: (row) => `${row.experimentId} has a winner. Run \`baker experiment finish --id ${row.experimentId}\` to send all the traffic to it. That only re-routes between two pages already published \u2014 it does not edit either.`,
33424
+ no_difference: (row) => `${row.experimentId} found no difference. Finish it (the page you have stays live) and test a bigger change \u2014 a headline, an offer, the shape of the page, not a button colour.`,
33425
+ stopped_early_harmful: (row) => `${row.experimentId} is doing damage. Finish it now \u2014 traffic goes back to the original page.`,
33426
+ // Unreachable in practice — only `finish --abandon` produces it, and that
33427
+ // leaves the test finished. The Record is exhaustive by type so a verdict
33428
+ // added upstream fails to compile here rather than printing nothing.
33429
+ abandoned: (row) => `${row.experimentId} was stopped before it concluded and found nothing.`,
33430
+ invalid: (row) => `${row.experimentId} cannot be read: ${row.invalidReason === "crossover" ? "too many visitors saw both versions" : "the traffic did not split evenly"}. Finish it and start again rather than reporting anything from it.`
33431
+ };
33432
+ function buildStatusHints(experiments) {
33433
+ const hints = experiments.filter((row) => row.status === "running").map((row) => RUNNING_HINT[row.verdict](row));
33434
+ if (experiments.length === 0) {
33435
+ hints.push(
33436
+ "No tests yet. `baker experiment plan --landing <slug> --variant <slug>` says whether a page has enough traffic for one before you build the alternative."
33437
+ );
33438
+ }
33439
+ return hints;
33440
+ }
33441
+ function asLift(value) {
33442
+ return `+${Math.round(value * 100)}%`;
33443
+ }
33444
+ function windowHint(days, detectable) {
33445
+ if (days === void 0) return null;
33446
+ if (detectable === null || detectable === void 0) {
33447
+ return `In ${days} days this page would not gather enough visitors to settle anything, at any size of change. The constraint is the traffic, not the test.`;
33448
+ }
33449
+ return `In ${days} days this page could only settle a change of ${asLift(detectable)} or more. Design the alternative to be at least that different \u2014 a smaller change needs traffic these ${days} days will not deliver, and the test would end saying nothing.`;
33450
+ }
33451
+ function buildPlanHints(plan, days) {
33452
+ const window2 = windowHint(days, plan.detectableLiftInDays);
33453
+ if (!plan.canRun) {
33454
+ return [
33455
+ plan.reason ?? "This test cannot run on this page.",
33456
+ ...window2 ? [window2] : [],
33457
+ "A test that cannot conclude is worse than no test \u2014 it still produces a number, and somebody acts on it."
33458
+ ];
33459
+ }
33460
+ const hints = [
33461
+ `This test measures ${plan.goalLabel}. That is fixed when it starts and cannot be changed later.`,
33462
+ // Fires at the exact moment the hypothesis gets invented, whether or not
33463
+ // the agent read the family doc. `plan` says a question CAN be settled here
33464
+ // and says nothing about which question is worth asking — and a well-run
33465
+ // test of a bad idea costs three weeks and returns `no_difference`.
33466
+ "Now decide WHAT to change, from evidence rather than taste. These numbers say which page and which step; they cannot say why. A second opinion answers why \u2014 Microsoft Clarity for what visitors actually do on the page, `baker gsc` for what they searched, `baker ads <platform>` for what the ad promised, `baker ga4` for the client's own measurement. `baker capabilities` lists everything this client has in one call \u2014 the surfaces, and under `tools` everything else that is reachable. Message match \u2014 what the ad or the search promised against what the page opens with \u2014 is the cheapest hypothesis worth testing and is wrong surprisingly often.",
33467
+ // The base always works, so a missing integration is never a reason to
33468
+ // stop. Naming what it would have shown is worth more to the client than
33469
+ // either a silent gap or a run that waited.
33470
+ "If none of that is connected, this page's own drop-off is enough to test on \u2014 say which source you lacked and what it would have told you, then run the test anyway. A test never waits on an integration."
33471
+ ];
33472
+ if (plan.estimatedDays !== null && plan.estimatedDays > 60) {
33473
+ hints.push(
33474
+ `At this page's traffic it would take about ${plan.estimatedDays} days. Consider testing a bigger change, which needs less traffic to detect.`
33475
+ );
33476
+ }
33477
+ if (window2) hints.push(window2);
33478
+ return hints;
33479
+ }
33480
+
33481
+ // src/commands/experiment/index.ts
33482
+ var GOAL_ARG = {
33483
+ type: "string",
33484
+ description: "What counts as success, and it is fixed for the life of the test. `leads` (default \u2014 whatever this company already marks as a conversion), `leads:<form>`, `event:<name>` for an event the page declares itself (see `baker analytics events`), `event:<name>/<key>=<value>` to narrow it, `click` or `click:<host>` for leaving the site. Pick the thing the business actually wants; a test that measures the wrong outcome can have the variant win and the revenue fall.",
33485
+ required: false
33486
+ };
33487
+ var LIFT_ARG = {
33488
+ type: "string",
33489
+ description: "The smallest improvement worth detecting, relative \u2014 0.2 is +20% (default). The single most consequential number here: halving it roughly quadruples the traffic needed. Ask for the smallest lift that would actually change what the client does, not the smallest one you would like to see.",
33490
+ required: false
33491
+ };
33492
+ var DAYS_ARG = {
33493
+ type: "string",
33494
+ description: "How many days you have, if that is the constraint. This does NOT shorten the test \u2014 the finish line is a visitor count fixed before it starts \u2014 it answers the other question: what a window that long could settle on this page's traffic. Use it when `plan` refuses and you need to know what WOULD fit.",
33495
+ required: false
33496
+ };
33497
+ function fail5(message) {
33498
+ writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
33499
+ process.exit(1);
33500
+ }
33501
+ function reportApiError(error) {
33502
+ if (error instanceof ApiError) {
33503
+ writeJsonEnvelope({ ok: false, error: { code: error.code ?? "ERROR", message: error.message } });
33504
+ process.exit(1);
33505
+ }
33506
+ throw error;
33507
+ }
33508
+ registerSchema({
33509
+ command: "experiment.plan",
33510
+ description: "Whether a page has enough traffic to settle a question, before anything is built",
33511
+ args: {
33512
+ landing: { type: "string", description: "The page under test, by slug", required: true },
33513
+ variant: { type: "string", description: "The alternative page's slug", required: true },
33514
+ goal: GOAL_ARG,
33515
+ lift: LIFT_ARG,
33516
+ days: DAYS_ARG
33517
+ }
33518
+ });
33519
+ var planCommand = defineCommand112({
33520
+ meta: {
33521
+ name: "plan",
33522
+ description: "Start here, BEFORE building the alternative page. Says whether this page gets enough traffic to settle the question, how long it would take, and whether the thing you want to measure has ever happened on it. Most landing pages cannot run most tests \u2014 finding that out now costs one call, and finding it out later costs three weeks and a decision made on noise."
33523
+ },
33524
+ args: {
33525
+ landing: { type: "string", description: "The page under test, by slug", required: true },
33526
+ variant: { type: "string", description: "The alternative page's slug", required: true },
33527
+ goal: GOAL_ARG,
33528
+ lift: LIFT_ARG,
33529
+ days: DAYS_ARG
33530
+ },
33531
+ run: async ({ args }) => {
33532
+ const goal = parseGoal(args.goal ? String(args.goal) : void 0);
33533
+ if (goal && "error" in goal) fail5(goal.error);
33534
+ try {
33535
+ const response = await apiPost("/api/experiments/plan", {
33536
+ landingSlug: String(args.landing),
33537
+ variantSlug: String(args.variant),
33538
+ ...goal ? { goal } : {},
33539
+ ...args.lift ? { minDetectableRelativeLift: Number(args.lift) } : {},
33540
+ ...args.days ? { days: Number(args.days) } : {}
33541
+ });
33542
+ writeJsonEnvelope({
33543
+ ok: true,
33544
+ data: response.data,
33545
+ hints: buildPlanHints(response.data, args.days ? Number(args.days) : void 0)
33546
+ });
33547
+ } catch (error) {
33548
+ reportApiError(error);
33549
+ }
33550
+ }
33551
+ });
33552
+ registerSchema({
33553
+ command: "experiment.start",
33554
+ description: "Stage an A/B test between a page and its alternative",
33555
+ args: {
33556
+ landing: { type: "string", description: "The page under test, by slug", required: true },
33557
+ variant: { type: "string", description: "The alternative page's slug", required: true },
33558
+ hypothesis: { type: "string", description: "What should change and why it should convert better", required: true },
33559
+ goal: GOAL_ARG,
33560
+ lift: LIFT_ARG
33561
+ }
33562
+ });
33563
+ var startCommand = defineCommand112({
33564
+ meta: {
33565
+ name: "start",
33566
+ description: "Stage a test between the page and its alternative. Both are ordinary published pages; visitors are split 50/50 at the edge, so there is no flicker and nothing for an ad blocker to suppress. Nothing goes live until the session is published \u2014 the person publishing is the review of the alternative page. Re-runs `plan` first and refuses on the same grounds."
33567
+ },
33568
+ args: {
33569
+ landing: { type: "string", description: "The page under test, by slug", required: true },
33570
+ variant: { type: "string", description: "The alternative page's slug", required: true },
33571
+ hypothesis: { type: "string", description: "What should change and why it should convert better", required: true },
33572
+ goal: GOAL_ARG,
33573
+ lift: LIFT_ARG
33574
+ },
33575
+ run: async ({ args }) => {
33576
+ const goal = parseGoal(args.goal ? String(args.goal) : void 0);
33577
+ if (goal && "error" in goal) fail5(goal.error);
33578
+ try {
33579
+ const response = await apiPost("/api/experiments/start", {
33580
+ landingSlug: String(args.landing),
33581
+ variantSlug: String(args.variant),
33582
+ hypothesis: String(args.hypothesis),
33583
+ ...goal ? { goal } : {},
33584
+ ...args.lift ? { minDetectableRelativeLift: Number(args.lift) } : {}
33585
+ });
33586
+ writeJsonEnvelope({
33587
+ ok: true,
33588
+ data: response.data,
33589
+ hints: [
33590
+ "Staged. The split starts when this session is published \u2014 publishing is the review of the alternative page.",
33591
+ "Do not read the numbers before the test says it has finished. A weekly check IS peeking: stopping the first time a probability looks good has several times the false-positive rate that probability implies."
33592
+ ]
33593
+ });
33594
+ } catch (error) {
33595
+ reportApiError(error);
33596
+ }
33597
+ }
33598
+ });
33599
+ registerSchema({
33600
+ command: "experiment.status",
33601
+ description: "The verdict on every A/B test, running and finished",
33602
+ args: {
33603
+ id: { type: "string", description: "One test, by its id", required: false },
33604
+ full: { type: "boolean", description: "Include the posteriors behind the verdict", required: false }
33605
+ }
33606
+ });
33607
+ var statusCommand4 = defineCommand112({
33608
+ meta: {
33609
+ name: "status",
33610
+ description: "The verdict on each test. Read `verdict` and nothing else to decide: keep_running | winner | no_difference | invalid | stopped_early_harmful. `summary` is one sentence you can show the client. The numbers under `--full` are for printing, never for deciding \u2014 a test that says keep_running has not finished, however good its numbers look."
33611
+ },
33612
+ args: {
33613
+ id: { type: "string", description: "One test, by its id", required: false },
33614
+ full: { type: "boolean", description: "Include the posteriors behind the verdict", required: false }
33615
+ },
33616
+ run: async ({ args }) => {
33617
+ try {
33618
+ const response = await apiPost("/api/experiments/status", {
33619
+ ...args.id ? { experimentId: String(args.id) } : {},
33620
+ ...args.full === true ? { full: true } : {}
33621
+ });
33622
+ writeJsonEnvelope({
33623
+ ok: true,
33624
+ data: response.data,
33625
+ hints: buildStatusHints(response.data.experiments)
33626
+ });
33627
+ } catch (error) {
33628
+ reportApiError(error);
33629
+ }
33630
+ }
33631
+ });
33632
+ registerSchema({
33633
+ command: "experiment.finish",
33634
+ description: "End a test and send all its traffic to the surviving page",
33635
+ args: {
33636
+ id: { type: "string", description: "The test, by its id", required: true },
33637
+ abandon: {
33638
+ type: "boolean",
33639
+ description: "Stop the test, keep the original page, and record no result. The only way to end a test that has not concluded \u2014 and it OVERRIDES a verdict if there is one, throwing that finding away. Do not pass it by reflex.",
33640
+ required: false
33641
+ }
33642
+ }
33643
+ });
33644
+ var finishCommand = defineCommand112({
33645
+ meta: {
33646
+ name: "finish",
33647
+ description: "End a test and send all its traffic to whichever page survived. Only a test whose verdict has concluded can be finished with a result \u2014 a `keep_running` test can only be `--abandon`ed, which keeps the original page and records no finding. Promotion is a traffic change over two pages that were both already published and reviewed; it does not edit either page."
33648
+ },
33649
+ args: {
33650
+ id: { type: "string", description: "The test, by its id", required: true },
33651
+ abandon: {
33652
+ type: "boolean",
33653
+ description: "Stop the test, keep the original page, and record no result. The only way to end a test that has not concluded \u2014 and it OVERRIDES a verdict if there is one, throwing that finding away. Do not pass it by reflex.",
33654
+ required: false
33655
+ }
33656
+ },
33657
+ run: async ({ args }) => {
33658
+ try {
33659
+ const response = await apiPost("/api/experiments/finish", {
33660
+ experimentId: String(args.id),
33661
+ ...args.abandon === true ? { abandon: true } : {}
33662
+ });
33663
+ writeJsonEnvelope({
33664
+ ok: true,
33665
+ data: response.data,
33666
+ hints: [
33667
+ `Staged. All the traffic goes to the ${response.data.survivor === "variant" ? "alternative" : "original"} page when this session is published.`,
33668
+ ...response.data.discardedVerdict ? [
33669
+ `You abandoned a test that HAD concluded (${response.data.discardedVerdict}). The original page keeps the traffic and no result is recorded \u2014 the finding is gone. If that was not what you meant, run this again without --abandon.`
33670
+ ] : [],
33671
+ "If the alternative won and you want it to become the page itself, that is an ordinary page edit afterwards \u2014 copy its content over and delete the alternative."
33672
+ ]
33673
+ });
33674
+ } catch (error) {
33675
+ reportApiError(error);
33676
+ }
33677
+ }
33678
+ });
33679
+ var experimentCommand = defineCommand112({
33680
+ meta: {
33681
+ name: "experiment",
33682
+ description: "Run an A/B test between a landing page and an alternative version of it, and be told which one is better. Always `plan` first: most pages do not get enough traffic to settle most questions, and a test that cannot conclude still produces a number somebody will act on."
33683
+ },
33684
+ subCommands: {
33685
+ plan: planCommand,
33686
+ start: startCommand,
33687
+ status: statusCommand4,
33688
+ finish: finishCommand
33689
+ }
33690
+ });
33691
+
33352
33692
  // src/commands/flows/index.ts
33353
- import { defineCommand as defineCommand116 } from "citty";
33693
+ import { defineCommand as defineCommand117 } from "citty";
33354
33694
 
33355
33695
  // src/commands/flows/add.ts
33356
33696
  import { randomUUID } from "crypto";
33357
- import { defineCommand as defineCommand112 } from "citty";
33697
+ import { defineCommand as defineCommand113 } from "citty";
33358
33698
 
33359
33699
  // src/commands/flows/shared.ts
33360
33700
  import { existsSync as existsSync5, readdirSync as readdirSync2, readFileSync as readFileSync9, writeFileSync as writeFileSync3 } from "fs";
@@ -33564,7 +33904,7 @@ registerSchema({
33564
33904
  parent: { type: "string", description: "Parent node id. Omit to append to the root's children.", required: false }
33565
33905
  }
33566
33906
  });
33567
- var addNodeCommand = defineCommand112({
33907
+ var addNodeCommand = defineCommand113({
33568
33908
  meta: {
33569
33909
  name: "add-node",
33570
33910
  description: 'Add a step to a form, with the skeleton its type requires. Example: baker flows add-node contact --type customForm --name "Contact Info"'
@@ -33660,7 +34000,7 @@ registerSchema({
33660
34000
  }
33661
34001
  }
33662
34002
  });
33663
- var addSideEffectCommand = defineCommand112({
34003
+ var addSideEffectCommand = defineCommand113({
33664
34004
  meta: {
33665
34005
  name: "add-side-effect",
33666
34006
  description: "Add a side effect to a step, with the skeleton its type requires. Example: baker flows add-side-effect contact --node <id> --type googleSpreadsheet"
@@ -33742,7 +34082,7 @@ var addSideEffectCommand = defineCommand112({
33742
34082
 
33743
34083
  // src/commands/flows/map.ts
33744
34084
  import { readFileSync as readFileSync11 } from "fs";
33745
- import { defineCommand as defineCommand113 } from "citty";
34085
+ import { defineCommand as defineCommand114 } from "citty";
33746
34086
 
33747
34087
  // src/commands/flows/value-expression.ts
33748
34088
  import { existsSync as existsSync6, readFileSync as readFileSync10 } from "fs";
@@ -34515,7 +34855,7 @@ async function mapOptions(args, fromFile, into) {
34515
34855
  destinationFields: hubspotForm ? await hubspotFieldCatalog(hubspotForm) : void 0
34516
34856
  };
34517
34857
  }
34518
- var mapCommand2 = defineCommand113({
34858
+ var mapCommand2 = defineCommand114({
34519
34859
  meta: {
34520
34860
  name: "map",
34521
34861
  description: "Map form fields onto any value a side effect sends \u2014 never hand-write a mapping. Start here: baker flows map contact --from map.json --write"
@@ -34613,7 +34953,7 @@ var mapCommand2 = defineCommand113({
34613
34953
  });
34614
34954
 
34615
34955
  // src/commands/flows/normalize.ts
34616
- import { defineCommand as defineCommand114 } from "citty";
34956
+ import { defineCommand as defineCommand115 } from "citty";
34617
34957
  var OPTIONAL_STRINGS = ["oauthProviderId"];
34618
34958
  var ARRAY_FIELDS = [
34619
34959
  "fieldMapping",
@@ -34682,7 +35022,7 @@ registerSchema({
34682
35022
  }
34683
35023
  }
34684
35024
  });
34685
- var normalizeCommand = defineCommand114({
35025
+ var normalizeCommand = defineCommand115({
34686
35026
  meta: {
34687
35027
  name: "normalize",
34688
35028
  description: "Repair the shapes a form file is allowed to get slightly wrong. Example: baker flows normalize contact --write"
@@ -34713,7 +35053,7 @@ var normalizeCommand = defineCommand114({
34713
35053
  });
34714
35054
 
34715
35055
  // src/commands/flows/schema.ts
34716
- import { defineCommand as defineCommand115 } from "citty";
35056
+ import { defineCommand as defineCommand116 } from "citty";
34717
35057
  registerSchema({
34718
35058
  command: "flows.schema",
34719
35059
  description: "The shape of one node or side-effect type: a pasteable skeleton, who fills each part, and the reference file with the craft. Start here before authoring anything in a form's _data.json.",
@@ -34738,7 +35078,7 @@ function triggerHints(triggers) {
34738
35078
  `A side effect on this step carries \`triggerId: "${triggers.completion}"\`, and \`baker flows add-side-effect\` writes it for you. The trigger belongs to the STEP, not to the side-effect type: one that does not match is valid, ships, and never runs.` + (others.length > 0 ? ` Other moments this step raises: ${others.join(", ")}.` : "")
34739
35079
  ];
34740
35080
  }
34741
- var schemaCommand = defineCommand115({
35081
+ var schemaCommand = defineCommand116({
34742
35082
  meta: {
34743
35083
  name: "schema",
34744
35084
  description: "Show a node or side-effect type's shape. Start here: baker flows schema node customForm \xB7 baker flows schema side-effect googleSpreadsheet \xB7 baker flows schema (lists both)"
@@ -34872,7 +35212,7 @@ function displayName(slug) {
34872
35212
  const name = tree.displayName;
34873
35213
  return typeof name === "string" && name.trim() ? name.trim() : slug;
34874
35214
  }
34875
- var listCommand12 = defineCommand116({
35215
+ var listCommand12 = defineCommand117({
34876
35216
  meta: {
34877
35217
  name: "list",
34878
35218
  description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
@@ -34893,7 +35233,7 @@ var listCommand12 = defineCommand116({
34893
35233
  });
34894
35234
  }
34895
35235
  });
34896
- var showCommand3 = defineCommand116({
35236
+ var showCommand3 = defineCommand117({
34897
35237
  meta: {
34898
35238
  name: "show",
34899
35239
  description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
@@ -34921,7 +35261,7 @@ var showCommand3 = defineCommand116({
34921
35261
  });
34922
35262
  }
34923
35263
  });
34924
- var flowsCommand = defineCommand116({
35264
+ var flowsCommand = defineCommand117({
34925
35265
  meta: {
34926
35266
  name: "flows",
34927
35267
  description: `Read and shape this workspace's Forms (flows).
@@ -34955,10 +35295,10 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
34955
35295
  });
34956
35296
 
34957
35297
  // src/commands/ga4/index.ts
34958
- import { defineCommand as defineCommand123 } from "citty";
35298
+ import { defineCommand as defineCommand124 } from "citty";
34959
35299
 
34960
35300
  // src/commands/ga4/audit.ts
34961
- import { defineCommand as defineCommand117 } from "citty";
35301
+ import { defineCommand as defineCommand118 } from "citty";
34962
35302
 
34963
35303
  // src/commands/ga4/resolve.ts
34964
35304
  async function fetchProperties(useCache = true) {
@@ -35024,7 +35364,7 @@ registerSchema({
35024
35364
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
35025
35365
  }
35026
35366
  });
35027
- var auditCommand2 = defineCommand117({
35367
+ var auditCommand2 = defineCommand118({
35028
35368
  meta: {
35029
35369
  name: "audit",
35030
35370
  description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
@@ -35079,7 +35419,7 @@ Examples:
35079
35419
  });
35080
35420
 
35081
35421
  // src/commands/ga4/config.ts
35082
- import { defineCommand as defineCommand118 } from "citty";
35422
+ import { defineCommand as defineCommand119 } from "citty";
35083
35423
 
35084
35424
  // src/commands/ga4/shared.ts
35085
35425
  import { readFileSync as readFileSync12 } from "fs";
@@ -35275,7 +35615,7 @@ function configHints(config) {
35275
35615
  }
35276
35616
  return hints;
35277
35617
  }
35278
- var configCommand = defineCommand118({
35618
+ var configCommand = defineCommand119({
35279
35619
  meta: {
35280
35620
  name: "config",
35281
35621
  description: `Read how the property is configured to measure \u2014 key events, custom definitions, custom events, retention
@@ -35307,7 +35647,7 @@ Examples:
35307
35647
  });
35308
35648
 
35309
35649
  // src/commands/ga4/draft.ts
35310
- import { defineCommand as defineCommand119 } from "citty";
35650
+ import { defineCommand as defineCommand120 } from "citty";
35311
35651
  registerSchema({
35312
35652
  command: "ga4.draft",
35313
35653
  description: "Review and undo the Google Analytics changes staged on this chat. Use `list` to see everything staged, `show` to inspect one change in full before the chat completes, `amend` to correct one in place, and `remove`/`clear` to drop them. `list` and `show` take --chat <id> to read an earlier chat's changes instead.",
@@ -35316,13 +35656,13 @@ registerSchema({
35316
35656
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
35317
35657
  }
35318
35658
  });
35319
- var draftCommand3 = defineCommand119({
35659
+ var draftCommand3 = defineCommand120({
35320
35660
  meta: {
35321
35661
  name: "draft",
35322
35662
  description: "List, show, amend, remove or clear the Google Analytics changes staged on this chat. `list` and `show` take --chat <id> to read an earlier chat's changes instead."
35323
35663
  },
35324
35664
  subCommands: {
35325
- list: defineCommand119({
35665
+ list: defineCommand120({
35326
35666
  meta: { name: "list", description: "Review everything staged on this chat (--json for the raw envelope)" },
35327
35667
  args: {
35328
35668
  json: { type: "boolean", description: "Print the raw JSON envelope", required: false },
@@ -35332,7 +35672,7 @@ var draftCommand3 = defineCommand119({
35332
35672
  await draftList(args.json === true, args.chat);
35333
35673
  }
35334
35674
  }),
35335
- show: defineCommand119({
35675
+ show: defineCommand120({
35336
35676
  meta: {
35337
35677
  name: "show",
35338
35678
  description: "Print the full staged payload for one change, alongside how the property looks today \u2014 the receipt to verify it before the chat completes (never truncated)."
@@ -35349,7 +35689,7 @@ var draftCommand3 = defineCommand119({
35349
35689
  );
35350
35690
  }
35351
35691
  }),
35352
- amend: defineCommand119({
35692
+ amend: defineCommand120({
35353
35693
  meta: {
35354
35694
  name: "amend",
35355
35695
  description: "Update a staged change in place \u2014 merges a JSON patch into its payload (objects deep-merge, null deletes a key, arrays/scalars replace) and re-runs every check. Use this instead of remove + re-create."
@@ -35366,7 +35706,7 @@ var draftCommand3 = defineCommand119({
35366
35706
  });
35367
35707
  }
35368
35708
  }),
35369
- remove: defineCommand119({
35709
+ remove: defineCommand120({
35370
35710
  meta: { name: "remove", description: "Remove one staged change" },
35371
35711
  args: { ref: { type: "positional", description: "Staged ref or target id", required: false } },
35372
35712
  run: async ({ args }) => {
@@ -35375,7 +35715,7 @@ var draftCommand3 = defineCommand119({
35375
35715
  });
35376
35716
  }
35377
35717
  }),
35378
- clear: defineCommand119({
35718
+ clear: defineCommand120({
35379
35719
  meta: { name: "clear", description: "Discard all Google Analytics changes staged on this chat" },
35380
35720
  run: async () => {
35381
35721
  await draftAction2("/api/ga4/draft/clear", {});
@@ -35385,7 +35725,7 @@ var draftCommand3 = defineCommand119({
35385
35725
  });
35386
35726
 
35387
35727
  // src/commands/ga4/properties.ts
35388
- import { defineCommand as defineCommand120 } from "citty";
35728
+ import { defineCommand as defineCommand121 } from "citty";
35389
35729
  registerSchema({
35390
35730
  command: "ga4.properties",
35391
35731
  description: "List the GA4 properties this company connected \u2014 there can be several, and every one of them is yours to query. Returns the property IDs the query and audit commands take. Run this first to find property IDs.",
@@ -35401,7 +35741,7 @@ function propertyHints(properties) {
35401
35741
  resources: properties.map((property) => ({ id: property.externalId, label: property.name }))
35402
35742
  });
35403
35743
  }
35404
- var propertiesCommand = defineCommand120({
35744
+ var propertiesCommand = defineCommand121({
35405
35745
  meta: {
35406
35746
  name: "properties",
35407
35747
  description: `List accessible GA4 properties.
@@ -35451,7 +35791,7 @@ Examples:
35451
35791
  // src/commands/ga4/query.ts
35452
35792
  import { appendFileSync as appendFileSync2, existsSync as existsSync7, readFileSync as readFileSync13, writeFileSync as writeFileSync4 } from "fs";
35453
35793
  import { resolve as resolve2 } from "path";
35454
- import { defineCommand as defineCommand121 } from "citty";
35794
+ import { defineCommand as defineCommand122 } from "citty";
35455
35795
 
35456
35796
  // src/commands/ga4/presets.ts
35457
35797
  var GA4_PRESETS = [
@@ -35586,7 +35926,7 @@ function handleError3(err) {
35586
35926
  });
35587
35927
  process.exit(1);
35588
35928
  }
35589
- var queryCommand2 = defineCommand121({
35929
+ var queryCommand2 = defineCommand122({
35590
35930
  meta: {
35591
35931
  name: "query",
35592
35932
  description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
@@ -35657,7 +35997,7 @@ Free-form (escape hatch):
35657
35997
  });
35658
35998
 
35659
35999
  // src/commands/ga4/write-commands.ts
35660
- import { defineCommand as defineCommand122 } from "citty";
36000
+ import { defineCommand as defineCommand123 } from "citty";
35661
36001
  var PROPERTY_ARG_DESCRIPTION = "GA4 property id (optional only when one property is connected \u2014 run `baker ga4 properties`)";
35662
36002
  var propertyArg = { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false };
35663
36003
  function createJsonDescription(noun) {
@@ -35675,7 +36015,7 @@ registerSchema({
35675
36015
  "property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
35676
36016
  }
35677
36017
  });
35678
- var keyEventCommand = defineCommand122({
36018
+ var keyEventCommand = defineCommand123({
35679
36019
  meta: {
35680
36020
  name: "key-event",
35681
36021
  description: `Stage key-event (conversion) changes
@@ -35688,7 +36028,7 @@ Examples:
35688
36028
  baker ga4 key-event delete 4185`
35689
36029
  },
35690
36030
  subCommands: {
35691
- create: defineCommand122({
36031
+ create: defineCommand123({
35692
36032
  meta: {
35693
36033
  name: "create",
35694
36034
  description: "Stage a new key event. Needs eventName and countingMethod (ONCE_PER_EVENT or ONCE_PER_SESSION); defaultValue sets a monetary value when the event does not send one."
@@ -35709,7 +36049,7 @@ Examples:
35709
36049
  );
35710
36050
  }
35711
36051
  }),
35712
- update: defineCommand122({
36052
+ update: defineCommand123({
35713
36053
  meta: {
35714
36054
  name: "update",
35715
36055
  description: "Stage a change to an existing key event (pass its id). Only countingMethod and defaultValue can change \u2014 Google will not rename a key event."
@@ -35729,7 +36069,7 @@ Examples:
35729
36069
  });
35730
36070
  }
35731
36071
  }),
35732
- delete: defineCommand122({
36072
+ delete: defineCommand123({
35733
36073
  meta: {
35734
36074
  name: "delete",
35735
36075
  description: "Stage removing a key event, so the event stops counting as a conversion. The event itself keeps being collected. Irreversible once the chat completes \u2014 confirm with the user first."
@@ -35777,7 +36117,7 @@ for (const { kind, noun, createHint } of DEFINITIONS) {
35777
36117
  }
35778
36118
  function definitionCommand(definition) {
35779
36119
  const { command, kind, noun, example } = definition;
35780
- return defineCommand122({
36120
+ return defineCommand123({
35781
36121
  meta: {
35782
36122
  name: command,
35783
36123
  description: `Stage ${noun} changes
@@ -35789,7 +36129,7 @@ Examples:
35789
36129
  baker ga4 ${command} archive 12`
35790
36130
  },
35791
36131
  subCommands: {
35792
- create: defineCommand122({
36132
+ create: defineCommand123({
35793
36133
  meta: { name: "create", description: `Stage a new ${noun} (or a JSON array of them, staged together)` },
35794
36134
  args: {
35795
36135
  json: { type: "string", description: createJsonDescription(noun), required: false },
@@ -35807,7 +36147,7 @@ Examples:
35807
36147
  );
35808
36148
  }
35809
36149
  }),
35810
- update: defineCommand122({
36150
+ update: defineCommand123({
35811
36151
  meta: {
35812
36152
  name: "update",
35813
36153
  description: `Stage a change to an existing ${noun} (pass its id). The parameter name and scope cannot change \u2014 archive and recreate for that.`
@@ -35827,7 +36167,7 @@ Examples:
35827
36167
  });
35828
36168
  }
35829
36169
  }),
35830
- archive: defineCommand122({
36170
+ archive: defineCommand123({
35831
36171
  meta: {
35832
36172
  name: "archive",
35833
36173
  description: `Stage archiving a ${noun} (pass its id). It stops collecting and leaves reporting; past data stays. Irreversible once the chat completes \u2014 confirm with the user first.`
@@ -35872,7 +36212,7 @@ var dataStreamArg = {
35872
36212
  function withStream(args) {
35873
36213
  return typeof args["data-stream"] === "string" ? { dataStream: args["data-stream"] } : {};
35874
36214
  }
35875
- var customEventCommand = defineCommand122({
36215
+ var customEventCommand = defineCommand123({
35876
36216
  meta: {
35877
36217
  name: "custom-event",
35878
36218
  description: `Stage custom events \u2014 new events built from events the site already sends
@@ -35883,7 +36223,7 @@ Examples:
35883
36223
  baker ga4 custom-event delete 7`
35884
36224
  },
35885
36225
  subCommands: {
35886
- create: defineCommand122({
36226
+ create: defineCommand123({
35887
36227
  meta: {
35888
36228
  name: "create",
35889
36229
  description: "Stage a new custom event. Conditions match the source event: use field `event_name` to match the event itself, or any parameter name to match its value."
@@ -35906,7 +36246,7 @@ Examples:
35906
36246
  );
35907
36247
  }
35908
36248
  }),
35909
- update: defineCommand122({
36249
+ update: defineCommand123({
35910
36250
  meta: { name: "update", description: "Stage a change to an existing custom event (pass its id)" },
35911
36251
  args: {
35912
36252
  id: { type: "positional", description: "Custom event rule id", required: false },
@@ -35925,7 +36265,7 @@ Examples:
35925
36265
  });
35926
36266
  }
35927
36267
  }),
35928
- delete: defineCommand122({
36268
+ delete: defineCommand123({
35929
36269
  meta: {
35930
36270
  name: "delete",
35931
36271
  description: "Stage removing a custom event (pass its id). The event stops being created from then on; data already collected under it stays. Confirm with the user first."
@@ -35980,7 +36320,7 @@ function booleanArg(input, flag) {
35980
36320
  if (input === "false") return false;
35981
36321
  return failValidation3(`--${flag} must be true or false`);
35982
36322
  }
35983
- var dataRetentionCommand = defineCommand122({
36323
+ var dataRetentionCommand = defineCommand123({
35984
36324
  meta: {
35985
36325
  name: "data-retention",
35986
36326
  description: `Stage a change to how long Google Analytics keeps data
@@ -35990,7 +36330,7 @@ Examples:
35990
36330
  baker ga4 data-retention set --event-data 14 --user-data 14 --reset-on-activity true`
35991
36331
  },
35992
36332
  subCommands: {
35993
- set: defineCommand122({
36333
+ set: defineCommand123({
35994
36334
  meta: { name: "set", description: "Stage the retention window (months)" },
35995
36335
  args: {
35996
36336
  "event-data": { type: "string", description: "2, 14, 26, 38 or 50", required: false },
@@ -36026,7 +36366,7 @@ registerSchema({
36026
36366
  "property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
36027
36367
  }
36028
36368
  });
36029
- var audienceCommand = defineCommand122({
36369
+ var audienceCommand = defineCommand123({
36030
36370
  meta: {
36031
36371
  name: "audience",
36032
36372
  description: `Stage audience changes (saved groups of users, for retargeting and analysis)
@@ -36058,7 +36398,7 @@ Examples:
36058
36398
  baker ga4 audience archive 8813`
36059
36399
  },
36060
36400
  subCommands: {
36061
- create: defineCommand122({
36401
+ create: defineCommand123({
36062
36402
  meta: { name: "create", description: createJsonDescription("audience") },
36063
36403
  args: {
36064
36404
  json: { type: "string", description: createJsonDescription("audience"), required: false },
@@ -36076,7 +36416,7 @@ Examples:
36076
36416
  );
36077
36417
  }
36078
36418
  }),
36079
- update: defineCommand122({
36419
+ update: defineCommand123({
36080
36420
  meta: {
36081
36421
  name: "update",
36082
36422
  description: "Stage a new name or description (pass the audience id). Who is in it cannot be changed."
@@ -36097,7 +36437,7 @@ Examples:
36097
36437
  });
36098
36438
  }
36099
36439
  }),
36100
- archive: defineCommand122({
36440
+ archive: defineCommand123({
36101
36441
  meta: {
36102
36442
  name: "archive",
36103
36443
  description: "Stage retiring an audience. Cannot be undone \u2014 the users it gathered do not come back."
@@ -36126,7 +36466,7 @@ registerSchema({
36126
36466
  "property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
36127
36467
  }
36128
36468
  });
36129
- var propertyCommand = defineCommand122({
36469
+ var propertyCommand = defineCommand123({
36130
36470
  meta: {
36131
36471
  name: "property",
36132
36472
  description: `Stage a change to the property's own settings
@@ -36136,7 +36476,7 @@ Examples:
36136
36476
  baker ga4 property set --name "Acme \u2014 Web" --industry REAL_ESTATE`
36137
36477
  },
36138
36478
  subCommands: {
36139
- set: defineCommand122({
36479
+ set: defineCommand123({
36140
36480
  meta: { name: "set", description: "Stage the property name and/or industry category" },
36141
36481
  args: {
36142
36482
  name: { type: "string", description: "New property display name", required: false },
@@ -36176,7 +36516,7 @@ registerSchema({
36176
36516
  "property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
36177
36517
  }
36178
36518
  });
36179
- var adsLinkCommand = defineCommand122({
36519
+ var adsLinkCommand = defineCommand123({
36180
36520
  meta: {
36181
36521
  name: "ads-link",
36182
36522
  description: `Stage linking this property to a Google Ads account
@@ -36191,7 +36531,7 @@ Examples:
36191
36531
  baker ga4 ads-link delete L1234`
36192
36532
  },
36193
36533
  subCommands: {
36194
- create: defineCommand122({
36534
+ create: defineCommand123({
36195
36535
  meta: { name: "create", description: "Stage linking the property to a Google Ads account" },
36196
36536
  args: {
36197
36537
  "customer-id": { type: "string", description: "Google Ads customer id (123-456-7890)", required: false },
@@ -36210,7 +36550,7 @@ Examples:
36210
36550
  await stageOp3({ kind: "ga4.googleAdsLink.create", payload, ...withProperty(args) });
36211
36551
  }
36212
36552
  }),
36213
- update: defineCommand122({
36553
+ update: defineCommand123({
36214
36554
  meta: {
36215
36555
  name: "update",
36216
36556
  description: "Stage the ads-personalisation setting on an existing link (pass its id)"
@@ -36232,7 +36572,7 @@ Examples:
36232
36572
  });
36233
36573
  }
36234
36574
  }),
36235
- delete: defineCommand122({
36575
+ delete: defineCommand123({
36236
36576
  meta: {
36237
36577
  name: "delete",
36238
36578
  description: "Stage unlinking. Stops conversion imports and strands every audience on this property."
@@ -36283,7 +36623,7 @@ var MEASUREMENT_FLAGS = {
36283
36623
  "page-changes": "pageChangesEnabled",
36284
36624
  "form-interactions": "formInteractionsEnabled"
36285
36625
  };
36286
- var enhancedMeasurementCommand = defineCommand122({
36626
+ var enhancedMeasurementCommand = defineCommand123({
36287
36627
  meta: {
36288
36628
  name: "enhanced-measurement",
36289
36629
  description: `Stage the automatic events GA4 collects on a website stream
@@ -36297,7 +36637,7 @@ Examples:
36297
36637
  baker ga4 enhanced-measurement set --video false`
36298
36638
  },
36299
36639
  subCommands: {
36300
- set: defineCommand122({
36640
+ set: defineCommand123({
36301
36641
  meta: { name: "set", description: "Stage which automatic events the website stream collects" },
36302
36642
  args: {
36303
36643
  scrolls: { type: "string", description: "true|false", required: false },
@@ -36340,7 +36680,7 @@ Examples:
36340
36680
  });
36341
36681
 
36342
36682
  // src/commands/ga4/index.ts
36343
- var ga4Command = defineCommand123({
36683
+ var ga4Command = defineCommand124({
36344
36684
  meta: {
36345
36685
  name: "ga4",
36346
36686
  description: `Google Analytics 4. Report on a property, audit its config, and change what it measures.
@@ -36389,12 +36729,12 @@ Full guide: __tooling__/docs/tools/baker/ga4.md`
36389
36729
  });
36390
36730
 
36391
36731
  // src/commands/gsc/index.ts
36392
- import { defineCommand as defineCommand127 } from "citty";
36732
+ import { defineCommand as defineCommand128 } from "citty";
36393
36733
 
36394
36734
  // src/commands/gsc/query.ts
36395
36735
  import { appendFileSync as appendFileSync3, existsSync as existsSync8, readFileSync as readFileSync14, writeFileSync as writeFileSync5 } from "fs";
36396
36736
  import { resolve as resolve3 } from "path";
36397
- import { defineCommand as defineCommand124 } from "citty";
36737
+ import { defineCommand as defineCommand125 } from "citty";
36398
36738
 
36399
36739
  // src/commands/gsc/presets.ts
36400
36740
  var GSC_PRESETS = [
@@ -36588,7 +36928,7 @@ function handleError4(err) {
36588
36928
  });
36589
36929
  process.exit(1);
36590
36930
  }
36591
- var queryCommand3 = defineCommand124({
36931
+ var queryCommand3 = defineCommand125({
36592
36932
  meta: {
36593
36933
  name: "query",
36594
36934
  description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
@@ -36666,7 +37006,7 @@ Free-form (escape hatch):
36666
37006
  });
36667
37007
 
36668
37008
  // src/commands/gsc/sitemaps.ts
36669
- import { defineCommand as defineCommand125 } from "citty";
37009
+ import { defineCommand as defineCommand126 } from "citty";
36670
37010
  registerSchema({
36671
37011
  command: "gsc.sitemaps",
36672
37012
  description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
@@ -36675,7 +37015,7 @@ registerSchema({
36675
37015
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
36676
37016
  }
36677
37017
  });
36678
- var sitemapsCommand = defineCommand125({
37018
+ var sitemapsCommand = defineCommand126({
36679
37019
  meta: {
36680
37020
  name: "sitemaps",
36681
37021
  description: `List sitemaps for a site. Check health and errors.
@@ -36728,7 +37068,7 @@ Examples:
36728
37068
  });
36729
37069
 
36730
37070
  // src/commands/gsc/sites.ts
36731
- import { defineCommand as defineCommand126 } from "citty";
37071
+ import { defineCommand as defineCommand127 } from "citty";
36732
37072
  registerSchema({
36733
37073
  command: "gsc.sites",
36734
37074
  description: "List the Search Console sites this company connected \u2014 there can be several, and every one of them is yours to query. Returns the site URLs the query and sitemaps commands take.",
@@ -36744,7 +37084,7 @@ function siteHints(sites) {
36744
37084
  resources: sites.map((site) => ({ id: site.siteUrl, label: site.permissionLevel }))
36745
37085
  });
36746
37086
  }
36747
- var sitesCommand = defineCommand126({
37087
+ var sitesCommand = defineCommand127({
36748
37088
  meta: {
36749
37089
  name: "sites",
36750
37090
  description: `List verified Search Console sites.
@@ -36792,7 +37132,7 @@ Examples:
36792
37132
  });
36793
37133
 
36794
37134
  // src/commands/gsc/index.ts
36795
- var gscCommand = defineCommand127({
37135
+ var gscCommand = defineCommand128({
36796
37136
  meta: {
36797
37137
  name: "gsc",
36798
37138
  description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
@@ -36816,7 +37156,7 @@ Full guide: __tooling__/docs/tools/baker/gsc.md`
36816
37156
  });
36817
37157
 
36818
37158
  // src/commands/history/index.ts
36819
- import { defineCommand as defineCommand128 } from "citty";
37159
+ import { defineCommand as defineCommand129 } from "citty";
36820
37160
  registerSchema({
36821
37161
  command: "history.list",
36822
37162
  description: "Start here: unified account history (audit log) \u2014 everything that changed on this account, newest first: publishes, chat lifecycle, backlog actions, team changes, setup links, tags, schedules, ad-platform writes, followed advertisers, media, creatives, reports, domains, and integrations. Use it to see what happened recently before planning work. Compact by default; add --full for raw metadata per entry.",
@@ -36871,7 +37211,7 @@ function parseBoundedInt2(raw, name, min, max) {
36871
37211
  }
36872
37212
  return value;
36873
37213
  }
36874
- var listCommand13 = defineCommand128({
37214
+ var listCommand13 = defineCommand129({
36875
37215
  meta: {
36876
37216
  name: "list",
36877
37217
  description: "List recent account changes (unified audit log), newest first."
@@ -36917,7 +37257,7 @@ var listCommand13 = defineCommand128({
36917
37257
  }
36918
37258
  }
36919
37259
  });
36920
- var historyCommand = defineCommand128({
37260
+ var historyCommand = defineCommand129({
36921
37261
  meta: {
36922
37262
  name: "history",
36923
37263
  description: `Unified account history (audit log): what changed, who did it, and when.
@@ -36927,7 +37267,7 @@ Full guide: __tooling__/docs/tools/baker/history.md`
36927
37267
  });
36928
37268
 
36929
37269
  // src/commands/hubspot/index.ts
36930
- import { defineCommand as defineCommand129 } from "citty";
37270
+ import { defineCommand as defineCommand130 } from "citty";
36931
37271
  var EMBED_TYPES = ["legacy", "v4", "unknown"];
36932
37272
  function failNotConnected(err) {
36933
37273
  if (err instanceof ApiError && err.code === "FORBIDDEN" && err.message.includes(HUBSPOT_MISSING_GRANT_MARKER)) {
@@ -37081,7 +37421,7 @@ registerSchema({
37081
37421
  }
37082
37422
  }
37083
37423
  });
37084
- var formsListCommand = defineCommand129({
37424
+ var formsListCommand = defineCommand130({
37085
37425
  meta: {
37086
37426
  name: "list",
37087
37427
  description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
@@ -37126,7 +37466,7 @@ var formsListCommand = defineCommand129({
37126
37466
  }
37127
37467
  }
37128
37468
  });
37129
- var formsViewCommand = defineCommand129({
37469
+ var formsViewCommand = defineCommand130({
37130
37470
  meta: {
37131
37471
  name: "view",
37132
37472
  description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
@@ -37178,7 +37518,7 @@ var formsViewCommand = defineCommand129({
37178
37518
  }
37179
37519
  }
37180
37520
  });
37181
- var meetingsListCommand = defineCommand129({
37521
+ var meetingsListCommand = defineCommand130({
37182
37522
  meta: {
37183
37523
  name: "list",
37184
37524
  description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
@@ -37220,7 +37560,7 @@ var meetingsListCommand = defineCommand129({
37220
37560
  }
37221
37561
  }
37222
37562
  });
37223
- var meetingsViewCommand = defineCommand129({
37563
+ var meetingsViewCommand = defineCommand130({
37224
37564
  meta: {
37225
37565
  name: "view",
37226
37566
  description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
@@ -37264,7 +37604,7 @@ var meetingsViewCommand = defineCommand129({
37264
37604
  }
37265
37605
  }
37266
37606
  });
37267
- var formsSubmissionsCommand = defineCommand129({
37607
+ var formsSubmissionsCommand = defineCommand130({
37268
37608
  meta: {
37269
37609
  name: "submissions",
37270
37610
  description: "How many leads a form received, and when. Example: baker hubspot forms submissions <formId> --days 30"
@@ -37313,7 +37653,7 @@ var formsSubmissionsCommand = defineCommand129({
37313
37653
  }
37314
37654
  }
37315
37655
  });
37316
- var workflowsListCommand = defineCommand129({
37656
+ var workflowsListCommand = defineCommand130({
37317
37657
  meta: {
37318
37658
  name: "list",
37319
37659
  description: "List HubSpot workflows. Example: baker hubspot workflows list --enabled-only"
@@ -37378,7 +37718,7 @@ function workflowViewHints(workflow) {
37378
37718
  }
37379
37719
  return hints;
37380
37720
  }
37381
- var workflowsViewCommand = defineCommand129({
37721
+ var workflowsViewCommand = defineCommand130({
37382
37722
  meta: {
37383
37723
  name: "view",
37384
37724
  description: "Read one workflow's real configuration \u2014 enrolment, branches in order, and what each step writes. Example: baker hubspot workflows view 121183594 --full"
@@ -37405,7 +37745,7 @@ var workflowsViewCommand = defineCommand129({
37405
37745
  }
37406
37746
  }
37407
37747
  });
37408
- var pipelinesListCommand = defineCommand129({
37748
+ var pipelinesListCommand = defineCommand130({
37409
37749
  meta: {
37410
37750
  name: "list",
37411
37751
  description: "List HubSpot deal pipelines and their stages. Example: baker hubspot pipelines list"
@@ -37422,7 +37762,7 @@ var pipelinesListCommand = defineCommand129({
37422
37762
  }
37423
37763
  }
37424
37764
  });
37425
- var contactsSummaryCommand = defineCommand129({
37765
+ var contactsSummaryCommand = defineCommand130({
37426
37766
  meta: {
37427
37767
  name: "summary",
37428
37768
  description: "Whether recent leads are being worked, as counts. Example: baker hubspot contacts summary --days 30"
@@ -37492,7 +37832,7 @@ function contactLookupHints(data) {
37492
37832
  }
37493
37833
  return hints;
37494
37834
  }
37495
- var contactsLookupCommand = defineCommand129({
37835
+ var contactsLookupCommand = defineCommand130({
37496
37836
  meta: {
37497
37837
  name: "lookup",
37498
37838
  description: "Find one contact by email and see whether it was worked. Example: baker hubspot contacts lookup a@b.com"
@@ -37516,27 +37856,27 @@ var contactsLookupCommand = defineCommand129({
37516
37856
  }
37517
37857
  }
37518
37858
  });
37519
- var contactsCommand = defineCommand129({
37859
+ var contactsCommand = defineCommand130({
37520
37860
  meta: { name: "contacts", description: "Contacts on the connected HubSpot account." },
37521
37861
  subCommands: { summary: contactsSummaryCommand, lookup: contactsLookupCommand }
37522
37862
  });
37523
- var formsCommand = defineCommand129({
37863
+ var formsCommand = defineCommand130({
37524
37864
  meta: { name: "forms", description: "HubSpot forms on the connected account." },
37525
37865
  subCommands: { list: formsListCommand, view: formsViewCommand, submissions: formsSubmissionsCommand }
37526
37866
  });
37527
- var workflowsCommand = defineCommand129({
37867
+ var workflowsCommand = defineCommand130({
37528
37868
  meta: { name: "workflows", description: "HubSpot workflows on the connected account." },
37529
37869
  subCommands: { list: workflowsListCommand, view: workflowsViewCommand }
37530
37870
  });
37531
- var pipelinesCommand = defineCommand129({
37871
+ var pipelinesCommand = defineCommand130({
37532
37872
  meta: { name: "pipelines", description: "HubSpot deal pipelines on the connected account." },
37533
37873
  subCommands: { list: pipelinesListCommand }
37534
37874
  });
37535
- var meetingsCommand = defineCommand129({
37875
+ var meetingsCommand = defineCommand130({
37536
37876
  meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
37537
37877
  subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
37538
37878
  });
37539
- var hubspotCommand = defineCommand129({
37879
+ var hubspotCommand = defineCommand130({
37540
37880
  meta: {
37541
37881
  name: "hubspot",
37542
37882
  description: `Read the connected HubSpot account \u2014 forms, the leads they received, workflows, deal pipelines and
@@ -37574,10 +37914,10 @@ Full guide: __tooling__/docs/tools/baker/hubspot.md`
37574
37914
  });
37575
37915
 
37576
37916
  // src/commands/images/index.ts
37577
- import { defineCommand as defineCommand155 } from "citty";
37917
+ import { defineCommand as defineCommand156 } from "citty";
37578
37918
 
37579
37919
  // src/commands/images/crop.ts
37580
- import { defineCommand as defineCommand130 } from "citty";
37920
+ import { defineCommand as defineCommand131 } from "citty";
37581
37921
 
37582
37922
  // src/lib/image/crop-sprite.ts
37583
37923
  import sharp from "sharp";
@@ -37699,7 +38039,7 @@ function emitError2(err) {
37699
38039
  }
37700
38040
  process.exit(1);
37701
38041
  }
37702
- var cropCommand = defineCommand130({
38042
+ var cropCommand = defineCommand131({
37703
38043
  meta: {
37704
38044
  name: "crop",
37705
38045
  description: "Crop a rectangular region from an image.\n\nExample: baker images crop sprite.png --x 0 --y 0 --width 64 --height 64 --output icon.png"
@@ -37735,7 +38075,7 @@ var cropCommand = defineCommand130({
37735
38075
  });
37736
38076
 
37737
38077
  // src/commands/images/delete.ts
37738
- import { defineCommand as defineCommand131 } from "citty";
38078
+ import { defineCommand as defineCommand132 } from "citty";
37739
38079
  registerSchema({
37740
38080
  command: "images.delete",
37741
38081
  description: "Delete an image by ID",
@@ -37749,7 +38089,7 @@ registerSchema({
37749
38089
  }
37750
38090
  }
37751
38091
  });
37752
- var deleteCommand2 = defineCommand131({
38092
+ var deleteCommand2 = defineCommand132({
37753
38093
  meta: {
37754
38094
  name: "delete",
37755
38095
  description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
@@ -37790,7 +38130,7 @@ var deleteCommand2 = defineCommand131({
37790
38130
  });
37791
38131
 
37792
38132
  // src/commands/images/dimensions.ts
37793
- import { defineCommand as defineCommand132 } from "citty";
38133
+ import { defineCommand as defineCommand133 } from "citty";
37794
38134
 
37795
38135
  // src/lib/image/dimensions.ts
37796
38136
  import { imageSize } from "image-size";
@@ -37819,7 +38159,7 @@ registerSchema({
37819
38159
  }
37820
38160
  }
37821
38161
  });
37822
- var dimensionsCommand = defineCommand132({
38162
+ var dimensionsCommand = defineCommand133({
37823
38163
  meta: {
37824
38164
  name: "dimensions",
37825
38165
  description: "Read image dimensions without decoding the full file.\n\nExample: baker images dimensions ./logo.png\nExample: baker images dimensions https://acme.com/hero.png"
@@ -37875,7 +38215,7 @@ var dimensionsCommand = defineCommand132({
37875
38215
  });
37876
38216
 
37877
38217
  // src/commands/images/download.ts
37878
- import { defineCommand as defineCommand133 } from "citty";
38218
+ import { defineCommand as defineCommand134 } from "citty";
37879
38219
 
37880
38220
  // src/commands/images/downloadPaths.ts
37881
38221
  import { basename as basename2, extname as extname3, join as join6 } from "path";
@@ -38100,7 +38440,7 @@ function emitError3(err) {
38100
38440
  writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
38101
38441
  process.exit(1);
38102
38442
  }
38103
- var downloadCommand = defineCommand133({
38443
+ var downloadCommand = defineCommand134({
38104
38444
  meta: {
38105
38445
  name: "download",
38106
38446
  description: "Download image URLs and/or library images to local files \u2014 the missing first half of `source \u2192 download \u2192 normalize \u2192 place`. Never use `curl` for this.\n\nExamples:\n baker images download https://media.withbaker.com/\u2026/logo.webp\n baker images download j57abc123 j57def456 --out src/pages/pricing/_images/\n baker images download https://\u2026/hero.png --out ./hero.png"
@@ -38133,7 +38473,7 @@ var downloadCommand = defineCommand133({
38133
38473
  });
38134
38474
 
38135
38475
  // src/commands/images/extract.ts
38136
- import { defineCommand as defineCommand134 } from "citty";
38476
+ import { defineCommand as defineCommand135 } from "citty";
38137
38477
 
38138
38478
  // src/commands/images/autoIngest.ts
38139
38479
  var AUTO_INGEST_MAX = {
@@ -38180,7 +38520,7 @@ registerSchema({
38180
38520
  }
38181
38521
  }
38182
38522
  });
38183
- var extractCommand = defineCommand134({
38523
+ var extractCommand = defineCommand135({
38184
38524
  meta: {
38185
38525
  name: "extract",
38186
38526
  description: "Pull every image from a single URL via Firecrawl. ~$0.001/scrape. Cap auto-ingest at 20.\n\nExample: baker images extract https://stripe.com --auto-ingest 5"
@@ -38235,7 +38575,7 @@ var extractCommand = defineCommand134({
38235
38575
  });
38236
38576
 
38237
38577
  // src/commands/images/find.ts
38238
- import { defineCommand as defineCommand135 } from "citty";
38578
+ import { defineCommand as defineCommand136 } from "citty";
38239
38579
 
38240
38580
  // src/commands/images/providerHits.ts
38241
38581
  function asRecord3(value) {
@@ -38373,7 +38713,7 @@ registerSchema({
38373
38713
  full: { type: "boolean", description: "Include full metadata", required: false, default: false }
38374
38714
  }
38375
38715
  });
38376
- var findCommand = defineCommand135({
38716
+ var findCommand = defineCommand136({
38377
38717
  meta: {
38378
38718
  name: "find",
38379
38719
  description: "Library-first fanout image search. Opt in to providers with --sources. `--fallback` short-circuits to externals only when library is thin. With --auto-ingest, ingested external hits return Baker-owned URLs.\n\nExample: baker images find 'office' --sources library,magnific --limit 20"
@@ -38446,7 +38786,7 @@ var findCommand = defineCommand135({
38446
38786
  });
38447
38787
 
38448
38788
  // src/commands/images/get.ts
38449
- import { defineCommand as defineCommand136 } from "citty";
38789
+ import { defineCommand as defineCommand137 } from "citty";
38450
38790
  registerSchema({
38451
38791
  command: "images.get",
38452
38792
  description: "Get a single image by ID",
@@ -38454,7 +38794,7 @@ registerSchema({
38454
38794
  id: { type: "string", description: "Image ID", required: true }
38455
38795
  }
38456
38796
  });
38457
- var getCommand3 = defineCommand136({
38797
+ var getCommand3 = defineCommand137({
38458
38798
  meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
38459
38799
  args: {
38460
38800
  id: { type: "positional", description: "Image ID", required: false },
@@ -38490,7 +38830,7 @@ var getCommand3 = defineCommand136({
38490
38830
  });
38491
38831
 
38492
38832
  // src/commands/images/gif.ts
38493
- import { defineCommand as defineCommand137 } from "citty";
38833
+ import { defineCommand as defineCommand138 } from "citty";
38494
38834
  registerSchema({
38495
38835
  command: "images.gif",
38496
38836
  description: "Search Giphy for GIFs / reaction memes (paid social creative).",
@@ -38522,7 +38862,7 @@ registerSchema({
38522
38862
  }
38523
38863
  }
38524
38864
  });
38525
- var gifCommand = defineCommand137({
38865
+ var gifCommand = defineCommand138({
38526
38866
  meta: {
38527
38867
  name: "gif",
38528
38868
  description: "Search Giphy for GIFs / reaction memes \u2014 built for paid-social creative (Meta, TikTok, LinkedIn, X). Free API. Each hit carries WebP + GIF + MP4 URLs in providerMeta so you can pick the right format per platform.\n\nExample: baker images gif 'this is fine' --limit 10\nExample: baker images gif 'office reaction' --rating pg --auto-ingest 2\nExample: baker images gif --trending --limit 25"
@@ -38569,7 +38909,7 @@ var gifCommand = defineCommand137({
38569
38909
  });
38570
38910
 
38571
38911
  // src/commands/images/google.ts
38572
- import { defineCommand as defineCommand138 } from "citty";
38912
+ import { defineCommand as defineCommand139 } from "citty";
38573
38913
  var GOOGLE_ERROR_FIX = {
38574
38914
  action: "use_different_resource",
38575
38915
  explanation: "Generate the asset instead of retrying Google. Google is the last-resort image provider. Run `baker studio generate` to make the asset. Never sleep-and-retry this command \u2014 the CLI already backs off on rate limits. If no image can be sourced, continue the rest of the task with a placeholder rather than aborting it."
@@ -38609,7 +38949,7 @@ registerSchema({
38609
38949
  }
38610
38950
  }
38611
38951
  });
38612
- var googleCommand2 = defineCommand138({
38952
+ var googleCommand2 = defineCommand139({
38613
38953
  meta: {
38614
38954
  name: "google",
38615
38955
  description: "Google Images via the official Custom Search JSON API ($0.005/query, free 100/day). \u26A0 Source unverified \u2014 watermarks, low-res, mislabeled results are common. Use as last resort. With --auto-ingest, ingested hits return Baker-owned URLs.\n\nExample: baker images google 'industrial workshop' --type photo --size large --limit 20"
@@ -38682,7 +39022,7 @@ var googleCommand2 = defineCommand138({
38682
39022
  });
38683
39023
 
38684
39024
  // src/commands/images/group.ts
38685
- import { defineCommand as defineCommand139 } from "citty";
39025
+ import { defineCommand as defineCommand140 } from "citty";
38686
39026
 
38687
39027
  // src/commands/mediaGroup.ts
38688
39028
  async function runMediaGroupLookup(input) {
@@ -38735,7 +39075,7 @@ registerSchema({
38735
39075
  "group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
38736
39076
  }
38737
39077
  });
38738
- var groupCommand = defineCommand139({
39078
+ var groupCommand = defineCommand140({
38739
39079
  meta: {
38740
39080
  name: "group",
38741
39081
  description: "List every asset that arrived in the same set \u2014 the slides of one Instagram carousel, the images off one scraped page. Start here whenever a hit looks like part of a sequence: carousel slides are authored to be read in order and usually only make sense together. Takes an image or a video id, since one carousel can contain both. Example: baker images group <imageId>"
@@ -38755,7 +39095,7 @@ var groupCommand = defineCommand139({
38755
39095
  });
38756
39096
 
38757
39097
  // src/commands/images/icon.ts
38758
- import { defineCommand as defineCommand140 } from "citty";
39098
+ import { defineCommand as defineCommand141 } from "citty";
38759
39099
 
38760
39100
  // src/commands/images/brandVerification.ts
38761
39101
  function brandToken(domain) {
@@ -38852,7 +39192,7 @@ registerSchema({
38852
39192
  full: { type: "boolean", description: "Include full metadata", required: false, default: false }
38853
39193
  }
38854
39194
  });
38855
- var iconCommand = defineCommand140({
39195
+ var iconCommand = defineCommand141({
38856
39196
  meta: {
38857
39197
  name: "icon",
38858
39198
  description: "Icon via Iconify (simple-icons, logos, lucide, devicon, heroicons, tabler, phosphor, material-symbols, \u2026). Free CDN, no API key.\n\nExample: baker images icon react --set devicon\nExample: baker images icon lucide:check --color '#0a0a0a'"
@@ -38922,7 +39262,7 @@ var iconCommand = defineCommand140({
38922
39262
  });
38923
39263
 
38924
39264
  // src/commands/images/ingest.ts
38925
- import { defineCommand as defineCommand141 } from "citty";
39265
+ import { defineCommand as defineCommand142 } from "citty";
38926
39266
  var SOURCE_VALUES = imageSourceSchema.options.join(" | ");
38927
39267
  registerSchema({
38928
39268
  command: "images.ingest",
@@ -38937,7 +39277,7 @@ registerSchema({
38937
39277
  fields: { type: "string", description: "Comma-separated field names to include", required: false }
38938
39278
  }
38939
39279
  });
38940
- var ingestCommand = defineCommand141({
39280
+ var ingestCommand = defineCommand142({
38941
39281
  meta: {
38942
39282
  name: "ingest",
38943
39283
  description: "Download a remote URL and store it in the library. Hash-deduped on bytes + externalId.\n\nExample: baker images ingest https://img.freepik.com/free-photo/xyz.jpg --source magnific --external-id 12345"
@@ -39006,7 +39346,7 @@ var ingestCommand = defineCommand141({
39006
39346
  });
39007
39347
 
39008
39348
  // src/commands/images/layerize.ts
39009
- import { defineCommand as defineCommand142 } from "citty";
39349
+ import { defineCommand as defineCommand143 } from "citty";
39010
39350
  registerSchema({
39011
39351
  command: "images.layerize",
39012
39352
  description: "Split a library image into editable layers: transparent PNG cutouts for each element, plus any headline recovered as EDITABLE TEXT with its font, size, colour and position. Waits for completion by default. Costs credits.",
@@ -39070,7 +39410,7 @@ async function pollUntilSettled(imageId, maxWait) {
39070
39410
  }
39071
39411
  return null;
39072
39412
  }
39073
- var layerizeCommand = defineCommand142({
39413
+ var layerizeCommand = defineCommand143({
39074
39414
  meta: {
39075
39415
  name: "layerize",
39076
39416
  description: "Split a library image into editable layers \u2014 transparent cutouts per element, plus any baked-in headline recovered as editable text with its typography.\n\nStart here: baker images layerize j571abc123def\nExample: baker images layerize j571abc123def --full\nExample: baker images layerize j571abc123def --instructions 'keep the product and its shadow together'"
@@ -39139,7 +39479,7 @@ registerSchema({
39139
39479
  full: { type: "boolean", description: "Include geometry and typography for every layer", required: false }
39140
39480
  }
39141
39481
  });
39142
- var layersCommand = defineCommand142({
39482
+ var layersCommand = defineCommand143({
39143
39483
  meta: {
39144
39484
  name: "layers",
39145
39485
  description: "Read the layers of an image that has already been split. Free \u2014 no provider call.\n\nStart here: baker images layers j571abc123def\nExample: baker images layers j571abc123def --full"
@@ -39179,7 +39519,7 @@ var layersCommand = defineCommand142({
39179
39519
  });
39180
39520
 
39181
39521
  // src/commands/images/library.ts
39182
- import { defineCommand as defineCommand143 } from "citty";
39522
+ import { defineCommand as defineCommand144 } from "citty";
39183
39523
  registerSchema({
39184
39524
  command: "images.library",
39185
39525
  description: "Search the company image library. Returns only ready images.",
@@ -39205,7 +39545,7 @@ registerSchema({
39205
39545
  }
39206
39546
  }
39207
39547
  });
39208
- var libraryCommand = defineCommand143({
39548
+ var libraryCommand = defineCommand144({
39209
39549
  meta: {
39210
39550
  name: "library",
39211
39551
  description: "Search the company image library (hybrid BM25 + vector + Cohere rerank). Use this BEFORE any external provider.\n\nExample: baker images library 'hero banner' --aspect-ratio 16:9 --source magnific"
@@ -39268,7 +39608,7 @@ var libraryCommand = defineCommand143({
39268
39608
  });
39269
39609
 
39270
39610
  // src/commands/images/logo.ts
39271
- import { defineCommand as defineCommand144 } from "citty";
39611
+ import { defineCommand as defineCommand145 } from "citty";
39272
39612
  registerSchema({
39273
39613
  command: "images.logo",
39274
39614
  description: "Brand logo lookup via Brandfetch. Auto-ingests by default. Returns `brandMatch` \u2014 Brandfetch's own verdict on whose brand the domain is (confirmed | mismatch | unverified). Branch on it: `mismatch` means the mark is another company's, so do not place it. `confirmed` verifies the record, not the artwork \u2014 read the ingested row back to check the mark itself.",
@@ -39296,7 +39636,7 @@ registerSchema({
39296
39636
  full: { type: "boolean", description: "Include full metadata", required: false, default: false }
39297
39637
  }
39298
39638
  });
39299
- var logoCommand = defineCommand144({
39639
+ var logoCommand = defineCommand145({
39300
39640
  meta: {
39301
39641
  name: "logo",
39302
39642
  description: "Brand logo via Brandfetch. Returns up to 5 variants (icon, light/dark logo, light/dark symbol) plus `brandMatch`. Auto-ingests the first variant.\n\nStart here: check `brandMatch.verdict`.\n mismatch \u2192 the mark belongs to `brandMatch.name`, a different company. Do not place it.\n unverified \u2192 nothing confirmed whose logo this is. Treat as unchecked.\n confirmed \u2192 Brandfetch has this brand's record. That verifies the record, NOT the artwork \u2014 a confirmed domain has served another company's logo before.\n\n\u26A0 Whatever the verdict, read the ingested row back with `baker images get <imageId>` and check `textInImage`/`subject` before placing it. That is the only check that looks at the mark.\n\nExample: baker images logo stripe.com --variant logo"
@@ -39369,7 +39709,7 @@ var logoCommand = defineCommand144({
39369
39709
  });
39370
39710
 
39371
39711
  // src/commands/images/normalize.ts
39372
- import { defineCommand as defineCommand145 } from "citty";
39712
+ import { defineCommand as defineCommand146 } from "citty";
39373
39713
 
39374
39714
  // src/lib/image/color-changer.ts
39375
39715
  import quantize from "quantize";
@@ -40101,7 +40441,7 @@ function coerceRawArgs(args) {
40101
40441
  "dry-run": bool(args["dry-run"])
40102
40442
  };
40103
40443
  }
40104
- var normalizeCommand2 = defineCommand145({
40444
+ var normalizeCommand2 = defineCommand146({
40105
40445
  meta: {
40106
40446
  name: "normalize",
40107
40447
  description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
@@ -40156,7 +40496,7 @@ Examples:
40156
40496
  });
40157
40497
 
40158
40498
  // src/commands/images/pinterest.ts
40159
- import { defineCommand as defineCommand146 } from "citty";
40499
+ import { defineCommand as defineCommand147 } from "citty";
40160
40500
  registerSchema({
40161
40501
  command: "images.pinterest",
40162
40502
  description: "Pinterest image search via ScrapeCreators. Reference-grade real-world photography, product styling, interiors, fashion, food, and aesthetic mood boards. Inspect before placing \u2014 Pinterest is unverified, trademark-bearing web content.",
@@ -40176,7 +40516,7 @@ registerSchema({
40176
40516
  }
40177
40517
  }
40178
40518
  });
40179
- var pinterestCommand = defineCommand146({
40519
+ var pinterestCommand = defineCommand147({
40180
40520
  meta: {
40181
40521
  name: "pinterest",
40182
40522
  description: "Pinterest image search via ScrapeCreators ($0.00188/request). Best for photo-realistic reference imagery \u2014 lifestyle, interiors, fashion, food, product styling, and mood boards to brief AI generation against. \u26A0 Unverified, trademark-bearing web content \u2014 inspect and respect rights before placing on a customer page. Browse first; auto-ingest only the pins you commit to.\n\nExamples:\n baker images pinterest 'scandinavian living room'\n baker images pinterest 'minimalist skincare product photography' --limit 20\n baker images pinterest 'cozy coffee shop interior' --auto-ingest 2 --context 'Mood reference for hero photography'"
@@ -40233,7 +40573,7 @@ var pinterestCommand = defineCommand146({
40233
40573
  });
40234
40574
 
40235
40575
  // src/commands/images/screenshot.ts
40236
- import { defineCommand as defineCommand147 } from "citty";
40576
+ import { defineCommand as defineCommand148 } from "citty";
40237
40577
  registerSchema({
40238
40578
  command: "images.screenshot",
40239
40579
  description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
@@ -40252,7 +40592,7 @@ registerSchema({
40252
40592
  full: { type: "boolean", description: "Include full metadata", required: false, default: false }
40253
40593
  }
40254
40594
  });
40255
- var screenshotCommand = defineCommand147({
40595
+ var screenshotCommand = defineCommand148({
40256
40596
  meta: {
40257
40597
  name: "screenshot",
40258
40598
  description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
@@ -40316,7 +40656,7 @@ var screenshotCommand = defineCommand147({
40316
40656
  });
40317
40657
 
40318
40658
  // src/commands/images/search.ts
40319
- import { defineCommand as defineCommand148 } from "citty";
40659
+ import { defineCommand as defineCommand149 } from "citty";
40320
40660
  registerSchema({
40321
40661
  command: "images.search",
40322
40662
  description: "Search images by text query. Only returns ready images.",
@@ -40332,7 +40672,7 @@ registerSchema({
40332
40672
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
40333
40673
  }
40334
40674
  });
40335
- var searchCommand = defineCommand148({
40675
+ var searchCommand = defineCommand149({
40336
40676
  meta: {
40337
40677
  name: "search",
40338
40678
  description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
@@ -40392,7 +40732,7 @@ var searchCommand = defineCommand148({
40392
40732
  });
40393
40733
 
40394
40734
  // src/commands/images/sticker.ts
40395
- import { defineCommand as defineCommand149 } from "citty";
40735
+ import { defineCommand as defineCommand150 } from "citty";
40396
40736
  registerSchema({
40397
40737
  command: "images.sticker",
40398
40738
  description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
@@ -40424,7 +40764,7 @@ registerSchema({
40424
40764
  }
40425
40765
  }
40426
40766
  });
40427
- var stickerCommand = defineCommand149({
40767
+ var stickerCommand = defineCommand150({
40428
40768
  meta: {
40429
40769
  name: "sticker",
40430
40770
  description: "Search Giphy's sticker corpus \u2014 transparent-background WebPs / GIFs ideal for overlaying on ad creative (Meta, TikTok, Stories). Same Giphy free API as `baker images gif`; results carry WebP + GIF + MP4 URLs in providerMeta.\n\nExample: baker images sticker 'thumbs up' --limit 10\nExample: baker images sticker celebration --rating g --auto-ingest 3\nExample: baker images sticker --trending --limit 25"
@@ -40471,7 +40811,7 @@ var stickerCommand = defineCommand149({
40471
40811
  });
40472
40812
 
40473
40813
  // src/commands/images/stock.ts
40474
- import { defineCommand as defineCommand150 } from "citty";
40814
+ import { defineCommand as defineCommand151 } from "citty";
40475
40815
  var STOCK_ERROR_FIX = {
40476
40816
  action: "use_different_resource",
40477
40817
  explanation: "Switch provider instead of retrying stock search. Stock search is one of several image sources. Run `baker images find <query> --sources library,pinterest,google` (`--sources` is required \u2014 `find` alone searches the library only) or `baker studio generate` to make the asset. Never sleep-and-retry this command \u2014 the CLI already backs off on rate limits. If no image can be sourced, continue the rest of the task with a placeholder rather than aborting it."
@@ -40548,7 +40888,7 @@ function buildStockRequest(query, args) {
40548
40888
  if (args.context) body.descriptionContext = args.context;
40549
40889
  return body;
40550
40890
  }
40551
- var stockCommand = defineCommand150({
40891
+ var stockCommand = defineCommand151({
40552
40892
  meta: {
40553
40893
  name: "stock",
40554
40894
  description: "Stock search via Magnific \u2014 Freepik's developer API (~250M assets: photos, vectors, illustrations, icons, PSDs). $0.002/req. With --auto-ingest, ingested hits return Baker-owned URLs.\n\nExamples:\n baker images stock 'minimalist office'\n baker images stock 'flat office workers' --type vector\n baker images stock 'hero photo of a kitchen' --type photo --orientation landscape --ai exclude\n baker images stock 'brand pattern' --color '#0a0a0a' --license freemium --auto-ingest 2"
@@ -40621,7 +40961,7 @@ var stockCommand = defineCommand150({
40621
40961
  });
40622
40962
 
40623
40963
  // src/lib/tags-command.ts
40624
- import { defineCommand as defineCommand151 } from "citty";
40964
+ import { defineCommand as defineCommand152 } from "citty";
40625
40965
  function makeTagsCommand(command, label, endpoint) {
40626
40966
  registerSchema({
40627
40967
  command: `${command}.tags`,
@@ -40630,7 +40970,7 @@ function makeTagsCommand(command, label, endpoint) {
40630
40970
  output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
40631
40971
  }
40632
40972
  });
40633
- return defineCommand151({
40973
+ return defineCommand152({
40634
40974
  meta: {
40635
40975
  name: "tags",
40636
40976
  description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
@@ -40666,7 +41006,7 @@ function makeTagsCommand(command, label, endpoint) {
40666
41006
  var tagsCommand3 = makeTagsCommand("images", "image", "/api/images/tags");
40667
41007
 
40668
41008
  // src/commands/images/upload.ts
40669
- import { defineCommand as defineCommand152 } from "citty";
41009
+ import { defineCommand as defineCommand153 } from "citty";
40670
41010
  registerSchema({
40671
41011
  command: "images.upload",
40672
41012
  description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
@@ -40704,7 +41044,7 @@ registerSchema({
40704
41044
  function isRemoteUrl2(value) {
40705
41045
  return /^https?:\/\//i.test(value);
40706
41046
  }
40707
- var uploadCommand = defineCommand152({
41047
+ var uploadCommand = defineCommand153({
40708
41048
  meta: {
40709
41049
  name: "upload",
40710
41050
  description: "Upload an image to the library \u2014 accepts a local file path OR a remote http(s) URL.\n\nLocal: reads bytes, sends to /api/images/upload, content-type auto-detected from extension.\nRemote: dispatches to /api/images/ingest with hash-dedup on bytes + externalId.\n\nExamples:\n baker images upload ./logo.png --source uploaded\n baker images upload ./cert.png --context 'ISO 27001 badge \u2014 enterprise tier'\n baker images upload https://acme.com/hero.png --source firecrawl --context 'Acme competitor pricing hero'"
@@ -40797,7 +41137,7 @@ async function uploadLocal(target, args) {
40797
41137
  }
40798
41138
 
40799
41139
  // src/commands/images/upscale.ts
40800
- import { defineCommand as defineCommand153 } from "citty";
41140
+ import { defineCommand as defineCommand154 } from "citty";
40801
41141
  registerSchema({
40802
41142
  command: "images.upscale",
40803
41143
  description: "Upscale a library image via the backend (Replicate, cost-tracked). Waits for completion by default. The image must be status 'ready' and raster (not SVG/AVIF).",
@@ -40812,7 +41152,7 @@ registerSchema({
40812
41152
  }
40813
41153
  });
40814
41154
  var POLL_INTERVAL_MS4 = 1500;
40815
- var upscaleCommand = defineCommand153({
41155
+ var upscaleCommand = defineCommand154({
40816
41156
  meta: {
40817
41157
  name: "upscale",
40818
41158
  description: "Upscale a library image via the Convex backend (Replicate, cost-tracked at $0.05/image). Waits for completion by default.\n\nExample: baker images upscale j571abc123def\nExample: baker images upscale j571abc123def --max-wait 0 # fire-and-forget"
@@ -40867,7 +41207,7 @@ var upscaleCommand = defineCommand153({
40867
41207
  });
40868
41208
 
40869
41209
  // src/commands/images/use.ts
40870
- import { defineCommand as defineCommand154 } from "citty";
41210
+ import { defineCommand as defineCommand155 } from "citty";
40871
41211
  registerSchema({
40872
41212
  command: "images.use",
40873
41213
  description: "Ingest a URL and wait for the library record to be ready.",
@@ -40896,7 +41236,7 @@ function emitReady(ingestResult, doc, args) {
40896
41236
  args.full === true
40897
41237
  );
40898
41238
  }
40899
- var useCommand = defineCommand154({
41239
+ var useCommand = defineCommand155({
40900
41240
  meta: {
40901
41241
  name: "use",
40902
41242
  description: "Sugar over `ingest`: download \u2192 store \u2192 wait until describe + embed complete \u2192 return ready library record.\n\nExample: baker images use https://cdn.example.com/hero.png --source uploaded"
@@ -40945,7 +41285,7 @@ var useCommand = defineCommand154({
40945
41285
  });
40946
41286
 
40947
41287
  // src/commands/images/index.ts
40948
- var imagesCommand = defineCommand155({
41288
+ var imagesCommand = defineCommand156({
40949
41289
  meta: {
40950
41290
  name: "images",
40951
41291
  description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
@@ -41023,12 +41363,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
41023
41363
  });
41024
41364
 
41025
41365
  // src/commands/landing/index.ts
41026
- import { defineCommand as defineCommand166 } from "citty";
41366
+ import { defineCommand as defineCommand167 } from "citty";
41027
41367
 
41028
41368
  // src/commands/landing/critique.ts
41029
41369
  import { readdir as readdir9, stat as stat6 } from "fs/promises";
41030
41370
  import path29 from "path";
41031
- import { defineCommand as defineCommand156 } from "citty";
41371
+ import { defineCommand as defineCommand157 } from "citty";
41032
41372
 
41033
41373
  // src/engine/landing/lib/constants.ts
41034
41374
  var OVERUSED_FONTS = /* @__PURE__ */ new Set([
@@ -42204,14 +42544,14 @@ function parseCritiqueSlugs(args) {
42204
42544
  const all = [args.slug, ...rest].filter((s) => typeof s === "string" && s.length > 0);
42205
42545
  return [...new Set(all.map(String))];
42206
42546
  }
42207
- function fail5(code, message, fix) {
42547
+ function fail6(code, message, fix) {
42208
42548
  process.stderr.write(
42209
42549
  `${JSON.stringify({ ok: false, error: { code, message, ...fix ? { fix } : {} } }, null, 2)}
42210
42550
  `
42211
42551
  );
42212
42552
  process.exit(2);
42213
42553
  }
42214
- var critiqueCommand2 = defineCommand156({
42554
+ var critiqueCommand2 = defineCommand157({
42215
42555
  meta: {
42216
42556
  name: "critique",
42217
42557
  description: "Start here: `baker landing critique <slug>` after building or editing a landing. Deterministic design-quality critic (ADVISORY \u2014 findings never fail it). Flags the known AI design tells (gradient text, overused fonts, side-tab borders, cream palettes, buzzword copy, broken images) tiered block/warn/advisory, respecting the client's BRAND.md as the allowlist. Also records the critique that publishing requires \u2014 run it before finishing a landing."
@@ -42229,14 +42569,14 @@ var critiqueCommand2 = defineCommand156({
42229
42569
  const projectRoot = process.cwd();
42230
42570
  for (const slug of slugs) {
42231
42571
  if (!SLUG_RE.test(slug) || slug.includes("..")) {
42232
- fail5(
42572
+ fail6(
42233
42573
  "INVALID_SLUG",
42234
42574
  `"${slug}" is not a landing slug \u2014 use the folder name directly under src/pages/ (letters, digits, dashes; not a path, not a _-private folder).`,
42235
42575
  { availableSlugs: await listLandingSlugs(projectRoot) }
42236
42576
  );
42237
42577
  }
42238
42578
  if (!await isDir(path29.resolve(projectRoot, "src", "pages", slug))) {
42239
- fail5("NOT_FOUND", `No landing at src/pages/${slug}/`, {
42579
+ fail6("NOT_FOUND", `No landing at src/pages/${slug}/`, {
42240
42580
  availableSlugs: await listLandingSlugs(projectRoot)
42241
42581
  });
42242
42582
  }
@@ -42320,10 +42660,10 @@ async function isDir(p) {
42320
42660
  }
42321
42661
 
42322
42662
  // src/commands/landing/inspiration/index.ts
42323
- import { defineCommand as defineCommand165 } from "citty";
42663
+ import { defineCommand as defineCommand166 } from "citty";
42324
42664
 
42325
42665
  // src/commands/landing/inspiration/add.ts
42326
- import { defineCommand as defineCommand157 } from "citty";
42666
+ import { defineCommand as defineCommand158 } from "citty";
42327
42667
 
42328
42668
  // src/commands/landing/inspiration/shared.ts
42329
42669
  var INSPIRATION_HINTS = {
@@ -42405,7 +42745,7 @@ registerSchema({
42405
42745
  note: { type: "string", description: "Why this page is worth keeping", required: false }
42406
42746
  }
42407
42747
  });
42408
- var addCommand = defineCommand157({
42748
+ var addCommand = defineCommand158({
42409
42749
  meta: {
42410
42750
  name: "add",
42411
42751
  description: "Add someone else's landing page to the reference library. Example: baker landing inspiration add https://linear.app --note 'the client likes this density'"
@@ -42447,7 +42787,7 @@ var addCommand = defineCommand157({
42447
42787
  // src/commands/landing/inspiration/code.ts
42448
42788
  import { mkdir as mkdir10, writeFile as writeFile14 } from "fs/promises";
42449
42789
  import path30 from "path";
42450
- import { defineCommand as defineCommand158 } from "citty";
42790
+ import { defineCommand as defineCommand159 } from "citty";
42451
42791
  registerSchema({
42452
42792
  command: "landing.inspiration.code",
42453
42793
  description: "Write a reference section's standalone HTML+CSS to .baker/inspiration/<id>/ so you can read how it is built. Reference only \u2014 the structure is the lesson, the words are not yours to reuse. Consulting a section records it, and `baker landing critique` blocks a publish that ships its copy verbatim.",
@@ -42456,7 +42796,7 @@ registerSchema({
42456
42796
  full: { type: "boolean", description: "Print the markup inline as well as writing it", required: false }
42457
42797
  }
42458
42798
  });
42459
- var codeCommand = defineCommand158({
42799
+ var codeCommand = defineCommand159({
42460
42800
  meta: {
42461
42801
  name: "code",
42462
42802
  description: "Write one reference section's standalone markup to disk. Example: baker landing inspiration code k57abc\u2026 \u2014 read it for structure, then build your own."
@@ -42513,7 +42853,7 @@ var codeCommand = defineCommand158({
42513
42853
  });
42514
42854
 
42515
42855
  // src/commands/landing/inspiration/favorites.ts
42516
- import { defineCommand as defineCommand159 } from "citty";
42856
+ import { defineCommand as defineCommand160 } from "citty";
42517
42857
  registerSchema({
42518
42858
  command: "landing.inspiration.favorites",
42519
42859
  description: "List the reference sections this company has saved. This is what `search` looks at by default, so it is the client's own taste profile \u2014 read it before proposing a direction.",
@@ -42527,7 +42867,7 @@ registerSchema({
42527
42867
  }
42528
42868
  }
42529
42869
  });
42530
- var favoritesCommand = defineCommand159({
42870
+ var favoritesCommand = defineCommand160({
42531
42871
  meta: {
42532
42872
  name: "favorites",
42533
42873
  description: "List this company's saved reference sections. Example: baker landing inspiration favorites --type hero,pricing"
@@ -42607,7 +42947,7 @@ registerSchema({
42607
42947
  note: { type: "string", description: "Why this is worth keeping", required: false }
42608
42948
  }
42609
42949
  });
42610
- var favoriteCommand = defineCommand159({
42950
+ var favoriteCommand = defineCommand160({
42611
42951
  meta: {
42612
42952
  name: "favorite",
42613
42953
  description: "Save a reference section to this company. Example: baker landing inspiration favorite k57abc\u2026"
@@ -42645,7 +42985,7 @@ registerSchema({
42645
42985
  page: { type: "boolean", description: "Treat the id as a page rather than a section", required: false }
42646
42986
  }
42647
42987
  });
42648
- var unfavoriteCommand = defineCommand159({
42988
+ var unfavoriteCommand = defineCommand160({
42649
42989
  meta: {
42650
42990
  name: "unfavorite",
42651
42991
  description: "Remove a reference section from this company's saved set. Example: baker landing inspiration unfavorite k57abc\u2026"
@@ -42667,7 +43007,7 @@ var unfavoriteCommand = defineCommand159({
42667
43007
  });
42668
43008
 
42669
43009
  // src/commands/landing/inspiration/page.ts
42670
- import { defineCommand as defineCommand160 } from "citty";
43010
+ import { defineCommand as defineCommand161 } from "citty";
42671
43011
  registerSchema({
42672
43012
  command: "landing.inspiration.page",
42673
43013
  description: "Show a whole reference page as a sequence: every section top to bottom with its type and the idea behind it. This is the view to use when the question is how a good page is ORDERED rather than what one section looks like.",
@@ -42684,7 +43024,7 @@ registerSchema({
42684
43024
  }
42685
43025
  }
42686
43026
  });
42687
- var pageCommand2 = defineCommand160({
43027
+ var pageCommand2 = defineCommand161({
42688
43028
  meta: {
42689
43029
  name: "page",
42690
43030
  description: "Show how a reference page sequences its sections. Example: baker landing inspiration page j91xyz\u2026 \u2014 the blueprint, not the pixels."
@@ -42749,7 +43089,7 @@ var pageCommand2 = defineCommand160({
42749
43089
  // src/commands/landing/inspiration/scrape.ts
42750
43090
  import { readFile as readFile23 } from "fs/promises";
42751
43091
  import path34 from "path";
42752
- import { defineCommand as defineCommand161 } from "citty";
43092
+ import { defineCommand as defineCommand162 } from "citty";
42753
43093
 
42754
43094
  // src/engine/landing/lib/capturedReferences.ts
42755
43095
  var MAX_STRINGS_PER_SECTION = 40;
@@ -44928,7 +45268,7 @@ registerSchema({
44928
45268
  report: { type: "boolean", description: "Write report.html. `--no-report` to skip", required: false }
44929
45269
  }
44930
45270
  });
44931
- var scrapeCommand = defineCommand161({
45271
+ var scrapeCommand = defineCommand162({
44932
45272
  meta: {
44933
45273
  name: "scrape",
44934
45274
  description: "Capture a landing page to a directory, now. Example: baker landing inspiration scrape https://linear.app --out .baker/inspiration/linear.app"
@@ -45038,7 +45378,7 @@ var scrapeCommand = defineCommand161({
45038
45378
 
45039
45379
  // src/commands/landing/inspiration/search.ts
45040
45380
  import path36 from "path";
45041
- import { defineCommand as defineCommand162 } from "citty";
45381
+ import { defineCommand as defineCommand163 } from "citty";
45042
45382
 
45043
45383
  // src/commands/landing/inspiration/shot.ts
45044
45384
  import { mkdir as mkdir12, writeFile as writeFile17 } from "fs/promises";
@@ -45175,7 +45515,7 @@ async function downloadShots(results) {
45175
45515
  );
45176
45516
  return saved;
45177
45517
  }
45178
- var searchCommand2 = defineCommand162({
45518
+ var searchCommand2 = defineCommand163({
45179
45519
  meta: {
45180
45520
  name: "search",
45181
45521
  description: "Search real landing-page sections for reference. Example: baker landing inspiration search 'dark developer hero with a terminal' --register dev-tool-minimal --scope all"
@@ -45273,7 +45613,7 @@ var searchCommand2 = defineCommand162({
45273
45613
  });
45274
45614
 
45275
45615
  // src/commands/landing/inspiration/sequences.ts
45276
- import { defineCommand as defineCommand163 } from "citty";
45616
+ import { defineCommand as defineCommand164 } from "citty";
45277
45617
  var COMPACT_TRANSITIONS = 12;
45278
45618
  var COMPACT_ENDS = 5;
45279
45619
  var MAX_PAGES = 50;
@@ -45347,7 +45687,7 @@ function sequencesHints(data, { scope, full }) {
45347
45687
  if (scope === "favorites") hints.push(...favoritesScopeHints(data.favoritesHealth, data.pagesReturned));
45348
45688
  return hints;
45349
45689
  }
45350
- var sequencesCommand = defineCommand163({
45690
+ var sequencesCommand = defineCommand164({
45351
45691
  meta: {
45352
45692
  name: "sequences",
45353
45693
  description: "What section follows what, across many real pages at once. Example: baker landing inspiration sequences 'developer tool pricing page' --scope all \u2014 the evidence for how to order a page you are about to build."
@@ -45397,7 +45737,7 @@ var sequencesCommand = defineCommand163({
45397
45737
 
45398
45738
  // src/commands/landing/inspiration/view.ts
45399
45739
  import path37 from "path";
45400
- import { defineCommand as defineCommand164 } from "citty";
45740
+ import { defineCommand as defineCommand165 } from "citty";
45401
45741
  registerSchema({
45402
45742
  command: "landing.inspiration.view",
45403
45743
  description: "Everything known about one section: composition, motion, design tokens, the copy it uses, why it works, and what must change to make it yours. Downloads the desktop and mobile screenshots plus the motion filmstrip so you can look at them.",
@@ -45410,7 +45750,7 @@ registerSchema({
45410
45750
  }
45411
45751
  }
45412
45752
  });
45413
- var viewCommand2 = defineCommand164({
45753
+ var viewCommand2 = defineCommand165({
45414
45754
  meta: {
45415
45755
  name: "view",
45416
45756
  description: "Full detail for one reference section. Example: baker landing inspiration view k57abc\u2026 \u2014 read the screenshots it saves before you build."
@@ -45494,7 +45834,7 @@ var viewCommand2 = defineCommand164({
45494
45834
  });
45495
45835
 
45496
45836
  // src/commands/landing/inspiration/index.ts
45497
- var inspirationCommand = defineCommand165({
45837
+ var inspirationCommand = defineCommand166({
45498
45838
  meta: {
45499
45839
  name: "inspiration",
45500
45840
  description: `Reference library of real landing-page sections \u2014 look at how good pages actually solve a problem before you design one.
@@ -45539,7 +45879,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
45539
45879
  });
45540
45880
 
45541
45881
  // src/commands/landing/index.ts
45542
- var landingCommand = defineCommand166({
45882
+ var landingCommand = defineCommand167({
45543
45883
  meta: {
45544
45884
  name: "landing",
45545
45885
  description: `Design-quality tools for landing pages (src/pages/<slug>/).
@@ -45557,7 +45897,7 @@ Subcommands:
45557
45897
  });
45558
45898
 
45559
45899
  // src/commands/mcp/index.ts
45560
- import { defineCommand as defineCommand167 } from "citty";
45900
+ import { defineCommand as defineCommand168 } from "citty";
45561
45901
 
45562
45902
  // src/commands/mcp/platforms.ts
45563
45903
  function readsKey(label) {
@@ -45612,7 +45952,7 @@ function parseHeaders(raw) {
45612
45952
  }
45613
45953
  return Object.keys(headers).length > 0 ? headers : void 0;
45614
45954
  }
45615
- function fail6(err) {
45955
+ function fail7(err) {
45616
45956
  if (err instanceof ApiError) {
45617
45957
  writeJson({ ok: false, error: { code: err.code, message: err.message } });
45618
45958
  process.exit(1);
@@ -45626,7 +45966,7 @@ registerSchema({
45626
45966
  description: "List everything this chat can reach: managed integrations (Attio, Slack, Gmail, Google Sheets, \u2026), custom MCP servers, and the platforms the company signed in to (HubSpot, Google Ads, GA4, Search Console, Tag Manager) which you read through their own `baker` commands. Start here when the user mentions an external tool or platform.",
45627
45967
  args: {}
45628
45968
  });
45629
- var connectedCommand = defineCommand167({
45969
+ var connectedCommand = defineCommand168({
45630
45970
  meta: {
45631
45971
  name: "connected",
45632
45972
  description: `Everything this chat can reach \u2014 managed integrations, custom MCP servers, and connected platforms.
@@ -45676,7 +46016,7 @@ A tool or platform the user names that is NOT listed anywhere here is simply not
45676
46016
  hints
45677
46017
  });
45678
46018
  } catch (err) {
45679
- fail6(err);
46019
+ fail7(err);
45680
46020
  }
45681
46021
  }
45682
46022
  });
@@ -45685,7 +46025,7 @@ registerSchema({
45685
46025
  description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
45686
46026
  args: {}
45687
46027
  });
45688
- var listCommand14 = defineCommand167({
46028
+ var listCommand14 = defineCommand168({
45689
46029
  meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
45690
46030
  run: async () => {
45691
46031
  try {
@@ -45704,7 +46044,7 @@ var listCommand14 = defineCommand167({
45704
46044
  } : {}
45705
46045
  });
45706
46046
  } catch (err) {
45707
- fail6(err);
46047
+ fail7(err);
45708
46048
  }
45709
46049
  }
45710
46050
  });
@@ -45722,7 +46062,7 @@ registerSchema({
45722
46062
  header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
45723
46063
  }
45724
46064
  });
45725
- var addCommand2 = defineCommand167({
46065
+ var addCommand2 = defineCommand168({
45726
46066
  meta: {
45727
46067
  name: "add",
45728
46068
  description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
@@ -45765,7 +46105,7 @@ Examples:
45765
46105
  ]
45766
46106
  });
45767
46107
  } catch (err) {
45768
- fail6(err);
46108
+ fail7(err);
45769
46109
  }
45770
46110
  }
45771
46111
  });
@@ -45774,7 +46114,7 @@ registerSchema({
45774
46114
  description: "Remove a company custom MCP server by name.",
45775
46115
  args: { name: { type: "string", description: "Server name to remove", required: true } }
45776
46116
  });
45777
- var removeCommand4 = defineCommand167({
46117
+ var removeCommand4 = defineCommand168({
45778
46118
  meta: {
45779
46119
  name: "remove",
45780
46120
  description: `Remove a company custom MCP server by name.
@@ -45792,11 +46132,11 @@ Example:
45792
46132
  });
45793
46133
  writeJson({ ok: true, data });
45794
46134
  } catch (err) {
45795
- fail6(err);
46135
+ fail7(err);
45796
46136
  }
45797
46137
  }
45798
46138
  });
45799
- var mcpCommand = defineCommand167({
46139
+ var mcpCommand = defineCommand168({
45800
46140
  meta: {
45801
46141
  name: "mcp",
45802
46142
  description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
@@ -45822,10 +46162,10 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
45822
46162
  });
45823
46163
 
45824
46164
  // src/commands/research/index.ts
45825
- import { defineCommand as defineCommand179 } from "citty";
46165
+ import { defineCommand as defineCommand180 } from "citty";
45826
46166
 
45827
46167
  // src/commands/research/advertisers.ts
45828
- import { defineCommand as defineCommand168 } from "citty";
46168
+ import { defineCommand as defineCommand169 } from "citty";
45829
46169
 
45830
46170
  // src/commands/research/hints.ts
45831
46171
  var AD_COPY_ROUTE = 'This returns competing DOMAINS and their SERP economics \u2014 no ad copy, no headlines, no creative. For the actual copy of a competitor\'s ads: `baker winning-ads advertisers "<brand>"` \u2192 `baker winning-ads search "<brief>" --advertiser-id <id>` \u2192 `baker winning-ads content <adId>` (`primary_text` / `headline` / `cta`, plus the spoken transcript and on-screen text for video). That corpus is Meta and LinkedIn only \u2014 Google SERP ad copy is not available through any Baker command, so do not keep querying for it here.';
@@ -46008,7 +46348,7 @@ var FIELDS3 = {
46008
46348
  etv: "Estimated traffic value (USD)",
46009
46349
  visibility: "SERP visibility score (0-1)"
46010
46350
  };
46011
- var advertisersCommand = defineCommand168({
46351
+ var advertisersCommand = defineCommand169({
46012
46352
  meta: {
46013
46353
  name: "advertisers",
46014
46354
  description: `Domains competing for a keyword in Google SERPs, with position, relevance, traffic value and visibility. Returns NO ad copy \u2014 for a competitor's headlines and body copy use \`baker winning-ads content <adId>\` (Meta/LinkedIn only).
@@ -46064,7 +46404,7 @@ Examples:
46064
46404
  });
46065
46405
 
46066
46406
  // src/commands/research/autocomplete.ts
46067
- import { defineCommand as defineCommand169 } from "citty";
46407
+ import { defineCommand as defineCommand170 } from "citty";
46068
46408
  registerSchema({
46069
46409
  command: "research.autocomplete",
46070
46410
  description: "Get Google Autocomplete suggestions for a seed keyword. Useful for keyword expansion and discovering what people actually search for. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en).",
@@ -46087,7 +46427,7 @@ registerSchema({
46087
46427
  var FIELDS4 = {
46088
46428
  suggestion: "Autocomplete suggestion from Google"
46089
46429
  };
46090
- var autocompleteCommand = defineCommand169({
46430
+ var autocompleteCommand = defineCommand170({
46091
46431
  meta: {
46092
46432
  name: "autocomplete",
46093
46433
  description: `Get Google Autocomplete suggestions for keyword expansion.
@@ -46142,7 +46482,7 @@ Examples:
46142
46482
  });
46143
46483
 
46144
46484
  // src/commands/research/countries.ts
46145
- import { defineCommand as defineCommand170 } from "citty";
46485
+ import { defineCommand as defineCommand171 } from "citty";
46146
46486
  registerSchema({
46147
46487
  command: "research.countries",
46148
46488
  description: "List all supported country codes for --location flag in research commands.",
@@ -46199,7 +46539,7 @@ var FIELDS5 = {
46199
46539
  code: "Country code to pass as --location",
46200
46540
  name: "Country name"
46201
46541
  };
46202
- var countriesCommand = defineCommand170({
46542
+ var countriesCommand = defineCommand171({
46203
46543
  meta: {
46204
46544
  name: "countries",
46205
46545
  description: "List all supported country codes for --location flag."
@@ -46210,7 +46550,7 @@ var countriesCommand = defineCommand170({
46210
46550
  });
46211
46551
 
46212
46552
  // src/commands/research/fetch.ts
46213
- import { defineCommand as defineCommand171 } from "citty";
46553
+ import { defineCommand as defineCommand172 } from "citty";
46214
46554
  var CONTENT_PREVIEW_CHARS = 2e4;
46215
46555
  var TIMEOUT_MS = 18e4;
46216
46556
  registerSchema({
@@ -46283,7 +46623,7 @@ function fetchFix(code) {
46283
46623
  explanation: "This read failed. Don't build a retry ladder around it \u2014 finish the rest of the job with what you can reach and name this page as a gap."
46284
46624
  };
46285
46625
  }
46286
- var fetchCommand = defineCommand171({
46626
+ var fetchCommand = defineCommand172({
46287
46627
  meta: {
46288
46628
  name: "fetch",
46289
46629
  description: `Read a page an ordinary web fetch could not. Bot walls and JavaScript-rendered pages are resolved for you \u2014 you never have to retry, wait, or drive a browser yourself.
@@ -46360,7 +46700,7 @@ Examples:
46360
46700
  });
46361
46701
 
46362
46702
  // src/commands/research/intent.ts
46363
- import { defineCommand as defineCommand172 } from "citty";
46703
+ import { defineCommand as defineCommand173 } from "citty";
46364
46704
  registerSchema({
46365
46705
  command: "research.intent",
46366
46706
  description: "Classify Google Search intent for keywords. Determines if someone searching is looking to buy, research, or navigate. IMPORTANT: If --language is omitted, defaults to English (en). The response includes a query_context object showing which language was used.",
@@ -46383,7 +46723,7 @@ var FIELDS7 = {
46383
46723
  intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
46384
46724
  probability: "Confidence score 0.0-1.0"
46385
46725
  };
46386
- var intentCommand = defineCommand172({
46726
+ var intentCommand = defineCommand173({
46387
46727
  meta: {
46388
46728
  name: "intent",
46389
46729
  description: `Classify Google Search intent for keywords. Returns intent type and confidence.
@@ -46431,7 +46771,7 @@ Examples:
46431
46771
  });
46432
46772
 
46433
46773
  // src/commands/research/keyword-gap.ts
46434
- import { defineCommand as defineCommand173 } from "citty";
46774
+ import { defineCommand as defineCommand174 } from "citty";
46435
46775
  registerSchema({
46436
46776
  command: "research.keyword-gap",
46437
46777
  description: "Find keywords a competitor ranks for (organic or paid) that you don't. Discovers expansion opportunities. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en). The response includes a query_context object showing which location/language were used.",
@@ -46460,7 +46800,7 @@ var FIELDS8 = {
46460
46800
  cpc: "Cost per click USD",
46461
46801
  their_position: "Competitor's ranking position"
46462
46802
  };
46463
- var keywordGapCommand = defineCommand173({
46803
+ var keywordGapCommand = defineCommand174({
46464
46804
  meta: {
46465
46805
  name: "keyword-gap",
46466
46806
  description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
@@ -46535,7 +46875,7 @@ Examples:
46535
46875
  });
46536
46876
 
46537
46877
  // src/commands/research/keywords-for-site.ts
46538
- import { defineCommand as defineCommand174 } from "citty";
46878
+ import { defineCommand as defineCommand175 } from "citty";
46539
46879
  registerSchema({
46540
46880
  command: "research.keywords-for-site",
46541
46881
  description: "Get keywords a competitor targets in Google. Use --type paid to see only paid keywords, --type organic for organic only. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en). The response includes a query_context object showing which location/language were used.",
@@ -46568,7 +46908,7 @@ var FIELDS9 = {
46568
46908
  competition: "LOW, MEDIUM, or HIGH",
46569
46909
  competition_index: "Competition score 0-100"
46570
46910
  };
46571
- var keywordsForSiteCommand = defineCommand174({
46911
+ var keywordsForSiteCommand = defineCommand175({
46572
46912
  meta: {
46573
46913
  name: "keywords-for-site",
46574
46914
  description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
@@ -46630,7 +46970,7 @@ Examples:
46630
46970
  });
46631
46971
 
46632
46972
  // src/commands/research/languages.ts
46633
- import { defineCommand as defineCommand175 } from "citty";
46973
+ import { defineCommand as defineCommand176 } from "citty";
46634
46974
  registerSchema({
46635
46975
  command: "research.languages",
46636
46976
  description: "List all supported language codes for --language flag in research commands.",
@@ -46660,7 +47000,7 @@ var FIELDS10 = {
46660
47000
  code: "Language code to pass as --language",
46661
47001
  name: "Language name (also accepted by --language)"
46662
47002
  };
46663
- var languagesCommand2 = defineCommand175({
47003
+ var languagesCommand2 = defineCommand176({
46664
47004
  meta: {
46665
47005
  name: "languages",
46666
47006
  description: "List all supported language codes for --language flag."
@@ -46671,7 +47011,7 @@ var languagesCommand2 = defineCommand175({
46671
47011
  });
46672
47012
 
46673
47013
  // src/commands/research/lighthouse.ts
46674
- import { defineCommand as defineCommand176 } from "citty";
47014
+ import { defineCommand as defineCommand177 } from "citty";
46675
47015
  registerSchema({
46676
47016
  command: "research.lighthouse",
46677
47017
  description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
@@ -46690,7 +47030,7 @@ var FIELDS11 = {
46690
47030
  speed_index_ms: "Speed Index in ms (good: < 3400)",
46691
47031
  interactive_ms: "Time to Interactive in ms (good: < 3800)"
46692
47032
  };
46693
- var lighthouseCommand = defineCommand176({
47033
+ var lighthouseCommand = defineCommand177({
46694
47034
  meta: {
46695
47035
  name: "lighthouse",
46696
47036
  description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
@@ -46728,7 +47068,7 @@ Examples:
46728
47068
  });
46729
47069
 
46730
47070
  // src/commands/research/relevant-pages.ts
46731
- import { defineCommand as defineCommand177 } from "citty";
47071
+ import { defineCommand as defineCommand178 } from "citty";
46732
47072
  registerSchema({
46733
47073
  command: "research.relevant-pages",
46734
47074
  description: "Get the top pages of a competitor domain with organic traffic and ranking data. Shows which pages drive the most traffic. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en).",
@@ -46754,7 +47094,7 @@ var FIELDS12 = {
46754
47094
  keywords: "Total organic keywords the page ranks for",
46755
47095
  top_10: "Keywords in positions 1-10"
46756
47096
  };
46757
- var relevantPagesCommand = defineCommand177({
47097
+ var relevantPagesCommand = defineCommand178({
46758
47098
  meta: {
46759
47099
  name: "relevant-pages",
46760
47100
  description: `Get the top pages of a competitor domain with traffic data.
@@ -46801,7 +47141,7 @@ Examples:
46801
47141
  });
46802
47142
 
46803
47143
  // src/commands/research/web.ts
46804
- import { defineCommand as defineCommand178 } from "citty";
47144
+ import { defineCommand as defineCommand179 } from "citty";
46805
47145
  registerSchema({
46806
47146
  command: "research.web",
46807
47147
  description: "Search the web with AI to answer marketing questions \u2014 competitors, ICP, pricing, pain points, market trends. Three depth levels: medium (quick, default), high (thorough), xhigh (exhaustive deep research).",
@@ -46852,7 +47192,7 @@ async function runDeepResearch(question) {
46852
47192
  }
46853
47193
  throw new Error("Deep research timed out");
46854
47194
  }
46855
- var webCommand = defineCommand178({
47195
+ var webCommand = defineCommand179({
46856
47196
  meta: {
46857
47197
  name: "web",
46858
47198
  description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
@@ -46914,7 +47254,7 @@ Examples:
46914
47254
  });
46915
47255
 
46916
47256
  // src/commands/research/index.ts
46917
- var researchCommand = defineCommand179({
47257
+ var researchCommand = defineCommand180({
46918
47258
  meta: {
46919
47259
  name: "research",
46920
47260
  description: `Competitive intelligence and AI-powered research commands.
@@ -46958,10 +47298,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
46958
47298
  });
46959
47299
 
46960
47300
  // src/commands/scheduled-actions/index.ts
46961
- import { defineCommand as defineCommand187 } from "citty";
47301
+ import { defineCommand as defineCommand188 } from "citty";
46962
47302
 
46963
47303
  // src/commands/scheduled-actions/create.ts
46964
- import { defineCommand as defineCommand180 } from "citty";
47304
+ import { defineCommand as defineCommand181 } from "citty";
46965
47305
 
46966
47306
  // src/commands/scheduled-actions/shared.ts
46967
47307
  var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
@@ -47108,7 +47448,7 @@ registerSchema({
47108
47448
  }
47109
47449
  }
47110
47450
  });
47111
- var createCommand3 = defineCommand180({
47451
+ var createCommand3 = defineCommand181({
47112
47452
  meta: {
47113
47453
  name: "create",
47114
47454
  description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
@@ -47167,7 +47507,7 @@ var createCommand3 = defineCommand180({
47167
47507
  });
47168
47508
 
47169
47509
  // src/commands/scheduled-actions/delete.ts
47170
- import { defineCommand as defineCommand181 } from "citty";
47510
+ import { defineCommand as defineCommand182 } from "citty";
47171
47511
  registerSchema({
47172
47512
  command: "scheduled-actions.delete",
47173
47513
  description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
@@ -47175,7 +47515,7 @@ registerSchema({
47175
47515
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
47176
47516
  }
47177
47517
  });
47178
- var deleteCommand3 = defineCommand181({
47518
+ var deleteCommand3 = defineCommand182({
47179
47519
  meta: {
47180
47520
  name: "delete",
47181
47521
  description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
@@ -47204,7 +47544,7 @@ var deleteCommand3 = defineCommand181({
47204
47544
  });
47205
47545
 
47206
47546
  // src/commands/scheduled-actions/get.ts
47207
- import { defineCommand as defineCommand182 } from "citty";
47547
+ import { defineCommand as defineCommand183 } from "citty";
47208
47548
  registerSchema({
47209
47549
  command: "scheduled-actions.get",
47210
47550
  description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
@@ -47213,7 +47553,7 @@ registerSchema({
47213
47553
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
47214
47554
  }
47215
47555
  });
47216
- var getCommand4 = defineCommand182({
47556
+ var getCommand4 = defineCommand183({
47217
47557
  meta: {
47218
47558
  name: "get",
47219
47559
  description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
@@ -47252,7 +47592,7 @@ var getCommand4 = defineCommand182({
47252
47592
  });
47253
47593
 
47254
47594
  // src/commands/scheduled-actions/list.ts
47255
- import { defineCommand as defineCommand183 } from "citty";
47595
+ import { defineCommand as defineCommand184 } from "citty";
47256
47596
  registerSchema({
47257
47597
  command: "scheduled-actions.list",
47258
47598
  description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set, or --chat <id> to read an earlier chat's staged schedules instead.",
@@ -47260,7 +47600,7 @@ registerSchema({
47260
47600
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
47261
47601
  }
47262
47602
  });
47263
- var listCommand15 = defineCommand183({
47603
+ var listCommand15 = defineCommand184({
47264
47604
  meta: {
47265
47605
  name: "list",
47266
47606
  description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set, or --chat <id> to read an earlier chat's staged schedules instead."
@@ -47285,7 +47625,7 @@ var listCommand15 = defineCommand183({
47285
47625
  // src/commands/scheduled-actions/templates.ts
47286
47626
  import { readFile as readFile24 } from "fs/promises";
47287
47627
  import path38 from "path";
47288
- import { defineCommand as defineCommand184 } from "citty";
47628
+ import { defineCommand as defineCommand185 } from "citty";
47289
47629
  registerSchema({
47290
47630
  command: "scheduled-actions.templates",
47291
47631
  description: "The recipes available to this company: the ones Baker ships plus the ones they wrote themselves, each with its id, what it produces and how often it is meant to run. Read this before proposing a company's automation, so every recipe you name is one that exists. Also how a company gets a recipe of its own \u2014 save a brief, prove it runs, then publish it.",
@@ -47340,7 +47680,7 @@ registerSchema({
47340
47680
  }
47341
47681
  }
47342
47682
  });
47343
- var templatesCommand = defineCommand184({
47683
+ var templatesCommand = defineCommand185({
47344
47684
  meta: {
47345
47685
  name: "templates",
47346
47686
  description: `The recipes this company can run \u2014 Baker's own plus theirs, with what each one produces.
@@ -47432,7 +47772,7 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
47432
47772
  });
47433
47773
 
47434
47774
  // src/commands/scheduled-actions/trigger.ts
47435
- import { defineCommand as defineCommand185 } from "citty";
47775
+ import { defineCommand as defineCommand186 } from "citty";
47436
47776
  registerSchema({
47437
47777
  command: "scheduled-actions.trigger",
47438
47778
  description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
@@ -47440,7 +47780,7 @@ registerSchema({
47440
47780
  id: { type: "string", description: "Published scheduled action ID", required: true }
47441
47781
  }
47442
47782
  });
47443
- var triggerCommand = defineCommand185({
47783
+ var triggerCommand = defineCommand186({
47444
47784
  meta: {
47445
47785
  name: "trigger",
47446
47786
  description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
@@ -47477,7 +47817,7 @@ var triggerCommand = defineCommand185({
47477
47817
  });
47478
47818
 
47479
47819
  // src/commands/scheduled-actions/update.ts
47480
- import { defineCommand as defineCommand186 } from "citty";
47820
+ import { defineCommand as defineCommand187 } from "citty";
47481
47821
  registerSchema({
47482
47822
  command: "scheduled-actions.update",
47483
47823
  description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
@@ -47508,7 +47848,7 @@ registerSchema({
47508
47848
  prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
47509
47849
  }
47510
47850
  });
47511
- var updateCommand3 = defineCommand186({
47851
+ var updateCommand3 = defineCommand187({
47512
47852
  meta: {
47513
47853
  name: "update",
47514
47854
  description: "Stage a scheduled action update. Examples: baker scheduled-actions update <id> --enabled false | baker scheduled-actions update <id> --mode publish"
@@ -47586,7 +47926,7 @@ var updateCommand3 = defineCommand186({
47586
47926
  });
47587
47927
 
47588
47928
  // src/commands/scheduled-actions/index.ts
47589
- var scheduledActionsCommand = defineCommand187({
47929
+ var scheduledActionsCommand = defineCommand188({
47590
47930
  meta: {
47591
47931
  name: "scheduled-actions",
47592
47932
  description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger, templates.
@@ -47615,14 +47955,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
47615
47955
  });
47616
47956
 
47617
47957
  // src/commands/schema.ts
47618
- import { defineCommand as defineCommand188 } from "citty";
47958
+ import { defineCommand as defineCommand189 } from "citty";
47619
47959
  function narrowToFamily(commandName, available) {
47620
47960
  const segments = commandName.split(".");
47621
47961
  const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
47622
47962
  const siblings = available.filter((name) => name.startsWith(prefix));
47623
47963
  return siblings.length > 0 ? siblings : available;
47624
47964
  }
47625
- var schemaCommand2 = defineCommand188({
47965
+ var schemaCommand2 = defineCommand189({
47626
47966
  meta: {
47627
47967
  name: "schema",
47628
47968
  description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
@@ -47666,10 +48006,10 @@ var schemaCommand2 = defineCommand188({
47666
48006
  });
47667
48007
 
47668
48008
  // src/commands/studio/index.ts
47669
- import { defineCommand as defineCommand197 } from "citty";
48009
+ import { defineCommand as defineCommand198 } from "citty";
47670
48010
 
47671
48011
  // src/commands/studio/animate.ts
47672
- import { defineCommand as defineCommand189 } from "citty";
48012
+ import { defineCommand as defineCommand190 } from "citty";
47673
48013
 
47674
48014
  // src/commands/studio/batch.ts
47675
48015
  function projectBatch(generation, full) {
@@ -48120,7 +48460,7 @@ function costHintsFor(body) {
48120
48460
  }
48121
48461
  return hints;
48122
48462
  }
48123
- var animateCommand = defineCommand189({
48463
+ var animateCommand = defineCommand190({
48124
48464
  meta: {
48125
48465
  name: "animate",
48126
48466
  description: "Render a clip. With an image the look is already fixed, so the prompt describes MOVEMENT \u2014 what the camera does, what the subject does, in what order. With --from text there is no image and the prompt is the whole shot.\n\nA rendered clip is NOT usable anywhere until you keep it: `baker studio keep <id> --slot N` is what puts it in the video library. Takes nobody keeps are never ingested, which is what makes a rejected batch cheap.\n\nFor anything longer than 15 seconds, or to build on footage that already exists, use --model bytedance/seedance-2.5: it renders 4-30s and is the only model that reads an existing clip or an existing soundtrack.\n\nExamples:\n baker studio animate 'slow push in, model turns to camera and smiles' --image j57abc123def456ghi789\n baker studio animate 'handheld drift right, steam rising from the cup' --image './out/hero.png' --duration 6 --quality 1080p\n baker studio animate 'product rotates once on a turntable' --image j57abc\u2026,j57def\u2026 --from references\n baker studio animate 'she keeps walking, camera stays with her, then she stops and looks up' --image j57abc\u2026 --from references --from-clip j57batch\u2026:0 --model bytedance/seedance-2.5 --duration 20\n baker studio animate 'hold on the product, then a slow push-in' --from references --from-video j57vid\u2026 --model bytedance/seedance-2.5\n baker studio animate 'slow drone pull-back over a solar farm at golden hour, no people' --from text --model bytedance/seedance-2.5 --duration 12"
@@ -48239,7 +48579,7 @@ var animateCommand = defineCommand189({
48239
48579
  });
48240
48580
 
48241
48581
  // src/commands/studio/generate.ts
48242
- import { defineCommand as defineCommand190 } from "citty";
48582
+ import { defineCommand as defineCommand191 } from "citty";
48243
48583
  var MODEL_LIST2 = IMAGE_MODEL_IDS;
48244
48584
  var DEFAULT_MAX_WAIT_MS2 = 24e4;
48245
48585
  registerSchema({
@@ -48375,7 +48715,7 @@ function buildGenerateBody(args, prompt) {
48375
48715
  }
48376
48716
  return body;
48377
48717
  }
48378
- var generateCommand = defineCommand190({
48718
+ var generateCommand = defineCommand191({
48379
48719
  meta: {
48380
48720
  name: "generate",
48381
48721
  description: "Start here to make an image. Renders 1-8 takes of one brief, ingests each into the media library as it lands, and shows the batch in the dashboard Studio next to the ones the client ran.\n\nModel choice: google/gemini-3.1-flash-image-preview (default \u2014 fast, best at editing a reference and at extreme ratios), google/gemini-3-pro-image-preview (highest fidelity, slower), openai/gpt-image-2 (photoreal and the cleanest in-image text \u2014 no --image-size, no 4:5 / 5:4), recraft/recraft-v4.1-pro-vector (vector/flat marks with palette control).\n\n--reference is the biggest quality lever there is: a real logo, product shot, Pinterest pin or sandbox screenshot beats any amount of adjectives.\n\nExamples:\n baker studio generate 'matte black bottle on wet marble, hard studio light, 35mm' --aspect-ratio 3:2 --count 3\n baker studio generate 'this bottle on a sunlit kitchen counter' --reference './src/brand/product.png,https://\u2026/kitchen.jpg'\n baker studio generate 'founder-style selfie, kitchen background, natural light' --skill ugc-selfie-hook\n baker studio generate 'flat geometric mascot, brand palette' --model recraft/recraft-v4.1-pro-vector --rgb-colors '[[10,10,10],[255,80,0]]'"
@@ -48453,7 +48793,7 @@ var generateCommand = defineCommand190({
48453
48793
  });
48454
48794
 
48455
48795
  // src/commands/studio/get.ts
48456
- import { defineCommand as defineCommand191 } from "citty";
48796
+ import { defineCommand as defineCommand192 } from "citty";
48457
48797
  registerSchema({
48458
48798
  command: "studio.get",
48459
48799
  description: "Read one Studio batch: every take, where it lives, and why a take is missing. This is how you pick up a batch that was still rendering when the start command returned.",
@@ -48462,7 +48802,7 @@ registerSchema({
48462
48802
  full: { type: "boolean", description: "Include settings, references and attribution", required: false }
48463
48803
  }
48464
48804
  });
48465
- var getCommand5 = defineCommand191({
48805
+ var getCommand5 = defineCommand192({
48466
48806
  meta: {
48467
48807
  name: "get",
48468
48808
  description: "Read one Studio batch \u2014 the takes, their urls, whether each is in the library, and the reason for any that failed.\n\nExample: baker studio get j57abc123def456ghi789\nExample: baker studio get j57abc123def456ghi789 --full"
@@ -48491,7 +48831,7 @@ var getCommand5 = defineCommand191({
48491
48831
  });
48492
48832
 
48493
48833
  // src/commands/studio/improve.ts
48494
- import { defineCommand as defineCommand192 } from "citty";
48834
+ import { defineCommand as defineCommand193 } from "citty";
48495
48835
  var DESCRIPTION = "Sharpen a rough brief into directed art direction \u2014 the same rewrite the client gets from the wand in the Studio prompt bar. Reach for it when you are relaying the CLIENT's own words and want them shaped without substituting your voice; when you are writing the art direction yourself, just write it, because you will do a better job than this does.";
48496
48836
  registerSchema({
48497
48837
  command: "studio.improve",
@@ -48516,7 +48856,7 @@ registerSchema({
48516
48856
  }
48517
48857
  }
48518
48858
  });
48519
- var improveCommand = defineCommand192({
48859
+ var improveCommand = defineCommand193({
48520
48860
  meta: {
48521
48861
  name: "improve",
48522
48862
  description: `${DESCRIPTION}
@@ -48560,7 +48900,7 @@ Examples:
48560
48900
  });
48561
48901
 
48562
48902
  // src/commands/studio/keep.ts
48563
- import { defineCommand as defineCommand193 } from "citty";
48903
+ import { defineCommand as defineCommand194 } from "citty";
48564
48904
  registerSchema({
48565
48905
  command: "studio.keep",
48566
48906
  description: "Mark one take as the keeper. For an image this stars it, so the client reviewing the batch sees which one you used. For a CLIP it is the step that puts it in the video library \u2014 until then the clip cannot be used in a canvas, a landing, or an ad.",
@@ -48570,7 +48910,7 @@ registerSchema({
48570
48910
  undo: { type: "boolean", description: "Un-star an image, or take a kept clip back out", required: false }
48571
48911
  }
48572
48912
  });
48573
- var keepCommand = defineCommand193({
48913
+ var keepCommand = defineCommand194({
48574
48914
  meta: {
48575
48915
  name: "keep",
48576
48916
  description: "Mark one take as the keeper. An image gets starred (it was already in the library); a clip gets INGESTED into the video library, which is what makes it usable anywhere else.\n\nExample: baker studio keep j57abc123def456ghi789 --slot 2\nExample: baker studio keep j57abc123def456ghi789 --slot 2 --undo"
@@ -48621,7 +48961,7 @@ var keepCommand = defineCommand193({
48621
48961
  });
48622
48962
 
48623
48963
  // src/commands/studio/list.ts
48624
- import { defineCommand as defineCommand194 } from "citty";
48964
+ import { defineCommand as defineCommand195 } from "citty";
48625
48965
  registerSchema({
48626
48966
  command: "studio.list",
48627
48967
  description: "Recent Studio batches for THIS conversation, newest first \u2014 what you have already generated, so you re-use a take instead of paying for it twice. `--all` widens it to everything the company generated, including what people ran themselves in the dashboard.",
@@ -48632,7 +48972,7 @@ registerSchema({
48632
48972
  full: { type: "boolean", description: "Include settings, references and attribution", required: false }
48633
48973
  }
48634
48974
  });
48635
- var listCommand16 = defineCommand194({
48975
+ var listCommand16 = defineCommand195({
48636
48976
  meta: {
48637
48977
  name: "list",
48638
48978
  description: "Recent Studio batches, newest first. Scoped to this conversation unless you pass --all.\n\nExample: baker studio list\nExample: baker studio list --kind video --limit 5\nExample: baker studio list --all # includes batches the client ran in the dashboard"
@@ -48666,7 +49006,7 @@ var listCommand16 = defineCommand194({
48666
49006
  });
48667
49007
 
48668
49008
  // src/commands/studio/models.ts
48669
- import { defineCommand as defineCommand195 } from "citty";
49009
+ import { defineCommand as defineCommand196 } from "citty";
48670
49010
  var DESCRIPTION2 = "What each Studio model actually accepts: its shapes, resolutions, clip lengths, prompt character cap, how many reference images it takes, and which knobs it has. Read this before a batch you care about \u2014 the models disagree far more than they look like they do, and a setting the chosen model does not have is REFUSED, not ignored.";
48671
49011
  registerSchema({
48672
49012
  command: "studio.models",
@@ -48753,7 +49093,7 @@ function buildModelCards(kind, model) {
48753
49093
  const selected = model ? ids.filter((id) => id === model) : ids;
48754
49094
  return selected.map((id) => build(id));
48755
49095
  }
48756
- var modelsCommand = defineCommand195({
49096
+ var modelsCommand = defineCommand196({
48757
49097
  meta: {
48758
49098
  name: "models",
48759
49099
  description: `${DESCRIPTION2}
@@ -48800,13 +49140,13 @@ Examples:
48800
49140
  });
48801
49141
 
48802
49142
  // src/commands/studio/skills.ts
48803
- import { defineCommand as defineCommand196 } from "citty";
49143
+ import { defineCommand as defineCommand197 } from "citty";
48804
49144
  registerSchema({
48805
49145
  command: "studio.skills",
48806
49146
  description: "The craft directions `studio generate --skill <id>` accepts. Each one carries directed art direction plus the model, shape and take count it wants, so you pick a look by name instead of writing the boilerplate yourself.",
48807
49147
  args: {}
48808
49148
  });
48809
- var skillsCommand = defineCommand196({
49149
+ var skillsCommand = defineCommand197({
48810
49150
  meta: {
48811
49151
  name: "skills",
48812
49152
  description: "List the craft directions available to `baker studio generate --skill <id>` \u2014 what each one is for, whether it wants a reference image, and the model/shape/count it defaults to.\n\nExample: baker studio skills"
@@ -48830,7 +49170,7 @@ var skillsCommand = defineCommand196({
48830
49170
  });
48831
49171
 
48832
49172
  // src/commands/studio/index.ts
48833
- var studioCommand = defineCommand197({
49173
+ var studioCommand = defineCommand198({
48834
49174
  meta: {
48835
49175
  name: "studio",
48836
49176
  description: `Make new imagery and clips. Every batch is recorded and shows up in the dashboard Studio for the client to review, labelled with this conversation.
@@ -48873,10 +49213,10 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
48873
49213
  });
48874
49214
 
48875
49215
  // src/commands/tag-manager/index.ts
48876
- import { defineCommand as defineCommand201 } from "citty";
49216
+ import { defineCommand as defineCommand202 } from "citty";
48877
49217
 
48878
49218
  // src/commands/tag-manager/draft.ts
48879
- import { defineCommand as defineCommand198 } from "citty";
49219
+ import { defineCommand as defineCommand199 } from "citty";
48880
49220
 
48881
49221
  // src/commands/tag-manager/shared.ts
48882
49222
  import { readFileSync as readFileSync15 } from "fs";
@@ -48999,13 +49339,13 @@ registerSchema({
48999
49339
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
49000
49340
  }
49001
49341
  });
49002
- var draftCommand4 = defineCommand198({
49342
+ var draftCommand4 = defineCommand199({
49003
49343
  meta: {
49004
49344
  name: "draft",
49005
49345
  description: "List, show, amend, remove, or clear staged Tag Manager changes for this chat. `list` and `show` take --chat <id> to read an earlier chat's changes instead."
49006
49346
  },
49007
49347
  subCommands: {
49008
- list: defineCommand198({
49348
+ list: defineCommand199({
49009
49349
  meta: {
49010
49350
  name: "list",
49011
49351
  description: "Review everything staged on this chat (--json for the raw envelope)"
@@ -49018,7 +49358,7 @@ var draftCommand4 = defineCommand198({
49018
49358
  await draftList2(args.json === true, args.chat);
49019
49359
  }
49020
49360
  }),
49021
- show: defineCommand198({
49361
+ show: defineCommand199({
49022
49362
  meta: {
49023
49363
  name: "show",
49024
49364
  description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
@@ -49035,7 +49375,7 @@ var draftCommand4 = defineCommand198({
49035
49375
  );
49036
49376
  }
49037
49377
  }),
49038
- amend: defineCommand198({
49378
+ amend: defineCommand199({
49039
49379
  meta: {
49040
49380
  name: "amend",
49041
49381
  description: "Update a staged change in place \u2014 merges a JSON patch into its payload (objects deep-merge, null deletes a key, arrays/scalars replace) and re-validates. Use this instead of remove + re-create."
@@ -49052,7 +49392,7 @@ var draftCommand4 = defineCommand198({
49052
49392
  });
49053
49393
  }
49054
49394
  }),
49055
- remove: defineCommand198({
49395
+ remove: defineCommand199({
49056
49396
  meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
49057
49397
  args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
49058
49398
  run: async ({ args }) => {
@@ -49061,7 +49401,7 @@ var draftCommand4 = defineCommand198({
49061
49401
  });
49062
49402
  }
49063
49403
  }),
49064
- clear: defineCommand198({
49404
+ clear: defineCommand199({
49065
49405
  meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
49066
49406
  run: async () => {
49067
49407
  await draftAction3("/api/tag-manager/draft/clear", {});
@@ -49071,7 +49411,7 @@ var draftCommand4 = defineCommand198({
49071
49411
  });
49072
49412
 
49073
49413
  // src/commands/tag-manager/read.ts
49074
- import { defineCommand as defineCommand199 } from "citty";
49414
+ import { defineCommand as defineCommand200 } from "citty";
49075
49415
  registerSchema({
49076
49416
  command: "tagManager.containers",
49077
49417
  description: "List the Google Tag Manager containers this company's connection can reach. Every container the company connected is flagged `connected: true` \u2014 there can be several, and Baker may read and change all of them. Start here to confirm which containers you are managing.",
@@ -49112,7 +49452,7 @@ function containersHints(containers) {
49112
49452
  }))
49113
49453
  });
49114
49454
  }
49115
- var containersCommand = defineCommand199({
49455
+ var containersCommand = defineCommand200({
49116
49456
  meta: {
49117
49457
  name: "containers",
49118
49458
  description: `List Tag Manager containers reachable by this company's connection.
@@ -49129,7 +49469,7 @@ Start here:
49129
49469
  }
49130
49470
  }
49131
49471
  });
49132
- var readCommand = defineCommand199({
49472
+ var readCommand = defineCommand200({
49133
49473
  meta: {
49134
49474
  name: "read",
49135
49475
  description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
@@ -49171,7 +49511,7 @@ Examples:
49171
49511
  });
49172
49512
 
49173
49513
  // src/commands/tag-manager/write-commands.ts
49174
- import { defineCommand as defineCommand200 } from "citty";
49514
+ import { defineCommand as defineCommand201 } from "citty";
49175
49515
  var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
49176
49516
  var ENTITIES = [
49177
49517
  {
@@ -49227,10 +49567,10 @@ for (const { entity, noun, createHint } of ENTITIES) {
49227
49567
  });
49228
49568
  }
49229
49569
  function entityCommand(entity, noun, example) {
49230
- return defineCommand200({
49570
+ return defineCommand201({
49231
49571
  meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
49232
49572
  subCommands: {
49233
- create: defineCommand200({
49573
+ create: defineCommand201({
49234
49574
  meta: {
49235
49575
  name: "create",
49236
49576
  description: `Stage a new ${noun}
@@ -49252,7 +49592,7 @@ Examples:
49252
49592
  });
49253
49593
  }
49254
49594
  }),
49255
- update: defineCommand200({
49595
+ update: defineCommand201({
49256
49596
  meta: {
49257
49597
  name: "update",
49258
49598
  description: `Stage an update to an existing ${noun} (pass its id or path)`
@@ -49272,7 +49612,7 @@ Examples:
49272
49612
  });
49273
49613
  }
49274
49614
  }),
49275
- delete: defineCommand200({
49615
+ delete: defineCommand201({
49276
49616
  meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
49277
49617
  args: {
49278
49618
  id: { type: "positional", description: `${noun} id or path`, required: false },
@@ -49313,7 +49653,7 @@ function builtinTypes(args) {
49313
49653
  }
49314
49654
  return raw.split(",").map((entry) => entry.trim());
49315
49655
  }
49316
- var builtinCommand = defineCommand200({
49656
+ var builtinCommand = defineCommand201({
49317
49657
  meta: {
49318
49658
  name: "builtin",
49319
49659
  description: `Enable or disable built-in variables
@@ -49323,7 +49663,7 @@ Examples:
49323
49663
  baker tag-manager builtin disable --types formId`
49324
49664
  },
49325
49665
  subCommands: {
49326
- enable: defineCommand200({
49666
+ enable: defineCommand201({
49327
49667
  meta: { name: "enable", description: "Stage enabling built-in variables" },
49328
49668
  args: {
49329
49669
  types: { type: "string", description: "Comma-separated types", required: false },
@@ -49337,7 +49677,7 @@ Examples:
49337
49677
  });
49338
49678
  }
49339
49679
  }),
49340
- disable: defineCommand200({
49680
+ disable: defineCommand201({
49341
49681
  meta: { name: "disable", description: "Stage disabling built-in variables" },
49342
49682
  args: {
49343
49683
  types: { type: "string", description: "Comma-separated types", required: false },
@@ -49355,7 +49695,7 @@ Examples:
49355
49695
  });
49356
49696
 
49357
49697
  // src/commands/tag-manager/index.ts
49358
- var tagManagerCommand = defineCommand201({
49698
+ var tagManagerCommand = defineCommand202({
49359
49699
  meta: {
49360
49700
  name: "tag-manager",
49361
49701
  description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
@@ -49392,7 +49732,7 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
49392
49732
  });
49393
49733
 
49394
49734
  // src/commands/tags/index.ts
49395
- import { defineCommand as defineCommand202 } from "citty";
49735
+ import { defineCommand as defineCommand203 } from "citty";
49396
49736
 
49397
49737
  // src/commands/tags/shared.ts
49398
49738
  function failApi3(err) {
@@ -49461,7 +49801,7 @@ async function listTags(json) {
49461
49801
  var listArgs9 = {
49462
49802
  json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
49463
49803
  };
49464
- var listCommand17 = defineCommand202({
49804
+ var listCommand17 = defineCommand203({
49465
49805
  meta: {
49466
49806
  name: "list",
49467
49807
  description: "Effective tags for this chat (production + staged), with each tag's full readable config (secrets excluded) \u2014 reuse a stored value to pre-fill a change rather than asking the user. Refs printed here are what flow side-effect tagIds should use. Example: baker tags list"
@@ -49480,7 +49820,7 @@ async function listDraft3(chat) {
49480
49820
  failApi3(err);
49481
49821
  }
49482
49822
  }
49483
- var draftCommand5 = defineCommand202({
49823
+ var draftCommand5 = defineCommand203({
49484
49824
  meta: {
49485
49825
  name: "draft",
49486
49826
  description: "Review the tag changes staged in this chat (read-only). Staged changes were approved via request_tag_input and apply when the chat is published; to amend or drop one, propose a follow-up change through the same tool (a delete on a tag_temp_* ref drops the staged create). Takes --chat <id> to read an earlier chat's staged changes instead."
@@ -49490,7 +49830,7 @@ var draftCommand5 = defineCommand202({
49490
49830
  await listDraft3(args.chat);
49491
49831
  }
49492
49832
  });
49493
- var tagsCommand4 = defineCommand202({
49833
+ var tagsCommand4 = defineCommand203({
49494
49834
  meta: {
49495
49835
  name: "tags",
49496
49836
  description: `Read the client's marketing/analytics tags (Meta pixel, GA4, Google Ads, GTM, Clarity, Hotjar, \u2026) \u2014 production tags plus the changes staged in this chat.
@@ -49519,10 +49859,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
49519
49859
  });
49520
49860
 
49521
49861
  // src/commands/testimonials/index.ts
49522
- import { defineCommand as defineCommand206 } from "citty";
49862
+ import { defineCommand as defineCommand207 } from "citty";
49523
49863
 
49524
49864
  // src/commands/testimonials/get.ts
49525
- import { defineCommand as defineCommand203 } from "citty";
49865
+ import { defineCommand as defineCommand204 } from "citty";
49526
49866
  registerSchema({
49527
49867
  command: "testimonials.get",
49528
49868
  description: "Get a single testimonial by ID",
@@ -49530,7 +49870,7 @@ registerSchema({
49530
49870
  id: { type: "string", description: "Testimonial ID", required: true }
49531
49871
  }
49532
49872
  });
49533
- var getCommand6 = defineCommand203({
49873
+ var getCommand6 = defineCommand204({
49534
49874
  meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
49535
49875
  args: {
49536
49876
  id: { type: "positional", description: "Testimonial ID", required: false },
@@ -49567,7 +49907,7 @@ var getCommand6 = defineCommand203({
49567
49907
  });
49568
49908
 
49569
49909
  // src/commands/testimonials/list.ts
49570
- import { defineCommand as defineCommand204 } from "citty";
49910
+ import { defineCommand as defineCommand205 } from "citty";
49571
49911
 
49572
49912
  // src/commands/testimonials/emptyCorpusHints.ts
49573
49913
  function resolveEmptyReason({
@@ -49702,7 +50042,7 @@ function buildListParams(args) {
49702
50042
  }
49703
50043
  return params;
49704
50044
  }
49705
- var listCommand18 = defineCommand204({
50045
+ var listCommand18 = defineCommand205({
49706
50046
  meta: {
49707
50047
  name: "list",
49708
50048
  description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
@@ -49754,7 +50094,7 @@ var listCommand18 = defineCommand204({
49754
50094
  });
49755
50095
 
49756
50096
  // src/commands/testimonials/search.ts
49757
- import { defineCommand as defineCommand205 } from "citty";
50097
+ import { defineCommand as defineCommand206 } from "citty";
49758
50098
  var FILTER_FLAGS2 = ["source", "rating-min", "rating-max", "status", "sentiment", "language", "tags"];
49759
50099
  function languageBiasHint(results, requestedLanguage) {
49760
50100
  if (requestedLanguage) {
@@ -49833,7 +50173,7 @@ function buildSearchRequest(query, args) {
49833
50173
  }
49834
50174
  return body;
49835
50175
  }
49836
- var searchCommand3 = defineCommand205({
50176
+ var searchCommand3 = defineCommand206({
49837
50177
  meta: {
49838
50178
  name: "search",
49839
50179
  description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
@@ -49897,7 +50237,7 @@ var searchCommand3 = defineCommand205({
49897
50237
  var tagsCommand5 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
49898
50238
 
49899
50239
  // src/commands/testimonials/index.ts
49900
- var testimonialsCommand = defineCommand206({
50240
+ var testimonialsCommand = defineCommand207({
49901
50241
  meta: {
49902
50242
  name: "testimonials",
49903
50243
  description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
@@ -49919,10 +50259,10 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
49919
50259
  });
49920
50260
 
49921
50261
  // src/commands/videos/index.ts
49922
- import { defineCommand as defineCommand213 } from "citty";
50262
+ import { defineCommand as defineCommand214 } from "citty";
49923
50263
 
49924
50264
  // src/commands/videos/delete.ts
49925
- import { defineCommand as defineCommand207 } from "citty";
50265
+ import { defineCommand as defineCommand208 } from "citty";
49926
50266
  registerSchema({
49927
50267
  command: "videos.delete",
49928
50268
  description: "Delete a video by ID",
@@ -49936,7 +50276,7 @@ registerSchema({
49936
50276
  }
49937
50277
  }
49938
50278
  });
49939
- var deleteCommand4 = defineCommand207({
50279
+ var deleteCommand4 = defineCommand208({
49940
50280
  meta: {
49941
50281
  name: "delete",
49942
50282
  description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
@@ -49977,7 +50317,7 @@ var deleteCommand4 = defineCommand207({
49977
50317
  });
49978
50318
 
49979
50319
  // src/commands/videos/get.ts
49980
- import { defineCommand as defineCommand208 } from "citty";
50320
+ import { defineCommand as defineCommand209 } from "citty";
49981
50321
  registerSchema({
49982
50322
  command: "videos.get",
49983
50323
  description: "Get a single video by ID",
@@ -49985,7 +50325,7 @@ registerSchema({
49985
50325
  id: { type: "string", description: "Video ID", required: true }
49986
50326
  }
49987
50327
  });
49988
- var getCommand7 = defineCommand208({
50328
+ var getCommand7 = defineCommand209({
49989
50329
  meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
49990
50330
  args: {
49991
50331
  id: { type: "positional", description: "Video ID", required: false },
@@ -50022,7 +50362,7 @@ var getCommand7 = defineCommand208({
50022
50362
  });
50023
50363
 
50024
50364
  // src/commands/videos/group.ts
50025
- import { defineCommand as defineCommand209 } from "citty";
50365
+ import { defineCommand as defineCommand210 } from "citty";
50026
50366
  registerSchema({
50027
50367
  command: "videos.group",
50028
50368
  description: "List every clip and image that arrived in the same set as this video (carousel slides, one page)",
@@ -50031,7 +50371,7 @@ registerSchema({
50031
50371
  "group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
50032
50372
  }
50033
50373
  });
50034
- var groupCommand2 = defineCommand209({
50374
+ var groupCommand2 = defineCommand210({
50035
50375
  meta: {
50036
50376
  name: "group",
50037
50377
  description: "List every asset that arrived in the same set as this clip \u2014 the other slides of the Instagram post it came from, stills included. A carousel is authored to be read in order, so a clip pulled out of one is usually missing half its meaning. Example: baker videos group <videoId>"
@@ -50054,7 +50394,7 @@ var groupCommand2 = defineCommand209({
50054
50394
  import { mkdtemp as mkdtemp2, rm as rm7, stat as stat7 } from "fs/promises";
50055
50395
  import { tmpdir as tmpdir3 } from "os";
50056
50396
  import path39 from "path";
50057
- import { defineCommand as defineCommand210 } from "citty";
50397
+ import { defineCommand as defineCommand211 } from "citty";
50058
50398
 
50059
50399
  // src/lib/streamUpload.ts
50060
50400
  import { createHash as createHash2 } from "crypto";
@@ -50218,7 +50558,7 @@ registerSchema({
50218
50558
  "dry-run": { type: "boolean", description: "Preview the operation without executing", required: false }
50219
50559
  }
50220
50560
  });
50221
- var ingestCommand2 = defineCommand210({
50561
+ var ingestCommand2 = defineCommand211({
50222
50562
  meta: {
50223
50563
  name: "ingest",
50224
50564
  description: "Add a video to the library from a URL. A direct file URL is handed straight to Baker, which fetches it. A page URL (YouTube, TikTok, Vimeo, Instagram) is downloaded here first, then uploaded \u2014 and a direct URL that Baker cannot fetch falls back to that same path automatically.\n\nExample: baker videos ingest https://www.youtube.com/watch?v=abc123"
@@ -50334,35 +50674,35 @@ async function ingestByRoute(args, direct, country) {
50334
50674
  function reportYtDlpFailure(err) {
50335
50675
  const detail = `${err.stderrTail} ${err.message}`;
50336
50676
  if (isProxyFailure(ytDlpBlockSignal(detail))) {
50337
- fail7(
50677
+ fail8(
50338
50678
  "Couldn't download that video: our connection to the internet was refused.",
50339
50679
  "This is Baker's egress proxy, not the link \u2014 its credentials look wrong or expired. The link is probably fine. Report it; retrying won't help until the proxy is fixed."
50340
50680
  );
50341
50681
  }
50342
50682
  if (isDrmProtected(detail)) {
50343
- fail7(
50683
+ fail8(
50344
50684
  "That video is copy-protected, so it can't be added to the library.",
50345
50685
  "The publisher encrypted this one against downloading. Nothing will change that \u2014 not retrying, not a different region. Ask whoever owns the video for the original file and add it with `baker videos upload <file>`."
50346
50686
  );
50347
50687
  }
50348
50688
  if (isVimeoAuthFailure(detail)) {
50349
- fail7(
50689
+ fail8(
50350
50690
  "Vimeo wouldn't hand over that video \u2014 Baker isn't signed in to Vimeo.",
50351
50691
  "Vimeo now refuses anonymous downloads entirely, so this needs a signed-in session and the one Baker holds has either expired or was never set. Nothing is wrong with the link. Report it so the Vimeo cookie can be refreshed; meanwhile download the file and use `baker videos upload <file>`."
50352
50692
  );
50353
50693
  }
50354
50694
  if (isRegionBlocked(detail)) {
50355
- fail7(
50695
+ fail8(
50356
50696
  `That video isn't available in the region we're fetching from. ${err.stderrTail || err.message}`,
50357
50697
  "Re-run with `--country <two-letter code>` for a country where the video plays \u2014 e.g. `--country US`. Pick the one the video belongs to (the uploader's country is the usual answer); each attempt costs a paid connection, so choose rather than work through the list."
50358
50698
  );
50359
50699
  }
50360
- fail7(
50700
+ fail8(
50361
50701
  `Couldn't download that video. ${err.stderrTail || err.message}`,
50362
50702
  isToolingOrBlockFailure(detail) ? "The site wouldn't hand over the video \u2014 usually the downloader being out of date against a site that changed, or the request being blocked. Retrying won't help, and the link is probably fine. Report it so the tool can be updated; meanwhile download the file and use `baker videos upload <file>`." : "Check the link is public and playable. Private or age-restricted videos can't be downloaded \u2014 download the file yourself and use `baker videos upload <file>`."
50363
50703
  );
50364
50704
  }
50365
- function fail7(message, fix, code = "INGEST_FAILED") {
50705
+ function fail8(message, fix, code = "INGEST_FAILED") {
50366
50706
  writeJson({ ok: false, error: { code, message, fix } });
50367
50707
  process.exit(1);
50368
50708
  }
@@ -50374,13 +50714,13 @@ function reportIngestFailure(err) {
50374
50714
  if (err instanceof YtDlpError) reportYtDlpFailure(err);
50375
50715
  const detail = err instanceof Error ? err.message : String(err);
50376
50716
  if (detail.includes("timed out after")) {
50377
- fail7(
50717
+ fail8(
50378
50718
  "That video took too long to download and was stopped part-way.",
50379
50719
  "Long or slow-serving videos can outrun the download window. Try a shorter clip, or download this one yourself and use `baker videos upload <file>`.",
50380
50720
  "INTERNAL_ERROR"
50381
50721
  );
50382
50722
  }
50383
- fail7(
50723
+ fail8(
50384
50724
  `Couldn't add that video. ${detail}`,
50385
50725
  "This is a fault on Baker's side, not a problem with the link. Report it.",
50386
50726
  "INTERNAL_ERROR"
@@ -50480,7 +50820,7 @@ async function uploadToAssetStore(filePath, sizeBytes) {
50480
50820
  }
50481
50821
 
50482
50822
  // src/commands/videos/search.ts
50483
- import { defineCommand as defineCommand211 } from "citty";
50823
+ import { defineCommand as defineCommand212 } from "citty";
50484
50824
  registerSchema({
50485
50825
  command: "videos.search",
50486
50826
  description: "Search videos by text query. Only returns ready videos.",
@@ -50490,7 +50830,7 @@ registerSchema({
50490
50830
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
50491
50831
  }
50492
50832
  });
50493
- var searchCommand4 = defineCommand211({
50833
+ var searchCommand4 = defineCommand212({
50494
50834
  meta: {
50495
50835
  name: "search",
50496
50836
  description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
@@ -50542,7 +50882,7 @@ var tagsCommand6 = makeTagsCommand("videos", "video", "/api/videos/tags");
50542
50882
  // src/commands/videos/upload.ts
50543
50883
  import { readFile as readFile25, stat as stat8 } from "fs/promises";
50544
50884
  import { basename as basename3, extname as extname4 } from "path";
50545
- import { defineCommand as defineCommand212 } from "citty";
50885
+ import { defineCommand as defineCommand213 } from "citty";
50546
50886
  var MIME_MAP = {
50547
50887
  ".mp4": "video/mp4",
50548
50888
  ".mov": "video/quicktime",
@@ -50584,7 +50924,7 @@ function detectContentType(filePath) {
50584
50924
  function isRemoteUrl3(value) {
50585
50925
  return /^https?:\/\//i.test(value);
50586
50926
  }
50587
- var uploadCommand2 = defineCommand212({
50927
+ var uploadCommand2 = defineCommand213({
50588
50928
  meta: {
50589
50929
  name: "upload",
50590
50930
  description: "Upload a video to Baker \u2014 accepts a local file path OR a remote http(s) URL.\n\nLocal: auto-detects content type and uploads via Mux direct upload.\nRemote: hands off to `videos ingest` (direct fetch, or download-then-upload for a YouTube/TikTok/Vimeo page).\n\nExamples:\n baker videos upload ./demo.mp4\n baker videos upload https://www.youtube.com/watch?v=abc123"
@@ -50668,7 +51008,7 @@ var uploadCommand2 = defineCommand212({
50668
51008
  });
50669
51009
 
50670
51010
  // src/commands/videos/index.ts
50671
- var videosCommand = defineCommand213({
51011
+ var videosCommand = defineCommand214({
50672
51012
  meta: {
50673
51013
  name: "videos",
50674
51014
  description: `Find and manage videos in Baker. Subcommands: search, get, upload, ingest, delete, tags.
@@ -50695,10 +51035,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
50695
51035
  });
50696
51036
 
50697
51037
  // src/commands/winning-ads/index.ts
50698
- import { defineCommand as defineCommand226 } from "citty";
51038
+ import { defineCommand as defineCommand227 } from "citty";
50699
51039
 
50700
51040
  // src/commands/winning-ads/advertisers.ts
50701
- import { defineCommand as defineCommand214 } from "citty";
51041
+ import { defineCommand as defineCommand215 } from "citty";
50702
51042
 
50703
51043
  // src/commands/winning-ads/shared.ts
50704
51044
  function splitList2(value) {
@@ -50751,7 +51091,7 @@ function advertiserNormalizer(record, full) {
50751
51091
  last_synced_at: record.last_synced_at ?? null
50752
51092
  };
50753
51093
  }
50754
- var advertisersCommand2 = defineCommand214({
51094
+ var advertisersCommand2 = defineCommand215({
50755
51095
  meta: {
50756
51096
  name: "advertisers",
50757
51097
  description: 'List corpus advertisers by name or domain. Find your own advertiser for --exclude-advertiser, or a competitor for --advertiser-id / winners. Example: baker winning-ads advertisers "Deel" --output md'
@@ -50809,7 +51149,7 @@ var advertisersCommand2 = defineCommand214({
50809
51149
  });
50810
51150
 
50811
51151
  // src/commands/winning-ads/brief.ts
50812
- import { defineCommand as defineCommand215 } from "citty";
51152
+ import { defineCommand as defineCommand216 } from "citty";
50813
51153
  registerSchema({
50814
51154
  command: "winning-ads.brief",
50815
51155
  description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
@@ -50855,7 +51195,7 @@ function parseDna(raw) {
50855
51195
  }
50856
51196
  return parsed;
50857
51197
  }
50858
- var briefCommand = defineCommand215({
51198
+ var briefCommand = defineCommand216({
50859
51199
  meta: {
50860
51200
  name: "brief",
50861
51201
  description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
@@ -50891,7 +51231,7 @@ var briefCommand = defineCommand215({
50891
51231
  });
50892
51232
 
50893
51233
  // src/commands/winning-ads/content.ts
50894
- import { defineCommand as defineCommand216 } from "citty";
51234
+ import { defineCommand as defineCommand217 } from "citty";
50895
51235
  registerSchema({
50896
51236
  command: "winning-ads.content",
50897
51237
  description: "Read what's INSIDE one winning ad: the spoken transcript, the on-screen text, and the ad copy. Use this after `search`/`winners`/`feed` return a shortlist \u2014 pass an ad_id to understand a reference before reproducing it. Add --full for speech, pacing, and soundtrack detail. Video ads carry the transcript/on-screen text; static ads carry only the copy.",
@@ -50904,7 +51244,7 @@ registerSchema({
50904
51244
  }
50905
51245
  }
50906
51246
  });
50907
- var contentCommand = defineCommand216({
51247
+ var contentCommand = defineCommand217({
50908
51248
  meta: {
50909
51249
  name: "content",
50910
51250
  description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
@@ -50953,7 +51293,7 @@ var contentCommand = defineCommand216({
50953
51293
  });
50954
51294
 
50955
51295
  // src/commands/winning-ads/feed.ts
50956
- import { defineCommand as defineCommand217 } from "citty";
51296
+ import { defineCommand as defineCommand218 } from "citty";
50957
51297
  function buildFeedParams(input) {
50958
51298
  const params = {};
50959
51299
  const advertiser = splitList2(input.advertiser);
@@ -51005,7 +51345,7 @@ registerSchema({
51005
51345
  format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
51006
51346
  }
51007
51347
  });
51008
- var feedCommand = defineCommand217({
51348
+ var feedCommand = defineCommand218({
51009
51349
  meta: {
51010
51350
  name: "feed",
51011
51351
  description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
@@ -51090,7 +51430,7 @@ var feedCommand = defineCommand217({
51090
51430
  });
51091
51431
 
51092
51432
  // src/commands/winning-ads/follow.ts
51093
- import { defineCommand as defineCommand218 } from "citty";
51433
+ import { defineCommand as defineCommand219 } from "citty";
51094
51434
  var PLATFORMS = ["meta", "linkedin"];
51095
51435
  registerSchema({
51096
51436
  command: "winning-ads.follow",
@@ -51105,7 +51445,7 @@ registerSchema({
51105
51445
  label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
51106
51446
  }
51107
51447
  });
51108
- var followCommand = defineCommand218({
51448
+ var followCommand = defineCommand219({
51109
51449
  meta: {
51110
51450
  name: "follow",
51111
51451
  description: 'Follow a brand to track ALL its ads \u2014 every platform and country. --platform is how we read your input, not a limit. A domain tracks both Meta + LinkedIn. Example: baker winning-ads follow "deel.com" --platform meta'
@@ -51152,7 +51492,7 @@ var followCommand = defineCommand218({
51152
51492
  });
51153
51493
 
51154
51494
  // src/commands/winning-ads/follow-competitors.ts
51155
- import { defineCommand as defineCommand219 } from "citty";
51495
+ import { defineCommand as defineCommand220 } from "citty";
51156
51496
  var PLATFORMS2 = ["meta", "linkedin"];
51157
51497
  var BATCH_TIMEOUT_MS = 3e5;
51158
51498
  function buildFollowBatchBody(input) {
@@ -51185,7 +51525,7 @@ registerSchema({
51185
51525
  }
51186
51526
  }
51187
51527
  });
51188
- var followCompetitorsCommand = defineCommand219({
51528
+ var followCompetitorsCommand = defineCommand220({
51189
51529
  meta: {
51190
51530
  name: "follow-competitors",
51191
51531
  description: 'Follow many brands at once by domain \u2014 add every competitor in one call. Example: baker winning-ads follow-competitors "deel.com,notion.so,hubspot.com"'
@@ -51260,7 +51600,7 @@ var followCompetitorsCommand = defineCommand219({
51260
51600
  });
51261
51601
 
51262
51602
  // src/commands/winning-ads/following.ts
51263
- import { defineCommand as defineCommand220 } from "citty";
51603
+ import { defineCommand as defineCommand221 } from "citty";
51264
51604
  registerSchema({
51265
51605
  command: "winning-ads.following",
51266
51606
  description: "List the brands you follow in your ad-dna library, with each one's status (ready vs still adding) and cached ad counts. A brand still adding has counts that are a lie in progress; one with `discovery_failed` has counts that are short because we couldn't finish looking, which is not the same as it running no ads.",
@@ -51314,7 +51654,7 @@ function followingNormalizer(record, full) {
51314
51654
  platforms: Array.isArray(record.platforms) ? record.platforms : []
51315
51655
  };
51316
51656
  }
51317
- var followingCommand = defineCommand220({
51657
+ var followingCommand = defineCommand221({
51318
51658
  meta: {
51319
51659
  name: "following",
51320
51660
  description: "List brands you follow, with status (ready / adding\u2026) and cached counts. A brand's counts are only final once it is ready. Example: baker winning-ads following --output md"
@@ -51350,7 +51690,7 @@ var followingCommand = defineCommand220({
51350
51690
  });
51351
51691
 
51352
51692
  // src/commands/winning-ads/patterns.ts
51353
- import { defineCommand as defineCommand221 } from "citty";
51693
+ import { defineCommand as defineCommand222 } from "citty";
51354
51694
  registerSchema({
51355
51695
  command: "winning-ads.patterns",
51356
51696
  description: "Mine what separates two cohorts of ads: pass a comma-list of winning ad ids (--winners) and a comma-list of weaker ad ids (--duds). Returns the discriminating DNA fields.",
@@ -51389,7 +51729,7 @@ function discriminatorRow(record) {
51389
51729
  top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
51390
51730
  };
51391
51731
  }
51392
- var patternsCommand = defineCommand221({
51732
+ var patternsCommand = defineCommand222({
51393
51733
  meta: {
51394
51734
  name: "patterns",
51395
51735
  description: "Discover what separates winning ads from weak ones. Example: baker winning-ads patterns --winners a_1,a_2,a_3 --duds a_9,a_8 --output md"
@@ -51445,7 +51785,7 @@ var patternsCommand = defineCommand221({
51445
51785
  });
51446
51786
 
51447
51787
  // src/commands/winning-ads/search.ts
51448
- import { defineCommand as defineCommand222 } from "citty";
51788
+ import { defineCommand as defineCommand223 } from "citty";
51449
51789
  registerSchema({
51450
51790
  command: "winning-ads.search",
51451
51791
  description: "Search the ad-dna corpus of scored winning ads. Returns a lean shortlist (advertiser, summary, scores, media_url) to pick a reference to reproduce.",
@@ -51553,7 +51893,7 @@ function buildSearchBody2(args) {
51553
51893
  }
51554
51894
  return body;
51555
51895
  }
51556
- var searchCommand5 = defineCommand222({
51896
+ var searchCommand5 = defineCommand223({
51557
51897
  meta: {
51558
51898
  name: "search",
51559
51899
  description: "Search winning reference ads. Example: baker winning-ads search 'B2B SaaS before/after AI automation' --platform meta --format static --winner-category winner --exclude-advertiser adv_123 --output md"
@@ -51668,7 +52008,7 @@ var searchCommand5 = defineCommand222({
51668
52008
  });
51669
52009
 
51670
52010
  // src/commands/winning-ads/seeds.ts
51671
- import { defineCommand as defineCommand223 } from "citty";
52011
+ import { defineCommand as defineCommand224 } from "citty";
51672
52012
  function leanRow(r) {
51673
52013
  return {
51674
52014
  key: r.key,
@@ -51696,7 +52036,7 @@ function makeSeedCommand(opts) {
51696
52036
  limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
51697
52037
  }
51698
52038
  });
51699
- return defineCommand223({
52039
+ return defineCommand224({
51700
52040
  meta: { name: opts.name, description: opts.description },
51701
52041
  args: {
51702
52042
  platform: { type: "string", description: "Single platform to segment on", required: false },
@@ -51745,7 +52085,7 @@ var formatsCommand = makeSeedCommand({
51745
52085
  });
51746
52086
 
51747
52087
  // src/commands/winning-ads/unfollow.ts
51748
- import { defineCommand as defineCommand224 } from "citty";
52088
+ import { defineCommand as defineCommand225 } from "citty";
51749
52089
  registerSchema({
51750
52090
  command: "winning-ads.unfollow",
51751
52091
  description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
@@ -51753,7 +52093,7 @@ registerSchema({
51753
52093
  advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
51754
52094
  }
51755
52095
  });
51756
- var unfollowCommand = defineCommand224({
52096
+ var unfollowCommand = defineCommand225({
51757
52097
  meta: {
51758
52098
  name: "unfollow",
51759
52099
  description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
@@ -51774,7 +52114,7 @@ var unfollowCommand = defineCommand224({
51774
52114
  });
51775
52115
 
51776
52116
  // src/commands/winning-ads/winners.ts
51777
- import { defineCommand as defineCommand225 } from "citty";
52117
+ import { defineCommand as defineCommand226 } from "citty";
51778
52118
  registerSchema({
51779
52119
  command: "winning-ads.winners",
51780
52120
  description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
@@ -51784,7 +52124,7 @@ registerSchema({
51784
52124
  platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
51785
52125
  }
51786
52126
  });
51787
- var winnersCommand = defineCommand225({
52127
+ var winnersCommand = defineCommand226({
51788
52128
  meta: {
51789
52129
  name: "winners",
51790
52130
  description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
@@ -51834,7 +52174,7 @@ var winnersCommand = defineCommand225({
51834
52174
  });
51835
52175
 
51836
52176
  // src/commands/winning-ads/index.ts
51837
- var winningAdsCommand = defineCommand226({
52177
+ var winningAdsCommand = defineCommand227({
51838
52178
  meta: {
51839
52179
  name: "winning-ads",
51840
52180
  description: `Search the ad-dna corpus of scored "winning" ads for reference creatives to reproduce, and manage the brands your library tracks. Proxied through the Baker backend (BAKER_API_KEY) \u2014 no separate token needed.
@@ -52072,7 +52412,7 @@ function getCliVersion() {
52072
52412
  }
52073
52413
 
52074
52414
  // src/cli.ts
52075
- var main = defineCommand227({
52415
+ var main = defineCommand228({
52076
52416
  meta: {
52077
52417
  name: "baker",
52078
52418
  version: getCliVersion(),
@@ -52091,6 +52431,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
52091
52431
  ads: adsCommand2,
52092
52432
  brand: brandCommand,
52093
52433
  analytics: analyticsCommand2,
52434
+ experiment: experimentCommand,
52094
52435
  ga4: ga4Command,
52095
52436
  gsc: gscCommand,
52096
52437
  research: researchCommand,