@koda-sl/baker-cli 0.160.1 → 0.162.0-dev.dbcd7430e

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
@@ -36,7 +36,7 @@ import {
36
36
  toModelSafeImage,
37
37
  ulid,
38
38
  validateCanvasDeep
39
- } from "./chunk-CG6OTNUU.js";
39
+ } from "./chunk-K424D3CY.js";
40
40
  import {
41
41
  csvOrJson,
42
42
  daysAgoIso,
@@ -77,7 +77,7 @@ import {
77
77
  } from "./chunk-RK67WL4O.js";
78
78
 
79
79
  // src/cli.ts
80
- import { defineCommand as defineCommand186, runMain } from "citty";
80
+ import { defineCommand as defineCommand187, runMain } from "citty";
81
81
 
82
82
  // src/commands/actions/index.ts
83
83
  import { defineCommand as defineCommand18 } from "citty";
@@ -4258,21 +4258,47 @@ Full guide: __tooling__/docs/tools/baker/actions.md`
4258
4258
  });
4259
4259
 
4260
4260
  // src/commands/ads/index.ts
4261
- import { defineCommand as defineCommand85 } from "citty";
4261
+ import { defineCommand as defineCommand86 } from "citty";
4262
4262
 
4263
4263
  // src/commands/ads/google/index.ts
4264
4264
  import { defineCommand as defineCommand31 } from "citty";
4265
4265
 
4266
4266
  // src/commands/ads/google/accounts.ts
4267
4267
  import { defineCommand as defineCommand19 } from "citty";
4268
+
4269
+ // src/connected-resources.ts
4270
+ function listed(resources) {
4271
+ return resources.map((resource) => resource.label ? `${resource.id} (${resource.label})` : resource.id).join("; ");
4272
+ }
4273
+ function connectedResourceHints({ plural, singular, flag, resources }) {
4274
+ if (resources.length === 0) {
4275
+ return [];
4276
+ }
4277
+ if (resources.length === 1) {
4278
+ return [`This company connected one ${singular}: ${listed(resources)}. Commands use it unless you pass ${flag}.`];
4279
+ }
4280
+ return [
4281
+ `This company connected ${resources.length} ${plural}: ${listed(resources)}. Each command works on one, so pass ${flag} \u2014 nothing is picked for you. A question about the whole business covers all ${resources.length}: answering from one and reporting it as the total is wrong.`
4282
+ ];
4283
+ }
4284
+
4285
+ // src/commands/ads/google/accounts.ts
4268
4286
  registerSchema({
4269
4287
  command: "ads.google.accounts",
4270
- description: "List all accessible Google Ads customer accounts. Returns accounts with id, name, access_type (direct or managed), level in the hierarchy, and optional manager_id for managed accounts. Run this first to find account IDs for other commands.",
4288
+ description: "List the Google Ads accounts this company connected \u2014 there can be several, and every one of them is yours to work in. Returns accounts with id, name, access_type (direct or managed), level in the hierarchy, and optional manager_id for managed accounts. Run this first to find account IDs for other commands.",
4271
4289
  args: {
4272
4290
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false },
4273
4291
  output: { type: "string", description: "Format: json|csv|md", required: false, default: "json" }
4274
4292
  }
4275
4293
  });
4294
+ function accountHints(accounts) {
4295
+ return connectedResourceHints({
4296
+ plural: "Google Ads accounts",
4297
+ singular: "Google Ads account",
4298
+ flag: "--customer-id",
4299
+ resources: accounts.map((account) => ({ id: account.id, label: account.name }))
4300
+ });
4301
+ }
4276
4302
  function handleAccountsError(err) {
4277
4303
  if (err instanceof ApiError) {
4278
4304
  if (err.code === "UNAUTHORIZED" || err.code === "NOT_FOUND") {
@@ -4313,7 +4339,7 @@ Examples:
4313
4339
  if (useCache) {
4314
4340
  const cached = cacheGet("accounts", "list");
4315
4341
  if (cached) {
4316
- writeAdsJson({ ok: true, data: cached.data, cached: true });
4342
+ writeJsonEnvelope({ ok: true, data: cached.data, cached: true, hints: accountHints(cached.data) });
4317
4343
  return;
4318
4344
  }
4319
4345
  }
@@ -4328,7 +4354,7 @@ Examples:
4328
4354
  writeAdsOutput(data, format);
4329
4355
  return;
4330
4356
  }
4331
- writeAdsJson({ ok: true, data });
4357
+ writeJsonEnvelope({ ok: true, data, hints: accountHints(data) });
4332
4358
  } catch (err) {
4333
4359
  handleAccountsError(err);
4334
4360
  }
@@ -4491,6 +4517,16 @@ var GOOGLE_ADS_LIMITS = {
4491
4517
  descriptionTextMax: 90,
4492
4518
  businessNameMax: 25
4493
4519
  },
4520
+ appAd: {
4521
+ headlinesMin: 1,
4522
+ headlinesMax: 5,
4523
+ headlineTextMax: 30,
4524
+ descriptionsMin: 1,
4525
+ descriptionsMax: 5,
4526
+ descriptionTextMax: 90,
4527
+ imagesMax: 20,
4528
+ youtubeVideosMax: 20
4529
+ },
4494
4530
  sharedSet: {
4495
4531
  nameMax: 255
4496
4532
  },
@@ -4843,15 +4879,15 @@ var callAdSchema = z13.strictObject({
4843
4879
  });
4844
4880
  var appAdSchema = z13.strictObject({
4845
4881
  format: z13.literal("app"),
4846
- headlines: z13.array(z13.object({ text: z13.string().min(1).max(30) })).min(1),
4847
- descriptions: z13.array(z13.object({ text: z13.string().min(1).max(90) })).min(1),
4882
+ headlines: z13.array(z13.object({ text: z13.string().min(1).max(GOOGLE_ADS_LIMITS.appAd.headlineTextMax) })).min(GOOGLE_ADS_LIMITS.appAd.headlinesMin).max(GOOGLE_ADS_LIMITS.appAd.headlinesMax),
4883
+ descriptions: z13.array(z13.object({ text: z13.string().min(1).max(GOOGLE_ADS_LIMITS.appAd.descriptionTextMax) })).min(GOOGLE_ADS_LIMITS.appAd.descriptionsMin).max(GOOGLE_ADS_LIMITS.appAd.descriptionsMax),
4848
4884
  // An App campaign ad carries its images on its own content (`AppAdInfo.images`), not as
4849
4885
  // campaign-level asset links — same shape as a responsive display ad's marketing images.
4850
- images: z13.array(refSchema).optional(),
4886
+ images: z13.array(refSchema).max(GOOGLE_ADS_LIMITS.appAd.imagesMax).optional(),
4851
4887
  // `AppAdInfo.youtube_videos` — an App ad's videos live on its content too. Without this field
4852
4888
  // there is no way to express "keep these videos on the ad", so a content update that only
4853
4889
  // restated headlines silently left the ad's videos to whatever the mask happened to omit.
4854
- youtubeVideos: z13.array(refSchema).optional()
4890
+ youtubeVideos: z13.array(refSchema).max(GOOGLE_ADS_LIMITS.appAd.youtubeVideosMax).optional()
4855
4891
  });
4856
4892
  var videoAdSchema = z13.strictObject({
4857
4893
  format: z13.literal("video"),
@@ -10106,6 +10142,17 @@ Examples:
10106
10142
  // src/commands/ads/linkedin/accounts.ts
10107
10143
  import { defineCommand as defineCommand33 } from "citty";
10108
10144
  var ACCOUNTS_TTL_MS = 60 * 60 * 1e3;
10145
+ function accountHints2(accounts, includeAll) {
10146
+ if (includeAll) {
10147
+ return [];
10148
+ }
10149
+ return connectedResourceHints({
10150
+ plural: "LinkedIn ad accounts",
10151
+ singular: "LinkedIn ad account",
10152
+ flag: "--account-id",
10153
+ resources: accounts.map((account) => ({ id: account.externalId, label: account.name }))
10154
+ });
10155
+ }
10109
10156
  var accountsCommand2 = defineCommand33({
10110
10157
  meta: {
10111
10158
  name: "accounts",
@@ -10129,7 +10176,12 @@ Examples:
10129
10176
  if (useCache) {
10130
10177
  const cached = cacheGet("linkedin-accounts", cacheKey);
10131
10178
  if (cached) {
10132
- writeAdsJson({ ok: true, data: cached.data, cached: true });
10179
+ writeJsonEnvelope({
10180
+ ok: true,
10181
+ data: cached.data,
10182
+ cached: true,
10183
+ hints: accountHints2(cached.data, includeAll)
10184
+ });
10133
10185
  return;
10134
10186
  }
10135
10187
  }
@@ -10146,7 +10198,7 @@ Examples:
10146
10198
  writeAdsOutput(data, fmt);
10147
10199
  return;
10148
10200
  }
10149
- writeAdsJson({ ok: true, data });
10201
+ writeJsonEnvelope({ ok: true, data, hints: accountHints2(data, includeAll) });
10150
10202
  } catch (err) {
10151
10203
  handleLinkedinError(err);
10152
10204
  }
@@ -13086,7 +13138,7 @@ Full guide: __tooling__/docs/tools/baker/ads-linkedin.md`
13086
13138
  });
13087
13139
 
13088
13140
  // src/commands/ads/meta/index.ts
13089
- import { defineCommand as defineCommand67 } from "citty";
13141
+ import { defineCommand as defineCommand68 } from "citty";
13090
13142
 
13091
13143
  // src/commands/ads/meta/account.ts
13092
13144
  import { defineCommand as defineCommand52 } from "citty";
@@ -13118,6 +13170,20 @@ Examples:
13118
13170
 
13119
13171
  // src/commands/ads/meta/accounts.ts
13120
13172
  import { defineCommand as defineCommand53 } from "citty";
