@koda-sl/baker-cli 0.217.0 → 0.218.0-dev.68a8bd23c

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 defineCommand221, runMain } from "citty";
111
+ import { defineCommand as defineCommand222, runMain } from "citty";
112
112
 
113
113
  // src/cache-flag.ts
114
114
  var NO_CACHE_ARG = {
@@ -20344,11 +20344,192 @@ Full guides: __tooling__/docs/tools/baker/ads-<platform>.md (google|meta|linkedi
20344
20344
  }
20345
20345
  });
20346
20346
 
20347
+ // src/commands/analytics/index.ts
20348
+ import { defineCommand as defineCommand87 } from "citty";
20349
+
20350
+ // src/commands/analytics/hints.ts
20351
+ var SEVERE_STEP_DROP = 0.6;
20352
+ var MIN_SESSIONS_FOR_RATES = 100;
20353
+ var SHALLOW_ENGAGEMENT_MS = 1e4;
20354
+ function percent(value) {
20355
+ return `${Math.round(value * 100)}%`;
20356
+ }
20357
+ function buildAnalyticsHints(data) {
20358
+ const hints = [];
20359
+ for (const funnel of data.funnels ?? []) {
20360
+ const worst = funnel.worstStep;
20361
+ if (worst && worst.dropRate !== null && worst.dropRate >= SEVERE_STEP_DROP) {
20362
+ hints.push(
20363
+ `Form "${funnel.flowSlug}" loses ${percent(worst.dropRate)} of people at step "${worst.stepId}" \u2014 open the flow-builder skill and look at what that step asks for.`
20364
+ );
20365
+ }
20366
+ }
20367
+ if (data.totals.sessions > 0 && data.totals.sessions < MIN_SESSIONS_FOR_RATES) {
20368
+ hints.push(
20369
+ "Too few sessions to read rates as reliable \u2014 report the absolute numbers and say the period is small, rather than quoting a conversion rate."
20370
+ );
20371
+ }
20372
+ if (data.totals.avgEngagementMs !== null && data.totals.avgEngagementMs < SHALLOW_ENGAGEMENT_MS) {
20373
+ hints.push(
20374
+ "Visitors leave in under ten seconds on average \u2014 that is usually a mismatch between the ad and the page, not a form problem. Check the top sources against the page's headline."
20375
+ );
20376
+ }
20377
+ if (data.totals.pageViews > 0 && data.totals.sessions === 0) {
20378
+ hints.push(
20379
+ "Pages were served but no sessions were counted \u2014 visitors are declining analytics consent, so traffic is measurable and per-visitor behaviour is not. Say so rather than reporting zero visitors."
20380
+ );
20381
+ }
20382
+ if ((data.topCampaigns ?? []).length === 0 && (data.topSources ?? []).length > 0) {
20383
+ hints.push(
20384
+ "No campaign tagging on any traffic \u2014 ad clicks cannot be attributed to a campaign until the destination URLs carry utm parameters."
20385
+ );
20386
+ }
20387
+ return hints;
20388
+ }
20389
+
20390
+ // src/commands/analytics/presets.ts
20391
+ var ANALYTICS_PRESET_INFO = [
20392
+ {
20393
+ name: "overview",
20394
+ description: "Everything at once: traffic, top pages with their conversion rates, where visitors came from, and the worst step of every Form. Start here.",
20395
+ playbook: "landing \u2014 diagnose a page that gets traffic but few leads"
20396
+ },
20397
+ {
20398
+ name: "traffic",
20399
+ description: "Where visitors come from \u2014 trend, sources, campaigns, countries, devices.",
20400
+ playbook: "the platform playbook for the channel that dominates"
20401
+ },
20402
+ {
20403
+ name: "funnel",
20404
+ description: "Per-step drop-off for the company's Forms. Narrow to one with --flow.",
20405
+ playbook: "flow-builder \u2014 fix the step that loses people"
20406
+ },
20407
+ {
20408
+ name: "page",
20409
+ description: "One page in detail. Requires --path.",
20410
+ playbook: "landing"
20411
+ }
20412
+ ];
20413
+
20414
+ // src/commands/analytics/index.ts
20415
+ var SHARED_ARGS = {
20416
+ days: { type: "string", description: "Lookback window in days (default: 30)", required: false },
20417
+ "start-date": { type: "string", description: "Explicit start date (YYYY-MM-DD)", required: false },
20418
+ "end-date": { type: "string", description: "Explicit end date (YYYY-MM-DD, inclusive)", required: false },
20419
+ full: {
20420
+ type: "boolean",
20421
+ description: "Return long breakdowns and the per-day trend instead of the top few",
20422
+ required: false
20423
+ }
20424
+ };
20425
+ function handleError(err) {
20426
+ if (err instanceof ApiError) {
20427
+ writeJsonEnvelope({ ok: false, error: { code: err.code, message: err.message } });
20428
+ process.exit(1);
20429
+ }
20430
+ writeJsonEnvelope({
20431
+ ok: false,
20432
+ error: { code: "NETWORK_ERROR", message: err instanceof Error ? err.message : "Unexpected error" }
20433
+ });
20434
+ process.exit(1);
20435
+ }
20436
+ async function runPreset(args, options) {
20437
+ const body = { preset: options.preset };
20438
+ if (args.days) body.days = Number(args.days);
20439
+ if (args["start-date"]) body.startDate = args["start-date"];
20440
+ if (args["end-date"]) body.endDate = args["end-date"];
20441
+ if (args.full) body.full = true;
20442
+ if (options.path) body.path = options.path;
20443
+ if (options.flowSlug) body.flowSlug = options.flowSlug;
20444
+ try {
20445
+ const response = await apiPost("/api/analytics/query", body);
20446
+ const hints = buildAnalyticsHints(response.data);
20447
+ writeJsonEnvelope({ ...response, ...hints.length > 0 ? { hints } : {} });
20448
+ } catch (err) {
20449
+ handleError(err);
20450
+ }
20451
+ }
20452
+ function presetCommand(options) {
20453
+ registerSchema({
20454
+ command: `analytics.${options.name}`,
20455
+ description: options.description,
20456
+ args: { ...SHARED_ARGS, ...options.extraArgs ?? {} }
20457
+ });
20458
+ return defineCommand87({
20459
+ meta: { name: options.name, description: options.description },
20460
+ args: { ...SHARED_ARGS, ...options.extraArgs ?? {} },
20461
+ run: async ({ args }) => {
20462
+ const resolved = options.resolve ? options.resolve(args) : { preset: options.preset };
20463
+ if ("error" in resolved) {
20464
+ writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message: resolved.error } });
20465
+ process.exit(1);
20466
+ }
20467
+ await runPreset(args, resolved);
20468
+ }
20469
+ });
20470
+ }
20471
+ var overviewCommand = presetCommand({
20472
+ name: "overview",
20473
+ preset: "overview",
20474
+ description: "Start here: traffic, top pages and their conversion rates, where visitors came from, and the worst step of every Form \u2014 in one call."
20475
+ });
20476
+ var trafficCommand = presetCommand({
20477
+ name: "traffic",
20478
+ preset: "traffic",
20479
+ description: "Where visitors come from \u2014 trend, sources, campaigns, countries and devices."
20480
+ });
20481
+ var funnelCommand = presetCommand({
20482
+ name: "funnel",
20483
+ preset: "funnel",
20484
+ description: "Per-step drop-off for the company's Forms. Narrow to one with --flow.",
20485
+ extraArgs: { flow: { type: "string", description: "Form slug (default: every Form)", required: false } },
20486
+ resolve: (args) => ({ preset: "funnel", flowSlug: args.flow ? String(args.flow) : void 0 })
20487
+ });
20488
+ var pageCommand = presetCommand({
20489
+ name: "page",
20490
+ preset: "page",
20491
+ description: "One page in detail \u2014 its traffic, entrances, engagement and conversion rate.",
20492
+ extraArgs: { path: { type: "string", description: "Page path, e.g. /pricing/", required: true } },
20493
+ resolve: (args) => args.path ? { preset: "page", path: String(args.path) } : {
20494
+ error: "Provide --path, e.g. --path /pricing/. Run `baker analytics overview` to see which paths have traffic."
20495
+ }
20496
+ });
20497
+ var presetsCommand = defineCommand87({
20498
+ meta: { name: "presets", description: "List the available reports and what each answers." },
20499
+ run: () => {
20500
+ writeJsonEnvelope({ ok: true, data: ANALYTICS_PRESET_INFO });
20501
+ }
20502
+ });
20503
+ var analyticsCommand2 = defineCommand87({
20504
+ meta: {
20505
+ name: "analytics",
20506
+ description: `Baker's own web analytics for this company's published pages. No connection to set up \u2014 data starts the moment a page is published.
20507
+
20508
+ Start here:
20509
+ baker analytics overview \u2014 traffic, pages, sources and Form drop-off in one call
20510
+ baker analytics presets \u2014 what each report answers
20511
+
20512
+ Examples:
20513
+ baker analytics overview --days 7
20514
+ baker analytics funnel --flow contact \u2014 which step loses people
20515
+ baker analytics page --path /pricing/ \u2014 one page in detail
20516
+ baker analytics traffic --days 90 --full \u2014 full breakdowns and the per-day trend
20517
+ Full guide: __tooling__/docs/tools/baker/analytics.md`
20518
+ },
20519
+ subCommands: {
20520
+ overview: overviewCommand,
20521
+ traffic: trafficCommand,
20522
+ funnel: funnelCommand,
20523
+ page: pageCommand,
20524
+ presets: presetsCommand
20525
+ }
20526
+ });
20527
+
20347
20528
  // src/commands/avatars/index.ts
20348
- import { defineCommand as defineCommand92 } from "citty";
20529
+ import { defineCommand as defineCommand93 } from "citty";
20349
20530
 
20350
20531
  // src/commands/avatars/create.ts
20351
- import { defineCommand as defineCommand87 } from "citty";
20532
+ import { defineCommand as defineCommand88 } from "citty";
20352
20533
 
20353
20534
  // src/commands/avatars/casting.ts
20354
20535
  var VERBATIM_RULE = "Copy `subjectDescription` into the prompt VERBATIM, word for word. Re-phrasing it per generation is the other reason a face drifts across a set \u2014 treat it as an identifier that happens to read as prose.";
@@ -20615,7 +20796,7 @@ registerSchema({
20615
20796
  "voice-description": { type: "string", description: "How the voice should sound", required: false }
20616
20797
  }
20617
20798
  });
