@koda-sl/baker-cli 0.226.0 → 0.228.0-dev.ddddd841e

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 = {
@@ -4432,6 +4432,10 @@ var chatChangeTypeSchema = z10.enum([
4432
4432
  // One Studio batch — the takes of one brief, as a set. See convex/lib/validators.ts.
4433
4433
  "studio-generation",
4434
4434
  "avatar",
4435
+ // The company's campaign-parameter mapping. Immediate, because it decides
4436
+ // what the edge captures and one held until Publish would not measure the
4437
+ // campaign it was written for.
4438
+ "analytics-mapping",
4435
4439
  "briefs"
4436
4440
  ]);
4437
4441
  var chatChangeActionSchema = z10.enum(["created", "updated", "deleted"]);
@@ -4777,7 +4781,8 @@ var historyCategorySchema = z12.enum([
4777
4781
  "domain",
4778
4782
  "hosting",
4779
4783
  "integration",
4780
- "tag_manager"
4784
+ "tag_manager",
4785
+ "analytics"
4781
4786
  ]);
4782
4787
  var historyListRequestSchema = z12.object({
4783
4788
  limit: z12.number().int().min(1).max(200).optional(),
@@ -10564,9 +10569,9 @@ async function fetchAllPages(body, args, servingOptions) {
10564
10569
  let totalRowsWritten = 0;
10565
10570
  let keywordLimits;
10566
10571
  do {
10567
- const requestBody = { ...body };
10568
- if (pageToken) requestBody.pageToken = pageToken;
10569
- const response = await apiPost("/api/ads/google/query", requestBody);
10572
+ const requestBody2 = { ...body };
10573
+ if (pageToken) requestBody2.pageToken = pageToken;
10574
+ const response = await apiPost("/api/ads/google/query", requestBody2);
10570
10575
  const rows = response.rows ?? [];
10571
10576
  pageToken = response.pageToken;
10572
10577
  if (args.out) {
@@ -20344,11 +20349,527 @@ Full guides: __tooling__/docs/tools/baker/ads-<platform>.md (google|meta|linkedi
20344
20349
  }
20345
20350
  });
20346
20351
 
20352
+ // src/commands/analytics/index.ts
20353
+ import { defineCommand as defineCommand87 } from "citty";
20354
+
20355
+ // src/commands/analytics/hints.ts
20356
+ var SEVERE_STEP_DROP = 0.6;
20357
+ var MIN_SESSIONS_FOR_RATES = 100;
20358
+ var SHALLOW_ENGAGEMENT_MS = 1e4;
20359
+ function percent(value) {
20360
+ return `${Math.round(value * 100)}%`;
20361
+ }
20362
+ function buildAnalyticsHints(data) {
20363
+ const hints = [];
20364
+ for (const funnel of data.funnels ?? []) {
20365
+ const worst = funnel.worstStep;
20366
+ if (worst && worst.dropRate !== null && worst.dropRate >= SEVERE_STEP_DROP) {
20367
+ hints.push(
20368
+ `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.`
20369
+ );
20370
+ }
20371
+ }
20372
+ if (data.totals.sessions > 0 && data.totals.sessions < MIN_SESSIONS_FOR_RATES) {
20373
+ hints.push(
20374
+ "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."
20375
+ );
20376
+ }
20377
+ if (data.totals.avgEngagementMs !== null && data.totals.avgEngagementMs < SHALLOW_ENGAGEMENT_MS) {
20378
+ hints.push(
20379
+ "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."
20380
+ );
20381
+ }
20382
+ if (data.totals.pageViews > 0 && data.totals.sessions === 0) {
20383
+ hints.push(
20384
+ "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."
20385
+ );
20386
+ }
20387
+ if ((data.topCampaigns ?? []).length === 0 && (data.topSources ?? []).length > 0) {
20388
+ hints.push(
20389
+ "No campaign tagging on any traffic \u2014 ad clicks cannot be attributed to a campaign until the destination URLs carry utm parameters."
20390
+ );
20391
+ }
20392
+ return hints;
20393
+ }
20394
+
20395
+ // src/commands/analytics/presets.ts
20396
+ var ANALYTICS_PRESET_INFO = [
20397
+ {
20398
+ name: "overview",
20399
+ description: "Everything at once: traffic, top pages with their conversion rates, where visitors came from, the worst step of every Form, and what the conversion number consists of \u2014 one row per outcome the company marked, by the name they gave it. Start here. A `conversions` row at zero means the outcome is marked and has never fired, which is usually a Form that never reaches it.",
20400
+ playbook: "landing \u2014 diagnose a page that gets traffic but few leads"
20401
+ },
20402
+ {
20403
+ name: "traffic",
20404
+ description: "Where visitors come from \u2014 trend, sources, campaigns, countries, devices.",
20405
+ playbook: "the platform playbook for the channel that dominates"
20406
+ },
20407
+ {
20408
+ name: "funnel",
20409
+ description: "Per-step drop-off for the company's Forms. Narrow to one with --flow.",
20410
+ playbook: "flow-builder \u2014 fix the step that loses people"
20411
+ },
20412
+ {
20413
+ name: "flow",
20414
+ description: "One Form in depth: conversions counted at the node that produced them, step-to-step paths for a branching Form, the per-step table, every trigger raised, and each marked conversion by name. Read convertedSessions rather than submits \u2014 a Form whose scheduling widget sits mid-flow never emits a submit and reports zero on every other report. An empty `conversions` array means nobody has marked what this Form is for, so the numbers rest on a built-in guess; mark it in the Forms builder or with `conversions: [{ triggerId }]` on the node.",
20415
+ playbook: "flow-builder \u2014 fix the branch or the step that loses people"
20416
+ },
20417
+ {
20418
+ name: "page",
20419
+ description: "One page in detail. Requires --path.",
20420
+ playbook: "landing"
20421
+ },
20422
+ {
20423
+ name: "triggers",
20424
+ description: "What visitors did inside a Form and how much of it fired a side effect \u2014 link clicks that leave the site, scheduling widgets, embedded checkouts. The funnel shows the steps they walked; this shows what they did. A trigger with many fires and no side effects is behaviour nobody is measuring yet.",
20425
+ playbook: "flow-builder \u2014 wire up what matters, or tags for what should be measured"
20426
+ },
20427
+ {
20428
+ name: "paid",
20429
+ description: "Paid campaigns, grouped by session rather than by page view, with the click ids that resolve to a real ad click \u2014 and, crucially, how many of those leads were actually DELIVERED to the CRM. A campaign whose forms all submit and whose integration is rejecting every one of them looks perfect on every other preset and reads as zero delivered here.",
20430
+ playbook: "the platform playbook for the channel \u2014 or tags, when the gap is delivery rather than acquisition"
20431
+ },
20432
+ {
20433
+ name: "delivery",
20434
+ description: 'Where each submission actually went: every destination it reached, whether that destination accepted it, and the id the destination gave the record it created. Failures only by default; --full lists every submission. This is the preset for "I filled in the form, where is my lead?".',
20435
+ playbook: "flow-builder \u2014 repair the destination that is refusing leads"
20436
+ },
20437
+ {
20438
+ name: "geo",
20439
+ description: "Where the people who convert actually are, at whatever resolution you ask for: country, region, city, postcode or US DMA. Country answers 'which market is this working in'; postcode answers the question a local advertiser is actually asking, and matches the unit Google and Meta sell that targeting in.",
20440
+ playbook: "the platform playbook for the channel \u2014 narrow the targeting to where it already works"
20441
+ },
20442
+ {
20443
+ name: "bots",
20444
+ description: "Which machines fetch this site and whether they are genuine. Every other report here excludes them; this one reads them. Answers whether Google is still crawling a page after it was republished, whether Meta fetched a link preview before spend went behind the URL, and how much of the traffic is now AI answer engines.",
20445
+ playbook: "landing \u2014 a page that stopped being crawled stops ranking, weeks before the traffic shows it"
20446
+ },
20447
+ {
20448
+ name: "landings",
20449
+ description: "Every landing side by side \u2014 views, entrances, conversion rate and a sparkline each, under the name a person gave it. Answers 'which of my pages is working' without having to know the answer first; `page` then answers one of them in depth. --tag narrows it to a campaign.",
20450
+ playbook: "landing \u2014 pick the page worth working on before working on one"
20451
+ },
20452
+ {
20453
+ name: "tags",
20454
+ description: "The same numbers rolled up by the tag a landing is filed under \u2014 the unit a campaign is actually run at. A client asks how the September push did, and September was six landings.",
20455
+ playbook: "the platform playbook for the channel \u2014 judge the campaign, not the page"
20456
+ },
20457
+ {
20458
+ name: "events",
20459
+ description: "Events the pages define for themselves: a section seen, a video played, a button clicked. Lists each with the property keys it carries so it can be broken down, and takes --steps for an ORDERED funnel over them \u2014 where a session only counts at a step if it reached it after the one before, so 'saw pricing then clicked demo' is not the same number as the reverse.",
20460
+ playbook: "landing \u2014 measure the part of the page the Form funnel cannot see"
20461
+ },
20462
+ {
20463
+ name: "devices",
20464
+ description: "Browser, OS, engine or viewport of real visitors, with the conversion rate of each. Narrow enough to reproduce a bug on: 'mobile converts worse' is not actionable, 'Safari 17 under 380px converts at a third of the rate' is.",
20465
+ playbook: "landing \u2014 fix the client the page is broken on"
20466
+ },
20467
+ {
20468
+ name: "releases",
20469
+ description: "Traffic and conversions per published build, newest first. Answers whether a change to a page moved the numbers.",
20470
+ playbook: "landing \u2014 compare a page before and after a change"
20471
+ }
20472
+ ];
20473
+
20474
+ // src/commands/analytics/index.ts
20475
+ var SHARED_ARGS = {
20476
+ days: { type: "string", description: "Lookback window in days (default: 30)", required: false },
20477
+ "start-date": { type: "string", description: "Explicit start date (YYYY-MM-DD)", required: false },
20478
+ "end-date": { type: "string", description: "Explicit end date (YYYY-MM-DD, inclusive)", required: false },
20479
+ full: {
20480
+ type: "boolean",
20481
+ description: "Return long breakdowns and the per-day trend instead of the top few",
20482
+ required: false
20483
+ },
20484
+ timezone: {
20485
+ type: "string",
20486
+ description: "IANA zone the day boundaries are drawn in, e.g. Europe/Madrid (default: UTC). Pass the client's zone \u2014 in UTC, two hours of every Spanish evening land on the following day",
20487
+ required: false
20488
+ },
20489
+ granularity: {
20490
+ type: "string",
20491
+ description: "hour | day (default) | week | month \u2014 how wide one point of the trend is",
20492
+ required: false
20493
+ },
20494
+ compare: {
20495
+ type: "boolean",
20496
+ description: "Also return the preceding window of the same length, so every total has something to be read against",
20497
+ required: false
20498
+ },
20499
+ landing: {
20500
+ type: "string",
20501
+ description: "Narrow the whole report to one landing, by the internalId in its _definition.md \u2014 get it from `baker analytics landings`. Works on every report here: sources, geography, paid campaigns, Form drop-off and delivery all answer for that page alone. Prefer it over --path, which stops matching the moment a page is moved or renamed",
20502
+ required: false
20503
+ },
20504
+ role: {
20505
+ type: "string",
20506
+ description: 'Narrow the whole report to visits that arrived on one ad dimension: keyword, match_type, campaign_id, adgroup_id, ad_id, placement, network, audience, device, search_query and the rest \u2014 run `baker analytics ads` for the full list and what this company actually sends. Pair it with --value. It selects the VISITS that arrived on that value and keeps everything they then did, so `--role keyword --value "solar panels"` answers what those people read and whether they converted, not just where they landed',
20507
+ required: false
20508
+ },
20509
+ value: {
20510
+ type: "string",
20511
+ description: "The value of --role to narrow to. Pass an empty string to get the visits that arrived carrying no such parameter, which is how you size the untagged half of an account",
20512
+ required: false
20513
+ }
20514
+ };
20515
+ function handleError(err) {
20516
+ if (err instanceof ApiError) {
20517
+ writeJsonEnvelope({ ok: false, error: { code: err.code, message: err.message } });
20518
+ process.exit(1);
20519
+ }
20520
+ writeJsonEnvelope({
20521
+ ok: false,
20522
+ error: { code: "NETWORK_ERROR", message: err instanceof Error ? err.message : "Unexpected error" }
20523
+ });
20524
+ process.exit(1);
20525
+ }
20526
+ function requestBody(args, options) {
20527
+ const candidates = {
20528
+ preset: options.preset,
20529
+ days: args.days ? Number(args.days) : void 0,
20530
+ startDate: args["start-date"],
20531
+ endDate: args["end-date"],
20532
+ full: args.full ? true : void 0,
20533
+ compare: args.compare ? true : void 0,
20534
+ timezone: args.timezone ? String(args.timezone) : void 0,
20535
+ granularity: args.granularity ? String(args.granularity) : void 0,
20536
+ path: options.path,
20537
+ flowSlug: options.flowSlug,
20538
+ grain: options.grain,
20539
+ country: options.country,
20540
+ // Read off the shared flag unless a preset resolved one itself. Every
20541
+ // report takes it, so wiring it per-preset would be fifteen identical lines
20542
+ // and, historically, four of them missing.
20543
+ landingId: options.landingId ?? (args.landing ? String(args.landing) : void 0),
20544
+ tag: options.tag,
20545
+ eventName: options.eventName,
20546
+ property: options.property,
20547
+ where: options.where,
20548
+ steps: options.steps && options.steps.length > 0 ? options.steps : void 0,
20549
+ deviceGrain: options.deviceGrain,
20550
+ adRole: options.adRole ?? (args.role ? String(args.role) : void 0),
20551
+ // Deliberately not dropped when empty: with a role set, an empty value is a
20552
+ // real question — "the visits that arrived carrying none of these" — and the
20553
+ // filter below would otherwise strip it and silently widen the report to
20554
+ // everything.
20555
+ adValue: args.role !== void 0 && args.value !== void 0 ? String(args.value) : void 0
20556
+ };
20557
+ return Object.fromEntries(
20558
+ Object.entries(candidates).filter(([key, value]) => value !== void 0 && (value !== "" || key === "adValue"))
20559
+ );
20560
+ }
20561
+ async function runPreset(args, options) {
20562
+ try {
20563
+ const response = await apiPost("/api/analytics/query", requestBody(args, options));
20564
+ const hints = buildAnalyticsHints(response.data);
20565
+ writeJsonEnvelope({ ...response, ...hints.length > 0 ? { hints } : {} });
20566
+ } catch (err) {
20567
+ handleError(err);
20568
+ }
20569
+ }
20570
+ function presetCommand(options) {
20571
+ registerSchema({
20572
+ command: `analytics.${options.name}`,
20573
+ description: options.description,
20574
+ args: { ...SHARED_ARGS, ...options.extraArgs ?? {} }
20575
+ });
20576
+ return defineCommand87({
20577
+ meta: { name: options.name, description: options.description },
20578
+ args: { ...SHARED_ARGS, ...options.extraArgs ?? {} },
20579
+ run: async ({ args }) => {
20580
+ const resolved = options.resolve ? options.resolve(args) : { preset: options.preset };
20581
+ if ("error" in resolved) {
20582
+ writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message: resolved.error } });
20583
+ process.exit(1);
20584
+ }
20585
+ await runPreset(args, resolved);
20586
+ }
20587
+ });
20588
+ }
20589
+ var overviewCommand = presetCommand({
20590
+ name: "overview",
20591
+ preset: "overview",
20592
+ 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."
20593
+ });
20594
+ var trafficCommand = presetCommand({
20595
+ name: "traffic",
20596
+ preset: "traffic",
20597
+ description: "Where visitors come from \u2014 trend, sources, campaigns, countries and devices."
20598
+ });
20599
+ var funnelCommand = presetCommand({
20600
+ name: "funnel",
20601
+ preset: "funnel",
20602
+ description: "Per-step drop-off for the company's Forms. Narrow to one with --flow.",
20603
+ extraArgs: { flow: { type: "string", description: "Form slug (default: every Form)", required: false } },
20604
+ resolve: (args) => ({ preset: "funnel", flowSlug: args.flow ? String(args.flow) : void 0 })
20605
+ });
20606
+ var flowCommand = presetCommand({
20607
+ name: "flow",
20608
+ preset: "flow",
20609
+ description: "One Form in depth: how many people it converted, where they went between steps, the per-step table, and every trigger it raised. Read `flowSummary.convertedSessions`, not `submits` \u2014 a Form that books a call on a scheduling node in the MIDDLE of the flow never emits a submit, so it reports zero submits and every one of its real bookings as conversions. `flowPaths` is the flow as edges between steps, bracketed by __flow_start__, __flow_converted__ and __flow_exit__, which is how a branching Form is read at all: a per-step table cannot say that of the people who left step two, forty went to the booking branch and ninety went nowhere.",
20610
+ extraArgs: { flow: { type: "string", description: "Form slug (default: every Form)", required: false } },
20611
+ resolve: (args) => ({ preset: "flow", flowSlug: args.flow ? String(args.flow) : void 0 })
20612
+ });
20613
+ var pageCommand = presetCommand({
20614
+ name: "page",
20615
+ preset: "page",
20616
+ description: "One page in detail \u2014 its traffic, entrances, engagement and conversion rate.",
20617
+ extraArgs: { path: { type: "string", description: "Page path, e.g. /pricing (no trailing slash)", required: true } },
20618
+ resolve: (args) => args.path ? { preset: "page", path: String(args.path) } : {
20619
+ error: "Provide --path, e.g. --path /pricing. Run `baker analytics overview` to see which paths have traffic."
20620
+ }
20621
+ });
20622
+ var triggersCommand = presetCommand({
20623
+ name: "triggers",
20624
+ preset: "triggers",
20625
+ description: "What visitors actually do inside a Form \u2014 link clicks that send them off the site, scheduling widgets, embedded checkouts \u2014 and how much of it fires a side effect. Narrow to one Form with --flow.",
20626
+ extraArgs: { flow: { type: "string", description: "Form slug (default: every Form)", required: false } },
20627
+ resolve: (args) => ({ preset: "triggers", flowSlug: args.flow ? String(args.flow) : void 0 })
20628
+ });
20629
+ var releasesCommand = presetCommand({
20630
+ name: "releases",
20631
+ preset: "releases",
20632
+ description: "Traffic and conversions per published build, newest first. Use it to tell whether a change to a page moved the numbers, instead of guessing from the date."
20633
+ });
20634
+ var paidCommand = presetCommand({
20635
+ name: "paid",
20636
+ preset: "paid",
20637
+ description: "Paid campaigns, counted per visit rather than per page view, with the click ids that resolve to a real ad click \u2014 and how many of those leads were actually delivered. A campaign whose forms all submit while the CRM rejects every one of them reads as perfect everywhere else and as zero delivered here."
20638
+ });
20639
+ var deliveryCommand = presetCommand({
20640
+ name: "delivery",
20641
+ preset: "delivery",
20642
+ description: "Where each submission went: every destination it reached, whether that destination accepted it, and the id it gave the record it created. Failures first; --full lists every submission. Start here when someone says a lead never arrived."
20643
+ });
20644
+ var geoCommand = presetCommand({
20645
+ name: "geo",
20646
+ preset: "geo",
20647
+ description: "Where the people who convert actually are. Country by default; --grain city|postal_code|metro_code goes finer, and --country narrows first so postcodes do not collide across markets. Use this when the campaign is local \u2014 a radius around a branch is a set of postcodes, never a set of countries.",
20648
+ extraArgs: {
20649
+ grain: {
20650
+ type: "string",
20651
+ description: "country (default) | region | city | postal_code | metro_code",
20652
+ required: false
20653
+ },
20654
+ country: { type: "string", description: "Two-letter code to look inside, e.g. ES", required: false }
20655
+ },
20656
+ resolve: (args) => ({
20657
+ preset: "geo",
20658
+ grain: args.grain ? String(args.grain) : void 0,
20659
+ country: args.country ? String(args.country) : void 0
20660
+ })
20661
+ });
20662
+ var botsCommand = presetCommand({
20663
+ name: "bots",
20664
+ preset: "bots",
20665
+ description: "Which machines are fetching this site \u2014 search crawlers, AI answer engines, link-preview scrapers, SEO tools \u2014 and whether each one is genuine or only claims to be. Every other report excludes these; this is the one that reads them. Use it to check that a republished page is still being crawled, or that Meta fetched a link preview before spend goes behind the URL."
20666
+ });
20667
+ var landingsCommand = presetCommand({
20668
+ name: "landings",
20669
+ preset: "landings",
20670
+ description: "Every landing side by side \u2014 views, entrances, conversion rate and a sparkline each, under the name a person gave it rather than its id. This is the one that answers 'which of my pages is working' without having to know the answer first; `page` answers one page in depth once this has named it. Narrow to a campaign with --tag.",
20671
+ extraArgs: {
20672
+ tag: { type: "string", description: "Only landings filed under this tag", required: false }
20673
+ },
20674
+ resolve: (args) => ({ preset: "landings", tag: args.tag ? String(args.tag) : void 0 })
20675
+ });
20676
+ var tagsCommand2 = presetCommand({
20677
+ name: "tags",
20678
+ preset: "tags",
20679
+ description: "The same numbers grouped by the tag a landing is filed under \u2014 the unit a campaign is actually run at. Nobody asks how /pricing-b did; they ask how the September push did, and September was six landings. Tags are declared in each landing's _definition.md."
20680
+ });
20681
+ var eventsCommand = presetCommand({
20682
+ name: "events",
20683
+ preset: "events",
20684
+ description: "Events the pages define for themselves \u2014 a section scrolled into view, a video played, a button clicked. Lists each one with the property keys it carries, so you can then break it down: --event video --property milestone. Pass --steps a,b,c for an ORDERED funnel over them, where a session only counts at each step if it got there after the one before.",
20685
+ extraArgs: {
20686
+ event: { type: "string", description: "Break this one event down (needs --property too)", required: false },
20687
+ property: { type: "string", description: "Which of that event's property keys to group by", required: false },
20688
+ where: {
20689
+ type: "string",
20690
+ description: "Narrow to one property value before grouping, as key=value \u2014 e.g. --event vsl --property milestone --where autoplay=0 for the retention curve of the videos visitors chose to play, rather than the one a muted hero produces on its own",
20691
+ required: false
20692
+ },
20693
+ steps: {
20694
+ type: "string",
20695
+ description: "Comma-separated event names, in order, for a funnel \u2014 e.g. hero_view,pricing_view,demo_click",
20696
+ required: false
20697
+ }
20698
+ },
20699
+ resolve: (args) => {
20700
+ const steps = args.steps ? String(args.steps).split(",").map((step) => step.trim()).filter((step) => step !== "") : void 0;
20701
+ if (args.property && !args.event) {
20702
+ return {
20703
+ error: "Breaking an event down by a property needs --event too, e.g. --event video --property milestone"
20704
+ };
20705
+ }
20706
+ if (steps && steps.length < 2) {
20707
+ return { error: "A funnel needs at least two steps, e.g. --steps hero_view,pricing_view" };
20708
+ }
20709
+ let where;
20710
+ if (args.where) {
20711
+ const raw = String(args.where);
20712
+ const at = raw.indexOf("=");
20713
+ if (at < 1) {
20714
+ return { error: "--where takes key=value, e.g. --where autoplay=0" };
20715
+ }
20716
+ if (!args.property) {
20717
+ return { error: "--where narrows a breakdown, so it needs --event and --property too" };
20718
+ }
20719
+ where = { property: raw.slice(0, at), value: raw.slice(at + 1) };
20720
+ }
20721
+ return {
20722
+ preset: "events",
20723
+ eventName: args.event ? String(args.event) : void 0,
20724
+ property: args.property ? String(args.property) : void 0,
20725
+ where,
20726
+ steps
20727
+ };
20728
+ }
20729
+ });
20730
+ var devicesCommand = presetCommand({
20731
+ name: "devices",
20732
+ preset: "devices",
20733
+ description: "What visitors are actually using, narrow enough to reproduce a bug on: browser and version, OS and version, rendering engine, or viewport width. `traffic` says mobile converts worse; this says it is Safari 17 on viewports under 380px, which is a browser you can open and a width you can resize to.",
20734
+ extraArgs: {
20735
+ grain: {
20736
+ type: "string",
20737
+ description: "browser (default) | os | engine | device | viewport",
20738
+ required: false
20739
+ }
20740
+ },
20741
+ resolve: (args) => ({
20742
+ preset: "devices",
20743
+ deviceGrain: args.grain ? String(args.grain) : void 0
20744
+ })
20745
+ });
20746
+ var presetsCommand = defineCommand87({
20747
+ meta: { name: "presets", description: "List the available reports and what each answers." },
20748
+ run: () => {
20749
+ writeJsonEnvelope({ ok: true, data: ANALYTICS_PRESET_INFO });
20750
+ }
20751
+ });
20752
+ var adsCommand3 = presetCommand({
20753
+ name: "ads",
20754
+ preset: "ads",
20755
+ description: "What the ad platforms told us about each click, and what those people then did. `--role keyword` breaks the window down by keyword with conversions AND bounced visits beside each one \u2014 the ad platform can tell you a keyword got clicks, only this can tell you the people it brought left immediately. `adParams` comes back either way: it is every campaign parameter arriving on this company's URLs, whether we can read it or not. A parameter with no `role` is one nobody has told us the meaning of, and until somebody does its values are not stored at all \u2014 only the fact that the name appeared. Map it with `baker analytics map`.",
20756
+ extraArgs: {}
20757
+ });
20758
+ var mapCommand = (() => {
20759
+ const args = {
20760
+ set: {
20761
+ type: "string",
20762
+ description: "Parameter=role pairs, comma separated: --set kw=keyword,mt=match_type. Roles come from `baker analytics ads` (every row lists the role in force). Use the role `other` for a parameter worth capturing that means nothing to us \u2014 it is then stored and filterable by its own name, which is better than not stored at all",
20763
+ required: false
20764
+ },
20765
+ remove: {
20766
+ type: "string",
20767
+ description: "Parameter names to stop reading, comma separated. Only affects this company's own entries",
20768
+ required: false
20769
+ }
20770
+ };
20771
+ registerSchema({
20772
+ command: "analytics.map",
20773
+ description: "Set how this company's campaign URLs spell each ad dimension",
20774
+ args
20775
+ });
20776
+ return defineCommand87({
20777
+ meta: {
20778
+ name: "map",
20779
+ description: "Teach Baker how this company's campaign URLs spell each ad dimension \u2014 `--set kw=keyword`. Run it with no flags to see the mapping in force. Only needed when they tag differently from the templates we hand out; the ordinary spellings are already understood. Takes effect within seconds. Renaming a parameter Baker already captured fixes the history too, because roles are applied when a report is read; naming one it never read only starts collecting it, since no value was stored."
20780
+ },
20781
+ args,
20782
+ run: async ({ args: raw }) => {
20783
+ try {
20784
+ const body = {
20785
+ set: parsePairs(raw.set === void 0 ? void 0 : String(raw.set)),
20786
+ remove: parseList(raw.remove === void 0 ? void 0 : String(raw.remove))
20787
+ };
20788
+ const response = await apiPost("/api/analytics/mapping", body);
20789
+ writeJsonEnvelope(response);
20790
+ } catch (err) {
20791
+ handleError(err);
20792
+ }
20793
+ }
20794
+ });
20795
+ })();
20796
+ function parsePairs(raw) {
20797
+ if (raw === void 0) return void 0;
20798
+ const out = {};
20799
+ for (const pair of raw.split(",")) {
20800
+ const [name, role] = pair.split("=");
20801
+ if (name?.trim() && role?.trim()) out[name.trim()] = role.trim();
20802
+ }
20803
+ return out;
20804
+ }
20805
+ function parseList(raw) {
20806
+ if (raw === void 0) return void 0;
20807
+ const out = raw.split(",").map((entry) => entry.trim()).filter((entry) => entry !== "");
20808
+ return out.length > 0 ? out : void 0;
20809
+ }
20810
+ var analyticsCommand2 = defineCommand87({
20811
+ meta: {
20812
+ name: "analytics",
20813
+ 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.
20814
+
20815
+ Start here:
20816
+ baker analytics overview \u2014 traffic, pages, sources and Form drop-off in one call
20817
+ baker analytics landings \u2014 every page side by side, with a sparkline each
20818
+ baker analytics presets \u2014 what each report answers
20819
+
20820
+ Examples:
20821
+ baker analytics overview --days 7
20822
+ baker analytics funnel --flow contact \u2014 which step loses people
20823
+ baker analytics flow --flow contact \u2014 that Form in depth: conversions, step-to-step paths, triggers
20824
+ baker analytics overview --landing ld_7f2a \u2014 the whole report for one page only
20825
+ baker analytics page --path /pricing \u2014 one page in detail
20826
+ baker analytics triggers --flow contact \u2014 what people did in the Form, wired up or not
20827
+ baker analytics paid --days 30 \u2014 campaigns by click id, and how many leads actually arrived
20828
+ baker analytics delivery \u2014 submissions whose destination refused them
20829
+ baker analytics releases \u2014 did the last publish change anything
20830
+ baker analytics traffic --days 90 --full \u2014 full breakdowns and the per-day trend
20831
+ baker analytics geo --grain postal_code --country ES \u2014 which postcodes convert
20832
+ baker analytics bots --days 30 \u2014 is the site still being crawled
20833
+ baker analytics landings --tag q3 \u2014 how the Q3 campaign's pages did
20834
+ baker analytics tags \u2014 the same numbers rolled up per campaign
20835
+ baker analytics events --event video --property milestone \u2014 how far people watch
20836
+ baker analytics events --event video --property milestone --where autoplay=0 \u2014 ...among videos they chose to play
20837
+ baker analytics events --steps hero_view,pricing_view,demo_click \u2014 an ordered page funnel
20838
+ baker analytics devices --grain viewport \u2014 which widths the page has to survive
20839
+ baker analytics ads \u2014 every campaign parameter on this company's URLs, and what we make of it
20840
+ baker analytics ads --role keyword \u2014 keywords by conversions AND by how many bounced
20841
+ baker analytics overview --role keyword --value "solar panels" \u2014 the whole report for those visits only
20842
+ baker analytics map --set kw=keyword \u2014 teach it a parameter name this company uses
20843
+ baker analytics overview --compare \u2014 this window against the one before it
20844
+ Full guide: __tooling__/docs/tools/baker/analytics.md`
20845
+ },
20846
+ subCommands: {
20847
+ overview: overviewCommand,
20848
+ traffic: trafficCommand,
20849
+ funnel: funnelCommand,
20850
+ flow: flowCommand,
20851
+ page: pageCommand,
20852
+ triggers: triggersCommand,
20853
+ releases: releasesCommand,
20854
+ paid: paidCommand,
20855
+ delivery: deliveryCommand,
20856
+ geo: geoCommand,
20857
+ bots: botsCommand,
20858
+ landings: landingsCommand,
20859
+ tags: tagsCommand2,
20860
+ events: eventsCommand,
20861
+ devices: devicesCommand,
20862
+ ads: adsCommand3,
20863
+ map: mapCommand,
20864
+ presets: presetsCommand
20865
+ }
20866
+ });
20867
+
20347
20868
  // src/commands/avatars/index.ts
20348
- import { defineCommand as defineCommand92 } from "citty";
20869
+ import { defineCommand as defineCommand93 } from "citty";
20349
20870
 
20350
20871
  // src/commands/avatars/create.ts
20351
- import { defineCommand as defineCommand87 } from "citty";
20872
+ import { defineCommand as defineCommand88 } from "citty";
20352
20873
 
20353
20874
  // src/commands/avatars/casting.ts
20354
20875
  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 +21136,7 @@ registerSchema({
20615
21136
  "voice-description": { type: "string", description: "How the voice should sound", required: false }
20616
21137
  }
20617
21138
  });
20618
- var createCommand2 = defineCommand87({
21139
+ var createCommand2 = defineCommand88({
20619
21140
  meta: {
20620
21141
  name: "create",
20621
21142
  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 +21217,7 @@ var createCommand2 = defineCommand87({
20696
21217
  });
20697
21218
 
20698
21219
  // src/commands/avatars/delete.ts
20699
- import { defineCommand as defineCommand88 } from "citty";
21220
+ import { defineCommand as defineCommand89 } from "citty";
20700
21221
  registerSchema({
20701
21222
  command: "avatars.delete",
20702
21223
  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 +21232,7 @@ registerSchema({
20711
21232
  "dry-run": { type: "boolean", description: "Preview without removing anything", required: false, default: false }
20712
21233
  }
20713
21234
  });
20714
- var deleteCommand = defineCommand88({
21235
+ var deleteCommand = defineCommand89({
20715
21236
  meta: {
20716
21237
  name: "delete",
20717
21238
  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 +21266,7 @@ var deleteCommand = defineCommand88({
20745
21266
  });
20746
21267
 
20747
21268
  // src/commands/avatars/get.ts
20748
- import { defineCommand as defineCommand89 } from "citty";
21269
+ import { defineCommand as defineCommand90 } from "citty";
20749
21270
  registerSchema({
20750
21271
  command: "avatars.get",
20751
21272
  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 +21280,7 @@ registerSchema({
20759
21280
  }
20760
21281
  }
20761
21282
  });
20762
- var getCommand2 = defineCommand89({
21283
+ var getCommand2 = defineCommand90({
20763
21284
  meta: {
20764
21285
  name: "get",
20765
21286
  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 +21321,7 @@ var getCommand2 = defineCommand89({
20800
21321
  });
20801
21322
 
20802
21323
  // src/commands/avatars/list.ts
20803
- import { defineCommand as defineCommand90 } from "citty";
21324
+ import { defineCommand as defineCommand91 } from "citty";
20804
21325
  var STATUSES = ["generating", "ready", "error", "archived"];
20805
21326
  registerSchema({
20806
21327
  command: "avatars.list",
@@ -20815,7 +21336,7 @@ registerSchema({
20815
21336
  limit: { type: "number", description: "Max avatars to return (1-100)", required: false }
20816
21337
  }
20817
21338
  });
20818
- var listCommand10 = defineCommand90({
21339
+ var listCommand10 = defineCommand91({
20819
21340
  meta: {
20820
21341
  name: "list",
20821
21342
  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 +21370,7 @@ var listCommand10 = defineCommand90({
20849
21370
  });
20850
21371
 
20851
21372
  // src/commands/avatars/update.ts
20852
- import { defineCommand as defineCommand91 } from "citty";
21373
+ import { defineCommand as defineCommand92 } from "citty";
20853
21374
  function readUpdateArgs(args) {
20854
21375
  const handle = (args.handle || args["avatar-handle"])?.trim();
20855
21376
  if (!handle) {
@@ -20910,7 +21431,7 @@ registerSchema({
20910
21431
  }
20911
21432
  }
20912
21433
  });
20913
- var updateCommand2 = defineCommand91({
21434
+ var updateCommand2 = defineCommand92({
20914
21435
  meta: {
20915
21436
  name: "update",
20916
21437
  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 +21494,7 @@ var updateCommand2 = defineCommand91({
20973
21494
  });
20974
21495
 
20975
21496
  // src/commands/avatars/index.ts
20976
- var avatarsCommand = defineCommand92({
21497
+ var avatarsCommand = defineCommand93({
20977
21498
  meta: {
20978
21499
  name: "avatars",
20979
21500
  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 +21524,12 @@ Full guide: __tooling__/docs/tools/baker/avatars.md`
21003
21524
  });
21004
21525
 
21005
21526
  // src/commands/brand/index.ts
21006
- import { defineCommand as defineCommand94 } from "citty";
21527
+ import { defineCommand as defineCommand95 } from "citty";
21007
21528
 
21008
21529
  // src/commands/brand/fonts.ts
21009
21530
  import { mkdir, readdir, readFile as readFile2, writeFile } from "fs/promises";
21010
21531
  import path2 from "path";
21011
- import { defineCommand as defineCommand93 } from "citty";
21532
+ import { defineCommand as defineCommand94 } from "citty";
21012
21533
 
21013
21534
  // src/engine/brand/fonts.ts
21014
21535
  import { posix } from "path";
@@ -21852,7 +22373,7 @@ async function unresolvedAction(css, unresolved) {
21852
22373
  }
21853
22374
  return `Run \`baker brand fonts fetch "${unresolved[0]}"\` to self-host it, which writes the @font-face for you. For a face no catalogue carries, add an @font-face pointing at a file in ${FONTS_DIR}.`;
21854
22375
  }
21855
- var fontsCheckCommand = defineCommand93({
22376
+ var fontsCheckCommand = defineCommand94({
21856
22377
  meta: {
21857
22378
  name: "check",
21858
22379
  description: "Verify the brand's fonts really exist. First: every --font-* family in src/styles/global.css must be provided by a local @font-face, or it renders as a fallback on every page \u2014 a Google @import does not provide one here, the build drops it before the page loads. Then, for families still requested from Google, ask Google what it actually serves \u2014 a weight nobody serves is silently synthesized."
@@ -21904,7 +22425,7 @@ var fontsCheckCommand = defineCommand93({
21904
22425
  });
21905
22426
  }
21906
22427
  });
21907
- var fontsFetchCommand = defineCommand93({
22428
+ var fontsFetchCommand = defineCommand94({
21908
22429
  meta: {
21909
22430
  name: "fetch",
21910
22431
  description: "Download a font from Google Fonts or Fontsource into src/brand/fonts/ and write its @font-face into src/styles/global.css above @theme, so the family actually loads. Use when a brand font should be self-hosted rather than requested from a third party on every page load."
@@ -22005,7 +22526,7 @@ async function astroSources() {
22005
22526
  }
22006
22527
  return out;
22007
22528
  }
22008
- var fontsAdoptCommand = defineCommand93({
22529
+ var fontsAdoptCommand = defineCommand94({
22009
22530
  meta: {
22010
22531
  name: "adopt",
22011
22532
  description: "Move brand faces a page already self-hosts into src/styles/global.css, so every page loads them instead of just that one. Use when `check` reports a family as not loaded but the font files are already in src/brand/fonts/ \u2014 downloading it again would hand that page a different build of the same face."
@@ -22085,7 +22606,7 @@ var fontsAdoptCommand = defineCommand93({
22085
22606
  });
22086
22607
  }
22087
22608
  });
22088
- var fontsCommand = defineCommand93({
22609
+ var fontsCommand = defineCommand94({
22089
22610
  meta: {
22090
22611
  name: "fonts",
22091
22612
  description: `Verify and self-host the brand's typefaces.
@@ -22105,7 +22626,7 @@ Subcommands:
22105
22626
  });
22106
22627
 
22107
22628
  // src/commands/brand/index.ts
22108
- var brandCommand = defineCommand94({
22629
+ var brandCommand = defineCommand95({
22109
22630
  meta: {
22110
22631
  name: "brand",
22111
22632
  description: `Brand asset verification for src/brand/.
@@ -22121,11 +22642,11 @@ Subcommands:
22121
22642
  });
22122
22643
 
22123
22644
  // src/commands/canvas/index.ts
22124
- import { defineCommand as defineCommand105 } from "citty";
22645
+ import { defineCommand as defineCommand106 } from "citty";
22125
22646
 
22126
22647
  // src/commands/canvas/catalog.ts
22127
- import { defineCommand as defineCommand95 } from "citty";
22128
- var catalogCommand = defineCommand95({
22648
+ import { defineCommand as defineCommand96 } from "citty";
22649
+ var catalogCommand = defineCommand96({
22129
22650
  meta: {
22130
22651
  name: "catalog",
22131
22652
  description: "Print the agent-facing node catalog (JSON Schema). Includes every registered node grouped by category."
@@ -22140,7 +22661,7 @@ var catalogCommand = defineCommand95({
22140
22661
  // src/commands/canvas/critique.ts
22141
22662
  import { readFile as readFile3 } from "fs/promises";
22142
22663
  import path3 from "path";
22143
- import { defineCommand as defineCommand96 } from "citty";
22664
+ import { defineCommand as defineCommand97 } from "citty";
22144
22665
 
22145
22666
  // src/engine/scaffold/lib/critique.ts
22146
22667
  var VIBE_CUE = /\b(light|lighting|golden|moody|warm|cool|tone|grade|contrast|shadow|glow|rim|backlit|neon|soft)\b/i;
@@ -22260,7 +22781,7 @@ function critiqueCanvas(canvas) {
22260
22781
  }
22261
22782
 
22262
22783
  // src/commands/canvas/critique.ts
22263
- var critiqueCommand = defineCommand96({
22784
+ var critiqueCommand = defineCommand97({
22264
22785
  meta: {
22265
22786
  name: "critique",
22266
22787
  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."
@@ -22302,9 +22823,9 @@ import { execFile } from "child_process";
22302
22823
  import { readdir as readdir2, readFile as readFile4, stat } from "fs/promises";
22303
22824
  import path4 from "path";
22304
22825
  import { promisify } from "util";
22305
- import { defineCommand as defineCommand97 } from "citty";
22826
+ import { defineCommand as defineCommand98 } from "citty";
22306
22827
  var execFileAsync = promisify(execFile);
22307
- var inspectCommand = defineCommand97({
22828
+ var inspectCommand = defineCommand98({
22308
22829
  meta: {
22309
22830
  name: "inspect",
22310
22831
  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."
@@ -22412,12 +22933,12 @@ async function probeDuration(filePath) {
22412
22933
 
22413
22934
  // src/commands/canvas/rerun.ts
22414
22935
  import path16 from "path";
22415
- import { defineCommand as defineCommand99 } from "citty";
22936
+ import { defineCommand as defineCommand100 } from "citty";
22416
22937
 
22417
22938
  // src/commands/canvas/run.ts
22418
22939
  import { readFile as readFile11 } from "fs/promises";
22419
22940
  import path15 from "path";
22420
- import { defineCommand as defineCommand98 } from "citty";
22941
+ import { defineCommand as defineCommand99 } from "citty";
22421
22942
 
22422
22943
  // src/commands/canvas/normalize-paths.ts
22423
22944
  import { existsSync as existsSync3, realpathSync } from "fs";
@@ -26668,7 +27189,7 @@ async function restoreRunSnapshot(manifest, targetDir, opts = {}) {
26668
27189
  }
26669
27190
 
26670
27191
  // src/commands/canvas/run.ts
26671
- var runCommand = defineCommand98({
27192
+ var runCommand = defineCommand99({
26672
27193
  meta: { name: "run", description: "Validate and execute a canvas JSON file." },
26673
27194
  args: {
26674
27195
  file: { type: "positional", required: true, description: "Path to canvas JSON" },
@@ -27048,7 +27569,7 @@ async function postInitialRunRecord(client, payload) {
27048
27569
 
27049
27570
  // src/commands/canvas/rerun.ts
27050
27571
  var SLUG_PATTERN = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
27051
- var rerunCommand = defineCommand99({
27572
+ var rerunCommand = defineCommand100({
27052
27573
  meta: {
27053
27574
  name: "rerun",
27054
27575
  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."
@@ -27145,7 +27666,7 @@ async function fetchManifest(url) {
27145
27666
  // src/commands/canvas/scaffold-static-ad.ts
27146
27667
  import { access, mkdir as mkdir6, readFile as readFile13, writeFile as writeFile8 } from "fs/promises";
27147
27668
  import path20 from "path";
27148
- import { defineCommand as defineCommand101 } from "citty";
27669
+ import { defineCommand as defineCommand102 } from "citty";
27149
27670
 
27150
27671
  // src/engine/scaffold/staticAd.ts
27151
27672
  import { z as z26 } from "zod";
@@ -27495,7 +28016,7 @@ function isValidScaffoldSlug(slug) {
27495
28016
  // src/commands/canvas/sync-definition.ts
27496
28017
  import { readdir as readdir6, readFile as readFile12, stat as stat3 } from "fs/promises";
27497
28018
  import path19 from "path";
27498
- import { defineCommand as defineCommand100 } from "citty";
28019
+ import { defineCommand as defineCommand101 } from "citty";
27499
28020
 
27500
28021
  // src/commands/canvas/definition-graph.ts
27501
28022
  var MAX_NODES = 300;
@@ -27608,7 +28129,7 @@ async function resolveCanvasPath(inputPath) {
27608
28129
  const chosen = (slug ? canvases.find((name) => name === `${slug}.canvas.json`) : void 0) ?? canvases[0];
27609
28130
  return chosen ? path19.join(dir, chosen) : null;
27610
28131
  }
27611
- var syncDefinitionCommand = defineCommand100({
28132
+ var syncDefinitionCommand = defineCommand101({
27612
28133
  meta: {
27613
28134
  name: "sync-definition",
27614
28135
  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."
@@ -27838,7 +28359,7 @@ async function runVisionPasses(canvas) {
27838
28359
  return fail3("read_outputs", e instanceof Error ? e.message : String(e));
27839
28360
  }
27840
28361
  }
27841
- var scaffoldStaticAdCommand = defineCommand101({
28362
+ var scaffoldStaticAdCommand = defineCommand102({
27842
28363
  meta: {
27843
28364
  name: "scaffold-static-ad",
27844
28365
  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."
@@ -28027,7 +28548,7 @@ var scaffoldStaticAdCommand = defineCommand101({
28027
28548
  import { access as access2, cp, mkdir as mkdir7, readFile as readFile16, rm as rm6, writeFile as writeFile9 } from "fs/promises";
28028
28549
  import { tmpdir as tmpdir2 } from "os";
28029
28550
  import path23 from "path";
28030
- import { defineCommand as defineCommand102 } from "citty";
28551
+ import { defineCommand as defineCommand103 } from "citty";
28031
28552
 
28032
28553
  // src/engine/scaffold/lib/model-router.ts
28033
28554
  var SEEDANCE = "bytedance/seedance-2.0";
@@ -28488,7 +29009,7 @@ async function runAnalysisPasses(deconstructCanvas, selectModel) {
28488
29009
  return fail4("deconstruct", e instanceof Error ? e.message : String(e));
28489
29010
  }
28490
29011
  }
28491
- var scaffoldVideoCommand = defineCommand102({
29012
+ var scaffoldVideoCommand = defineCommand103({
28492
29013
  meta: {
28493
29014
  name: "scaffold-video",
28494
29015
  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`."
@@ -28798,7 +29319,7 @@ var scaffoldVideoCommand = defineCommand102({
28798
29319
  // src/commands/canvas/set-prompt.ts
28799
29320
  import { readFile as readFile17, writeFile as writeFile10 } from "fs/promises";
28800
29321
  import path24 from "path";
28801
- import { defineCommand as defineCommand103 } from "citty";
29322
+ import { defineCommand as defineCommand104 } from "citty";
28802
29323
  function setNodePrompt(canvas, nodeId, text2) {
28803
29324
  const nodes = canvas?.nodes;
28804
29325
  if (!Array.isArray(nodes)) throw new Error("canvas has no nodes array");
@@ -28813,7 +29334,7 @@ function setNodePrompt(canvas, nodeId, text2) {
28813
29334
  newNodes[idx] = newNode;
28814
29335
  return { ...canvas, nodes: newNodes };
28815
29336
  }
28816
- var setPromptCommand = defineCommand103({
29337
+ var setPromptCommand = defineCommand104({
28817
29338
  meta: {
28818
29339
  name: "set-prompt",
28819
29340
  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."
@@ -28873,8 +29394,8 @@ var setPromptCommand = defineCommand103({
28873
29394
  // src/commands/canvas/validate.ts
28874
29395
  import { readFile as readFile18 } from "fs/promises";
28875
29396
  import path25 from "path";
28876
- import { defineCommand as defineCommand104 } from "citty";
28877
- var validateCommand = defineCommand104({
29397
+ import { defineCommand as defineCommand105 } from "citty";
29398
+ var validateCommand = defineCommand105({
28878
29399
  meta: {
28879
29400
  name: "validate",
28880
29401
  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)."
@@ -28947,7 +29468,7 @@ var validateCommand = defineCommand104({
28947
29468
  });
28948
29469
 
28949
29470
  // src/commands/canvas/index.ts
28950
- var canvasCommand = defineCommand105({
29471
+ var canvasCommand = defineCommand106({
28951
29472
  meta: {
28952
29473
  name: "canvas",
28953
29474
  description: `Run Baker creative canvas JSON files locally. Local nodes execute in-process; remote nodes POST to the Convex backend gateway.
@@ -28981,7 +29502,7 @@ Full guide: __tooling__/docs/tools/baker/canvas.md`
28981
29502
  });
28982
29503
 
28983
29504
  // src/commands/capabilities/index.ts
28984
- import { defineCommand as defineCommand106 } from "citty";
29505
+ import { defineCommand as defineCommand107 } from "citty";
28985
29506
  registerSchema({
28986
29507
  command: "capabilities",
28987
29508
  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.",
@@ -29024,7 +29545,7 @@ function capabilityHints(surfaces) {
29024
29545
  }
29025
29546
  return hints;
29026
29547
  }
29027
- var runCapabilities = defineCommand106({
29548
+ var runCapabilities = defineCommand107({
29028
29549
  meta: {
29029
29550
  name: "capabilities",
29030
29551
  description: `What Baker can and cannot do for this company, before any work starts.
@@ -29080,7 +29601,7 @@ Full guide: __tooling__/docs/tools/baker/capabilities.md`
29080
29601
  var capabilitiesCommand = runCapabilities;
29081
29602
 
29082
29603
  // src/commands/chats/index.ts
29083
- import { defineCommand as defineCommand107 } from "citty";
29604
+ import { defineCommand as defineCommand108 } from "citty";
29084
29605
  var STATUS_GROUPS = ["active", "archived", "all"];
29085
29606
  var REPO_SURFACES = ["knowledge", "company", "brand", "landings", "flows", "creatives"];
29086
29607
  function parseBoundedInt(raw, name, min, max) {
@@ -29102,7 +29623,7 @@ registerSchema({
29102
29623
  full: { type: "boolean", description: "Include each Session's full change list", required: false, default: false }
29103
29624
  }
29104
29625
  });
29105
- var listCommand11 = defineCommand107({
29626
+ var listCommand11 = defineCommand108({
29106
29627
  meta: { name: "list", description: "List other Sessions on this account, newest first." },
29107
29628
  args: {
29108
29629
  status: { type: "string", description: "Filter: active|archived|all (default: all)", required: false },
@@ -29157,7 +29678,7 @@ registerSchema({
29157
29678
  }
29158
29679
  }
29159
29680
  });
29160
- var viewCommand = defineCommand107({
29681
+ var viewCommand = defineCommand108({
29161
29682
  meta: {
29162
29683
  name: "view",
29163
29684
  description: "Inspect one Session's full effects \u2014 git content + actions/tags/ads, kickoff, commits."
@@ -29201,7 +29722,7 @@ registerSchema({
29201
29722
  }
29202
29723
  }
29203
29724
  });
29204
- var transcriptCommand = defineCommand107({
29725
+ var transcriptCommand = defineCommand108({
29205
29726
  meta: { name: "transcript", description: "Read another Session's conversation." },
29206
29727
  args: {
29207
29728
  id: { type: "positional", description: "The Session id", required: true },
@@ -29253,7 +29774,7 @@ registerSchema({
29253
29774
  }
29254
29775
  }
29255
29776
  });
29256
- var diffCommand = defineCommand107({
29777
+ var diffCommand = defineCommand108({
29257
29778
  meta: { name: "diff", description: "See a published Session's real file-level changes." },
29258
29779
  args: {
29259
29780
  id: { type: "positional", description: "The Session id", required: true },
@@ -29297,7 +29818,7 @@ var diffCommand = defineCommand107({
29297
29818
  }
29298
29819
  }
29299
29820
  });
29300
- var chatsCommand = defineCommand107({
29821
+ var chatsCommand = defineCommand108({
29301
29822
  meta: {
29302
29823
  name: "chats",
29303
29824
  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.
@@ -29312,10 +29833,10 @@ Full guide: __tooling__/docs/tools/baker/chats.md`
29312
29833
  });
29313
29834
 
29314
29835
  // src/commands/creatives/index.ts
29315
- import { defineCommand as defineCommand109 } from "citty";
29836
+ import { defineCommand as defineCommand110 } from "citty";
29316
29837
 
29317
29838
  // src/commands/creatives/publish.ts
29318
- import { defineCommand as defineCommand108 } from "citty";
29839
+ import { defineCommand as defineCommand109 } from "citty";
29319
29840
 
29320
29841
  // src/commands/images/api.ts
29321
29842
  import { readFile as readFile19 } from "fs/promises";
@@ -29462,7 +29983,7 @@ async function publishCreative(args, deps = defaultImageApiDeps) {
29462
29983
  chatId: chatIdFromEnv2()
29463
29984
  });
29464
29985
  }
29465
- var publishCommand = defineCommand108({
29986
+ var publishCommand = defineCommand109({
29466
29987
  meta: {
29467
29988
  name: "publish",
29468
29989
  description: "Publish a final static creative image to Baker Creatives and print the creative reference JSON."
@@ -29520,7 +30041,7 @@ var publishCommand = defineCommand108({
29520
30041
  });
29521
30042
 
29522
30043
  // src/commands/creatives/index.ts
29523
- var creativesCommand3 = defineCommand109({
30044
+ var creativesCommand3 = defineCommand110({
29524
30045
  meta: {
29525
30046
  name: "creatives",
29526
30047
  description: `Publish static ad creatives as first-class Baker outputs.
@@ -29537,7 +30058,7 @@ Full guide: __tooling__/docs/tools/baker/creatives.md`
29537
30058
  });
29538
30059
 
29539
30060
  // src/commands/flows/index.ts
29540
- import { defineCommand as defineCommand110 } from "citty";
30061
+ import { defineCommand as defineCommand111 } from "citty";
29541
30062
 
29542
30063
  // src/commands/flows/shared.ts
29543
30064
  import { existsSync as existsSync5, readdirSync as readdirSync2, readFileSync as readFileSync9 } from "fs";
@@ -29692,7 +30213,7 @@ function displayName(slug) {
29692
30213
  const name = tree.displayName;
29693
30214
  return typeof name === "string" && name.trim() ? name.trim() : slug;
29694
30215
  }
29695
- var listCommand12 = defineCommand110({
30216
+ var listCommand12 = defineCommand111({
29696
30217
  meta: {
29697
30218
  name: "list",
29698
30219
  description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
@@ -29706,7 +30227,7 @@ var listCommand12 = defineCommand110({
29706
30227
  writeJson({ ok: true, data: { flows } });
29707
30228
  }
29708
30229
  });
29709
- var showCommand3 = defineCommand110({
30230
+ var showCommand3 = defineCommand111({
29710
30231
  meta: {
29711
30232
  name: "show",
29712
30233
  description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
@@ -29727,7 +30248,7 @@ var showCommand3 = defineCommand110({
29727
30248
  writeJson({ ok: true, data: response });
29728
30249
  }
29729
30250
  });
29730
- var flowsCommand = defineCommand110({
30251
+ var flowsCommand = defineCommand111({
29731
30252
  meta: {
29732
30253
  name: "flows",
29733
30254
  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).
@@ -29751,10 +30272,10 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
29751
30272
  });
29752
30273
 
29753
30274
  // src/commands/ga4/index.ts
29754
- import { defineCommand as defineCommand117 } from "citty";
30275
+ import { defineCommand as defineCommand118 } from "citty";
29755
30276
 
29756
30277
  // src/commands/ga4/audit.ts
29757
- import { defineCommand as defineCommand111 } from "citty";
30278
+ import { defineCommand as defineCommand112 } from "citty";
29758
30279
 
29759
30280
  // src/commands/ga4/resolve.ts
29760
30281
  async function fetchProperties(useCache = true) {
@@ -29820,7 +30341,7 @@ registerSchema({
29820
30341
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
29821
30342
  }
29822
30343
  });
29823
- var auditCommand2 = defineCommand111({
30344
+ var auditCommand2 = defineCommand112({
29824
30345
  meta: {
29825
30346
  name: "audit",
29826
30347
  description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
@@ -29875,7 +30396,7 @@ Examples:
29875
30396
  });
29876
30397
 
29877
30398
  // src/commands/ga4/config.ts
29878
- import { defineCommand as defineCommand112 } from "citty";
30399
+ import { defineCommand as defineCommand113 } from "citty";
29879
30400
 
29880
30401
  // src/commands/ga4/shared.ts
29881
30402
  import { readFileSync as readFileSync10 } from "fs";
@@ -29926,7 +30447,7 @@ function loadJsonPayloads(args) {
29926
30447
  return parsed.map((entry, index) => asObject(entry, "json", index));
29927
30448
  }
29928
30449
  var RETRYABLE_CODES = /* @__PURE__ */ new Set(["RATE_LIMITED", "INTERNAL_ERROR", "NETWORK_ERROR", "TIMEOUT"]);
29929
- function handleError(err) {
30450
+ function handleError2(err) {
29930
30451
  if (err instanceof ApiError) {
29931
30452
  const readOnly = err.code === "FORBIDDEN" && /read the property but not change it/i.test(err.message);
29932
30453
  writeJsonEnvelope({
@@ -29967,7 +30488,7 @@ async function stageOp3(op) {
29967
30488
  hints: [...STAGE_HINTS, ...data.warnings.length > 0 ? [WARNING_HINT] : []]
29968
30489
  });
29969
30490
  } catch (err) {
29970
- handleError(err);
30491
+ handleError2(err);
29971
30492
  }
29972
30493
  }
29973
30494
  async function stageOps(ops) {
@@ -29985,7 +30506,7 @@ async function stageOps(ops) {
29985
30506
  hints: [...STAGE_HINTS, ...data.ops.some((op) => op.warnings.length > 0) ? [WARNING_HINT] : []]
29986
30507
  });
29987
30508
  } catch (err) {
29988
- handleError(err);
30509
+ handleError2(err);
29989
30510
  }
29990
30511
  }
29991
30512
  async function draftAction2(path39, body, chat) {
@@ -29995,7 +30516,7 @@ async function draftAction2(path39, body, chat) {
29995
30516
  writeJsonEnvelope({ ok: true, data });
29996
30517
  return data;
29997
30518
  } catch (err) {
29998
- handleError(err);
30519
+ handleError2(err);
29999
30520
  }
30000
30521
  }
30001
30522
  function renderDraft(response) {
@@ -30032,7 +30553,7 @@ async function draftList(json, chat) {
30032
30553
  process.stdout.write(`${renderDraft(data)}
30033
30554
  `);
30034
30555
  } catch (err) {
30035
- handleError(err);
30556
+ handleError2(err);
30036
30557
  }
30037
30558
  }
30038
30559
 
@@ -30067,7 +30588,7 @@ function configHints(config) {
30067
30588
  }
30068
30589
  return hints;
30069
30590
  }
30070
- var configCommand = defineCommand112({
30591
+ var configCommand = defineCommand113({
30071
30592
  meta: {
30072
30593
  name: "config",
30073
30594
  description: `Read how the property is configured to measure \u2014 key events, custom definitions, custom events, retention
@@ -30089,13 +30610,13 @@ Examples:
30089
30610
  });
30090
30611
  writeJsonEnvelope({ ok: true, data, hints: configHints(data) });
30091
30612
  } catch (err) {
30092
- handleError(err);
30613
+ handleError2(err);
30093
30614
  }
30094
30615
  }
30095
30616
  });
30096
30617
 
30097
30618
  // src/commands/ga4/draft.ts
30098
- import { defineCommand as defineCommand113 } from "citty";
30619
+ import { defineCommand as defineCommand114 } from "citty";
30099
30620
  registerSchema({
30100
30621
  command: "ga4.draft",
30101
30622
  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.",
@@ -30104,13 +30625,13 @@ registerSchema({
30104
30625
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
30105
30626
  }
30106
30627
  });
30107
- var draftCommand3 = defineCommand113({
30628
+ var draftCommand3 = defineCommand114({
30108
30629
  meta: {
30109
30630
  name: "draft",
30110
30631
  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."
30111
30632
  },
30112
30633
  subCommands: {
30113
- list: defineCommand113({
30634
+ list: defineCommand114({
30114
30635
  meta: { name: "list", description: "Review everything staged on this chat (--json for the raw envelope)" },
30115
30636
  args: {
30116
30637
  json: { type: "boolean", description: "Print the raw JSON envelope", required: false },
@@ -30120,7 +30641,7 @@ var draftCommand3 = defineCommand113({
30120
30641
  await draftList(args.json === true, args.chat);
30121
30642
  }
30122
30643
  }),
30123
- show: defineCommand113({
30644
+ show: defineCommand114({
30124
30645
  meta: {
30125
30646
  name: "show",
30126
30647
  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)."
@@ -30137,7 +30658,7 @@ var draftCommand3 = defineCommand113({
30137
30658
  );
30138
30659
  }
30139
30660
  }),
30140
- amend: defineCommand113({
30661
+ amend: defineCommand114({
30141
30662
  meta: {
30142
30663
  name: "amend",
30143
30664
  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."
@@ -30154,7 +30675,7 @@ var draftCommand3 = defineCommand113({
30154
30675
  });
30155
30676
  }
30156
30677
  }),
30157
- remove: defineCommand113({
30678
+ remove: defineCommand114({
30158
30679
  meta: { name: "remove", description: "Remove one staged change" },
30159
30680
  args: { ref: { type: "positional", description: "Staged ref or target id", required: false } },
30160
30681
  run: async ({ args }) => {
@@ -30163,7 +30684,7 @@ var draftCommand3 = defineCommand113({
30163
30684
  });
30164
30685
  }
30165
30686
  }),
30166
- clear: defineCommand113({
30687
+ clear: defineCommand114({
30167
30688
  meta: { name: "clear", description: "Discard all Google Analytics changes staged on this chat" },
30168
30689
  run: async () => {
30169
30690
  await draftAction2("/api/ga4/draft/clear", {});
@@ -30173,7 +30694,7 @@ var draftCommand3 = defineCommand113({
30173
30694
  });
30174
30695
 
30175
30696
  // src/commands/ga4/properties.ts
30176
- import { defineCommand as defineCommand114 } from "citty";
30697
+ import { defineCommand as defineCommand115 } from "citty";
30177
30698
  registerSchema({
30178
30699
  command: "ga4.properties",
30179
30700
  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.",
@@ -30189,7 +30710,7 @@ function propertyHints(properties) {
30189
30710
  resources: properties.map((property) => ({ id: property.externalId, label: property.name }))
30190
30711
  });
30191
30712
  }
30192
- var propertiesCommand = defineCommand114({
30713
+ var propertiesCommand = defineCommand115({
30193
30714
  meta: {
30194
30715
  name: "properties",
30195
30716
  description: `List accessible GA4 properties.
@@ -30239,7 +30760,7 @@ Examples:
30239
30760
  // src/commands/ga4/query.ts
30240
30761
  import { appendFileSync as appendFileSync2, existsSync as existsSync6, readFileSync as readFileSync11, writeFileSync as writeFileSync3 } from "fs";
30241
30762
  import { resolve as resolve2 } from "path";
30242
- import { defineCommand as defineCommand115 } from "citty";
30763
+ import { defineCommand as defineCommand116 } from "citty";
30243
30764
 
30244
30765
  // src/commands/ga4/presets.ts
30245
30766
  var GA4_PRESETS = [
@@ -30360,7 +30881,7 @@ function buildRequestBody(args, propertyId, useCache) {
30360
30881
  if (!useCache) body.skipCache = true;
30361
30882
  return body;
30362
30883
  }
30363
- function handleError2(err) {
30884
+ function handleError3(err) {
30364
30885
  if (err instanceof ApiError) {
30365
30886
  if (isNotConnectedError(err.code, err.message)) {
30366
30887
  handleConnectionError("ga4", err.message);
@@ -30374,7 +30895,7 @@ function handleError2(err) {
30374
30895
  });
30375
30896
  process.exit(1);
30376
30897
  }
30377
- var queryCommand2 = defineCommand115({
30898
+ var queryCommand2 = defineCommand116({
30378
30899
  meta: {
30379
30900
  name: "query",
30380
30901
  description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
@@ -30439,13 +30960,13 @@ Free-form (escape hatch):
30439
30960
  }
30440
30961
  outputRows(response.data ?? [], args, response, false);
30441
30962
  } catch (err) {
30442
- handleError2(err);
30963
+ handleError3(err);
30443
30964
  }
30444
30965
  }
30445
30966
  });
30446
30967
 
30447
30968
  // src/commands/ga4/write-commands.ts
30448
- import { defineCommand as defineCommand116 } from "citty";
30969
+ import { defineCommand as defineCommand117 } from "citty";
30449
30970
  var PROPERTY_ARG_DESCRIPTION = "GA4 property id (optional only when one property is connected \u2014 run `baker ga4 properties`)";
30450
30971
  var propertyArg = { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false };
30451
30972
  function createJsonDescription(noun) {
@@ -30463,7 +30984,7 @@ registerSchema({
30463
30984
  "property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
30464
30985
  }
30465
30986
  });
30466
- var keyEventCommand = defineCommand116({
30987
+ var keyEventCommand = defineCommand117({
30467
30988
  meta: {
30468
30989
  name: "key-event",
30469
30990
  description: `Stage key-event (conversion) changes
@@ -30476,7 +30997,7 @@ Examples:
30476
30997
  baker ga4 key-event delete 4185`
30477
30998
  },
30478
30999
  subCommands: {
30479
- create: defineCommand116({
31000
+ create: defineCommand117({
30480
31001
  meta: {
30481
31002
  name: "create",
30482
31003
  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."
@@ -30497,7 +31018,7 @@ Examples:
30497
31018
  );
30498
31019
  }
30499
31020
  }),
30500
- update: defineCommand116({
31021
+ update: defineCommand117({
30501
31022
  meta: {
30502
31023
  name: "update",
30503
31024
  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."
@@ -30517,7 +31038,7 @@ Examples:
30517
31038
  });
30518
31039
  }
30519
31040
  }),
30520
- delete: defineCommand116({
31041
+ delete: defineCommand117({
30521
31042
  meta: {
30522
31043
  name: "delete",
30523
31044
  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."
@@ -30565,7 +31086,7 @@ for (const { kind, noun, createHint } of DEFINITIONS) {
30565
31086
  }
30566
31087
  function definitionCommand(definition) {
30567
31088
  const { command, kind, noun, example } = definition;
30568
- return defineCommand116({
31089
+ return defineCommand117({
30569
31090
  meta: {
30570
31091
  name: command,
30571
31092
  description: `Stage ${noun} changes
@@ -30577,7 +31098,7 @@ Examples:
30577
31098
  baker ga4 ${command} archive 12`
30578
31099
  },
30579
31100
  subCommands: {
30580
- create: defineCommand116({
31101
+ create: defineCommand117({
30581
31102
  meta: { name: "create", description: `Stage a new ${noun} (or a JSON array of them, staged together)` },
30582
31103
  args: {
30583
31104
  json: { type: "string", description: createJsonDescription(noun), required: false },
@@ -30595,7 +31116,7 @@ Examples:
30595
31116
  );
30596
31117
  }
30597
31118
  }),
30598
- update: defineCommand116({
31119
+ update: defineCommand117({
30599
31120
  meta: {
30600
31121
  name: "update",
30601
31122
  description: `Stage a change to an existing ${noun} (pass its id). The parameter name and scope cannot change \u2014 archive and recreate for that.`
@@ -30615,7 +31136,7 @@ Examples:
30615
31136
  });
30616
31137
  }
30617
31138
  }),
30618
- archive: defineCommand116({
31139
+ archive: defineCommand117({
30619
31140
  meta: {
30620
31141
  name: "archive",
30621
31142
  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.`
@@ -30660,7 +31181,7 @@ var dataStreamArg = {
30660
31181
  function withStream(args) {
30661
31182
  return typeof args["data-stream"] === "string" ? { dataStream: args["data-stream"] } : {};
30662
31183
  }
30663
- var customEventCommand = defineCommand116({
31184
+ var customEventCommand = defineCommand117({
30664
31185
  meta: {
30665
31186
  name: "custom-event",
30666
31187
  description: `Stage custom events \u2014 new events built from events the site already sends
@@ -30671,7 +31192,7 @@ Examples:
30671
31192
  baker ga4 custom-event delete 7`
30672
31193
  },
30673
31194
  subCommands: {
30674
- create: defineCommand116({
31195
+ create: defineCommand117({
30675
31196
  meta: {
30676
31197
  name: "create",
30677
31198
  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."
@@ -30694,7 +31215,7 @@ Examples:
30694
31215
  );
30695
31216
  }
30696
31217
  }),
30697
- update: defineCommand116({
31218
+ update: defineCommand117({
30698
31219
  meta: { name: "update", description: "Stage a change to an existing custom event (pass its id)" },
30699
31220
  args: {
30700
31221
  id: { type: "positional", description: "Custom event rule id", required: false },
@@ -30713,7 +31234,7 @@ Examples:
30713
31234
  });
30714
31235
  }
30715
31236
  }),
30716
- delete: defineCommand116({
31237
+ delete: defineCommand117({
30717
31238
  meta: {
30718
31239
  name: "delete",
30719
31240
  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."
@@ -30768,7 +31289,7 @@ function booleanArg(input, flag) {
30768
31289
  if (input === "false") return false;
30769
31290
  return failValidation3(`--${flag} must be true or false`);
30770
31291
  }
30771
- var dataRetentionCommand = defineCommand116({
31292
+ var dataRetentionCommand = defineCommand117({
30772
31293
  meta: {
30773
31294
  name: "data-retention",
30774
31295
  description: `Stage a change to how long Google Analytics keeps data
@@ -30778,7 +31299,7 @@ Examples:
30778
31299
  baker ga4 data-retention set --event-data 14 --user-data 14 --reset-on-activity true`
30779
31300
  },
30780
31301
  subCommands: {
30781
- set: defineCommand116({
31302
+ set: defineCommand117({
30782
31303
  meta: { name: "set", description: "Stage the retention window (months)" },
30783
31304
  args: {
30784
31305
  "event-data": { type: "string", description: "2, 14, 26, 38 or 50", required: false },
@@ -30807,7 +31328,7 @@ Examples:
30807
31328
  });
30808
31329
 
30809
31330
  // src/commands/ga4/index.ts
30810
- var ga4Command = defineCommand117({
31331
+ var ga4Command = defineCommand118({
30811
31332
  meta: {
30812
31333
  name: "ga4",
30813
31334
  description: `Google Analytics 4. Report on a property, audit its config, and change what it measures.
@@ -30848,12 +31369,12 @@ Full guide: __tooling__/docs/tools/baker/ga4.md`
30848
31369
  });
30849
31370
 
30850
31371
  // src/commands/gsc/index.ts
30851
- import { defineCommand as defineCommand121 } from "citty";
31372
+ import { defineCommand as defineCommand122 } from "citty";
30852
31373
 
30853
31374
  // src/commands/gsc/query.ts
30854
31375
  import { appendFileSync as appendFileSync3, existsSync as existsSync7, readFileSync as readFileSync12, writeFileSync as writeFileSync4 } from "fs";
30855
31376
  import { resolve as resolve3 } from "path";
30856
- import { defineCommand as defineCommand118 } from "citty";
31377
+ import { defineCommand as defineCommand119 } from "citty";
30857
31378
 
30858
31379
  // src/commands/gsc/presets.ts
30859
31380
  var GSC_PRESETS = [
@@ -31033,7 +31554,7 @@ function buildRequestBody2(args, siteUrl, useCache) {
31033
31554
  if (!useCache) body.skipCache = true;
31034
31555
  return body;
31035
31556
  }
31036
- function handleError3(err) {
31557
+ function handleError4(err) {
31037
31558
  if (err instanceof ApiError) {
31038
31559
  if (isNotConnectedError(err.code, err.message)) {
31039
31560
  handleConnectionError("gsc", err.message);
@@ -31047,7 +31568,7 @@ function handleError3(err) {
31047
31568
  });
31048
31569
  process.exit(1);
31049
31570
  }
31050
- var queryCommand3 = defineCommand118({
31571
+ var queryCommand3 = defineCommand119({
31051
31572
  meta: {
31052
31573
  name: "query",
31053
31574
  description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
@@ -31119,13 +31640,13 @@ Free-form (escape hatch):
31119
31640
  }
31120
31641
  outputRows2(response.data ?? [], args, response, false);
31121
31642
  } catch (err) {
31122
- handleError3(err);
31643
+ handleError4(err);
31123
31644
  }
31124
31645
  }
31125
31646
  });
31126
31647
 
31127
31648
  // src/commands/gsc/sitemaps.ts
31128
- import { defineCommand as defineCommand119 } from "citty";
31649
+ import { defineCommand as defineCommand120 } from "citty";
31129
31650
  registerSchema({
31130
31651
  command: "gsc.sitemaps",
31131
31652
  description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
@@ -31134,7 +31655,7 @@ registerSchema({
31134
31655
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
31135
31656
  }
31136
31657
  });
31137
- var sitemapsCommand = defineCommand119({
31658
+ var sitemapsCommand = defineCommand120({
31138
31659
  meta: {
31139
31660
  name: "sitemaps",
31140
31661
  description: `List sitemaps for a site. Check health and errors.
@@ -31187,7 +31708,7 @@ Examples:
31187
31708
  });
31188
31709
 
31189
31710
  // src/commands/gsc/sites.ts
31190
- import { defineCommand as defineCommand120 } from "citty";
31711
+ import { defineCommand as defineCommand121 } from "citty";
31191
31712
  registerSchema({
31192
31713
  command: "gsc.sites",
31193
31714
  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.",
@@ -31203,7 +31724,7 @@ function siteHints(sites) {
31203
31724
  resources: sites.map((site) => ({ id: site.siteUrl, label: site.permissionLevel }))
31204
31725
  });
31205
31726
  }
31206
- var sitesCommand = defineCommand120({
31727
+ var sitesCommand = defineCommand121({
31207
31728
  meta: {
31208
31729
  name: "sites",
31209
31730
  description: `List verified Search Console sites.
@@ -31251,7 +31772,7 @@ Examples:
31251
31772
  });
31252
31773
 
31253
31774
  // src/commands/gsc/index.ts
31254
- var gscCommand = defineCommand121({
31775
+ var gscCommand = defineCommand122({
31255
31776
  meta: {
31256
31777
  name: "gsc",
31257
31778
  description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
@@ -31275,7 +31796,7 @@ Full guide: __tooling__/docs/tools/baker/gsc.md`
31275
31796
  });
31276
31797
 
31277
31798
  // src/commands/history/index.ts
31278
- import { defineCommand as defineCommand122 } from "citty";
31799
+ import { defineCommand as defineCommand123 } from "citty";
31279
31800
  registerSchema({
31280
31801
  command: "history.list",
31281
31802
  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.",
@@ -31330,7 +31851,7 @@ function parseBoundedInt2(raw, name, min, max) {
31330
31851
  }
31331
31852
  return value;
31332
31853
  }
31333
- var listCommand13 = defineCommand122({
31854
+ var listCommand13 = defineCommand123({
31334
31855
  meta: {
31335
31856
  name: "list",
31336
31857
  description: "List recent account changes (unified audit log), newest first."
@@ -31376,7 +31897,7 @@ var listCommand13 = defineCommand122({
31376
31897
  }
31377
31898
  }
31378
31899
  });
31379
- var historyCommand = defineCommand122({
31900
+ var historyCommand = defineCommand123({
31380
31901
  meta: {
31381
31902
  name: "history",
31382
31903
  description: `Unified account history (audit log): what changed, who did it, and when.
@@ -31386,7 +31907,7 @@ Full guide: __tooling__/docs/tools/baker/history.md`
31386
31907
  });
31387
31908
 
31388
31909
  // src/commands/hubspot/index.ts
31389
- import { defineCommand as defineCommand123 } from "citty";
31910
+ import { defineCommand as defineCommand124 } from "citty";
31390
31911
  var EMBED_TYPES = ["legacy", "v4", "unknown"];
31391
31912
  function failNotConnected(err) {
31392
31913
  if (err instanceof ApiError && err.code === "FORBIDDEN" && err.message.includes(HUBSPOT_MISSING_GRANT_MARKER)) {
@@ -31540,7 +32061,7 @@ registerSchema({
31540
32061
  }
31541
32062
  }
31542
32063
  });
31543
- var formsListCommand = defineCommand123({
32064
+ var formsListCommand = defineCommand124({
31544
32065
  meta: {
31545
32066
  name: "list",
31546
32067
  description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
@@ -31585,7 +32106,7 @@ var formsListCommand = defineCommand123({
31585
32106
  }
31586
32107
  }
31587
32108
  });
31588
- var formsViewCommand = defineCommand123({
32109
+ var formsViewCommand = defineCommand124({
31589
32110
  meta: {
31590
32111
  name: "view",
31591
32112
  description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
@@ -31637,7 +32158,7 @@ var formsViewCommand = defineCommand123({
31637
32158
  }
31638
32159
  }
31639
32160
  });
31640
- var meetingsListCommand = defineCommand123({
32161
+ var meetingsListCommand = defineCommand124({
31641
32162
  meta: {
31642
32163
  name: "list",
31643
32164
  description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
@@ -31679,7 +32200,7 @@ var meetingsListCommand = defineCommand123({
31679
32200
  }
31680
32201
  }
31681
32202
  });
31682
- var meetingsViewCommand = defineCommand123({
32203
+ var meetingsViewCommand = defineCommand124({
31683
32204
  meta: {
31684
32205
  name: "view",
31685
32206
  description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
@@ -31723,7 +32244,7 @@ var meetingsViewCommand = defineCommand123({
31723
32244
  }
31724
32245
  }
31725
32246
  });
31726
- var formsSubmissionsCommand = defineCommand123({
32247
+ var formsSubmissionsCommand = defineCommand124({
31727
32248
  meta: {
31728
32249
  name: "submissions",
31729
32250
  description: "How many leads a form received, and when. Example: baker hubspot forms submissions <formId> --days 30"
@@ -31772,7 +32293,7 @@ var formsSubmissionsCommand = defineCommand123({
31772
32293
  }
31773
32294
  }
31774
32295
  });
31775
- var workflowsListCommand = defineCommand123({
32296
+ var workflowsListCommand = defineCommand124({
31776
32297
  meta: {
31777
32298
  name: "list",
31778
32299
  description: "List HubSpot workflows. Example: baker hubspot workflows list --enabled-only"
@@ -31837,7 +32358,7 @@ function workflowViewHints(workflow) {
31837
32358
  }
31838
32359
  return hints;
31839
32360
  }
31840
- var workflowsViewCommand = defineCommand123({
32361
+ var workflowsViewCommand = defineCommand124({
31841
32362
  meta: {
31842
32363
  name: "view",
31843
32364
  description: "Read one workflow's real configuration \u2014 enrolment, branches in order, and what each step writes. Example: baker hubspot workflows view 121183594 --full"
@@ -31864,7 +32385,7 @@ var workflowsViewCommand = defineCommand123({
31864
32385
  }
31865
32386
  }
31866
32387
  });
31867
- var pipelinesListCommand = defineCommand123({
32388
+ var pipelinesListCommand = defineCommand124({
31868
32389
  meta: {
31869
32390
  name: "list",
31870
32391
  description: "List HubSpot deal pipelines and their stages. Example: baker hubspot pipelines list"
@@ -31881,7 +32402,7 @@ var pipelinesListCommand = defineCommand123({
31881
32402
  }
31882
32403
  }
31883
32404
  });
31884
- var contactsSummaryCommand = defineCommand123({
32405
+ var contactsSummaryCommand = defineCommand124({
31885
32406
  meta: {
31886
32407
  name: "summary",
31887
32408
  description: "Whether recent leads are being worked, as counts. Example: baker hubspot contacts summary --days 30"
@@ -31951,7 +32472,7 @@ function contactLookupHints(data) {
31951
32472
  }
31952
32473
  return hints;
31953
32474
  }
31954
- var contactsLookupCommand = defineCommand123({
32475
+ var contactsLookupCommand = defineCommand124({
31955
32476
  meta: {
31956
32477
  name: "lookup",
31957
32478
  description: "Find one contact by email and see whether it was worked. Example: baker hubspot contacts lookup a@b.com"
@@ -31975,27 +32496,27 @@ var contactsLookupCommand = defineCommand123({
31975
32496
  }
31976
32497
  }
31977
32498
  });
31978
- var contactsCommand = defineCommand123({
32499
+ var contactsCommand = defineCommand124({
31979
32500
  meta: { name: "contacts", description: "Contacts on the connected HubSpot account." },
31980
32501
  subCommands: { summary: contactsSummaryCommand, lookup: contactsLookupCommand }
31981
32502
  });
31982
- var formsCommand = defineCommand123({
32503
+ var formsCommand = defineCommand124({
31983
32504
  meta: { name: "forms", description: "HubSpot forms on the connected account." },
31984
32505
  subCommands: { list: formsListCommand, view: formsViewCommand, submissions: formsSubmissionsCommand }
31985
32506
  });
31986
- var workflowsCommand = defineCommand123({
32507
+ var workflowsCommand = defineCommand124({
31987
32508
  meta: { name: "workflows", description: "HubSpot workflows on the connected account." },
31988
32509
  subCommands: { list: workflowsListCommand, view: workflowsViewCommand }
31989
32510
  });
31990
- var pipelinesCommand = defineCommand123({
32511
+ var pipelinesCommand = defineCommand124({
31991
32512
  meta: { name: "pipelines", description: "HubSpot deal pipelines on the connected account." },
31992
32513
  subCommands: { list: pipelinesListCommand }
31993
32514
  });
31994
- var meetingsCommand = defineCommand123({
32515
+ var meetingsCommand = defineCommand124({
31995
32516
  meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
31996
32517
  subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
31997
32518
  });
31998
- var hubspotCommand = defineCommand123({
32519
+ var hubspotCommand = defineCommand124({
31999
32520
  meta: {
32000
32521
  name: "hubspot",
32001
32522
  description: `Read the connected HubSpot account \u2014 forms, the leads they received, workflows, deal pipelines and
@@ -32033,10 +32554,10 @@ Full guide: __tooling__/docs/tools/baker/hubspot.md`
32033
32554
  });
32034
32555
 
32035
32556
  // src/commands/images/index.ts
32036
- import { defineCommand as defineCommand149 } from "citty";
32557
+ import { defineCommand as defineCommand150 } from "citty";
32037
32558
 
32038
32559
  // src/commands/images/crop.ts
32039
- import { defineCommand as defineCommand124 } from "citty";
32560
+ import { defineCommand as defineCommand125 } from "citty";
32040
32561
 
32041
32562
  // src/lib/image/crop-sprite.ts
32042
32563
  import sharp from "sharp";
@@ -32158,7 +32679,7 @@ function emitError2(err) {
32158
32679
  }
32159
32680
  process.exit(1);
32160
32681
  }
32161
- var cropCommand = defineCommand124({
32682
+ var cropCommand = defineCommand125({
32162
32683
  meta: {
32163
32684
  name: "crop",
32164
32685
  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"
@@ -32194,7 +32715,7 @@ var cropCommand = defineCommand124({
32194
32715
  });
32195
32716
 
32196
32717
  // src/commands/images/delete.ts
32197
- import { defineCommand as defineCommand125 } from "citty";
32718
+ import { defineCommand as defineCommand126 } from "citty";
32198
32719
  registerSchema({
32199
32720
  command: "images.delete",
32200
32721
  description: "Delete an image by ID",
@@ -32208,7 +32729,7 @@ registerSchema({
32208
32729
  }
32209
32730
  }
32210
32731
  });
32211
- var deleteCommand2 = defineCommand125({
32732
+ var deleteCommand2 = defineCommand126({
32212
32733
  meta: {
32213
32734
  name: "delete",
32214
32735
  description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
@@ -32249,7 +32770,7 @@ var deleteCommand2 = defineCommand125({
32249
32770
  });
32250
32771
 
32251
32772
  // src/commands/images/dimensions.ts
32252
- import { defineCommand as defineCommand126 } from "citty";
32773
+ import { defineCommand as defineCommand127 } from "citty";
32253
32774
 
32254
32775
  // src/lib/image/dimensions.ts
32255
32776
  import { imageSize } from "image-size";
@@ -32272,7 +32793,7 @@ registerSchema({
32272
32793
  target: { type: "string", description: "Local file path or remote http(s) URL", required: true }
32273
32794
  }
32274
32795
  });
32275
- var dimensionsCommand = defineCommand126({
32796
+ var dimensionsCommand = defineCommand127({
32276
32797
  meta: {
32277
32798
  name: "dimensions",
32278
32799
  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"
@@ -32316,7 +32837,7 @@ var dimensionsCommand = defineCommand126({
32316
32837
  });
32317
32838
 
32318
32839
  // src/commands/images/download.ts
32319
- import { defineCommand as defineCommand127 } from "citty";
32840
+ import { defineCommand as defineCommand128 } from "citty";
32320
32841
 
32321
32842
  // src/commands/images/downloadPaths.ts
32322
32843
  import { basename as basename2, extname as extname3, join as join5 } from "path";
@@ -32541,7 +33062,7 @@ function emitError3(err) {
32541
33062
  writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
32542
33063
  process.exit(1);
32543
33064
  }
32544
- var downloadCommand = defineCommand127({
33065
+ var downloadCommand = defineCommand128({
32545
33066
  meta: {
32546
33067
  name: "download",
32547
33068
  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"
@@ -32574,7 +33095,7 @@ var downloadCommand = defineCommand127({
32574
33095
  });
32575
33096
 
32576
33097
  // src/commands/images/extract.ts
32577
- import { defineCommand as defineCommand128 } from "citty";
33098
+ import { defineCommand as defineCommand129 } from "citty";
32578
33099
 
32579
33100
  // src/commands/images/autoIngest.ts
32580
33101
  var AUTO_INGEST_MAX = {
@@ -32621,7 +33142,7 @@ registerSchema({
32621
33142
  }
32622
33143
  }
32623
33144
  });
32624
- var extractCommand = defineCommand128({
33145
+ var extractCommand = defineCommand129({
32625
33146
  meta: {
32626
33147
  name: "extract",
32627
33148
  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"
@@ -32676,7 +33197,7 @@ var extractCommand = defineCommand128({
32676
33197
  });
32677
33198
 
32678
33199
  // src/commands/images/find.ts
32679
- import { defineCommand as defineCommand129 } from "citty";
33200
+ import { defineCommand as defineCommand130 } from "citty";
32680
33201
 
32681
33202
  // src/commands/images/providerHits.ts
32682
33203
  function asRecord3(value) {
@@ -32814,7 +33335,7 @@ registerSchema({
32814
33335
  full: { type: "boolean", description: "Include full metadata", required: false, default: false }
32815
33336
  }
32816
33337
  });
32817
- var findCommand = defineCommand129({
33338
+ var findCommand = defineCommand130({
32818
33339
  meta: {
32819
33340
  name: "find",
32820
33341
  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"
@@ -32887,7 +33408,7 @@ var findCommand = defineCommand129({
32887
33408
  });
32888
33409
 
32889
33410
  // src/commands/images/get.ts
32890
- import { defineCommand as defineCommand130 } from "citty";
33411
+ import { defineCommand as defineCommand131 } from "citty";
32891
33412
  registerSchema({
32892
33413
  command: "images.get",
32893
33414
  description: "Get a single image by ID",
@@ -32895,7 +33416,7 @@ registerSchema({
32895
33416
  id: { type: "string", description: "Image ID", required: true }
32896
33417
  }
32897
33418
  });
32898
- var getCommand3 = defineCommand130({
33419
+ var getCommand3 = defineCommand131({
32899
33420
  meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
32900
33421
  args: {
32901
33422
  id: { type: "positional", description: "Image ID", required: false },
@@ -32931,7 +33452,7 @@ var getCommand3 = defineCommand130({
32931
33452
  });
32932
33453
 
32933
33454
  // src/commands/images/gif.ts
32934
- import { defineCommand as defineCommand131 } from "citty";
33455
+ import { defineCommand as defineCommand132 } from "citty";
32935
33456
  registerSchema({
32936
33457
  command: "images.gif",
32937
33458
  description: "Search Giphy for GIFs / reaction memes (paid social creative).",
@@ -32963,7 +33484,7 @@ registerSchema({
32963
33484
  }
32964
33485
  }
32965
33486
  });
32966
- var gifCommand = defineCommand131({
33487
+ var gifCommand = defineCommand132({
32967
33488
  meta: {
32968
33489
  name: "gif",
32969
33490
  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"
@@ -33010,7 +33531,7 @@ var gifCommand = defineCommand131({
33010
33531
  });
33011
33532
 
33012
33533
  // src/commands/images/google.ts
33013
- import { defineCommand as defineCommand132 } from "citty";
33534
+ import { defineCommand as defineCommand133 } from "citty";
33014
33535
  var GOOGLE_ERROR_FIX = {
33015
33536
  action: "use_different_resource",
33016
33537
  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."
@@ -33050,7 +33571,7 @@ registerSchema({
33050
33571
  }
33051
33572
  }
33052
33573
  });
33053
- var googleCommand2 = defineCommand132({
33574
+ var googleCommand2 = defineCommand133({
33054
33575
  meta: {
33055
33576
  name: "google",
33056
33577
  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"
@@ -33123,7 +33644,7 @@ var googleCommand2 = defineCommand132({
33123
33644
  });
33124
33645
 
33125
33646
  // src/commands/images/group.ts
33126
- import { defineCommand as defineCommand133 } from "citty";
33647
+ import { defineCommand as defineCommand134 } from "citty";
33127
33648
 
33128
33649
  // src/commands/mediaGroup.ts
33129
33650
  async function runMediaGroupLookup(input) {
@@ -33176,7 +33697,7 @@ registerSchema({
33176
33697
  "group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
33177
33698
  }
33178
33699
  });
33179
- var groupCommand = defineCommand133({
33700
+ var groupCommand = defineCommand134({
33180
33701
  meta: {
33181
33702
  name: "group",
33182
33703
  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>"
@@ -33196,7 +33717,7 @@ var groupCommand = defineCommand133({
33196
33717
  });
33197
33718
 
33198
33719
  // src/commands/images/icon.ts
33199
- import { defineCommand as defineCommand134 } from "citty";
33720
+ import { defineCommand as defineCommand135 } from "citty";
33200
33721
 
33201
33722
  // src/commands/images/brandVerification.ts
33202
33723
  function brandToken(domain) {
@@ -33293,7 +33814,7 @@ registerSchema({
33293
33814
  full: { type: "boolean", description: "Include full metadata", required: false, default: false }
33294
33815
  }
33295
33816
  });
33296
- var iconCommand = defineCommand134({
33817
+ var iconCommand = defineCommand135({
33297
33818
  meta: {
33298
33819
  name: "icon",
33299
33820
  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'"
@@ -33363,7 +33884,7 @@ var iconCommand = defineCommand134({
33363
33884
  });
33364
33885
 
33365
33886
  // src/commands/images/ingest.ts
33366
- import { defineCommand as defineCommand135 } from "citty";
33887
+ import { defineCommand as defineCommand136 } from "citty";
33367
33888
  registerSchema({
33368
33889
  command: "images.ingest",
33369
33890
  description: "Ingest a remote image URL into the library (full describe + embed).",
@@ -33377,7 +33898,7 @@ registerSchema({
33377
33898
  fields: { type: "string", description: "Comma-separated field names to include", required: false }
33378
33899
  }
33379
33900
  });
33380
- var ingestCommand = defineCommand135({
33901
+ var ingestCommand = defineCommand136({
33381
33902
  meta: {
33382
33903
  name: "ingest",
33383
33904
  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"
@@ -33427,7 +33948,7 @@ var ingestCommand = defineCommand135({
33427
33948
  });
33428
33949
 
33429
33950
  // src/commands/images/layerize.ts
33430
- import { defineCommand as defineCommand136 } from "citty";
33951
+ import { defineCommand as defineCommand137 } from "citty";
33431
33952
  registerSchema({
33432
33953
  command: "images.layerize",
33433
33954
  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.",
@@ -33491,7 +34012,7 @@ async function pollUntilSettled(imageId, maxWait) {
33491
34012
  }
33492
34013
  return null;
33493
34014
  }
33494
- var layerizeCommand = defineCommand136({
34015
+ var layerizeCommand = defineCommand137({
33495
34016
  meta: {
33496
34017
  name: "layerize",
33497
34018
  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'"
@@ -33560,7 +34081,7 @@ registerSchema({
33560
34081
  full: { type: "boolean", description: "Include geometry and typography for every layer", required: false }
33561
34082
  }
33562
34083
  });
33563
- var layersCommand = defineCommand136({
34084
+ var layersCommand = defineCommand137({
33564
34085
  meta: {
33565
34086
  name: "layers",
33566
34087
  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"
@@ -33600,7 +34121,7 @@ var layersCommand = defineCommand136({
33600
34121
  });
33601
34122
 
33602
34123
  // src/commands/images/library.ts
33603
- import { defineCommand as defineCommand137 } from "citty";
34124
+ import { defineCommand as defineCommand138 } from "citty";
33604
34125
  registerSchema({
33605
34126
  command: "images.library",
33606
34127
  description: "Search the company image library. Returns only ready images.",
@@ -33626,7 +34147,7 @@ registerSchema({
33626
34147
  }
33627
34148
  }
33628
34149
  });
33629
- var libraryCommand = defineCommand137({
34150
+ var libraryCommand = defineCommand138({
33630
34151
  meta: {
33631
34152
  name: "library",
33632
34153
  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"
@@ -33689,7 +34210,7 @@ var libraryCommand = defineCommand137({
33689
34210
  });
33690
34211
 
33691
34212
  // src/commands/images/logo.ts
33692
- import { defineCommand as defineCommand138 } from "citty";
34213
+ import { defineCommand as defineCommand139 } from "citty";
33693
34214
  registerSchema({
33694
34215
  command: "images.logo",
33695
34216
  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.",
@@ -33717,7 +34238,7 @@ registerSchema({
33717
34238
  full: { type: "boolean", description: "Include full metadata", required: false, default: false }
33718
34239
  }
33719
34240
  });
33720
- var logoCommand = defineCommand138({
34241
+ var logoCommand = defineCommand139({
33721
34242
  meta: {
33722
34243
  name: "logo",
33723
34244
  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"
@@ -33790,7 +34311,7 @@ var logoCommand = defineCommand138({
33790
34311
  });
33791
34312
 
33792
34313
  // src/commands/images/normalize.ts
33793
- import { defineCommand as defineCommand139 } from "citty";
34314
+ import { defineCommand as defineCommand140 } from "citty";
33794
34315
 
33795
34316
  // src/lib/image/color-changer.ts
33796
34317
  import quantize from "quantize";
@@ -34522,7 +35043,7 @@ function coerceRawArgs(args) {
34522
35043
  "dry-run": bool(args["dry-run"])
34523
35044
  };
34524
35045
  }
34525
- var normalizeCommand = defineCommand139({
35046
+ var normalizeCommand = defineCommand140({
34526
35047
  meta: {
34527
35048
  name: "normalize",
34528
35049
  description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
@@ -34577,7 +35098,7 @@ Examples:
34577
35098
  });
34578
35099
 
34579
35100
  // src/commands/images/pinterest.ts
34580
- import { defineCommand as defineCommand140 } from "citty";
35101
+ import { defineCommand as defineCommand141 } from "citty";
34581
35102
  registerSchema({
34582
35103
  command: "images.pinterest",
34583
35104
  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.",
@@ -34597,7 +35118,7 @@ registerSchema({
34597
35118
  }
34598
35119
  }
34599
35120
  });
34600
- var pinterestCommand = defineCommand140({
35121
+ var pinterestCommand = defineCommand141({
34601
35122
  meta: {
34602
35123
  name: "pinterest",
34603
35124
  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'"
@@ -34654,7 +35175,7 @@ var pinterestCommand = defineCommand140({
34654
35175
  });
34655
35176
 
34656
35177
  // src/commands/images/screenshot.ts
34657
- import { defineCommand as defineCommand141 } from "citty";
35178
+ import { defineCommand as defineCommand142 } from "citty";
34658
35179
  registerSchema({
34659
35180
  command: "images.screenshot",
34660
35181
  description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
@@ -34673,7 +35194,7 @@ registerSchema({
34673
35194
  full: { type: "boolean", description: "Include full metadata", required: false, default: false }
34674
35195
  }
34675
35196
  });
34676
- var screenshotCommand = defineCommand141({
35197
+ var screenshotCommand = defineCommand142({
34677
35198
  meta: {
34678
35199
  name: "screenshot",
34679
35200
  description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
@@ -34737,7 +35258,7 @@ var screenshotCommand = defineCommand141({
34737
35258
  });
34738
35259
 
34739
35260
  // src/commands/images/search.ts
34740
- import { defineCommand as defineCommand142 } from "citty";
35261
+ import { defineCommand as defineCommand143 } from "citty";
34741
35262
  registerSchema({
34742
35263
  command: "images.search",
34743
35264
  description: "Search images by text query. Only returns ready images.",
@@ -34753,7 +35274,7 @@ registerSchema({
34753
35274
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
34754
35275
  }
34755
35276
  });
34756
- var searchCommand = defineCommand142({
35277
+ var searchCommand = defineCommand143({
34757
35278
  meta: {
34758
35279
  name: "search",
34759
35280
  description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
@@ -34813,7 +35334,7 @@ var searchCommand = defineCommand142({
34813
35334
  });
34814
35335
 
34815
35336
  // src/commands/images/sticker.ts
34816
- import { defineCommand as defineCommand143 } from "citty";
35337
+ import { defineCommand as defineCommand144 } from "citty";
34817
35338
  registerSchema({
34818
35339
  command: "images.sticker",
34819
35340
  description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
@@ -34845,7 +35366,7 @@ registerSchema({
34845
35366
  }
34846
35367
  }
34847
35368
  });
34848
- var stickerCommand = defineCommand143({
35369
+ var stickerCommand = defineCommand144({
34849
35370
  meta: {
34850
35371
  name: "sticker",
34851
35372
  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"
@@ -34892,7 +35413,7 @@ var stickerCommand = defineCommand143({
34892
35413
  });
34893
35414
 
34894
35415
  // src/commands/images/stock.ts
34895
- import { defineCommand as defineCommand144 } from "citty";
35416
+ import { defineCommand as defineCommand145 } from "citty";
34896
35417
  var STOCK_ERROR_FIX = {
34897
35418
  action: "use_different_resource",
34898
35419
  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."
@@ -34969,7 +35490,7 @@ function buildStockRequest(query, args) {
34969
35490
  if (args.context) body.descriptionContext = args.context;
34970
35491
  return body;
34971
35492
  }
34972
- var stockCommand = defineCommand144({
35493
+ var stockCommand = defineCommand145({
34973
35494
  meta: {
34974
35495
  name: "stock",
34975
35496
  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"
@@ -35042,7 +35563,7 @@ var stockCommand = defineCommand144({
35042
35563
  });
35043
35564
 
35044
35565
  // src/lib/tags-command.ts
35045
- import { defineCommand as defineCommand145 } from "citty";
35566
+ import { defineCommand as defineCommand146 } from "citty";
35046
35567
  function makeTagsCommand(command, label, endpoint) {
35047
35568
  registerSchema({
35048
35569
  command: `${command}.tags`,
@@ -35051,7 +35572,7 @@ function makeTagsCommand(command, label, endpoint) {
35051
35572
  output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
35052
35573
  }
35053
35574
  });
35054
- return defineCommand145({
35575
+ return defineCommand146({
35055
35576
  meta: {
35056
35577
  name: "tags",
35057
35578
  description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
@@ -35084,10 +35605,10 @@ function makeTagsCommand(command, label, endpoint) {
35084
35605
  }
35085
35606
 
35086
35607
  // src/commands/images/tags.ts
35087
- var tagsCommand2 = makeTagsCommand("images", "image", "/api/images/tags");
35608
+ var tagsCommand3 = makeTagsCommand("images", "image", "/api/images/tags");
35088
35609
 
35089
35610
  // src/commands/images/upload.ts
35090
- import { defineCommand as defineCommand146 } from "citty";
35611
+ import { defineCommand as defineCommand147 } from "citty";
35091
35612
  registerSchema({
35092
35613
  command: "images.upload",
35093
35614
  description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
@@ -35125,7 +35646,7 @@ registerSchema({
35125
35646
  function isRemoteUrl2(value) {
35126
35647
  return /^https?:\/\//i.test(value);
35127
35648
  }
35128
- var uploadCommand = defineCommand146({
35649
+ var uploadCommand = defineCommand147({
35129
35650
  meta: {
35130
35651
  name: "upload",
35131
35652
  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'"
@@ -35218,7 +35739,7 @@ async function uploadLocal(target, args) {
35218
35739
  }
35219
35740
 
35220
35741
  // src/commands/images/upscale.ts
35221
- import { defineCommand as defineCommand147 } from "citty";
35742
+ import { defineCommand as defineCommand148 } from "citty";
35222
35743
  registerSchema({
35223
35744
  command: "images.upscale",
35224
35745
  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).",
@@ -35233,7 +35754,7 @@ registerSchema({
35233
35754
  }
35234
35755
  });
35235
35756
  var POLL_INTERVAL_MS4 = 1500;
35236
- var upscaleCommand = defineCommand147({
35757
+ var upscaleCommand = defineCommand148({
35237
35758
  meta: {
35238
35759
  name: "upscale",
35239
35760
  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"
@@ -35288,7 +35809,7 @@ var upscaleCommand = defineCommand147({
35288
35809
  });
35289
35810
 
35290
35811
  // src/commands/images/use.ts
35291
- import { defineCommand as defineCommand148 } from "citty";
35812
+ import { defineCommand as defineCommand149 } from "citty";
35292
35813
  registerSchema({
35293
35814
  command: "images.use",
35294
35815
  description: "Ingest a URL and wait for the library record to be ready.",
@@ -35317,7 +35838,7 @@ function emitReady(ingestResult, doc, args) {
35317
35838
  args.full === true
35318
35839
  );
35319
35840
  }
35320
- var useCommand = defineCommand148({
35841
+ var useCommand = defineCommand149({
35321
35842
  meta: {
35322
35843
  name: "use",
35323
35844
  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"
@@ -35366,7 +35887,7 @@ var useCommand = defineCommand148({
35366
35887
  });
35367
35888
 
35368
35889
  // src/commands/images/index.ts
35369
- var imagesCommand = defineCommand149({
35890
+ var imagesCommand = defineCommand150({
35370
35891
  meta: {
35371
35892
  name: "images",
35372
35893
  description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
@@ -35439,17 +35960,17 @@ Full guide: __tooling__/docs/tools/baker/images.md`
35439
35960
  layerize: layerizeCommand,
35440
35961
  layers: layersCommand,
35441
35962
  upscale: upscaleCommand,
35442
- tags: tagsCommand2
35963
+ tags: tagsCommand3
35443
35964
  }
35444
35965
  });
35445
35966
 
35446
35967
  // src/commands/landing/index.ts
35447
- import { defineCommand as defineCommand160 } from "citty";
35968
+ import { defineCommand as defineCommand161 } from "citty";
35448
35969
 
35449
35970
  // src/commands/landing/critique.ts
35450
35971
  import { readdir as readdir9, stat as stat6 } from "fs/promises";
35451
35972
  import path29 from "path";
35452
- import { defineCommand as defineCommand150 } from "citty";
35973
+ import { defineCommand as defineCommand151 } from "citty";
35453
35974
 
35454
35975
  // src/engine/landing/lib/constants.ts
35455
35976
  var OVERUSED_FONTS = /* @__PURE__ */ new Set([
@@ -36632,7 +37153,7 @@ function fail5(code, message, fix) {
36632
37153
  );
36633
37154
  process.exit(2);
36634
37155
  }
36635
- var critiqueCommand2 = defineCommand150({
37156
+ var critiqueCommand2 = defineCommand151({
36636
37157
  meta: {
36637
37158
  name: "critique",
36638
37159
  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."
@@ -36741,10 +37262,10 @@ async function isDir(p) {
36741
37262
  }
36742
37263
 
36743
37264
  // src/commands/landing/inspiration/index.ts
36744
- import { defineCommand as defineCommand159 } from "citty";
37265
+ import { defineCommand as defineCommand160 } from "citty";
36745
37266
 
36746
37267
  // src/commands/landing/inspiration/add.ts
36747
- import { defineCommand as defineCommand151 } from "citty";
37268
+ import { defineCommand as defineCommand152 } from "citty";
36748
37269
 
36749
37270
  // src/commands/landing/inspiration/shared.ts
36750
37271
  var INSPIRATION_HINTS = {
@@ -36826,7 +37347,7 @@ registerSchema({
36826
37347
  note: { type: "string", description: "Why this page is worth keeping", required: false }
36827
37348
  }
36828
37349
  });
36829
- var addCommand = defineCommand151({
37350
+ var addCommand = defineCommand152({
36830
37351
  meta: {
36831
37352
  name: "add",
36832
37353
  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'"
@@ -36868,7 +37389,7 @@ var addCommand = defineCommand151({
36868
37389
  // src/commands/landing/inspiration/code.ts
36869
37390
  import { mkdir as mkdir10, writeFile as writeFile14 } from "fs/promises";
36870
37391
  import path30 from "path";
36871
- import { defineCommand as defineCommand152 } from "citty";
37392
+ import { defineCommand as defineCommand153 } from "citty";
36872
37393
  registerSchema({
36873
37394
  command: "landing.inspiration.code",
36874
37395
  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.",
@@ -36877,7 +37398,7 @@ registerSchema({
36877
37398
  full: { type: "boolean", description: "Print the markup inline as well as writing it", required: false }
36878
37399
  }
36879
37400
  });
36880
- var codeCommand = defineCommand152({
37401
+ var codeCommand = defineCommand153({
36881
37402
  meta: {
36882
37403
  name: "code",
36883
37404
  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."
@@ -36934,7 +37455,7 @@ var codeCommand = defineCommand152({
36934
37455
  });
36935
37456
 
36936
37457
  // src/commands/landing/inspiration/favorites.ts
36937
- import { defineCommand as defineCommand153 } from "citty";
37458
+ import { defineCommand as defineCommand154 } from "citty";
36938
37459
  registerSchema({
36939
37460
  command: "landing.inspiration.favorites",
36940
37461
  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.",
@@ -36948,7 +37469,7 @@ registerSchema({
36948
37469
  }
36949
37470
  }
36950
37471
  });
36951
- var favoritesCommand = defineCommand153({
37472
+ var favoritesCommand = defineCommand154({
36952
37473
  meta: {
36953
37474
  name: "favorites",
36954
37475
  description: "List this company's saved reference sections. Example: baker landing inspiration favorites --type hero,pricing"
@@ -37028,7 +37549,7 @@ registerSchema({
37028
37549
  note: { type: "string", description: "Why this is worth keeping", required: false }
37029
37550
  }
37030
37551
  });
37031
- var favoriteCommand = defineCommand153({
37552
+ var favoriteCommand = defineCommand154({
37032
37553
  meta: {
37033
37554
  name: "favorite",
37034
37555
  description: "Save a reference section to this company. Example: baker landing inspiration favorite k57abc\u2026"
@@ -37066,7 +37587,7 @@ registerSchema({
37066
37587
  page: { type: "boolean", description: "Treat the id as a page rather than a section", required: false }
37067
37588
  }
37068
37589
  });
37069
- var unfavoriteCommand = defineCommand153({
37590
+ var unfavoriteCommand = defineCommand154({
37070
37591
  meta: {
37071
37592
  name: "unfavorite",
37072
37593
  description: "Remove a reference section from this company's saved set. Example: baker landing inspiration unfavorite k57abc\u2026"
@@ -37088,7 +37609,7 @@ var unfavoriteCommand = defineCommand153({
37088
37609
  });
37089
37610
 
37090
37611
  // src/commands/landing/inspiration/page.ts
37091
- import { defineCommand as defineCommand154 } from "citty";
37612
+ import { defineCommand as defineCommand155 } from "citty";
37092
37613
  registerSchema({
37093
37614
  command: "landing.inspiration.page",
37094
37615
  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.",
@@ -37105,7 +37626,7 @@ registerSchema({
37105
37626
  }
37106
37627
  }
37107
37628
  });
37108
- var pageCommand = defineCommand154({
37629
+ var pageCommand2 = defineCommand155({
37109
37630
  meta: {
37110
37631
  name: "page",
37111
37632
  description: "Show how a reference page sequences its sections. Example: baker landing inspiration page j91xyz\u2026 \u2014 the blueprint, not the pixels."
@@ -37170,7 +37691,7 @@ var pageCommand = defineCommand154({
37170
37691
  // src/commands/landing/inspiration/scrape.ts
37171
37692
  import { readFile as readFile23 } from "fs/promises";
37172
37693
  import path33 from "path";
37173
- import { defineCommand as defineCommand155 } from "citty";
37694
+ import { defineCommand as defineCommand156 } from "citty";
37174
37695
 
37175
37696
  // src/engine/landing/lib/capturedReferences.ts
37176
37697
  var MAX_STRINGS_PER_SECTION = 40;
@@ -39311,7 +39832,7 @@ registerSchema({
39311
39832
  report: { type: "boolean", description: "Write report.html. `--no-report` to skip", required: false }
39312
39833
  }
39313
39834
  });
39314
- var scrapeCommand = defineCommand155({
39835
+ var scrapeCommand = defineCommand156({
39315
39836
  meta: {
39316
39837
  name: "scrape",
39317
39838
  description: "Capture a landing page to a directory, now. Example: baker landing inspiration scrape https://linear.app --out .baker/inspiration/linear.app"
@@ -39413,7 +39934,7 @@ var scrapeCommand = defineCommand155({
39413
39934
 
39414
39935
  // src/commands/landing/inspiration/search.ts
39415
39936
  import path35 from "path";
39416
- import { defineCommand as defineCommand156 } from "citty";
39937
+ import { defineCommand as defineCommand157 } from "citty";
39417
39938
 
39418
39939
  // src/commands/landing/inspiration/shot.ts
39419
39940
  import { mkdir as mkdir12, writeFile as writeFile17 } from "fs/promises";
@@ -39550,7 +40071,7 @@ async function downloadShots(results) {
39550
40071
  );
39551
40072
  return saved;
39552
40073
  }
39553
- var searchCommand2 = defineCommand156({
40074
+ var searchCommand2 = defineCommand157({
39554
40075
  meta: {
39555
40076
  name: "search",
39556
40077
  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"
@@ -39648,7 +40169,7 @@ var searchCommand2 = defineCommand156({
39648
40169
  });
39649
40170
 
39650
40171
  // src/commands/landing/inspiration/sequences.ts
39651
- import { defineCommand as defineCommand157 } from "citty";
40172
+ import { defineCommand as defineCommand158 } from "citty";
39652
40173
  var COMPACT_TRANSITIONS = 12;
39653
40174
  var COMPACT_ENDS = 5;
39654
40175
  var MAX_PAGES = 50;
@@ -39722,7 +40243,7 @@ function sequencesHints(data, { scope, full }) {
39722
40243
  if (scope === "favorites") hints.push(...favoritesScopeHints(data.favoritesHealth, data.pagesReturned));
39723
40244
  return hints;
39724
40245
  }
39725
- var sequencesCommand = defineCommand157({
40246
+ var sequencesCommand = defineCommand158({
39726
40247
  meta: {
39727
40248
  name: "sequences",
39728
40249
  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."
@@ -39772,7 +40293,7 @@ var sequencesCommand = defineCommand157({
39772
40293
 
39773
40294
  // src/commands/landing/inspiration/view.ts
39774
40295
  import path36 from "path";
39775
- import { defineCommand as defineCommand158 } from "citty";
40296
+ import { defineCommand as defineCommand159 } from "citty";
39776
40297
  registerSchema({
39777
40298
  command: "landing.inspiration.view",
39778
40299
  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.",
@@ -39785,7 +40306,7 @@ registerSchema({
39785
40306
  }
39786
40307
  }
39787
40308
  });
39788
- var viewCommand2 = defineCommand158({
40309
+ var viewCommand2 = defineCommand159({
39789
40310
  meta: {
39790
40311
  name: "view",
39791
40312
  description: "Full detail for one reference section. Example: baker landing inspiration view k57abc\u2026 \u2014 read the screenshots it saves before you build."
@@ -39869,7 +40390,7 @@ var viewCommand2 = defineCommand158({
39869
40390
  });
39870
40391
 
39871
40392
  // src/commands/landing/inspiration/index.ts
39872
- var inspirationCommand = defineCommand159({
40393
+ var inspirationCommand = defineCommand160({
39873
40394
  meta: {
39874
40395
  name: "inspiration",
39875
40396
  description: `Reference library of real landing-page sections \u2014 look at how good pages actually solve a problem before you design one.
@@ -39903,7 +40424,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
39903
40424
  search: searchCommand2,
39904
40425
  view: viewCommand2,
39905
40426
  code: codeCommand,
39906
- page: pageCommand,
40427
+ page: pageCommand2,
39907
40428
  sequences: sequencesCommand,
39908
40429
  add: addCommand,
39909
40430
  favorites: favoritesCommand,
@@ -39914,7 +40435,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
39914
40435
  });
39915
40436
 
39916
40437
  // src/commands/landing/index.ts
39917
- var landingCommand = defineCommand160({
40438
+ var landingCommand = defineCommand161({
39918
40439
  meta: {
39919
40440
  name: "landing",
39920
40441
  description: `Design-quality tools for landing pages (src/pages/<slug>/).
@@ -39932,7 +40453,7 @@ Subcommands:
39932
40453
  });
39933
40454
 
39934
40455
  // src/commands/mcp/index.ts
39935
- import { defineCommand as defineCommand161 } from "citty";
40456
+ import { defineCommand as defineCommand162 } from "citty";
39936
40457
 
39937
40458
  // src/commands/mcp/platforms.ts
39938
40459
  function readsKey(label) {
@@ -40001,7 +40522,7 @@ registerSchema({
40001
40522
  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.",
40002
40523
  args: {}
40003
40524
  });
40004
- var connectedCommand = defineCommand161({
40525
+ var connectedCommand = defineCommand162({
40005
40526
  meta: {
40006
40527
  name: "connected",
40007
40528
  description: `Everything this chat can reach \u2014 managed integrations, custom MCP servers, and connected platforms.
@@ -40060,7 +40581,7 @@ registerSchema({
40060
40581
  description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
40061
40582
  args: {}
40062
40583
  });
40063
- var listCommand14 = defineCommand161({
40584
+ var listCommand14 = defineCommand162({
40064
40585
  meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
40065
40586
  run: async () => {
40066
40587
  try {
@@ -40097,7 +40618,7 @@ registerSchema({
40097
40618
  header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
40098
40619
  }
40099
40620
  });
40100
- var addCommand2 = defineCommand161({
40621
+ var addCommand2 = defineCommand162({
40101
40622
  meta: {
40102
40623
  name: "add",
40103
40624
  description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
@@ -40149,7 +40670,7 @@ registerSchema({
40149
40670
  description: "Remove a company custom MCP server by name.",
40150
40671
  args: { name: { type: "string", description: "Server name to remove", required: true } }
40151
40672
  });
40152
- var removeCommand4 = defineCommand161({
40673
+ var removeCommand4 = defineCommand162({
40153
40674
  meta: {
40154
40675
  name: "remove",
40155
40676
  description: `Remove a company custom MCP server by name.
@@ -40171,7 +40692,7 @@ Example:
40171
40692
  }
40172
40693
  }
40173
40694
  });
40174
- var mcpCommand = defineCommand161({
40695
+ var mcpCommand = defineCommand162({
40175
40696
  meta: {
40176
40697
  name: "mcp",
40177
40698
  description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
@@ -40197,10 +40718,10 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
40197
40718
  });
40198
40719
 
40199
40720
  // src/commands/research/index.ts
40200
- import { defineCommand as defineCommand173 } from "citty";
40721
+ import { defineCommand as defineCommand174 } from "citty";
40201
40722
 
40202
40723
  // src/commands/research/advertisers.ts
40203
- import { defineCommand as defineCommand162 } from "citty";
40724
+ import { defineCommand as defineCommand163 } from "citty";
40204
40725
 
40205
40726
  // src/commands/research/hints.ts
40206
40727
  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.';
@@ -40383,7 +40904,7 @@ var FIELDS3 = {
40383
40904
  etv: "Estimated traffic value (USD)",
40384
40905
  visibility: "SERP visibility score (0-1)"
40385
40906
  };
40386
- var advertisersCommand = defineCommand162({
40907
+ var advertisersCommand = defineCommand163({
40387
40908
  meta: {
40388
40909
  name: "advertisers",
40389
40910
  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).
@@ -40439,7 +40960,7 @@ Examples:
40439
40960
  });
40440
40961
 
40441
40962
  // src/commands/research/autocomplete.ts
40442
- import { defineCommand as defineCommand163 } from "citty";
40963
+ import { defineCommand as defineCommand164 } from "citty";
40443
40964
  registerSchema({
40444
40965
  command: "research.autocomplete",
40445
40966
  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).",
@@ -40462,7 +40983,7 @@ registerSchema({
40462
40983
  var FIELDS4 = {
40463
40984
  suggestion: "Autocomplete suggestion from Google"
40464
40985
  };
40465
- var autocompleteCommand = defineCommand163({
40986
+ var autocompleteCommand = defineCommand164({
40466
40987
  meta: {
40467
40988
  name: "autocomplete",
40468
40989
  description: `Get Google Autocomplete suggestions for keyword expansion.
@@ -40517,7 +41038,7 @@ Examples:
40517
41038
  });
40518
41039
 
40519
41040
  // src/commands/research/countries.ts
40520
- import { defineCommand as defineCommand164 } from "citty";
41041
+ import { defineCommand as defineCommand165 } from "citty";
40521
41042
  registerSchema({
40522
41043
  command: "research.countries",
40523
41044
  description: "List all supported country codes for --location flag in research commands.",
@@ -40574,7 +41095,7 @@ var FIELDS5 = {
40574
41095
  code: "Country code to pass as --location",
40575
41096
  name: "Country name"
40576
41097
  };
40577
- var countriesCommand = defineCommand164({
41098
+ var countriesCommand = defineCommand165({
40578
41099
  meta: {
40579
41100
  name: "countries",
40580
41101
  description: "List all supported country codes for --location flag."
@@ -40585,7 +41106,7 @@ var countriesCommand = defineCommand164({
40585
41106
  });
40586
41107
 
40587
41108
  // src/commands/research/fetch.ts
40588
- import { defineCommand as defineCommand165 } from "citty";
41109
+ import { defineCommand as defineCommand166 } from "citty";
40589
41110
  var CONTENT_PREVIEW_CHARS = 2e4;
40590
41111
  var TIMEOUT_MS = 18e4;
40591
41112
  registerSchema({
@@ -40658,7 +41179,7 @@ function fetchFix(code) {
40658
41179
  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."
40659
41180
  };
40660
41181
  }
40661
- var fetchCommand = defineCommand165({
41182
+ var fetchCommand = defineCommand166({
40662
41183
  meta: {
40663
41184
  name: "fetch",
40664
41185
  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.
@@ -40735,7 +41256,7 @@ Examples:
40735
41256
  });
40736
41257
 
40737
41258
  // src/commands/research/intent.ts
40738
- import { defineCommand as defineCommand166 } from "citty";
41259
+ import { defineCommand as defineCommand167 } from "citty";
40739
41260
  registerSchema({
40740
41261
  command: "research.intent",
40741
41262
  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.",
@@ -40758,7 +41279,7 @@ var FIELDS7 = {
40758
41279
  intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
40759
41280
  probability: "Confidence score 0.0-1.0"
40760
41281
  };
40761
- var intentCommand = defineCommand166({
41282
+ var intentCommand = defineCommand167({
40762
41283
  meta: {
40763
41284
  name: "intent",
40764
41285
  description: `Classify Google Search intent for keywords. Returns intent type and confidence.
@@ -40806,7 +41327,7 @@ Examples:
40806
41327
  });
40807
41328
 
40808
41329
  // src/commands/research/keyword-gap.ts
40809
- import { defineCommand as defineCommand167 } from "citty";
41330
+ import { defineCommand as defineCommand168 } from "citty";
40810
41331
  registerSchema({
40811
41332
  command: "research.keyword-gap",
40812
41333
  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.",
@@ -40835,7 +41356,7 @@ var FIELDS8 = {
40835
41356
  cpc: "Cost per click USD",
40836
41357
  their_position: "Competitor's ranking position"
40837
41358
  };
40838
- var keywordGapCommand = defineCommand167({
41359
+ var keywordGapCommand = defineCommand168({
40839
41360
  meta: {
40840
41361
  name: "keyword-gap",
40841
41362
  description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
@@ -40910,7 +41431,7 @@ Examples:
40910
41431
  });
40911
41432
 
40912
41433
  // src/commands/research/keywords-for-site.ts
40913
- import { defineCommand as defineCommand168 } from "citty";
41434
+ import { defineCommand as defineCommand169 } from "citty";
40914
41435
  registerSchema({
40915
41436
  command: "research.keywords-for-site",
40916
41437
  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.",
@@ -40943,7 +41464,7 @@ var FIELDS9 = {
40943
41464
  competition: "LOW, MEDIUM, or HIGH",
40944
41465
  competition_index: "Competition score 0-100"
40945
41466
  };
40946
- var keywordsForSiteCommand = defineCommand168({
41467
+ var keywordsForSiteCommand = defineCommand169({
40947
41468
  meta: {
40948
41469
  name: "keywords-for-site",
40949
41470
  description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
@@ -41005,7 +41526,7 @@ Examples:
41005
41526
  });
41006
41527
 
41007
41528
  // src/commands/research/languages.ts
41008
- import { defineCommand as defineCommand169 } from "citty";
41529
+ import { defineCommand as defineCommand170 } from "citty";
41009
41530
  registerSchema({
41010
41531
  command: "research.languages",
41011
41532
  description: "List all supported language codes for --language flag in research commands.",
@@ -41035,7 +41556,7 @@ var FIELDS10 = {
41035
41556
  code: "Language code to pass as --language",
41036
41557
  name: "Language name (also accepted by --language)"
41037
41558
  };
41038
- var languagesCommand2 = defineCommand169({
41559
+ var languagesCommand2 = defineCommand170({
41039
41560
  meta: {
41040
41561
  name: "languages",
41041
41562
  description: "List all supported language codes for --language flag."
@@ -41046,7 +41567,7 @@ var languagesCommand2 = defineCommand169({
41046
41567
  });
41047
41568
 
41048
41569
  // src/commands/research/lighthouse.ts
41049
- import { defineCommand as defineCommand170 } from "citty";
41570
+ import { defineCommand as defineCommand171 } from "citty";
41050
41571
  registerSchema({
41051
41572
  command: "research.lighthouse",
41052
41573
  description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
@@ -41065,7 +41586,7 @@ var FIELDS11 = {
41065
41586
  speed_index_ms: "Speed Index in ms (good: < 3400)",
41066
41587
  interactive_ms: "Time to Interactive in ms (good: < 3800)"
41067
41588
  };
41068
- var lighthouseCommand = defineCommand170({
41589
+ var lighthouseCommand = defineCommand171({
41069
41590
  meta: {
41070
41591
  name: "lighthouse",
41071
41592
  description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
@@ -41103,7 +41624,7 @@ Examples:
41103
41624
  });
41104
41625
 
41105
41626
  // src/commands/research/relevant-pages.ts
41106
- import { defineCommand as defineCommand171 } from "citty";
41627
+ import { defineCommand as defineCommand172 } from "citty";
41107
41628
  registerSchema({
41108
41629
  command: "research.relevant-pages",
41109
41630
  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).",
@@ -41129,7 +41650,7 @@ var FIELDS12 = {
41129
41650
  keywords: "Total organic keywords the page ranks for",
41130
41651
  top_10: "Keywords in positions 1-10"
41131
41652
  };
41132
- var relevantPagesCommand = defineCommand171({
41653
+ var relevantPagesCommand = defineCommand172({
41133
41654
  meta: {
41134
41655
  name: "relevant-pages",
41135
41656
  description: `Get the top pages of a competitor domain with traffic data.
@@ -41176,7 +41697,7 @@ Examples:
41176
41697
  });
41177
41698
 
41178
41699
  // src/commands/research/web.ts
41179
- import { defineCommand as defineCommand172 } from "citty";
41700
+ import { defineCommand as defineCommand173 } from "citty";
41180
41701
  registerSchema({
41181
41702
  command: "research.web",
41182
41703
  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).",
@@ -41227,7 +41748,7 @@ async function runDeepResearch(question) {
41227
41748
  }
41228
41749
  throw new Error("Deep research timed out");
41229
41750
  }
41230
- var webCommand = defineCommand172({
41751
+ var webCommand = defineCommand173({
41231
41752
  meta: {
41232
41753
  name: "web",
41233
41754
  description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
@@ -41289,7 +41810,7 @@ Examples:
41289
41810
  });
41290
41811
 
41291
41812
  // src/commands/research/index.ts
41292
- var researchCommand = defineCommand173({
41813
+ var researchCommand = defineCommand174({
41293
41814
  meta: {
41294
41815
  name: "research",
41295
41816
  description: `Competitive intelligence and AI-powered research commands.
@@ -41333,10 +41854,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
41333
41854
  });
41334
41855
 
41335
41856
  // src/commands/scheduled-actions/index.ts
41336
- import { defineCommand as defineCommand181 } from "citty";
41857
+ import { defineCommand as defineCommand182 } from "citty";
41337
41858
 
41338
41859
  // src/commands/scheduled-actions/create.ts
41339
- import { defineCommand as defineCommand174 } from "citty";
41860
+ import { defineCommand as defineCommand175 } from "citty";
41340
41861
 
41341
41862
  // src/commands/scheduled-actions/shared.ts
41342
41863
  var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
@@ -41456,7 +41977,7 @@ registerSchema({
41456
41977
  }
41457
41978
  }
41458
41979
  });
41459
- var createCommand3 = defineCommand174({
41980
+ var createCommand3 = defineCommand175({
41460
41981
  meta: {
41461
41982
  name: "create",
41462
41983
  description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
@@ -41509,7 +42030,7 @@ var createCommand3 = defineCommand174({
41509
42030
  });
41510
42031
 
41511
42032
  // src/commands/scheduled-actions/delete.ts
41512
- import { defineCommand as defineCommand175 } from "citty";
42033
+ import { defineCommand as defineCommand176 } from "citty";
41513
42034
  registerSchema({
41514
42035
  command: "scheduled-actions.delete",
41515
42036
  description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
@@ -41517,7 +42038,7 @@ registerSchema({
41517
42038
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
41518
42039
  }
41519
42040
  });
41520
- var deleteCommand3 = defineCommand175({
42041
+ var deleteCommand3 = defineCommand176({
41521
42042
  meta: {
41522
42043
  name: "delete",
41523
42044
  description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
@@ -41546,7 +42067,7 @@ var deleteCommand3 = defineCommand175({
41546
42067
  });
41547
42068
 
41548
42069
  // src/commands/scheduled-actions/get.ts
41549
- import { defineCommand as defineCommand176 } from "citty";
42070
+ import { defineCommand as defineCommand177 } from "citty";
41550
42071
  registerSchema({
41551
42072
  command: "scheduled-actions.get",
41552
42073
  description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
@@ -41555,7 +42076,7 @@ registerSchema({
41555
42076
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
41556
42077
  }
41557
42078
  });
41558
- var getCommand4 = defineCommand176({
42079
+ var getCommand4 = defineCommand177({
41559
42080
  meta: {
41560
42081
  name: "get",
41561
42082
  description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
@@ -41594,7 +42115,7 @@ var getCommand4 = defineCommand176({
41594
42115
  });
41595
42116
 
41596
42117
  // src/commands/scheduled-actions/list.ts
41597
- import { defineCommand as defineCommand177 } from "citty";
42118
+ import { defineCommand as defineCommand178 } from "citty";
41598
42119
  registerSchema({
41599
42120
  command: "scheduled-actions.list",
41600
42121
  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.",
@@ -41602,7 +42123,7 @@ registerSchema({
41602
42123
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
41603
42124
  }
41604
42125
  });
41605
- var listCommand15 = defineCommand177({
42126
+ var listCommand15 = defineCommand178({
41606
42127
  meta: {
41607
42128
  name: "list",
41608
42129
  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."
@@ -41627,7 +42148,7 @@ var listCommand15 = defineCommand177({
41627
42148
  // src/commands/scheduled-actions/templates.ts
41628
42149
  import { readFile as readFile24 } from "fs/promises";
41629
42150
  import path37 from "path";
41630
- import { defineCommand as defineCommand178 } from "citty";
42151
+ import { defineCommand as defineCommand179 } from "citty";
41631
42152
  registerSchema({
41632
42153
  command: "scheduled-actions.templates",
41633
42154
  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.",
@@ -41682,7 +42203,7 @@ registerSchema({
41682
42203
  }
41683
42204
  }
41684
42205
  });
41685
- var templatesCommand = defineCommand178({
42206
+ var templatesCommand = defineCommand179({
41686
42207
  meta: {
41687
42208
  name: "templates",
41688
42209
  description: `The recipes this company can run \u2014 Baker's own plus theirs, with what each one produces.
@@ -41774,7 +42295,7 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
41774
42295
  });
41775
42296
 
41776
42297
  // src/commands/scheduled-actions/trigger.ts
41777
- import { defineCommand as defineCommand179 } from "citty";
42298
+ import { defineCommand as defineCommand180 } from "citty";
41778
42299
  registerSchema({
41779
42300
  command: "scheduled-actions.trigger",
41780
42301
  description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
@@ -41782,7 +42303,7 @@ registerSchema({
41782
42303
  id: { type: "string", description: "Published scheduled action ID", required: true }
41783
42304
  }
41784
42305
  });
41785
- var triggerCommand = defineCommand179({
42306
+ var triggerCommand = defineCommand180({
41786
42307
  meta: {
41787
42308
  name: "trigger",
41788
42309
  description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
@@ -41819,7 +42340,7 @@ var triggerCommand = defineCommand179({
41819
42340
  });
41820
42341
 
41821
42342
  // src/commands/scheduled-actions/update.ts
41822
- import { defineCommand as defineCommand180 } from "citty";
42343
+ import { defineCommand as defineCommand181 } from "citty";
41823
42344
  registerSchema({
41824
42345
  command: "scheduled-actions.update",
41825
42346
  description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
@@ -41844,7 +42365,7 @@ registerSchema({
41844
42365
  prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
41845
42366
  }
41846
42367
  });
41847
- var updateCommand3 = defineCommand180({
42368
+ var updateCommand3 = defineCommand181({
41848
42369
  meta: {
41849
42370
  name: "update",
41850
42371
  description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
@@ -41915,7 +42436,7 @@ var updateCommand3 = defineCommand180({
41915
42436
  });
41916
42437
 
41917
42438
  // src/commands/scheduled-actions/index.ts
41918
- var scheduledActionsCommand = defineCommand181({
42439
+ var scheduledActionsCommand = defineCommand182({
41919
42440
  meta: {
41920
42441
  name: "scheduled-actions",
41921
42442
  description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger, templates.
@@ -41943,14 +42464,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
41943
42464
  });
41944
42465
 
41945
42466
  // src/commands/schema.ts
41946
- import { defineCommand as defineCommand182 } from "citty";
42467
+ import { defineCommand as defineCommand183 } from "citty";
41947
42468
  function narrowToFamily(commandName, available) {
41948
42469
  const segments = commandName.split(".");
41949
42470
  const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
41950
42471
  const siblings = available.filter((name) => name.startsWith(prefix));
41951
42472
  return siblings.length > 0 ? siblings : available;
41952
42473
  }
41953
- var schemaCommand = defineCommand182({
42474
+ var schemaCommand = defineCommand183({
41954
42475
  meta: {
41955
42476
  name: "schema",
41956
42477
  description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
@@ -41994,10 +42515,10 @@ var schemaCommand = defineCommand182({
41994
42515
  });
41995
42516
 
41996
42517
  // src/commands/studio/index.ts
41997
- import { defineCommand as defineCommand191 } from "citty";
42518
+ import { defineCommand as defineCommand192 } from "citty";
41998
42519
 
41999
42520
  // src/commands/studio/animate.ts
42000
- import { defineCommand as defineCommand183 } from "citty";
42521
+ import { defineCommand as defineCommand184 } from "citty";
42001
42522
 
42002
42523
  // src/commands/studio/batch.ts
42003
42524
  function projectBatch(generation, full) {
@@ -42448,7 +42969,7 @@ function costHintsFor(body) {
42448
42969
  }
42449
42970
  return hints;
42450
42971
  }
42451
- var animateCommand = defineCommand183({
42972
+ var animateCommand = defineCommand184({
42452
42973
  meta: {
42453
42974
  name: "animate",
42454
42975
  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"
@@ -42567,7 +43088,7 @@ var animateCommand = defineCommand183({
42567
43088
  });
42568
43089
 
42569
43090
  // src/commands/studio/generate.ts
42570
- import { defineCommand as defineCommand184 } from "citty";
43091
+ import { defineCommand as defineCommand185 } from "citty";
42571
43092
  var MODEL_LIST2 = IMAGE_MODEL_IDS;
42572
43093
  var DEFAULT_MAX_WAIT_MS2 = 24e4;
42573
43094
  registerSchema({
@@ -42703,7 +43224,7 @@ function buildGenerateBody(args, prompt) {
42703
43224
  }
42704
43225
  return body;
42705
43226
  }
42706
- var generateCommand = defineCommand184({
43227
+ var generateCommand = defineCommand185({
42707
43228
  meta: {
42708
43229
  name: "generate",
42709
43230
  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]]'"
@@ -42781,7 +43302,7 @@ var generateCommand = defineCommand184({
42781
43302
  });
42782
43303
 
42783
43304
  // src/commands/studio/get.ts
42784
- import { defineCommand as defineCommand185 } from "citty";
43305
+ import { defineCommand as defineCommand186 } from "citty";
42785
43306
  registerSchema({
42786
43307
  command: "studio.get",
42787
43308
  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.",
@@ -42790,7 +43311,7 @@ registerSchema({
42790
43311
  full: { type: "boolean", description: "Include settings, references and attribution", required: false }
42791
43312
  }
42792
43313
  });
42793
- var getCommand5 = defineCommand185({
43314
+ var getCommand5 = defineCommand186({
42794
43315
  meta: {
42795
43316
  name: "get",
42796
43317
  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"
@@ -42819,7 +43340,7 @@ var getCommand5 = defineCommand185({
42819
43340
  });
42820
43341
 
42821
43342
  // src/commands/studio/improve.ts
42822
- import { defineCommand as defineCommand186 } from "citty";
43343
+ import { defineCommand as defineCommand187 } from "citty";
42823
43344
  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.";
42824
43345
  registerSchema({
42825
43346
  command: "studio.improve",
@@ -42844,7 +43365,7 @@ registerSchema({
42844
43365
  }
42845
43366
  }
42846
43367
  });
42847
- var improveCommand = defineCommand186({
43368
+ var improveCommand = defineCommand187({
42848
43369
  meta: {
42849
43370
  name: "improve",
42850
43371
  description: `${DESCRIPTION}
@@ -42888,7 +43409,7 @@ Examples:
42888
43409
  });
42889
43410
 
42890
43411
  // src/commands/studio/keep.ts
42891
- import { defineCommand as defineCommand187 } from "citty";
43412
+ import { defineCommand as defineCommand188 } from "citty";
42892
43413
  registerSchema({
42893
43414
  command: "studio.keep",
42894
43415
  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.",
@@ -42898,7 +43419,7 @@ registerSchema({
42898
43419
  undo: { type: "boolean", description: "Un-star an image, or take a kept clip back out", required: false }
42899
43420
  }
42900
43421
  });
42901
- var keepCommand = defineCommand187({
43422
+ var keepCommand = defineCommand188({
42902
43423
  meta: {
42903
43424
  name: "keep",
42904
43425
  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"
@@ -42949,7 +43470,7 @@ var keepCommand = defineCommand187({
42949
43470
  });
42950
43471
 
42951
43472
  // src/commands/studio/list.ts
42952
- import { defineCommand as defineCommand188 } from "citty";
43473
+ import { defineCommand as defineCommand189 } from "citty";
42953
43474
  registerSchema({
42954
43475
  command: "studio.list",
42955
43476
  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.",
@@ -42960,7 +43481,7 @@ registerSchema({
42960
43481
  full: { type: "boolean", description: "Include settings, references and attribution", required: false }
42961
43482
  }
42962
43483
  });
42963
- var listCommand16 = defineCommand188({
43484
+ var listCommand16 = defineCommand189({
42964
43485
  meta: {
42965
43486
  name: "list",
42966
43487
  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"
@@ -42994,7 +43515,7 @@ var listCommand16 = defineCommand188({
42994
43515
  });
42995
43516
 
42996
43517
  // src/commands/studio/models.ts
42997
- import { defineCommand as defineCommand189 } from "citty";
43518
+ import { defineCommand as defineCommand190 } from "citty";
42998
43519
  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.";
42999
43520
  registerSchema({
43000
43521
  command: "studio.models",
@@ -43081,7 +43602,7 @@ function buildModelCards(kind, model) {
43081
43602
  const selected = model ? ids.filter((id) => id === model) : ids;
43082
43603
  return selected.map((id) => build(id));
43083
43604
  }
43084
- var modelsCommand = defineCommand189({
43605
+ var modelsCommand = defineCommand190({
43085
43606
  meta: {
43086
43607
  name: "models",
43087
43608
  description: `${DESCRIPTION2}
@@ -43128,13 +43649,13 @@ Examples:
43128
43649
  });
43129
43650
 
43130
43651
  // src/commands/studio/skills.ts
43131
- import { defineCommand as defineCommand190 } from "citty";
43652
+ import { defineCommand as defineCommand191 } from "citty";
43132
43653
  registerSchema({
43133
43654
  command: "studio.skills",
43134
43655
  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.",
43135
43656
  args: {}
43136
43657
  });
43137
- var skillsCommand = defineCommand190({
43658
+ var skillsCommand = defineCommand191({
43138
43659
  meta: {
43139
43660
  name: "skills",
43140
43661
  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"
@@ -43158,7 +43679,7 @@ var skillsCommand = defineCommand190({
43158
43679
  });
43159
43680
 
43160
43681
  // src/commands/studio/index.ts
43161
- var studioCommand = defineCommand191({
43682
+ var studioCommand = defineCommand192({
43162
43683
  meta: {
43163
43684
  name: "studio",
43164
43685
  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.
@@ -43201,10 +43722,10 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
43201
43722
  });
43202
43723
 
43203
43724
  // src/commands/tag-manager/index.ts
43204
- import { defineCommand as defineCommand195 } from "citty";
43725
+ import { defineCommand as defineCommand196 } from "citty";
43205
43726
 
43206
43727
  // src/commands/tag-manager/draft.ts
43207
- import { defineCommand as defineCommand192 } from "citty";
43728
+ import { defineCommand as defineCommand193 } from "citty";
43208
43729
 
43209
43730
  // src/commands/tag-manager/shared.ts
43210
43731
  import { readFileSync as readFileSync13 } from "fs";
@@ -43238,7 +43759,7 @@ function loadJsonArg2(args, flag = "json") {
43238
43759
  }
43239
43760
  }
43240
43761
  var RETRYABLE_CODES2 = /* @__PURE__ */ new Set(["RATE_LIMITED", "INTERNAL_ERROR", "NETWORK_ERROR", "TIMEOUT"]);
43241
- function handleError4(err) {
43762
+ function handleError5(err) {
43242
43763
  if (err instanceof ApiError) {
43243
43764
  writeJsonEnvelope({
43244
43765
  ok: false,
@@ -43268,7 +43789,7 @@ async function stageOp4(op) {
43268
43789
  const data = await apiPost("/api/tag-manager/draft/stage", { chatId, op });
43269
43790
  writeJsonEnvelope({ ok: true, data, hints: STAGE_HINTS2 });
43270
43791
  } catch (err) {
43271
- handleError4(err);
43792
+ handleError5(err);
43272
43793
  }
43273
43794
  }
43274
43795
  async function draftAction3(path39, body, chat) {
@@ -43278,7 +43799,7 @@ async function draftAction3(path39, body, chat) {
43278
43799
  writeJsonEnvelope({ ok: true, data });
43279
43800
  return data;
43280
43801
  } catch (err) {
43281
- handleError4(err);
43802
+ handleError5(err);
43282
43803
  }
43283
43804
  }
43284
43805
  function renderDraft2(response) {
@@ -43314,7 +43835,7 @@ async function draftList2(json, chat) {
43314
43835
  process.stdout.write(`${renderDraft2(data)}
43315
43836
  `);
43316
43837
  } catch (err) {
43317
- handleError4(err);
43838
+ handleError5(err);
43318
43839
  }
43319
43840
  }
43320
43841
 
@@ -43327,13 +43848,13 @@ registerSchema({
43327
43848
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
43328
43849
  }
43329
43850
  });
43330
- var draftCommand4 = defineCommand192({
43851
+ var draftCommand4 = defineCommand193({
43331
43852
  meta: {
43332
43853
  name: "draft",
43333
43854
  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."
43334
43855
  },
43335
43856
  subCommands: {
43336
- list: defineCommand192({
43857
+ list: defineCommand193({
43337
43858
  meta: {
43338
43859
  name: "list",
43339
43860
  description: "Review everything staged on this chat (--json for the raw envelope)"
@@ -43346,7 +43867,7 @@ var draftCommand4 = defineCommand192({
43346
43867
  await draftList2(args.json === true, args.chat);
43347
43868
  }
43348
43869
  }),
43349
- show: defineCommand192({
43870
+ show: defineCommand193({
43350
43871
  meta: {
43351
43872
  name: "show",
43352
43873
  description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
@@ -43363,7 +43884,7 @@ var draftCommand4 = defineCommand192({
43363
43884
  );
43364
43885
  }
43365
43886
  }),
43366
- amend: defineCommand192({
43887
+ amend: defineCommand193({
43367
43888
  meta: {
43368
43889
  name: "amend",
43369
43890
  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."
@@ -43380,7 +43901,7 @@ var draftCommand4 = defineCommand192({
43380
43901
  });
43381
43902
  }
43382
43903
  }),
43383
- remove: defineCommand192({
43904
+ remove: defineCommand193({
43384
43905
  meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
43385
43906
  args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
43386
43907
  run: async ({ args }) => {
@@ -43389,7 +43910,7 @@ var draftCommand4 = defineCommand192({
43389
43910
  });
43390
43911
  }
43391
43912
  }),
43392
- clear: defineCommand192({
43913
+ clear: defineCommand193({
43393
43914
  meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
43394
43915
  run: async () => {
43395
43916
  await draftAction3("/api/tag-manager/draft/clear", {});
@@ -43399,7 +43920,7 @@ var draftCommand4 = defineCommand192({
43399
43920
  });
43400
43921
 
43401
43922
  // src/commands/tag-manager/read.ts
43402
- import { defineCommand as defineCommand193 } from "citty";
43923
+ import { defineCommand as defineCommand194 } from "citty";
43403
43924
  registerSchema({
43404
43925
  command: "tagManager.containers",
43405
43926
  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.",
@@ -43440,7 +43961,7 @@ function containersHints(containers) {
43440
43961
  }))
43441
43962
  });
43442
43963
  }
43443
- var containersCommand = defineCommand193({
43964
+ var containersCommand = defineCommand194({
43444
43965
  meta: {
43445
43966
  name: "containers",
43446
43967
  description: `List Tag Manager containers reachable by this company's connection.
@@ -43453,11 +43974,11 @@ Start here:
43453
43974
  const data = await apiGet("/api/tag-manager/containers");
43454
43975
  writeJsonEnvelope({ ok: true, data, hints: containersHints(data.containers) });
43455
43976
  } catch (err) {
43456
- handleError4(err);
43977
+ handleError5(err);
43457
43978
  }
43458
43979
  }
43459
43980
  });
43460
- var readCommand = defineCommand193({
43981
+ var readCommand = defineCommand194({
43461
43982
  meta: {
43462
43983
  name: "read",
43463
43984
  description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
@@ -43493,13 +44014,13 @@ Examples:
43493
44014
  );
43494
44015
  writeJsonEnvelope({ ok: true, data, hints });
43495
44016
  } catch (err) {
43496
- handleError4(err);
44017
+ handleError5(err);
43497
44018
  }
43498
44019
  }
43499
44020
  });
43500
44021
 
43501
44022
  // src/commands/tag-manager/write-commands.ts
43502
- import { defineCommand as defineCommand194 } from "citty";
44023
+ import { defineCommand as defineCommand195 } from "citty";
43503
44024
  var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
43504
44025
  var ENTITIES = [
43505
44026
  {
@@ -43555,10 +44076,10 @@ for (const { entity, noun, createHint } of ENTITIES) {
43555
44076
  });
43556
44077
  }
43557
44078
  function entityCommand(entity, noun, example) {
43558
- return defineCommand194({
44079
+ return defineCommand195({
43559
44080
  meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
43560
44081
  subCommands: {
43561
- create: defineCommand194({
44082
+ create: defineCommand195({
43562
44083
  meta: {
43563
44084
  name: "create",
43564
44085
  description: `Stage a new ${noun}
@@ -43580,7 +44101,7 @@ Examples:
43580
44101
  });
43581
44102
  }
43582
44103
  }),
43583
- update: defineCommand194({
44104
+ update: defineCommand195({
43584
44105
  meta: {
43585
44106
  name: "update",
43586
44107
  description: `Stage an update to an existing ${noun} (pass its id or path)`
@@ -43600,7 +44121,7 @@ Examples:
43600
44121
  });
43601
44122
  }
43602
44123
  }),
43603
- delete: defineCommand194({
44124
+ delete: defineCommand195({
43604
44125
  meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
43605
44126
  args: {
43606
44127
  id: { type: "positional", description: `${noun} id or path`, required: false },
@@ -43641,7 +44162,7 @@ function builtinTypes(args) {
43641
44162
  }
43642
44163
  return raw.split(",").map((entry) => entry.trim());
43643
44164
  }
43644
- var builtinCommand = defineCommand194({
44165
+ var builtinCommand = defineCommand195({
43645
44166
  meta: {
43646
44167
  name: "builtin",
43647
44168
  description: `Enable or disable built-in variables
@@ -43651,7 +44172,7 @@ Examples:
43651
44172
  baker tag-manager builtin disable --types formId`
43652
44173
  },
43653
44174
  subCommands: {
43654
- enable: defineCommand194({
44175
+ enable: defineCommand195({
43655
44176
  meta: { name: "enable", description: "Stage enabling built-in variables" },
43656
44177
  args: {
43657
44178
  types: { type: "string", description: "Comma-separated types", required: false },
@@ -43665,7 +44186,7 @@ Examples:
43665
44186
  });
43666
44187
  }
43667
44188
  }),
43668
- disable: defineCommand194({
44189
+ disable: defineCommand195({
43669
44190
  meta: { name: "disable", description: "Stage disabling built-in variables" },
43670
44191
  args: {
43671
44192
  types: { type: "string", description: "Comma-separated types", required: false },
@@ -43683,7 +44204,7 @@ Examples:
43683
44204
  });
43684
44205
 
43685
44206
  // src/commands/tag-manager/index.ts
43686
- var tagManagerCommand = defineCommand195({
44207
+ var tagManagerCommand = defineCommand196({
43687
44208
  meta: {
43688
44209
  name: "tag-manager",
43689
44210
  description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
@@ -43720,7 +44241,7 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
43720
44241
  });
43721
44242
 
43722
44243
  // src/commands/tags/index.ts
43723
- import { defineCommand as defineCommand196 } from "citty";
44244
+ import { defineCommand as defineCommand197 } from "citty";
43724
44245
 
43725
44246
  // src/commands/tags/shared.ts
43726
44247
  function failApi3(err) {
@@ -43789,7 +44310,7 @@ async function listTags(json) {
43789
44310
  var listArgs9 = {
43790
44311
  json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
43791
44312
  };
43792
- var listCommand17 = defineCommand196({
44313
+ var listCommand17 = defineCommand197({
43793
44314
  meta: {
43794
44315
  name: "list",
43795
44316
  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"
@@ -43808,7 +44329,7 @@ async function listDraft3(chat) {
43808
44329
  failApi3(err);
43809
44330
  }
43810
44331
  }
43811
- var draftCommand5 = defineCommand196({
44332
+ var draftCommand5 = defineCommand197({
43812
44333
  meta: {
43813
44334
  name: "draft",
43814
44335
  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."
@@ -43818,7 +44339,7 @@ var draftCommand5 = defineCommand196({
43818
44339
  await listDraft3(args.chat);
43819
44340
  }
43820
44341
  });
43821
- var tagsCommand3 = defineCommand196({
44342
+ var tagsCommand4 = defineCommand197({
43822
44343
  meta: {
43823
44344
  name: "tags",
43824
44345
  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.
@@ -43847,10 +44368,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
43847
44368
  });
43848
44369
 
43849
44370
  // src/commands/testimonials/index.ts
43850
- import { defineCommand as defineCommand200 } from "citty";
44371
+ import { defineCommand as defineCommand201 } from "citty";
43851
44372
 
43852
44373
  // src/commands/testimonials/get.ts
43853
- import { defineCommand as defineCommand197 } from "citty";
44374
+ import { defineCommand as defineCommand198 } from "citty";
43854
44375
  registerSchema({
43855
44376
  command: "testimonials.get",
43856
44377
  description: "Get a single testimonial by ID",
@@ -43858,7 +44379,7 @@ registerSchema({
43858
44379
  id: { type: "string", description: "Testimonial ID", required: true }
43859
44380
  }
43860
44381
  });
43861
- var getCommand6 = defineCommand197({
44382
+ var getCommand6 = defineCommand198({
43862
44383
  meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
43863
44384
  args: {
43864
44385
  id: { type: "positional", description: "Testimonial ID", required: false },
@@ -43895,7 +44416,7 @@ var getCommand6 = defineCommand197({
43895
44416
  });
43896
44417
 
43897
44418
  // src/commands/testimonials/list.ts
43898
- import { defineCommand as defineCommand198 } from "citty";
44419
+ import { defineCommand as defineCommand199 } from "citty";
43899
44420
 
43900
44421
  // src/commands/testimonials/emptyCorpusHints.ts
43901
44422
  function resolveEmptyReason({
@@ -44030,7 +44551,7 @@ function buildListParams(args) {
44030
44551
  }
44031
44552
  return params;
44032
44553
  }
44033
- var listCommand18 = defineCommand198({
44554
+ var listCommand18 = defineCommand199({
44034
44555
  meta: {
44035
44556
  name: "list",
44036
44557
  description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
@@ -44082,7 +44603,7 @@ var listCommand18 = defineCommand198({
44082
44603
  });
44083
44604
 
44084
44605
  // src/commands/testimonials/search.ts
44085
- import { defineCommand as defineCommand199 } from "citty";
44606
+ import { defineCommand as defineCommand200 } from "citty";
44086
44607
  var FILTER_FLAGS2 = ["source", "rating-min", "rating-max", "status", "sentiment", "language", "tags"];
44087
44608
  function languageBiasHint(results, requestedLanguage) {
44088
44609
  if (requestedLanguage) {
@@ -44161,7 +44682,7 @@ function buildSearchRequest(query, args) {
44161
44682
  }
44162
44683
  return body;
44163
44684
  }
44164
- var searchCommand3 = defineCommand199({
44685
+ var searchCommand3 = defineCommand200({
44165
44686
  meta: {
44166
44687
  name: "search",
44167
44688
  description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
@@ -44222,10 +44743,10 @@ var searchCommand3 = defineCommand199({
44222
44743
  });
44223
44744
 
44224
44745
  // src/commands/testimonials/tags.ts
44225
- var tagsCommand4 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
44746
+ var tagsCommand5 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
44226
44747
 
44227
44748
  // src/commands/testimonials/index.ts
44228
- var testimonialsCommand = defineCommand200({
44749
+ var testimonialsCommand = defineCommand201({
44229
44750
  meta: {
44230
44751
  name: "testimonials",
44231
44752
  description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
@@ -44242,15 +44763,15 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
44242
44763
  get: getCommand6,
44243
44764
  search: searchCommand3,
44244
44765
  list: listCommand18,
44245
- tags: tagsCommand4
44766
+ tags: tagsCommand5
44246
44767
  }
44247
44768
  });
44248
44769
 
44249
44770
  // src/commands/videos/index.ts
44250
- import { defineCommand as defineCommand207 } from "citty";
44771
+ import { defineCommand as defineCommand208 } from "citty";
44251
44772
 
44252
44773
  // src/commands/videos/delete.ts
44253
- import { defineCommand as defineCommand201 } from "citty";
44774
+ import { defineCommand as defineCommand202 } from "citty";
44254
44775
  registerSchema({
44255
44776
  command: "videos.delete",
44256
44777
  description: "Delete a video by ID",
@@ -44264,7 +44785,7 @@ registerSchema({
44264
44785
  }
44265
44786
  }
44266
44787
  });
44267
- var deleteCommand4 = defineCommand201({
44788
+ var deleteCommand4 = defineCommand202({
44268
44789
  meta: {
44269
44790
  name: "delete",
44270
44791
  description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
@@ -44305,7 +44826,7 @@ var deleteCommand4 = defineCommand201({
44305
44826
  });
44306
44827
 
44307
44828
  // src/commands/videos/get.ts
44308
- import { defineCommand as defineCommand202 } from "citty";
44829
+ import { defineCommand as defineCommand203 } from "citty";
44309
44830
  registerSchema({
44310
44831
  command: "videos.get",
44311
44832
  description: "Get a single video by ID",
@@ -44313,7 +44834,7 @@ registerSchema({
44313
44834
  id: { type: "string", description: "Video ID", required: true }
44314
44835
  }
44315
44836
  });
44316
- var getCommand7 = defineCommand202({
44837
+ var getCommand7 = defineCommand203({
44317
44838
  meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
44318
44839
  args: {
44319
44840
  id: { type: "positional", description: "Video ID", required: false },
@@ -44350,7 +44871,7 @@ var getCommand7 = defineCommand202({
44350
44871
  });
44351
44872
 
44352
44873
  // src/commands/videos/group.ts
44353
- import { defineCommand as defineCommand203 } from "citty";
44874
+ import { defineCommand as defineCommand204 } from "citty";
44354
44875
  registerSchema({
44355
44876
  command: "videos.group",
44356
44877
  description: "List every clip and image that arrived in the same set as this video (carousel slides, one page)",
@@ -44359,7 +44880,7 @@ registerSchema({
44359
44880
  "group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
44360
44881
  }
44361
44882
  });
44362
- var groupCommand2 = defineCommand203({
44883
+ var groupCommand2 = defineCommand204({
44363
44884
  meta: {
44364
44885
  name: "group",
44365
44886
  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>"
@@ -44382,7 +44903,7 @@ var groupCommand2 = defineCommand203({
44382
44903
  import { mkdtemp as mkdtemp2, rm as rm7, stat as stat7 } from "fs/promises";
44383
44904
  import { tmpdir as tmpdir3 } from "os";
44384
44905
  import path38 from "path";
44385
- import { defineCommand as defineCommand204 } from "citty";
44906
+ import { defineCommand as defineCommand205 } from "citty";
44386
44907
 
44387
44908
  // src/lib/streamUpload.ts
44388
44909
  import { createHash as createHash2 } from "crypto";
@@ -44546,7 +45067,7 @@ registerSchema({
44546
45067
  "dry-run": { type: "boolean", description: "Preview the operation without executing", required: false }
44547
45068
  }
44548
45069
  });
44549
- var ingestCommand2 = defineCommand204({
45070
+ var ingestCommand2 = defineCommand205({
44550
45071
  meta: {
44551
45072
  name: "ingest",
44552
45073
  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"
@@ -44808,7 +45329,7 @@ async function uploadToAssetStore(filePath, sizeBytes) {
44808
45329
  }
44809
45330
 
44810
45331
  // src/commands/videos/search.ts
44811
- import { defineCommand as defineCommand205 } from "citty";
45332
+ import { defineCommand as defineCommand206 } from "citty";
44812
45333
  registerSchema({
44813
45334
  command: "videos.search",
44814
45335
  description: "Search videos by text query. Only returns ready videos.",
@@ -44818,7 +45339,7 @@ registerSchema({
44818
45339
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
44819
45340
  }
44820
45341
  });
44821
- var searchCommand4 = defineCommand205({
45342
+ var searchCommand4 = defineCommand206({
44822
45343
  meta: {
44823
45344
  name: "search",
44824
45345
  description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
@@ -44865,12 +45386,12 @@ var searchCommand4 = defineCommand205({
44865
45386
  });
44866
45387
 
44867
45388
  // src/commands/videos/tags.ts
44868
- var tagsCommand5 = makeTagsCommand("videos", "video", "/api/videos/tags");
45389
+ var tagsCommand6 = makeTagsCommand("videos", "video", "/api/videos/tags");
44869
45390
 
44870
45391
  // src/commands/videos/upload.ts
44871
45392
  import { readFile as readFile25, stat as stat8 } from "fs/promises";
44872
45393
  import { basename as basename3, extname as extname4 } from "path";
44873
- import { defineCommand as defineCommand206 } from "citty";
45394
+ import { defineCommand as defineCommand207 } from "citty";
44874
45395
  var MIME_MAP = {
44875
45396
  ".mp4": "video/mp4",
44876
45397
  ".mov": "video/quicktime",
@@ -44912,7 +45433,7 @@ function detectContentType(filePath) {
44912
45433
  function isRemoteUrl3(value) {
44913
45434
  return /^https?:\/\//i.test(value);
44914
45435
  }
44915
- var uploadCommand2 = defineCommand206({
45436
+ var uploadCommand2 = defineCommand207({
44916
45437
  meta: {
44917
45438
  name: "upload",
44918
45439
  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"
@@ -44996,7 +45517,7 @@ var uploadCommand2 = defineCommand206({
44996
45517
  });
44997
45518
 
44998
45519
  // src/commands/videos/index.ts
44999
- var videosCommand = defineCommand207({
45520
+ var videosCommand = defineCommand208({
45000
45521
  meta: {
45001
45522
  name: "videos",
45002
45523
  description: `Find and manage videos in Baker. Subcommands: search, get, upload, ingest, delete, tags.
@@ -45018,15 +45539,15 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
45018
45539
  upload: uploadCommand2,
45019
45540
  ingest: ingestCommand2,
45020
45541
  delete: deleteCommand4,
45021
- tags: tagsCommand5
45542
+ tags: tagsCommand6
45022
45543
  }
45023
45544
  });
45024
45545
 
45025
45546
  // src/commands/winning-ads/index.ts
45026
- import { defineCommand as defineCommand220 } from "citty";
45547
+ import { defineCommand as defineCommand221 } from "citty";
45027
45548
 
45028
45549
  // src/commands/winning-ads/advertisers.ts
45029
- import { defineCommand as defineCommand208 } from "citty";
45550
+ import { defineCommand as defineCommand209 } from "citty";
45030
45551
 
45031
45552
  // src/commands/winning-ads/shared.ts
45032
45553
  function splitList2(value) {
@@ -45079,7 +45600,7 @@ function advertiserNormalizer(record, full) {
45079
45600
  last_synced_at: record.last_synced_at ?? null
45080
45601
  };
45081
45602
  }
45082
- var advertisersCommand2 = defineCommand208({
45603
+ var advertisersCommand2 = defineCommand209({
45083
45604
  meta: {
45084
45605
  name: "advertisers",
45085
45606
  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'
@@ -45137,7 +45658,7 @@ var advertisersCommand2 = defineCommand208({
45137
45658
  });
45138
45659
 
45139
45660
  // src/commands/winning-ads/brief.ts
45140
- import { defineCommand as defineCommand209 } from "citty";
45661
+ import { defineCommand as defineCommand210 } from "citty";
45141
45662
  registerSchema({
45142
45663
  command: "winning-ads.brief",
45143
45664
  description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
@@ -45183,7 +45704,7 @@ function parseDna(raw) {
45183
45704
  }
45184
45705
  return parsed;
45185
45706
  }
45186
- var briefCommand = defineCommand209({
45707
+ var briefCommand = defineCommand210({
45187
45708
  meta: {
45188
45709
  name: "brief",
45189
45710
  description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
@@ -45219,7 +45740,7 @@ var briefCommand = defineCommand209({
45219
45740
  });
45220
45741
 
45221
45742
  // src/commands/winning-ads/content.ts
45222
- import { defineCommand as defineCommand210 } from "citty";
45743
+ import { defineCommand as defineCommand211 } from "citty";
45223
45744
  registerSchema({
45224
45745
  command: "winning-ads.content",
45225
45746
  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.",
@@ -45232,7 +45753,7 @@ registerSchema({
45232
45753
  }
45233
45754
  }
45234
45755
  });
45235
- var contentCommand = defineCommand210({
45756
+ var contentCommand = defineCommand211({
45236
45757
  meta: {
45237
45758
  name: "content",
45238
45759
  description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
@@ -45281,7 +45802,7 @@ var contentCommand = defineCommand210({
45281
45802
  });
45282
45803
 
45283
45804
  // src/commands/winning-ads/feed.ts
45284
- import { defineCommand as defineCommand211 } from "citty";
45805
+ import { defineCommand as defineCommand212 } from "citty";
45285
45806
  function buildFeedParams(input) {
45286
45807
  const params = {};
45287
45808
  const advertiser = splitList2(input.advertiser);
@@ -45333,7 +45854,7 @@ registerSchema({
45333
45854
  format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
45334
45855
  }
45335
45856
  });
45336
- var feedCommand = defineCommand211({
45857
+ var feedCommand = defineCommand212({
45337
45858
  meta: {
45338
45859
  name: "feed",
45339
45860
  description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
@@ -45418,7 +45939,7 @@ var feedCommand = defineCommand211({
45418
45939
  });
45419
45940
 
45420
45941
  // src/commands/winning-ads/follow.ts
45421
- import { defineCommand as defineCommand212 } from "citty";
45942
+ import { defineCommand as defineCommand213 } from "citty";
45422
45943
  var PLATFORMS = ["meta", "linkedin"];
45423
45944
  registerSchema({
45424
45945
  command: "winning-ads.follow",
@@ -45433,7 +45954,7 @@ registerSchema({
45433
45954
  label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
45434
45955
  }
45435
45956
  });
45436
- var followCommand = defineCommand212({
45957
+ var followCommand = defineCommand213({
45437
45958
  meta: {
45438
45959
  name: "follow",
45439
45960
  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'
@@ -45480,7 +46001,7 @@ var followCommand = defineCommand212({
45480
46001
  });
45481
46002
 
45482
46003
  // src/commands/winning-ads/follow-competitors.ts
45483
- import { defineCommand as defineCommand213 } from "citty";
46004
+ import { defineCommand as defineCommand214 } from "citty";
45484
46005
  var PLATFORMS2 = ["meta", "linkedin"];
45485
46006
  var BATCH_TIMEOUT_MS = 3e5;
45486
46007
  function buildFollowBatchBody(input) {
@@ -45513,7 +46034,7 @@ registerSchema({
45513
46034
  }
45514
46035
  }
45515
46036
  });
45516
- var followCompetitorsCommand = defineCommand213({
46037
+ var followCompetitorsCommand = defineCommand214({
45517
46038
  meta: {
45518
46039
  name: "follow-competitors",
45519
46040
  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"'
@@ -45588,7 +46109,7 @@ var followCompetitorsCommand = defineCommand213({
45588
46109
  });
45589
46110
 
45590
46111
  // src/commands/winning-ads/following.ts
45591
- import { defineCommand as defineCommand214 } from "citty";
46112
+ import { defineCommand as defineCommand215 } from "citty";
45592
46113
  registerSchema({
45593
46114
  command: "winning-ads.following",
45594
46115
  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.",
@@ -45642,7 +46163,7 @@ function followingNormalizer(record, full) {
45642
46163
  platforms: Array.isArray(record.platforms) ? record.platforms : []
45643
46164
  };
45644
46165
  }
45645
- var followingCommand = defineCommand214({
46166
+ var followingCommand = defineCommand215({
45646
46167
  meta: {
45647
46168
  name: "following",
45648
46169
  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"
@@ -45678,7 +46199,7 @@ var followingCommand = defineCommand214({
45678
46199
  });
45679
46200
 
45680
46201
  // src/commands/winning-ads/patterns.ts
45681
- import { defineCommand as defineCommand215 } from "citty";
46202
+ import { defineCommand as defineCommand216 } from "citty";
45682
46203
  registerSchema({
45683
46204
  command: "winning-ads.patterns",
45684
46205
  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.",
@@ -45717,7 +46238,7 @@ function discriminatorRow(record) {
45717
46238
  top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
45718
46239
  };
45719
46240
  }
45720
- var patternsCommand = defineCommand215({
46241
+ var patternsCommand = defineCommand216({
45721
46242
  meta: {
45722
46243
  name: "patterns",
45723
46244
  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"
@@ -45773,7 +46294,7 @@ var patternsCommand = defineCommand215({
45773
46294
  });
45774
46295
 
45775
46296
  // src/commands/winning-ads/search.ts
45776
- import { defineCommand as defineCommand216 } from "citty";
46297
+ import { defineCommand as defineCommand217 } from "citty";
45777
46298
  registerSchema({
45778
46299
  command: "winning-ads.search",
45779
46300
  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.",
@@ -45881,7 +46402,7 @@ function buildSearchBody2(args) {
45881
46402
  }
45882
46403
  return body;
45883
46404
  }
45884
- var searchCommand5 = defineCommand216({
46405
+ var searchCommand5 = defineCommand217({
45885
46406
  meta: {
45886
46407
  name: "search",
45887
46408
  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"
@@ -45996,7 +46517,7 @@ var searchCommand5 = defineCommand216({
45996
46517
  });
45997
46518
 
45998
46519
  // src/commands/winning-ads/seeds.ts
45999
- import { defineCommand as defineCommand217 } from "citty";
46520
+ import { defineCommand as defineCommand218 } from "citty";
46000
46521
  function leanRow(r) {
46001
46522
  return {
46002
46523
  key: r.key,
@@ -46024,7 +46545,7 @@ function makeSeedCommand(opts) {
46024
46545
  limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
46025
46546
  }
46026
46547
  });
46027
- return defineCommand217({
46548
+ return defineCommand218({
46028
46549
  meta: { name: opts.name, description: opts.description },
46029
46550
  args: {
46030
46551
  platform: { type: "string", description: "Single platform to segment on", required: false },
@@ -46073,7 +46594,7 @@ var formatsCommand = makeSeedCommand({
46073
46594
  });
46074
46595
 
46075
46596
  // src/commands/winning-ads/unfollow.ts
46076
- import { defineCommand as defineCommand218 } from "citty";
46597
+ import { defineCommand as defineCommand219 } from "citty";
46077
46598
  registerSchema({
46078
46599
  command: "winning-ads.unfollow",
46079
46600
  description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
@@ -46081,7 +46602,7 @@ registerSchema({
46081
46602
  advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
46082
46603
  }
46083
46604
  });
46084
- var unfollowCommand = defineCommand218({
46605
+ var unfollowCommand = defineCommand219({
46085
46606
  meta: {
46086
46607
  name: "unfollow",
46087
46608
  description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
@@ -46102,7 +46623,7 @@ var unfollowCommand = defineCommand218({
46102
46623
  });
46103
46624
 
46104
46625
  // src/commands/winning-ads/winners.ts
46105
- import { defineCommand as defineCommand219 } from "citty";
46626
+ import { defineCommand as defineCommand220 } from "citty";
46106
46627
  registerSchema({
46107
46628
  command: "winning-ads.winners",
46108
46629
  description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
@@ -46112,7 +46633,7 @@ registerSchema({
46112
46633
  platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
46113
46634
  }
46114
46635
  });
46115
- var winnersCommand = defineCommand219({
46636
+ var winnersCommand = defineCommand220({
46116
46637
  meta: {
46117
46638
  name: "winners",
46118
46639
  description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
@@ -46162,7 +46683,7 @@ var winnersCommand = defineCommand219({
46162
46683
  });
46163
46684
 
46164
46685
  // src/commands/winning-ads/index.ts
46165
- var winningAdsCommand = defineCommand220({
46686
+ var winningAdsCommand = defineCommand221({
46166
46687
  meta: {
46167
46688
  name: "winning-ads",
46168
46689
  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.
@@ -46400,7 +46921,7 @@ function getCliVersion() {
46400
46921
  }
46401
46922
 
46402
46923
  // src/cli.ts
46403
- var main = defineCommand221({
46924
+ var main = defineCommand222({
46404
46925
  meta: {
46405
46926
  name: "baker",
46406
46927
  version: getCliVersion(),
@@ -46418,6 +46939,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
46418
46939
  "scheduled-actions": scheduledActionsCommand,
46419
46940
  ads: adsCommand2,
46420
46941
  brand: brandCommand,
46942
+ analytics: analyticsCommand2,
46421
46943
  ga4: ga4Command,
46422
46944
  gsc: gscCommand,
46423
46945
  research: researchCommand,
@@ -46430,7 +46952,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
46430
46952
  videos: videosCommand,
46431
46953
  testimonials: testimonialsCommand,
46432
46954
  canvas: canvasCommand,
46433
- tags: tagsCommand3,
46955
+ tags: tagsCommand4,
46434
46956
  "tag-manager": tagManagerCommand,
46435
46957
  chats: chatsCommand,
46436
46958
  history: historyCommand,