13173
+ function accountHints3(accounts, includeAll) {
13174
+ if (includeAll) {
13175
+ return [];
13176
+ }
13177
+ return connectedResourceHints({
13178
+ plural: "Meta ad accounts",
13179
+ singular: "Meta ad account",
13180
+ flag: "--account-id",
13181
+ resources: accounts.flatMap((account) => {
13182
+ const id = account.externalId ?? account.id;
13183
+ return id ? [{ id, ...account.name ? { label: account.name } : {} }] : [];
13184
+ })
13185
+ });
13186
+ }
13121
13187
  var accountsCommand3 = defineCommand53({
13122
13188
  meta: {
13123
13189
  name: "accounts",
@@ -13141,7 +13207,12 @@ Examples:
13141
13207
  if (useCache) {
13142
13208
  const cached = cacheGet("meta-accounts", cacheKey);
13143
13209
  if (cached) {
13144
- writeAdsJson({ ok: true, data: cached.data, cached: true });
13210
+ writeJsonEnvelope({
13211
+ ok: true,
13212
+ data: cached.data,
13213
+ cached: true,
13214
+ hints: accountHints3(cached.data, includeAll)
13215
+ });
13145
13216
  return;
13146
13217
  }
13147
13218
  }
@@ -13158,7 +13229,7 @@ Examples:
13158
13229
  writeAdsOutput(data, fmt);
13159
13230
  return;
13160
13231
  }
13161
- writeAdsJson({ ok: true, data });
13232
+ writeJsonEnvelope({ ok: true, data, hints: accountHints3(data, includeAll) });
13162
13233
  } catch (err) {
13163
13234
  handleMetaError(err);
13164
13235
  }
@@ -15372,9 +15443,40 @@ var metaMediaCommand = defineCommand64({
15372
15443
  subCommands: { upload: mediaUploadCommand }
15373
15444
  });
15374
15445
 
15375
- // src/commands/ads/meta/pixels.ts
15446
+ // src/commands/ads/meta/pages.ts
15376
15447
  import { defineCommand as defineCommand65 } from "citty";
15377
- var pixelsCommand = defineCommand65({
15448
+ var pagesCommand = defineCommand65({
15449
+ meta: {
15450
+ name: "pages",
15451
+ description: `List the Facebook Pages the connected user manages. Every Meta ad publishes from a Page, so use this to find the Page id an ad should run from instead of asking the user for it. The 'tasks' field shows what the user can do on each Page (ADVERTISE means it can back ads).
15452
+
15453
+ Examples:
15454
+ baker ads meta pages`
15455
+ },
15456
+ args: {
15457
+ "skip-cache": { type: "boolean", description: "Bypass server-side cache" },
15458
+ output: { type: "string", description: "Output format", default: "json" }
15459
+ },
15460
+ run: async ({ args }) => {
15461
+ try {
15462
+ const params = {};
15463
+ if (args["skip-cache"]) params["skip-cache"] = "true";
15464
+ const data = await apiGet("/api/ads/meta/pages", params);
15465
+ const fmt = csvOrJson(args);
15466
+ if (fmt !== "json") {
15467
+ writeAdsOutput(data, fmt);
15468
+ return;
15469
+ }
15470
+ writeAdsJson({ ok: true, data });
15471
+ } catch (err) {
15472
+ handleMetaError(err);
15473
+ }
15474
+ }
15475
+ });
15476
+
15477
+ // src/commands/ads/meta/pixels.ts
15478
+ import { defineCommand as defineCommand66 } from "citty";
15479
+ var pixelsCommand = defineCommand66({
15378
15480
  meta: {
15379
15481
  name: "pixels",
15380
15482
  description: `List Meta Pixels for an ad account, or fetch firing stats for one pixel.
@@ -15445,7 +15547,7 @@ function emit(data, args) {
15445
15547
 
15446
15548
  // src/commands/ads/meta/preview.ts
15447
15549
  import { writeFileSync as writeFileSync2 } from "fs";
15448
- import { defineCommand as defineCommand66 } from "citty";
15550
+ import { defineCommand as defineCommand67 } from "citty";
15449
15551
  var VALID_AD_FORMATS = [
15450
15552
  "DESKTOP_FEED_STANDARD",
15451
15553
  "MOBILE_FEED_STANDARD",
@@ -15479,7 +15581,7 @@ var VALID_AD_FORMATS = [
15479
15581
  "MARKETPLACE_MOBILE",
15480
15582
  "BIZ_DISCO_FEED_MOBILE"
15481
15583
  ];
15482
- var previewCommand = defineCommand66({
15584
+ var previewCommand = defineCommand67({
15483
15585
  meta: {
15484
15586
  name: "preview",
15485
15587
  description: `Generate a Meta-hosted preview iframe for a creative or ad. Returns iframe HTML which you
@@ -15526,7 +15628,7 @@ Examples:
15526
15628
  });
15527
15629
 
15528
15630
  // src/commands/ads/meta/index.ts
15529
- var metaCommand = defineCommand67({
15631
+ var metaCommand = defineCommand68({
15530
15632
  meta: {
15531
15633
  name: "meta",
15532
15634
  description: `Meta Marketing API \u2014 AI-first command surface (Facebook + Instagram ads).
@@ -15535,6 +15637,7 @@ Discovery:
15535
15637
  baker ads meta accounts \u2014 accounts in this company's connected scope
15536
15638
  baker ads meta accounts --include-all \u2014 every account the token can see
15537
15639
  baker ads meta businesses \u2014 Business Manager IDs
15640
+ baker ads meta pages \u2014 Facebook Pages the user manages (an ad's identity)
15538
15641
 
15539
15642
  Snapshot a running account (default = ACTIVE only):
15540
15643
  baker ads meta campaigns --account-id act_123
@@ -15566,6 +15669,7 @@ Full guide: __tooling__/docs/tools/baker/ads-meta.md`
15566
15669
  accounts: accountsCommand3,
15567
15670
  account: accountCommand2,
15568
15671
  businesses: businessesCommand,
15672
+ pages: pagesCommand,
15569
15673
  campaigns: campaignsCommand3,
15570
15674
  adsets: adsetsCommand,
15571
15675
  ads: adsListCommand,
@@ -15581,18 +15685,26 @@ Full guide: __tooling__/docs/tools/baker/ads-meta.md`
15581
15685
  });
15582
15686
 
15583
15687
  // src/commands/ads/x/index.ts
15584
- import { defineCommand as defineCommand84 } from "citty";
15688
+ import { defineCommand as defineCommand85 } from "citty";
15585
15689
 
15586
15690
  // src/commands/ads/x/accounts.ts
15587
- import { defineCommand as defineCommand68 } from "citty";
15691
+ import { defineCommand as defineCommand69 } from "citty";
15588
15692
  registerSchema({
15589
15693
  command: "ads.x.accounts",
15590
- description: "List all accessible X Ads accounts. Returns accounts with id (base36), name, approval_status, timezone, currency. Run this first to find account IDs for other commands.",
15694
+ description: "List the X Ads accounts this company connected \u2014 there can be several, and every one of them is yours to work in. Returns accounts with id (base36), name, approval_status, timezone, currency. Run this first to find account IDs for other commands.",
15591
15695
  args: {
15592
15696
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false },
15593
15697
  output: { type: "string", description: "Format: json|csv|md", required: false, default: "json" }
15594
15698
  }
15595
15699
  });
15700
+ function accountHints4(accounts) {
15701
+ return connectedResourceHints({
15702
+ plural: "X Ads accounts",
15703
+ singular: "X Ads account",
15704
+ flag: "--account-id",
15705
+ resources: accounts.map((account) => ({ id: account.id, label: account.name }))
15706
+ });
15707
+ }
15596
15708
  function handleAccountsError2(err) {
15597
15709
  if (err instanceof ApiError) {
15598
15710
  if (err.code === "UNAUTHORIZED" || err.code === "NOT_FOUND") {
@@ -15613,7 +15725,7 @@ function handleAccountsError2(err) {
15613
15725
  writeAdsJson({ ok: false, error: { code: "NETWORK_ERROR", message: "Unexpected error" } });
15614
15726
  process.exit(1);
15615
15727
  }
15616
- var accountsCommand4 = defineCommand68({
15728
+ var accountsCommand4 = defineCommand69({
15617
15729
  meta: {
15618
15730
  name: "accounts",
15619
15731
  description: `List accessible X Ads accounts. Returns account IDs needed for all other commands.
@@ -15630,7 +15742,7 @@ Examples:
15630
15742
  if (useCache) {
15631
15743
  const cached = cacheGet("x-accounts", "list");
15632
15744
  if (cached) {
15633
- writeAdsJson({ ok: true, data: cached.data, cached: true });
15745
+ writeJsonEnvelope({ ok: true, data: cached.data, cached: true, hints: accountHints4(cached.data) });
15634
15746
  return;
15635
15747
  }
15636
15748
  }
@@ -15645,7 +15757,7 @@ Examples:
15645
15757
  writeAdsOutput(data, format);
15646
15758
  return;
15647
15759
  }
15648
- writeAdsJson({ ok: true, data });
15760
+ writeJsonEnvelope({ ok: true, data, hints: accountHints4(data) });
15649
15761
  } catch (err) {
15650
15762
  handleAccountsError2(err);
15651
15763
  }
@@ -15653,7 +15765,7 @@ Examples:
15653
15765
  });
15654
15766
 
15655
15767
  // src/commands/ads/x/active-entities.ts
15656
- import { defineCommand as defineCommand69 } from "citty";
15768
+ import { defineCommand as defineCommand70 } from "citty";
15657
15769
 
15658
15770
  // src/commands/ads/x/error-parser.ts
15659
15771
  function mapXErrorCode(message) {
@@ -15804,7 +15916,7 @@ function parseCsv(v) {
15804
15916
  const parts = v.split(",").map((s) => s.trim()).filter(Boolean);
15805
15917
  return parts.length > 0 ? parts : void 0;
15806
15918
  }
15807
- var activeEntitiesCommand = defineCommand69({
15919
+ var activeEntitiesCommand = defineCommand70({
15808
15920
  meta: {
15809
15921
  name: "active-entities",
15810
15922
  description: `List entities with metric activity in a time range.
@@ -15862,7 +15974,7 @@ Examples:
15862
15974
  });
15863
15975
 
15864
15976
  // src/commands/ads/x/audiences.ts
15865
- import { defineCommand as defineCommand70 } from "citty";
15977
+ import { defineCommand as defineCommand71 } from "citty";
15866
15978
  registerSchema({
15867
15979
  command: "ads.x.audiences",
15868
15980
  description: "List custom audiences for an X Ads account. Returns id, name, audience_size, audience_type, targetable status. Audiences need 100+ active users in the past 90 days to be targetable.",
@@ -15872,7 +15984,7 @@ registerSchema({
15872
15984
  output: { type: "string", description: "Format: json|csv|md", required: false, default: "json" }
15873
15985
  }
15874
15986
  });
15875
- var audiencesCommand4 = defineCommand70({
15987
+ var audiencesCommand4 = defineCommand71({
15876
15988
  meta: {
15877
15989
  name: "audiences",
15878
15990
  description: `List X Ads custom audiences.
@@ -15921,7 +16033,7 @@ Examples:
15921
16033
  });
15922
16034
 
15923
16035
  // src/commands/ads/x/campaigns.ts
15924
- import { defineCommand as defineCommand71 } from "citty";
16036
+ import { defineCommand as defineCommand72 } from "citty";
15925
16037
 
15926
16038
  // src/commands/ads/x/run-list.ts
15927
16039
  function buildCleanParams(opts) {
@@ -15985,7 +16097,7 @@ registerSchema({
15985
16097
  output: { type: "string", description: "Format: json|csv|md", required: false, default: "json" }
15986
16098
  }
15987
16099
  });
15988
- var campaignsCommand4 = defineCommand71({
16100
+ var campaignsCommand4 = defineCommand72({
15989
16101
  meta: {
15990
16102
  name: "campaigns",
15991
16103
  description: `List X Ads campaigns. Returns budget, schedule, funding instrument, status.
@@ -16027,7 +16139,7 @@ Examples:
16027
16139
  });
16028
16140
 
16029
16141
  // src/commands/ads/x/cards.ts
16030
- import { defineCommand as defineCommand72 } from "citty";
16142
+ import { defineCommand as defineCommand73 } from "citty";
16031
16143
  registerSchema({
16032
16144
  command: "ads.x.cards",
16033
16145
  description: "List website cards, video cards, and carousels for an X Ads account.",
@@ -16037,7 +16149,7 @@ registerSchema({
16037
16149
  output: { type: "string", description: "Format: json|csv|md", required: false, default: "json" }
16038
16150
  }
16039
16151
  });
16040
- var cardsCommand = defineCommand72({
16152
+ var cardsCommand = defineCommand73({
16041
16153
  meta: {
16042
16154
  name: "cards",
16043
16155
  description: `List X Ads cards (rich creatives).
@@ -16086,7 +16198,7 @@ Examples:
16086
16198
  });
16087
16199
 
16088
16200
  // src/commands/ads/x/funding.ts
16089
- import { defineCommand as defineCommand73 } from "citty";
16201
+ import { defineCommand as defineCommand74 } from "citty";
16090
16202
  registerSchema({
16091
16203
  command: "ads.x.funding",
16092
16204
  description: "List funding instruments for an X Ads account. Returns id, type, currency, credit_limit_local_micro, funded_amount_local_micro, status. Falls back to BAKER_X_ADS_ACCOUNT_ID env var.",
@@ -16096,7 +16208,7 @@ registerSchema({
16096
16208
  output: { type: "string", description: "Format: json|csv|md", required: false, default: "json" }
16097
16209
  }
16098
16210
  });
16099
- var fundingCommand = defineCommand73({
16211
+ var fundingCommand = defineCommand74({
16100
16212
  meta: {
16101
16213
  name: "funding",
16102
16214
  description: `List funding instruments for an X Ads account.
@@ -16145,7 +16257,7 @@ Examples:
16145
16257
  });
16146
16258
 
16147
16259
  // src/commands/ads/x/line-items.ts
16148
- import { defineCommand as defineCommand74 } from "citty";
16260
+ import { defineCommand as defineCommand75 } from "citty";
16149
16261
  registerSchema({
16150
16262
  command: "ads.x.lineItems",
16151
16263
  description: "List line items (ad groups) for an X Ads account. Returns bid, product_type, objective, placements, schedule. Filter by campaign-ids or line-item-ids (CSV).",
@@ -16157,7 +16269,7 @@ registerSchema({
16157
16269
  "no-cache": { type: "boolean", description: "Skip cache", required: false }
16158
16270
  }
16159
16271
  });
16160
- var lineItemsCommand = defineCommand74({
16272
+ var lineItemsCommand = defineCommand75({
16161
16273
  meta: {
16162
16274
  name: "line-items",
16163
16275
  description: `List X Ads line items (ad groups).
@@ -16198,7 +16310,7 @@ Examples:
16198
16310
  });
16199
16311
 
16200
16312
  // src/commands/ads/x/media.ts
16201
- import { defineCommand as defineCommand75 } from "citty";
16313
+ import { defineCommand as defineCommand76 } from "citty";
16202
16314
  registerSchema({
16203
16315
  command: "ads.x.media",
16204
16316
  description: "List media assets in the X Ads media library (images, GIFs, videos). Filter by media-type (IMAGE, GIF, VIDEO).",
@@ -16209,7 +16321,7 @@ registerSchema({
16209
16321
  output: { type: "string", description: "Format: json|csv|md", required: false, default: "json" }
16210
16322
  }
16211
16323
  });
16212
- var mediaCommand = defineCommand75({
16324
+ var mediaCommand = defineCommand76({
16213
16325
  meta: {
16214
16326
  name: "media",
16215
16327
  description: `List media assets in the X Ads media library.
@@ -16261,7 +16373,7 @@ Examples:
16261
16373
  });
16262
16374
 
16263
16375
  // src/commands/ads/x/promoted-tweets.ts
16264
- import { defineCommand as defineCommand76 } from "citty";
16376
+ import { defineCommand as defineCommand77 } from "citty";
16265
16377
  registerSchema({
16266
16378
  command: "ads.x.promotedTweets",
16267
16379
  description: "List promoted tweets for an X Ads account. Returns id, line_item_id, tweet_id, approval_status. Filter by line-item-ids (CSV).",
@@ -16272,7 +16384,7 @@ registerSchema({
16272
16384
  "no-cache": { type: "boolean", description: "Skip cache", required: false }
16273
16385
  }
16274
16386
  });
16275
- var promotedTweetsCommand = defineCommand76({
16387
+ var promotedTweetsCommand = defineCommand77({
16276
16388
  meta: {
16277
16389
  name: "promoted-tweets",
16278
16390
  description: `List X Ads promoted tweets.
@@ -16326,11 +16438,11 @@ Examples:
16326
16438
  });
16327
16439
 
16328
16440
  // src/commands/ads/x/stats/index.ts
16329
- import { defineCommand as defineCommand81 } from "citty";
16441
+ import { defineCommand as defineCommand82 } from "citty";
16330
16442
 
16331
16443
  // src/commands/ads/x/stats/job.ts
16332
16444
  import { gunzipSync } from "zlib";
16333
- import { defineCommand as defineCommand77 } from "citty";
16445
+ import { defineCommand as defineCommand78 } from "citty";
16334
16446
  var POLL_INTERVAL_MS2 = 1e4;
16335
16447
  var DEADLINE_MS = 12 * 60 * 1e3;
16336
16448
  var RESULT_CACHE_TTL_MS = 6 * 60 * 60 * 1e3;
@@ -16400,7 +16512,7 @@ async function pollUntilDone(accountId, jobId) {
16400
16512
  function buildCacheKey(body) {
16401
16513
  return `stats-job:${JSON.stringify(body)}`;
16402
16514
  }
16403
- var statsJobCommand = defineCommand77({
16515
+ var statsJobCommand = defineCommand78({
16404
16516
  meta: {
16405
16517
  name: "job",
16406
16518
  description: `Async X Ads stats job, sync from the CLI's perspective. Creates \u2192 polls \u2192 downloads \u2192 returns.
@@ -16505,7 +16617,7 @@ For fine-grained control (don't wait, poll yourself), use:
16505
16617
  });
16506
16618
 
16507
16619
  // src/commands/ads/x/stats/job-create.ts
16508
- import { defineCommand as defineCommand78 } from "citty";
16620
+ import { defineCommand as defineCommand79 } from "citty";
16509
16621
  registerSchema({
16510
16622
  command: "ads.x.statsJobCreate",
16511
16623
  description: "Create an asynchronous X Ads stats job (range up to 90 days non-segmented, 45 days segmented). Returns a job id; poll with `stats job-status`. Times must be ISO 8601 hour-aligned.",
@@ -16528,7 +16640,7 @@ function parseCsv3(v) {
16528
16640
  const parts = v.split(",").map((s) => s.trim()).filter(Boolean);
16529
16641
  return parts.length > 0 ? parts : void 0;
16530
16642
  }
16531
- var statsJobCreateCommand = defineCommand78({
16643
+ var statsJobCreateCommand = defineCommand79({
16532
16644
  meta: {
16533
16645
  name: "job-create",
16534
16646
  description: `Create an async X Ads stats job (up to 90 days, supports segmentation).
@@ -16591,7 +16703,7 @@ Examples:
16591
16703
  });
16592
16704
 
16593
16705
  // src/commands/ads/x/stats/job-status.ts
16594
- import { defineCommand as defineCommand79 } from "citty";
16706
+ import { defineCommand as defineCommand80 } from "citty";
16595
16707
  registerSchema({
16596
16708
  command: "ads.x.statsJobStatus",
16597
16709
  description: "Check the status of one or more X Ads stats jobs. Returns status (PROCESSING|SUCCESS|FAILED) and a downloadable url when SUCCESS. Pass --job-id or --job-ids (CSV).",
@@ -16601,7 +16713,7 @@ registerSchema({
16601
16713
  "job-ids": { type: "string", description: "CSV of job IDs", required: false }
16602
16714
  }
16603
16715
  });
16604
- var statsJobStatusCommand = defineCommand79({
16716
+ var statsJobStatusCommand = defineCommand80({
16605
16717
  meta: {
16606
16718
  name: "job-status",
16607
16719
  description: `Poll the status of an async X Ads stats job.
@@ -16642,7 +16754,7 @@ Examples:
16642
16754
  });
16643
16755
 
16644
16756
  // src/commands/ads/x/stats/sync.ts
16645
- import { defineCommand as defineCommand80 } from "citty";
16757
+ import { defineCommand as defineCommand81 } from "citty";
16646
16758
 
16647
16759
  // src/commands/ads/x/presets.ts
16648
16760
  var X_STATS_PRESETS = [
@@ -16801,7 +16913,7 @@ async function runSync(args, q) {
16801
16913
  process.exit(1);
16802
16914
  }
16803
16915
  }
16804
- var statsSyncCommand = defineCommand80({
16916
+ var statsSyncCommand = defineCommand81({
16805
16917
  meta: {
16806
16918
  name: "sync",
16807
16919
  description: `Synchronous X Ads analytics (max 7-day window).
@@ -16844,7 +16956,7 @@ Examples:
16844
16956
  });
16845
16957
 
16846
16958
  // src/commands/ads/x/stats/index.ts
16847
- var statsCommand = defineCommand81({
16959
+ var statsCommand = defineCommand82({
16848
16960
  meta: {
16849
16961
  name: "stats",
16850
16962
  description: `X Ads analytics. Sync (\u22647 days, no segmentation) or async jobs (\u226490 days, segmentable).
@@ -16872,7 +16984,7 @@ Examples:
16872
16984
  });
16873
16985
 
16874
16986
  // src/commands/ads/x/targeting-constants.ts
16875
- import { defineCommand as defineCommand82 } from "citty";
16987
+ import { defineCommand as defineCommand83 } from "citty";
16876
16988
  var ALLOWED_CONSTANTS = [
16877
16989
  "locations",
16878
16990
  "interests",
@@ -16900,7 +17012,7 @@ registerSchema({
16900
17012
  "no-cache": { type: "boolean", description: "Skip cache", required: false }
16901
17013
  }
16902
17014
  });
16903
- var targetingConstantsCommand = defineCommand82({
17015
+ var targetingConstantsCommand = defineCommand83({
16904
17016
  meta: {
16905
17017
  name: "targeting-constants",
16906
17018
  description: `Lookup X Ads targeting constants.
@@ -16950,7 +17062,7 @@ Examples:
16950
17062
  });
16951
17063
 
16952
17064
  // src/commands/ads/x/targeting-criteria.ts
16953
- import { defineCommand as defineCommand83 } from "citty";
17065
+ import { defineCommand as defineCommand84 } from "citty";
16954
17066
  registerSchema({
16955
17067
  command: "ads.x.targetingCriteria",
16956
17068
  description: "List targeting criteria attached to line items in an X Ads account. Returns targeting_type, targeting_value, name, operator_type per criterion. Filter by line-item-ids.",
@@ -16960,7 +17072,7 @@ registerSchema({
16960
17072
  "no-cache": { type: "boolean", description: "Skip cache", required: false }
16961
17073
  }
16962
17074
  });
16963
- var targetingCriteriaCommand = defineCommand83({
17075
+ var targetingCriteriaCommand = defineCommand84({
16964
17076
  meta: {
16965
17077
  name: "targeting-criteria",
16966
17078
  description: `List targeting criteria attached to line items.
@@ -17011,7 +17123,7 @@ Examples:
17011
17123
  });
17012
17124
 
17013
17125
  // src/commands/ads/x/index.ts
17014
- var xCommand = defineCommand84({
17126
+ var xCommand = defineCommand85({
17015
17127
  meta: {
17016
17128
  name: "x",
17017
17129
  description: `X (Twitter) Ads commands. Read campaigns, line items, promoted tweets, creatives, audiences, and analytics.
@@ -17050,7 +17162,7 @@ Full guide: __tooling__/docs/tools/baker/ads-x.md`
17050
17162
  });
17051
17163
 
17052
17164
  // src/commands/ads/index.ts
17053
- var adsCommand2 = defineCommand85({
17165
+ var adsCommand2 = defineCommand86({
17054
17166
  meta: {
17055
17167
  name: "ads",
17056
17168
  description: `Ad platform commands. Each platform exposes its own native command surface \u2014 no forced parity.
@@ -17081,12 +17193,12 @@ Full guides: __tooling__/docs/tools/baker/ads-<platform>.md (google|meta|linkedi
17081
17193
  });
17082
17194
 
17083
17195
  // src/commands/brand/index.ts
17084
- import { defineCommand as defineCommand87 } from "citty";
17196
+ import { defineCommand as defineCommand88 } from "citty";
17085
17197
 
17086
17198
  // src/commands/brand/fonts.ts
17087
17199
  import { mkdir, readFile, writeFile } from "fs/promises";
17088
17200
  import path from "path";
17089
- import { defineCommand as defineCommand86 } from "citty";
17201
+ import { defineCommand as defineCommand87 } from "citty";
17090
17202
 
17091
17203
  // src/engine/brand/fonts.ts
17092
17204
  var GOOGLE_CSS2 = "https://fonts.googleapis.com/css2";
@@ -17258,7 +17370,7 @@ async function readGlobalCss() {
17258
17370
  return "";
17259
17371
  }
17260
17372
  }
17261
- var fontsCheckCommand = defineCommand86({
17373
+ var fontsCheckCommand = defineCommand87({
17262
17374
  meta: {
17263
17375
  name: "check",
17264
17376
  description: "Verify the brand's fonts really exist. For every family/weight src/styles/global.css requests from Google Fonts, ask Google what it actually serves and report anything missing \u2014 a weight nobody serves renders as a synthesized fallback and looks off-brand everywhere."
@@ -17302,7 +17414,7 @@ var fontsCheckCommand = defineCommand86({
17302
17414
  });
17303
17415
  }
17304
17416
  });
17305
- var fontsFetchCommand = defineCommand86({
17417
+ var fontsFetchCommand = defineCommand87({
17306
17418
  meta: {
17307
17419
  name: "fetch",
17308
17420
  description: "Download a Google font into src/brand/fonts/ and print the @font-face block to paste above @theme in src/styles/global.css. Use when a brand font should be self-hosted rather than requested from Google on every page load."
@@ -17384,7 +17496,7 @@ var fontsFetchCommand = defineCommand86({
17384
17496
  });
17385
17497
  }
17386
17498
  });
17387
- var fontsCommand = defineCommand86({
17499
+ var fontsCommand = defineCommand87({
17388
17500
  meta: {
17389
17501
  name: "fonts",
17390
17502
  description: `Verify and self-host the brand's typefaces.
@@ -17402,7 +17514,7 @@ Subcommands:
17402
17514
  });
17403
17515
 
17404
17516
  // src/commands/brand/index.ts
17405
- var brandCommand = defineCommand87({
17517
+ var brandCommand = defineCommand88({
17406
17518
  meta: {
17407
17519
  name: "brand",
17408
17520
  description: `Brand asset verification for src/brand/.
@@ -17418,11 +17530,11 @@ Subcommands:
17418
17530
  });
17419
17531
 
17420
17532
  // src/commands/canvas/index.ts
17421
- import { defineCommand as defineCommand98 } from "citty";
17533
+ import { defineCommand as defineCommand99 } from "citty";
17422
17534
 
17423
17535
  // src/commands/canvas/catalog.ts
17424
- import { defineCommand as defineCommand88 } from "citty";
17425
- var catalogCommand = defineCommand88({
17536
+ import { defineCommand as defineCommand89 } from "citty";
17537
+ var catalogCommand = defineCommand89({
17426
17538
  meta: {
17427
17539
  name: "catalog",
17428
17540
  description: "Print the agent-facing node catalog (JSON Schema). Includes every registered node grouped by category."
@@ -17437,7 +17549,7 @@ var catalogCommand = defineCommand88({
17437
17549
  // src/commands/canvas/critique.ts
17438
17550
  import { readFile as readFile2 } from "fs/promises";
17439
17551
  import path2 from "path";
17440
- import { defineCommand as defineCommand89 } from "citty";
17552
+ import { defineCommand as defineCommand90 } from "citty";
17441
17553
 
17442
17554
  // src/engine/scaffold/lib/critique.ts
17443
17555
  var VIBE_CUE = /\b(light|lighting|golden|moody|warm|cool|tone|grade|contrast|shadow|glow|rim|backlit|neon|soft)\b/i;
@@ -17557,7 +17669,7 @@ function critiqueCanvas(canvas) {
17557
17669
  }
17558
17670
 
17559
17671
  // src/commands/canvas/critique.ts
17560
- var critiqueCommand = defineCommand89({
17672
+ var critiqueCommand = defineCommand90({
17561
17673
  meta: {
17562
17674
  name: "critique",
17563
17675
  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."
@@ -17599,9 +17711,9 @@ import { execFile } from "child_process";
17599
17711
  import { readdir, readFile as readFile3, stat } from "fs/promises";
17600
17712
  import path3 from "path";
17601
17713
  import { promisify } from "util";
17602
- import { defineCommand as defineCommand90 } from "citty";
17714
+ import { defineCommand as defineCommand91 } from "citty";
17603
17715
  var execFileAsync = promisify(execFile);
17604
- var inspectCommand = defineCommand90({
17716
+ var inspectCommand = defineCommand91({
17605
17717
  meta: {
17606
17718
  name: "inspect",
17607
17719
  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."
@@ -17709,12 +17821,12 @@ async function probeDuration(filePath) {
17709
17821
 
17710
17822
  // src/commands/canvas/rerun.ts
17711
17823
  import path14 from "path";
17712
- import { defineCommand as defineCommand92 } from "citty";
17824
+ import { defineCommand as defineCommand93 } from "citty";
17713
17825
 
17714
17826
  // src/commands/canvas/run.ts
17715
17827
  import { readFile as readFile10 } from "fs/promises";
17716
17828
  import path13 from "path";
17717
- import { defineCommand as defineCommand91 } from "citty";
17829
+ import { defineCommand as defineCommand92 } from "citty";
17718
17830
 
17719
17831
  // src/commands/canvas/placeholders.ts
17720
17832
  function unsuppliedPlaceholderAssets(canvas) {
@@ -21842,7 +21954,7 @@ async function restoreRunSnapshot(manifest, targetDir, opts = {}) {
21842
21954
  }
21843
21955
 
21844
21956
  // src/commands/canvas/run.ts
21845
- var runCommand = defineCommand91({
21957
+ var runCommand = defineCommand92({
21846
21958
  meta: { name: "run", description: "Validate and execute a canvas JSON file." },
21847
21959
  args: {
21848
21960
  file: { type: "positional", required: true, description: "Path to canvas JSON" },
@@ -22212,7 +22324,7 @@ async function postInitialRunRecord(client, payload) {
22212
22324
 
22213
22325
  // src/commands/canvas/rerun.ts
22214
22326
  var SLUG_PATTERN = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
22215
- var rerunCommand = defineCommand92({
22327
+ var rerunCommand = defineCommand93({
22216
22328
  meta: {
22217
22329
  name: "rerun",
22218
22330
  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."
@@ -22309,7 +22421,7 @@ async function fetchManifest(url) {
22309
22421
  // src/commands/canvas/scaffold-static-ad.ts
22310
22422
  import { access, mkdir as mkdir6, readFile as readFile12, writeFile as writeFile7 } from "fs/promises";
22311
22423
  import path18 from "path";
22312
- import { defineCommand as defineCommand94 } from "citty";
22424
+ import { defineCommand as defineCommand95 } from "citty";
22313
22425
 
22314
22426
  // src/engine/scaffold/staticAd.ts
22315
22427
  import { z as z19 } from "zod";
@@ -22655,7 +22767,7 @@ function isValidScaffoldSlug(slug) {
22655
22767
  // src/commands/canvas/sync-definition.ts
22656
22768
  import { readdir as readdir5, readFile as readFile11, stat as stat3 } from "fs/promises";
22657
22769
  import path17 from "path";
22658
- import { defineCommand as defineCommand93 } from "citty";
22770
+ import { defineCommand as defineCommand94 } from "citty";
22659
22771
 
22660
22772
  // src/commands/canvas/definition-graph.ts
22661
22773
  var MAX_NODES = 300;
@@ -22768,7 +22880,7 @@ async function resolveCanvasPath(inputPath) {
22768
22880
  const chosen = (slug ? canvases.find((name) => name === `${slug}.canvas.json`) : void 0) ?? canvases[0];
22769
22881
  return chosen ? path17.join(dir, chosen) : null;
22770
22882
  }
22771
- var syncDefinitionCommand = defineCommand93({
22883
+ var syncDefinitionCommand = defineCommand94({
22772
22884
  meta: {
22773
22885
  name: "sync-definition",
22774
22886
  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."
@@ -22996,7 +23108,7 @@ async function runVisionPasses(canvas) {
22996
23108
  return fail3("read_outputs", e instanceof Error ? e.message : String(e));
22997
23109
  }
22998
23110
  }
22999
- var scaffoldStaticAdCommand = defineCommand94({
23111
+ var scaffoldStaticAdCommand = defineCommand95({
23000
23112
  meta: {
23001
23113
  name: "scaffold-static-ad",
23002
23114
  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."
@@ -23185,7 +23297,7 @@ var scaffoldStaticAdCommand = defineCommand94({
23185
23297
  import { access as access2, cp, mkdir as mkdir7, readFile as readFile15, rm as rm6, writeFile as writeFile8 } from "fs/promises";
23186
23298
  import { tmpdir as tmpdir2 } from "os";
23187
23299
  import path21 from "path";
23188
- import { defineCommand as defineCommand95 } from "citty";
23300
+ import { defineCommand as defineCommand96 } from "citty";
23189
23301
 
23190
23302
  // src/engine/scaffold/lib/model-router.ts
23191
23303
  var SEEDANCE = "bytedance/seedance-2.0";
@@ -23643,7 +23755,7 @@ async function runAnalysisPasses(deconstructCanvas, selectModel) {
23643
23755
  return fail4("deconstruct", e instanceof Error ? e.message : String(e));
23644
23756
  }
23645
23757
  }
23646
- var scaffoldVideoCommand = defineCommand95({
23758
+ var scaffoldVideoCommand = defineCommand96({
23647
23759
  meta: {
23648
23760
  name: "scaffold-video",
23649
23761
  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`."
@@ -23953,7 +24065,7 @@ var scaffoldVideoCommand = defineCommand95({
23953
24065
  // src/commands/canvas/set-prompt.ts
23954
24066
  import { readFile as readFile16, writeFile as writeFile9 } from "fs/promises";
23955
24067
  import path22 from "path";
23956
- import { defineCommand as defineCommand96 } from "citty";
24068
+ import { defineCommand as defineCommand97 } from "citty";
23957
24069
  function setNodePrompt(canvas, nodeId, text) {
23958
24070
  const nodes = canvas?.nodes;
23959
24071
  if (!Array.isArray(nodes)) throw new Error("canvas has no nodes array");
@@ -23968,7 +24080,7 @@ function setNodePrompt(canvas, nodeId, text) {
23968
24080
  newNodes[idx] = newNode;
23969
24081
  return { ...canvas, nodes: newNodes };
23970
24082
  }
23971
- var setPromptCommand = defineCommand96({
24083
+ var setPromptCommand = defineCommand97({
23972
24084
  meta: {
23973
24085
  name: "set-prompt",
23974
24086
  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."
@@ -24028,8 +24140,8 @@ var setPromptCommand = defineCommand96({
24028
24140
  // src/commands/canvas/validate.ts
24029
24141
  import { readFile as readFile17 } from "fs/promises";
24030
24142
  import path23 from "path";
24031
- import { defineCommand as defineCommand97 } from "citty";
24032
- var validateCommand = defineCommand97({
24143
+ import { defineCommand as defineCommand98 } from "citty";
24144
+ var validateCommand = defineCommand98({
24033
24145
  meta: {
24034
24146
  name: "validate",
24035
24147
  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)."
@@ -24099,7 +24211,7 @@ var validateCommand = defineCommand97({
24099
24211
  });
24100
24212
 
24101
24213
  // src/commands/canvas/index.ts
24102
- var canvasCommand = defineCommand98({
24214
+ var canvasCommand = defineCommand99({
24103
24215
  meta: {
24104
24216
  name: "canvas",
24105
24217
  description: `Run Baker creative canvas JSON files locally. Local nodes execute in-process; remote nodes POST to the Convex backend gateway.
@@ -24133,7 +24245,7 @@ Full guide: __tooling__/docs/tools/baker/canvas.md`
24133
24245
  });
24134
24246
 
24135
24247
  // src/commands/chats/index.ts
24136
- import { defineCommand as defineCommand99 } from "citty";
24248
+ import { defineCommand as defineCommand100 } from "citty";
24137
24249
  var STATUS_GROUPS = ["active", "archived", "all"];
24138
24250
  var REPO_SURFACES = ["knowledge", "company", "brand", "landings", "flows", "creatives"];
24139
24251
  function parseBoundedInt(raw, name, min, max) {
@@ -24155,7 +24267,7 @@ registerSchema({
24155
24267
  full: { type: "boolean", description: "Include each Session's full change list", required: false, default: false }
24156
24268
  }
24157
24269
  });
24158
- var listCommand10 = defineCommand99({
24270
+ var listCommand10 = defineCommand100({
24159
24271
  meta: { name: "list", description: "List other Sessions on this account, newest first." },
24160
24272
  args: {
24161
24273
  status: { type: "string", description: "Filter: active|archived|all (default: all)", required: false },
@@ -24210,7 +24322,7 @@ registerSchema({
24210
24322
  }
24211
24323
  }
24212
24324
  });
24213
- var viewCommand = defineCommand99({
24325
+ var viewCommand = defineCommand100({
24214
24326
  meta: {
24215
24327
  name: "view",
24216
24328
  description: "Inspect one Session's full effects \u2014 git content + actions/tags/ads, kickoff, commits."
@@ -24254,7 +24366,7 @@ registerSchema({
24254
24366
  }
24255
24367
  }
24256
24368
  });
24257
- var transcriptCommand = defineCommand99({
24369
+ var transcriptCommand = defineCommand100({
24258
24370
  meta: { name: "transcript", description: "Read another Session's conversation." },
24259
24371
  args: {
24260
24372
  id: { type: "positional", description: "The Session id", required: true },
@@ -24306,7 +24418,7 @@ registerSchema({
24306
24418
  }
24307
24419
  }
24308
24420
  });
24309
- var diffCommand = defineCommand99({
24421
+ var diffCommand = defineCommand100({
24310
24422
  meta: { name: "diff", description: "See a published Session's real file-level changes." },
24311
24423
  args: {
24312
24424
  id: { type: "positional", description: "The Session id", required: true },
@@ -24350,7 +24462,7 @@ var diffCommand = defineCommand99({
24350
24462
  }
24351
24463
  }
24352
24464
  });
24353
- var chatsCommand = defineCommand99({
24465
+ var chatsCommand = defineCommand100({
24354
24466
  meta: {
24355
24467
  name: "chats",
24356
24468
  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.
@@ -24365,10 +24477,10 @@ Full guide: __tooling__/docs/tools/baker/chats.md`
24365
24477
  });
24366
24478
 
24367
24479
  // src/commands/creatives/index.ts
24368
- import { defineCommand as defineCommand101 } from "citty";
24480
+ import { defineCommand as defineCommand102 } from "citty";
24369
24481
 
24370
24482
  // src/commands/creatives/publish.ts
24371
- import { defineCommand as defineCommand100 } from "citty";
24483
+ import { defineCommand as defineCommand101 } from "citty";
24372
24484
 
24373
24485
  // src/commands/images/api.ts
24374
24486
  import { readFile as readFile18 } from "fs/promises";
@@ -24512,7 +24624,7 @@ async function publishCreative(args, deps = defaultImageApiDeps) {
24512
24624
  chatId: chatIdFromEnv()
24513
24625
  });
24514
24626
  }
24515
- var publishCommand = defineCommand100({
24627
+ var publishCommand = defineCommand101({
24516
24628
  meta: {
24517
24629
  name: "publish",
24518
24630
  description: "Publish a final static creative image to Baker Creatives and print the creative reference JSON."
@@ -24570,7 +24682,7 @@ var publishCommand = defineCommand100({
24570
24682
  });
24571
24683
 
24572
24684
  // src/commands/creatives/index.ts
24573
- var creativesCommand3 = defineCommand101({
24685
+ var creativesCommand3 = defineCommand102({
24574
24686
  meta: {
24575
24687
  name: "creatives",
24576
24688
  description: `Publish static ad creatives as first-class Baker outputs.
@@ -24587,7 +24699,7 @@ Full guide: __tooling__/docs/tools/baker/creatives.md`
24587
24699
  });
24588
24700
 
24589
24701
  // src/commands/flows/index.ts
24590
- import { defineCommand as defineCommand102 } from "citty";
24702
+ import { defineCommand as defineCommand103 } from "citty";
24591
24703
 
24592
24704
  // src/commands/flows/shared.ts
24593
24705
  import { existsSync as existsSync4, readdirSync as readdirSync2, readFileSync as readFileSync9 } from "fs";
@@ -24742,7 +24854,7 @@ function displayName(slug) {
24742
24854
  const name = tree.displayName;
24743
24855
  return typeof name === "string" && name.trim() ? name.trim() : slug;
24744
24856
  }
24745
- var listCommand11 = defineCommand102({
24857
+ var listCommand11 = defineCommand103({
24746
24858
  meta: {
24747
24859
  name: "list",
24748
24860
  description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
@@ -24756,7 +24868,7 @@ var listCommand11 = defineCommand102({
24756
24868
  writeJson({ ok: true, data: { flows } });
24757
24869
  }
24758
24870
  });
24759
- var showCommand2 = defineCommand102({
24871
+ var showCommand2 = defineCommand103({
24760
24872
  meta: {
24761
24873
  name: "show",
24762
24874
  description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
@@ -24777,7 +24889,7 @@ var showCommand2 = defineCommand102({
24777
24889
  writeJson({ ok: true, data: response });
24778
24890
  }
24779
24891
  });
24780
- var flowsCommand = defineCommand102({
24892
+ var flowsCommand = defineCommand103({
24781
24893
  meta: {
24782
24894
  name: "flows",
24783
24895
  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).
@@ -24801,10 +24913,10 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
24801
24913
  });
24802
24914
 
24803
24915
  // src/commands/ga4/index.ts
24804
- import { defineCommand as defineCommand106 } from "citty";
24916
+ import { defineCommand as defineCommand107 } from "citty";
24805
24917
 
24806
24918
  // src/commands/ga4/audit.ts
24807
- import { defineCommand as defineCommand103 } from "citty";
24919
+ import { defineCommand as defineCommand104 } from "citty";
24808
24920
 
24809
24921
  // src/commands/ga4/resolve.ts
24810
24922
  async function fetchProperties(useCache = true) {
@@ -24870,7 +24982,7 @@ registerSchema({
24870
24982
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
24871
24983
  }
24872
24984
  });
24873
- var auditCommand2 = defineCommand103({
24985
+ var auditCommand2 = defineCommand104({
24874
24986
  meta: {
24875
24987
  name: "audit",
24876
24988
  description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
@@ -24925,15 +25037,23 @@ Examples:
24925
25037
  });
24926
25038
 
24927
25039
  // src/commands/ga4/properties.ts
24928
- import { defineCommand as defineCommand104 } from "citty";
25040
+ import { defineCommand as defineCommand105 } from "citty";
24929
25041
  registerSchema({
24930
25042
  command: "ga4.properties",
24931
- description: "List all accessible GA4 properties. Returns property IDs needed for query and audit commands. Run this first to find property IDs.",
25043
+ 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.",
24932
25044
  args: {
24933
25045
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
24934
25046
  }
24935
25047
  });
24936
- var propertiesCommand = defineCommand104({
25048
+ function propertyHints(properties) {
25049
+ return connectedResourceHints({
25050
+ plural: "GA4 properties",
25051
+ singular: "GA4 property",
25052
+ flag: "--property-id",
25053
+ resources: properties.map((property) => ({ id: property.externalId, label: property.name }))
25054
+ });
25055
+ }
25056
+ var propertiesCommand = defineCommand105({
24937
25057
  meta: {
24938
25058
  name: "properties",
24939
25059
  description: `List accessible GA4 properties.
@@ -24950,7 +25070,7 @@ Examples:
24950
25070
  if (useCache) {
24951
25071
  const cached = cacheGet("ga4-properties", "list");
24952
25072
  if (cached) {
24953
- writeJsonEnvelope({ ok: true, data: cached.data, cached: true });
25073
+ writeJsonEnvelope({ ok: true, data: cached.data, cached: true, hints: propertyHints(cached.data) });
24954
25074
  return;
24955
25075
  }
24956
25076
  }
@@ -24965,7 +25085,7 @@ Examples:
24965
25085
  writeAdsOutput(data, format);
24966
25086
  return;
24967
25087
  }
24968
- writeJsonEnvelope({ ok: true, data });
25088
+ writeJsonEnvelope({ ok: true, data, hints: propertyHints(data) });
24969
25089
  } catch (err) {
24970
25090
  if (err instanceof ApiError) {
24971
25091
  if (err.code === "UNAUTHORIZED" || err.code === "NOT_FOUND") {
@@ -24983,7 +25103,7 @@ Examples:
24983
25103
  // src/commands/ga4/query.ts
24984
25104
  import { appendFileSync as appendFileSync2, existsSync as existsSync5, readFileSync as readFileSync10, writeFileSync as writeFileSync3 } from "fs";
24985
25105
  import { resolve as resolve2 } from "path";
24986
- import { defineCommand as defineCommand105 } from "citty";
25106
+ import { defineCommand as defineCommand106 } from "citty";
24987
25107
 
24988
25108
  // src/commands/ga4/presets.ts
24989
25109
  var GA4_PRESETS = [
@@ -25118,7 +25238,7 @@ function handleError(err) {
25118
25238
  });
25119
25239
  process.exit(1);
25120
25240
  }
25121
- var queryCommand2 = defineCommand105({
25241
+ var queryCommand2 = defineCommand106({
25122
25242
  meta: {
25123
25243
  name: "query",
25124
25244
  description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
@@ -25189,7 +25309,7 @@ Free-form (escape hatch):
25189
25309
  });
25190
25310
 
25191
25311
  // src/commands/ga4/index.ts
25192
- var ga4Command = defineCommand106({
25312
+ var ga4Command = defineCommand107({
25193
25313
  meta: {
25194
25314
  name: "ga4",
25195
25315
  description: `Google Analytics 4 commands. Audit property config, run playbook-aligned reports.
@@ -25213,12 +25333,12 @@ Full guide: __tooling__/docs/tools/baker/ga4.md`
25213
25333
  });
25214
25334
 
25215
25335
  // src/commands/gsc/index.ts
25216
- import { defineCommand as defineCommand110 } from "citty";
25336
+ import { defineCommand as defineCommand111 } from "citty";
25217
25337
 
25218
25338
  // src/commands/gsc/query.ts
25219
25339
  import { appendFileSync as appendFileSync3, existsSync as existsSync6, readFileSync as readFileSync11, writeFileSync as writeFileSync4 } from "fs";
25220
25340
  import { resolve as resolve3 } from "path";
25221
- import { defineCommand as defineCommand107 } from "citty";
25341
+ import { defineCommand as defineCommand108 } from "citty";
25222
25342
 
25223
25343
  // src/commands/gsc/presets.ts
25224
25344
  var GSC_PRESETS = [
@@ -25412,7 +25532,7 @@ function handleError2(err) {
25412
25532
  });
25413
25533
  process.exit(1);
25414
25534
  }
25415
- var queryCommand3 = defineCommand107({
25535
+ var queryCommand3 = defineCommand108({
25416
25536
  meta: {
25417
25537
  name: "query",
25418
25538
  description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
@@ -25490,7 +25610,7 @@ Free-form (escape hatch):
25490
25610
  });
25491
25611
 
25492
25612
  // src/commands/gsc/sitemaps.ts
25493
- import { defineCommand as defineCommand108 } from "citty";
25613
+ import { defineCommand as defineCommand109 } from "citty";
25494
25614
  registerSchema({
25495
25615
  command: "gsc.sitemaps",
25496
25616
  description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
@@ -25499,7 +25619,7 @@ registerSchema({
25499
25619
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
25500
25620
  }
25501
25621
  });
25502
- var sitemapsCommand = defineCommand108({
25622
+ var sitemapsCommand = defineCommand109({
25503
25623
  meta: {
25504
25624
  name: "sitemaps",
25505
25625
  description: `List sitemaps for a site. Check health and errors.
@@ -25552,15 +25672,23 @@ Examples:
25552
25672
  });
25553
25673
 
25554
25674
  // src/commands/gsc/sites.ts
25555
- import { defineCommand as defineCommand109 } from "citty";
25675
+ import { defineCommand as defineCommand110 } from "citty";
25556
25676
  registerSchema({
25557
25677
  command: "gsc.sites",
25558
- description: "List all verified Google Search Console sites. Returns site URLs needed for query and sitemaps commands.",
25678
+ 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.",
25559
25679
  args: {
25560
25680
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
25561
25681
  }
25562
25682
  });
25563
- var sitesCommand = defineCommand109({
25683
+ function siteHints(sites) {
25684
+ return connectedResourceHints({
25685
+ plural: "Search Console sites",
25686
+ singular: "Search Console site",
25687
+ flag: "--site-url",
25688
+ resources: sites.map((site) => ({ id: site.siteUrl, label: site.permissionLevel }))
25689
+ });
25690
+ }
25691
+ var sitesCommand = defineCommand110({
25564
25692
  meta: {
25565
25693
  name: "sites",
25566
25694
  description: `List verified Search Console sites.
@@ -25577,7 +25705,7 @@ Examples:
25577
25705
  if (useCache) {
25578
25706
  const cached = cacheGet("gsc-sites", "list");
25579
25707
  if (cached) {
25580
- writeJsonEnvelope({ ok: true, data: cached.data, cached: true });
25708
+ writeJsonEnvelope({ ok: true, data: cached.data, cached: true, hints: siteHints(cached.data) });
25581
25709
  return;
25582
25710
  }
25583
25711
  }
@@ -25592,7 +25720,7 @@ Examples:
25592
25720
  writeAdsOutput(data, format);
25593
25721
  return;
25594
25722
  }
25595
- writeJsonEnvelope({ ok: true, data });
25723
+ writeJsonEnvelope({ ok: true, data, hints: siteHints(data) });
25596
25724
  } catch (err) {
25597
25725
  if (err instanceof ApiError) {
25598
25726
  if (err.code === "UNAUTHORIZED" || err.code === "NOT_FOUND") {
@@ -25608,7 +25736,7 @@ Examples:
25608
25736
  });
25609
25737
 
25610
25738
  // src/commands/gsc/index.ts
25611
- var gscCommand = defineCommand110({
25739
+ var gscCommand = defineCommand111({
25612
25740
  meta: {
25613
25741
  name: "gsc",
25614
25742
  description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
@@ -25632,7 +25760,7 @@ Full guide: __tooling__/docs/tools/baker/gsc.md`
25632
25760
  });
25633
25761
 
25634
25762
  // src/commands/history/index.ts
25635
- import { defineCommand as defineCommand111 } from "citty";
25763
+ import { defineCommand as defineCommand112 } from "citty";
25636
25764
  registerSchema({
25637
25765
  command: "history.list",
25638
25766
  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.",
@@ -25687,7 +25815,7 @@ function parseBoundedInt2(raw, name, min, max) {
25687
25815
  }
25688
25816
  return value;
25689
25817
  }
25690
- var listCommand12 = defineCommand111({
25818
+ var listCommand12 = defineCommand112({
25691
25819
  meta: {
25692
25820
  name: "list",
25693
25821
  description: "List recent account changes (unified audit log), newest first."
@@ -25733,7 +25861,7 @@ var listCommand12 = defineCommand111({
25733
25861
  }
25734
25862
  }
25735
25863
  });
25736
- var historyCommand = defineCommand111({
25864
+ var historyCommand = defineCommand112({
25737
25865
  meta: {
25738
25866
  name: "history",
25739
25867
  description: `Unified account history (audit log): what changed, who did it, and when.
@@ -25743,7 +25871,7 @@ Full guide: __tooling__/docs/tools/baker/history.md`
25743
25871
  });
25744
25872
 
25745
25873
  // src/commands/hubspot/index.ts
25746
- import { defineCommand as defineCommand112 } from "citty";
25874
+ import { defineCommand as defineCommand113 } from "citty";
25747
25875
  var EMBED_TYPES = ["legacy", "v4", "unknown"];
25748
25876
  function failNotConnected(err) {
25749
25877
  if (err instanceof ApiError && err.code === "NOT_FOUND" && err.message.includes("No HubSpot account is connected")) {
@@ -25825,7 +25953,7 @@ registerSchema({
25825
25953
  }
25826
25954
  }
25827
25955
  });
25828
- var formsListCommand = defineCommand112({
25956
+ var formsListCommand = defineCommand113({
25829
25957
  meta: {
25830
25958
  name: "list",
25831
25959
  description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
@@ -25870,7 +25998,7 @@ var formsListCommand = defineCommand112({
25870
25998
  }
25871
25999
  }
25872
26000
  });
25873
- var formsViewCommand = defineCommand112({
26001
+ var formsViewCommand = defineCommand113({
25874
26002
  meta: {
25875
26003
  name: "view",
25876
26004
  description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
@@ -25922,7 +26050,7 @@ var formsViewCommand = defineCommand112({
25922
26050
  }
25923
26051
  }
25924
26052
  });
25925
- var meetingsListCommand = defineCommand112({
26053
+ var meetingsListCommand = defineCommand113({
25926
26054
  meta: {
25927
26055
  name: "list",
25928
26056
  description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
@@ -25964,7 +26092,7 @@ var meetingsListCommand = defineCommand112({
25964
26092
  }
25965
26093
  }
25966
26094
  });
25967
- var meetingsViewCommand = defineCommand112({
26095
+ var meetingsViewCommand = defineCommand113({
25968
26096
  meta: {
25969
26097
  name: "view",
25970
26098
  description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
@@ -26008,15 +26136,15 @@ var meetingsViewCommand = defineCommand112({
26008
26136
  }
26009
26137
  }
26010
26138
  });
26011
- var formsCommand = defineCommand112({
26139
+ var formsCommand = defineCommand113({
26012
26140
  meta: { name: "forms", description: "HubSpot forms on the connected account." },
26013
26141
  subCommands: { list: formsListCommand, view: formsViewCommand }
26014
26142
  });
26015
- var meetingsCommand = defineCommand112({
26143
+ var meetingsCommand = defineCommand113({
26016
26144
  meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
26017
26145
  subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
26018
26146
  });
26019
- var hubspotCommand = defineCommand112({
26147
+ var hubspotCommand = defineCommand113({
26020
26148
  meta: {
26021
26149
  name: "hubspot",
26022
26150
  description: `Read the connected HubSpot account \u2014 forms and meeting links (calendars) \u2014 and get the blob to wire one into a Form step yourself.
@@ -26037,10 +26165,10 @@ Full guide: __tooling__/docs/tools/baker/hubspot.md`
26037
26165
  });
26038
26166
 
26039
26167
  // src/commands/images/index.ts
26040
- import { defineCommand as defineCommand136 } from "citty";
26168
+ import { defineCommand as defineCommand137 } from "citty";
26041
26169
 
26042
26170
  // src/commands/images/crop.ts
26043
- import { defineCommand as defineCommand113 } from "citty";
26171
+ import { defineCommand as defineCommand114 } from "citty";
26044
26172
 
26045
26173
  // src/lib/image/crop-sprite.ts
26046
26174
  import sharp from "sharp";
@@ -26165,7 +26293,7 @@ function emitError2(err) {
26165
26293
  }
26166
26294
  process.exit(1);
26167
26295
  }
26168
- var cropCommand = defineCommand113({
26296
+ var cropCommand = defineCommand114({
26169
26297
  meta: {
26170
26298
  name: "crop",
26171
26299
  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"
@@ -26201,7 +26329,7 @@ var cropCommand = defineCommand113({
26201
26329
  });
26202
26330
 
26203
26331
  // src/commands/images/delete.ts
26204
- import { defineCommand as defineCommand114 } from "citty";
26332
+ import { defineCommand as defineCommand115 } from "citty";
26205
26333
  registerSchema({
26206
26334
  command: "images.delete",
26207
26335
  description: "Delete an image by ID",
@@ -26215,7 +26343,7 @@ registerSchema({
26215
26343
  }
26216
26344
  }
26217
26345
  });
26218
- var deleteCommand = defineCommand114({
26346
+ var deleteCommand = defineCommand115({
26219
26347
  meta: {
26220
26348
  name: "delete",
26221
26349
  description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
@@ -26256,7 +26384,7 @@ var deleteCommand = defineCommand114({
26256
26384
  });
26257
26385
 
26258
26386
  // src/commands/images/dimensions.ts
26259
- import { defineCommand as defineCommand115 } from "citty";
26387
+ import { defineCommand as defineCommand116 } from "citty";
26260
26388
 
26261
26389
  // src/lib/image/dimensions.ts
26262
26390
  import { imageSize } from "image-size";
@@ -26279,7 +26407,7 @@ registerSchema({
26279
26407
  target: { type: "string", description: "Local file path or remote http(s) URL", required: true }
26280
26408
  }
26281
26409
  });
26282
- var dimensionsCommand = defineCommand115({
26410
+ var dimensionsCommand = defineCommand116({
26283
26411
  meta: {
26284
26412
  name: "dimensions",
26285
26413
  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"
@@ -26323,7 +26451,7 @@ var dimensionsCommand = defineCommand115({
26323
26451
  });
26324
26452
 
26325
26453
  // src/commands/images/extract.ts
26326
- import { defineCommand as defineCommand116 } from "citty";
26454
+ import { defineCommand as defineCommand117 } from "citty";
26327
26455
  registerSchema({
26328
26456
  command: "images.extract",
26329
26457
  description: "Extract images from a URL via Firecrawl (formats: images).",
@@ -26339,7 +26467,7 @@ registerSchema({
26339
26467
  }
26340
26468
  }
26341
26469
  });
26342
- var extractCommand = defineCommand116({
26470
+ var extractCommand = defineCommand117({
26343
26471
  meta: {
26344
26472
  name: "extract",
26345
26473
  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"
@@ -26377,7 +26505,7 @@ var extractCommand = defineCommand116({
26377
26505
  });
26378
26506
 
26379
26507
  // src/commands/images/find.ts
26380
- import { defineCommand as defineCommand117 } from "citty";
26508
+ import { defineCommand as defineCommand118 } from "citty";
26381
26509
  registerSchema({
26382
26510
  command: "images.find",
26383
26511
  description: "Fanout image search: library first, then opted-in external providers.",
@@ -26409,7 +26537,7 @@ registerSchema({
26409
26537
  }
26410
26538
  }
26411
26539
  });
26412
- var findCommand = defineCommand117({
26540
+ var findCommand = defineCommand118({
26413
26541
  meta: {
26414
26542
  name: "find",
26415
26543
  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"
@@ -26458,7 +26586,7 @@ var findCommand = defineCommand117({
26458
26586
 
26459
26587
  // src/commands/images/generate.ts
26460
26588
  import { readFile as readFile20 } from "fs/promises";
26461
- import { defineCommand as defineCommand118 } from "citty";
26589
+ import { defineCommand as defineCommand119 } from "citty";
26462
26590
  import sharp2 from "sharp";
26463
26591
  var GENERATE_TIMEOUT_MS = 18e4;
26464
26592
  var REFERENCE_MAX_EDGE = 1536;
@@ -26561,7 +26689,7 @@ async function resolveReferences(spec) {
26561
26689
  }
26562
26690
  return out;
26563
26691
  }
26564
- var generateCommand = defineCommand118({
26692
+ var generateCommand = defineCommand119({
26565
26693
  meta: {
26566
26694
  name: "generate",
26567
26695
  description: "Generate an image with AI and store it in the library (cost-tracked per request via OpenRouter usage). Models mirror the canvas: google/gemini-3.1-flash-image-preview (Nano Banana flash \u2014 default, fast, extreme aspect ratios), google/gemini-3-pro-image-preview (Nano Banana Pro \u2014 highest fidelity), openai/gpt-image-2 (photoreal, cleanest in-image text, best for ad/landing reproduction \u2014 no --image-size, and no 4:5 / 5:4), recraft/recraft-v4.1-pro-vector (vector/SVG-style with palette control). The result is auto-ingested (describe + embed), so the next `baker images library` query finds it. Pass --reference with image URLs and/or local file paths (Pinterest, stock, brand assets, sandbox files) to ground generation in reality.\n\nExamples:\n baker images generate 'a friendly golden retriever sitting in a bright modern living room' --aspect-ratio 16:9\n baker images generate 'hero shot of a matte black water bottle on marble' --model openai/gpt-image-2 --aspect-ratio 3:2\n baker images generate 'lifestyle photo matching this mood' --reference 'https://\u2026/ref1.jpg,https://\u2026/ref2.jpg'\n baker images generate 'put this product on a marble countertop, soft daylight' --reference './src/brand/logos/product.png,./refs/kitchen-mood.jpg'\n baker images generate 'flat geometric mascot, brand palette' --model recraft/recraft-v4.1-pro-vector --rgb-colors '[[10,10,10],[255,80,0]]'"
@@ -26613,7 +26741,7 @@ var generateCommand = defineCommand118({
26613
26741
  });
26614
26742
 
26615
26743
  // src/commands/images/get.ts
26616
- import { defineCommand as defineCommand119 } from "citty";
26744
+ import { defineCommand as defineCommand120 } from "citty";
26617
26745
  registerSchema({
26618
26746
  command: "images.get",
26619
26747
  description: "Get a single image by ID",
@@ -26621,7 +26749,7 @@ registerSchema({
26621
26749
  id: { type: "string", description: "Image ID", required: true }
26622
26750
  }
26623
26751
  });
26624
- var getCommand2 = defineCommand119({
26752
+ var getCommand2 = defineCommand120({
26625
26753
  meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
26626
26754
  args: {
26627
26755
  id: { type: "positional", description: "Image ID", required: false },
@@ -26657,7 +26785,7 @@ var getCommand2 = defineCommand119({
26657
26785
  });
26658
26786
 
26659
26787
  // src/commands/images/gif.ts
26660
- import { defineCommand as defineCommand120 } from "citty";
26788
+ import { defineCommand as defineCommand121 } from "citty";
26661
26789
  registerSchema({
26662
26790
  command: "images.gif",
26663
26791
  description: "Search Giphy for GIFs / reaction memes (paid social creative).",
@@ -26689,7 +26817,7 @@ registerSchema({
26689
26817
  }
26690
26818
  }
26691
26819
  });
26692
- var gifCommand = defineCommand120({
26820
+ var gifCommand = defineCommand121({
26693
26821
  meta: {
26694
26822
  name: "gif",
26695
26823
  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"
@@ -26736,7 +26864,7 @@ var gifCommand = defineCommand120({
26736
26864
  });
26737
26865
 
26738
26866
  // src/commands/images/google.ts
26739
- import { defineCommand as defineCommand121 } from "citty";
26867
+ import { defineCommand as defineCommand122 } from "citty";
26740
26868
 
26741
26869
  // src/commands/images/searchHints.ts
26742
26870
  var FALLBACK = {
@@ -26800,7 +26928,7 @@ registerSchema({
26800
26928
  }
26801
26929
  }
26802
26930
  });
26803
- var googleCommand2 = defineCommand121({
26931
+ var googleCommand2 = defineCommand122({
26804
26932
  meta: {
26805
26933
  name: "google",
26806
26934
  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"
@@ -26856,7 +26984,7 @@ var googleCommand2 = defineCommand121({
26856
26984
  });
26857
26985
 
26858
26986
  // src/commands/images/icon.ts
26859
- import { defineCommand as defineCommand122 } from "citty";
26987
+ import { defineCommand as defineCommand123 } from "citty";
26860
26988
  registerSchema({
26861
26989
  command: "images.icon",
26862
26990
  description: "Icon lookup via Iconify (200+ icon sets, free CDN).",
@@ -26882,7 +27010,7 @@ registerSchema({
26882
27010
  }
26883
27011
  }
26884
27012
  });
26885
- var iconCommand = defineCommand122({
27013
+ var iconCommand = defineCommand123({
26886
27014
  meta: {
26887
27015
  name: "icon",
26888
27016
  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'"
@@ -26922,7 +27050,7 @@ var iconCommand = defineCommand122({
26922
27050
  });
26923
27051
 
26924
27052
  // src/commands/images/ingest.ts
26925
- import { defineCommand as defineCommand123 } from "citty";
27053
+ import { defineCommand as defineCommand124 } from "citty";
26926
27054
  registerSchema({
26927
27055
  command: "images.ingest",
26928
27056
  description: "Ingest a remote image URL into the library (full describe + embed).",
@@ -26934,7 +27062,7 @@ registerSchema({
26934
27062
  context: { type: "string", description: "Description context hint", required: false }
26935
27063
  }
26936
27064
  });
26937
- var ingestCommand = defineCommand123({
27065
+ var ingestCommand = defineCommand124({
26938
27066
  meta: {
26939
27067
  name: "ingest",
26940
27068
  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"
@@ -26976,7 +27104,7 @@ var ingestCommand = defineCommand123({
26976
27104
  });
26977
27105
 
26978
27106
  // src/commands/images/library.ts
26979
- import { defineCommand as defineCommand124 } from "citty";
27107
+ import { defineCommand as defineCommand125 } from "citty";
26980
27108
  registerSchema({
26981
27109
  command: "images.library",
26982
27110
  description: "Search the company image library. Returns only ready images.",
@@ -27002,7 +27130,7 @@ registerSchema({
27002
27130
  }
27003
27131
  }
27004
27132
  });
27005
- var libraryCommand = defineCommand124({
27133
+ var libraryCommand = defineCommand125({
27006
27134
  meta: {
27007
27135
  name: "library",
27008
27136
  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"
@@ -27059,7 +27187,7 @@ var libraryCommand = defineCommand124({
27059
27187
  });
27060
27188
 
27061
27189
  // src/commands/images/logo.ts
27062
- import { defineCommand as defineCommand125 } from "citty";
27190
+ import { defineCommand as defineCommand126 } from "citty";
27063
27191
  registerSchema({
27064
27192
  command: "images.logo",
27065
27193
  description: "Brand logo lookup via Brandfetch CDN (fallback/404). Auto-ingests by default.",
@@ -27084,7 +27212,7 @@ registerSchema({
27084
27212
  }
27085
27213
  }
27086
27214
  });
27087
- var logoCommand = defineCommand125({
27215
+ var logoCommand = defineCommand126({
27088
27216
  meta: {
27089
27217
  name: "logo",
27090
27218
  description: "Brand logo via Brandfetch CDN. Returns up to 5 variants (icon, light/dark logo, light/dark symbol). Auto-ingests the first variant.\n\nExample: baker images logo stripe.com --variant logo"
@@ -27122,7 +27250,7 @@ var logoCommand = defineCommand125({
27122
27250
  });
27123
27251
 
27124
27252
  // src/commands/images/normalize.ts
27125
- import { defineCommand as defineCommand126 } from "citty";
27253
+ import { defineCommand as defineCommand127 } from "citty";
27126
27254
 
27127
27255
  // src/lib/image/color-changer.ts
27128
27256
  import quantize from "quantize";
@@ -27854,7 +27982,7 @@ function coerceRawArgs(args) {
27854
27982
  "dry-run": bool(args["dry-run"])
27855
27983
  };
27856
27984
  }
27857
- var normalizeCommand = defineCommand126({
27985
+ var normalizeCommand = defineCommand127({
27858
27986
  meta: {
27859
27987
  name: "normalize",
27860
27988
  description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
@@ -27909,7 +28037,7 @@ Examples:
27909
28037
  });
27910
28038
 
27911
28039
  // src/commands/images/pinterest.ts
27912
- import { defineCommand as defineCommand127 } from "citty";
28040
+ import { defineCommand as defineCommand128 } from "citty";
27913
28041
  registerSchema({
27914
28042
  command: "images.pinterest",
27915
28043
  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.",
@@ -27929,7 +28057,7 @@ registerSchema({
27929
28057
  }
27930
28058
  }
27931
28059
  });
27932
- var pinterestCommand = defineCommand127({
28060
+ var pinterestCommand = defineCommand128({
27933
28061
  meta: {
27934
28062
  name: "pinterest",
27935
28063
  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'"
@@ -27969,7 +28097,7 @@ var pinterestCommand = defineCommand127({
27969
28097
  });
27970
28098
 
27971
28099
  // src/commands/images/screenshot.ts
27972
- import { defineCommand as defineCommand128 } from "citty";
28100
+ import { defineCommand as defineCommand129 } from "citty";
27973
28101
  registerSchema({
27974
28102
  command: "images.screenshot",
27975
28103
  description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
@@ -27985,7 +28113,7 @@ registerSchema({
27985
28113
  }
27986
28114
  }
27987
28115
  });
27988
- var screenshotCommand = defineCommand128({
28116
+ var screenshotCommand = defineCommand129({
27989
28117
  meta: {
27990
28118
  name: "screenshot",
27991
28119
  description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
@@ -28048,7 +28176,7 @@ var screenshotCommand = defineCommand128({
28048
28176
  });
28049
28177
 
28050
28178
  // src/commands/images/search.ts
28051
- import { defineCommand as defineCommand129 } from "citty";
28179
+ import { defineCommand as defineCommand130 } from "citty";
28052
28180
  registerSchema({
28053
28181
  command: "images.search",
28054
28182
  description: "Search images by text query. Only returns ready images.",
@@ -28064,7 +28192,7 @@ registerSchema({
28064
28192
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
28065
28193
  }
28066
28194
  });
28067
- var searchCommand = defineCommand129({
28195
+ var searchCommand = defineCommand130({
28068
28196
  meta: {
28069
28197
  name: "search",
28070
28198
  description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
@@ -28124,7 +28252,7 @@ var searchCommand = defineCommand129({
28124
28252
  });
28125
28253
 
28126
28254
  // src/commands/images/sticker.ts
28127
- import { defineCommand as defineCommand130 } from "citty";
28255
+ import { defineCommand as defineCommand131 } from "citty";
28128
28256
  registerSchema({
28129
28257
  command: "images.sticker",
28130
28258
  description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
@@ -28156,7 +28284,7 @@ registerSchema({
28156
28284
  }
28157
28285
  }
28158
28286
  });
28159
- var stickerCommand = defineCommand130({
28287
+ var stickerCommand = defineCommand131({
28160
28288
  meta: {
28161
28289
  name: "sticker",
28162
28290
  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"
@@ -28203,7 +28331,7 @@ var stickerCommand = defineCommand130({
28203
28331
  });
28204
28332
 
28205
28333
  // src/commands/images/stock.ts
28206
- import { defineCommand as defineCommand131 } from "citty";
28334
+ import { defineCommand as defineCommand132 } from "citty";
28207
28335
  var STOCK_ERROR_FIX = {
28208
28336
  action: "use_different_resource",
28209
28337
  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 images 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."
@@ -28280,7 +28408,7 @@ function buildStockRequest(query, args) {
28280
28408
  if (args.context) body.descriptionContext = args.context;
28281
28409
  return body;
28282
28410
  }
28283
- var stockCommand = defineCommand131({
28411
+ var stockCommand = defineCommand132({
28284
28412
  meta: {
28285
28413
  name: "stock",
28286
28414
  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"
@@ -28336,7 +28464,7 @@ var stockCommand = defineCommand131({
28336
28464
  });
28337
28465
 
28338
28466
  // src/lib/tags-command.ts
28339
- import { defineCommand as defineCommand132 } from "citty";
28467
+ import { defineCommand as defineCommand133 } from "citty";
28340
28468
  function makeTagsCommand(command, label, endpoint) {
28341
28469
  registerSchema({
28342
28470
  command: `${command}.tags`,
@@ -28345,7 +28473,7 @@ function makeTagsCommand(command, label, endpoint) {
28345
28473
  output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
28346
28474
  }
28347
28475
  });
28348
- return defineCommand132({
28476
+ return defineCommand133({
28349
28477
  meta: {
28350
28478
  name: "tags",
28351
28479
  description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
@@ -28381,7 +28509,7 @@ function makeTagsCommand(command, label, endpoint) {
28381
28509
  var tagsCommand2 = makeTagsCommand("images", "image", "/api/images/tags");
28382
28510
 
28383
28511
  // src/commands/images/upload.ts
28384
- import { defineCommand as defineCommand133 } from "citty";
28512
+ import { defineCommand as defineCommand134 } from "citty";
28385
28513
  registerSchema({
28386
28514
  command: "images.upload",
28387
28515
  description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
@@ -28419,7 +28547,7 @@ registerSchema({
28419
28547
  function isRemoteUrl2(value) {
28420
28548
  return /^https?:\/\//i.test(value);
28421
28549
  }
28422
- var uploadCommand = defineCommand133({
28550
+ var uploadCommand = defineCommand134({
28423
28551
  meta: {
28424
28552
  name: "upload",
28425
28553
  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'"
@@ -28512,7 +28640,7 @@ async function uploadLocal(target, args) {
28512
28640
  }
28513
28641
 
28514
28642
  // src/commands/images/upscale.ts
28515
- import { defineCommand as defineCommand134 } from "citty";
28643
+ import { defineCommand as defineCommand135 } from "citty";
28516
28644
  registerSchema({
28517
28645
  command: "images.upscale",
28518
28646
  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).",
@@ -28527,7 +28655,7 @@ registerSchema({
28527
28655
  }
28528
28656
  });
28529
28657
  var POLL_INTERVAL_MS3 = 1500;
28530
- var upscaleCommand = defineCommand134({
28658
+ var upscaleCommand = defineCommand135({
28531
28659
  meta: {
28532
28660
  name: "upscale",
28533
28661
  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"
@@ -28582,7 +28710,7 @@ var upscaleCommand = defineCommand134({
28582
28710
  });
28583
28711
 
28584
28712
  // src/commands/images/use.ts
28585
- import { defineCommand as defineCommand135 } from "citty";
28713
+ import { defineCommand as defineCommand136 } from "citty";
28586
28714
  registerSchema({
28587
28715
  command: "images.use",
28588
28716
  description: "Ingest a URL and wait for the library record to be ready.",
@@ -28598,7 +28726,7 @@ registerSchema({
28598
28726
  }
28599
28727
  });
28600
28728
  var POLL_INTERVAL_MS4 = 1500;
28601
- var useCommand = defineCommand135({
28729
+ var useCommand = defineCommand136({
28602
28730
  meta: {
28603
28731
  name: "use",
28604
28732
  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"
@@ -28644,7 +28772,7 @@ var useCommand = defineCommand135({
28644
28772
  });
28645
28773
 
28646
28774
  // src/commands/images/index.ts
28647
- var imagesCommand = defineCommand136({
28775
+ var imagesCommand = defineCommand137({
28648
28776
  meta: {
28649
28777
  name: "images",
28650
28778
  description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
@@ -28715,12 +28843,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
28715
28843
  });
28716
28844
 
28717
28845
  // src/commands/landing/index.ts
28718
- import { defineCommand as defineCommand138 } from "citty";
28846
+ import { defineCommand as defineCommand139 } from "citty";
28719
28847
 
28720
28848
  // src/commands/landing/critique.ts
28721
28849
  import { readdir as readdir8, stat as stat6 } from "fs/promises";
28722
28850
  import path27 from "path";
28723
- import { defineCommand as defineCommand137 } from "citty";
28851
+ import { defineCommand as defineCommand138 } from "citty";
28724
28852
 
28725
28853
  // src/engine/landing/lib/brand-tokens.ts
28726
28854
  import { readFile as readFile21 } from "fs/promises";
@@ -29978,7 +30106,7 @@ function fail5(code, message, fix) {
29978
30106
  );
29979
30107
  process.exit(2);
29980
30108
  }
29981
- var critiqueCommand2 = defineCommand137({
30109
+ var critiqueCommand2 = defineCommand138({
29982
30110
  meta: {
29983
30111
  name: "critique",
29984
30112
  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."
@@ -30087,7 +30215,7 @@ async function isDir(p) {
30087
30215
  }
30088
30216
 
30089
30217
  // src/commands/landing/index.ts
30090
- var landingCommand = defineCommand138({
30218
+ var landingCommand = defineCommand139({
30091
30219
  meta: {
30092
30220
  name: "landing",
30093
30221
  description: `Design-quality tools for landing pages (src/pages/<slug>/).
@@ -30103,7 +30231,7 @@ Subcommands:
30103
30231
  });
30104
30232
 
30105
30233
  // src/commands/mcp/index.ts
30106
- import { defineCommand as defineCommand139 } from "citty";
30234
+ import { defineCommand as defineCommand140 } from "citty";
30107
30235
  var SCOPES = ["user", "user_org", "company", "org"];
30108
30236
  function parseScope(raw) {
30109
30237
  const scope = raw === void 0 ? "company" : String(raw);
@@ -30156,7 +30284,7 @@ registerSchema({
30156
30284
  description: "List every third-party tool this chat can reach: managed integrations (Attio, Slack, Gmail, Google Sheets, \u2026) plus custom MCP servers. Start here when the user mentions an external tool.",
30157
30285
  args: {}
30158
30286
  });
30159
- var connectedCommand = defineCommand139({
30287
+ var connectedCommand = defineCommand140({
30160
30288
  meta: {
30161
30289
  name: "connected",
30162
30290
  description: `List all connected third-party tools \u2014 managed integrations plus custom MCP servers.
@@ -30209,7 +30337,7 @@ registerSchema({
30209
30337
  description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
30210
30338
  args: {}
30211
30339
  });
30212
- var listCommand13 = defineCommand139({
30340
+ var listCommand13 = defineCommand140({
30213
30341
  meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
30214
30342
  run: async () => {
30215
30343
  try {
@@ -30246,7 +30374,7 @@ registerSchema({
30246
30374
  header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
30247
30375
  }
30248
30376
  });
30249
- var addCommand = defineCommand139({
30377
+ var addCommand = defineCommand140({
30250
30378
  meta: {
30251
30379
  name: "add",
30252
30380
  description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
@@ -30298,7 +30426,7 @@ registerSchema({
30298
30426
  description: "Remove a company custom MCP server by name.",
30299
30427
  args: { name: { type: "string", description: "Server name to remove", required: true } }
30300
30428
  });
30301
- var removeCommand4 = defineCommand139({
30429
+ var removeCommand4 = defineCommand140({
30302
30430
  meta: {
30303
30431
  name: "remove",
30304
30432
  description: `Remove a company custom MCP server by name.
@@ -30320,7 +30448,7 @@ Example:
30320
30448
  }
30321
30449
  }
30322
30450
  });
30323
- var mcpCommand = defineCommand139({
30451
+ var mcpCommand = defineCommand140({
30324
30452
  meta: {
30325
30453
  name: "mcp",
30326
30454
  description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
@@ -30346,10 +30474,10 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
30346
30474
  });
30347
30475
 
30348
30476
  // src/commands/research/index.ts
30349
- import { defineCommand as defineCommand150 } from "citty";
30477
+ import { defineCommand as defineCommand151 } from "citty";
30350
30478
 
30351
30479
  // src/commands/research/advertisers.ts
30352
- import { defineCommand as defineCommand140 } from "citty";
30480
+ import { defineCommand as defineCommand141 } from "citty";
30353
30481
 
30354
30482
  // src/commands/research/output.ts
30355
30483
  var RESEARCH_DATA_NOTE = "Estimates based on third-party SERP data \u2014 not exact figures. Use for directional insights, not precise measurement.";
@@ -30462,7 +30590,7 @@ var FIELDS3 = {
30462
30590
  etv: "Estimated traffic value (USD)",
30463
30591
  visibility: "SERP visibility score (0-1)"
30464
30592
  };
30465
- var advertisersCommand = defineCommand140({
30593
+ var advertisersCommand = defineCommand141({
30466
30594
  meta: {
30467
30595
  name: "advertisers",
30468
30596
  description: `Find domains competing for a keyword in Google SERPs.
@@ -30509,7 +30637,7 @@ Examples:
30509
30637
  });
30510
30638
 
30511
30639
  // src/commands/research/autocomplete.ts
30512
- import { defineCommand as defineCommand141 } from "citty";
30640
+ import { defineCommand as defineCommand142 } from "citty";
30513
30641
  registerSchema({
30514
30642
  command: "research.autocomplete",
30515
30643
  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).",
@@ -30532,7 +30660,7 @@ registerSchema({
30532
30660
  var FIELDS4 = {
30533
30661
  suggestion: "Autocomplete suggestion from Google"
30534
30662
  };
30535
- var autocompleteCommand = defineCommand141({
30663
+ var autocompleteCommand = defineCommand142({
30536
30664
  meta: {
30537
30665
  name: "autocomplete",
30538
30666
  description: `Get Google Autocomplete suggestions for keyword expansion.
@@ -30578,7 +30706,7 @@ Examples:
30578
30706
  });
30579
30707
 
30580
30708
  // src/commands/research/countries.ts
30581
- import { defineCommand as defineCommand142 } from "citty";
30709
+ import { defineCommand as defineCommand143 } from "citty";
30582
30710
  registerSchema({
30583
30711
  command: "research.countries",
30584
30712
  description: "List all supported country codes for --location flag in research commands.",
@@ -30635,7 +30763,7 @@ var FIELDS5 = {
30635
30763
  code: "Country code to pass as --location",
30636
30764
  name: "Country name"
30637
30765
  };
30638
- var countriesCommand = defineCommand142({
30766
+ var countriesCommand = defineCommand143({
30639
30767
  meta: {
30640
30768
  name: "countries",
30641
30769
  description: "List all supported country codes for --location flag."
@@ -30646,7 +30774,7 @@ var countriesCommand = defineCommand142({
30646
30774
  });
30647
30775
 
30648
30776
  // src/commands/research/intent.ts
30649
- import { defineCommand as defineCommand143 } from "citty";
30777
+ import { defineCommand as defineCommand144 } from "citty";
30650
30778
  registerSchema({
30651
30779
  command: "research.intent",
30652
30780
  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.",
@@ -30669,7 +30797,7 @@ var FIELDS6 = {
30669
30797
  intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
30670
30798
  probability: "Confidence score 0.0-1.0"
30671
30799
  };
30672
- var intentCommand = defineCommand143({
30800
+ var intentCommand = defineCommand144({
30673
30801
  meta: {
30674
30802
  name: "intent",
30675
30803
  description: `Classify Google Search intent for keywords. Returns intent type and confidence.
@@ -30717,7 +30845,7 @@ Examples:
30717
30845
  });
30718
30846
 
30719
30847
  // src/commands/research/keyword-gap.ts
30720
- import { defineCommand as defineCommand144 } from "citty";
30848
+ import { defineCommand as defineCommand145 } from "citty";
30721
30849
  registerSchema({
30722
30850
  command: "research.keyword-gap",
30723
30851
  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.",
@@ -30746,7 +30874,7 @@ var FIELDS7 = {
30746
30874
  cpc: "Cost per click USD",
30747
30875
  their_position: "Competitor's ranking position"
30748
30876
  };
30749
- var keywordGapCommand = defineCommand144({
30877
+ var keywordGapCommand = defineCommand145({
30750
30878
  meta: {
30751
30879
  name: "keyword-gap",
30752
30880
  description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
@@ -30820,7 +30948,7 @@ Examples:
30820
30948
  });
30821
30949
 
30822
30950
  // src/commands/research/keywords-for-site.ts
30823
- import { defineCommand as defineCommand145 } from "citty";
30951
+ import { defineCommand as defineCommand146 } from "citty";
30824
30952
  registerSchema({
30825
30953
  command: "research.keywords-for-site",
30826
30954
  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.",
@@ -30853,7 +30981,7 @@ var FIELDS8 = {
30853
30981
  competition: "LOW, MEDIUM, or HIGH",
30854
30982
  competition_index: "Competition score 0-100"
30855
30983
  };
30856
- var keywordsForSiteCommand = defineCommand145({
30984
+ var keywordsForSiteCommand = defineCommand146({
30857
30985
  meta: {
30858
30986
  name: "keywords-for-site",
30859
30987
  description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
@@ -30906,7 +31034,7 @@ Examples:
30906
31034
  });
30907
31035
 
30908
31036
  // src/commands/research/languages.ts
30909
- import { defineCommand as defineCommand146 } from "citty";
31037
+ import { defineCommand as defineCommand147 } from "citty";
30910
31038
  registerSchema({
30911
31039
  command: "research.languages",
30912
31040
  description: "List all supported language codes for --language flag in research commands.",
@@ -30936,7 +31064,7 @@ var FIELDS9 = {
30936
31064
  code: "Language code to pass as --language",
30937
31065
  name: "Language name (also accepted by --language)"
30938
31066
  };
30939
- var languagesCommand2 = defineCommand146({
31067
+ var languagesCommand2 = defineCommand147({
30940
31068
  meta: {
30941
31069
  name: "languages",
30942
31070
  description: "List all supported language codes for --language flag."
@@ -30947,7 +31075,7 @@ var languagesCommand2 = defineCommand146({
30947
31075
  });
30948
31076
 
30949
31077
  // src/commands/research/lighthouse.ts
30950
- import { defineCommand as defineCommand147 } from "citty";
31078
+ import { defineCommand as defineCommand148 } from "citty";
30951
31079
  registerSchema({
30952
31080
  command: "research.lighthouse",
30953
31081
  description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
@@ -30966,7 +31094,7 @@ var FIELDS10 = {
30966
31094
  speed_index_ms: "Speed Index in ms (good: < 3400)",
30967
31095
  interactive_ms: "Time to Interactive in ms (good: < 3800)"
30968
31096
  };
30969
- var lighthouseCommand = defineCommand147({
31097
+ var lighthouseCommand = defineCommand148({
30970
31098
  meta: {
30971
31099
  name: "lighthouse",
30972
31100
  description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
@@ -31004,7 +31132,7 @@ Examples:
31004
31132
  });
31005
31133
 
31006
31134
  // src/commands/research/relevant-pages.ts
31007
- import { defineCommand as defineCommand148 } from "citty";
31135
+ import { defineCommand as defineCommand149 } from "citty";
31008
31136
  registerSchema({
31009
31137
  command: "research.relevant-pages",
31010
31138
  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).",
@@ -31030,7 +31158,7 @@ var FIELDS11 = {
31030
31158
  keywords: "Total organic keywords the page ranks for",
31031
31159
  top_10: "Keywords in positions 1-10"
31032
31160
  };
31033
- var relevantPagesCommand = defineCommand148({
31161
+ var relevantPagesCommand = defineCommand149({
31034
31162
  meta: {
31035
31163
  name: "relevant-pages",
31036
31164
  description: `Get the top pages of a competitor domain with traffic data.
@@ -31076,7 +31204,7 @@ Examples:
31076
31204
  });
31077
31205
 
31078
31206
  // src/commands/research/web.ts
31079
- import { defineCommand as defineCommand149 } from "citty";
31207
+ import { defineCommand as defineCommand150 } from "citty";
31080
31208
  registerSchema({
31081
31209
  command: "research.web",
31082
31210
  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).",
@@ -31127,7 +31255,7 @@ async function runDeepResearch(question) {
31127
31255
  }
31128
31256
  throw new Error("Deep research timed out");
31129
31257
  }
31130
- var webCommand = defineCommand149({
31258
+ var webCommand = defineCommand150({
31131
31259
  meta: {
31132
31260
  name: "web",
31133
31261
  description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
@@ -31187,7 +31315,7 @@ Examples:
31187
31315
  });
31188
31316
 
31189
31317
  // src/commands/research/index.ts
31190
- var researchCommand = defineCommand150({
31318
+ var researchCommand = defineCommand151({
31191
31319
  meta: {
31192
31320
  name: "research",
31193
31321
  description: `Competitive intelligence and AI-powered research commands.
@@ -31228,10 +31356,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
31228
31356
  });
31229
31357
 
31230
31358
  // src/commands/scheduled-actions/index.ts
31231
- import { defineCommand as defineCommand157 } from "citty";
31359
+ import { defineCommand as defineCommand158 } from "citty";
31232
31360
 
31233
31361
  // src/commands/scheduled-actions/create.ts
31234
- import { defineCommand as defineCommand151 } from "citty";
31362
+ import { defineCommand as defineCommand152 } from "citty";
31235
31363
 
31236
31364
  // src/commands/scheduled-actions/shared.ts
31237
31365
  var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
@@ -31346,7 +31474,7 @@ registerSchema({
31346
31474
  prompt: { type: "string", description: "Additional prompt instructions for the spawned agent", required: false }
31347
31475
  }
31348
31476
  });
31349
- var createCommand2 = defineCommand151({
31477
+ var createCommand2 = defineCommand152({
31350
31478
  meta: {
31351
31479
  name: "create",
31352
31480
  description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
@@ -31395,7 +31523,7 @@ var createCommand2 = defineCommand151({
31395
31523
  });
31396
31524
 
31397
31525
  // src/commands/scheduled-actions/delete.ts
31398
- import { defineCommand as defineCommand152 } from "citty";
31526
+ import { defineCommand as defineCommand153 } from "citty";
31399
31527
  registerSchema({
31400
31528
  command: "scheduled-actions.delete",
31401
31529
  description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
@@ -31403,7 +31531,7 @@ registerSchema({
31403
31531
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
31404
31532
  }
31405
31533
  });
31406
- var deleteCommand2 = defineCommand152({
31534
+ var deleteCommand2 = defineCommand153({
31407
31535
  meta: {
31408
31536
  name: "delete",
31409
31537
  description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
@@ -31432,7 +31560,7 @@ var deleteCommand2 = defineCommand152({
31432
31560
  });
31433
31561
 
31434
31562
  // src/commands/scheduled-actions/get.ts
31435
- import { defineCommand as defineCommand153 } from "citty";
31563
+ import { defineCommand as defineCommand154 } from "citty";
31436
31564
  registerSchema({
31437
31565
  command: "scheduled-actions.get",
31438
31566
  description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
@@ -31440,7 +31568,7 @@ registerSchema({
31440
31568
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
31441
31569
  }
31442
31570
  });
31443
- var getCommand3 = defineCommand153({
31571
+ var getCommand3 = defineCommand154({
31444
31572
  meta: {
31445
31573
  name: "get",
31446
31574
  description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
@@ -31477,13 +31605,13 @@ var getCommand3 = defineCommand153({
31477
31605
  });
31478
31606
 
31479
31607
  // src/commands/scheduled-actions/list.ts
31480
- import { defineCommand as defineCommand154 } from "citty";
31608
+ import { defineCommand as defineCommand155 } from "citty";
31481
31609
  registerSchema({
31482
31610
  command: "scheduled-actions.list",
31483
31611
  description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set.",
31484
31612
  args: {}
31485
31613
  });
31486
- var listCommand14 = defineCommand154({
31614
+ var listCommand14 = defineCommand155({
31487
31615
  meta: {
31488
31616
  name: "list",
31489
31617
  description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set."
@@ -31504,7 +31632,7 @@ var listCommand14 = defineCommand154({
31504
31632
  });
31505
31633
 
31506
31634
  // src/commands/scheduled-actions/trigger.ts
31507
- import { defineCommand as defineCommand155 } from "citty";
31635
+ import { defineCommand as defineCommand156 } from "citty";
31508
31636
  registerSchema({
31509
31637
  command: "scheduled-actions.trigger",
31510
31638
  description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
@@ -31512,7 +31640,7 @@ registerSchema({
31512
31640
  id: { type: "string", description: "Published scheduled action ID", required: true }
31513
31641
  }
31514
31642
  });
31515
- var triggerCommand = defineCommand155({
31643
+ var triggerCommand = defineCommand156({
31516
31644
  meta: {
31517
31645
  name: "trigger",
31518
31646
  description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
@@ -31549,7 +31677,7 @@ var triggerCommand = defineCommand155({
31549
31677
  });
31550
31678
 
31551
31679
  // src/commands/scheduled-actions/update.ts
31552
- import { defineCommand as defineCommand156 } from "citty";
31680
+ import { defineCommand as defineCommand157 } from "citty";
31553
31681
  registerSchema({
31554
31682
  command: "scheduled-actions.update",
31555
31683
  description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
@@ -31574,7 +31702,7 @@ registerSchema({
31574
31702
  prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
31575
31703
  }
31576
31704
  });
31577
- var updateCommand2 = defineCommand156({
31705
+ var updateCommand2 = defineCommand157({
31578
31706
  meta: {
31579
31707
  name: "update",
31580
31708
  description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
@@ -31645,7 +31773,7 @@ var updateCommand2 = defineCommand156({
31645
31773
  });
31646
31774
 
31647
31775
  // src/commands/scheduled-actions/index.ts
31648
- var scheduledActionsCommand = defineCommand157({
31776
+ var scheduledActionsCommand = defineCommand158({
31649
31777
  meta: {
31650
31778
  name: "scheduled-actions",
31651
31779
  description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger.
@@ -31672,14 +31800,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
31672
31800
  });
31673
31801
 
31674
31802
  // src/commands/schema.ts
31675
- import { defineCommand as defineCommand158 } from "citty";
31803
+ import { defineCommand as defineCommand159 } from "citty";
31676
31804
  function narrowToFamily(commandName, available) {
31677
31805
  const segments = commandName.split(".");
31678
31806
  const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
31679
31807
  const siblings = available.filter((name) => name.startsWith(prefix));
31680
31808
  return siblings.length > 0 ? siblings : available;
31681
31809
  }
31682
- var schemaCommand = defineCommand158({
31810
+ var schemaCommand = defineCommand159({
31683
31811
  meta: {
31684
31812
  name: "schema",
31685
31813
  description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
@@ -31723,10 +31851,10 @@ var schemaCommand = defineCommand158({
31723
31851
  });
31724
31852
 
31725
31853
  // src/commands/tag-manager/index.ts
31726
- import { defineCommand as defineCommand162 } from "citty";
31854
+ import { defineCommand as defineCommand163 } from "citty";
31727
31855
 
31728
31856
  // src/commands/tag-manager/draft.ts
31729
- import { defineCommand as defineCommand159 } from "citty";
31857
+ import { defineCommand as defineCommand160 } from "citty";
31730
31858
 
31731
31859
  // src/commands/tag-manager/shared.ts
31732
31860
  import { readFileSync as readFileSync12 } from "fs";
@@ -31770,7 +31898,7 @@ function handleError3(err) {
31770
31898
  ...err.code === "UNAUTHORIZED" ? {
31771
31899
  fix: {
31772
31900
  action: "request_connection",
31773
- explanation: 'Tag Manager is not connected for this company yet, or no container has been picked. Do NOT send the user to Settings \u2014 call the `request_connection` tool with { platform: "google-tag-manager", reason } and they connect and pick the container from inside the chat. `request_tag_input` is NOT the route: that form manages the container snippet on the site, not what runs inside the container, and it cannot pick a container. If `request_connection` is not available to you, say so plainly and point them at dashboard \u2192 Brain \u2192 Integrations \u2192 Tools \u2192 Google Tag Manager, where they also pick the container. Carry on with the rest of the task meanwhile.'
31901
+ explanation: 'Tag Manager is not connected for this company yet, or no container has been picked. Do NOT send the user to Settings \u2014 call the `request_connection` tool with { platform: "google-tag-manager", reason } and they connect and pick their containers (they can pick more than one) from inside the chat. `request_tag_input` is NOT the route: that form manages the container snippet on the site, not what runs inside the container, and it cannot pick a container. If `request_connection` is not available to you, say so plainly and point them at dashboard \u2192 Brain \u2192 Integrations \u2192 Tools \u2192 Google Tag Manager, where they also pick the container. Carry on with the rest of the task meanwhile.'
31774
31902
  }
31775
31903
  } : {},
31776
31904
  retryable: RETRYABLE_CODES.has(err.code)
@@ -31848,13 +31976,13 @@ registerSchema({
31848
31976
  json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list", required: false }
31849
31977
  }
31850
31978
  });
31851
- var draftCommand3 = defineCommand159({
31979
+ var draftCommand3 = defineCommand160({
31852
31980
  meta: {
31853
31981
  name: "draft",
31854
31982
  description: "List, show, amend, remove, or clear staged Tag Manager changes for this chat"
31855
31983
  },
31856
31984
  subCommands: {
31857
- list: defineCommand159({
31985
+ list: defineCommand160({
31858
31986
  meta: {
31859
31987
  name: "list",
31860
31988
  description: "Review everything staged on this chat (--json for the raw envelope)"
@@ -31864,7 +31992,7 @@ var draftCommand3 = defineCommand159({
31864
31992
  await draftList(args.json === true);
31865
31993
  }
31866
31994
  }),
31867
- show: defineCommand159({
31995
+ show: defineCommand160({
31868
31996
  meta: {
31869
31997
  name: "show",
31870
31998
  description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
@@ -31876,7 +32004,7 @@ var draftCommand3 = defineCommand159({
31876
32004
  });
31877
32005
  }
31878
32006
  }),
31879
- amend: defineCommand159({
32007
+ amend: defineCommand160({
31880
32008
  meta: {
31881
32009
  name: "amend",
31882
32010
  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."
@@ -31893,7 +32021,7 @@ var draftCommand3 = defineCommand159({
31893
32021
  });
31894
32022
  }
31895
32023
  }),
31896
- remove: defineCommand159({
32024
+ remove: defineCommand160({
31897
32025
  meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
31898
32026
  args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
31899
32027
  run: async ({ args }) => {
@@ -31902,7 +32030,7 @@ var draftCommand3 = defineCommand159({
31902
32030
  });
31903
32031
  }
31904
32032
  }),
31905
- clear: defineCommand159({
32033
+ clear: defineCommand160({
31906
32034
  meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
31907
32035
  run: async () => {
31908
32036
  await draftAction2("/api/tag-manager/draft/clear", {});
@@ -31912,17 +32040,21 @@ var draftCommand3 = defineCommand159({
31912
32040
  });
31913
32041
 
31914
32042
  // src/commands/tag-manager/read.ts
31915
- import { defineCommand as defineCommand160 } from "citty";
32043
+ import { defineCommand as defineCommand161 } from "citty";
31916
32044
  registerSchema({
31917
32045
  command: "tagManager.containers",
31918
- description: "List the Google Tag Manager containers this company's connection can reach. The connected container is flagged. Start here to confirm which container you are managing.",
32046
+ 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.",
31919
32047
  args: {}
31920
32048
  });
31921
32049
  registerSchema({
31922
32050
  command: "tagManager.read",
31923
- description: "Read what is currently inside a Tag Manager container: tags, triggers, variables, folders and enabled built-in variables. Start here before proposing any change, so you edit what exists instead of duplicating it. Compact by default; pass --full for raw Tag Manager objects.",
32051
+ description: "Read what is currently inside a Tag Manager container: tags, triggers, variables, folders and enabled built-in variables. Start here before proposing any change, so you edit what exists instead of duplicating it. Pass --container when the company connected more than one. Compact by default; pass --full for raw Tag Manager objects.",
31924
32052
  args: {
31925
- container: { type: "string", description: "Numeric container id (defaults to the connected one)", required: false },
32053
+ container: {
32054
+ type: "string",
32055
+ description: "Numeric container id (optional only when one container is connected)",
32056
+ required: false
32057
+ },
31926
32058
  workspace: { type: "string", description: "Workspace id (defaults to the default workspace)", required: false },
31927
32059
  entities: {
31928
32060
  type: "string",
@@ -31932,7 +32064,24 @@ registerSchema({
31932
32064
  full: { type: "boolean", description: "Include the raw Tag Manager object for each entity", required: false }
31933
32065
  }
31934
32066
  });
31935
- var containersCommand = defineCommand160({
32067
+ function containersHints(containers) {
32068
+ const connected = containers.filter((container) => container.connected);
32069
+ if (connected.length === 0) {
32070
+ return [
32071
+ "None of the containers this company connected came back from Tag Manager. The connected Google account may have lost access to them \u2014 ask the user to reconnect or pick a container again."
32072
+ ];
32073
+ }
32074
+ return connectedResourceHints({
32075
+ plural: "Tag Manager containers",
32076
+ singular: "Tag Manager container",
32077
+ flag: "--container",
32078
+ resources: connected.map((container) => ({
32079
+ id: container.containerId,
32080
+ label: `${container.publicId} \xB7 ${container.name}`
32081
+ }))
32082
+ });
32083
+ }
32084
+ var containersCommand = defineCommand161({
31936
32085
  meta: {
31937
32086
  name: "containers",
31938
32087
  description: `List Tag Manager containers reachable by this company's connection.
@@ -31943,13 +32092,13 @@ Start here:
31943
32092
  run: async () => {
31944
32093
  try {
31945
32094
  const data = await apiGet("/api/tag-manager/containers");
31946
- writeJsonEnvelope({ ok: true, data });
32095
+ writeJsonEnvelope({ ok: true, data, hints: containersHints(data.containers) });
31947
32096
  } catch (err) {
31948
32097
  handleError3(err);
31949
32098
  }
31950
32099
  }
31951
32100
  });
31952
- var readCommand = defineCommand160({
32101
+ var readCommand = defineCommand161({
31953
32102
  meta: {
31954
32103
  name: "read",
31955
32104
  description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
@@ -31974,7 +32123,9 @@ Examples:
31974
32123
  entities,
31975
32124
  full: args.full === true
31976
32125
  });
31977
- const hints = [];
32126
+ const hints = [
32127
+ `This is container ${data.container.containerId} ${data.container.publicId} (${data.container.name}). Stage changes for it with --container ${data.container.containerId}.`
32128
+ ];
31978
32129
  if (data.installedContainerMismatch) {
31979
32130
  hints.push(data.installedContainerMismatch);
31980
32131
  }
@@ -31989,7 +32140,8 @@ Examples:
31989
32140
  });
31990
32141
 
31991
32142
  // src/commands/tag-manager/write-commands.ts
31992
- import { defineCommand as defineCommand161 } from "citty";
32143
+ import { defineCommand as defineCommand162 } from "citty";
32144
+ var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
31993
32145
  var ENTITIES = [
31994
32146
  {
31995
32147
  entity: "tag",
@@ -32023,7 +32175,7 @@ for (const { entity, noun, createHint } of ENTITIES) {
32023
32175
  args: {
32024
32176
  json: { type: "string", description: `Inline JSON ${noun} definition`, required: false },
32025
32177
  file: { type: "string", description: `Path to a JSON file with the ${noun} definition`, required: false },
32026
- container: { type: "string", description: "Numeric container id", required: false }
32178
+ container: { type: "string", description: CONTAINER_ARG_DESCRIPTION, required: false }
32027
32179
  }
32028
32180
  });
32029
32181
  registerSchema({
@@ -32031,20 +32183,23 @@ for (const { entity, noun, createHint } of ENTITIES) {
32031
32183
  description: `Stage an update to an existing Tag Manager ${noun}. Pass the ${noun} id or path as the positional argument and the changed fields as JSON. Read the container first so you send the fields you mean to change.`,
32032
32184
  args: {
32033
32185
  json: { type: "string", description: "Inline JSON with the changed fields", required: false },
32034
- file: { type: "string", description: "Path to a JSON file with the changed fields", required: false }
32186
+ file: { type: "string", description: "Path to a JSON file with the changed fields", required: false },
32187
+ container: { type: "string", description: CONTAINER_ARG_DESCRIPTION, required: false }
32035
32188
  }
32036
32189
  });
32037
32190
  registerSchema({
32038
32191
  command: `tagManager.${entity}.delete`,
32039
32192
  description: `Stage the deletion of a Tag Manager ${noun}. Pass its id or path as the positional argument. Deleting is irreversible once the resulting version is published \u2014 confirm with the user first.`,
32040
- args: {}
32193
+ args: {
32194
+ container: { type: "string", description: CONTAINER_ARG_DESCRIPTION, required: false }
32195
+ }
32041
32196
  });
32042
32197
  }
32043
32198
  function entityCommand(entity, noun, example) {
32044
- return defineCommand161({
32199
+ return defineCommand162({
32045
32200
  meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
32046
32201
  subCommands: {
32047
- create: defineCommand161({
32202
+ create: defineCommand162({
32048
32203
  meta: {
32049
32204
  name: "create",
32050
32205
  description: `Stage a new ${noun}
@@ -32056,7 +32211,7 @@ Examples:
32056
32211
  args: {
32057
32212
  json: { type: "string", description: "Inline JSON definition", required: false },
32058
32213
  file: { type: "string", description: "Path to a JSON file", required: false },
32059
- container: { type: "string", description: "Numeric container id", required: false }
32214
+ container: { type: "string", description: CONTAINER_ARG_DESCRIPTION, required: false }
32060
32215
  },
32061
32216
  run: async ({ args }) => {
32062
32217
  await stageOp3({
@@ -32066,7 +32221,7 @@ Examples:
32066
32221
  });
32067
32222
  }
32068
32223
  }),
32069
- update: defineCommand161({
32224
+ update: defineCommand162({
32070
32225
  meta: {
32071
32226
  name: "update",
32072
32227
  description: `Stage an update to an existing ${noun} (pass its id or path)`
@@ -32075,7 +32230,7 @@ Examples:
32075
32230
  id: { type: "positional", description: `${noun} id or path`, required: false },
32076
32231
  json: { type: "string", description: "Inline JSON with changed fields", required: false },
32077
32232
  file: { type: "string", description: "Path to a JSON file", required: false },
32078
- container: { type: "string", description: "Numeric container id", required: false }
32233
+ container: { type: "string", description: CONTAINER_ARG_DESCRIPTION, required: false }
32079
32234
  },
32080
32235
  run: async ({ args }) => {
32081
32236
  await stageOp3({
@@ -32086,11 +32241,11 @@ Examples:
32086
32241
  });
32087
32242
  }
32088
32243
  }),
32089
- delete: defineCommand161({
32244
+ delete: defineCommand162({
32090
32245
  meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
32091
32246
  args: {
32092
32247
  id: { type: "positional", description: `${noun} id or path`, required: false },
32093
- container: { type: "string", description: "Numeric container id", required: false }
32248
+ container: { type: "string", description: CONTAINER_ARG_DESCRIPTION, required: false }
32094
32249
  },
32095
32250
  run: async ({ args }) => {
32096
32251
  await stageOp3({
@@ -32112,7 +32267,8 @@ registerSchema({
32112
32267
  command: "tagManager.builtin",
32113
32268
  description: "Enable or disable Tag Manager built-in variables by type (e.g. clickUrl, pageUrl, formId). Built-in variables must be enabled before a trigger or tag can reference them as {{Click URL}}.",
32114
32269
  args: {
32115
- types: { type: "string", description: "Comma-separated built-in variable types", required: true }
32270
+ types: { type: "string", description: "Comma-separated built-in variable types", required: true },
32271
+ container: { type: "string", description: CONTAINER_ARG_DESCRIPTION, required: false }
32116
32272
  }
32117
32273
  });
32118
32274
  function builtinTypes(args) {
@@ -32126,7 +32282,7 @@ function builtinTypes(args) {
32126
32282
  }
32127
32283
  return raw.split(",").map((entry) => entry.trim());
32128
32284
  }
32129
- var builtinCommand = defineCommand161({
32285
+ var builtinCommand = defineCommand162({
32130
32286
  meta: {
32131
32287
  name: "builtin",
32132
32288
  description: `Enable or disable built-in variables
@@ -32136,11 +32292,11 @@ Examples:
32136
32292
  baker tag-manager builtin disable --types formId`
32137
32293
  },
32138
32294
  subCommands: {
32139
- enable: defineCommand161({
32295
+ enable: defineCommand162({
32140
32296
  meta: { name: "enable", description: "Stage enabling built-in variables" },
32141
32297
  args: {
32142
32298
  types: { type: "string", description: "Comma-separated types", required: false },
32143
- container: { type: "string", description: "Numeric container id", required: false }
32299
+ container: { type: "string", description: CONTAINER_ARG_DESCRIPTION, required: false }
32144
32300
  },
32145
32301
  run: async ({ args }) => {
32146
32302
  await stageOp3({
@@ -32150,11 +32306,11 @@ Examples:
32150
32306
  });
32151
32307
  }
32152
32308
  }),
32153
- disable: defineCommand161({
32309
+ disable: defineCommand162({
32154
32310
  meta: { name: "disable", description: "Stage disabling built-in variables" },
32155
32311
  args: {
32156
32312
  types: { type: "string", description: "Comma-separated types", required: false },
32157
- container: { type: "string", description: "Numeric container id", required: false }
32313
+ container: { type: "string", description: CONTAINER_ARG_DESCRIPTION, required: false }
32158
32314
  },
32159
32315
  run: async ({ args }) => {
32160
32316
  await stageOp3({
@@ -32168,7 +32324,7 @@ Examples:
32168
32324
  });
32169
32325
 
32170
32326
  // src/commands/tag-manager/index.ts
32171
- var tagManagerCommand = defineCommand162({
32327
+ var tagManagerCommand = defineCommand163({
32172
32328
  meta: {
32173
32329
  name: "tag-manager",
32174
32330
  description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
@@ -32202,7 +32358,7 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
32202
32358
  });
32203
32359
 
32204
32360
  // src/commands/tags/index.ts
32205
- import { defineCommand as defineCommand163 } from "citty";
32361
+ import { defineCommand as defineCommand164 } from "citty";
32206
32362
 
32207
32363
  // src/commands/tags/shared.ts
32208
32364
  function failApi3(err) {
@@ -32271,7 +32427,7 @@ async function listTags(json) {
32271
32427
  var listArgs9 = {
32272
32428
  json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
32273
32429
  };
32274
- var listCommand15 = defineCommand163({
32430
+ var listCommand15 = defineCommand164({
32275
32431
  meta: {
32276
32432
  name: "list",
32277
32433
  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"
@@ -32290,7 +32446,7 @@ async function listDraft3() {
32290
32446
  failApi3(err);
32291
32447
  }
32292
32448
  }
32293
- var draftCommand4 = defineCommand163({
32449
+ var draftCommand4 = defineCommand164({
32294
32450
  meta: {
32295
32451
  name: "draft",
32296
32452
  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)."
@@ -32299,7 +32455,7 @@ var draftCommand4 = defineCommand163({
32299
32455
  await listDraft3();
32300
32456
  }
32301
32457
  });
32302
- var tagsCommand3 = defineCommand163({
32458
+ var tagsCommand3 = defineCommand164({
32303
32459
  meta: {
32304
32460
  name: "tags",
32305
32461
  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.
@@ -32328,10 +32484,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
32328
32484
  });
32329
32485
 
32330
32486
  // src/commands/testimonials/index.ts
32331
- import { defineCommand as defineCommand167 } from "citty";
32487
+ import { defineCommand as defineCommand168 } from "citty";
32332
32488
 
32333
32489
  // src/commands/testimonials/get.ts
32334
- import { defineCommand as defineCommand164 } from "citty";
32490
+ import { defineCommand as defineCommand165 } from "citty";
32335
32491
  registerSchema({
32336
32492
  command: "testimonials.get",
32337
32493
  description: "Get a single testimonial by ID",
@@ -32339,7 +32495,7 @@ registerSchema({
32339
32495
  id: { type: "string", description: "Testimonial ID", required: true }
32340
32496
  }
32341
32497
  });
32342
- var getCommand4 = defineCommand164({
32498
+ var getCommand4 = defineCommand165({
32343
32499
  meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
32344
32500
  args: {
32345
32501
  id: { type: "positional", description: "Testimonial ID", required: false },
@@ -32376,7 +32532,7 @@ var getCommand4 = defineCommand164({
32376
32532
  });
32377
32533
 
32378
32534
  // src/commands/testimonials/list.ts
32379
- import { defineCommand as defineCommand165 } from "citty";
32535
+ import { defineCommand as defineCommand166 } from "citty";
32380
32536
  registerSchema({
32381
32537
  command: "testimonials.list",
32382
32538
  description: "List testimonials with optional filters.",
@@ -32406,7 +32562,7 @@ registerSchema({
32406
32562
  limit: { type: "number", description: "Max results (default 50)", required: false, default: 50 }
32407
32563
  }
32408
32564
  });
32409
- var listCommand16 = defineCommand165({
32565
+ var listCommand16 = defineCommand166({
32410
32566
  meta: {
32411
32567
  name: "list",
32412
32568
  description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
@@ -32455,7 +32611,7 @@ var listCommand16 = defineCommand165({
32455
32611
  });
32456
32612
 
32457
32613
  // src/commands/testimonials/search.ts
32458
- import { defineCommand as defineCommand166 } from "citty";
32614
+ import { defineCommand as defineCommand167 } from "citty";
32459
32615
  function languageBiasHint(results, requestedLanguage) {
32460
32616
  if (requestedLanguage) {
32461
32617
  return null;
@@ -32533,7 +32689,7 @@ function buildSearchRequest(query, args) {
32533
32689
  }
32534
32690
  return body;
32535
32691
  }
32536
- var searchCommand2 = defineCommand166({
32692
+ var searchCommand2 = defineCommand167({
32537
32693
  meta: {
32538
32694
  name: "search",
32539
32695
  description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
@@ -32589,7 +32745,7 @@ var searchCommand2 = defineCommand166({
32589
32745
  var tagsCommand4 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
32590
32746
 
32591
32747
  // src/commands/testimonials/index.ts
32592
- var testimonialsCommand = defineCommand167({
32748
+ var testimonialsCommand = defineCommand168({
32593
32749
  meta: {
32594
32750
  name: "testimonials",
32595
32751
  description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
@@ -32611,10 +32767,10 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
32611
32767
  });
32612
32768
 
32613
32769
  // src/commands/videos/index.ts
32614
- import { defineCommand as defineCommand172 } from "citty";
32770
+ import { defineCommand as defineCommand173 } from "citty";
32615
32771
 
32616
32772
  // src/commands/videos/delete.ts
32617
- import { defineCommand as defineCommand168 } from "citty";
32773
+ import { defineCommand as defineCommand169 } from "citty";
32618
32774
  registerSchema({
32619
32775
  command: "videos.delete",
32620
32776
  description: "Delete a video by ID",
@@ -32628,7 +32784,7 @@ registerSchema({
32628
32784
  }
32629
32785
  }
32630
32786
  });
32631
- var deleteCommand3 = defineCommand168({
32787
+ var deleteCommand3 = defineCommand169({
32632
32788
  meta: {
32633
32789
  name: "delete",
32634
32790
  description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
@@ -32669,7 +32825,7 @@ var deleteCommand3 = defineCommand168({
32669
32825
  });
32670
32826
 
32671
32827
  // src/commands/videos/get.ts
32672
- import { defineCommand as defineCommand169 } from "citty";
32828
+ import { defineCommand as defineCommand170 } from "citty";
32673
32829
  registerSchema({
32674
32830
  command: "videos.get",
32675
32831
  description: "Get a single video by ID",
@@ -32677,7 +32833,7 @@ registerSchema({
32677
32833
  id: { type: "string", description: "Video ID", required: true }
32678
32834
  }
32679
32835
  });
32680
- var getCommand5 = defineCommand169({
32836
+ var getCommand5 = defineCommand170({
32681
32837
  meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
32682
32838
  args: {
32683
32839
  id: { type: "positional", description: "Video ID", required: false },
@@ -32714,7 +32870,7 @@ var getCommand5 = defineCommand169({
32714
32870
  });
32715
32871
 
32716
32872
  // src/commands/videos/search.ts
32717
- import { defineCommand as defineCommand170 } from "citty";
32873
+ import { defineCommand as defineCommand171 } from "citty";
32718
32874
  registerSchema({
32719
32875
  command: "videos.search",
32720
32876
  description: "Search videos by text query. Only returns ready videos.",
@@ -32724,7 +32880,7 @@ registerSchema({
32724
32880
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
32725
32881
  }
32726
32882
  });
32727
- var searchCommand3 = defineCommand170({
32883
+ var searchCommand3 = defineCommand171({
32728
32884
  meta: {
32729
32885
  name: "search",
32730
32886
  description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
@@ -32776,7 +32932,7 @@ var tagsCommand5 = makeTagsCommand("videos", "video", "/api/videos/tags");
32776
32932
  // src/commands/videos/upload.ts
32777
32933
  import { readFile as readFile23, stat as stat7 } from "fs/promises";
32778
32934
  import { extname as extname3 } from "path";
32779
- import { defineCommand as defineCommand171 } from "citty";
32935
+ import { defineCommand as defineCommand172 } from "citty";
32780
32936
  var MIME_MAP = {
32781
32937
  ".mp4": "video/mp4",
32782
32938
  ".mov": "video/quicktime",
@@ -32810,7 +32966,7 @@ function detectContentType(filePath) {
32810
32966
  }
32811
32967
  return mime;
32812
32968
  }
32813
- var uploadCommand2 = defineCommand171({
32969
+ var uploadCommand2 = defineCommand172({
32814
32970
  meta: {
32815
32971
  name: "upload",
32816
32972
  description: "Upload a video file to Baker via Mux direct upload. Auto-detects content type. Example: baker videos upload ./demo.mp4"
@@ -32864,7 +33020,7 @@ var uploadCommand2 = defineCommand171({
32864
33020
  });
32865
33021
 
32866
33022
  // src/commands/videos/index.ts
32867
- var videosCommand = defineCommand172({
33023
+ var videosCommand = defineCommand173({
32868
33024
  meta: {
32869
33025
  name: "videos",
32870
33026
  description: `Find and manage videos in Baker. Subcommands: search, get, upload, delete, tags.
@@ -32888,10 +33044,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
32888
33044
  });
32889
33045
 
32890
33046
  // src/commands/winning-ads/index.ts
32891
- import { defineCommand as defineCommand185 } from "citty";
33047
+ import { defineCommand as defineCommand186 } from "citty";
32892
33048
 
32893
33049
  // src/commands/winning-ads/advertisers.ts
32894
- import { defineCommand as defineCommand173 } from "citty";
33050
+ import { defineCommand as defineCommand174 } from "citty";
32895
33051
 
32896
33052
  // src/commands/winning-ads/shared.ts
32897
33053
  function splitList(value) {
@@ -32944,7 +33100,7 @@ function advertiserNormalizer(record, full) {
32944
33100
  last_synced_at: record.last_synced_at ?? null
32945
33101
  };
32946
33102
  }
32947
- var advertisersCommand2 = defineCommand173({
33103
+ var advertisersCommand2 = defineCommand174({
32948
33104
  meta: {
32949
33105
  name: "advertisers",
32950
33106
  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'
@@ -33002,7 +33158,7 @@ var advertisersCommand2 = defineCommand173({
33002
33158
  });
33003
33159
 
33004
33160
  // src/commands/winning-ads/brief.ts
33005
- import { defineCommand as defineCommand174 } from "citty";
33161
+ import { defineCommand as defineCommand175 } from "citty";
33006
33162
  registerSchema({
33007
33163
  command: "winning-ads.brief",
33008
33164
  description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
@@ -33048,7 +33204,7 @@ function parseDna(raw) {
33048
33204
  }
33049
33205
  return parsed;
33050
33206
  }
33051
- var briefCommand = defineCommand174({
33207
+ var briefCommand = defineCommand175({
33052
33208
  meta: {
33053
33209
  name: "brief",
33054
33210
  description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
@@ -33084,7 +33240,7 @@ var briefCommand = defineCommand174({
33084
33240
  });
33085
33241
 
33086
33242
  // src/commands/winning-ads/content.ts
33087
- import { defineCommand as defineCommand175 } from "citty";
33243
+ import { defineCommand as defineCommand176 } from "citty";
33088
33244
  registerSchema({
33089
33245
  command: "winning-ads.content",
33090
33246
  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.",
@@ -33097,7 +33253,7 @@ registerSchema({
33097
33253
  }
33098
33254
  }
33099
33255
  });
33100
- var contentCommand = defineCommand175({
33256
+ var contentCommand = defineCommand176({
33101
33257
  meta: {
33102
33258
  name: "content",
33103
33259
  description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
@@ -33146,7 +33302,7 @@ var contentCommand = defineCommand175({
33146
33302
  });
33147
33303
 
33148
33304
  // src/commands/winning-ads/feed.ts
33149
- import { defineCommand as defineCommand176 } from "citty";
33305
+ import { defineCommand as defineCommand177 } from "citty";
33150
33306
  function buildFeedParams(input) {
33151
33307
  const params = {};
33152
33308
  const advertiser = splitList(input.advertiser);
@@ -33198,7 +33354,7 @@ registerSchema({
33198
33354
  format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
33199
33355
  }
33200
33356
  });
33201
- var feedCommand = defineCommand176({
33357
+ var feedCommand = defineCommand177({
33202
33358
  meta: {
33203
33359
  name: "feed",
33204
33360
  description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
@@ -33283,7 +33439,7 @@ var feedCommand = defineCommand176({
33283
33439
  });
33284
33440
 
33285
33441
  // src/commands/winning-ads/follow.ts
33286
- import { defineCommand as defineCommand177 } from "citty";
33442
+ import { defineCommand as defineCommand178 } from "citty";
33287
33443
  var PLATFORMS = ["meta", "linkedin"];
33288
33444
  registerSchema({
33289
33445
  command: "winning-ads.follow",
@@ -33298,7 +33454,7 @@ registerSchema({
33298
33454
  label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
33299
33455
  }
33300
33456
  });
33301
- var followCommand = defineCommand177({
33457
+ var followCommand = defineCommand178({
33302
33458
  meta: {
33303
33459
  name: "follow",
33304
33460
  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'
@@ -33345,7 +33501,7 @@ var followCommand = defineCommand177({
33345
33501
  });
33346
33502
 
33347
33503
  // src/commands/winning-ads/follow-competitors.ts
33348
- import { defineCommand as defineCommand178 } from "citty";
33504
+ import { defineCommand as defineCommand179 } from "citty";
33349
33505
  var PLATFORMS2 = ["meta", "linkedin"];
33350
33506
  var BATCH_TIMEOUT_MS = 3e5;
33351
33507
  function buildFollowBatchBody(input) {
@@ -33378,7 +33534,7 @@ registerSchema({
33378
33534
  }
33379
33535
  }
33380
33536
  });
33381
- var followCompetitorsCommand = defineCommand178({
33537
+ var followCompetitorsCommand = defineCommand179({
33382
33538
  meta: {
33383
33539
  name: "follow-competitors",
33384
33540
  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"'
@@ -33453,7 +33609,7 @@ var followCompetitorsCommand = defineCommand178({
33453
33609
  });
33454
33610
 
33455
33611
  // src/commands/winning-ads/following.ts
33456
- import { defineCommand as defineCommand179 } from "citty";
33612
+ import { defineCommand as defineCommand180 } from "citty";
33457
33613
  registerSchema({
33458
33614
  command: "winning-ads.following",
33459
33615
  description: "List the brands you follow in your ad-dna library, with each one's status (ready vs still adding) and cached ad counts.",
@@ -33486,7 +33642,7 @@ function followingNormalizer(record, full) {
33486
33642
  platforms: Array.isArray(record.platforms) ? record.platforms : []
33487
33643
  };
33488
33644
  }
33489
- var followingCommand = defineCommand179({
33645
+ var followingCommand = defineCommand180({
33490
33646
  meta: {
33491
33647
  name: "following",
33492
33648
  description: "List brands you follow, with status (ready / adding\u2026) and cached counts. Example: baker winning-ads following --output md"
@@ -33521,7 +33677,7 @@ var followingCommand = defineCommand179({
33521
33677
  });
33522
33678
 
33523
33679
  // src/commands/winning-ads/patterns.ts
33524
- import { defineCommand as defineCommand180 } from "citty";
33680
+ import { defineCommand as defineCommand181 } from "citty";
33525
33681
  registerSchema({
33526
33682
  command: "winning-ads.patterns",
33527
33683
  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.",
@@ -33560,7 +33716,7 @@ function discriminatorRow(record) {
33560
33716
  top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
33561
33717
  };
33562
33718
  }
33563
- var patternsCommand = defineCommand180({
33719
+ var patternsCommand = defineCommand181({
33564
33720
  meta: {
33565
33721
  name: "patterns",
33566
33722
  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"
@@ -33616,7 +33772,7 @@ var patternsCommand = defineCommand180({
33616
33772
  });
33617
33773
 
33618
33774
  // src/commands/winning-ads/search.ts
33619
- import { defineCommand as defineCommand181 } from "citty";
33775
+ import { defineCommand as defineCommand182 } from "citty";
33620
33776
  registerSchema({
33621
33777
  command: "winning-ads.search",
33622
33778
  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.",
@@ -33724,7 +33880,7 @@ function buildSearchBody(args) {
33724
33880
  }
33725
33881
  return body;
33726
33882
  }
33727
- var searchCommand4 = defineCommand181({
33883
+ var searchCommand4 = defineCommand182({
33728
33884
  meta: {
33729
33885
  name: "search",
33730
33886
  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"
@@ -33839,7 +33995,7 @@ var searchCommand4 = defineCommand181({
33839
33995
  });
33840
33996
 
33841
33997
  // src/commands/winning-ads/seeds.ts
33842
- import { defineCommand as defineCommand182 } from "citty";
33998
+ import { defineCommand as defineCommand183 } from "citty";
33843
33999
  function leanRow(r) {
33844
34000
  return {
33845
34001
  key: r.key,
@@ -33867,7 +34023,7 @@ function makeSeedCommand(opts) {
33867
34023
  limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
33868
34024
  }
33869
34025
  });
33870
- return defineCommand182({
34026
+ return defineCommand183({
33871
34027
  meta: { name: opts.name, description: opts.description },
33872
34028
  args: {
33873
34029
  platform: { type: "string", description: "Single platform to segment on", required: false },
@@ -33916,7 +34072,7 @@ var formatsCommand = makeSeedCommand({
33916
34072
  });
33917
34073
 
33918
34074
  // src/commands/winning-ads/unfollow.ts
33919
- import { defineCommand as defineCommand183 } from "citty";
34075
+ import { defineCommand as defineCommand184 } from "citty";
33920
34076
  registerSchema({
33921
34077
  command: "winning-ads.unfollow",
33922
34078
  description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
@@ -33924,7 +34080,7 @@ registerSchema({
33924
34080
  advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
33925
34081
  }
33926
34082
  });
33927
- var unfollowCommand = defineCommand183({
34083
+ var unfollowCommand = defineCommand184({
33928
34084
  meta: {
33929
34085
  name: "unfollow",
33930
34086
  description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
@@ -33945,7 +34101,7 @@ var unfollowCommand = defineCommand183({
33945
34101
  });
33946
34102
 
33947
34103
  // src/commands/winning-ads/winners.ts
33948
- import { defineCommand as defineCommand184 } from "citty";
34104
+ import { defineCommand as defineCommand185 } from "citty";
33949
34105
  registerSchema({
33950
34106
  command: "winning-ads.winners",
33951
34107
  description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
@@ -33955,7 +34111,7 @@ registerSchema({
33955
34111
  platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
33956
34112
  }
33957
34113
  });
33958
- var winnersCommand = defineCommand184({
34114
+ var winnersCommand = defineCommand185({
33959
34115
  meta: {
33960
34116
  name: "winners",
33961
34117
  description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
@@ -34005,7 +34161,7 @@ var winnersCommand = defineCommand184({
34005
34161
  });
34006
34162
 
34007
34163
  // src/commands/winning-ads/index.ts
34008
- var winningAdsCommand = defineCommand185({
34164
+ var winningAdsCommand = defineCommand186({
34009
34165
  meta: {
34010
34166
  name: "winning-ads",
34011
34167
  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.
@@ -34077,7 +34233,7 @@ function getCliVersion() {
34077
34233
  }
34078
34234
 
34079
34235
  // src/cli.ts
34080
- var main = defineCommand186({
34236
+ var main = defineCommand187({
34081
34237
  meta: {
34082
34238
  name: "baker",
34083
34239
  version: getCliVersion(),