20618
- var createCommand2 = defineCommand87({
20799
+ var createCommand2 = defineCommand88({
20619
20800
  meta: {
20620
20801
  name: "create",
20621
20802
  description: 'Cast a new avatar (reusable AI presenter). Example: baker avatars create --name "Marta" --subject "woman in her early 40s, shoulder-length dark hair, light olive skin, warm open face" --persona "friendly product expert". Returns while the identity sheet is still building.'
@@ -20696,7 +20877,7 @@ var createCommand2 = defineCommand87({
20696
20877
  });
20697
20878
 
20698
20879
  // src/commands/avatars/delete.ts
20699
- import { defineCommand as defineCommand88 } from "citty";
20880
+ import { defineCommand as defineCommand89 } from "citty";
20700
20881
  registerSchema({
20701
20882
  command: "avatars.delete",
20702
20883
  description: "Remove an avatar. Prefer --archive: it retires the avatar so it stops showing in the roster and must not be cast again, while past work and @handle mentions still resolve. Without --archive the avatar is gone for good and the mention resolves nowhere. Confirm with the user first \u2014 this is their cast, and it is not yours to retire. --dry-run previews.",
@@ -20711,7 +20892,7 @@ registerSchema({
20711
20892
  "dry-run": { type: "boolean", description: "Preview without removing anything", required: false, default: false }
20712
20893
  }
20713
20894
  });
20714
- var deleteCommand = defineCommand88({
20895
+ var deleteCommand = defineCommand89({
20715
20896
  meta: {
20716
20897
  name: "delete",
20717
20898
  description: "Remove an avatar. Prefer --archive (retire, past work still resolves) over a hard delete. Example: baker avatars delete marta --archive --dry-run"
@@ -20745,7 +20926,7 @@ var deleteCommand = defineCommand88({
20745
20926
  });
20746
20927
 
20747
20928
  // src/commands/avatars/get.ts
20748
- import { defineCommand as defineCommand89 } from "citty";
20929
+ import { defineCommand as defineCommand90 } from "citty";
20749
20930
  registerSchema({
20750
20931
  command: "avatars.get",
20751
20932
  description: "Read one avatar by handle \u2014 the command you run before casting it. Returns its status (only `ready` can be cast), the identity sheet URL every render must be grounded on via --reference, and the subject description that goes into the prompt VERBATIM. Add --full for the whole written profile (persona, speech, motion, wardrobe, setting, guardrails, voice, source photos).",
@@ -20759,7 +20940,7 @@ registerSchema({
20759
20940
  }
20760
20941
  }
20761
20942
  });
20762
- var getCommand2 = defineCommand89({
20943
+ var getCommand2 = defineCommand90({
20763
20944
  meta: {
20764
20945
  name: "get",
20765
20946
  description: "Read one avatar by handle: status, identity sheet URL for --reference, and the subject description to reuse verbatim. Example: baker avatars get marta --full"
@@ -20800,7 +20981,7 @@ var getCommand2 = defineCommand89({
20800
20981
  });
20801
20982
 
20802
20983
  // src/commands/avatars/list.ts
20803
- import { defineCommand as defineCommand90 } from "citty";
20984
+ import { defineCommand as defineCommand91 } from "citty";
20804
20985
  var STATUSES = ["generating", "ready", "error", "archived"];
20805
20986
  registerSchema({
20806
20987
  command: "avatars.list",
@@ -20815,7 +20996,7 @@ registerSchema({
20815
20996
  limit: { type: "number", description: "Max avatars to return (1-100)", required: false }
20816
20997
  }
20817
20998
  });
20818
- var listCommand10 = defineCommand90({
20999
+ var listCommand10 = defineCommand91({
20819
21000
  meta: {
20820
21001
  name: "list",
20821
21002
  description: "List the company's avatars (reusable AI presenters). Only `ready` ones can be cast. Example: baker avatars list --status ready --output md"
@@ -20849,7 +21030,7 @@ var listCommand10 = defineCommand90({
20849
21030
  });
20850
21031
 
20851
21032
  // src/commands/avatars/update.ts
20852
- import { defineCommand as defineCommand91 } from "citty";
21033
+ import { defineCommand as defineCommand92 } from "citty";
20853
21034
  function readUpdateArgs(args) {
20854
21035
  const handle = (args.handle || args["avatar-handle"])?.trim();
20855
21036
  if (!handle) {
@@ -20910,7 +21091,7 @@ registerSchema({
20910
21091
  }
20911
21092
  }
20912
21093
  });
20913
- var updateCommand2 = defineCommand91({
21094
+ var updateCommand2 = defineCommand92({
20914
21095
  meta: {
20915
21096
  name: "update",
20916
21097
  description: 'Edit an avatar; profile flags merge over what is stored. Example: baker avatars update marta --subject "woman in her early 50s, silver bob" --regenerate-sheet'
@@ -20973,7 +21154,7 @@ var updateCommand2 = defineCommand91({
20973
21154
  });
20974
21155
 
20975
21156
  // src/commands/avatars/index.ts
20976
- var avatarsCommand = defineCommand92({
21157
+ var avatarsCommand = defineCommand93({
20977
21158
  meta: {
20978
21159
  name: "avatars",
20979
21160
  description: `Reusable AI presenters this company can cast into images and video. An avatar holds one settled identity, so the same face can carry a whole campaign. Subcommands: list, get, create, update, delete.
@@ -21003,12 +21184,12 @@ Full guide: __tooling__/docs/tools/baker/avatars.md`
21003
21184
  });
21004
21185
 
21005
21186
  // src/commands/brand/index.ts
21006
- import { defineCommand as defineCommand94 } from "citty";
21187
+ import { defineCommand as defineCommand95 } from "citty";
21007
21188
 
21008
21189
  // src/commands/brand/fonts.ts
21009
21190
  import { mkdir, readFile, writeFile } from "fs/promises";
21010
21191
  import path from "path";
21011
- import { defineCommand as defineCommand93 } from "citty";
21192
+ import { defineCommand as defineCommand94 } from "citty";
21012
21193
 
21013
21194
  // src/engine/brand/fonts.ts
21014
21195
  var GOOGLE_CSS2 = "https://fonts.googleapis.com/css2";
@@ -21180,7 +21361,7 @@ async function readGlobalCss() {
21180
21361
  return "";
21181
21362
  }
21182
21363
  }
21183
- var fontsCheckCommand = defineCommand93({
21364
+ var fontsCheckCommand = defineCommand94({
21184
21365
  meta: {
21185
21366
  name: "check",
21186
21367
  description: "Verify the brand's fonts really exist. For every family/weight src/styles/global.css requests from Google Fonts, ask Google what it actually serves and report anything missing \u2014 a weight nobody serves renders as a synthesized fallback and looks off-brand everywhere."
@@ -21224,7 +21405,7 @@ var fontsCheckCommand = defineCommand93({
21224
21405
  });
21225
21406
  }
21226
21407
  });
21227
- var fontsFetchCommand = defineCommand93({
21408
+ var fontsFetchCommand = defineCommand94({
21228
21409
  meta: {
21229
21410
  name: "fetch",
21230
21411
  description: "Download a Google font into src/brand/fonts/ and print the @font-face block to paste above @theme in src/styles/global.css. Use when a brand font should be self-hosted rather than requested from Google on every page load."
@@ -21306,7 +21487,7 @@ var fontsFetchCommand = defineCommand93({
21306
21487
  });
21307
21488
  }
21308
21489
  });
21309
- var fontsCommand = defineCommand93({
21490
+ var fontsCommand = defineCommand94({
21310
21491
  meta: {
21311
21492
  name: "fonts",
21312
21493
  description: `Verify and self-host the brand's typefaces.
@@ -21324,7 +21505,7 @@ Subcommands:
21324
21505
  });
21325
21506
 
21326
21507
  // src/commands/brand/index.ts
21327
- var brandCommand = defineCommand94({
21508
+ var brandCommand = defineCommand95({
21328
21509
  meta: {
21329
21510
  name: "brand",
21330
21511
  description: `Brand asset verification for src/brand/.
@@ -21340,11 +21521,11 @@ Subcommands:
21340
21521
  });
21341
21522
 
21342
21523
  // src/commands/canvas/index.ts
21343
- import { defineCommand as defineCommand105 } from "citty";
21524
+ import { defineCommand as defineCommand106 } from "citty";
21344
21525
 
21345
21526
  // src/commands/canvas/catalog.ts
21346
- import { defineCommand as defineCommand95 } from "citty";
21347
- var catalogCommand = defineCommand95({
21527
+ import { defineCommand as defineCommand96 } from "citty";
21528
+ var catalogCommand = defineCommand96({
21348
21529
  meta: {
21349
21530
  name: "catalog",
21350
21531
  description: "Print the agent-facing node catalog (JSON Schema). Includes every registered node grouped by category."
@@ -21359,7 +21540,7 @@ var catalogCommand = defineCommand95({
21359
21540
  // src/commands/canvas/critique.ts
21360
21541
  import { readFile as readFile2 } from "fs/promises";
21361
21542
  import path2 from "path";
21362
- import { defineCommand as defineCommand96 } from "citty";
21543
+ import { defineCommand as defineCommand97 } from "citty";
21363
21544
 
21364
21545
  // src/engine/scaffold/lib/critique.ts
21365
21546
  var VIBE_CUE = /\b(light|lighting|golden|moody|warm|cool|tone|grade|contrast|shadow|glow|rim|backlit|neon|soft)\b/i;
@@ -21479,7 +21660,7 @@ function critiqueCanvas(canvas) {
21479
21660
  }
21480
21661
 
21481
21662
  // src/commands/canvas/critique.ts
21482
- var critiqueCommand = defineCommand96({
21663
+ var critiqueCommand = defineCommand97({
21483
21664
  meta: {
21484
21665
  name: "critique",
21485
21666
  description: "Pre-spend creative critic (ADVISORY \u2014 never blocks). Scores a scaffolded creative BEFORE the billed render, so weak spots get fixed for free. A VIDEO creative is scored on hook strength, sound-off first-frame legibility, retention risk, and mechanism clarity; a STATIC ad on baked-text legibility risk, identity grounding, brand-type fidelity, and mechanism clarity. Ground a video hook against `baker winning-ads hooks` for a proven pattern."
@@ -21521,9 +21702,9 @@ import { execFile } from "child_process";
21521
21702
  import { readdir, readFile as readFile3, stat } from "fs/promises";
21522
21703
  import path3 from "path";
21523
21704
  import { promisify } from "util";
21524
- import { defineCommand as defineCommand97 } from "citty";
21705
+ import { defineCommand as defineCommand98 } from "citty";
21525
21706
  var execFileAsync = promisify(execFile);
21526
- var inspectCommand = defineCommand97({
21707
+ var inspectCommand = defineCommand98({
21527
21708
  meta: {
21528
21709
  name: "inspect",
21529
21710
  description: "Dump a one-page summary of a canvas run: per-node duration + cache status, list of output files in the run dir, and optionally three thumbnail frames per video output. Pass either a run_id (resolved against --outputs-dir) or an absolute run directory."
@@ -21631,12 +21812,12 @@ async function probeDuration(filePath) {
21631
21812
 
21632
21813
  // src/commands/canvas/rerun.ts
21633
21814
  import path15 from "path";
21634
- import { defineCommand as defineCommand99 } from "citty";
21815
+ import { defineCommand as defineCommand100 } from "citty";
21635
21816
 
21636
21817
  // src/commands/canvas/run.ts
21637
21818
  import { readFile as readFile10 } from "fs/promises";
21638
21819
  import path14 from "path";
21639
- import { defineCommand as defineCommand98 } from "citty";
21820
+ import { defineCommand as defineCommand99 } from "citty";
21640
21821
 
21641
21822
  // src/commands/canvas/normalize-paths.ts
21642
21823
  import { existsSync as existsSync3, realpathSync } from "fs";
@@ -25887,7 +26068,7 @@ async function restoreRunSnapshot(manifest, targetDir, opts = {}) {
25887
26068
  }
25888
26069
 
25889
26070
  // src/commands/canvas/run.ts
25890
- var runCommand = defineCommand98({
26071
+ var runCommand = defineCommand99({
25891
26072
  meta: { name: "run", description: "Validate and execute a canvas JSON file." },
25892
26073
  args: {
25893
26074
  file: { type: "positional", required: true, description: "Path to canvas JSON" },
@@ -26267,7 +26448,7 @@ async function postInitialRunRecord(client, payload) {
26267
26448
 
26268
26449
  // src/commands/canvas/rerun.ts
26269
26450
  var SLUG_PATTERN = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
26270
- var rerunCommand = defineCommand99({
26451
+ var rerunCommand = defineCommand100({
26271
26452
  meta: {
26272
26453
  name: "rerun",
26273
26454
  description: "Re-run a creative's latest recorded canvas. Restores its definition files from run history first, so it works in a fresh workspace that never had the source chat's files \u2014 an interrupted run resumes (in-flight jobs re-attach), a completed one re-renders from the cache."
@@ -26364,7 +26545,7 @@ async function fetchManifest(url) {
26364
26545
  // src/commands/canvas/scaffold-static-ad.ts
26365
26546
  import { access, mkdir as mkdir6, readFile as readFile12, writeFile as writeFile8 } from "fs/promises";
26366
26547
  import path19 from "path";
26367
- import { defineCommand as defineCommand101 } from "citty";
26548
+ import { defineCommand as defineCommand102 } from "citty";
26368
26549
 
26369
26550
  // src/engine/scaffold/staticAd.ts
26370
26551
  import { z as z26 } from "zod";
@@ -26714,7 +26895,7 @@ function isValidScaffoldSlug(slug) {
26714
26895
  // src/commands/canvas/sync-definition.ts
26715
26896
  import { readdir as readdir5, readFile as readFile11, stat as stat3 } from "fs/promises";
26716
26897
  import path18 from "path";
26717
- import { defineCommand as defineCommand100 } from "citty";
26898
+ import { defineCommand as defineCommand101 } from "citty";
26718
26899
 
26719
26900
  // src/commands/canvas/definition-graph.ts
26720
26901
  var MAX_NODES = 300;
@@ -26827,7 +27008,7 @@ async function resolveCanvasPath(inputPath) {
26827
27008
  const chosen = (slug ? canvases.find((name) => name === `${slug}.canvas.json`) : void 0) ?? canvases[0];
26828
27009
  return chosen ? path18.join(dir, chosen) : null;
26829
27010
  }
26830
- var syncDefinitionCommand = defineCommand100({
27011
+ var syncDefinitionCommand = defineCommand101({
26831
27012
  meta: {
26832
27013
  name: "sync-definition",
26833
27014
  description: "Push a creative's current node-graph + input thumbnails to the dashboard without rendering. Runs automatically when you edit a creative's canvas.json or prompt.json."
@@ -27057,7 +27238,7 @@ async function runVisionPasses(canvas) {
27057
27238
  return fail3("read_outputs", e instanceof Error ? e.message : String(e));
27058
27239
  }
27059
27240
  }
27060
- var scaffoldStaticAdCommand = defineCommand101({
27241
+ var scaffoldStaticAdCommand = defineCommand102({
27061
27242
  meta: {
27062
27243
  name: "scaffold-static-ad",
27063
27244
  description: "Turn a source/inspiration image into a runnable static-ad canvas. Runs billed passes \u2014 image_describe (the blueprint, baked to prompt.json as the editable 'prompt'), an AI selection of the image's MAIN identity elements, and a structured global-layout pass (the column/row grid with per-region bounds and text sizes) \u2014 then scaffolds a canvas that wires one [TODO] ingest slot per element (logo/product/subject/badge + brand font) into image_generate. By default it also fans the hero out to the platform's placement ratios (via image_aspect_adapt \u2014 the hero ratio is free, the rest are billed AI recompositions); pass --placements none for a single base ad, or a preset to pick the set. Edit prompt.json and drop the real assets, then `baker canvas run` it."
@@ -27246,7 +27427,7 @@ var scaffoldStaticAdCommand = defineCommand101({
27246
27427
  import { access as access2, cp, mkdir as mkdir7, readFile as readFile15, rm as rm6, writeFile as writeFile9 } from "fs/promises";
27247
27428
  import { tmpdir as tmpdir2 } from "os";
27248
27429
  import path22 from "path";
27249
- import { defineCommand as defineCommand102 } from "citty";
27430
+ import { defineCommand as defineCommand103 } from "citty";
27250
27431
 
27251
27432
  // src/engine/scaffold/lib/model-router.ts
27252
27433
  var SEEDANCE = "bytedance/seedance-2.0";
@@ -27707,7 +27888,7 @@ async function runAnalysisPasses(deconstructCanvas, selectModel) {
27707
27888
  return fail4("deconstruct", e instanceof Error ? e.message : String(e));
27708
27889
  }
27709
27890
  }
27710
- var scaffoldVideoCommand = defineCommand102({
27891
+ var scaffoldVideoCommand = defineCommand103({
27711
27892
  meta: {
27712
27893
  name: "scaffold-video",
27713
27894
  description: "Turn a reference video into a runnable reproduction canvas in one command. Runs billed passes \u2014 video_deconstruct (the full scene-by-scene blueprint + transcript, baked to a split, editable blueprint: a global prompt.json plus one small scenes/sNN.json per scene) and an AI selection of the video's RECURRING identity elements (person/animal/product/logo) \u2014 then scaffolds a pipeline where every scene boundary is a static-ad-grade frame (the blueprint as target_blueprint, a reference legend, the real frame as anchor) and each recurring element gets ONE shared [TODO] ingest slot wired into every frame it appears in. The clips feed Seedance an ultra-detailed motion brief (action, camera, dialogue, transcript). Edit a scene's scenes/sNN.json (or prompt.json for global cast/palette/brand), drop the real source images, then `baker canvas run`."
@@ -28017,7 +28198,7 @@ var scaffoldVideoCommand = defineCommand102({
28017
28198
  // src/commands/canvas/set-prompt.ts
28018
28199
  import { readFile as readFile16, writeFile as writeFile10 } from "fs/promises";
28019
28200
  import path23 from "path";
28020
- import { defineCommand as defineCommand103 } from "citty";
28201
+ import { defineCommand as defineCommand104 } from "citty";
28021
28202
  function setNodePrompt(canvas, nodeId, text2) {
28022
28203
  const nodes = canvas?.nodes;
28023
28204
  if (!Array.isArray(nodes)) throw new Error("canvas has no nodes array");
@@ -28032,7 +28213,7 @@ function setNodePrompt(canvas, nodeId, text2) {
28032
28213
  newNodes[idx] = newNode;
28033
28214
  return { ...canvas, nodes: newNodes };
28034
28215
  }
28035
- var setPromptCommand = defineCommand103({
28216
+ var setPromptCommand = defineCommand104({
28036
28217
  meta: {
28037
28218
  name: "set-prompt",
28038
28219
  description: "Safely set a node's params.prompt (a frame description, motion prompt, etc.) without hand-editing the JSON. Prefer --text-file for multi-line/accented copy \u2014 it preserves UTF-8 exactly, unlike shell-quoted jq."
@@ -28092,8 +28273,8 @@ var setPromptCommand = defineCommand103({
28092
28273
  // src/commands/canvas/validate.ts
28093
28274
  import { readFile as readFile17 } from "fs/promises";
28094
28275
  import path24 from "path";
28095
- import { defineCommand as defineCommand104 } from "citty";
28096
- var validateCommand = defineCommand104({
28276
+ import { defineCommand as defineCommand105 } from "citty";
28277
+ var validateCommand = defineCommand105({
28097
28278
  meta: {
28098
28279
  name: "validate",
28099
28280
  description: "Validate a canvas JSON file (no execution). Includes a per-node cost preview and runs each node's deep validators (composition meta checks for hyperframe_render/_snapshot)."
@@ -28166,7 +28347,7 @@ var validateCommand = defineCommand104({
28166
28347
  });
28167
28348
 
28168
28349
  // src/commands/canvas/index.ts
28169
- var canvasCommand = defineCommand105({
28350
+ var canvasCommand = defineCommand106({
28170
28351
  meta: {
28171
28352
  name: "canvas",
28172
28353
  description: `Run Baker creative canvas JSON files locally. Local nodes execute in-process; remote nodes POST to the Convex backend gateway.
@@ -28200,7 +28381,7 @@ Full guide: __tooling__/docs/tools/baker/canvas.md`
28200
28381
  });
28201
28382
 
28202
28383
  // src/commands/capabilities/index.ts
28203
- import { defineCommand as defineCommand106 } from "citty";
28384
+ import { defineCommand as defineCommand107 } from "citty";
28204
28385
  registerSchema({
28205
28386
  command: "capabilities",
28206
28387
  description: "Start here, before promising the user anything on an ad platform, in Analytics, or in Tag Manager. Answers three questions in one call: what is connected and with what access, what a write on each surface actually does when it lands, and what CANNOT be done here and why. Run it with no arguments for every surface; name one surface to also get the exact fields every change on it accepts.",
@@ -28243,7 +28424,7 @@ function capabilityHints(surfaces) {
28243
28424
  }
28244
28425
  return hints;
28245
28426
  }
28246
- var runCapabilities = defineCommand106({
28427
+ var runCapabilities = defineCommand107({
28247
28428
  meta: {
28248
28429
  name: "capabilities",
28249
28430
  description: `What Baker can and cannot do for this company, before any work starts.
@@ -28299,7 +28480,7 @@ Full guide: __tooling__/docs/tools/baker/capabilities.md`
28299
28480
  var capabilitiesCommand = runCapabilities;
28300
28481
 
28301
28482
  // src/commands/chats/index.ts
28302
- import { defineCommand as defineCommand107 } from "citty";
28483
+ import { defineCommand as defineCommand108 } from "citty";
28303
28484
  var STATUS_GROUPS = ["active", "archived", "all"];
28304
28485
  var REPO_SURFACES = ["knowledge", "company", "brand", "landings", "flows", "creatives"];
28305
28486
  function parseBoundedInt(raw, name, min, max) {
@@ -28321,7 +28502,7 @@ registerSchema({
28321
28502
  full: { type: "boolean", description: "Include each Session's full change list", required: false, default: false }
28322
28503
  }
28323
28504
  });
28324
- var listCommand11 = defineCommand107({
28505
+ var listCommand11 = defineCommand108({
28325
28506
  meta: { name: "list", description: "List other Sessions on this account, newest first." },
28326
28507
  args: {
28327
28508
  status: { type: "string", description: "Filter: active|archived|all (default: all)", required: false },
@@ -28376,7 +28557,7 @@ registerSchema({
28376
28557
  }
28377
28558
  }
28378
28559
  });
28379
- var viewCommand = defineCommand107({
28560
+ var viewCommand = defineCommand108({
28380
28561
  meta: {
28381
28562
  name: "view",
28382
28563
  description: "Inspect one Session's full effects \u2014 git content + actions/tags/ads, kickoff, commits."
@@ -28420,7 +28601,7 @@ registerSchema({
28420
28601
  }
28421
28602
  }
28422
28603
  });
28423
- var transcriptCommand = defineCommand107({
28604
+ var transcriptCommand = defineCommand108({
28424
28605
  meta: { name: "transcript", description: "Read another Session's conversation." },
28425
28606
  args: {
28426
28607
  id: { type: "positional", description: "The Session id", required: true },
@@ -28472,7 +28653,7 @@ registerSchema({
28472
28653
  }
28473
28654
  }
28474
28655
  });
28475
- var diffCommand = defineCommand107({
28656
+ var diffCommand = defineCommand108({
28476
28657
  meta: { name: "diff", description: "See a published Session's real file-level changes." },
28477
28658
  args: {
28478
28659
  id: { type: "positional", description: "The Session id", required: true },
@@ -28516,7 +28697,7 @@ var diffCommand = defineCommand107({
28516
28697
  }
28517
28698
  }
28518
28699
  });
28519
- var chatsCommand = defineCommand107({
28700
+ var chatsCommand = defineCommand108({
28520
28701
  meta: {
28521
28702
  name: "chats",
28522
28703
  description: `Inspect other Sessions on this account (read-only): list them, view what they produced, read their conversation, and see their real file changes \u2014 so you can reuse past work for a new goal.
@@ -28531,10 +28712,10 @@ Full guide: __tooling__/docs/tools/baker/chats.md`
28531
28712
  });
28532
28713
 
28533
28714
  // src/commands/creatives/index.ts
28534
- import { defineCommand as defineCommand109 } from "citty";
28715
+ import { defineCommand as defineCommand110 } from "citty";
28535
28716
 
28536
28717
  // src/commands/creatives/publish.ts
28537
- import { defineCommand as defineCommand108 } from "citty";
28718
+ import { defineCommand as defineCommand109 } from "citty";
28538
28719
 
28539
28720
  // src/commands/images/api.ts
28540
28721
  import { readFile as readFile18 } from "fs/promises";
@@ -28681,7 +28862,7 @@ async function publishCreative(args, deps = defaultImageApiDeps) {
28681
28862
  chatId: chatIdFromEnv2()
28682
28863
  });
28683
28864
  }
28684
- var publishCommand = defineCommand108({
28865
+ var publishCommand = defineCommand109({
28685
28866
  meta: {
28686
28867
  name: "publish",
28687
28868
  description: "Publish a final static creative image to Baker Creatives and print the creative reference JSON."
@@ -28739,7 +28920,7 @@ var publishCommand = defineCommand108({
28739
28920
  });
28740
28921
 
28741
28922
  // src/commands/creatives/index.ts
28742
- var creativesCommand3 = defineCommand109({
28923
+ var creativesCommand3 = defineCommand110({
28743
28924
  meta: {
28744
28925
  name: "creatives",
28745
28926
  description: `Publish static ad creatives as first-class Baker outputs.
@@ -28756,7 +28937,7 @@ Full guide: __tooling__/docs/tools/baker/creatives.md`
28756
28937
  });
28757
28938
 
28758
28939
  // src/commands/flows/index.ts
28759
- import { defineCommand as defineCommand110 } from "citty";
28940
+ import { defineCommand as defineCommand111 } from "citty";
28760
28941
 
28761
28942
  // src/commands/flows/shared.ts
28762
28943
  import { existsSync as existsSync5, readdirSync as readdirSync2, readFileSync as readFileSync9 } from "fs";
@@ -28911,7 +29092,7 @@ function displayName(slug) {
28911
29092
  const name = tree.displayName;
28912
29093
  return typeof name === "string" && name.trim() ? name.trim() : slug;
28913
29094
  }
28914
- var listCommand12 = defineCommand110({
29095
+ var listCommand12 = defineCommand111({
28915
29096
  meta: {
28916
29097
  name: "list",
28917
29098
  description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
@@ -28925,7 +29106,7 @@ var listCommand12 = defineCommand110({
28925
29106
  writeJson({ ok: true, data: { flows } });
28926
29107
  }
28927
29108
  });
28928
- var showCommand3 = defineCommand110({
29109
+ var showCommand3 = defineCommand111({
28929
29110
  meta: {
28930
29111
  name: "show",
28931
29112
  description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
@@ -28946,7 +29127,7 @@ var showCommand3 = defineCommand110({
28946
29127
  writeJson({ ok: true, data: response });
28947
29128
  }
28948
29129
  });
28949
- var flowsCommand = defineCommand110({
29130
+ var flowsCommand = defineCommand111({
28950
29131
  meta: {
28951
29132
  name: "flows",
28952
29133
  description: `Read this workspace's Forms (flows) and the configuration status of their confidential fields \u2014 connection secrets, OAuth connections, and third-party field definitions (HubSpot, Calendly, HighLevel, SavvyCal).
@@ -28970,10 +29151,10 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
28970
29151
  });
28971
29152
 
28972
29153
  // src/commands/ga4/index.ts
28973
- import { defineCommand as defineCommand117 } from "citty";
29154
+ import { defineCommand as defineCommand118 } from "citty";
28974
29155
 
28975
29156
  // src/commands/ga4/audit.ts
28976
- import { defineCommand as defineCommand111 } from "citty";
29157
+ import { defineCommand as defineCommand112 } from "citty";
28977
29158
 
28978
29159
  // src/commands/ga4/resolve.ts
28979
29160
  async function fetchProperties(useCache = true) {
@@ -29039,7 +29220,7 @@ registerSchema({
29039
29220
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
29040
29221
  }
29041
29222
  });
29042
- var auditCommand2 = defineCommand111({
29223
+ var auditCommand2 = defineCommand112({
29043
29224
  meta: {
29044
29225
  name: "audit",
29045
29226
  description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
@@ -29094,7 +29275,7 @@ Examples:
29094
29275
  });
29095
29276
 
29096
29277
  // src/commands/ga4/config.ts
29097
- import { defineCommand as defineCommand112 } from "citty";
29278
+ import { defineCommand as defineCommand113 } from "citty";
29098
29279
 
29099
29280
  // src/commands/ga4/shared.ts
29100
29281
  import { readFileSync as readFileSync10 } from "fs";
@@ -29145,7 +29326,7 @@ function loadJsonPayloads(args) {
29145
29326
  return parsed.map((entry, index) => asObject(entry, "json", index));
29146
29327
  }
29147
29328
  var RETRYABLE_CODES = /* @__PURE__ */ new Set(["RATE_LIMITED", "INTERNAL_ERROR", "NETWORK_ERROR", "TIMEOUT"]);
29148
- function handleError(err) {
29329
+ function handleError2(err) {
29149
29330
  if (err instanceof ApiError) {
29150
29331
  const readOnly = err.code === "FORBIDDEN" && /read the property but not change it/i.test(err.message);
29151
29332
  writeJsonEnvelope({
@@ -29186,7 +29367,7 @@ async function stageOp3(op) {
29186
29367
  hints: [...STAGE_HINTS, ...data.warnings.length > 0 ? [WARNING_HINT] : []]
29187
29368
  });
29188
29369
  } catch (err) {
29189
- handleError(err);
29370
+ handleError2(err);
29190
29371
  }
29191
29372
  }
29192
29373
  async function stageOps(ops) {
@@ -29204,7 +29385,7 @@ async function stageOps(ops) {
29204
29385
  hints: [...STAGE_HINTS, ...data.ops.some((op) => op.warnings.length > 0) ? [WARNING_HINT] : []]
29205
29386
  });
29206
29387
  } catch (err) {
29207
- handleError(err);
29388
+ handleError2(err);
29208
29389
  }
29209
29390
  }
29210
29391
  async function draftAction2(path39, body, chat) {
@@ -29214,7 +29395,7 @@ async function draftAction2(path39, body, chat) {
29214
29395
  writeJsonEnvelope({ ok: true, data });
29215
29396
  return data;
29216
29397
  } catch (err) {
29217
- handleError(err);
29398
+ handleError2(err);
29218
29399
  }
29219
29400
  }
29220
29401
  function renderDraft(response) {
@@ -29251,7 +29432,7 @@ async function draftList(json, chat) {
29251
29432
  process.stdout.write(`${renderDraft(data)}
29252
29433
  `);
29253
29434
  } catch (err) {
29254
- handleError(err);
29435
+ handleError2(err);
29255
29436
  }
29256
29437
  }
29257
29438
 
@@ -29286,7 +29467,7 @@ function configHints(config) {
29286
29467
  }
29287
29468
  return hints;
29288
29469
  }
29289
- var configCommand = defineCommand112({
29470
+ var configCommand = defineCommand113({
29290
29471
  meta: {
29291
29472
  name: "config",
29292
29473
  description: `Read how the property is configured to measure \u2014 key events, custom definitions, custom events, retention
@@ -29308,13 +29489,13 @@ Examples:
29308
29489
  });
29309
29490
  writeJsonEnvelope({ ok: true, data, hints: configHints(data) });
29310
29491
  } catch (err) {
29311
- handleError(err);
29492
+ handleError2(err);
29312
29493
  }
29313
29494
  }
29314
29495
  });
29315
29496
 
29316
29497
  // src/commands/ga4/draft.ts
29317
- import { defineCommand as defineCommand113 } from "citty";
29498
+ import { defineCommand as defineCommand114 } from "citty";
29318
29499
  registerSchema({
29319
29500
  command: "ga4.draft",
29320
29501
  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.",
@@ -29323,13 +29504,13 @@ registerSchema({
29323
29504
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
29324
29505
  }
29325
29506
  });
29326
- var draftCommand3 = defineCommand113({
29507
+ var draftCommand3 = defineCommand114({
29327
29508
  meta: {
29328
29509
  name: "draft",
29329
29510
  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."
29330
29511
  },
29331
29512
  subCommands: {
29332
- list: defineCommand113({
29513
+ list: defineCommand114({
29333
29514
  meta: { name: "list", description: "Review everything staged on this chat (--json for the raw envelope)" },
29334
29515
  args: {
29335
29516
  json: { type: "boolean", description: "Print the raw JSON envelope", required: false },
@@ -29339,7 +29520,7 @@ var draftCommand3 = defineCommand113({
29339
29520
  await draftList(args.json === true, args.chat);
29340
29521
  }
29341
29522
  }),
29342
- show: defineCommand113({
29523
+ show: defineCommand114({
29343
29524
  meta: {
29344
29525
  name: "show",
29345
29526
  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)."
@@ -29356,7 +29537,7 @@ var draftCommand3 = defineCommand113({
29356
29537
  );
29357
29538
  }
29358
29539
  }),
29359
- amend: defineCommand113({
29540
+ amend: defineCommand114({
29360
29541
  meta: {
29361
29542
  name: "amend",
29362
29543
  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."
@@ -29373,7 +29554,7 @@ var draftCommand3 = defineCommand113({
29373
29554
  });
29374
29555
  }
29375
29556
  }),
29376
- remove: defineCommand113({
29557
+ remove: defineCommand114({
29377
29558
  meta: { name: "remove", description: "Remove one staged change" },
29378
29559
  args: { ref: { type: "positional", description: "Staged ref or target id", required: false } },
29379
29560
  run: async ({ args }) => {
@@ -29382,7 +29563,7 @@ var draftCommand3 = defineCommand113({
29382
29563
  });
29383
29564
  }
29384
29565
  }),
29385
- clear: defineCommand113({
29566
+ clear: defineCommand114({
29386
29567
  meta: { name: "clear", description: "Discard all Google Analytics changes staged on this chat" },
29387
29568
  run: async () => {
29388
29569
  await draftAction2("/api/ga4/draft/clear", {});
@@ -29392,7 +29573,7 @@ var draftCommand3 = defineCommand113({
29392
29573
  });
29393
29574
 
29394
29575
  // src/commands/ga4/properties.ts
29395
- import { defineCommand as defineCommand114 } from "citty";
29576
+ import { defineCommand as defineCommand115 } from "citty";
29396
29577
  registerSchema({
29397
29578
  command: "ga4.properties",
29398
29579
  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.",
@@ -29408,7 +29589,7 @@ function propertyHints(properties) {
29408
29589
  resources: properties.map((property) => ({ id: property.externalId, label: property.name }))
29409
29590
  });
29410
29591
  }
29411
- var propertiesCommand = defineCommand114({
29592
+ var propertiesCommand = defineCommand115({
29412
29593
  meta: {
29413
29594
  name: "properties",
29414
29595
  description: `List accessible GA4 properties.
@@ -29458,7 +29639,7 @@ Examples:
29458
29639
  // src/commands/ga4/query.ts
29459
29640
  import { appendFileSync as appendFileSync2, existsSync as existsSync6, readFileSync as readFileSync11, writeFileSync as writeFileSync3 } from "fs";
29460
29641
  import { resolve as resolve2 } from "path";
29461
- import { defineCommand as defineCommand115 } from "citty";
29642
+ import { defineCommand as defineCommand116 } from "citty";
29462
29643
 
29463
29644
  // src/commands/ga4/presets.ts
29464
29645
  var GA4_PRESETS = [
@@ -29579,7 +29760,7 @@ function buildRequestBody(args, propertyId, useCache) {
29579
29760
  if (!useCache) body.skipCache = true;
29580
29761
  return body;
29581
29762
  }
29582
- function handleError2(err) {
29763
+ function handleError3(err) {
29583
29764
  if (err instanceof ApiError) {
29584
29765
  if (isNotConnectedError(err.code, err.message)) {
29585
29766
  handleConnectionError("ga4", err.message);
@@ -29593,7 +29774,7 @@ function handleError2(err) {
29593
29774
  });
29594
29775
  process.exit(1);
29595
29776
  }
29596
- var queryCommand2 = defineCommand115({
29777
+ var queryCommand2 = defineCommand116({
29597
29778
  meta: {
29598
29779
  name: "query",
29599
29780
  description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
@@ -29658,13 +29839,13 @@ Free-form (escape hatch):
29658
29839
  }
29659
29840
  outputRows(response.data ?? [], args, response, false);
29660
29841
  } catch (err) {
29661
- handleError2(err);
29842
+ handleError3(err);
29662
29843
  }
29663
29844
  }
29664
29845
  });
29665
29846
 
29666
29847
  // src/commands/ga4/write-commands.ts
29667
- import { defineCommand as defineCommand116 } from "citty";
29848
+ import { defineCommand as defineCommand117 } from "citty";
29668
29849
  var PROPERTY_ARG_DESCRIPTION = "GA4 property id (optional only when one property is connected \u2014 run `baker ga4 properties`)";
29669
29850
  var propertyArg = { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false };
29670
29851
  function createJsonDescription(noun) {
@@ -29682,7 +29863,7 @@ registerSchema({
29682
29863
  "property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
29683
29864
  }
29684
29865
  });
29685
- var keyEventCommand = defineCommand116({
29866
+ var keyEventCommand = defineCommand117({
29686
29867
  meta: {
29687
29868
  name: "key-event",
29688
29869
  description: `Stage key-event (conversion) changes
@@ -29695,7 +29876,7 @@ Examples:
29695
29876
  baker ga4 key-event delete 4185`
29696
29877
  },
29697
29878
  subCommands: {
29698
- create: defineCommand116({
29879
+ create: defineCommand117({
29699
29880
  meta: {
29700
29881
  name: "create",
29701
29882
  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."
@@ -29716,7 +29897,7 @@ Examples:
29716
29897
  );
29717
29898
  }
29718
29899
  }),
29719
- update: defineCommand116({
29900
+ update: defineCommand117({
29720
29901
  meta: {
29721
29902
  name: "update",
29722
29903
  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."
@@ -29736,7 +29917,7 @@ Examples:
29736
29917
  });
29737
29918
  }
29738
29919
  }),
29739
- delete: defineCommand116({
29920
+ delete: defineCommand117({
29740
29921
  meta: {
29741
29922
  name: "delete",
29742
29923
  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."
@@ -29784,7 +29965,7 @@ for (const { kind, noun, createHint } of DEFINITIONS) {
29784
29965
  }
29785
29966
  function definitionCommand(definition) {
29786
29967
  const { command, kind, noun, example } = definition;
29787
- return defineCommand116({
29968
+ return defineCommand117({
29788
29969
  meta: {
29789
29970
  name: command,
29790
29971
  description: `Stage ${noun} changes
@@ -29796,7 +29977,7 @@ Examples:
29796
29977
  baker ga4 ${command} archive 12`
29797
29978
  },
29798
29979
  subCommands: {
29799
- create: defineCommand116({
29980
+ create: defineCommand117({
29800
29981
  meta: { name: "create", description: `Stage a new ${noun} (or a JSON array of them, staged together)` },
29801
29982
  args: {
29802
29983
  json: { type: "string", description: createJsonDescription(noun), required: false },
@@ -29814,7 +29995,7 @@ Examples:
29814
29995
  );
29815
29996
  }
29816
29997
  }),
29817
- update: defineCommand116({
29998
+ update: defineCommand117({
29818
29999
  meta: {
29819
30000
  name: "update",
29820
30001
  description: `Stage a change to an existing ${noun} (pass its id). The parameter name and scope cannot change \u2014 archive and recreate for that.`
@@ -29834,7 +30015,7 @@ Examples:
29834
30015
  });
29835
30016
  }
29836
30017
  }),
29837
- archive: defineCommand116({
30018
+ archive: defineCommand117({
29838
30019
  meta: {
29839
30020
  name: "archive",
29840
30021
  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.`
@@ -29879,7 +30060,7 @@ var dataStreamArg = {
29879
30060
  function withStream(args) {
29880
30061
  return typeof args["data-stream"] === "string" ? { dataStream: args["data-stream"] } : {};
29881
30062
  }
29882
- var customEventCommand = defineCommand116({
30063
+ var customEventCommand = defineCommand117({
29883
30064
  meta: {
29884
30065
  name: "custom-event",
29885
30066
  description: `Stage custom events \u2014 new events built from events the site already sends
@@ -29890,7 +30071,7 @@ Examples:
29890
30071
  baker ga4 custom-event delete 7`
29891
30072
  },
29892
30073
  subCommands: {
29893
- create: defineCommand116({
30074
+ create: defineCommand117({
29894
30075
  meta: {
29895
30076
  name: "create",
29896
30077
  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."
@@ -29913,7 +30094,7 @@ Examples:
29913
30094
  );
29914
30095
  }
29915
30096
  }),
29916
- update: defineCommand116({
30097
+ update: defineCommand117({
29917
30098
  meta: { name: "update", description: "Stage a change to an existing custom event (pass its id)" },
29918
30099
  args: {
29919
30100
  id: { type: "positional", description: "Custom event rule id", required: false },
@@ -29932,7 +30113,7 @@ Examples:
29932
30113
  });
29933
30114
  }
29934
30115
  }),
29935
- delete: defineCommand116({
30116
+ delete: defineCommand117({
29936
30117
  meta: {
29937
30118
  name: "delete",
29938
30119
  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."
@@ -29987,7 +30168,7 @@ function booleanArg(input, flag) {
29987
30168
  if (input === "false") return false;
29988
30169
  return failValidation3(`--${flag} must be true or false`);
29989
30170
  }
29990
- var dataRetentionCommand = defineCommand116({
30171
+ var dataRetentionCommand = defineCommand117({
29991
30172
  meta: {
29992
30173
  name: "data-retention",
29993
30174
  description: `Stage a change to how long Google Analytics keeps data
@@ -29997,7 +30178,7 @@ Examples:
29997
30178
  baker ga4 data-retention set --event-data 14 --user-data 14 --reset-on-activity true`
29998
30179
  },
29999
30180
  subCommands: {
30000
- set: defineCommand116({
30181
+ set: defineCommand117({
30001
30182
  meta: { name: "set", description: "Stage the retention window (months)" },
30002
30183
  args: {
30003
30184
  "event-data": { type: "string", description: "2, 14, 26, 38 or 50", required: false },
@@ -30026,7 +30207,7 @@ Examples:
30026
30207
  });
30027
30208
 
30028
30209
  // src/commands/ga4/index.ts
30029
- var ga4Command = defineCommand117({
30210
+ var ga4Command = defineCommand118({
30030
30211
  meta: {
30031
30212
  name: "ga4",
30032
30213
  description: `Google Analytics 4. Report on a property, audit its config, and change what it measures.
@@ -30067,12 +30248,12 @@ Full guide: __tooling__/docs/tools/baker/ga4.md`
30067
30248
  });
30068
30249
 
30069
30250
  // src/commands/gsc/index.ts
30070
- import { defineCommand as defineCommand121 } from "citty";
30251
+ import { defineCommand as defineCommand122 } from "citty";
30071
30252
 
30072
30253
  // src/commands/gsc/query.ts
30073
30254
  import { appendFileSync as appendFileSync3, existsSync as existsSync7, readFileSync as readFileSync12, writeFileSync as writeFileSync4 } from "fs";
30074
30255
  import { resolve as resolve3 } from "path";
30075
- import { defineCommand as defineCommand118 } from "citty";
30256
+ import { defineCommand as defineCommand119 } from "citty";
30076
30257
 
30077
30258
  // src/commands/gsc/presets.ts
30078
30259
  var GSC_PRESETS = [
@@ -30252,7 +30433,7 @@ function buildRequestBody2(args, siteUrl, useCache) {
30252
30433
  if (!useCache) body.skipCache = true;
30253
30434
  return body;
30254
30435
  }
30255
- function handleError3(err) {
30436
+ function handleError4(err) {
30256
30437
  if (err instanceof ApiError) {
30257
30438
  if (isNotConnectedError(err.code, err.message)) {
30258
30439
  handleConnectionError("gsc", err.message);
@@ -30266,7 +30447,7 @@ function handleError3(err) {
30266
30447
  });
30267
30448
  process.exit(1);
30268
30449
  }
30269
- var queryCommand3 = defineCommand118({
30450
+ var queryCommand3 = defineCommand119({
30270
30451
  meta: {
30271
30452
  name: "query",
30272
30453
  description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
@@ -30338,13 +30519,13 @@ Free-form (escape hatch):
30338
30519
  }
30339
30520
  outputRows2(response.data ?? [], args, response, false);
30340
30521
  } catch (err) {
30341
- handleError3(err);
30522
+ handleError4(err);
30342
30523
  }
30343
30524
  }
30344
30525
  });
30345
30526
 
30346
30527
  // src/commands/gsc/sitemaps.ts
30347
- import { defineCommand as defineCommand119 } from "citty";
30528
+ import { defineCommand as defineCommand120 } from "citty";
30348
30529
  registerSchema({
30349
30530
  command: "gsc.sitemaps",
30350
30531
  description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
@@ -30353,7 +30534,7 @@ registerSchema({
30353
30534
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
30354
30535
  }
30355
30536
  });
30356
- var sitemapsCommand = defineCommand119({
30537
+ var sitemapsCommand = defineCommand120({
30357
30538
  meta: {
30358
30539
  name: "sitemaps",
30359
30540
  description: `List sitemaps for a site. Check health and errors.
@@ -30406,7 +30587,7 @@ Examples:
30406
30587
  });
30407
30588
 
30408
30589
  // src/commands/gsc/sites.ts
30409
- import { defineCommand as defineCommand120 } from "citty";
30590
+ import { defineCommand as defineCommand121 } from "citty";
30410
30591
  registerSchema({
30411
30592
  command: "gsc.sites",
30412
30593
  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.",
@@ -30422,7 +30603,7 @@ function siteHints(sites) {
30422
30603
  resources: sites.map((site) => ({ id: site.siteUrl, label: site.permissionLevel }))
30423
30604
  });
30424
30605
  }
30425
- var sitesCommand = defineCommand120({
30606
+ var sitesCommand = defineCommand121({
30426
30607
  meta: {
30427
30608
  name: "sites",
30428
30609
  description: `List verified Search Console sites.
@@ -30470,7 +30651,7 @@ Examples:
30470
30651
  });
30471
30652
 
30472
30653
  // src/commands/gsc/index.ts
30473
- var gscCommand = defineCommand121({
30654
+ var gscCommand = defineCommand122({
30474
30655
  meta: {
30475
30656
  name: "gsc",
30476
30657
  description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
@@ -30494,7 +30675,7 @@ Full guide: __tooling__/docs/tools/baker/gsc.md`
30494
30675
  });
30495
30676
 
30496
30677
  // src/commands/history/index.ts
30497
- import { defineCommand as defineCommand122 } from "citty";
30678
+ import { defineCommand as defineCommand123 } from "citty";
30498
30679
  registerSchema({
30499
30680
  command: "history.list",
30500
30681
  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.",
@@ -30549,7 +30730,7 @@ function parseBoundedInt2(raw, name, min, max) {
30549
30730
  }
30550
30731
  return value;
30551
30732
  }
30552
- var listCommand13 = defineCommand122({
30733
+ var listCommand13 = defineCommand123({
30553
30734
  meta: {
30554
30735
  name: "list",
30555
30736
  description: "List recent account changes (unified audit log), newest first."
@@ -30595,7 +30776,7 @@ var listCommand13 = defineCommand122({
30595
30776
  }
30596
30777
  }
30597
30778
  });
30598
- var historyCommand = defineCommand122({
30779
+ var historyCommand = defineCommand123({
30599
30780
  meta: {
30600
30781
  name: "history",
30601
30782
  description: `Unified account history (audit log): what changed, who did it, and when.
@@ -30605,7 +30786,7 @@ Full guide: __tooling__/docs/tools/baker/history.md`
30605
30786
  });
30606
30787
 
30607
30788
  // src/commands/hubspot/index.ts
30608
- import { defineCommand as defineCommand123 } from "citty";
30789
+ import { defineCommand as defineCommand124 } from "citty";
30609
30790
  var EMBED_TYPES = ["legacy", "v4", "unknown"];
30610
30791
  function failNotConnected(err) {
30611
30792
  if (err instanceof ApiError && err.code === "FORBIDDEN" && err.message.includes(HUBSPOT_MISSING_GRANT_MARKER)) {
@@ -30759,7 +30940,7 @@ registerSchema({
30759
30940
  }
30760
30941
  }
30761
30942
  });
30762
- var formsListCommand = defineCommand123({
30943
+ var formsListCommand = defineCommand124({
30763
30944
  meta: {
30764
30945
  name: "list",
30765
30946
  description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
@@ -30804,7 +30985,7 @@ var formsListCommand = defineCommand123({
30804
30985
  }
30805
30986
  }
30806
30987
  });
30807
- var formsViewCommand = defineCommand123({
30988
+ var formsViewCommand = defineCommand124({
30808
30989
  meta: {
30809
30990
  name: "view",
30810
30991
  description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
@@ -30856,7 +31037,7 @@ var formsViewCommand = defineCommand123({
30856
31037
  }
30857
31038
  }
30858
31039
  });
30859
- var meetingsListCommand = defineCommand123({
31040
+ var meetingsListCommand = defineCommand124({
30860
31041
  meta: {
30861
31042
  name: "list",
30862
31043
  description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
@@ -30898,7 +31079,7 @@ var meetingsListCommand = defineCommand123({
30898
31079
  }
30899
31080
  }
30900
31081
  });
30901
- var meetingsViewCommand = defineCommand123({
31082
+ var meetingsViewCommand = defineCommand124({
30902
31083
  meta: {
30903
31084
  name: "view",
30904
31085
  description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
@@ -30942,7 +31123,7 @@ var meetingsViewCommand = defineCommand123({
30942
31123
  }
30943
31124
  }
30944
31125
  });
30945
- var formsSubmissionsCommand = defineCommand123({
31126
+ var formsSubmissionsCommand = defineCommand124({
30946
31127
  meta: {
30947
31128
  name: "submissions",
30948
31129
  description: "How many leads a form received, and when. Example: baker hubspot forms submissions <formId> --days 30"
@@ -30991,7 +31172,7 @@ var formsSubmissionsCommand = defineCommand123({
30991
31172
  }
30992
31173
  }
30993
31174
  });
30994
- var workflowsListCommand = defineCommand123({
31175
+ var workflowsListCommand = defineCommand124({
30995
31176
  meta: {
30996
31177
  name: "list",
30997
31178
  description: "List HubSpot workflows. Example: baker hubspot workflows list --enabled-only"
@@ -31056,7 +31237,7 @@ function workflowViewHints(workflow) {
31056
31237
  }
31057
31238
  return hints;
31058
31239
  }
31059
- var workflowsViewCommand = defineCommand123({
31240
+ var workflowsViewCommand = defineCommand124({
31060
31241
  meta: {
31061
31242
  name: "view",
31062
31243
  description: "Read one workflow's real configuration \u2014 enrolment, branches in order, and what each step writes. Example: baker hubspot workflows view 121183594 --full"
@@ -31083,7 +31264,7 @@ var workflowsViewCommand = defineCommand123({
31083
31264
  }
31084
31265
  }
31085
31266
  });
31086
- var pipelinesListCommand = defineCommand123({
31267
+ var pipelinesListCommand = defineCommand124({
31087
31268
  meta: {
31088
31269
  name: "list",
31089
31270
  description: "List HubSpot deal pipelines and their stages. Example: baker hubspot pipelines list"
@@ -31100,7 +31281,7 @@ var pipelinesListCommand = defineCommand123({
31100
31281
  }
31101
31282
  }
31102
31283
  });
31103
- var contactsSummaryCommand = defineCommand123({
31284
+ var contactsSummaryCommand = defineCommand124({
31104
31285
  meta: {
31105
31286
  name: "summary",
31106
31287
  description: "Whether recent leads are being worked, as counts. Example: baker hubspot contacts summary --days 30"
@@ -31170,7 +31351,7 @@ function contactLookupHints(data) {
31170
31351
  }
31171
31352
  return hints;
31172
31353
  }
31173
- var contactsLookupCommand = defineCommand123({
31354
+ var contactsLookupCommand = defineCommand124({
31174
31355
  meta: {
31175
31356
  name: "lookup",
31176
31357
  description: "Find one contact by email and see whether it was worked. Example: baker hubspot contacts lookup a@b.com"
@@ -31194,27 +31375,27 @@ var contactsLookupCommand = defineCommand123({
31194
31375
  }
31195
31376
  }
31196
31377
  });
31197
- var contactsCommand = defineCommand123({
31378
+ var contactsCommand = defineCommand124({
31198
31379
  meta: { name: "contacts", description: "Contacts on the connected HubSpot account." },
31199
31380
  subCommands: { summary: contactsSummaryCommand, lookup: contactsLookupCommand }
31200
31381
  });
31201
- var formsCommand = defineCommand123({
31382
+ var formsCommand = defineCommand124({
31202
31383
  meta: { name: "forms", description: "HubSpot forms on the connected account." },
31203
31384
  subCommands: { list: formsListCommand, view: formsViewCommand, submissions: formsSubmissionsCommand }
31204
31385
  });
31205
- var workflowsCommand = defineCommand123({
31386
+ var workflowsCommand = defineCommand124({
31206
31387
  meta: { name: "workflows", description: "HubSpot workflows on the connected account." },
31207
31388
  subCommands: { list: workflowsListCommand, view: workflowsViewCommand }
31208
31389
  });
31209
- var pipelinesCommand = defineCommand123({
31390
+ var pipelinesCommand = defineCommand124({
31210
31391
  meta: { name: "pipelines", description: "HubSpot deal pipelines on the connected account." },
31211
31392
  subCommands: { list: pipelinesListCommand }
31212
31393
  });
31213
- var meetingsCommand = defineCommand123({
31394
+ var meetingsCommand = defineCommand124({
31214
31395
  meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
31215
31396
  subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
31216
31397
  });
31217
- var hubspotCommand = defineCommand123({
31398
+ var hubspotCommand = defineCommand124({
31218
31399
  meta: {
31219
31400
  name: "hubspot",
31220
31401
  description: `Read the connected HubSpot account \u2014 forms, the leads they received, workflows, deal pipelines and
@@ -31252,10 +31433,10 @@ Full guide: __tooling__/docs/tools/baker/hubspot.md`
31252
31433
  });
31253
31434
 
31254
31435
  // src/commands/images/index.ts
31255
- import { defineCommand as defineCommand149 } from "citty";
31436
+ import { defineCommand as defineCommand150 } from "citty";
31256
31437
 
31257
31438
  // src/commands/images/crop.ts
31258
- import { defineCommand as defineCommand124 } from "citty";
31439
+ import { defineCommand as defineCommand125 } from "citty";
31259
31440
 
31260
31441
  // src/lib/image/crop-sprite.ts
31261
31442
  import sharp from "sharp";
@@ -31377,7 +31558,7 @@ function emitError2(err) {
31377
31558
  }
31378
31559
  process.exit(1);
31379
31560
  }
31380
- var cropCommand = defineCommand124({
31561
+ var cropCommand = defineCommand125({
31381
31562
  meta: {
31382
31563
  name: "crop",
31383
31564
  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"
@@ -31413,7 +31594,7 @@ var cropCommand = defineCommand124({
31413
31594
  });
31414
31595
 
31415
31596
  // src/commands/images/delete.ts
31416
- import { defineCommand as defineCommand125 } from "citty";
31597
+ import { defineCommand as defineCommand126 } from "citty";
31417
31598
  registerSchema({
31418
31599
  command: "images.delete",
31419
31600
  description: "Delete an image by ID",
@@ -31427,7 +31608,7 @@ registerSchema({
31427
31608
  }
31428
31609
  }
31429
31610
  });
31430
- var deleteCommand2 = defineCommand125({
31611
+ var deleteCommand2 = defineCommand126({
31431
31612
  meta: {
31432
31613
  name: "delete",
31433
31614
  description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
@@ -31468,7 +31649,7 @@ var deleteCommand2 = defineCommand125({
31468
31649
  });
31469
31650
 
31470
31651
  // src/commands/images/dimensions.ts
31471
- import { defineCommand as defineCommand126 } from "citty";
31652
+ import { defineCommand as defineCommand127 } from "citty";
31472
31653
 
31473
31654
  // src/lib/image/dimensions.ts
31474
31655
  import { imageSize } from "image-size";
@@ -31491,7 +31672,7 @@ registerSchema({
31491
31672
  target: { type: "string", description: "Local file path or remote http(s) URL", required: true }
31492
31673
  }
31493
31674
  });
31494
- var dimensionsCommand = defineCommand126({
31675
+ var dimensionsCommand = defineCommand127({
31495
31676
  meta: {
31496
31677
  name: "dimensions",
31497
31678
  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"
@@ -31535,7 +31716,7 @@ var dimensionsCommand = defineCommand126({
31535
31716
  });
31536
31717
 
31537
31718
  // src/commands/images/download.ts
31538
- import { defineCommand as defineCommand127 } from "citty";
31719
+ import { defineCommand as defineCommand128 } from "citty";
31539
31720
 
31540
31721
  // src/commands/images/downloadPaths.ts
31541
31722
  import { basename as basename2, extname as extname3, join as join5 } from "path";
@@ -31760,7 +31941,7 @@ function emitError3(err) {
31760
31941
  writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
31761
31942
  process.exit(1);
31762
31943
  }
31763
- var downloadCommand = defineCommand127({
31944
+ var downloadCommand = defineCommand128({
31764
31945
  meta: {
31765
31946
  name: "download",
31766
31947
  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"
@@ -31793,7 +31974,7 @@ var downloadCommand = defineCommand127({
31793
31974
  });
31794
31975
 
31795
31976
  // src/commands/images/extract.ts
31796
- import { defineCommand as defineCommand128 } from "citty";
31977
+ import { defineCommand as defineCommand129 } from "citty";
31797
31978
 
31798
31979
  // src/commands/images/autoIngest.ts
31799
31980
  var AUTO_INGEST_MAX = {
@@ -31840,7 +32021,7 @@ registerSchema({
31840
32021
  }
31841
32022
  }
31842
32023
  });
31843
- var extractCommand = defineCommand128({
32024
+ var extractCommand = defineCommand129({
31844
32025
  meta: {
31845
32026
  name: "extract",
31846
32027
  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"
@@ -31895,7 +32076,7 @@ var extractCommand = defineCommand128({
31895
32076
  });
31896
32077
 
31897
32078
  // src/commands/images/find.ts
31898
- import { defineCommand as defineCommand129 } from "citty";
32079
+ import { defineCommand as defineCommand130 } from "citty";
31899
32080
 
31900
32081
  // src/commands/images/providerHits.ts
31901
32082
  function asRecord3(value) {
@@ -32033,7 +32214,7 @@ registerSchema({
32033
32214
  full: { type: "boolean", description: "Include full metadata", required: false, default: false }
32034
32215
  }
32035
32216
  });
32036
- var findCommand = defineCommand129({
32217
+ var findCommand = defineCommand130({
32037
32218
  meta: {
32038
32219
  name: "find",
32039
32220
  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"
@@ -32106,7 +32287,7 @@ var findCommand = defineCommand129({
32106
32287
  });
32107
32288
 
32108
32289
  // src/commands/images/get.ts
32109
- import { defineCommand as defineCommand130 } from "citty";
32290
+ import { defineCommand as defineCommand131 } from "citty";
32110
32291
  registerSchema({
32111
32292
  command: "images.get",
32112
32293
  description: "Get a single image by ID",
@@ -32114,7 +32295,7 @@ registerSchema({
32114
32295
  id: { type: "string", description: "Image ID", required: true }
32115
32296
  }
32116
32297
  });
32117
- var getCommand3 = defineCommand130({
32298
+ var getCommand3 = defineCommand131({
32118
32299
  meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
32119
32300
  args: {
32120
32301
  id: { type: "positional", description: "Image ID", required: false },
@@ -32150,7 +32331,7 @@ var getCommand3 = defineCommand130({
32150
32331
  });
32151
32332
 
32152
32333
  // src/commands/images/gif.ts
32153
- import { defineCommand as defineCommand131 } from "citty";
32334
+ import { defineCommand as defineCommand132 } from "citty";
32154
32335
  registerSchema({
32155
32336
  command: "images.gif",
32156
32337
  description: "Search Giphy for GIFs / reaction memes (paid social creative).",
@@ -32182,7 +32363,7 @@ registerSchema({
32182
32363
  }
32183
32364
  }
32184
32365
  });
32185
- var gifCommand = defineCommand131({
32366
+ var gifCommand = defineCommand132({
32186
32367
  meta: {
32187
32368
  name: "gif",
32188
32369
  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"
@@ -32229,7 +32410,7 @@ var gifCommand = defineCommand131({
32229
32410
  });
32230
32411
 
32231
32412
  // src/commands/images/google.ts
32232
- import { defineCommand as defineCommand132 } from "citty";
32413
+ import { defineCommand as defineCommand133 } from "citty";
32233
32414
  var GOOGLE_ERROR_FIX = {
32234
32415
  action: "use_different_resource",
32235
32416
  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."
@@ -32269,7 +32450,7 @@ registerSchema({
32269
32450
  }
32270
32451
  }
32271
32452
  });
32272
- var googleCommand2 = defineCommand132({
32453
+ var googleCommand2 = defineCommand133({
32273
32454
  meta: {
32274
32455
  name: "google",
32275
32456
  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"
@@ -32342,7 +32523,7 @@ var googleCommand2 = defineCommand132({
32342
32523
  });
32343
32524
 
32344
32525
  // src/commands/images/group.ts
32345
- import { defineCommand as defineCommand133 } from "citty";
32526
+ import { defineCommand as defineCommand134 } from "citty";
32346
32527
 
32347
32528
  // src/commands/mediaGroup.ts
32348
32529
  async function runMediaGroupLookup(input) {
@@ -32395,7 +32576,7 @@ registerSchema({
32395
32576
  "group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
32396
32577
  }
32397
32578
  });
32398
- var groupCommand = defineCommand133({
32579
+ var groupCommand = defineCommand134({
32399
32580
  meta: {
32400
32581
  name: "group",
32401
32582
  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>"
@@ -32415,7 +32596,7 @@ var groupCommand = defineCommand133({
32415
32596
  });
32416
32597
 
32417
32598
  // src/commands/images/icon.ts
32418
- import { defineCommand as defineCommand134 } from "citty";
32599
+ import { defineCommand as defineCommand135 } from "citty";
32419
32600
 
32420
32601
  // src/commands/images/brandVerification.ts
32421
32602
  function brandToken(domain) {
@@ -32512,7 +32693,7 @@ registerSchema({
32512
32693
  full: { type: "boolean", description: "Include full metadata", required: false, default: false }
32513
32694
  }
32514
32695
  });
32515
- var iconCommand = defineCommand134({
32696
+ var iconCommand = defineCommand135({
32516
32697
  meta: {
32517
32698
  name: "icon",
32518
32699
  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'"
@@ -32582,7 +32763,7 @@ var iconCommand = defineCommand134({
32582
32763
  });
32583
32764
 
32584
32765
  // src/commands/images/ingest.ts
32585
- import { defineCommand as defineCommand135 } from "citty";
32766
+ import { defineCommand as defineCommand136 } from "citty";
32586
32767
  registerSchema({
32587
32768
  command: "images.ingest",
32588
32769
  description: "Ingest a remote image URL into the library (full describe + embed).",
@@ -32596,7 +32777,7 @@ registerSchema({
32596
32777
  fields: { type: "string", description: "Comma-separated field names to include", required: false }
32597
32778
  }
32598
32779
  });
32599
- var ingestCommand = defineCommand135({
32780
+ var ingestCommand = defineCommand136({
32600
32781
  meta: {
32601
32782
  name: "ingest",
32602
32783
  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"
@@ -32646,7 +32827,7 @@ var ingestCommand = defineCommand135({
32646
32827
  });
32647
32828
 
32648
32829
  // src/commands/images/layerize.ts
32649
- import { defineCommand as defineCommand136 } from "citty";
32830
+ import { defineCommand as defineCommand137 } from "citty";
32650
32831
  registerSchema({
32651
32832
  command: "images.layerize",
32652
32833
  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.",
@@ -32710,7 +32891,7 @@ async function pollUntilSettled(imageId, maxWait) {
32710
32891
  }
32711
32892
  return null;
32712
32893
  }
32713
- var layerizeCommand = defineCommand136({
32894
+ var layerizeCommand = defineCommand137({
32714
32895
  meta: {
32715
32896
  name: "layerize",
32716
32897
  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'"
@@ -32779,7 +32960,7 @@ registerSchema({
32779
32960
  full: { type: "boolean", description: "Include geometry and typography for every layer", required: false }
32780
32961
  }
32781
32962
  });
32782
- var layersCommand = defineCommand136({
32963
+ var layersCommand = defineCommand137({
32783
32964
  meta: {
32784
32965
  name: "layers",
32785
32966
  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"
@@ -32819,7 +33000,7 @@ var layersCommand = defineCommand136({
32819
33000
  });
32820
33001
 
32821
33002
  // src/commands/images/library.ts
32822
- import { defineCommand as defineCommand137 } from "citty";
33003
+ import { defineCommand as defineCommand138 } from "citty";
32823
33004
  registerSchema({
32824
33005
  command: "images.library",
32825
33006
  description: "Search the company image library. Returns only ready images.",
@@ -32845,7 +33026,7 @@ registerSchema({
32845
33026
  }
32846
33027
  }
32847
33028
  });
32848
- var libraryCommand = defineCommand137({
33029
+ var libraryCommand = defineCommand138({
32849
33030
  meta: {
32850
33031
  name: "library",
32851
33032
  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"
@@ -32908,7 +33089,7 @@ var libraryCommand = defineCommand137({
32908
33089
  });
32909
33090
 
32910
33091
  // src/commands/images/logo.ts
32911
- import { defineCommand as defineCommand138 } from "citty";
33092
+ import { defineCommand as defineCommand139 } from "citty";
32912
33093
  registerSchema({
32913
33094
  command: "images.logo",
32914
33095
  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.",
@@ -32936,7 +33117,7 @@ registerSchema({
32936
33117
  full: { type: "boolean", description: "Include full metadata", required: false, default: false }
32937
33118
  }
32938
33119
  });
32939
- var logoCommand = defineCommand138({
33120
+ var logoCommand = defineCommand139({
32940
33121
  meta: {
32941
33122
  name: "logo",
32942
33123
  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"
@@ -33009,7 +33190,7 @@ var logoCommand = defineCommand138({
33009
33190
  });
33010
33191
 
33011
33192
  // src/commands/images/normalize.ts
33012
- import { defineCommand as defineCommand139 } from "citty";
33193
+ import { defineCommand as defineCommand140 } from "citty";
33013
33194
 
33014
33195
  // src/lib/image/color-changer.ts
33015
33196
  import quantize from "quantize";
@@ -33741,7 +33922,7 @@ function coerceRawArgs(args) {
33741
33922
  "dry-run": bool(args["dry-run"])
33742
33923
  };
33743
33924
  }
33744
- var normalizeCommand = defineCommand139({
33925
+ var normalizeCommand = defineCommand140({
33745
33926
  meta: {
33746
33927
  name: "normalize",
33747
33928
  description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
@@ -33796,7 +33977,7 @@ Examples:
33796
33977
  });
33797
33978
 
33798
33979
  // src/commands/images/pinterest.ts
33799
- import { defineCommand as defineCommand140 } from "citty";
33980
+ import { defineCommand as defineCommand141 } from "citty";
33800
33981
  registerSchema({
33801
33982
  command: "images.pinterest",
33802
33983
  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.",
@@ -33816,7 +33997,7 @@ registerSchema({
33816
33997
  }
33817
33998
  }
33818
33999
  });
33819
- var pinterestCommand = defineCommand140({
34000
+ var pinterestCommand = defineCommand141({
33820
34001
  meta: {
33821
34002
  name: "pinterest",
33822
34003
  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'"
@@ -33873,7 +34054,7 @@ var pinterestCommand = defineCommand140({
33873
34054
  });
33874
34055
 
33875
34056
  // src/commands/images/screenshot.ts
33876
- import { defineCommand as defineCommand141 } from "citty";
34057
+ import { defineCommand as defineCommand142 } from "citty";
33877
34058
  registerSchema({
33878
34059
  command: "images.screenshot",
33879
34060
  description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
@@ -33892,7 +34073,7 @@ registerSchema({
33892
34073
  full: { type: "boolean", description: "Include full metadata", required: false, default: false }
33893
34074
  }
33894
34075
  });
33895
- var screenshotCommand = defineCommand141({
34076
+ var screenshotCommand = defineCommand142({
33896
34077
  meta: {
33897
34078
  name: "screenshot",
33898
34079
  description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
@@ -33956,7 +34137,7 @@ var screenshotCommand = defineCommand141({
33956
34137
  });
33957
34138
 
33958
34139
  // src/commands/images/search.ts
33959
- import { defineCommand as defineCommand142 } from "citty";
34140
+ import { defineCommand as defineCommand143 } from "citty";
33960
34141
  registerSchema({
33961
34142
  command: "images.search",
33962
34143
  description: "Search images by text query. Only returns ready images.",
@@ -33972,7 +34153,7 @@ registerSchema({
33972
34153
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
33973
34154
  }
33974
34155
  });
33975
- var searchCommand = defineCommand142({
34156
+ var searchCommand = defineCommand143({
33976
34157
  meta: {
33977
34158
  name: "search",
33978
34159
  description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
@@ -34032,7 +34213,7 @@ var searchCommand = defineCommand142({
34032
34213
  });
34033
34214
 
34034
34215
  // src/commands/images/sticker.ts
34035
- import { defineCommand as defineCommand143 } from "citty";
34216
+ import { defineCommand as defineCommand144 } from "citty";
34036
34217
  registerSchema({
34037
34218
  command: "images.sticker",
34038
34219
  description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
@@ -34064,7 +34245,7 @@ registerSchema({
34064
34245
  }
34065
34246
  }
34066
34247
  });
34067
- var stickerCommand = defineCommand143({
34248
+ var stickerCommand = defineCommand144({
34068
34249
  meta: {
34069
34250
  name: "sticker",
34070
34251
  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"
@@ -34111,7 +34292,7 @@ var stickerCommand = defineCommand143({
34111
34292
  });
34112
34293
 
34113
34294
  // src/commands/images/stock.ts
34114
- import { defineCommand as defineCommand144 } from "citty";
34295
+ import { defineCommand as defineCommand145 } from "citty";
34115
34296
  var STOCK_ERROR_FIX = {
34116
34297
  action: "use_different_resource",
34117
34298
  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."
@@ -34188,7 +34369,7 @@ function buildStockRequest(query, args) {
34188
34369
  if (args.context) body.descriptionContext = args.context;
34189
34370
  return body;
34190
34371
  }
34191
- var stockCommand = defineCommand144({
34372
+ var stockCommand = defineCommand145({
34192
34373
  meta: {
34193
34374
  name: "stock",
34194
34375
  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"
@@ -34261,7 +34442,7 @@ var stockCommand = defineCommand144({
34261
34442
  });
34262
34443
 
34263
34444
  // src/lib/tags-command.ts
34264
- import { defineCommand as defineCommand145 } from "citty";
34445
+ import { defineCommand as defineCommand146 } from "citty";
34265
34446
  function makeTagsCommand(command, label, endpoint) {
34266
34447
  registerSchema({
34267
34448
  command: `${command}.tags`,
@@ -34270,7 +34451,7 @@ function makeTagsCommand(command, label, endpoint) {
34270
34451
  output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
34271
34452
  }
34272
34453
  });
34273
- return defineCommand145({
34454
+ return defineCommand146({
34274
34455
  meta: {
34275
34456
  name: "tags",
34276
34457
  description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
@@ -34306,7 +34487,7 @@ function makeTagsCommand(command, label, endpoint) {
34306
34487
  var tagsCommand2 = makeTagsCommand("images", "image", "/api/images/tags");
34307
34488
 
34308
34489
  // src/commands/images/upload.ts
34309
- import { defineCommand as defineCommand146 } from "citty";
34490
+ import { defineCommand as defineCommand147 } from "citty";
34310
34491
  registerSchema({
34311
34492
  command: "images.upload",
34312
34493
  description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
@@ -34344,7 +34525,7 @@ registerSchema({
34344
34525
  function isRemoteUrl2(value) {
34345
34526
  return /^https?:\/\//i.test(value);
34346
34527
  }
34347
- var uploadCommand = defineCommand146({
34528
+ var uploadCommand = defineCommand147({
34348
34529
  meta: {
34349
34530
  name: "upload",
34350
34531
  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'"
@@ -34437,7 +34618,7 @@ async function uploadLocal(target, args) {
34437
34618
  }
34438
34619
 
34439
34620
  // src/commands/images/upscale.ts
34440
- import { defineCommand as defineCommand147 } from "citty";
34621
+ import { defineCommand as defineCommand148 } from "citty";
34441
34622
  registerSchema({
34442
34623
  command: "images.upscale",
34443
34624
  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).",
@@ -34452,7 +34633,7 @@ registerSchema({
34452
34633
  }
34453
34634
  });
34454
34635
  var POLL_INTERVAL_MS4 = 1500;
34455
- var upscaleCommand = defineCommand147({
34636
+ var upscaleCommand = defineCommand148({
34456
34637
  meta: {
34457
34638
  name: "upscale",
34458
34639
  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"
@@ -34507,7 +34688,7 @@ var upscaleCommand = defineCommand147({
34507
34688
  });
34508
34689
 
34509
34690
  // src/commands/images/use.ts
34510
- import { defineCommand as defineCommand148 } from "citty";
34691
+ import { defineCommand as defineCommand149 } from "citty";
34511
34692
  registerSchema({
34512
34693
  command: "images.use",
34513
34694
  description: "Ingest a URL and wait for the library record to be ready.",
@@ -34536,7 +34717,7 @@ function emitReady(ingestResult, doc, args) {
34536
34717
  args.full === true
34537
34718
  );
34538
34719
  }
34539
- var useCommand = defineCommand148({
34720
+ var useCommand = defineCommand149({
34540
34721
  meta: {
34541
34722
  name: "use",
34542
34723
  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"
@@ -34585,7 +34766,7 @@ var useCommand = defineCommand148({
34585
34766
  });
34586
34767
 
34587
34768
  // src/commands/images/index.ts
34588
- var imagesCommand = defineCommand149({
34769
+ var imagesCommand = defineCommand150({
34589
34770
  meta: {
34590
34771
  name: "images",
34591
34772
  description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
@@ -34663,12 +34844,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
34663
34844
  });
34664
34845
 
34665
34846
  // src/commands/landing/index.ts
34666
- import { defineCommand as defineCommand160 } from "citty";
34847
+ import { defineCommand as defineCommand161 } from "citty";
34667
34848
 
34668
34849
  // src/commands/landing/critique.ts
34669
34850
  import { readdir as readdir8, stat as stat6 } from "fs/promises";
34670
34851
  import path29 from "path";
34671
- import { defineCommand as defineCommand150 } from "citty";
34852
+ import { defineCommand as defineCommand151 } from "citty";
34672
34853
 
34673
34854
  // src/engine/landing/lib/brand-tokens.ts
34674
34855
  import { readFile as readFile20 } from "fs/promises";
@@ -36063,7 +36244,7 @@ function fail5(code, message, fix) {
36063
36244
  );
36064
36245
  process.exit(2);
36065
36246
  }
36066
- var critiqueCommand2 = defineCommand150({
36247
+ var critiqueCommand2 = defineCommand151({
36067
36248
  meta: {
36068
36249
  name: "critique",
36069
36250
  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."
@@ -36172,10 +36353,10 @@ async function isDir(p) {
36172
36353
  }
36173
36354
 
36174
36355
  // src/commands/landing/inspiration/index.ts
36175
- import { defineCommand as defineCommand159 } from "citty";
36356
+ import { defineCommand as defineCommand160 } from "citty";
36176
36357
 
36177
36358
  // src/commands/landing/inspiration/add.ts
36178
- import { defineCommand as defineCommand151 } from "citty";
36359
+ import { defineCommand as defineCommand152 } from "citty";
36179
36360
 
36180
36361
  // src/commands/landing/inspiration/shared.ts
36181
36362
  var INSPIRATION_HINTS = {
@@ -36257,7 +36438,7 @@ registerSchema({
36257
36438
  note: { type: "string", description: "Why this page is worth keeping", required: false }
36258
36439
  }
36259
36440
  });
36260
- var addCommand = defineCommand151({
36441
+ var addCommand = defineCommand152({
36261
36442
  meta: {
36262
36443
  name: "add",
36263
36444
  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'"
@@ -36299,7 +36480,7 @@ var addCommand = defineCommand151({
36299
36480
  // src/commands/landing/inspiration/code.ts
36300
36481
  import { mkdir as mkdir10, writeFile as writeFile14 } from "fs/promises";
36301
36482
  import path30 from "path";
36302
- import { defineCommand as defineCommand152 } from "citty";
36483
+ import { defineCommand as defineCommand153 } from "citty";
36303
36484
  registerSchema({
36304
36485
  command: "landing.inspiration.code",
36305
36486
  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.",
@@ -36308,7 +36489,7 @@ registerSchema({
36308
36489
  full: { type: "boolean", description: "Print the markup inline as well as writing it", required: false }
36309
36490
  }
36310
36491
  });
36311
- var codeCommand = defineCommand152({
36492
+ var codeCommand = defineCommand153({
36312
36493
  meta: {
36313
36494
  name: "code",
36314
36495
  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."
@@ -36365,7 +36546,7 @@ var codeCommand = defineCommand152({
36365
36546
  });
36366
36547
 
36367
36548
  // src/commands/landing/inspiration/favorites.ts
36368
- import { defineCommand as defineCommand153 } from "citty";
36549
+ import { defineCommand as defineCommand154 } from "citty";
36369
36550
  registerSchema({
36370
36551
  command: "landing.inspiration.favorites",
36371
36552
  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.",
@@ -36379,7 +36560,7 @@ registerSchema({
36379
36560
  }
36380
36561
  }
36381
36562
  });
36382
- var favoritesCommand = defineCommand153({
36563
+ var favoritesCommand = defineCommand154({
36383
36564
  meta: {
36384
36565
  name: "favorites",
36385
36566
  description: "List this company's saved reference sections. Example: baker landing inspiration favorites --type hero,pricing"
@@ -36459,7 +36640,7 @@ registerSchema({
36459
36640
  note: { type: "string", description: "Why this is worth keeping", required: false }
36460
36641
  }
36461
36642
  });
36462
- var favoriteCommand = defineCommand153({
36643
+ var favoriteCommand = defineCommand154({
36463
36644
  meta: {
36464
36645
  name: "favorite",
36465
36646
  description: "Save a reference section to this company. Example: baker landing inspiration favorite k57abc\u2026"
@@ -36497,7 +36678,7 @@ registerSchema({
36497
36678
  page: { type: "boolean", description: "Treat the id as a page rather than a section", required: false }
36498
36679
  }
36499
36680
  });
36500
- var unfavoriteCommand = defineCommand153({
36681
+ var unfavoriteCommand = defineCommand154({
36501
36682
  meta: {
36502
36683
  name: "unfavorite",
36503
36684
  description: "Remove a reference section from this company's saved set. Example: baker landing inspiration unfavorite k57abc\u2026"
@@ -36519,7 +36700,7 @@ var unfavoriteCommand = defineCommand153({
36519
36700
  });
36520
36701
 
36521
36702
  // src/commands/landing/inspiration/page.ts
36522
- import { defineCommand as defineCommand154 } from "citty";
36703
+ import { defineCommand as defineCommand155 } from "citty";
36523
36704
  registerSchema({
36524
36705
  command: "landing.inspiration.page",
36525
36706
  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.",
@@ -36536,7 +36717,7 @@ registerSchema({
36536
36717
  }
36537
36718
  }
36538
36719
  });
36539
- var pageCommand = defineCommand154({
36720
+ var pageCommand2 = defineCommand155({
36540
36721
  meta: {
36541
36722
  name: "page",
36542
36723
  description: "Show how a reference page sequences its sections. Example: baker landing inspiration page j91xyz\u2026 \u2014 the blueprint, not the pixels."
@@ -36601,7 +36782,7 @@ var pageCommand = defineCommand154({
36601
36782
  // src/commands/landing/inspiration/scrape.ts
36602
36783
  import { readFile as readFile23 } from "fs/promises";
36603
36784
  import path33 from "path";
36604
- import { defineCommand as defineCommand155 } from "citty";
36785
+ import { defineCommand as defineCommand156 } from "citty";
36605
36786
 
36606
36787
  // src/engine/landing/lib/capturedReferences.ts
36607
36788
  var MAX_STRINGS_PER_SECTION = 40;
@@ -38742,7 +38923,7 @@ registerSchema({
38742
38923
  report: { type: "boolean", description: "Write report.html. `--no-report` to skip", required: false }
38743
38924
  }
38744
38925
  });
38745
- var scrapeCommand = defineCommand155({
38926
+ var scrapeCommand = defineCommand156({
38746
38927
  meta: {
38747
38928
  name: "scrape",
38748
38929
  description: "Capture a landing page to a directory, now. Example: baker landing inspiration scrape https://linear.app --out .baker/inspiration/linear.app"
@@ -38844,7 +39025,7 @@ var scrapeCommand = defineCommand155({
38844
39025
 
38845
39026
  // src/commands/landing/inspiration/search.ts
38846
39027
  import path35 from "path";
38847
- import { defineCommand as defineCommand156 } from "citty";
39028
+ import { defineCommand as defineCommand157 } from "citty";
38848
39029
 
38849
39030
  // src/commands/landing/inspiration/shot.ts
38850
39031
  import { mkdir as mkdir12, writeFile as writeFile17 } from "fs/promises";
@@ -38981,7 +39162,7 @@ async function downloadShots(results) {
38981
39162
  );
38982
39163
  return saved;
38983
39164
  }
38984
- var searchCommand2 = defineCommand156({
39165
+ var searchCommand2 = defineCommand157({
38985
39166
  meta: {
38986
39167
  name: "search",
38987
39168
  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"
@@ -39079,7 +39260,7 @@ var searchCommand2 = defineCommand156({
39079
39260
  });
39080
39261
 
39081
39262
  // src/commands/landing/inspiration/sequences.ts
39082
- import { defineCommand as defineCommand157 } from "citty";
39263
+ import { defineCommand as defineCommand158 } from "citty";
39083
39264
  var COMPACT_TRANSITIONS = 12;
39084
39265
  var COMPACT_ENDS = 5;
39085
39266
  var MAX_PAGES = 50;
@@ -39153,7 +39334,7 @@ function sequencesHints(data, { scope, full }) {
39153
39334
  if (scope === "favorites") hints.push(...favoritesScopeHints(data.favoritesHealth, data.pagesReturned));
39154
39335
  return hints;
39155
39336
  }
39156
- var sequencesCommand = defineCommand157({
39337
+ var sequencesCommand = defineCommand158({
39157
39338
  meta: {
39158
39339
  name: "sequences",
39159
39340
  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."
@@ -39203,7 +39384,7 @@ var sequencesCommand = defineCommand157({
39203
39384
 
39204
39385
  // src/commands/landing/inspiration/view.ts
39205
39386
  import path36 from "path";
39206
- import { defineCommand as defineCommand158 } from "citty";
39387
+ import { defineCommand as defineCommand159 } from "citty";
39207
39388
  registerSchema({
39208
39389
  command: "landing.inspiration.view",
39209
39390
  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.",
@@ -39216,7 +39397,7 @@ registerSchema({
39216
39397
  }
39217
39398
  }
39218
39399
  });
39219
- var viewCommand2 = defineCommand158({
39400
+ var viewCommand2 = defineCommand159({
39220
39401
  meta: {
39221
39402
  name: "view",
39222
39403
  description: "Full detail for one reference section. Example: baker landing inspiration view k57abc\u2026 \u2014 read the screenshots it saves before you build."
@@ -39300,7 +39481,7 @@ var viewCommand2 = defineCommand158({
39300
39481
  });
39301
39482
 
39302
39483
  // src/commands/landing/inspiration/index.ts
39303
- var inspirationCommand = defineCommand159({
39484
+ var inspirationCommand = defineCommand160({
39304
39485
  meta: {
39305
39486
  name: "inspiration",
39306
39487
  description: `Reference library of real landing-page sections \u2014 look at how good pages actually solve a problem before you design one.
@@ -39334,7 +39515,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
39334
39515
  search: searchCommand2,
39335
39516
  view: viewCommand2,
39336
39517
  code: codeCommand,
39337
- page: pageCommand,
39518
+ page: pageCommand2,
39338
39519
  sequences: sequencesCommand,
39339
39520
  add: addCommand,
39340
39521
  favorites: favoritesCommand,
@@ -39345,7 +39526,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
39345
39526
  });
39346
39527
 
39347
39528
  // src/commands/landing/index.ts
39348
- var landingCommand = defineCommand160({
39529
+ var landingCommand = defineCommand161({
39349
39530
  meta: {
39350
39531
  name: "landing",
39351
39532
  description: `Design-quality tools for landing pages (src/pages/<slug>/).
@@ -39363,7 +39544,7 @@ Subcommands:
39363
39544
  });
39364
39545
 
39365
39546
  // src/commands/mcp/index.ts
39366
- import { defineCommand as defineCommand161 } from "citty";
39547
+ import { defineCommand as defineCommand162 } from "citty";
39367
39548
 
39368
39549
  // src/commands/mcp/platforms.ts
39369
39550
  function readsKey(label) {
@@ -39432,7 +39613,7 @@ registerSchema({
39432
39613
  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.",
39433
39614
  args: {}
39434
39615
  });
39435
- var connectedCommand = defineCommand161({
39616
+ var connectedCommand = defineCommand162({
39436
39617
  meta: {
39437
39618
  name: "connected",
39438
39619
  description: `Everything this chat can reach \u2014 managed integrations, custom MCP servers, and connected platforms.
@@ -39491,7 +39672,7 @@ registerSchema({
39491
39672
  description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
39492
39673
  args: {}
39493
39674
  });
39494
- var listCommand14 = defineCommand161({
39675
+ var listCommand14 = defineCommand162({
39495
39676
  meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
39496
39677
  run: async () => {
39497
39678
  try {
@@ -39528,7 +39709,7 @@ registerSchema({
39528
39709
  header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
39529
39710
  }
39530
39711
  });
39531
- var addCommand2 = defineCommand161({
39712
+ var addCommand2 = defineCommand162({
39532
39713
  meta: {
39533
39714
  name: "add",
39534
39715
  description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
@@ -39580,7 +39761,7 @@ registerSchema({
39580
39761
  description: "Remove a company custom MCP server by name.",
39581
39762
  args: { name: { type: "string", description: "Server name to remove", required: true } }
39582
39763
  });
39583
- var removeCommand4 = defineCommand161({
39764
+ var removeCommand4 = defineCommand162({
39584
39765
  meta: {
39585
39766
  name: "remove",
39586
39767
  description: `Remove a company custom MCP server by name.
@@ -39602,7 +39783,7 @@ Example:
39602
39783
  }
39603
39784
  }
39604
39785
  });
39605
- var mcpCommand = defineCommand161({
39786
+ var mcpCommand = defineCommand162({
39606
39787
  meta: {
39607
39788
  name: "mcp",
39608
39789
  description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
@@ -39628,10 +39809,10 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
39628
39809
  });
39629
39810
 
39630
39811
  // src/commands/research/index.ts
39631
- import { defineCommand as defineCommand173 } from "citty";
39812
+ import { defineCommand as defineCommand174 } from "citty";
39632
39813
 
39633
39814
  // src/commands/research/advertisers.ts
39634
- import { defineCommand as defineCommand162 } from "citty";
39815
+ import { defineCommand as defineCommand163 } from "citty";
39635
39816
 
39636
39817
  // src/commands/research/hints.ts
39637
39818
  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.';
@@ -39814,7 +39995,7 @@ var FIELDS3 = {
39814
39995
  etv: "Estimated traffic value (USD)",
39815
39996
  visibility: "SERP visibility score (0-1)"
39816
39997
  };
39817
- var advertisersCommand = defineCommand162({
39998
+ var advertisersCommand = defineCommand163({
39818
39999
  meta: {
39819
40000
  name: "advertisers",
39820
40001
  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).
@@ -39870,7 +40051,7 @@ Examples:
39870
40051
  });
39871
40052
 
39872
40053
  // src/commands/research/autocomplete.ts
39873
- import { defineCommand as defineCommand163 } from "citty";
40054
+ import { defineCommand as defineCommand164 } from "citty";
39874
40055
  registerSchema({
39875
40056
  command: "research.autocomplete",
39876
40057
  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).",
@@ -39893,7 +40074,7 @@ registerSchema({
39893
40074
  var FIELDS4 = {
39894
40075
  suggestion: "Autocomplete suggestion from Google"
39895
40076
  };
39896
- var autocompleteCommand = defineCommand163({
40077
+ var autocompleteCommand = defineCommand164({
39897
40078
  meta: {
39898
40079
  name: "autocomplete",
39899
40080
  description: `Get Google Autocomplete suggestions for keyword expansion.
@@ -39948,7 +40129,7 @@ Examples:
39948
40129
  });
39949
40130
 
39950
40131
  // src/commands/research/countries.ts
39951
- import { defineCommand as defineCommand164 } from "citty";
40132
+ import { defineCommand as defineCommand165 } from "citty";
39952
40133
  registerSchema({
39953
40134
  command: "research.countries",
39954
40135
  description: "List all supported country codes for --location flag in research commands.",
@@ -40005,7 +40186,7 @@ var FIELDS5 = {
40005
40186
  code: "Country code to pass as --location",
40006
40187
  name: "Country name"
40007
40188
  };
40008
- var countriesCommand = defineCommand164({
40189
+ var countriesCommand = defineCommand165({
40009
40190
  meta: {
40010
40191
  name: "countries",
40011
40192
  description: "List all supported country codes for --location flag."
@@ -40016,7 +40197,7 @@ var countriesCommand = defineCommand164({
40016
40197
  });
40017
40198
 
40018
40199
  // src/commands/research/fetch.ts
40019
- import { defineCommand as defineCommand165 } from "citty";
40200
+ import { defineCommand as defineCommand166 } from "citty";
40020
40201
  var CONTENT_PREVIEW_CHARS = 2e4;
40021
40202
  var TIMEOUT_MS = 18e4;
40022
40203
  registerSchema({
@@ -40089,7 +40270,7 @@ function fetchFix(code) {
40089
40270
  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."
40090
40271
  };
40091
40272
  }
40092
- var fetchCommand = defineCommand165({
40273
+ var fetchCommand = defineCommand166({
40093
40274
  meta: {
40094
40275
  name: "fetch",
40095
40276
  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.
@@ -40166,7 +40347,7 @@ Examples:
40166
40347
  });
40167
40348
 
40168
40349
  // src/commands/research/intent.ts
40169
- import { defineCommand as defineCommand166 } from "citty";
40350
+ import { defineCommand as defineCommand167 } from "citty";
40170
40351
  registerSchema({
40171
40352
  command: "research.intent",
40172
40353
  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.",
@@ -40189,7 +40370,7 @@ var FIELDS7 = {
40189
40370
  intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
40190
40371
  probability: "Confidence score 0.0-1.0"
40191
40372
  };
40192
- var intentCommand = defineCommand166({
40373
+ var intentCommand = defineCommand167({
40193
40374
  meta: {
40194
40375
  name: "intent",
40195
40376
  description: `Classify Google Search intent for keywords. Returns intent type and confidence.
@@ -40237,7 +40418,7 @@ Examples:
40237
40418
  });
40238
40419
 
40239
40420
  // src/commands/research/keyword-gap.ts
40240
- import { defineCommand as defineCommand167 } from "citty";
40421
+ import { defineCommand as defineCommand168 } from "citty";
40241
40422
  registerSchema({
40242
40423
  command: "research.keyword-gap",
40243
40424
  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.",
@@ -40266,7 +40447,7 @@ var FIELDS8 = {
40266
40447
  cpc: "Cost per click USD",
40267
40448
  their_position: "Competitor's ranking position"
40268
40449
  };
40269
- var keywordGapCommand = defineCommand167({
40450
+ var keywordGapCommand = defineCommand168({
40270
40451
  meta: {
40271
40452
  name: "keyword-gap",
40272
40453
  description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
@@ -40341,7 +40522,7 @@ Examples:
40341
40522
  });
40342
40523
 
40343
40524
  // src/commands/research/keywords-for-site.ts
40344
- import { defineCommand as defineCommand168 } from "citty";
40525
+ import { defineCommand as defineCommand169 } from "citty";
40345
40526
  registerSchema({
40346
40527
  command: "research.keywords-for-site",
40347
40528
  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.",
@@ -40374,7 +40555,7 @@ var FIELDS9 = {
40374
40555
  competition: "LOW, MEDIUM, or HIGH",
40375
40556
  competition_index: "Competition score 0-100"
40376
40557
  };
40377
- var keywordsForSiteCommand = defineCommand168({
40558
+ var keywordsForSiteCommand = defineCommand169({
40378
40559
  meta: {
40379
40560
  name: "keywords-for-site",
40380
40561
  description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
@@ -40436,7 +40617,7 @@ Examples:
40436
40617
  });
40437
40618
 
40438
40619
  // src/commands/research/languages.ts
40439
- import { defineCommand as defineCommand169 } from "citty";
40620
+ import { defineCommand as defineCommand170 } from "citty";
40440
40621
  registerSchema({
40441
40622
  command: "research.languages",
40442
40623
  description: "List all supported language codes for --language flag in research commands.",
@@ -40466,7 +40647,7 @@ var FIELDS10 = {
40466
40647
  code: "Language code to pass as --language",
40467
40648
  name: "Language name (also accepted by --language)"
40468
40649
  };
40469
- var languagesCommand2 = defineCommand169({
40650
+ var languagesCommand2 = defineCommand170({
40470
40651
  meta: {
40471
40652
  name: "languages",
40472
40653
  description: "List all supported language codes for --language flag."
@@ -40477,7 +40658,7 @@ var languagesCommand2 = defineCommand169({
40477
40658
  });
40478
40659
 
40479
40660
  // src/commands/research/lighthouse.ts
40480
- import { defineCommand as defineCommand170 } from "citty";
40661
+ import { defineCommand as defineCommand171 } from "citty";
40481
40662
  registerSchema({
40482
40663
  command: "research.lighthouse",
40483
40664
  description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
@@ -40496,7 +40677,7 @@ var FIELDS11 = {
40496
40677
  speed_index_ms: "Speed Index in ms (good: < 3400)",
40497
40678
  interactive_ms: "Time to Interactive in ms (good: < 3800)"
40498
40679
  };
40499
- var lighthouseCommand = defineCommand170({
40680
+ var lighthouseCommand = defineCommand171({
40500
40681
  meta: {
40501
40682
  name: "lighthouse",
40502
40683
  description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
@@ -40534,7 +40715,7 @@ Examples:
40534
40715
  });
40535
40716
 
40536
40717
  // src/commands/research/relevant-pages.ts
40537
- import { defineCommand as defineCommand171 } from "citty";
40718
+ import { defineCommand as defineCommand172 } from "citty";
40538
40719
  registerSchema({
40539
40720
  command: "research.relevant-pages",
40540
40721
  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).",
@@ -40560,7 +40741,7 @@ var FIELDS12 = {
40560
40741
  keywords: "Total organic keywords the page ranks for",
40561
40742
  top_10: "Keywords in positions 1-10"
40562
40743
  };
40563
- var relevantPagesCommand = defineCommand171({
40744
+ var relevantPagesCommand = defineCommand172({
40564
40745
  meta: {
40565
40746
  name: "relevant-pages",
40566
40747
  description: `Get the top pages of a competitor domain with traffic data.
@@ -40607,7 +40788,7 @@ Examples:
40607
40788
  });
40608
40789
 
40609
40790
  // src/commands/research/web.ts
40610
- import { defineCommand as defineCommand172 } from "citty";
40791
+ import { defineCommand as defineCommand173 } from "citty";
40611
40792
  registerSchema({
40612
40793
  command: "research.web",
40613
40794
  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).",
@@ -40658,7 +40839,7 @@ async function runDeepResearch(question) {
40658
40839
  }
40659
40840
  throw new Error("Deep research timed out");
40660
40841
  }
40661
- var webCommand = defineCommand172({
40842
+ var webCommand = defineCommand173({
40662
40843
  meta: {
40663
40844
  name: "web",
40664
40845
  description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
@@ -40720,7 +40901,7 @@ Examples:
40720
40901
  });
40721
40902
 
40722
40903
  // src/commands/research/index.ts
40723
- var researchCommand = defineCommand173({
40904
+ var researchCommand = defineCommand174({
40724
40905
  meta: {
40725
40906
  name: "research",
40726
40907
  description: `Competitive intelligence and AI-powered research commands.
@@ -40764,10 +40945,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
40764
40945
  });
40765
40946
 
40766
40947
  // src/commands/scheduled-actions/index.ts
40767
- import { defineCommand as defineCommand181 } from "citty";
40948
+ import { defineCommand as defineCommand182 } from "citty";
40768
40949
 
40769
40950
  // src/commands/scheduled-actions/create.ts
40770
- import { defineCommand as defineCommand174 } from "citty";
40951
+ import { defineCommand as defineCommand175 } from "citty";
40771
40952
 
40772
40953
  // src/commands/scheduled-actions/shared.ts
40773
40954
  var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
@@ -40887,7 +41068,7 @@ registerSchema({
40887
41068
  }
40888
41069
  }
40889
41070
  });
40890
- var createCommand3 = defineCommand174({
41071
+ var createCommand3 = defineCommand175({
40891
41072
  meta: {
40892
41073
  name: "create",
40893
41074
  description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
@@ -40940,7 +41121,7 @@ var createCommand3 = defineCommand174({
40940
41121
  });
40941
41122
 
40942
41123
  // src/commands/scheduled-actions/delete.ts
40943
- import { defineCommand as defineCommand175 } from "citty";
41124
+ import { defineCommand as defineCommand176 } from "citty";
40944
41125
  registerSchema({
40945
41126
  command: "scheduled-actions.delete",
40946
41127
  description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
@@ -40948,7 +41129,7 @@ registerSchema({
40948
41129
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
40949
41130
  }
40950
41131
  });
40951
- var deleteCommand3 = defineCommand175({
41132
+ var deleteCommand3 = defineCommand176({
40952
41133
  meta: {
40953
41134
  name: "delete",
40954
41135
  description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
@@ -40977,7 +41158,7 @@ var deleteCommand3 = defineCommand175({
40977
41158
  });
40978
41159
 
40979
41160
  // src/commands/scheduled-actions/get.ts
40980
- import { defineCommand as defineCommand176 } from "citty";
41161
+ import { defineCommand as defineCommand177 } from "citty";
40981
41162
  registerSchema({
40982
41163
  command: "scheduled-actions.get",
40983
41164
  description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
@@ -40986,7 +41167,7 @@ registerSchema({
40986
41167
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
40987
41168
  }
40988
41169
  });
40989
- var getCommand4 = defineCommand176({
41170
+ var getCommand4 = defineCommand177({
40990
41171
  meta: {
40991
41172
  name: "get",
40992
41173
  description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
@@ -41025,7 +41206,7 @@ var getCommand4 = defineCommand176({
41025
41206
  });
41026
41207
 
41027
41208
  // src/commands/scheduled-actions/list.ts
41028
- import { defineCommand as defineCommand177 } from "citty";
41209
+ import { defineCommand as defineCommand178 } from "citty";
41029
41210
  registerSchema({
41030
41211
  command: "scheduled-actions.list",
41031
41212
  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.",
@@ -41033,7 +41214,7 @@ registerSchema({
41033
41214
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
41034
41215
  }
41035
41216
  });
41036
- var listCommand15 = defineCommand177({
41217
+ var listCommand15 = defineCommand178({
41037
41218
  meta: {
41038
41219
  name: "list",
41039
41220
  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."
@@ -41058,7 +41239,7 @@ var listCommand15 = defineCommand177({
41058
41239
  // src/commands/scheduled-actions/templates.ts
41059
41240
  import { readFile as readFile24 } from "fs/promises";
41060
41241
  import path37 from "path";
41061
- import { defineCommand as defineCommand178 } from "citty";
41242
+ import { defineCommand as defineCommand179 } from "citty";
41062
41243
  registerSchema({
41063
41244
  command: "scheduled-actions.templates",
41064
41245
  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.",
@@ -41113,7 +41294,7 @@ registerSchema({
41113
41294
  }
41114
41295
  }
41115
41296
  });
41116
- var templatesCommand = defineCommand178({
41297
+ var templatesCommand = defineCommand179({
41117
41298
  meta: {
41118
41299
  name: "templates",
41119
41300
  description: `The recipes this company can run \u2014 Baker's own plus theirs, with what each one produces.
@@ -41205,7 +41386,7 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
41205
41386
  });
41206
41387
 
41207
41388
  // src/commands/scheduled-actions/trigger.ts
41208
- import { defineCommand as defineCommand179 } from "citty";
41389
+ import { defineCommand as defineCommand180 } from "citty";
41209
41390
  registerSchema({
41210
41391
  command: "scheduled-actions.trigger",
41211
41392
  description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
@@ -41213,7 +41394,7 @@ registerSchema({
41213
41394
  id: { type: "string", description: "Published scheduled action ID", required: true }
41214
41395
  }
41215
41396
  });
41216
- var triggerCommand = defineCommand179({
41397
+ var triggerCommand = defineCommand180({
41217
41398
  meta: {
41218
41399
  name: "trigger",
41219
41400
  description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
@@ -41250,7 +41431,7 @@ var triggerCommand = defineCommand179({
41250
41431
  });
41251
41432
 
41252
41433
  // src/commands/scheduled-actions/update.ts
41253
- import { defineCommand as defineCommand180 } from "citty";
41434
+ import { defineCommand as defineCommand181 } from "citty";
41254
41435
  registerSchema({
41255
41436
  command: "scheduled-actions.update",
41256
41437
  description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
@@ -41275,7 +41456,7 @@ registerSchema({
41275
41456
  prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
41276
41457
  }
41277
41458
  });
41278
- var updateCommand3 = defineCommand180({
41459
+ var updateCommand3 = defineCommand181({
41279
41460
  meta: {
41280
41461
  name: "update",
41281
41462
  description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
@@ -41346,7 +41527,7 @@ var updateCommand3 = defineCommand180({
41346
41527
  });
41347
41528
 
41348
41529
  // src/commands/scheduled-actions/index.ts
41349
- var scheduledActionsCommand = defineCommand181({
41530
+ var scheduledActionsCommand = defineCommand182({
41350
41531
  meta: {
41351
41532
  name: "scheduled-actions",
41352
41533
  description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger, templates.
@@ -41374,14 +41555,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
41374
41555
  });
41375
41556
 
41376
41557
  // src/commands/schema.ts
41377
- import { defineCommand as defineCommand182 } from "citty";
41558
+ import { defineCommand as defineCommand183 } from "citty";
41378
41559
  function narrowToFamily(commandName, available) {
41379
41560
  const segments = commandName.split(".");
41380
41561
  const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
41381
41562
  const siblings = available.filter((name) => name.startsWith(prefix));
41382
41563
  return siblings.length > 0 ? siblings : available;
41383
41564
  }
41384
- var schemaCommand = defineCommand182({
41565
+ var schemaCommand = defineCommand183({
41385
41566
  meta: {
41386
41567
  name: "schema",
41387
41568
  description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
@@ -41425,10 +41606,10 @@ var schemaCommand = defineCommand182({
41425
41606
  });
41426
41607
 
41427
41608
  // src/commands/studio/index.ts
41428
- import { defineCommand as defineCommand191 } from "citty";
41609
+ import { defineCommand as defineCommand192 } from "citty";
41429
41610
 
41430
41611
  // src/commands/studio/animate.ts
41431
- import { defineCommand as defineCommand183 } from "citty";
41612
+ import { defineCommand as defineCommand184 } from "citty";
41432
41613
 
41433
41614
  // src/commands/studio/batch.ts
41434
41615
  function projectBatch(generation, full) {
@@ -41879,7 +42060,7 @@ function costHintsFor(body) {
41879
42060
  }
41880
42061
  return hints;
41881
42062
  }
41882
- var animateCommand = defineCommand183({
42063
+ var animateCommand = defineCommand184({
41883
42064
  meta: {
41884
42065
  name: "animate",
41885
42066
  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"
@@ -41998,7 +42179,7 @@ var animateCommand = defineCommand183({
41998
42179
  });
41999
42180
 
42000
42181
  // src/commands/studio/generate.ts
42001
- import { defineCommand as defineCommand184 } from "citty";
42182
+ import { defineCommand as defineCommand185 } from "citty";
42002
42183
  var MODEL_LIST2 = IMAGE_MODEL_IDS;
42003
42184
  var DEFAULT_MAX_WAIT_MS2 = 24e4;
42004
42185
  registerSchema({
@@ -42134,7 +42315,7 @@ function buildGenerateBody(args, prompt) {
42134
42315
  }
42135
42316
  return body;
42136
42317
  }
42137
- var generateCommand = defineCommand184({
42318
+ var generateCommand = defineCommand185({
42138
42319
  meta: {
42139
42320
  name: "generate",
42140
42321
  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]]'"
@@ -42212,7 +42393,7 @@ var generateCommand = defineCommand184({
42212
42393
  });
42213
42394
 
42214
42395
  // src/commands/studio/get.ts
42215
- import { defineCommand as defineCommand185 } from "citty";
42396
+ import { defineCommand as defineCommand186 } from "citty";
42216
42397
  registerSchema({
42217
42398
  command: "studio.get",
42218
42399
  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.",
@@ -42221,7 +42402,7 @@ registerSchema({
42221
42402
  full: { type: "boolean", description: "Include settings, references and attribution", required: false }
42222
42403
  }
42223
42404
  });
42224
- var getCommand5 = defineCommand185({
42405
+ var getCommand5 = defineCommand186({
42225
42406
  meta: {
42226
42407
  name: "get",
42227
42408
  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"
@@ -42250,7 +42431,7 @@ var getCommand5 = defineCommand185({
42250
42431
  });
42251
42432
 
42252
42433
  // src/commands/studio/improve.ts
42253
- import { defineCommand as defineCommand186 } from "citty";
42434
+ import { defineCommand as defineCommand187 } from "citty";
42254
42435
  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.";
42255
42436
  registerSchema({
42256
42437
  command: "studio.improve",
@@ -42275,7 +42456,7 @@ registerSchema({
42275
42456
  }
42276
42457
  }
42277
42458
  });
42278
- var improveCommand = defineCommand186({
42459
+ var improveCommand = defineCommand187({
42279
42460
  meta: {
42280
42461
  name: "improve",
42281
42462
  description: `${DESCRIPTION}
@@ -42319,7 +42500,7 @@ Examples:
42319
42500
  });
42320
42501
 
42321
42502
  // src/commands/studio/keep.ts
42322
- import { defineCommand as defineCommand187 } from "citty";
42503
+ import { defineCommand as defineCommand188 } from "citty";
42323
42504
  registerSchema({
42324
42505
  command: "studio.keep",
42325
42506
  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.",
@@ -42329,7 +42510,7 @@ registerSchema({
42329
42510
  undo: { type: "boolean", description: "Un-star an image, or take a kept clip back out", required: false }
42330
42511
  }
42331
42512
  });
42332
- var keepCommand = defineCommand187({
42513
+ var keepCommand = defineCommand188({
42333
42514
  meta: {
42334
42515
  name: "keep",
42335
42516
  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"
@@ -42380,7 +42561,7 @@ var keepCommand = defineCommand187({
42380
42561
  });
42381
42562
 
42382
42563
  // src/commands/studio/list.ts
42383
- import { defineCommand as defineCommand188 } from "citty";
42564
+ import { defineCommand as defineCommand189 } from "citty";
42384
42565
  registerSchema({
42385
42566
  command: "studio.list",
42386
42567
  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.",
@@ -42391,7 +42572,7 @@ registerSchema({
42391
42572
  full: { type: "boolean", description: "Include settings, references and attribution", required: false }
42392
42573
  }
42393
42574
  });
42394
- var listCommand16 = defineCommand188({
42575
+ var listCommand16 = defineCommand189({
42395
42576
  meta: {
42396
42577
  name: "list",
42397
42578
  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"
@@ -42425,7 +42606,7 @@ var listCommand16 = defineCommand188({
42425
42606
  });
42426
42607
 
42427
42608
  // src/commands/studio/models.ts
42428
- import { defineCommand as defineCommand189 } from "citty";
42609
+ import { defineCommand as defineCommand190 } from "citty";
42429
42610
  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.";
42430
42611
  registerSchema({
42431
42612
  command: "studio.models",
@@ -42512,7 +42693,7 @@ function buildModelCards(kind, model) {
42512
42693
  const selected = model ? ids.filter((id) => id === model) : ids;
42513
42694
  return selected.map((id) => build(id));
42514
42695
  }
42515
- var modelsCommand = defineCommand189({
42696
+ var modelsCommand = defineCommand190({
42516
42697
  meta: {
42517
42698
  name: "models",
42518
42699
  description: `${DESCRIPTION2}
@@ -42559,13 +42740,13 @@ Examples:
42559
42740
  });
42560
42741
 
42561
42742
  // src/commands/studio/skills.ts
42562
- import { defineCommand as defineCommand190 } from "citty";
42743
+ import { defineCommand as defineCommand191 } from "citty";
42563
42744
  registerSchema({
42564
42745
  command: "studio.skills",
42565
42746
  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.",
42566
42747
  args: {}
42567
42748
  });
42568
- var skillsCommand = defineCommand190({
42749
+ var skillsCommand = defineCommand191({
42569
42750
  meta: {
42570
42751
  name: "skills",
42571
42752
  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"
@@ -42589,7 +42770,7 @@ var skillsCommand = defineCommand190({
42589
42770
  });
42590
42771
 
42591
42772
  // src/commands/studio/index.ts
42592
- var studioCommand = defineCommand191({
42773
+ var studioCommand = defineCommand192({
42593
42774
  meta: {
42594
42775
  name: "studio",
42595
42776
  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.
@@ -42632,10 +42813,10 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
42632
42813
  });
42633
42814
 
42634
42815
  // src/commands/tag-manager/index.ts
42635
- import { defineCommand as defineCommand195 } from "citty";
42816
+ import { defineCommand as defineCommand196 } from "citty";
42636
42817
 
42637
42818
  // src/commands/tag-manager/draft.ts
42638
- import { defineCommand as defineCommand192 } from "citty";
42819
+ import { defineCommand as defineCommand193 } from "citty";
42639
42820
 
42640
42821
  // src/commands/tag-manager/shared.ts
42641
42822
  import { readFileSync as readFileSync13 } from "fs";
@@ -42669,7 +42850,7 @@ function loadJsonArg2(args, flag = "json") {
42669
42850
  }
42670
42851
  }
42671
42852
  var RETRYABLE_CODES2 = /* @__PURE__ */ new Set(["RATE_LIMITED", "INTERNAL_ERROR", "NETWORK_ERROR", "TIMEOUT"]);
42672
- function handleError4(err) {
42853
+ function handleError5(err) {
42673
42854
  if (err instanceof ApiError) {
42674
42855
  writeJsonEnvelope({
42675
42856
  ok: false,
@@ -42699,7 +42880,7 @@ async function stageOp4(op) {
42699
42880
  const data = await apiPost("/api/tag-manager/draft/stage", { chatId, op });
42700
42881
  writeJsonEnvelope({ ok: true, data, hints: STAGE_HINTS2 });
42701
42882
  } catch (err) {
42702
- handleError4(err);
42883
+ handleError5(err);
42703
42884
  }
42704
42885
  }
42705
42886
  async function draftAction3(path39, body, chat) {
@@ -42709,7 +42890,7 @@ async function draftAction3(path39, body, chat) {
42709
42890
  writeJsonEnvelope({ ok: true, data });
42710
42891
  return data;
42711
42892
  } catch (err) {
42712
- handleError4(err);
42893
+ handleError5(err);
42713
42894
  }
42714
42895
  }
42715
42896
  function renderDraft2(response) {
@@ -42745,7 +42926,7 @@ async function draftList2(json, chat) {
42745
42926
  process.stdout.write(`${renderDraft2(data)}
42746
42927
  `);
42747
42928
  } catch (err) {
42748
- handleError4(err);
42929
+ handleError5(err);
42749
42930
  }
42750
42931
  }
42751
42932
 
@@ -42758,13 +42939,13 @@ registerSchema({
42758
42939
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
42759
42940
  }
42760
42941
  });
42761
- var draftCommand4 = defineCommand192({
42942
+ var draftCommand4 = defineCommand193({
42762
42943
  meta: {
42763
42944
  name: "draft",
42764
42945
  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."
42765
42946
  },
42766
42947
  subCommands: {
42767
- list: defineCommand192({
42948
+ list: defineCommand193({
42768
42949
  meta: {
42769
42950
  name: "list",
42770
42951
  description: "Review everything staged on this chat (--json for the raw envelope)"
@@ -42777,7 +42958,7 @@ var draftCommand4 = defineCommand192({
42777
42958
  await draftList2(args.json === true, args.chat);
42778
42959
  }
42779
42960
  }),
42780
- show: defineCommand192({
42961
+ show: defineCommand193({
42781
42962
  meta: {
42782
42963
  name: "show",
42783
42964
  description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
@@ -42794,7 +42975,7 @@ var draftCommand4 = defineCommand192({
42794
42975
  );
42795
42976
  }
42796
42977
  }),
42797
- amend: defineCommand192({
42978
+ amend: defineCommand193({
42798
42979
  meta: {
42799
42980
  name: "amend",
42800
42981
  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."
@@ -42811,7 +42992,7 @@ var draftCommand4 = defineCommand192({
42811
42992
  });
42812
42993
  }
42813
42994
  }),
42814
- remove: defineCommand192({
42995
+ remove: defineCommand193({
42815
42996
  meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
42816
42997
  args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
42817
42998
  run: async ({ args }) => {
@@ -42820,7 +43001,7 @@ var draftCommand4 = defineCommand192({
42820
43001
  });
42821
43002
  }
42822
43003
  }),
42823
- clear: defineCommand192({
43004
+ clear: defineCommand193({
42824
43005
  meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
42825
43006
  run: async () => {
42826
43007
  await draftAction3("/api/tag-manager/draft/clear", {});
@@ -42830,7 +43011,7 @@ var draftCommand4 = defineCommand192({
42830
43011
  });
42831
43012
 
42832
43013
  // src/commands/tag-manager/read.ts
42833
- import { defineCommand as defineCommand193 } from "citty";
43014
+ import { defineCommand as defineCommand194 } from "citty";
42834
43015
  registerSchema({
42835
43016
  command: "tagManager.containers",
42836
43017
  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.",
@@ -42871,7 +43052,7 @@ function containersHints(containers) {
42871
43052
  }))
42872
43053
  });
42873
43054
  }
42874
- var containersCommand = defineCommand193({
43055
+ var containersCommand = defineCommand194({
42875
43056
  meta: {
42876
43057
  name: "containers",
42877
43058
  description: `List Tag Manager containers reachable by this company's connection.
@@ -42884,11 +43065,11 @@ Start here:
42884
43065
  const data = await apiGet("/api/tag-manager/containers");
42885
43066
  writeJsonEnvelope({ ok: true, data, hints: containersHints(data.containers) });
42886
43067
  } catch (err) {
42887
- handleError4(err);
43068
+ handleError5(err);
42888
43069
  }
42889
43070
  }
42890
43071
  });
42891
- var readCommand = defineCommand193({
43072
+ var readCommand = defineCommand194({
42892
43073
  meta: {
42893
43074
  name: "read",
42894
43075
  description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
@@ -42924,13 +43105,13 @@ Examples:
42924
43105
  );
42925
43106
  writeJsonEnvelope({ ok: true, data, hints });
42926
43107
  } catch (err) {
42927
- handleError4(err);
43108
+ handleError5(err);
42928
43109
  }
42929
43110
  }
42930
43111
  });
42931
43112
 
42932
43113
  // src/commands/tag-manager/write-commands.ts
42933
- import { defineCommand as defineCommand194 } from "citty";
43114
+ import { defineCommand as defineCommand195 } from "citty";
42934
43115
  var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
42935
43116
  var ENTITIES = [
42936
43117
  {
@@ -42986,10 +43167,10 @@ for (const { entity, noun, createHint } of ENTITIES) {
42986
43167
  });
42987
43168
  }
42988
43169
  function entityCommand(entity, noun, example) {
42989
- return defineCommand194({
43170
+ return defineCommand195({
42990
43171
  meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
42991
43172
  subCommands: {
42992
- create: defineCommand194({
43173
+ create: defineCommand195({
42993
43174
  meta: {
42994
43175
  name: "create",
42995
43176
  description: `Stage a new ${noun}
@@ -43011,7 +43192,7 @@ Examples:
43011
43192
  });
43012
43193
  }
43013
43194
  }),
43014
- update: defineCommand194({
43195
+ update: defineCommand195({
43015
43196
  meta: {
43016
43197
  name: "update",
43017
43198
  description: `Stage an update to an existing ${noun} (pass its id or path)`
@@ -43031,7 +43212,7 @@ Examples:
43031
43212
  });
43032
43213
  }
43033
43214
  }),
43034
- delete: defineCommand194({
43215
+ delete: defineCommand195({
43035
43216
  meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
43036
43217
  args: {
43037
43218
  id: { type: "positional", description: `${noun} id or path`, required: false },
@@ -43072,7 +43253,7 @@ function builtinTypes(args) {
43072
43253
  }
43073
43254
  return raw.split(",").map((entry) => entry.trim());
43074
43255
  }
43075
- var builtinCommand = defineCommand194({
43256
+ var builtinCommand = defineCommand195({
43076
43257
  meta: {
43077
43258
  name: "builtin",
43078
43259
  description: `Enable or disable built-in variables
@@ -43082,7 +43263,7 @@ Examples:
43082
43263
  baker tag-manager builtin disable --types formId`
43083
43264
  },
43084
43265
  subCommands: {
43085
- enable: defineCommand194({
43266
+ enable: defineCommand195({
43086
43267
  meta: { name: "enable", description: "Stage enabling built-in variables" },
43087
43268
  args: {
43088
43269
  types: { type: "string", description: "Comma-separated types", required: false },
@@ -43096,7 +43277,7 @@ Examples:
43096
43277
  });
43097
43278
  }
43098
43279
  }),
43099
- disable: defineCommand194({
43280
+ disable: defineCommand195({
43100
43281
  meta: { name: "disable", description: "Stage disabling built-in variables" },
43101
43282
  args: {
43102
43283
  types: { type: "string", description: "Comma-separated types", required: false },
@@ -43114,7 +43295,7 @@ Examples:
43114
43295
  });
43115
43296
 
43116
43297
  // src/commands/tag-manager/index.ts
43117
- var tagManagerCommand = defineCommand195({
43298
+ var tagManagerCommand = defineCommand196({
43118
43299
  meta: {
43119
43300
  name: "tag-manager",
43120
43301
  description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
@@ -43151,7 +43332,7 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
43151
43332
  });
43152
43333
 
43153
43334
  // src/commands/tags/index.ts
43154
- import { defineCommand as defineCommand196 } from "citty";
43335
+ import { defineCommand as defineCommand197 } from "citty";
43155
43336
 
43156
43337
  // src/commands/tags/shared.ts
43157
43338
  function failApi3(err) {
@@ -43220,7 +43401,7 @@ async function listTags(json) {
43220
43401
  var listArgs9 = {
43221
43402
  json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
43222
43403
  };
43223
- var listCommand17 = defineCommand196({
43404
+ var listCommand17 = defineCommand197({
43224
43405
  meta: {
43225
43406
  name: "list",
43226
43407
  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"
@@ -43239,7 +43420,7 @@ async function listDraft3(chat) {
43239
43420
  failApi3(err);
43240
43421
  }
43241
43422
  }
43242
- var draftCommand5 = defineCommand196({
43423
+ var draftCommand5 = defineCommand197({
43243
43424
  meta: {
43244
43425
  name: "draft",
43245
43426
  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."
@@ -43249,7 +43430,7 @@ var draftCommand5 = defineCommand196({
43249
43430
  await listDraft3(args.chat);
43250
43431
  }
43251
43432
  });
43252
- var tagsCommand3 = defineCommand196({
43433
+ var tagsCommand3 = defineCommand197({
43253
43434
  meta: {
43254
43435
  name: "tags",
43255
43436
  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.
@@ -43278,10 +43459,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
43278
43459
  });
43279
43460
 
43280
43461
  // src/commands/testimonials/index.ts
43281
- import { defineCommand as defineCommand200 } from "citty";
43462
+ import { defineCommand as defineCommand201 } from "citty";
43282
43463
 
43283
43464
  // src/commands/testimonials/get.ts
43284
- import { defineCommand as defineCommand197 } from "citty";
43465
+ import { defineCommand as defineCommand198 } from "citty";
43285
43466
  registerSchema({
43286
43467
  command: "testimonials.get",
43287
43468
  description: "Get a single testimonial by ID",
@@ -43289,7 +43470,7 @@ registerSchema({
43289
43470
  id: { type: "string", description: "Testimonial ID", required: true }
43290
43471
  }
43291
43472
  });
43292
- var getCommand6 = defineCommand197({
43473
+ var getCommand6 = defineCommand198({
43293
43474
  meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
43294
43475
  args: {
43295
43476
  id: { type: "positional", description: "Testimonial ID", required: false },
@@ -43326,7 +43507,7 @@ var getCommand6 = defineCommand197({
43326
43507
  });
43327
43508
 
43328
43509
  // src/commands/testimonials/list.ts
43329
- import { defineCommand as defineCommand198 } from "citty";
43510
+ import { defineCommand as defineCommand199 } from "citty";
43330
43511
 
43331
43512
  // src/commands/testimonials/emptyCorpusHints.ts
43332
43513
  function resolveEmptyReason({
@@ -43461,7 +43642,7 @@ function buildListParams(args) {
43461
43642
  }
43462
43643
  return params;
43463
43644
  }
43464
- var listCommand18 = defineCommand198({
43645
+ var listCommand18 = defineCommand199({
43465
43646
  meta: {
43466
43647
  name: "list",
43467
43648
  description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
@@ -43513,7 +43694,7 @@ var listCommand18 = defineCommand198({
43513
43694
  });
43514
43695
 
43515
43696
  // src/commands/testimonials/search.ts
43516
- import { defineCommand as defineCommand199 } from "citty";
43697
+ import { defineCommand as defineCommand200 } from "citty";
43517
43698
  var FILTER_FLAGS2 = ["source", "rating-min", "rating-max", "status", "sentiment", "language", "tags"];
43518
43699
  function languageBiasHint(results, requestedLanguage) {
43519
43700
  if (requestedLanguage) {
@@ -43592,7 +43773,7 @@ function buildSearchRequest(query, args) {
43592
43773
  }
43593
43774
  return body;
43594
43775
  }
43595
- var searchCommand3 = defineCommand199({
43776
+ var searchCommand3 = defineCommand200({
43596
43777
  meta: {
43597
43778
  name: "search",
43598
43779
  description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
@@ -43656,7 +43837,7 @@ var searchCommand3 = defineCommand199({
43656
43837
  var tagsCommand4 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
43657
43838
 
43658
43839
  // src/commands/testimonials/index.ts
43659
- var testimonialsCommand = defineCommand200({
43840
+ var testimonialsCommand = defineCommand201({
43660
43841
  meta: {
43661
43842
  name: "testimonials",
43662
43843
  description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
@@ -43678,10 +43859,10 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
43678
43859
  });
43679
43860
 
43680
43861
  // src/commands/videos/index.ts
43681
- import { defineCommand as defineCommand207 } from "citty";
43862
+ import { defineCommand as defineCommand208 } from "citty";
43682
43863
 
43683
43864
  // src/commands/videos/delete.ts
43684
- import { defineCommand as defineCommand201 } from "citty";
43865
+ import { defineCommand as defineCommand202 } from "citty";
43685
43866
  registerSchema({
43686
43867
  command: "videos.delete",
43687
43868
  description: "Delete a video by ID",
@@ -43695,7 +43876,7 @@ registerSchema({
43695
43876
  }
43696
43877
  }
43697
43878
  });
43698
- var deleteCommand4 = defineCommand201({
43879
+ var deleteCommand4 = defineCommand202({
43699
43880
  meta: {
43700
43881
  name: "delete",
43701
43882
  description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
@@ -43736,7 +43917,7 @@ var deleteCommand4 = defineCommand201({
43736
43917
  });
43737
43918
 
43738
43919
  // src/commands/videos/get.ts
43739
- import { defineCommand as defineCommand202 } from "citty";
43920
+ import { defineCommand as defineCommand203 } from "citty";
43740
43921
  registerSchema({
43741
43922
  command: "videos.get",
43742
43923
  description: "Get a single video by ID",
@@ -43744,7 +43925,7 @@ registerSchema({
43744
43925
  id: { type: "string", description: "Video ID", required: true }
43745
43926
  }
43746
43927
  });
43747
- var getCommand7 = defineCommand202({
43928
+ var getCommand7 = defineCommand203({
43748
43929
  meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
43749
43930
  args: {
43750
43931
  id: { type: "positional", description: "Video ID", required: false },
@@ -43781,7 +43962,7 @@ var getCommand7 = defineCommand202({
43781
43962
  });
43782
43963
 
43783
43964
  // src/commands/videos/group.ts
43784
- import { defineCommand as defineCommand203 } from "citty";
43965
+ import { defineCommand as defineCommand204 } from "citty";
43785
43966
  registerSchema({
43786
43967
  command: "videos.group",
43787
43968
  description: "List every clip and image that arrived in the same set as this video (carousel slides, one page)",
@@ -43790,7 +43971,7 @@ registerSchema({
43790
43971
  "group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
43791
43972
  }
43792
43973
  });
43793
- var groupCommand2 = defineCommand203({
43974
+ var groupCommand2 = defineCommand204({
43794
43975
  meta: {
43795
43976
  name: "group",
43796
43977
  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>"
@@ -43813,7 +43994,7 @@ var groupCommand2 = defineCommand203({
43813
43994
  import { mkdtemp as mkdtemp2, rm as rm7, stat as stat7 } from "fs/promises";
43814
43995
  import { tmpdir as tmpdir3 } from "os";
43815
43996
  import path38 from "path";
43816
- import { defineCommand as defineCommand204 } from "citty";
43997
+ import { defineCommand as defineCommand205 } from "citty";
43817
43998
 
43818
43999
  // src/lib/streamUpload.ts
43819
44000
  import { createHash as createHash2 } from "crypto";
@@ -43977,7 +44158,7 @@ registerSchema({
43977
44158
  "dry-run": { type: "boolean", description: "Preview the operation without executing", required: false }
43978
44159
  }
43979
44160
  });
43980
- var ingestCommand2 = defineCommand204({
44161
+ var ingestCommand2 = defineCommand205({
43981
44162
  meta: {
43982
44163
  name: "ingest",
43983
44164
  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"
@@ -44239,7 +44420,7 @@ async function uploadToAssetStore(filePath, sizeBytes) {
44239
44420
  }
44240
44421
 
44241
44422
  // src/commands/videos/search.ts
44242
- import { defineCommand as defineCommand205 } from "citty";
44423
+ import { defineCommand as defineCommand206 } from "citty";
44243
44424
  registerSchema({
44244
44425
  command: "videos.search",
44245
44426
  description: "Search videos by text query. Only returns ready videos.",
@@ -44249,7 +44430,7 @@ registerSchema({
44249
44430
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
44250
44431
  }
44251
44432
  });
44252
- var searchCommand4 = defineCommand205({
44433
+ var searchCommand4 = defineCommand206({
44253
44434
  meta: {
44254
44435
  name: "search",
44255
44436
  description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
@@ -44301,7 +44482,7 @@ var tagsCommand5 = makeTagsCommand("videos", "video", "/api/videos/tags");
44301
44482
  // src/commands/videos/upload.ts
44302
44483
  import { readFile as readFile25, stat as stat8 } from "fs/promises";
44303
44484
  import { basename as basename3, extname as extname4 } from "path";
44304
- import { defineCommand as defineCommand206 } from "citty";
44485
+ import { defineCommand as defineCommand207 } from "citty";
44305
44486
  var MIME_MAP = {
44306
44487
  ".mp4": "video/mp4",
44307
44488
  ".mov": "video/quicktime",
@@ -44343,7 +44524,7 @@ function detectContentType(filePath) {
44343
44524
  function isRemoteUrl3(value) {
44344
44525
  return /^https?:\/\//i.test(value);
44345
44526
  }
44346
- var uploadCommand2 = defineCommand206({
44527
+ var uploadCommand2 = defineCommand207({
44347
44528
  meta: {
44348
44529
  name: "upload",
44349
44530
  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"
@@ -44427,7 +44608,7 @@ var uploadCommand2 = defineCommand206({
44427
44608
  });
44428
44609
 
44429
44610
  // src/commands/videos/index.ts
44430
- var videosCommand = defineCommand207({
44611
+ var videosCommand = defineCommand208({
44431
44612
  meta: {
44432
44613
  name: "videos",
44433
44614
  description: `Find and manage videos in Baker. Subcommands: search, get, upload, ingest, delete, tags.
@@ -44454,10 +44635,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
44454
44635
  });
44455
44636
 
44456
44637
  // src/commands/winning-ads/index.ts
44457
- import { defineCommand as defineCommand220 } from "citty";
44638
+ import { defineCommand as defineCommand221 } from "citty";
44458
44639
 
44459
44640
  // src/commands/winning-ads/advertisers.ts
44460
- import { defineCommand as defineCommand208 } from "citty";
44641
+ import { defineCommand as defineCommand209 } from "citty";
44461
44642
 
44462
44643
  // src/commands/winning-ads/shared.ts
44463
44644
  function splitList2(value) {
@@ -44510,7 +44691,7 @@ function advertiserNormalizer(record, full) {
44510
44691
  last_synced_at: record.last_synced_at ?? null
44511
44692
  };
44512
44693
  }
44513
- var advertisersCommand2 = defineCommand208({
44694
+ var advertisersCommand2 = defineCommand209({
44514
44695
  meta: {
44515
44696
  name: "advertisers",
44516
44697
  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'
@@ -44568,7 +44749,7 @@ var advertisersCommand2 = defineCommand208({
44568
44749
  });
44569
44750
 
44570
44751
  // src/commands/winning-ads/brief.ts
44571
- import { defineCommand as defineCommand209 } from "citty";
44752
+ import { defineCommand as defineCommand210 } from "citty";
44572
44753
  registerSchema({
44573
44754
  command: "winning-ads.brief",
44574
44755
  description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
@@ -44614,7 +44795,7 @@ function parseDna(raw) {
44614
44795
  }
44615
44796
  return parsed;
44616
44797
  }
44617
- var briefCommand = defineCommand209({
44798
+ var briefCommand = defineCommand210({
44618
44799
  meta: {
44619
44800
  name: "brief",
44620
44801
  description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
@@ -44650,7 +44831,7 @@ var briefCommand = defineCommand209({
44650
44831
  });
44651
44832
 
44652
44833
  // src/commands/winning-ads/content.ts
44653
- import { defineCommand as defineCommand210 } from "citty";
44834
+ import { defineCommand as defineCommand211 } from "citty";
44654
44835
  registerSchema({
44655
44836
  command: "winning-ads.content",
44656
44837
  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.",
@@ -44663,7 +44844,7 @@ registerSchema({
44663
44844
  }
44664
44845
  }
44665
44846
  });
44666
- var contentCommand = defineCommand210({
44847
+ var contentCommand = defineCommand211({
44667
44848
  meta: {
44668
44849
  name: "content",
44669
44850
  description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
@@ -44712,7 +44893,7 @@ var contentCommand = defineCommand210({
44712
44893
  });
44713
44894
 
44714
44895
  // src/commands/winning-ads/feed.ts
44715
- import { defineCommand as defineCommand211 } from "citty";
44896
+ import { defineCommand as defineCommand212 } from "citty";
44716
44897
  function buildFeedParams(input) {
44717
44898
  const params = {};
44718
44899
  const advertiser = splitList2(input.advertiser);
@@ -44764,7 +44945,7 @@ registerSchema({
44764
44945
  format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
44765
44946
  }
44766
44947
  });
44767
- var feedCommand = defineCommand211({
44948
+ var feedCommand = defineCommand212({
44768
44949
  meta: {
44769
44950
  name: "feed",
44770
44951
  description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
@@ -44849,7 +45030,7 @@ var feedCommand = defineCommand211({
44849
45030
  });
44850
45031
 
44851
45032
  // src/commands/winning-ads/follow.ts
44852
- import { defineCommand as defineCommand212 } from "citty";
45033
+ import { defineCommand as defineCommand213 } from "citty";
44853
45034
  var PLATFORMS = ["meta", "linkedin"];
44854
45035
  registerSchema({
44855
45036
  command: "winning-ads.follow",
@@ -44864,7 +45045,7 @@ registerSchema({
44864
45045
  label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
44865
45046
  }
44866
45047
  });
44867
- var followCommand = defineCommand212({
45048
+ var followCommand = defineCommand213({
44868
45049
  meta: {
44869
45050
  name: "follow",
44870
45051
  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'
@@ -44911,7 +45092,7 @@ var followCommand = defineCommand212({
44911
45092
  });
44912
45093
 
44913
45094
  // src/commands/winning-ads/follow-competitors.ts
44914
- import { defineCommand as defineCommand213 } from "citty";
45095
+ import { defineCommand as defineCommand214 } from "citty";
44915
45096
  var PLATFORMS2 = ["meta", "linkedin"];
44916
45097
  var BATCH_TIMEOUT_MS = 3e5;
44917
45098
  function buildFollowBatchBody(input) {
@@ -44944,7 +45125,7 @@ registerSchema({
44944
45125
  }
44945
45126
  }
44946
45127
  });
44947
- var followCompetitorsCommand = defineCommand213({
45128
+ var followCompetitorsCommand = defineCommand214({
44948
45129
  meta: {
44949
45130
  name: "follow-competitors",
44950
45131
  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"'
@@ -45019,7 +45200,7 @@ var followCompetitorsCommand = defineCommand213({
45019
45200
  });
45020
45201
 
45021
45202
  // src/commands/winning-ads/following.ts
45022
- import { defineCommand as defineCommand214 } from "citty";
45203
+ import { defineCommand as defineCommand215 } from "citty";
45023
45204
  registerSchema({
45024
45205
  command: "winning-ads.following",
45025
45206
  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.",
@@ -45073,7 +45254,7 @@ function followingNormalizer(record, full) {
45073
45254
  platforms: Array.isArray(record.platforms) ? record.platforms : []
45074
45255
  };
45075
45256
  }
45076
- var followingCommand = defineCommand214({
45257
+ var followingCommand = defineCommand215({
45077
45258
  meta: {
45078
45259
  name: "following",
45079
45260
  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"
@@ -45109,7 +45290,7 @@ var followingCommand = defineCommand214({
45109
45290
  });
45110
45291
 
45111
45292
  // src/commands/winning-ads/patterns.ts
45112
- import { defineCommand as defineCommand215 } from "citty";
45293
+ import { defineCommand as defineCommand216 } from "citty";
45113
45294
  registerSchema({
45114
45295
  command: "winning-ads.patterns",
45115
45296
  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.",
@@ -45148,7 +45329,7 @@ function discriminatorRow(record) {
45148
45329
  top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
45149
45330
  };
45150
45331
  }
45151
- var patternsCommand = defineCommand215({
45332
+ var patternsCommand = defineCommand216({
45152
45333
  meta: {
45153
45334
  name: "patterns",
45154
45335
  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"
@@ -45204,7 +45385,7 @@ var patternsCommand = defineCommand215({
45204
45385
  });
45205
45386
 
45206
45387
  // src/commands/winning-ads/search.ts
45207
- import { defineCommand as defineCommand216 } from "citty";
45388
+ import { defineCommand as defineCommand217 } from "citty";
45208
45389
  registerSchema({
45209
45390
  command: "winning-ads.search",
45210
45391
  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.",
@@ -45312,7 +45493,7 @@ function buildSearchBody2(args) {
45312
45493
  }
45313
45494
  return body;
45314
45495
  }
45315
- var searchCommand5 = defineCommand216({
45496
+ var searchCommand5 = defineCommand217({
45316
45497
  meta: {
45317
45498
  name: "search",
45318
45499
  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"
@@ -45427,7 +45608,7 @@ var searchCommand5 = defineCommand216({
45427
45608
  });
45428
45609
 
45429
45610
  // src/commands/winning-ads/seeds.ts
45430
- import { defineCommand as defineCommand217 } from "citty";
45611
+ import { defineCommand as defineCommand218 } from "citty";
45431
45612
  function leanRow(r) {
45432
45613
  return {
45433
45614
  key: r.key,
@@ -45455,7 +45636,7 @@ function makeSeedCommand(opts) {
45455
45636
  limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
45456
45637
  }
45457
45638
  });
45458
- return defineCommand217({
45639
+ return defineCommand218({
45459
45640
  meta: { name: opts.name, description: opts.description },
45460
45641
  args: {
45461
45642
  platform: { type: "string", description: "Single platform to segment on", required: false },
@@ -45504,7 +45685,7 @@ var formatsCommand = makeSeedCommand({
45504
45685
  });
45505
45686
 
45506
45687
  // src/commands/winning-ads/unfollow.ts
45507
- import { defineCommand as defineCommand218 } from "citty";
45688
+ import { defineCommand as defineCommand219 } from "citty";
45508
45689
  registerSchema({
45509
45690
  command: "winning-ads.unfollow",
45510
45691
  description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
@@ -45512,7 +45693,7 @@ registerSchema({
45512
45693
  advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
45513
45694
  }
45514
45695
  });
45515
- var unfollowCommand = defineCommand218({
45696
+ var unfollowCommand = defineCommand219({
45516
45697
  meta: {
45517
45698
  name: "unfollow",
45518
45699
  description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
@@ -45533,7 +45714,7 @@ var unfollowCommand = defineCommand218({
45533
45714
  });
45534
45715
 
45535
45716
  // src/commands/winning-ads/winners.ts
45536
- import { defineCommand as defineCommand219 } from "citty";
45717
+ import { defineCommand as defineCommand220 } from "citty";
45537
45718
  registerSchema({
45538
45719
  command: "winning-ads.winners",
45539
45720
  description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
@@ -45543,7 +45724,7 @@ registerSchema({
45543
45724
  platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
45544
45725
  }
45545
45726
  });
45546
- var winnersCommand = defineCommand219({
45727
+ var winnersCommand = defineCommand220({
45547
45728
  meta: {
45548
45729
  name: "winners",
45549
45730
  description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
@@ -45593,7 +45774,7 @@ var winnersCommand = defineCommand219({
45593
45774
  });
45594
45775
 
45595
45776
  // src/commands/winning-ads/index.ts
45596
- var winningAdsCommand = defineCommand220({
45777
+ var winningAdsCommand = defineCommand221({
45597
45778
  meta: {
45598
45779
  name: "winning-ads",
45599
45780
  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.
@@ -45831,7 +46012,7 @@ function getCliVersion() {
45831
46012
  }
45832
46013
 
45833
46014
  // src/cli.ts
45834
- var main = defineCommand221({
46015
+ var main = defineCommand222({
45835
46016
  meta: {
45836
46017
  name: "baker",
45837
46018
  version: getCliVersion(),
@@ -45849,6 +46030,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
45849
46030
  "scheduled-actions": scheduledActionsCommand,
45850
46031
  ads: adsCommand2,
45851
46032
  brand: brandCommand,
46033
+ analytics: analyticsCommand2,
45852
46034
  ga4: ga4Command,
45853
46035
  gsc: gscCommand,
45854
46036
  research: researchCommand,