@koda-sl/baker-cli 0.193.0 → 0.194.0-dev.5dba041c4

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
@@ -47,7 +47,7 @@ import {
47
47
  toModelSafeImage,
48
48
  ulid,
49
49
  validateCanvasDeep
50
- } from "./chunk-O5GXFPWC.js";
50
+ } from "./chunk-5YX3QOT3.js";
51
51
  import {
52
52
  csvOrJson,
53
53
  daysAgoIso,
@@ -90,7 +90,7 @@ import {
90
90
  } from "./chunk-YL3HDEIJ.js";
91
91
 
92
92
  // src/cli.ts
93
- import { defineCommand as defineCommand210, runMain } from "citty";
93
+ import { defineCommand as defineCommand213, runMain } from "citty";
94
94
 
95
95
  // src/commands/actions/index.ts
96
96
  import { defineCommand as defineCommand18 } from "citty";
@@ -15733,6 +15733,74 @@ var IMAGE_HASH_REGEX = /^[A-Fa-f0-9]{16,}$/;
15733
15733
 
15734
15734
  // ../api/src/ads-meta/ops.ts
15735
15735
  import { z as z20 } from "zod";
15736
+
15737
+ // ../api/src/ads-meta/placements.ts
15738
+ var FACEBOOK_POSITIONS_REQUIRING_FEED = ["marketplace", "search", "profile_feed", "notification"];
15739
+ var PLACEMENT_TARGETING_DOC = "https://developers.facebook.com/docs/marketing-api/audiences/reference/placement-targeting/";
15740
+ var CONSTRAINED_PLACEMENTS = [
15741
+ {
15742
+ position: "facebook_reels_overlay",
15743
+ platform: "facebook",
15744
+ kind: "constraint",
15745
+ note: "Ads on Facebook Reels take two shapes and a stock 9:16 video fits neither: overlay ads are 'a single, static image ad' (JPG/PNG, 1:1, 0% ratio tolerance, headline capped at 10 characters), and post-loop ads are 1:1 video of 4-15 seconds. Expect a long-headline 9:16 creative to look wrong here.",
15746
+ contested: false,
15747
+ source: "https://www.facebook.com/business/ads-guide/update/image/facebook-facebook-reels-overlay"
15748
+ },
15749
+ {
15750
+ position: "explore_home",
15751
+ platform: "instagram",
15752
+ kind: "constraint",
15753
+ note: "Marketing API placement asset customization states 'The explore_home placement only supports the SINGLE_IMAGE format', but Meta's own Ads Guide lists Instagram Explore home under video specs. Check the account's play rate for this position before treating it as image-only.",
15754
+ contested: true,
15755
+ source: "https://developers.facebook.com/docs/marketing-api/dynamic-creative/placement-asset-customization/"
15756
+ },
15757
+ {
15758
+ position: "right_hand_column",
15759
+ platform: "facebook",
15760
+ kind: "correction",
15761
+ note: "Facebook right column publishes full video specs (MP4/MOV/GIF, 1:1 at 1440x1440 or mobile-only 4:5 at 1440x1800, 1 second to 241 minutes) \u2014 it is NOT image-only. Its real constraint is that it cannot be the only placement for a video, collection, or canvas ad.",
15762
+ contested: false,
15763
+ source: "https://www.facebook.com/business/ads-guide/update/video/facebook-right-hand-column"
15764
+ }
15765
+ ];
15766
+ var FACEBOOK_PREVIEW_FORMATS = {
15767
+ feed: "MOBILE_FEED_STANDARD",
15768
+ right_hand_column: "RIGHT_COLUMN_STANDARD",
15769
+ marketplace: "MARKETPLACE_MOBILE",
15770
+ story: "FACEBOOK_STORY_MOBILE",
15771
+ facebook_reels: "FACEBOOK_REELS_MOBILE",
15772
+ facebook_reels_overlay: "FACEBOOK_REELS_BANNER",
15773
+ instream_video: "INSTREAM_VIDEO_MOBILE",
15774
+ video_feeds: "INSTREAM_VIDEO_MOBILE"
15775
+ };
15776
+ var INSTAGRAM_PREVIEW_FORMATS = {
15777
+ stream: "INSTAGRAM_STANDARD",
15778
+ story: "INSTAGRAM_STORY",
15779
+ reels: "INSTAGRAM_REELS",
15780
+ explore: "INSTAGRAM_EXPLORE_CONTEXTUAL",
15781
+ explore_home: "INSTAGRAM_EXPLORE_GRID_HOME",
15782
+ ig_search: "INSTAGRAM_SEARCH_CHAIN",
15783
+ profile_feed: "INSTAGRAM_PROFILE_FEED"
15784
+ };
15785
+ var PLATFORM_SCOPED_POSITIONS = /* @__PURE__ */ new Set(["story", "profile_feed"]);
15786
+ function previewFormatForPosition(position, platform) {
15787
+ if (platform === "facebook") return FACEBOOK_PREVIEW_FORMATS[position];
15788
+ if (platform === "instagram") return INSTAGRAM_PREVIEW_FORMATS[position];
15789
+ if (PLATFORM_SCOPED_POSITIONS.has(position)) return void 0;
15790
+ return FACEBOOK_PREVIEW_FORMATS[position] ?? INSTAGRAM_PREVIEW_FORMATS[position];
15791
+ }
15792
+ function placementFormatNote(position) {
15793
+ return CONSTRAINED_PLACEMENTS.find((p) => p.position === position);
15794
+ }
15795
+ function positionsMissingRequiredFeed(targeting) {
15796
+ const positions = targeting?.facebook_positions;
15797
+ if (!positions?.length || positions.includes("feed")) {
15798
+ return [];
15799
+ }
15800
+ return FACEBOOK_POSITIONS_REQUIRING_FEED.filter((required) => positions.includes(required));
15801
+ }
15802
+
15803
+ // ../api/src/ads-meta/ops.ts
15736
15804
  var tempRefSchema3 = z20.string().regex(TEMP_REF_REGEX3, "expected a meta_temp_* reference");
15737
15805
  var parentRefSchema2 = z20.union([z20.string().regex(NUMERIC_ID_REGEX3, "expected a numeric id"), tempRefSchema3]);
15738
15806
  var moneySchema2 = z20.object({
@@ -16003,10 +16071,21 @@ function validateAdvantageAudience(p, ctx) {
16003
16071
  });
16004
16072
  }
16005
16073
  }
16074
+ function validateAdSetPlacements(p, ctx) {
16075
+ const missingFeed = positionsMissingRequiredFeed(p.targeting);
16076
+ if (missingFeed.length > 0) {
16077
+ ctx.addIssue({
16078
+ code: "custom",
16079
+ path: ["targeting", "facebook_positions"],
16080
+ message: `Meta requires "feed" alongside ${missingFeed.join(", ")} \u2014 add "feed" to facebook_positions or drop those positions (${PLACEMENT_TARGETING_DOC})`
16081
+ });
16082
+ }
16083
+ }
16006
16084
  var adSetCreateSchema = z20.object(adSetFields).superRefine((p, ctx) => {
16007
16085
  validateAdSetBudgetAndBid(p, ctx);
16008
16086
  validateAdSetPromotedObject(p, ctx);
16009
16087
  validateAdvantageAudience(p, ctx);
16088
+ validateAdSetPlacements(p, ctx);
16010
16089
  if (!targetingHasGeoOrAudience(p.targeting)) {
16011
16090
  ctx.addIssue({
16012
16091
  code: "custom",
@@ -16040,6 +16119,7 @@ var adSetUpdateSchema = z20.object({
16040
16119
  validateAdSetPromotedObject(p, ctx);
16041
16120
  }
16042
16121
  validateAdvantageAudience(p, ctx);
16122
+ validateAdSetPlacements(p, ctx);
16043
16123
  });
16044
16124
  var messageSchema = z20.string().min(1).max(META_LIMITS.creative.messageHardMax);
16045
16125
  var headlineSchema2 = z20.string().min(1).max(META_LIMITS.creative.headlineMax);
@@ -17444,6 +17524,74 @@ var metaDraftCommand = defineCommand62({
17444
17524
  // src/commands/ads/meta/insights.ts
17445
17525
  import { defineCommand as defineCommand63 } from "citty";
17446
17526
 
17527
+ // src/commands/ads/meta/placement-delivery.ts
17528
+ var MIN_IMPRESSIONS = 100;
17529
+ var SILENT_PLAY_RATE = 0.02;
17530
+ var PLAYING_REFERENCE_RATE = 0.5;
17531
+ function toNumber(value) {
17532
+ const n = Number(value);
17533
+ return Number.isFinite(n) ? n : 0;
17534
+ }
17535
+ function sumActionValues(value) {
17536
+ if (!Array.isArray(value)) return 0;
17537
+ return value.reduce((total, entry) => {
17538
+ const item = entry;
17539
+ return total + toNumber(item?.value);
17540
+ }, 0);
17541
+ }
17542
+ function aggregate(rows) {
17543
+ const byPlacement = /* @__PURE__ */ new Map();
17544
+ let totalImpressions = 0;
17545
+ for (const row of rows) {
17546
+ const position = row.platform_position;
17547
+ if (typeof position !== "string" || position.length === 0) continue;
17548
+ const platform = typeof row.publisher_platform === "string" ? row.publisher_platform : "";
17549
+ const impressions = toNumber(row.impressions);
17550
+ totalImpressions += impressions;
17551
+ const key = `${platform}/${position}`;
17552
+ const current = byPlacement.get(key) ?? { platform, position, impressions: 0, plays: 0, playRate: 0, share: 0 };
17553
+ current.impressions += impressions;
17554
+ current.plays += sumActionValues(row.video_play_actions);
17555
+ byPlacement.set(key, current);
17556
+ }
17557
+ return [...byPlacement.values()].map((placement) => ({
17558
+ ...placement,
17559
+ playRate: placement.impressions > 0 ? placement.plays / placement.impressions : 0,
17560
+ share: totalImpressions > 0 ? placement.impressions / totalImpressions : 0
17561
+ }));
17562
+ }
17563
+ function previewCommand(placement) {
17564
+ const format = previewFormatForPosition(placement.position, placement.platform);
17565
+ return format ? `\`baker ads meta preview --creative-id <id> --placement ${placement.position} --platform ${placement.platform}\`` : `no preview format is known for ${placement.position}, so Meta's renderer cannot confirm it \u2014 say the placement is unverified rather than filling the gap`;
17566
+ }
17567
+ function isSingleAdQuery(rows) {
17568
+ const adIds = /* @__PURE__ */ new Set();
17569
+ for (const row of rows) {
17570
+ if (typeof row.ad_id !== "string" || row.ad_id.length === 0) return false;
17571
+ adIds.add(row.ad_id);
17572
+ }
17573
+ return adIds.size === 1;
17574
+ }
17575
+ function placementDeliveryHints(rows) {
17576
+ const carriesVideoMetrics = rows.some((row) => Array.isArray(row.video_play_actions));
17577
+ if (!carriesVideoMetrics || !isSingleAdQuery(rows)) return [];
17578
+ const placements = aggregate(rows);
17579
+ const plays = placements.some((p) => p.impressions >= MIN_IMPRESSIONS && p.playRate >= PLAYING_REFERENCE_RATE);
17580
+ if (!plays) return [];
17581
+ const silent = placements.filter((p) => p.impressions >= MIN_IMPRESSIONS && p.playRate < SILENT_PLAY_RATE).sort((a, b) => b.impressions - a.impressions);
17582
+ if (silent.length === 0) return [];
17583
+ const hints = silent.map((placement) => {
17584
+ const note = placementFormatNote(placement.position);
17585
+ const documented = note ? ` Meta documents this placement: ${note.note}` : "";
17586
+ return `${placement.platform}/${placement.position} delivered ${placement.impressions.toLocaleString("en-US")} impressions (${(placement.share * 100).toFixed(1)}% of the total) and ${placement.plays.toLocaleString("en-US")} video plays \u2014 it may not be rendering the video. This is account evidence, not a rule: confirm what Meta renders there with ${previewCommand(placement)} before you say anything about it.${documented}`;
17587
+ });
17588
+ const combinedShare = silent.reduce((total, placement) => total + placement.share, 0) * 100;
17589
+ hints.push(
17590
+ `Those placements are ${combinedShare.toFixed(1)}% of delivery in this query. State that share before proposing to remove them \u2014 and note that removing placements from a live ad set is a targeting change, which Meta counts as a significant edit that re-enters the learning phase.`
17591
+ );
17592
+ return hints;
17593
+ }
17594
+
17447
17595
  // src/commands/ads/meta/presets.ts
17448
17596
  var INSIGHTS_INTENTS = {
17449
17597
  baseline: {
@@ -17740,6 +17888,11 @@ Async is automatic for heavy queries; pass --async to force it, or --no-async to
17740
17888
  writeAdsOutput(sorted, fmt, body.fields);
17741
17889
  return;
17742
17890
  }
17891
+ const hints = placementDeliveryHints(sorted);
17892
+ if (hints.length > 0) {
17893
+ writeJsonEnvelope({ ok: true, data: sorted, hints });
17894
+ return;
17895
+ }
17743
17896
  writeAdsJson({ ok: true, data: sorted });
17744
17897
  } catch (err) {
17745
17898
  handleMetaError(err);
@@ -17909,6 +18062,7 @@ var VALID_AD_FORMATS = [
17909
18062
  "INSTAGRAM_STANDARD",
17910
18063
  "INSTAGRAM_EXPLORE_CONTEXTUAL",
17911
18064
  "INSTAGRAM_EXPLORE_GRID_HOME",
18065
+ "INSTAGRAM_SEARCH_CHAIN",
17912
18066
  "INSTAGRAM_SHOP",
17913
18067
  "INSTAGRAM_PROFILE_FEED",
17914
18068
  "INSTREAM_VIDEO_DESKTOP",
@@ -17924,14 +18078,47 @@ var VALID_AD_FORMATS = [
17924
18078
  "MARKETPLACE_MOBILE",
17925
18079
  "BIZ_DISCO_FEED_MOBILE"
17926
18080
  ];
17927
- var previewCommand = defineCommand67({
18081
+ function failPreviewValidation(message) {
18082
+ writeAdsJson({ ok: false, error: { code: "VALIDATION_ERROR", message } });
18083
+ process.exit(1);
18084
+ }
18085
+ function resolvePlacement(position, platform) {
18086
+ const platformArg = typeof platform === "string" ? platform.toLowerCase() : void 0;
18087
+ if (platformArg && platformArg !== "facebook" && platformArg !== "instagram") {
18088
+ failPreviewValidation("--platform must be facebook or instagram");
18089
+ }
18090
+ const format = previewFormatForPosition(position, platformArg);
18091
+ if (format) {
18092
+ return format;
18093
+ }
18094
+ if (PLATFORM_SCOPED_POSITIONS.has(position) && !platformArg) {
18095
+ failPreviewValidation(
18096
+ `--placement ${position} names a different surface on Facebook and on Instagram \u2014 add --platform facebook or --platform instagram`
18097
+ );
18098
+ }
18099
+ failPreviewValidation(
18100
+ `No Meta preview format is published for placement "${position}". Meta does not document one for every placement (Facebook notifications and profile feed, Instagram search among them), so this placement cannot be previewed \u2014 report it as unverified rather than inferring what it renders. Previewable placements: ${listPlacements()}`
18101
+ );
18102
+ }
18103
+ function listPlacements() {
18104
+ const facebook = Object.keys(FACEBOOK_PREVIEW_FORMATS).join(", ");
18105
+ const instagram = Object.keys(INSTAGRAM_PREVIEW_FORMATS).join(", ");
18106
+ return `facebook \u2014 ${facebook}; instagram \u2014 ${instagram}`;
18107
+ }
18108
+ var previewCommand2 = defineCommand67({
17928
18109
  meta: {
17929
18110
  name: "preview",
17930
18111
  description: `Generate a Meta-hosted preview iframe for a creative or ad. Returns iframe HTML which you
17931
18112
  can embed or save to a file. The iframe URL contains a short-lived access token \u2014 treat as secret.
17932
18113
 
18114
+ Start here when you need to know what a creative looks like in one specific placement \u2014 this is
18115
+ Meta's own renderer, so it settles "does my video show as a still image there?" without guessing.
18116
+ Pass the placement straight from an insights breakdown with --placement (a platform_position value),
18117
+ or a Meta ad_format with --ad-format. Run --list-formats to see both sets.
18118
+
17933
18119
  Examples:
17934
18120
  baker ads meta preview --creative-id 6123 --ad-format MOBILE_FEED_STANDARD
18121
+ baker ads meta preview --creative-id 6123 --placement facebook_reels_overlay --platform facebook
17935
18122
  baker ads meta preview --ad-id 9988 --ad-format INSTAGRAM_REELS --out-file /tmp/preview.html
17936
18123
  baker ads meta preview --account-id act_123 --creative '{"object_story_spec":{...}}' --ad-format MOBILE_FEED_STANDARD`
17937
18124
  },
@@ -17940,14 +18127,36 @@ Examples:
17940
18127
  "ad-id": { type: "string", description: "Existing ad ID" },
17941
18128
  "account-id": { type: "string", description: "Required when previewing an unpublished --creative spec" },
17942
18129
  creative: { type: "string", description: "JSON spec of an unpublished creative (e.g. object_story_spec)" },
17943
- "ad-format": { type: "string", description: "Meta ad_format enum value", required: true },
18130
+ "ad-format": { type: "string", description: "Meta ad_format enum value (--list-formats to see them)" },
18131
+ placement: {
18132
+ type: "string",
18133
+ description: "platform_position from an insights breakdown (e.g. facebook_reels_overlay) \u2014 resolved to an ad_format"
18134
+ },
18135
+ platform: { type: "string", description: "facebook|instagram \u2014 disambiguates --placement story / profile_feed" },
18136
+ "list-formats": { type: "boolean", description: "Print the ad_format values and placement mappings, then exit" },
17944
18137
  "out-file": { type: "string", description: "Save iframe HTML to this path" },
17945
18138
  "skip-cache": { type: "boolean", description: "Bypass server-side cache" }
17946
18139
  },
17947
18140
  run: async ({ args }) => {
17948
- const adFormat = args["ad-format"];
18141
+ if (args["list-formats"]) {
18142
+ writeAdsJson({
18143
+ ok: true,
18144
+ data: {
18145
+ adFormats: VALID_AD_FORMATS,
18146
+ placements: { facebook: FACEBOOK_PREVIEW_FORMATS, instagram: INSTAGRAM_PREVIEW_FORMATS }
18147
+ }
18148
+ });
18149
+ return;
18150
+ }
18151
+ const placement = args.placement;
18152
+ const adFormat = placement ? resolvePlacement(placement, args.platform) : args["ad-format"];
18153
+ if (!adFormat) {
18154
+ failPreviewValidation("pass --ad-format or --placement (see --list-formats)");
18155
+ }
17949
18156
  if (!VALID_AD_FORMATS.includes(adFormat)) {
17950
- handleMetaError(new Error(`Invalid --ad-format "${adFormat}". Run with --help to see supported values.`));
18157
+ failPreviewValidation(
18158
+ `Invalid --ad-format "${adFormat}". Meta publishes no complete ad_format enum, so this is the set we know: ${VALID_AD_FORMATS.join(", ")}. To preview a placement you saw in an insights breakdown, pass --placement <platform_position> instead of guessing a format name.`
18159
+ );
17951
18160
  }
17952
18161
  const body = { adFormat };
17953
18162
  if (args["creative-id"]) body.creativeId = args["creative-id"];
@@ -17958,12 +18167,16 @@ Examples:
17958
18167
  try {
17959
18168
  const data = await apiPost("/api/ads/meta/preview", body);
17960
18169
  const html = data.map((d) => d.body).join("\n");
18170
+ const hints = placement ? [
18171
+ `Rendered ${placement} as ad_format ${adFormat}. Open the iframe to SEE it \u2014 Meta does not document what it renders for a creative a placement cannot take, so a preview you looked at is the evidence, and anything you did not look at stays unverified.`
18172
+ ] : [];
17961
18173
  if (args["out-file"]) {
18174
+ const summary = { ok: true, data: { file: args["out-file"], rows: data.length, adFormat } };
17962
18175
  writeFileSync2(args["out-file"], html, "utf-8");
17963
- writeAdsJson({ ok: true, data: { file: args["out-file"], rows: data.length } });
18176
+ writeJsonEnvelope(hints.length > 0 ? { ...summary, hints } : summary);
17964
18177
  return;
17965
18178
  }
17966
- writeAdsJson({ ok: true, data });
18179
+ writeJsonEnvelope(hints.length > 0 ? { ok: true, data, hints } : { ok: true, data });
17967
18180
  } catch (err) {
17968
18181
  handleMetaError(err);
17969
18182
  }
@@ -18021,7 +18234,7 @@ Full guide: __tooling__/docs/tools/baker/ads-meta.md`
18021
18234
  pixels: pixelsCommand,
18022
18235
  activities: activitiesCommand,
18023
18236
  insights: insightsCommand,
18024
- preview: previewCommand,
18237
+ preview: previewCommand2,
18025
18238
  media: metaMediaCommand,
18026
18239
  draft: metaDraftCommand
18027
18240
  }
@@ -19535,13 +19748,127 @@ Full guides: __tooling__/docs/tools/baker/ads-<platform>.md (google|meta|linkedi
19535
19748
  }
19536
19749
  });
19537
19750
 
19538
- // src/commands/brand/index.ts
19751
+ // src/commands/agents/index.ts
19752
+ import { defineCommand as defineCommand89 } from "citty";
19753
+
19754
+ // src/commands/agents/list.ts
19755
+ import { defineCommand as defineCommand87 } from "citty";
19756
+
19757
+ // src/commands/agents/shared.ts
19758
+ function failValidation2(message) {
19759
+ writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message } });
19760
+ process.exit(1);
19761
+ }
19762
+ function failApi2(err) {
19763
+ if (err instanceof ApiError) {
19764
+ writeJson({ ok: false, error: { code: err.code, message: err.message } });
19765
+ process.exit(1);
19766
+ }
19767
+ const message = err instanceof Error ? err.message : "Unexpected error";
19768
+ writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message } });
19769
+ process.exit(1);
19770
+ }
19771
+
19772
+ // src/commands/agents/list.ts
19773
+ registerSchema({
19774
+ command: "agents.list",
19775
+ description: "The Baker agents that exist, with what each one does. Start here before recommending one, so you name a real teammate rather than inventing one.",
19776
+ args: {}
19777
+ });
19778
+ var listCommand10 = defineCommand87({
19779
+ meta: {
19780
+ name: "list",
19781
+ description: "List the Baker agents and what each does. Example: baker agents list"
19782
+ },
19783
+ run: async () => {
19784
+ try {
19785
+ const response = await apiPost(
19786
+ "/api/official-agents/list",
19787
+ {}
19788
+ );
19789
+ writeJson(response);
19790
+ } catch (err) {
19791
+ failApi2(err);
19792
+ }
19793
+ }
19794
+ });
19795
+
19796
+ // src/commands/agents/recommend.ts
19539
19797
  import { defineCommand as defineCommand88 } from "citty";
19798
+ registerSchema({
19799
+ command: "agents.recommend",
19800
+ description: "Suggest the company switch on another Baker agent, because the work you just found belongs to it. Does not block or wait \u2014 it records the suggestion on that agent's card in Tasks and your run carries on. Calling it again refreshes the same suggestion instead of stacking another, and a suggestion the company dismissed stays dismissed. Start here: baker agents list.",
19801
+ args: {
19802
+ agent: { type: "string", description: "Agent id to recommend, from `baker agents list`", required: true },
19803
+ from: { type: "string", description: "Your own agent id \u2014 who is making the suggestion", required: true },
19804
+ reason: {
19805
+ type: "string",
19806
+ description: "Why, in the company's own terms, naming what you found. Shown verbatim next to the switch, so write it for a marketer, not for us.",
19807
+ required: true
19808
+ }
19809
+ }
19810
+ });
19811
+ var recommendCommand = defineCommand88({
19812
+ meta: {
19813
+ name: "recommend",
19814
+ description: 'Suggest switching on another Baker agent. Example: baker agents recommend --agent baker-cro --from baker-analytics-reporter --reason "Your quote page gets the most traffic and converts the worst; Baker CRO is the one that fixes that."'
19815
+ },
19816
+ args: {
19817
+ agent: { type: "string", description: "Agent id to recommend", required: false },
19818
+ from: { type: "string", description: "Your own agent id", required: false },
19819
+ reason: { type: "string", description: "Why, in the company's terms", required: false }
19820
+ },
19821
+ run: async ({ args }) => {
19822
+ try {
19823
+ const agent = args.agent;
19824
+ const from = args.from;
19825
+ const reason = args.reason;
19826
+ if (!agent || !from || !reason) {
19827
+ failValidation2("--agent, --from and --reason are all required.");
19828
+ }
19829
+ if (agent === from) {
19830
+ failValidation2("An agent cannot recommend itself.");
19831
+ }
19832
+ const env = getEnv();
19833
+ const response = await apiPost("/api/official-agents/recommend", {
19834
+ agentId: agent,
19835
+ fromAgentId: from,
19836
+ reason,
19837
+ ...env.BAKER_CHAT_ID ? { chatId: env.BAKER_CHAT_ID } : {}
19838
+ });
19839
+ writeJson(response);
19840
+ } catch (err) {
19841
+ failApi2(err);
19842
+ }
19843
+ }
19844
+ });
19845
+
19846
+ // src/commands/agents/index.ts
19847
+ var agentsCommand = defineCommand89({
19848
+ meta: {
19849
+ name: "agents",
19850
+ description: `The other Baker agents, and how to ask for one. Subcommands: list, recommend.
19851
+
19852
+ Use this when the work in front of you belongs to a different agent than the one you are. Recommending does not block your run \u2014 it leaves the suggestion on that agent's card in Tasks, next to the switch that turns it on.
19853
+
19854
+ Examples:
19855
+ baker agents list
19856
+ baker agents recommend --agent baker-cro --from baker-analytics-reporter --reason "Your quote page gets the most traffic and converts the worst."
19857
+ Full guide: __tooling__/docs/tools/baker/agents.md`
19858
+ },
19859
+ subCommands: {
19860
+ list: listCommand10,
19861
+ recommend: recommendCommand
19862
+ }
19863
+ });
19864
+
19865
+ // src/commands/brand/index.ts
19866
+ import { defineCommand as defineCommand91 } from "citty";
19540
19867
 
19541
19868
  // src/commands/brand/fonts.ts
19542
19869
  import { mkdir, readFile, writeFile } from "fs/promises";
19543
19870
  import path from "path";
19544
- import { defineCommand as defineCommand87 } from "citty";
19871
+ import { defineCommand as defineCommand90 } from "citty";
19545
19872
 
19546
19873
  // src/engine/brand/fonts.ts
19547
19874
  var GOOGLE_CSS2 = "https://fonts.googleapis.com/css2";
@@ -19713,7 +20040,7 @@ async function readGlobalCss() {
19713
20040
  return "";
19714
20041
  }
19715
20042
  }
19716
- var fontsCheckCommand = defineCommand87({
20043
+ var fontsCheckCommand = defineCommand90({
19717
20044
  meta: {
19718
20045
  name: "check",
19719
20046
  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."
@@ -19757,7 +20084,7 @@ var fontsCheckCommand = defineCommand87({
19757
20084
  });
19758
20085
  }
19759
20086
  });
19760
- var fontsFetchCommand = defineCommand87({
20087
+ var fontsFetchCommand = defineCommand90({
19761
20088
  meta: {
19762
20089
  name: "fetch",
19763
20090
  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."
@@ -19839,7 +20166,7 @@ var fontsFetchCommand = defineCommand87({
19839
20166
  });
19840
20167
  }
19841
20168
  });
19842
- var fontsCommand = defineCommand87({
20169
+ var fontsCommand = defineCommand90({
19843
20170
  meta: {
19844
20171
  name: "fonts",
19845
20172
  description: `Verify and self-host the brand's typefaces.
@@ -19857,7 +20184,7 @@ Subcommands:
19857
20184
  });
19858
20185
 
19859
20186
  // src/commands/brand/index.ts
19860
- var brandCommand = defineCommand88({
20187
+ var brandCommand = defineCommand91({
19861
20188
  meta: {
19862
20189
  name: "brand",
19863
20190
  description: `Brand asset verification for src/brand/.
@@ -19873,11 +20200,11 @@ Subcommands:
19873
20200
  });
19874
20201
 
19875
20202
  // src/commands/canvas/index.ts
19876
- import { defineCommand as defineCommand99 } from "citty";
20203
+ import { defineCommand as defineCommand102 } from "citty";
19877
20204
 
19878
20205
  // src/commands/canvas/catalog.ts
19879
- import { defineCommand as defineCommand89 } from "citty";
19880
- var catalogCommand = defineCommand89({
20206
+ import { defineCommand as defineCommand92 } from "citty";
20207
+ var catalogCommand = defineCommand92({
19881
20208
  meta: {
19882
20209
  name: "catalog",
19883
20210
  description: "Print the agent-facing node catalog (JSON Schema). Includes every registered node grouped by category."
@@ -19892,7 +20219,7 @@ var catalogCommand = defineCommand89({
19892
20219
  // src/commands/canvas/critique.ts
19893
20220
  import { readFile as readFile2 } from "fs/promises";
19894
20221
  import path2 from "path";
19895
- import { defineCommand as defineCommand90 } from "citty";
20222
+ import { defineCommand as defineCommand93 } from "citty";
19896
20223
 
19897
20224
  // src/engine/scaffold/lib/critique.ts
19898
20225
  var VIBE_CUE = /\b(light|lighting|golden|moody|warm|cool|tone|grade|contrast|shadow|glow|rim|backlit|neon|soft)\b/i;
@@ -20012,7 +20339,7 @@ function critiqueCanvas(canvas) {
20012
20339
  }
20013
20340
 
20014
20341
  // src/commands/canvas/critique.ts
20015
- var critiqueCommand = defineCommand90({
20342
+ var critiqueCommand = defineCommand93({
20016
20343
  meta: {
20017
20344
  name: "critique",
20018
20345
  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."
@@ -20054,9 +20381,9 @@ import { execFile } from "child_process";
20054
20381
  import { readdir, readFile as readFile3, stat } from "fs/promises";
20055
20382
  import path3 from "path";
20056
20383
  import { promisify } from "util";
20057
- import { defineCommand as defineCommand91 } from "citty";
20384
+ import { defineCommand as defineCommand94 } from "citty";
20058
20385
  var execFileAsync = promisify(execFile);
20059
- var inspectCommand = defineCommand91({
20386
+ var inspectCommand = defineCommand94({
20060
20387
  meta: {
20061
20388
  name: "inspect",
20062
20389
  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."
@@ -20164,12 +20491,12 @@ async function probeDuration(filePath) {
20164
20491
 
20165
20492
  // src/commands/canvas/rerun.ts
20166
20493
  import path14 from "path";
20167
- import { defineCommand as defineCommand93 } from "citty";
20494
+ import { defineCommand as defineCommand96 } from "citty";
20168
20495
 
20169
20496
  // src/commands/canvas/run.ts
20170
20497
  import { readFile as readFile10 } from "fs/promises";
20171
20498
  import path13 from "path";
20172
- import { defineCommand as defineCommand92 } from "citty";
20499
+ import { defineCommand as defineCommand95 } from "citty";
20173
20500
 
20174
20501
  // src/commands/canvas/placeholders.ts
20175
20502
  function unsuppliedPlaceholderAssets(canvas) {
@@ -24335,7 +24662,7 @@ async function restoreRunSnapshot(manifest, targetDir, opts = {}) {
24335
24662
  }
24336
24663
 
24337
24664
  // src/commands/canvas/run.ts
24338
- var runCommand = defineCommand92({
24665
+ var runCommand = defineCommand95({
24339
24666
  meta: { name: "run", description: "Validate and execute a canvas JSON file." },
24340
24667
  args: {
24341
24668
  file: { type: "positional", required: true, description: "Path to canvas JSON" },
@@ -24705,7 +25032,7 @@ async function postInitialRunRecord(client, payload) {
24705
25032
 
24706
25033
  // src/commands/canvas/rerun.ts
24707
25034
  var SLUG_PATTERN = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
24708
- var rerunCommand = defineCommand93({
25035
+ var rerunCommand = defineCommand96({
24709
25036
  meta: {
24710
25037
  name: "rerun",
24711
25038
  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."
@@ -24802,7 +25129,7 @@ async function fetchManifest(url) {
24802
25129
  // src/commands/canvas/scaffold-static-ad.ts
24803
25130
  import { access, mkdir as mkdir6, readFile as readFile12, writeFile as writeFile7 } from "fs/promises";
24804
25131
  import path18 from "path";
24805
- import { defineCommand as defineCommand95 } from "citty";
25132
+ import { defineCommand as defineCommand98 } from "citty";
24806
25133
 
24807
25134
  // src/engine/scaffold/staticAd.ts
24808
25135
  import { z as z23 } from "zod";
@@ -25152,7 +25479,7 @@ function isValidScaffoldSlug(slug) {
25152
25479
  // src/commands/canvas/sync-definition.ts
25153
25480
  import { readdir as readdir5, readFile as readFile11, stat as stat3 } from "fs/promises";
25154
25481
  import path17 from "path";
25155
- import { defineCommand as defineCommand94 } from "citty";
25482
+ import { defineCommand as defineCommand97 } from "citty";
25156
25483
 
25157
25484
  // src/commands/canvas/definition-graph.ts
25158
25485
  var MAX_NODES = 300;
@@ -25265,7 +25592,7 @@ async function resolveCanvasPath(inputPath) {
25265
25592
  const chosen = (slug ? canvases.find((name) => name === `${slug}.canvas.json`) : void 0) ?? canvases[0];
25266
25593
  return chosen ? path17.join(dir, chosen) : null;
25267
25594
  }
25268
- var syncDefinitionCommand = defineCommand94({
25595
+ var syncDefinitionCommand = defineCommand97({
25269
25596
  meta: {
25270
25597
  name: "sync-definition",
25271
25598
  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."
@@ -25493,7 +25820,7 @@ async function runVisionPasses(canvas) {
25493
25820
  return fail3("read_outputs", e instanceof Error ? e.message : String(e));
25494
25821
  }
25495
25822
  }
25496
- var scaffoldStaticAdCommand = defineCommand95({
25823
+ var scaffoldStaticAdCommand = defineCommand98({
25497
25824
  meta: {
25498
25825
  name: "scaffold-static-ad",
25499
25826
  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."
@@ -25682,7 +26009,7 @@ var scaffoldStaticAdCommand = defineCommand95({
25682
26009
  import { access as access2, cp, mkdir as mkdir7, readFile as readFile15, rm as rm6, writeFile as writeFile8 } from "fs/promises";
25683
26010
  import { tmpdir as tmpdir2 } from "os";
25684
26011
  import path21 from "path";
25685
- import { defineCommand as defineCommand96 } from "citty";
26012
+ import { defineCommand as defineCommand99 } from "citty";
25686
26013
 
25687
26014
  // src/engine/scaffold/lib/model-router.ts
25688
26015
  var SEEDANCE = "bytedance/seedance-2.0";
@@ -26141,7 +26468,7 @@ async function runAnalysisPasses(deconstructCanvas, selectModel) {
26141
26468
  return fail4("deconstruct", e instanceof Error ? e.message : String(e));
26142
26469
  }
26143
26470
  }
26144
- var scaffoldVideoCommand = defineCommand96({
26471
+ var scaffoldVideoCommand = defineCommand99({
26145
26472
  meta: {
26146
26473
  name: "scaffold-video",
26147
26474
  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`."
@@ -26451,7 +26778,7 @@ var scaffoldVideoCommand = defineCommand96({
26451
26778
  // src/commands/canvas/set-prompt.ts
26452
26779
  import { readFile as readFile16, writeFile as writeFile9 } from "fs/promises";
26453
26780
  import path22 from "path";
26454
- import { defineCommand as defineCommand97 } from "citty";
26781
+ import { defineCommand as defineCommand100 } from "citty";
26455
26782
  function setNodePrompt(canvas, nodeId, text) {
26456
26783
  const nodes = canvas?.nodes;
26457
26784
  if (!Array.isArray(nodes)) throw new Error("canvas has no nodes array");
@@ -26466,7 +26793,7 @@ function setNodePrompt(canvas, nodeId, text) {
26466
26793
  newNodes[idx] = newNode;
26467
26794
  return { ...canvas, nodes: newNodes };
26468
26795
  }
26469
- var setPromptCommand = defineCommand97({
26796
+ var setPromptCommand = defineCommand100({
26470
26797
  meta: {
26471
26798
  name: "set-prompt",
26472
26799
  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."
@@ -26526,8 +26853,8 @@ var setPromptCommand = defineCommand97({
26526
26853
  // src/commands/canvas/validate.ts
26527
26854
  import { readFile as readFile17 } from "fs/promises";
26528
26855
  import path23 from "path";
26529
- import { defineCommand as defineCommand98 } from "citty";
26530
- var validateCommand = defineCommand98({
26856
+ import { defineCommand as defineCommand101 } from "citty";
26857
+ var validateCommand = defineCommand101({
26531
26858
  meta: {
26532
26859
  name: "validate",
26533
26860
  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)."
@@ -26597,7 +26924,7 @@ var validateCommand = defineCommand98({
26597
26924
  });
26598
26925
 
26599
26926
  // src/commands/canvas/index.ts
26600
- var canvasCommand = defineCommand99({
26927
+ var canvasCommand = defineCommand102({
26601
26928
  meta: {
26602
26929
  name: "canvas",
26603
26930
  description: `Run Baker creative canvas JSON files locally. Local nodes execute in-process; remote nodes POST to the Convex backend gateway.
@@ -26631,7 +26958,7 @@ Full guide: __tooling__/docs/tools/baker/canvas.md`
26631
26958
  });
26632
26959
 
26633
26960
  // src/commands/capabilities/index.ts
26634
- import { defineCommand as defineCommand100 } from "citty";
26961
+ import { defineCommand as defineCommand103 } from "citty";
26635
26962
  registerSchema({
26636
26963
  command: "capabilities",
26637
26964
  description: "Start here, before promising the user anything on an ad platform, in Analytics, or in Tag Manager. Answers three questions in one call: what is connected and with what access, what a write on each surface actually does when it lands, and what CANNOT be done here and why. Run it with no arguments for every surface; name one surface to also get the exact fields every change on it accepts.",
@@ -26674,7 +27001,7 @@ function capabilityHints(surfaces) {
26674
27001
  }
26675
27002
  return hints;
26676
27003
  }
26677
- var runCapabilities = defineCommand100({
27004
+ var runCapabilities = defineCommand103({
26678
27005
  meta: {
26679
27006
  name: "capabilities",
26680
27007
  description: `What Baker can and cannot do for this company, before any work starts.
@@ -26730,7 +27057,7 @@ Full guide: __tooling__/docs/tools/baker/capabilities.md`
26730
27057
  var capabilitiesCommand = runCapabilities;
26731
27058
 
26732
27059
  // src/commands/chats/index.ts
26733
- import { defineCommand as defineCommand101 } from "citty";
27060
+ import { defineCommand as defineCommand104 } from "citty";
26734
27061
  var STATUS_GROUPS = ["active", "archived", "all"];
26735
27062
  var REPO_SURFACES = ["knowledge", "company", "brand", "landings", "flows", "creatives"];
26736
27063
  function parseBoundedInt(raw, name, min, max) {
@@ -26752,7 +27079,7 @@ registerSchema({
26752
27079
  full: { type: "boolean", description: "Include each Session's full change list", required: false, default: false }
26753
27080
  }
26754
27081
  });
26755
- var listCommand10 = defineCommand101({
27082
+ var listCommand11 = defineCommand104({
26756
27083
  meta: { name: "list", description: "List other Sessions on this account, newest first." },
26757
27084
  args: {
26758
27085
  status: { type: "string", description: "Filter: active|archived|all (default: all)", required: false },
@@ -26807,7 +27134,7 @@ registerSchema({
26807
27134
  }
26808
27135
  }
26809
27136
  });
26810
- var viewCommand = defineCommand101({
27137
+ var viewCommand = defineCommand104({
26811
27138
  meta: {
26812
27139
  name: "view",
26813
27140
  description: "Inspect one Session's full effects \u2014 git content + actions/tags/ads, kickoff, commits."
@@ -26851,7 +27178,7 @@ registerSchema({
26851
27178
  }
26852
27179
  }
26853
27180
  });
26854
- var transcriptCommand = defineCommand101({
27181
+ var transcriptCommand = defineCommand104({
26855
27182
  meta: { name: "transcript", description: "Read another Session's conversation." },
26856
27183
  args: {
26857
27184
  id: { type: "positional", description: "The Session id", required: true },
@@ -26903,7 +27230,7 @@ registerSchema({
26903
27230
  }
26904
27231
  }
26905
27232
  });
26906
- var diffCommand = defineCommand101({
27233
+ var diffCommand = defineCommand104({
26907
27234
  meta: { name: "diff", description: "See a published Session's real file-level changes." },
26908
27235
  args: {
26909
27236
  id: { type: "positional", description: "The Session id", required: true },
@@ -26947,14 +27274,14 @@ var diffCommand = defineCommand101({
26947
27274
  }
26948
27275
  }
26949
27276
  });
26950
- var chatsCommand = defineCommand101({
27277
+ var chatsCommand = defineCommand104({
26951
27278
  meta: {
26952
27279
  name: "chats",
26953
27280
  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.
26954
27281
  Full guide: __tooling__/docs/tools/baker/chats.md`
26955
27282
  },
26956
27283
  subCommands: {
26957
- list: listCommand10,
27284
+ list: listCommand11,
26958
27285
  view: viewCommand,
26959
27286
  transcript: transcriptCommand,
26960
27287
  diff: diffCommand
@@ -26962,10 +27289,10 @@ Full guide: __tooling__/docs/tools/baker/chats.md`
26962
27289
  });
26963
27290
 
26964
27291
  // src/commands/creatives/index.ts
26965
- import { defineCommand as defineCommand103 } from "citty";
27292
+ import { defineCommand as defineCommand106 } from "citty";
26966
27293
 
26967
27294
  // src/commands/creatives/publish.ts
26968
- import { defineCommand as defineCommand102 } from "citty";
27295
+ import { defineCommand as defineCommand105 } from "citty";
26969
27296
 
26970
27297
  // src/commands/images/api.ts
26971
27298
  import { readFile as readFile18 } from "fs/promises";
@@ -27112,7 +27439,7 @@ async function publishCreative(args, deps = defaultImageApiDeps) {
27112
27439
  chatId: chatIdFromEnv()
27113
27440
  });
27114
27441
  }
27115
- var publishCommand = defineCommand102({
27442
+ var publishCommand = defineCommand105({
27116
27443
  meta: {
27117
27444
  name: "publish",
27118
27445
  description: "Publish a final static creative image to Baker Creatives and print the creative reference JSON."
@@ -27170,7 +27497,7 @@ var publishCommand = defineCommand102({
27170
27497
  });
27171
27498
 
27172
27499
  // src/commands/creatives/index.ts
27173
- var creativesCommand3 = defineCommand103({
27500
+ var creativesCommand3 = defineCommand106({
27174
27501
  meta: {
27175
27502
  name: "creatives",
27176
27503
  description: `Publish static ad creatives as first-class Baker outputs.
@@ -27187,7 +27514,7 @@ Full guide: __tooling__/docs/tools/baker/creatives.md`
27187
27514
  });
27188
27515
 
27189
27516
  // src/commands/flows/index.ts
27190
- import { defineCommand as defineCommand104 } from "citty";
27517
+ import { defineCommand as defineCommand107 } from "citty";
27191
27518
 
27192
27519
  // src/commands/flows/shared.ts
27193
27520
  import { existsSync as existsSync4, readdirSync as readdirSync2, readFileSync as readFileSync9 } from "fs";
@@ -27342,7 +27669,7 @@ function displayName(slug) {
27342
27669
  const name = tree.displayName;
27343
27670
  return typeof name === "string" && name.trim() ? name.trim() : slug;
27344
27671
  }
27345
- var listCommand11 = defineCommand104({
27672
+ var listCommand12 = defineCommand107({
27346
27673
  meta: {
27347
27674
  name: "list",
27348
27675
  description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
@@ -27356,7 +27683,7 @@ var listCommand11 = defineCommand104({
27356
27683
  writeJson({ ok: true, data: { flows } });
27357
27684
  }
27358
27685
  });
27359
- var showCommand3 = defineCommand104({
27686
+ var showCommand3 = defineCommand107({
27360
27687
  meta: {
27361
27688
  name: "show",
27362
27689
  description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
@@ -27377,7 +27704,7 @@ var showCommand3 = defineCommand104({
27377
27704
  writeJson({ ok: true, data: response });
27378
27705
  }
27379
27706
  });
27380
- var flowsCommand = defineCommand104({
27707
+ var flowsCommand = defineCommand107({
27381
27708
  meta: {
27382
27709
  name: "flows",
27383
27710
  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).
@@ -27391,7 +27718,7 @@ Examples:
27391
27718
  Full guide: __tooling__/docs/tools/baker/flows.md`
27392
27719
  },
27393
27720
  subCommands: {
27394
- list: listCommand11,
27721
+ list: listCommand12,
27395
27722
  show: showCommand3
27396
27723
  },
27397
27724
  // Bare `baker flows` lists the Forms. This must be `default`, not `run`: citty falls
@@ -27401,10 +27728,10 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
27401
27728
  });
27402
27729
 
27403
27730
  // src/commands/ga4/index.ts
27404
- import { defineCommand as defineCommand111 } from "citty";
27731
+ import { defineCommand as defineCommand114 } from "citty";
27405
27732
 
27406
27733
  // src/commands/ga4/audit.ts
27407
- import { defineCommand as defineCommand105 } from "citty";
27734
+ import { defineCommand as defineCommand108 } from "citty";
27408
27735
 
27409
27736
  // src/commands/ga4/resolve.ts
27410
27737
  async function fetchProperties(useCache = true) {
@@ -27470,7 +27797,7 @@ registerSchema({
27470
27797
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
27471
27798
  }
27472
27799
  });
27473
- var auditCommand2 = defineCommand105({
27800
+ var auditCommand2 = defineCommand108({
27474
27801
  meta: {
27475
27802
  name: "audit",
27476
27803
  description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
@@ -27525,11 +27852,11 @@ Examples:
27525
27852
  });
27526
27853
 
27527
27854
  // src/commands/ga4/config.ts
27528
- import { defineCommand as defineCommand106 } from "citty";
27855
+ import { defineCommand as defineCommand109 } from "citty";
27529
27856
 
27530
27857
  // src/commands/ga4/shared.ts
27531
27858
  import { readFileSync as readFileSync10 } from "fs";
27532
- function failValidation2(message) {
27859
+ function failValidation3(message) {
27533
27860
  writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
27534
27861
  process.exit(1);
27535
27862
  }
@@ -27537,7 +27864,7 @@ function requireTarget4(args, entity) {
27537
27864
  const positional = Array.isArray(args._) ? args._[0] : void 0;
27538
27865
  const target = args.id ?? args.target ?? positional;
27539
27866
  if (typeof target !== "string" || target.length === 0) {
27540
- failValidation2(`pass the ${entity} id as the positional argument`);
27867
+ failValidation3(`pass the ${entity} id as the positional argument`);
27541
27868
  }
27542
27869
  return target;
27543
27870
  }
@@ -27546,17 +27873,17 @@ function readJsonSource(args, flag) {
27546
27873
  const file = args.file;
27547
27874
  const raw = typeof file === "string" && file.length > 0 ? readFileSync10(file, "utf8") : typeof inline === "string" && inline.length > 0 ? inline : void 0;
27548
27875
  if (raw === void 0) {
27549
- failValidation2(`pass --${flag} with inline JSON or --file with a path to a JSON file`);
27876
+ failValidation3(`pass --${flag} with inline JSON or --file with a path to a JSON file`);
27550
27877
  }
27551
27878
  try {
27552
27879
  return JSON.parse(raw);
27553
27880
  } catch {
27554
- return failValidation2(`--${flag} is not valid JSON`);
27881
+ return failValidation3(`--${flag} is not valid JSON`);
27555
27882
  }
27556
27883
  }
27557
27884
  function asObject(value, flag, index) {
27558
27885
  if (!value || typeof value !== "object" || Array.isArray(value)) {
27559
- failValidation2(
27886
+ failValidation3(
27560
27887
  index === void 0 ? `--${flag} must be a JSON object` : `--${flag}[${index}] must be a JSON object`
27561
27888
  );
27562
27889
  }
@@ -27571,7 +27898,7 @@ function loadJsonPayloads(args) {
27571
27898
  return [asObject(parsed, "json")];
27572
27899
  }
27573
27900
  if (parsed.length === 0) {
27574
- failValidation2("--json is an empty list \u2014 pass at least one definition");
27901
+ failValidation3("--json is an empty list \u2014 pass at least one definition");
27575
27902
  }
27576
27903
  return parsed.map((entry, index) => asObject(entry, "json", index));
27577
27904
  }
@@ -27717,7 +28044,7 @@ function configHints(config) {
27717
28044
  }
27718
28045
  return hints;
27719
28046
  }
27720
- var configCommand = defineCommand106({
28047
+ var configCommand = defineCommand109({
27721
28048
  meta: {
27722
28049
  name: "config",
27723
28050
  description: `Read how the property is configured to measure \u2014 key events, custom definitions, custom events, retention
@@ -27745,7 +28072,7 @@ Examples:
27745
28072
  });
27746
28073
 
27747
28074
  // src/commands/ga4/draft.ts
27748
- import { defineCommand as defineCommand107 } from "citty";
28075
+ import { defineCommand as defineCommand110 } from "citty";
27749
28076
  registerSchema({
27750
28077
  command: "ga4.draft",
27751
28078
  description: "Review and undo the Google Analytics changes staged on this chat. Use `list` to see everything staged, `show` to inspect one change in full before the chat completes, `amend` to correct one in place, and `remove`/`clear` to drop them. `list` and `show` take --chat <id> to read an earlier chat's changes instead.",
@@ -27754,13 +28081,13 @@ registerSchema({
27754
28081
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
27755
28082
  }
27756
28083
  });
27757
- var draftCommand3 = defineCommand107({
28084
+ var draftCommand3 = defineCommand110({
27758
28085
  meta: {
27759
28086
  name: "draft",
27760
28087
  description: "List, show, amend, remove or clear the Google Analytics changes staged on this chat. `list` and `show` take --chat <id> to read an earlier chat's changes instead."
27761
28088
  },
27762
28089
  subCommands: {
27763
- list: defineCommand107({
28090
+ list: defineCommand110({
27764
28091
  meta: { name: "list", description: "Review everything staged on this chat (--json for the raw envelope)" },
27765
28092
  args: {
27766
28093
  json: { type: "boolean", description: "Print the raw JSON envelope", required: false },
@@ -27770,7 +28097,7 @@ var draftCommand3 = defineCommand107({
27770
28097
  await draftList(args.json === true, args.chat);
27771
28098
  }
27772
28099
  }),
27773
- show: defineCommand107({
28100
+ show: defineCommand110({
27774
28101
  meta: {
27775
28102
  name: "show",
27776
28103
  description: "Print the full staged payload for one change, alongside how the property looks today \u2014 the receipt to verify it before the chat completes (never truncated)."
@@ -27787,7 +28114,7 @@ var draftCommand3 = defineCommand107({
27787
28114
  );
27788
28115
  }
27789
28116
  }),
27790
- amend: defineCommand107({
28117
+ amend: defineCommand110({
27791
28118
  meta: {
27792
28119
  name: "amend",
27793
28120
  description: "Update a staged change in place \u2014 merges a JSON patch into its payload (objects deep-merge, null deletes a key, arrays/scalars replace) and re-runs every check. Use this instead of remove + re-create."
@@ -27804,7 +28131,7 @@ var draftCommand3 = defineCommand107({
27804
28131
  });
27805
28132
  }
27806
28133
  }),
27807
- remove: defineCommand107({
28134
+ remove: defineCommand110({
27808
28135
  meta: { name: "remove", description: "Remove one staged change" },
27809
28136
  args: { ref: { type: "positional", description: "Staged ref or target id", required: false } },
27810
28137
  run: async ({ args }) => {
@@ -27813,7 +28140,7 @@ var draftCommand3 = defineCommand107({
27813
28140
  });
27814
28141
  }
27815
28142
  }),
27816
- clear: defineCommand107({
28143
+ clear: defineCommand110({
27817
28144
  meta: { name: "clear", description: "Discard all Google Analytics changes staged on this chat" },
27818
28145
  run: async () => {
27819
28146
  await draftAction2("/api/ga4/draft/clear", {});
@@ -27823,7 +28150,7 @@ var draftCommand3 = defineCommand107({
27823
28150
  });
27824
28151
 
27825
28152
  // src/commands/ga4/properties.ts
27826
- import { defineCommand as defineCommand108 } from "citty";
28153
+ import { defineCommand as defineCommand111 } from "citty";
27827
28154
  registerSchema({
27828
28155
  command: "ga4.properties",
27829
28156
  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.",
@@ -27839,7 +28166,7 @@ function propertyHints(properties) {
27839
28166
  resources: properties.map((property) => ({ id: property.externalId, label: property.name }))
27840
28167
  });
27841
28168
  }
27842
- var propertiesCommand = defineCommand108({
28169
+ var propertiesCommand = defineCommand111({
27843
28170
  meta: {
27844
28171
  name: "properties",
27845
28172
  description: `List accessible GA4 properties.
@@ -27889,7 +28216,7 @@ Examples:
27889
28216
  // src/commands/ga4/query.ts
27890
28217
  import { appendFileSync as appendFileSync2, existsSync as existsSync5, readFileSync as readFileSync11, writeFileSync as writeFileSync3 } from "fs";
27891
28218
  import { resolve as resolve2 } from "path";
27892
- import { defineCommand as defineCommand109 } from "citty";
28219
+ import { defineCommand as defineCommand112 } from "citty";
27893
28220
 
27894
28221
  // src/commands/ga4/presets.ts
27895
28222
  var GA4_PRESETS = [
@@ -28024,7 +28351,7 @@ function handleError2(err) {
28024
28351
  });
28025
28352
  process.exit(1);
28026
28353
  }
28027
- var queryCommand2 = defineCommand109({
28354
+ var queryCommand2 = defineCommand112({
28028
28355
  meta: {
28029
28356
  name: "query",
28030
28357
  description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
@@ -28095,7 +28422,7 @@ Free-form (escape hatch):
28095
28422
  });
28096
28423
 
28097
28424
  // src/commands/ga4/write-commands.ts
28098
- import { defineCommand as defineCommand110 } from "citty";
28425
+ import { defineCommand as defineCommand113 } from "citty";
28099
28426
  var PROPERTY_ARG_DESCRIPTION = "GA4 property id (optional only when one property is connected \u2014 run `baker ga4 properties`)";
28100
28427
  var propertyArg = { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false };
28101
28428
  function createJsonDescription(noun) {
@@ -28113,7 +28440,7 @@ registerSchema({
28113
28440
  "property-id": { type: "string", description: PROPERTY_ARG_DESCRIPTION, required: false }
28114
28441
  }
28115
28442
  });
28116
- var keyEventCommand = defineCommand110({
28443
+ var keyEventCommand = defineCommand113({
28117
28444
  meta: {
28118
28445
  name: "key-event",
28119
28446
  description: `Stage key-event (conversion) changes
@@ -28126,7 +28453,7 @@ Examples:
28126
28453
  baker ga4 key-event delete 4185`
28127
28454
  },
28128
28455
  subCommands: {
28129
- create: defineCommand110({
28456
+ create: defineCommand113({
28130
28457
  meta: {
28131
28458
  name: "create",
28132
28459
  description: "Stage a new key event. Needs eventName and countingMethod (ONCE_PER_EVENT or ONCE_PER_SESSION); defaultValue sets a monetary value when the event does not send one."
@@ -28147,7 +28474,7 @@ Examples:
28147
28474
  );
28148
28475
  }
28149
28476
  }),
28150
- update: defineCommand110({
28477
+ update: defineCommand113({
28151
28478
  meta: {
28152
28479
  name: "update",
28153
28480
  description: "Stage a change to an existing key event (pass its id). Only countingMethod and defaultValue can change \u2014 Google will not rename a key event."
@@ -28167,7 +28494,7 @@ Examples:
28167
28494
  });
28168
28495
  }
28169
28496
  }),
28170
- delete: defineCommand110({
28497
+ delete: defineCommand113({
28171
28498
  meta: {
28172
28499
  name: "delete",
28173
28500
  description: "Stage removing a key event, so the event stops counting as a conversion. The event itself keeps being collected. Irreversible once the chat completes \u2014 confirm with the user first."
@@ -28215,7 +28542,7 @@ for (const { kind, noun, createHint } of DEFINITIONS) {
28215
28542
  }
28216
28543
  function definitionCommand(definition) {
28217
28544
  const { command, kind, noun, example } = definition;
28218
- return defineCommand110({
28545
+ return defineCommand113({
28219
28546
  meta: {
28220
28547
  name: command,
28221
28548
  description: `Stage ${noun} changes
@@ -28227,7 +28554,7 @@ Examples:
28227
28554
  baker ga4 ${command} archive 12`
28228
28555
  },
28229
28556
  subCommands: {
28230
- create: defineCommand110({
28557
+ create: defineCommand113({
28231
28558
  meta: { name: "create", description: `Stage a new ${noun} (or a JSON array of them, staged together)` },
28232
28559
  args: {
28233
28560
  json: { type: "string", description: createJsonDescription(noun), required: false },
@@ -28245,7 +28572,7 @@ Examples:
28245
28572
  );
28246
28573
  }
28247
28574
  }),
28248
- update: defineCommand110({
28575
+ update: defineCommand113({
28249
28576
  meta: {
28250
28577
  name: "update",
28251
28578
  description: `Stage a change to an existing ${noun} (pass its id). The parameter name and scope cannot change \u2014 archive and recreate for that.`
@@ -28265,7 +28592,7 @@ Examples:
28265
28592
  });
28266
28593
  }
28267
28594
  }),
28268
- archive: defineCommand110({
28595
+ archive: defineCommand113({
28269
28596
  meta: {
28270
28597
  name: "archive",
28271
28598
  description: `Stage archiving a ${noun} (pass its id). It stops collecting and leaves reporting; past data stays. Irreversible once the chat completes \u2014 confirm with the user first.`
@@ -28310,7 +28637,7 @@ var dataStreamArg = {
28310
28637
  function withStream(args) {
28311
28638
  return typeof args["data-stream"] === "string" ? { dataStream: args["data-stream"] } : {};
28312
28639
  }
28313
- var customEventCommand = defineCommand110({
28640
+ var customEventCommand = defineCommand113({
28314
28641
  meta: {
28315
28642
  name: "custom-event",
28316
28643
  description: `Stage custom events \u2014 new events built from events the site already sends
@@ -28321,7 +28648,7 @@ Examples:
28321
28648
  baker ga4 custom-event delete 7`
28322
28649
  },
28323
28650
  subCommands: {
28324
- create: defineCommand110({
28651
+ create: defineCommand113({
28325
28652
  meta: {
28326
28653
  name: "create",
28327
28654
  description: "Stage a new custom event. Conditions match the source event: use field `event_name` to match the event itself, or any parameter name to match its value."
@@ -28344,7 +28671,7 @@ Examples:
28344
28671
  );
28345
28672
  }
28346
28673
  }),
28347
- update: defineCommand110({
28674
+ update: defineCommand113({
28348
28675
  meta: { name: "update", description: "Stage a change to an existing custom event (pass its id)" },
28349
28676
  args: {
28350
28677
  id: { type: "positional", description: "Custom event rule id", required: false },
@@ -28363,7 +28690,7 @@ Examples:
28363
28690
  });
28364
28691
  }
28365
28692
  }),
28366
- delete: defineCommand110({
28693
+ delete: defineCommand113({
28367
28694
  meta: {
28368
28695
  name: "delete",
28369
28696
  description: "Stage removing a custom event (pass its id). The event stops being created from then on; data already collected under it stays. Confirm with the user first."
@@ -28409,16 +28736,16 @@ function retentionValue(input, flag) {
28409
28736
  const normalized = input.trim();
28410
28737
  const mapped = RETENTION_BY_MONTHS[normalized] ?? (Object.values(RETENTION_BY_MONTHS).includes(normalized.toUpperCase()) ? normalized.toUpperCase() : void 0);
28411
28738
  if (!mapped) {
28412
- failValidation2(`--${flag} must be one of 2, 14, 26, 38 or 50 (months)`);
28739
+ failValidation3(`--${flag} must be one of 2, 14, 26, 38 or 50 (months)`);
28413
28740
  }
28414
28741
  return mapped;
28415
28742
  }
28416
28743
  function booleanArg(input, flag) {
28417
28744
  if (input === "true") return true;
28418
28745
  if (input === "false") return false;
28419
- return failValidation2(`--${flag} must be true or false`);
28746
+ return failValidation3(`--${flag} must be true or false`);
28420
28747
  }
28421
- var dataRetentionCommand = defineCommand110({
28748
+ var dataRetentionCommand = defineCommand113({
28422
28749
  meta: {
28423
28750
  name: "data-retention",
28424
28751
  description: `Stage a change to how long Google Analytics keeps data
@@ -28428,7 +28755,7 @@ Examples:
28428
28755
  baker ga4 data-retention set --event-data 14 --user-data 14 --reset-on-activity true`
28429
28756
  },
28430
28757
  subCommands: {
28431
- set: defineCommand110({
28758
+ set: defineCommand113({
28432
28759
  meta: { name: "set", description: "Stage the retention window (months)" },
28433
28760
  args: {
28434
28761
  "event-data": { type: "string", description: "2, 14, 26, 38 or 50", required: false },
@@ -28448,7 +28775,7 @@ Examples:
28448
28775
  payload.resetUserDataOnNewActivity = booleanArg(args["reset-on-activity"], "reset-on-activity");
28449
28776
  }
28450
28777
  if (Object.keys(payload).length === 0) {
28451
- failValidation2("pass at least one of --event-data, --user-data or --reset-on-activity");
28778
+ failValidation3("pass at least one of --event-data, --user-data or --reset-on-activity");
28452
28779
  }
28453
28780
  await stageOp3({ kind: "ga4.dataRetention.update", payload, ...withProperty(args) });
28454
28781
  }
@@ -28457,7 +28784,7 @@ Examples:
28457
28784
  });
28458
28785
 
28459
28786
  // src/commands/ga4/index.ts
28460
- var ga4Command = defineCommand111({
28787
+ var ga4Command = defineCommand114({
28461
28788
  meta: {
28462
28789
  name: "ga4",
28463
28790
  description: `Google Analytics 4. Report on a property, audit its config, and change what it measures.
@@ -28498,12 +28825,12 @@ Full guide: __tooling__/docs/tools/baker/ga4.md`
28498
28825
  });
28499
28826
 
28500
28827
  // src/commands/gsc/index.ts
28501
- import { defineCommand as defineCommand115 } from "citty";
28828
+ import { defineCommand as defineCommand118 } from "citty";
28502
28829
 
28503
28830
  // src/commands/gsc/query.ts
28504
28831
  import { appendFileSync as appendFileSync3, existsSync as existsSync6, readFileSync as readFileSync12, writeFileSync as writeFileSync4 } from "fs";
28505
28832
  import { resolve as resolve3 } from "path";
28506
- import { defineCommand as defineCommand112 } from "citty";
28833
+ import { defineCommand as defineCommand115 } from "citty";
28507
28834
 
28508
28835
  // src/commands/gsc/presets.ts
28509
28836
  var GSC_PRESETS = [
@@ -28697,7 +29024,7 @@ function handleError3(err) {
28697
29024
  });
28698
29025
  process.exit(1);
28699
29026
  }
28700
- var queryCommand3 = defineCommand112({
29027
+ var queryCommand3 = defineCommand115({
28701
29028
  meta: {
28702
29029
  name: "query",
28703
29030
  description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
@@ -28775,7 +29102,7 @@ Free-form (escape hatch):
28775
29102
  });
28776
29103
 
28777
29104
  // src/commands/gsc/sitemaps.ts
28778
- import { defineCommand as defineCommand113 } from "citty";
29105
+ import { defineCommand as defineCommand116 } from "citty";
28779
29106
  registerSchema({
28780
29107
  command: "gsc.sitemaps",
28781
29108
  description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
@@ -28784,7 +29111,7 @@ registerSchema({
28784
29111
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
28785
29112
  }
28786
29113
  });
28787
- var sitemapsCommand = defineCommand113({
29114
+ var sitemapsCommand = defineCommand116({
28788
29115
  meta: {
28789
29116
  name: "sitemaps",
28790
29117
  description: `List sitemaps for a site. Check health and errors.
@@ -28837,7 +29164,7 @@ Examples:
28837
29164
  });
28838
29165
 
28839
29166
  // src/commands/gsc/sites.ts
28840
- import { defineCommand as defineCommand114 } from "citty";
29167
+ import { defineCommand as defineCommand117 } from "citty";
28841
29168
  registerSchema({
28842
29169
  command: "gsc.sites",
28843
29170
  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.",
@@ -28853,7 +29180,7 @@ function siteHints(sites) {
28853
29180
  resources: sites.map((site) => ({ id: site.siteUrl, label: site.permissionLevel }))
28854
29181
  });
28855
29182
  }
28856
- var sitesCommand = defineCommand114({
29183
+ var sitesCommand = defineCommand117({
28857
29184
  meta: {
28858
29185
  name: "sites",
28859
29186
  description: `List verified Search Console sites.
@@ -28901,7 +29228,7 @@ Examples:
28901
29228
  });
28902
29229
 
28903
29230
  // src/commands/gsc/index.ts
28904
- var gscCommand = defineCommand115({
29231
+ var gscCommand = defineCommand118({
28905
29232
  meta: {
28906
29233
  name: "gsc",
28907
29234
  description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
@@ -28925,7 +29252,7 @@ Full guide: __tooling__/docs/tools/baker/gsc.md`
28925
29252
  });
28926
29253
 
28927
29254
  // src/commands/history/index.ts
28928
- import { defineCommand as defineCommand116 } from "citty";
29255
+ import { defineCommand as defineCommand119 } from "citty";
28929
29256
  registerSchema({
28930
29257
  command: "history.list",
28931
29258
  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.",
@@ -28980,7 +29307,7 @@ function parseBoundedInt2(raw, name, min, max) {
28980
29307
  }
28981
29308
  return value;
28982
29309
  }
28983
- var listCommand12 = defineCommand116({
29310
+ var listCommand13 = defineCommand119({
28984
29311
  meta: {
28985
29312
  name: "list",
28986
29313
  description: "List recent account changes (unified audit log), newest first."
@@ -29026,17 +29353,17 @@ var listCommand12 = defineCommand116({
29026
29353
  }
29027
29354
  }
29028
29355
  });
29029
- var historyCommand = defineCommand116({
29356
+ var historyCommand = defineCommand119({
29030
29357
  meta: {
29031
29358
  name: "history",
29032
29359
  description: `Unified account history (audit log): what changed, who did it, and when.
29033
29360
  Full guide: __tooling__/docs/tools/baker/history.md`
29034
29361
  },
29035
- subCommands: { list: listCommand12 }
29362
+ subCommands: { list: listCommand13 }
29036
29363
  });
29037
29364
 
29038
29365
  // src/commands/hubspot/index.ts
29039
- import { defineCommand as defineCommand117 } from "citty";
29366
+ import { defineCommand as defineCommand120 } from "citty";
29040
29367
  var EMBED_TYPES = ["legacy", "v4", "unknown"];
29041
29368
  function failNotConnected(err) {
29042
29369
  if (err instanceof ApiError && err.code === "FORBIDDEN" && err.message.includes(HUBSPOT_MISSING_GRANT_MARKER)) {
@@ -29173,7 +29500,7 @@ registerSchema({
29173
29500
  }
29174
29501
  }
29175
29502
  });
29176
- var formsListCommand = defineCommand117({
29503
+ var formsListCommand = defineCommand120({
29177
29504
  meta: {
29178
29505
  name: "list",
29179
29506
  description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
@@ -29218,7 +29545,7 @@ var formsListCommand = defineCommand117({
29218
29545
  }
29219
29546
  }
29220
29547
  });
29221
- var formsViewCommand = defineCommand117({
29548
+ var formsViewCommand = defineCommand120({
29222
29549
  meta: {
29223
29550
  name: "view",
29224
29551
  description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
@@ -29270,7 +29597,7 @@ var formsViewCommand = defineCommand117({
29270
29597
  }
29271
29598
  }
29272
29599
  });
29273
- var meetingsListCommand = defineCommand117({
29600
+ var meetingsListCommand = defineCommand120({
29274
29601
  meta: {
29275
29602
  name: "list",
29276
29603
  description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
@@ -29312,7 +29639,7 @@ var meetingsListCommand = defineCommand117({
29312
29639
  }
29313
29640
  }
29314
29641
  });
29315
- var meetingsViewCommand = defineCommand117({
29642
+ var meetingsViewCommand = defineCommand120({
29316
29643
  meta: {
29317
29644
  name: "view",
29318
29645
  description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
@@ -29356,7 +29683,7 @@ var meetingsViewCommand = defineCommand117({
29356
29683
  }
29357
29684
  }
29358
29685
  });
29359
- var formsSubmissionsCommand = defineCommand117({
29686
+ var formsSubmissionsCommand = defineCommand120({
29360
29687
  meta: {
29361
29688
  name: "submissions",
29362
29689
  description: "How many leads a form received, and when. Example: baker hubspot forms submissions <formId> --days 30"
@@ -29405,7 +29732,7 @@ var formsSubmissionsCommand = defineCommand117({
29405
29732
  }
29406
29733
  }
29407
29734
  });
29408
- var workflowsListCommand = defineCommand117({
29735
+ var workflowsListCommand = defineCommand120({
29409
29736
  meta: {
29410
29737
  name: "list",
29411
29738
  description: "List HubSpot workflows. Example: baker hubspot workflows list --enabled-only"
@@ -29441,7 +29768,7 @@ var workflowsListCommand = defineCommand117({
29441
29768
  }
29442
29769
  }
29443
29770
  });
29444
- var pipelinesListCommand = defineCommand117({
29771
+ var pipelinesListCommand = defineCommand120({
29445
29772
  meta: {
29446
29773
  name: "list",
29447
29774
  description: "List HubSpot deal pipelines and their stages. Example: baker hubspot pipelines list"
@@ -29458,7 +29785,7 @@ var pipelinesListCommand = defineCommand117({
29458
29785
  }
29459
29786
  }
29460
29787
  });
29461
- var contactsSummaryCommand = defineCommand117({
29788
+ var contactsSummaryCommand = defineCommand120({
29462
29789
  meta: {
29463
29790
  name: "summary",
29464
29791
  description: "Whether recent leads are being worked, as counts. Example: baker hubspot contacts summary --days 30"
@@ -29528,7 +29855,7 @@ function contactLookupHints(data) {
29528
29855
  }
29529
29856
  return hints;
29530
29857
  }
29531
- var contactsLookupCommand = defineCommand117({
29858
+ var contactsLookupCommand = defineCommand120({
29532
29859
  meta: {
29533
29860
  name: "lookup",
29534
29861
  description: "Find one contact by email and see whether it was worked. Example: baker hubspot contacts lookup a@b.com"
@@ -29552,27 +29879,27 @@ var contactsLookupCommand = defineCommand117({
29552
29879
  }
29553
29880
  }
29554
29881
  });
29555
- var contactsCommand = defineCommand117({
29882
+ var contactsCommand = defineCommand120({
29556
29883
  meta: { name: "contacts", description: "Contacts on the connected HubSpot account." },
29557
29884
  subCommands: { summary: contactsSummaryCommand, lookup: contactsLookupCommand }
29558
29885
  });
29559
- var formsCommand = defineCommand117({
29886
+ var formsCommand = defineCommand120({
29560
29887
  meta: { name: "forms", description: "HubSpot forms on the connected account." },
29561
29888
  subCommands: { list: formsListCommand, view: formsViewCommand, submissions: formsSubmissionsCommand }
29562
29889
  });
29563
- var workflowsCommand = defineCommand117({
29890
+ var workflowsCommand = defineCommand120({
29564
29891
  meta: { name: "workflows", description: "HubSpot workflows on the connected account." },
29565
29892
  subCommands: { list: workflowsListCommand }
29566
29893
  });
29567
- var pipelinesCommand = defineCommand117({
29894
+ var pipelinesCommand = defineCommand120({
29568
29895
  meta: { name: "pipelines", description: "HubSpot deal pipelines on the connected account." },
29569
29896
  subCommands: { list: pipelinesListCommand }
29570
29897
  });
29571
- var meetingsCommand = defineCommand117({
29898
+ var meetingsCommand = defineCommand120({
29572
29899
  meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
29573
29900
  subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
29574
29901
  });
29575
- var hubspotCommand = defineCommand117({
29902
+ var hubspotCommand = defineCommand120({
29576
29903
  meta: {
29577
29904
  name: "hubspot",
29578
29905
  description: `Read the connected HubSpot account \u2014 forms, the leads they received, workflows, deal pipelines and
@@ -29609,10 +29936,10 @@ Full guide: __tooling__/docs/tools/baker/hubspot.md`
29609
29936
  });
29610
29937
 
29611
29938
  // src/commands/images/index.ts
29612
- import { defineCommand as defineCommand142 } from "citty";
29939
+ import { defineCommand as defineCommand145 } from "citty";
29613
29940
 
29614
29941
  // src/commands/images/crop.ts
29615
- import { defineCommand as defineCommand118 } from "citty";
29942
+ import { defineCommand as defineCommand121 } from "citty";
29616
29943
 
29617
29944
  // src/lib/image/crop-sprite.ts
29618
29945
  import sharp from "sharp";
@@ -29737,7 +30064,7 @@ function emitError2(err) {
29737
30064
  }
29738
30065
  process.exit(1);
29739
30066
  }
29740
- var cropCommand = defineCommand118({
30067
+ var cropCommand = defineCommand121({
29741
30068
  meta: {
29742
30069
  name: "crop",
29743
30070
  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"
@@ -29773,7 +30100,7 @@ var cropCommand = defineCommand118({
29773
30100
  });
29774
30101
 
29775
30102
  // src/commands/images/delete.ts
29776
- import { defineCommand as defineCommand119 } from "citty";
30103
+ import { defineCommand as defineCommand122 } from "citty";
29777
30104
  registerSchema({
29778
30105
  command: "images.delete",
29779
30106
  description: "Delete an image by ID",
@@ -29787,7 +30114,7 @@ registerSchema({
29787
30114
  }
29788
30115
  }
29789
30116
  });
29790
- var deleteCommand = defineCommand119({
30117
+ var deleteCommand = defineCommand122({
29791
30118
  meta: {
29792
30119
  name: "delete",
29793
30120
  description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
@@ -29828,7 +30155,7 @@ var deleteCommand = defineCommand119({
29828
30155
  });
29829
30156
 
29830
30157
  // src/commands/images/dimensions.ts
29831
- import { defineCommand as defineCommand120 } from "citty";
30158
+ import { defineCommand as defineCommand123 } from "citty";
29832
30159
 
29833
30160
  // src/lib/image/dimensions.ts
29834
30161
  import { imageSize } from "image-size";
@@ -29851,7 +30178,7 @@ registerSchema({
29851
30178
  target: { type: "string", description: "Local file path or remote http(s) URL", required: true }
29852
30179
  }
29853
30180
  });
29854
- var dimensionsCommand = defineCommand120({
30181
+ var dimensionsCommand = defineCommand123({
29855
30182
  meta: {
29856
30183
  name: "dimensions",
29857
30184
  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"
@@ -29895,7 +30222,7 @@ var dimensionsCommand = defineCommand120({
29895
30222
  });
29896
30223
 
29897
30224
  // src/commands/images/extract.ts
29898
- import { defineCommand as defineCommand121 } from "citty";
30225
+ import { defineCommand as defineCommand124 } from "citty";
29899
30226
  registerSchema({
29900
30227
  command: "images.extract",
29901
30228
  description: "Extract images from a URL via Firecrawl (formats: images).",
@@ -29911,7 +30238,7 @@ registerSchema({
29911
30238
  }
29912
30239
  }
29913
30240
  });
29914
- var extractCommand = defineCommand121({
30241
+ var extractCommand = defineCommand124({
29915
30242
  meta: {
29916
30243
  name: "extract",
29917
30244
  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"
@@ -29949,7 +30276,7 @@ var extractCommand = defineCommand121({
29949
30276
  });
29950
30277
 
29951
30278
  // src/commands/images/find.ts
29952
- import { defineCommand as defineCommand122 } from "citty";
30279
+ import { defineCommand as defineCommand125 } from "citty";
29953
30280
  registerSchema({
29954
30281
  command: "images.find",
29955
30282
  description: "Fanout image search: library first, then opted-in external providers.",
@@ -29981,7 +30308,7 @@ registerSchema({
29981
30308
  }
29982
30309
  }
29983
30310
  });
29984
- var findCommand = defineCommand122({
30311
+ var findCommand = defineCommand125({
29985
30312
  meta: {
29986
30313
  name: "find",
29987
30314
  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"
@@ -30029,7 +30356,7 @@ var findCommand = defineCommand122({
30029
30356
  });
30030
30357
 
30031
30358
  // src/commands/images/get.ts
30032
- import { defineCommand as defineCommand123 } from "citty";
30359
+ import { defineCommand as defineCommand126 } from "citty";
30033
30360
  registerSchema({
30034
30361
  command: "images.get",
30035
30362
  description: "Get a single image by ID",
@@ -30037,7 +30364,7 @@ registerSchema({
30037
30364
  id: { type: "string", description: "Image ID", required: true }
30038
30365
  }
30039
30366
  });
30040
- var getCommand2 = defineCommand123({
30367
+ var getCommand2 = defineCommand126({
30041
30368
  meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
30042
30369
  args: {
30043
30370
  id: { type: "positional", description: "Image ID", required: false },
@@ -30073,7 +30400,7 @@ var getCommand2 = defineCommand123({
30073
30400
  });
30074
30401
 
30075
30402
  // src/commands/images/gif.ts
30076
- import { defineCommand as defineCommand124 } from "citty";
30403
+ import { defineCommand as defineCommand127 } from "citty";
30077
30404
  registerSchema({
30078
30405
  command: "images.gif",
30079
30406
  description: "Search Giphy for GIFs / reaction memes (paid social creative).",
@@ -30105,7 +30432,7 @@ registerSchema({
30105
30432
  }
30106
30433
  }
30107
30434
  });
30108
- var gifCommand = defineCommand124({
30435
+ var gifCommand = defineCommand127({
30109
30436
  meta: {
30110
30437
  name: "gif",
30111
30438
  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"
@@ -30152,7 +30479,7 @@ var gifCommand = defineCommand124({
30152
30479
  });
30153
30480
 
30154
30481
  // src/commands/images/google.ts
30155
- import { defineCommand as defineCommand125 } from "citty";
30482
+ import { defineCommand as defineCommand128 } from "citty";
30156
30483
 
30157
30484
  // src/commands/images/searchHints.ts
30158
30485
  var FALLBACK = {
@@ -30216,7 +30543,7 @@ registerSchema({
30216
30543
  }
30217
30544
  }
30218
30545
  });
30219
- var googleCommand2 = defineCommand125({
30546
+ var googleCommand2 = defineCommand128({
30220
30547
  meta: {
30221
30548
  name: "google",
30222
30549
  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"
@@ -30272,7 +30599,7 @@ var googleCommand2 = defineCommand125({
30272
30599
  });
30273
30600
 
30274
30601
  // src/commands/images/group.ts
30275
- import { defineCommand as defineCommand126 } from "citty";
30602
+ import { defineCommand as defineCommand129 } from "citty";
30276
30603
 
30277
30604
  // src/commands/mediaGroup.ts
30278
30605
  async function runMediaGroupLookup(input) {
@@ -30325,7 +30652,7 @@ registerSchema({
30325
30652
  "group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
30326
30653
  }
30327
30654
  });
30328
- var groupCommand = defineCommand126({
30655
+ var groupCommand = defineCommand129({
30329
30656
  meta: {
30330
30657
  name: "group",
30331
30658
  description: "List every asset that arrived in the same set \u2014 the slides of one Instagram carousel, the images off one scraped page. Start here whenever a hit looks like part of a sequence: carousel slides are authored to be read in order and usually only make sense together. Takes an image or a video id, since one carousel can contain both. Example: baker images group <imageId>"
@@ -30345,7 +30672,7 @@ var groupCommand = defineCommand126({
30345
30672
  });
30346
30673
 
30347
30674
  // src/commands/images/icon.ts
30348
- import { defineCommand as defineCommand127 } from "citty";
30675
+ import { defineCommand as defineCommand130 } from "citty";
30349
30676
  registerSchema({
30350
30677
  command: "images.icon",
30351
30678
  description: "Icon lookup via Iconify (200+ icon sets, free CDN).",
@@ -30371,7 +30698,7 @@ registerSchema({
30371
30698
  }
30372
30699
  }
30373
30700
  });
30374
- var iconCommand = defineCommand127({
30701
+ var iconCommand = defineCommand130({
30375
30702
  meta: {
30376
30703
  name: "icon",
30377
30704
  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'"
@@ -30411,7 +30738,7 @@ var iconCommand = defineCommand127({
30411
30738
  });
30412
30739
 
30413
30740
  // src/commands/images/ingest.ts
30414
- import { defineCommand as defineCommand128 } from "citty";
30741
+ import { defineCommand as defineCommand131 } from "citty";
30415
30742
  registerSchema({
30416
30743
  command: "images.ingest",
30417
30744
  description: "Ingest a remote image URL into the library (full describe + embed).",
@@ -30423,7 +30750,7 @@ registerSchema({
30423
30750
  context: { type: "string", description: "Description context hint", required: false }
30424
30751
  }
30425
30752
  });
30426
- var ingestCommand = defineCommand128({
30753
+ var ingestCommand = defineCommand131({
30427
30754
  meta: {
30428
30755
  name: "ingest",
30429
30756
  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"
@@ -30465,7 +30792,7 @@ var ingestCommand = defineCommand128({
30465
30792
  });
30466
30793
 
30467
30794
  // src/commands/images/layerize.ts
30468
- import { defineCommand as defineCommand129 } from "citty";
30795
+ import { defineCommand as defineCommand132 } from "citty";
30469
30796
  registerSchema({
30470
30797
  command: "images.layerize",
30471
30798
  description: "Split a library image into editable layers: transparent PNG cutouts for each element, plus any headline recovered as EDITABLE TEXT with its font, size, colour and position. Waits for completion by default. Costs credits.",
@@ -30529,7 +30856,7 @@ async function pollUntilSettled(imageId, maxWait) {
30529
30856
  }
30530
30857
  return null;
30531
30858
  }
30532
- var layerizeCommand = defineCommand129({
30859
+ var layerizeCommand = defineCommand132({
30533
30860
  meta: {
30534
30861
  name: "layerize",
30535
30862
  description: "Split a library image into editable layers \u2014 transparent cutouts per element, plus any baked-in headline recovered as editable text with its typography.\n\nStart here: baker images layerize j571abc123def\nExample: baker images layerize j571abc123def --full\nExample: baker images layerize j571abc123def --instructions 'keep the product and its shadow together'"
@@ -30598,7 +30925,7 @@ registerSchema({
30598
30925
  full: { type: "boolean", description: "Include geometry and typography for every layer", required: false }
30599
30926
  }
30600
30927
  });
30601
- var layersCommand = defineCommand129({
30928
+ var layersCommand = defineCommand132({
30602
30929
  meta: {
30603
30930
  name: "layers",
30604
30931
  description: "Read the layers of an image that has already been split. Free \u2014 no provider call.\n\nStart here: baker images layers j571abc123def\nExample: baker images layers j571abc123def --full"
@@ -30638,7 +30965,7 @@ var layersCommand = defineCommand129({
30638
30965
  });
30639
30966
 
30640
30967
  // src/commands/images/library.ts
30641
- import { defineCommand as defineCommand130 } from "citty";
30968
+ import { defineCommand as defineCommand133 } from "citty";
30642
30969
  registerSchema({
30643
30970
  command: "images.library",
30644
30971
  description: "Search the company image library. Returns only ready images.",
@@ -30664,7 +30991,7 @@ registerSchema({
30664
30991
  }
30665
30992
  }
30666
30993
  });
30667
- var libraryCommand = defineCommand130({
30994
+ var libraryCommand = defineCommand133({
30668
30995
  meta: {
30669
30996
  name: "library",
30670
30997
  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"
@@ -30721,7 +31048,7 @@ var libraryCommand = defineCommand130({
30721
31048
  });
30722
31049
 
30723
31050
  // src/commands/images/logo.ts
30724
- import { defineCommand as defineCommand131 } from "citty";
31051
+ import { defineCommand as defineCommand134 } from "citty";
30725
31052
  registerSchema({
30726
31053
  command: "images.logo",
30727
31054
  description: "Brand logo lookup via Brandfetch CDN (fallback/404). Auto-ingests by default.",
@@ -30746,7 +31073,7 @@ registerSchema({
30746
31073
  }
30747
31074
  }
30748
31075
  });
30749
- var logoCommand = defineCommand131({
31076
+ var logoCommand = defineCommand134({
30750
31077
  meta: {
30751
31078
  name: "logo",
30752
31079
  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"
@@ -30784,7 +31111,7 @@ var logoCommand = defineCommand131({
30784
31111
  });
30785
31112
 
30786
31113
  // src/commands/images/normalize.ts
30787
- import { defineCommand as defineCommand132 } from "citty";
31114
+ import { defineCommand as defineCommand135 } from "citty";
30788
31115
 
30789
31116
  // src/lib/image/color-changer.ts
30790
31117
  import quantize from "quantize";
@@ -31516,7 +31843,7 @@ function coerceRawArgs(args) {
31516
31843
  "dry-run": bool(args["dry-run"])
31517
31844
  };
31518
31845
  }
31519
- var normalizeCommand = defineCommand132({
31846
+ var normalizeCommand = defineCommand135({
31520
31847
  meta: {
31521
31848
  name: "normalize",
31522
31849
  description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
@@ -31571,7 +31898,7 @@ Examples:
31571
31898
  });
31572
31899
 
31573
31900
  // src/commands/images/pinterest.ts
31574
- import { defineCommand as defineCommand133 } from "citty";
31901
+ import { defineCommand as defineCommand136 } from "citty";
31575
31902
  registerSchema({
31576
31903
  command: "images.pinterest",
31577
31904
  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.",
@@ -31591,7 +31918,7 @@ registerSchema({
31591
31918
  }
31592
31919
  }
31593
31920
  });
31594
- var pinterestCommand = defineCommand133({
31921
+ var pinterestCommand = defineCommand136({
31595
31922
  meta: {
31596
31923
  name: "pinterest",
31597
31924
  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'"
@@ -31631,7 +31958,7 @@ var pinterestCommand = defineCommand133({
31631
31958
  });
31632
31959
 
31633
31960
  // src/commands/images/screenshot.ts
31634
- import { defineCommand as defineCommand134 } from "citty";
31961
+ import { defineCommand as defineCommand137 } from "citty";
31635
31962
  registerSchema({
31636
31963
  command: "images.screenshot",
31637
31964
  description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
@@ -31647,7 +31974,7 @@ registerSchema({
31647
31974
  }
31648
31975
  }
31649
31976
  });
31650
- var screenshotCommand = defineCommand134({
31977
+ var screenshotCommand = defineCommand137({
31651
31978
  meta: {
31652
31979
  name: "screenshot",
31653
31980
  description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
@@ -31710,7 +32037,7 @@ var screenshotCommand = defineCommand134({
31710
32037
  });
31711
32038
 
31712
32039
  // src/commands/images/search.ts
31713
- import { defineCommand as defineCommand135 } from "citty";
32040
+ import { defineCommand as defineCommand138 } from "citty";
31714
32041
  registerSchema({
31715
32042
  command: "images.search",
31716
32043
  description: "Search images by text query. Only returns ready images.",
@@ -31726,7 +32053,7 @@ registerSchema({
31726
32053
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
31727
32054
  }
31728
32055
  });
31729
- var searchCommand = defineCommand135({
32056
+ var searchCommand = defineCommand138({
31730
32057
  meta: {
31731
32058
  name: "search",
31732
32059
  description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
@@ -31786,7 +32113,7 @@ var searchCommand = defineCommand135({
31786
32113
  });
31787
32114
 
31788
32115
  // src/commands/images/sticker.ts
31789
- import { defineCommand as defineCommand136 } from "citty";
32116
+ import { defineCommand as defineCommand139 } from "citty";
31790
32117
  registerSchema({
31791
32118
  command: "images.sticker",
31792
32119
  description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
@@ -31818,7 +32145,7 @@ registerSchema({
31818
32145
  }
31819
32146
  }
31820
32147
  });
31821
- var stickerCommand = defineCommand136({
32148
+ var stickerCommand = defineCommand139({
31822
32149
  meta: {
31823
32150
  name: "sticker",
31824
32151
  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"
@@ -31865,7 +32192,7 @@ var stickerCommand = defineCommand136({
31865
32192
  });
31866
32193
 
31867
32194
  // src/commands/images/stock.ts
31868
- import { defineCommand as defineCommand137 } from "citty";
32195
+ import { defineCommand as defineCommand140 } from "citty";
31869
32196
  var STOCK_ERROR_FIX = {
31870
32197
  action: "use_different_resource",
31871
32198
  explanation: "Switch provider instead of retrying stock search. Stock search is one of several image sources. Run `baker images find <query> --sources library,pinterest,google` (`--sources` is required \u2014 `find` alone searches the library only) or `baker studio generate` to make the asset. Never sleep-and-retry this command \u2014 the CLI already backs off on rate limits. If no image can be sourced, continue the rest of the task with a placeholder rather than aborting it."
@@ -31942,7 +32269,7 @@ function buildStockRequest(query, args) {
31942
32269
  if (args.context) body.descriptionContext = args.context;
31943
32270
  return body;
31944
32271
  }
31945
- var stockCommand = defineCommand137({
32272
+ var stockCommand = defineCommand140({
31946
32273
  meta: {
31947
32274
  name: "stock",
31948
32275
  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"
@@ -31998,7 +32325,7 @@ var stockCommand = defineCommand137({
31998
32325
  });
31999
32326
 
32000
32327
  // src/lib/tags-command.ts
32001
- import { defineCommand as defineCommand138 } from "citty";
32328
+ import { defineCommand as defineCommand141 } from "citty";
32002
32329
  function makeTagsCommand(command, label, endpoint) {
32003
32330
  registerSchema({
32004
32331
  command: `${command}.tags`,
@@ -32007,7 +32334,7 @@ function makeTagsCommand(command, label, endpoint) {
32007
32334
  output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
32008
32335
  }
32009
32336
  });
32010
- return defineCommand138({
32337
+ return defineCommand141({
32011
32338
  meta: {
32012
32339
  name: "tags",
32013
32340
  description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
@@ -32043,7 +32370,7 @@ function makeTagsCommand(command, label, endpoint) {
32043
32370
  var tagsCommand2 = makeTagsCommand("images", "image", "/api/images/tags");
32044
32371
 
32045
32372
  // src/commands/images/upload.ts
32046
- import { defineCommand as defineCommand139 } from "citty";
32373
+ import { defineCommand as defineCommand142 } from "citty";
32047
32374
  registerSchema({
32048
32375
  command: "images.upload",
32049
32376
  description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
@@ -32081,7 +32408,7 @@ registerSchema({
32081
32408
  function isRemoteUrl2(value) {
32082
32409
  return /^https?:\/\//i.test(value);
32083
32410
  }
32084
- var uploadCommand = defineCommand139({
32411
+ var uploadCommand = defineCommand142({
32085
32412
  meta: {
32086
32413
  name: "upload",
32087
32414
  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'"
@@ -32174,7 +32501,7 @@ async function uploadLocal(target, args) {
32174
32501
  }
32175
32502
 
32176
32503
  // src/commands/images/upscale.ts
32177
- import { defineCommand as defineCommand140 } from "citty";
32504
+ import { defineCommand as defineCommand143 } from "citty";
32178
32505
  registerSchema({
32179
32506
  command: "images.upscale",
32180
32507
  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).",
@@ -32189,7 +32516,7 @@ registerSchema({
32189
32516
  }
32190
32517
  });
32191
32518
  var POLL_INTERVAL_MS4 = 1500;
32192
- var upscaleCommand = defineCommand140({
32519
+ var upscaleCommand = defineCommand143({
32193
32520
  meta: {
32194
32521
  name: "upscale",
32195
32522
  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"
@@ -32244,7 +32571,7 @@ var upscaleCommand = defineCommand140({
32244
32571
  });
32245
32572
 
32246
32573
  // src/commands/images/use.ts
32247
- import { defineCommand as defineCommand141 } from "citty";
32574
+ import { defineCommand as defineCommand144 } from "citty";
32248
32575
  registerSchema({
32249
32576
  command: "images.use",
32250
32577
  description: "Ingest a URL and wait for the library record to be ready.",
@@ -32260,7 +32587,7 @@ registerSchema({
32260
32587
  }
32261
32588
  });
32262
32589
  var POLL_INTERVAL_MS5 = 1500;
32263
- var useCommand = defineCommand141({
32590
+ var useCommand = defineCommand144({
32264
32591
  meta: {
32265
32592
  name: "use",
32266
32593
  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"
@@ -32306,7 +32633,7 @@ var useCommand = defineCommand141({
32306
32633
  });
32307
32634
 
32308
32635
  // src/commands/images/index.ts
32309
- var imagesCommand = defineCommand142({
32636
+ var imagesCommand = defineCommand145({
32310
32637
  meta: {
32311
32638
  name: "images",
32312
32639
  description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
@@ -32382,12 +32709,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
32382
32709
  });
32383
32710
 
32384
32711
  // src/commands/landing/index.ts
32385
- import { defineCommand as defineCommand152 } from "citty";
32712
+ import { defineCommand as defineCommand155 } from "citty";
32386
32713
 
32387
32714
  // src/commands/landing/critique.ts
32388
32715
  import { readdir as readdir8, stat as stat6 } from "fs/promises";
32389
32716
  import path28 from "path";
32390
- import { defineCommand as defineCommand143 } from "citty";
32717
+ import { defineCommand as defineCommand146 } from "citty";
32391
32718
 
32392
32719
  // src/engine/landing/lib/brand-tokens.ts
32393
32720
  import { readFile as readFile20 } from "fs/promises";
@@ -33782,7 +34109,7 @@ function fail5(code, message, fix) {
33782
34109
  );
33783
34110
  process.exit(2);
33784
34111
  }
33785
- var critiqueCommand2 = defineCommand143({
34112
+ var critiqueCommand2 = defineCommand146({
33786
34113
  meta: {
33787
34114
  name: "critique",
33788
34115
  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."
@@ -33891,10 +34218,10 @@ async function isDir(p) {
33891
34218
  }
33892
34219
 
33893
34220
  // src/commands/landing/inspiration/index.ts
33894
- import { defineCommand as defineCommand151 } from "citty";
34221
+ import { defineCommand as defineCommand154 } from "citty";
33895
34222
 
33896
34223
  // src/commands/landing/inspiration/add.ts
33897
- import { defineCommand as defineCommand144 } from "citty";
34224
+ import { defineCommand as defineCommand147 } from "citty";
33898
34225
 
33899
34226
  // src/commands/landing/inspiration/shared.ts
33900
34227
  var INSPIRATION_HINTS = {
@@ -33940,7 +34267,7 @@ registerSchema({
33940
34267
  note: { type: "string", description: "Why this page is worth keeping", required: false }
33941
34268
  }
33942
34269
  });
33943
- var addCommand = defineCommand144({
34270
+ var addCommand = defineCommand147({
33944
34271
  meta: {
33945
34272
  name: "add",
33946
34273
  description: "Add someone else's landing page to the reference library. Example: baker landing inspiration add https://linear.app --note 'the client likes this density'"
@@ -33978,7 +34305,7 @@ var addCommand = defineCommand144({
33978
34305
  // src/commands/landing/inspiration/code.ts
33979
34306
  import { mkdir as mkdir10, writeFile as writeFile13 } from "fs/promises";
33980
34307
  import path29 from "path";
33981
- import { defineCommand as defineCommand145 } from "citty";
34308
+ import { defineCommand as defineCommand148 } from "citty";
33982
34309
  registerSchema({
33983
34310
  command: "landing.inspiration.code",
33984
34311
  description: "Write a reference section's standalone HTML+CSS to .baker/inspiration/<id>/ so you can read how it is built. Reference only \u2014 the structure is the lesson, the words are not yours to reuse. Consulting a section records it, and `baker landing critique` blocks a publish that ships its copy verbatim.",
@@ -33987,7 +34314,7 @@ registerSchema({
33987
34314
  full: { type: "boolean", description: "Print the markup inline as well as writing it", required: false }
33988
34315
  }
33989
34316
  });
33990
- var codeCommand = defineCommand145({
34317
+ var codeCommand = defineCommand148({
33991
34318
  meta: {
33992
34319
  name: "code",
33993
34320
  description: "Write one reference section's standalone markup to disk. Example: baker landing inspiration code k57abc\u2026 \u2014 read it for structure, then build your own."
@@ -34044,7 +34371,7 @@ var codeCommand = defineCommand145({
34044
34371
  });
34045
34372
 
34046
34373
  // src/commands/landing/inspiration/favorites.ts
34047
- import { defineCommand as defineCommand146 } from "citty";
34374
+ import { defineCommand as defineCommand149 } from "citty";
34048
34375
  registerSchema({
34049
34376
  command: "landing.inspiration.favorites",
34050
34377
  description: "List the reference sections this company has saved. This is what `search` looks at by default, so it is the client's own taste profile \u2014 read it before proposing a direction.",
@@ -34058,7 +34385,7 @@ registerSchema({
34058
34385
  }
34059
34386
  }
34060
34387
  });
34061
- var favoritesCommand = defineCommand146({
34388
+ var favoritesCommand = defineCommand149({
34062
34389
  meta: {
34063
34390
  name: "favorites",
34064
34391
  description: "List this company's saved reference sections. Example: baker landing inspiration favorites --type hero,pricing"
@@ -34118,7 +34445,7 @@ registerSchema({
34118
34445
  note: { type: "string", description: "Why this is worth keeping", required: false }
34119
34446
  }
34120
34447
  });
34121
- var favoriteCommand = defineCommand146({
34448
+ var favoriteCommand = defineCommand149({
34122
34449
  meta: {
34123
34450
  name: "favorite",
34124
34451
  description: "Save a reference section to this company. Example: baker landing inspiration favorite k57abc\u2026"
@@ -34156,7 +34483,7 @@ registerSchema({
34156
34483
  page: { type: "boolean", description: "Treat the id as a page rather than a section", required: false }
34157
34484
  }
34158
34485
  });
34159
- var unfavoriteCommand = defineCommand146({
34486
+ var unfavoriteCommand = defineCommand149({
34160
34487
  meta: {
34161
34488
  name: "unfavorite",
34162
34489
  description: "Remove a reference section from this company's saved set. Example: baker landing inspiration unfavorite k57abc\u2026"
@@ -34178,7 +34505,7 @@ var unfavoriteCommand = defineCommand146({
34178
34505
  });
34179
34506
 
34180
34507
  // src/commands/landing/inspiration/page.ts
34181
- import { defineCommand as defineCommand147 } from "citty";
34508
+ import { defineCommand as defineCommand150 } from "citty";
34182
34509
  registerSchema({
34183
34510
  command: "landing.inspiration.page",
34184
34511
  description: "Show a whole reference page as a sequence: every section top to bottom with its type and the idea behind it. This is the view to use when the question is how a good page is ORDERED rather than what one section looks like.",
@@ -34195,7 +34522,7 @@ registerSchema({
34195
34522
  }
34196
34523
  }
34197
34524
  });
34198
- var pageCommand = defineCommand147({
34525
+ var pageCommand = defineCommand150({
34199
34526
  meta: {
34200
34527
  name: "page",
34201
34528
  description: "Show how a reference page sequences its sections. Example: baker landing inspiration page j91xyz\u2026 \u2014 the blueprint, not the pixels."
@@ -34260,7 +34587,7 @@ var pageCommand = defineCommand147({
34260
34587
  // src/commands/landing/inspiration/scrape.ts
34261
34588
  import { readFile as readFile23 } from "fs/promises";
34262
34589
  import path32 from "path";
34263
- import { defineCommand as defineCommand148 } from "citty";
34590
+ import { defineCommand as defineCommand151 } from "citty";
34264
34591
 
34265
34592
  // src/engine/landing/lib/capturedReferences.ts
34266
34593
  var MAX_STRINGS_PER_SECTION = 40;
@@ -36055,7 +36382,7 @@ registerSchema({
36055
36382
  report: { type: "boolean", description: "Write report.html. `--no-report` to skip", required: false }
36056
36383
  }
36057
36384
  });
36058
- var scrapeCommand = defineCommand148({
36385
+ var scrapeCommand = defineCommand151({
36059
36386
  meta: {
36060
36387
  name: "scrape",
36061
36388
  description: "Capture a landing page to a directory, now. Example: baker landing inspiration scrape https://linear.app --out .baker/inspiration/linear.app"
@@ -36134,7 +36461,7 @@ var scrapeCommand = defineCommand148({
36134
36461
  // src/commands/landing/inspiration/search.ts
36135
36462
  import { mkdir as mkdir12, writeFile as writeFile16 } from "fs/promises";
36136
36463
  import path33 from "path";
36137
- import { defineCommand as defineCommand149 } from "citty";
36464
+ import { defineCommand as defineCommand152 } from "citty";
36138
36465
  registerSchema({
36139
36466
  command: "landing.inspiration.search",
36140
36467
  description: "Search the shared library of real landing-page sections for reference before you design. Start here: baker landing inspiration search 'pricing with a monthly/annual toggle'. Returns the idea behind each section plus a downloaded screenshot you can Read. Defaults to this company's saved sections; pass --scope all for the whole library.",
@@ -36238,7 +36565,7 @@ async function downloadShots(results) {
36238
36565
  );
36239
36566
  return saved;
36240
36567
  }
36241
- var searchCommand2 = defineCommand149({
36568
+ var searchCommand2 = defineCommand152({
36242
36569
  meta: {
36243
36570
  name: "search",
36244
36571
  description: "Search real landing-page sections for reference. Example: baker landing inspiration search 'dark developer hero with a terminal' --register dev-tool-minimal --scope all"
@@ -36326,7 +36653,7 @@ var searchCommand2 = defineCommand149({
36326
36653
  // src/commands/landing/inspiration/view.ts
36327
36654
  import { mkdir as mkdir13, writeFile as writeFile17 } from "fs/promises";
36328
36655
  import path34 from "path";
36329
- import { defineCommand as defineCommand150 } from "citty";
36656
+ import { defineCommand as defineCommand153 } from "citty";
36330
36657
  registerSchema({
36331
36658
  command: "landing.inspiration.view",
36332
36659
  description: "Everything known about one section: composition, motion, design tokens, the copy it uses, why it works, and what must change to make it yours. Downloads the desktop and mobile screenshots plus the motion filmstrip so you can look at them.",
@@ -36351,7 +36678,7 @@ async function download(url, file) {
36351
36678
  return null;
36352
36679
  }
36353
36680
  }
36354
- var viewCommand2 = defineCommand150({
36681
+ var viewCommand2 = defineCommand153({
36355
36682
  meta: {
36356
36683
  name: "view",
36357
36684
  description: "Full detail for one reference section. Example: baker landing inspiration view k57abc\u2026 \u2014 read the screenshots it saves before you build."
@@ -36434,7 +36761,7 @@ var viewCommand2 = defineCommand150({
36434
36761
  });
36435
36762
 
36436
36763
  // src/commands/landing/inspiration/index.ts
36437
- var inspirationCommand = defineCommand151({
36764
+ var inspirationCommand = defineCommand154({
36438
36765
  meta: {
36439
36766
  name: "inspiration",
36440
36767
  description: `Reference library of real landing-page sections \u2014 look at how good pages actually solve a problem before you design one.
@@ -36476,7 +36803,7 @@ Full guide: __tooling__/docs/tools/baker/landing.md`
36476
36803
  });
36477
36804
 
36478
36805
  // src/commands/landing/index.ts
36479
- var landingCommand = defineCommand152({
36806
+ var landingCommand = defineCommand155({
36480
36807
  meta: {
36481
36808
  name: "landing",
36482
36809
  description: `Design-quality tools for landing pages (src/pages/<slug>/).
@@ -36494,7 +36821,7 @@ Subcommands:
36494
36821
  });
36495
36822
 
36496
36823
  // src/commands/mcp/index.ts
36497
- import { defineCommand as defineCommand153 } from "citty";
36824
+ import { defineCommand as defineCommand156 } from "citty";
36498
36825
 
36499
36826
  // src/commands/mcp/platforms.ts
36500
36827
  function readsKey(label) {
@@ -36563,7 +36890,7 @@ registerSchema({
36563
36890
  description: "List everything this chat can reach: managed integrations (Attio, Slack, Gmail, Google Sheets, \u2026), custom MCP servers, and the platforms the company signed in to (HubSpot, Google Ads, GA4, Search Console, Tag Manager) which you read through their own `baker` commands. Start here when the user mentions an external tool or platform.",
36564
36891
  args: {}
36565
36892
  });
36566
- var connectedCommand = defineCommand153({
36893
+ var connectedCommand = defineCommand156({
36567
36894
  meta: {
36568
36895
  name: "connected",
36569
36896
  description: `Everything this chat can reach \u2014 managed integrations, custom MCP servers, and connected platforms.
@@ -36622,7 +36949,7 @@ registerSchema({
36622
36949
  description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
36623
36950
  args: {}
36624
36951
  });
36625
- var listCommand13 = defineCommand153({
36952
+ var listCommand14 = defineCommand156({
36626
36953
  meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
36627
36954
  run: async () => {
36628
36955
  try {
@@ -36659,7 +36986,7 @@ registerSchema({
36659
36986
  header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
36660
36987
  }
36661
36988
  });
36662
- var addCommand2 = defineCommand153({
36989
+ var addCommand2 = defineCommand156({
36663
36990
  meta: {
36664
36991
  name: "add",
36665
36992
  description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
@@ -36711,7 +37038,7 @@ registerSchema({
36711
37038
  description: "Remove a company custom MCP server by name.",
36712
37039
  args: { name: { type: "string", description: "Server name to remove", required: true } }
36713
37040
  });
36714
- var removeCommand4 = defineCommand153({
37041
+ var removeCommand4 = defineCommand156({
36715
37042
  meta: {
36716
37043
  name: "remove",
36717
37044
  description: `Remove a company custom MCP server by name.
@@ -36733,7 +37060,7 @@ Example:
36733
37060
  }
36734
37061
  }
36735
37062
  });
36736
- var mcpCommand = defineCommand153({
37063
+ var mcpCommand = defineCommand156({
36737
37064
  meta: {
36738
37065
  name: "mcp",
36739
37066
  description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
@@ -36752,17 +37079,17 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
36752
37079
  },
36753
37080
  subCommands: {
36754
37081
  connected: connectedCommand,
36755
- list: listCommand13,
37082
+ list: listCommand14,
36756
37083
  add: addCommand2,
36757
37084
  remove: removeCommand4
36758
37085
  }
36759
37086
  });
36760
37087
 
36761
37088
  // src/commands/research/index.ts
36762
- import { defineCommand as defineCommand164 } from "citty";
37089
+ import { defineCommand as defineCommand167 } from "citty";
36763
37090
 
36764
37091
  // src/commands/research/advertisers.ts
36765
- import { defineCommand as defineCommand154 } from "citty";
37092
+ import { defineCommand as defineCommand157 } from "citty";
36766
37093
 
36767
37094
  // src/commands/research/output.ts
36768
37095
  var RESEARCH_DATA_NOTE = "Estimates based on third-party SERP data \u2014 not exact figures. Use for directional insights, not precise measurement.";
@@ -36875,7 +37202,7 @@ var FIELDS3 = {
36875
37202
  etv: "Estimated traffic value (USD)",
36876
37203
  visibility: "SERP visibility score (0-1)"
36877
37204
  };
36878
- var advertisersCommand = defineCommand154({
37205
+ var advertisersCommand = defineCommand157({
36879
37206
  meta: {
36880
37207
  name: "advertisers",
36881
37208
  description: `Find domains competing for a keyword in Google SERPs.
@@ -36922,7 +37249,7 @@ Examples:
36922
37249
  });
36923
37250
 
36924
37251
  // src/commands/research/autocomplete.ts
36925
- import { defineCommand as defineCommand155 } from "citty";
37252
+ import { defineCommand as defineCommand158 } from "citty";
36926
37253
  registerSchema({
36927
37254
  command: "research.autocomplete",
36928
37255
  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).",
@@ -36945,7 +37272,7 @@ registerSchema({
36945
37272
  var FIELDS4 = {
36946
37273
  suggestion: "Autocomplete suggestion from Google"
36947
37274
  };
36948
- var autocompleteCommand = defineCommand155({
37275
+ var autocompleteCommand = defineCommand158({
36949
37276
  meta: {
36950
37277
  name: "autocomplete",
36951
37278
  description: `Get Google Autocomplete suggestions for keyword expansion.
@@ -36991,7 +37318,7 @@ Examples:
36991
37318
  });
36992
37319
 
36993
37320
  // src/commands/research/countries.ts
36994
- import { defineCommand as defineCommand156 } from "citty";
37321
+ import { defineCommand as defineCommand159 } from "citty";
36995
37322
  registerSchema({
36996
37323
  command: "research.countries",
36997
37324
  description: "List all supported country codes for --location flag in research commands.",
@@ -37048,7 +37375,7 @@ var FIELDS5 = {
37048
37375
  code: "Country code to pass as --location",
37049
37376
  name: "Country name"
37050
37377
  };
37051
- var countriesCommand = defineCommand156({
37378
+ var countriesCommand = defineCommand159({
37052
37379
  meta: {
37053
37380
  name: "countries",
37054
37381
  description: "List all supported country codes for --location flag."
@@ -37059,7 +37386,7 @@ var countriesCommand = defineCommand156({
37059
37386
  });
37060
37387
 
37061
37388
  // src/commands/research/intent.ts
37062
- import { defineCommand as defineCommand157 } from "citty";
37389
+ import { defineCommand as defineCommand160 } from "citty";
37063
37390
  registerSchema({
37064
37391
  command: "research.intent",
37065
37392
  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.",
@@ -37082,7 +37409,7 @@ var FIELDS6 = {
37082
37409
  intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
37083
37410
  probability: "Confidence score 0.0-1.0"
37084
37411
  };
37085
- var intentCommand = defineCommand157({
37412
+ var intentCommand = defineCommand160({
37086
37413
  meta: {
37087
37414
  name: "intent",
37088
37415
  description: `Classify Google Search intent for keywords. Returns intent type and confidence.
@@ -37130,7 +37457,7 @@ Examples:
37130
37457
  });
37131
37458
 
37132
37459
  // src/commands/research/keyword-gap.ts
37133
- import { defineCommand as defineCommand158 } from "citty";
37460
+ import { defineCommand as defineCommand161 } from "citty";
37134
37461
  registerSchema({
37135
37462
  command: "research.keyword-gap",
37136
37463
  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.",
@@ -37159,7 +37486,7 @@ var FIELDS7 = {
37159
37486
  cpc: "Cost per click USD",
37160
37487
  their_position: "Competitor's ranking position"
37161
37488
  };
37162
- var keywordGapCommand = defineCommand158({
37489
+ var keywordGapCommand = defineCommand161({
37163
37490
  meta: {
37164
37491
  name: "keyword-gap",
37165
37492
  description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
@@ -37233,7 +37560,7 @@ Examples:
37233
37560
  });
37234
37561
 
37235
37562
  // src/commands/research/keywords-for-site.ts
37236
- import { defineCommand as defineCommand159 } from "citty";
37563
+ import { defineCommand as defineCommand162 } from "citty";
37237
37564
  registerSchema({
37238
37565
  command: "research.keywords-for-site",
37239
37566
  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.",
@@ -37266,7 +37593,7 @@ var FIELDS8 = {
37266
37593
  competition: "LOW, MEDIUM, or HIGH",
37267
37594
  competition_index: "Competition score 0-100"
37268
37595
  };
37269
- var keywordsForSiteCommand = defineCommand159({
37596
+ var keywordsForSiteCommand = defineCommand162({
37270
37597
  meta: {
37271
37598
  name: "keywords-for-site",
37272
37599
  description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
@@ -37319,7 +37646,7 @@ Examples:
37319
37646
  });
37320
37647
 
37321
37648
  // src/commands/research/languages.ts
37322
- import { defineCommand as defineCommand160 } from "citty";
37649
+ import { defineCommand as defineCommand163 } from "citty";
37323
37650
  registerSchema({
37324
37651
  command: "research.languages",
37325
37652
  description: "List all supported language codes for --language flag in research commands.",
@@ -37349,7 +37676,7 @@ var FIELDS9 = {
37349
37676
  code: "Language code to pass as --language",
37350
37677
  name: "Language name (also accepted by --language)"
37351
37678
  };
37352
- var languagesCommand2 = defineCommand160({
37679
+ var languagesCommand2 = defineCommand163({
37353
37680
  meta: {
37354
37681
  name: "languages",
37355
37682
  description: "List all supported language codes for --language flag."
@@ -37360,7 +37687,7 @@ var languagesCommand2 = defineCommand160({
37360
37687
  });
37361
37688
 
37362
37689
  // src/commands/research/lighthouse.ts
37363
- import { defineCommand as defineCommand161 } from "citty";
37690
+ import { defineCommand as defineCommand164 } from "citty";
37364
37691
  registerSchema({
37365
37692
  command: "research.lighthouse",
37366
37693
  description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
@@ -37379,7 +37706,7 @@ var FIELDS10 = {
37379
37706
  speed_index_ms: "Speed Index in ms (good: < 3400)",
37380
37707
  interactive_ms: "Time to Interactive in ms (good: < 3800)"
37381
37708
  };
37382
- var lighthouseCommand = defineCommand161({
37709
+ var lighthouseCommand = defineCommand164({
37383
37710
  meta: {
37384
37711
  name: "lighthouse",
37385
37712
  description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
@@ -37417,7 +37744,7 @@ Examples:
37417
37744
  });
37418
37745
 
37419
37746
  // src/commands/research/relevant-pages.ts
37420
- import { defineCommand as defineCommand162 } from "citty";
37747
+ import { defineCommand as defineCommand165 } from "citty";
37421
37748
  registerSchema({
37422
37749
  command: "research.relevant-pages",
37423
37750
  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).",
@@ -37443,7 +37770,7 @@ var FIELDS11 = {
37443
37770
  keywords: "Total organic keywords the page ranks for",
37444
37771
  top_10: "Keywords in positions 1-10"
37445
37772
  };
37446
- var relevantPagesCommand = defineCommand162({
37773
+ var relevantPagesCommand = defineCommand165({
37447
37774
  meta: {
37448
37775
  name: "relevant-pages",
37449
37776
  description: `Get the top pages of a competitor domain with traffic data.
@@ -37489,7 +37816,7 @@ Examples:
37489
37816
  });
37490
37817
 
37491
37818
  // src/commands/research/web.ts
37492
- import { defineCommand as defineCommand163 } from "citty";
37819
+ import { defineCommand as defineCommand166 } from "citty";
37493
37820
  registerSchema({
37494
37821
  command: "research.web",
37495
37822
  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).",
@@ -37540,7 +37867,7 @@ async function runDeepResearch(question) {
37540
37867
  }
37541
37868
  throw new Error("Deep research timed out");
37542
37869
  }
37543
- var webCommand = defineCommand163({
37870
+ var webCommand = defineCommand166({
37544
37871
  meta: {
37545
37872
  name: "web",
37546
37873
  description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
@@ -37600,7 +37927,7 @@ Examples:
37600
37927
  });
37601
37928
 
37602
37929
  // src/commands/research/index.ts
37603
- var researchCommand = defineCommand164({
37930
+ var researchCommand = defineCommand167({
37604
37931
  meta: {
37605
37932
  name: "research",
37606
37933
  description: `Competitive intelligence and AI-powered research commands.
@@ -37641,10 +37968,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
37641
37968
  });
37642
37969
 
37643
37970
  // src/commands/scheduled-actions/index.ts
37644
- import { defineCommand as defineCommand171 } from "citty";
37971
+ import { defineCommand as defineCommand174 } from "citty";
37645
37972
 
37646
37973
  // src/commands/scheduled-actions/create.ts
37647
- import { defineCommand as defineCommand165 } from "citty";
37974
+ import { defineCommand as defineCommand168 } from "citty";
37648
37975
 
37649
37976
  // src/commands/scheduled-actions/shared.ts
37650
37977
  var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
@@ -37652,11 +37979,11 @@ var TEMP_ID_PREFIX = "temp_";
37652
37979
  function writeOk2(data) {
37653
37980
  writeJson({ ok: true, data: data ?? null });
37654
37981
  }
37655
- function failValidation3(message) {
37982
+ function failValidation4(message) {
37656
37983
  writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message } });
37657
37984
  process.exit(1);
37658
37985
  }
37659
- function failApi2(err) {
37986
+ function failApi3(err) {
37660
37987
  if (err instanceof ApiError) {
37661
37988
  writeJson({ ok: false, error: { code: err.code, message: err.message } });
37662
37989
  process.exit(1);
@@ -37676,7 +38003,7 @@ function isOtherTempId(id) {
37676
38003
  }
37677
38004
  function validateScheduledActionRef(ref) {
37678
38005
  if (isOtherTempId(ref)) {
37679
- failValidation3(`Scheduled action temp IDs must start with ${TEMP_SCHEDULED_ACTION_PREFIX}.`);
38006
+ failValidation4(`Scheduled action temp IDs must start with ${TEMP_SCHEDULED_ACTION_PREFIX}.`);
37680
38007
  }
37681
38008
  if (!isTempScheduledActionId(ref)) {
37682
38009
  validateConvexId(ref);
@@ -37690,7 +38017,7 @@ function isPromptWithoutAgent(args, agentDisabled) {
37690
38017
  }
37691
38018
  function failIfPromptWithoutAgent(args, agentDisabled) {
37692
38019
  if (isPromptWithoutAgent(args, agentDisabled)) {
37693
- failValidation3(
38020
+ failValidation4(
37694
38021
  "--prompt only applies when an agent is spawned; it has no effect with --no-spawn-agent or --spawn-agent false."
37695
38022
  );
37696
38023
  }
@@ -37705,21 +38032,21 @@ function parseBooleanFlag(raw, flagName) {
37705
38032
  if (raw === false || raw === "false") {
37706
38033
  return false;
37707
38034
  }
37708
- failValidation3(`${flagName} must be true or false.`);
38035
+ failValidation4(`${flagName} must be true or false.`);
37709
38036
  }
37710
38037
  function buildScheduleBody(args, options) {
37711
38038
  const cron = args.cron;
37712
38039
  const runAt = args["run-at"];
37713
38040
  const timezone = args.timezone;
37714
38041
  if (cron && runAt) {
37715
- failValidation3("--cron and --run-at are mutually exclusive.");
38042
+ failValidation4("--cron and --run-at are mutually exclusive.");
37716
38043
  }
37717
38044
  if (runAt) {
37718
38045
  if (!runAt.endsWith("Z")) {
37719
- failValidation3("--run-at must be an ISO UTC timestamp ending in Z.");
38046
+ failValidation4("--run-at must be an ISO UTC timestamp ending in Z.");
37720
38047
  }
37721
38048
  if (!Number.isFinite(Date.parse(runAt))) {
37722
- failValidation3("--run-at must be a valid ISO timestamp.");
38049
+ failValidation4("--run-at must be a valid ISO timestamp.");
37723
38050
  }
37724
38051
  return { runAt, ...timezone ? { timezone } : {} };
37725
38052
  }
@@ -37730,7 +38057,7 @@ function buildScheduleBody(args, options) {
37730
38057
  return { timezone };
37731
38058
  }
37732
38059
  if (options.required) {
37733
- failValidation3("Provide exactly one of --cron or --run-at.");
38060
+ failValidation4("Provide exactly one of --cron or --run-at.");
37734
38061
  }
37735
38062
  return void 0;
37736
38063
  }
@@ -37759,7 +38086,7 @@ registerSchema({
37759
38086
  prompt: { type: "string", description: "Additional prompt instructions for the spawned agent", required: false }
37760
38087
  }
37761
38088
  });
37762
- var createCommand2 = defineCommand165({
38089
+ var createCommand2 = defineCommand168({
37763
38090
  meta: {
37764
38091
  name: "create",
37765
38092
  description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
@@ -37779,10 +38106,10 @@ var createCommand2 = defineCommand165({
37779
38106
  const name = args.name;
37780
38107
  const description = args.description;
37781
38108
  if (!name || name.trim().length === 0) {
37782
- failValidation3("--name is required.");
38109
+ failValidation4("--name is required.");
37783
38110
  }
37784
38111
  if (!description || description.trim().length === 0) {
37785
- failValidation3("--description is required.");
38112
+ failValidation4("--description is required.");
37786
38113
  }
37787
38114
  const schedule = buildScheduleBody(args, { required: true });
37788
38115
  const chatId = requireChatId();
@@ -37802,13 +38129,13 @@ var createCommand2 = defineCommand165({
37802
38129
  const response = await apiPost("/api/scheduled-actions/create", body);
37803
38130
  writeJson(response);
37804
38131
  } catch (err) {
37805
- failApi2(err);
38132
+ failApi3(err);
37806
38133
  }
37807
38134
  }
37808
38135
  });
37809
38136
 
37810
38137
  // src/commands/scheduled-actions/delete.ts
37811
- import { defineCommand as defineCommand166 } from "citty";
38138
+ import { defineCommand as defineCommand169 } from "citty";
37812
38139
  registerSchema({
37813
38140
  command: "scheduled-actions.delete",
37814
38141
  description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
@@ -37816,7 +38143,7 @@ registerSchema({
37816
38143
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
37817
38144
  }
37818
38145
  });
37819
- var deleteCommand2 = defineCommand166({
38146
+ var deleteCommand2 = defineCommand169({
37820
38147
  meta: {
37821
38148
  name: "delete",
37822
38149
  description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
@@ -37833,19 +38160,19 @@ var deleteCommand2 = defineCommand166({
37833
38160
  try {
37834
38161
  const id = args.id || args["scheduled-action-id"];
37835
38162
  if (!id) {
37836
- failValidation3("Scheduled action ID is required.");
38163
+ failValidation4("Scheduled action ID is required.");
37837
38164
  }
37838
38165
  validateScheduledActionRef(id);
37839
38166
  await apiPost("/api/scheduled-actions/delete", { chatId: requireChatId(), id });
37840
38167
  writeOk2();
37841
38168
  } catch (err) {
37842
- failApi2(err);
38169
+ failApi3(err);
37843
38170
  }
37844
38171
  }
37845
38172
  });
37846
38173
 
37847
38174
  // src/commands/scheduled-actions/get.ts
37848
- import { defineCommand as defineCommand167 } from "citty";
38175
+ import { defineCommand as defineCommand170 } from "citty";
37849
38176
  registerSchema({
37850
38177
  command: "scheduled-actions.get",
37851
38178
  description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
@@ -37854,7 +38181,7 @@ registerSchema({
37854
38181
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
37855
38182
  }
37856
38183
  });
37857
- var getCommand3 = defineCommand167({
38184
+ var getCommand3 = defineCommand170({
37858
38185
  meta: {
37859
38186
  name: "get",
37860
38187
  description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
@@ -37872,13 +38199,13 @@ var getCommand3 = defineCommand167({
37872
38199
  try {
37873
38200
  const id = args.id || args["scheduled-action-id"];
37874
38201
  if (!id) {
37875
- failValidation3("Scheduled action ID is required.");
38202
+ failValidation4("Scheduled action ID is required.");
37876
38203
  }
37877
38204
  validateScheduledActionRef(id);
37878
38205
  const env = getEnv();
37879
38206
  const chatId = typeof args.chat === "string" && args.chat.length > 0 ? args.chat : env.BAKER_CHAT_ID;
37880
38207
  if (isTempScheduledActionId(id) && !chatId) {
37881
- failValidation3("BAKER_CHAT_ID or --chat is required to get a temp scheduled action ID.");
38208
+ failValidation4("BAKER_CHAT_ID or --chat is required to get a temp scheduled action ID.");
37882
38209
  }
37883
38210
  const body = { id };
37884
38211
  if (chatId) {
@@ -37887,13 +38214,13 @@ var getCommand3 = defineCommand167({
37887
38214
  const response = await apiPost("/api/scheduled-actions/get", body);
37888
38215
  writeJson(response);
37889
38216
  } catch (err) {
37890
- failApi2(err);
38217
+ failApi3(err);
37891
38218
  }
37892
38219
  }
37893
38220
  });
37894
38221
 
37895
38222
  // src/commands/scheduled-actions/list.ts
37896
- import { defineCommand as defineCommand168 } from "citty";
38223
+ import { defineCommand as defineCommand171 } from "citty";
37897
38224
  registerSchema({
37898
38225
  command: "scheduled-actions.list",
37899
38226
  description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set, or --chat <id> to read an earlier chat's staged schedules instead.",
@@ -37901,7 +38228,7 @@ registerSchema({
37901
38228
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
37902
38229
  }
37903
38230
  });
37904
- var listCommand14 = defineCommand168({
38231
+ var listCommand15 = defineCommand171({
37905
38232
  meta: {
37906
38233
  name: "list",
37907
38234
  description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set, or --chat <id> to read an earlier chat's staged schedules instead."
@@ -37918,13 +38245,13 @@ var listCommand14 = defineCommand168({
37918
38245
  const response = await apiPost("/api/scheduled-actions/list", body);
37919
38246
  writeJson(response);
37920
38247
  } catch (err) {
37921
- failApi2(err);
38248
+ failApi3(err);
37922
38249
  }
37923
38250
  }
37924
38251
  });
37925
38252
 
37926
38253
  // src/commands/scheduled-actions/trigger.ts
37927
- import { defineCommand as defineCommand169 } from "citty";
38254
+ import { defineCommand as defineCommand172 } from "citty";
37928
38255
  registerSchema({
37929
38256
  command: "scheduled-actions.trigger",
37930
38257
  description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
@@ -37932,7 +38259,7 @@ registerSchema({
37932
38259
  id: { type: "string", description: "Published scheduled action ID", required: true }
37933
38260
  }
37934
38261
  });
37935
- var triggerCommand = defineCommand169({
38262
+ var triggerCommand = defineCommand172({
37936
38263
  meta: {
37937
38264
  name: "trigger",
37938
38265
  description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
@@ -37949,10 +38276,10 @@ var triggerCommand = defineCommand169({
37949
38276
  try {
37950
38277
  const id = args.id || args["scheduled-action-id"];
37951
38278
  if (!id) {
37952
- failValidation3("Scheduled action ID is required.");
38279
+ failValidation4("Scheduled action ID is required.");
37953
38280
  }
37954
38281
  if (isTempScheduledActionId(id)) {
37955
- failValidation3("trigger requires a published scheduled action ID, not temp_sched_*.");
38282
+ failValidation4("trigger requires a published scheduled action ID, not temp_sched_*.");
37956
38283
  }
37957
38284
  validateConvexId(id);
37958
38285
  const env = getEnv();
@@ -37963,13 +38290,13 @@ var triggerCommand = defineCommand169({
37963
38290
  const response = await apiPost("/api/scheduled-actions/trigger", body);
37964
38291
  writeJson(response);
37965
38292
  } catch (err) {
37966
- failApi2(err);
38293
+ failApi3(err);
37967
38294
  }
37968
38295
  }
37969
38296
  });
37970
38297
 
37971
38298
  // src/commands/scheduled-actions/update.ts
37972
- import { defineCommand as defineCommand170 } from "citty";
38299
+ import { defineCommand as defineCommand173 } from "citty";
37973
38300
  registerSchema({
37974
38301
  command: "scheduled-actions.update",
37975
38302
  description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
@@ -37994,7 +38321,7 @@ registerSchema({
37994
38321
  prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
37995
38322
  }
37996
38323
  });
37997
- var updateCommand2 = defineCommand170({
38324
+ var updateCommand2 = defineCommand173({
37998
38325
  meta: {
37999
38326
  name: "update",
38000
38327
  description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
@@ -38019,7 +38346,7 @@ var updateCommand2 = defineCommand170({
38019
38346
  try {
38020
38347
  const id = args.id || args["scheduled-action-id"];
38021
38348
  if (!id) {
38022
- failValidation3("Scheduled action ID is required.");
38349
+ failValidation4("Scheduled action ID is required.");
38023
38350
  }
38024
38351
  validateScheduledActionRef(id);
38025
38352
  const body = { id };
@@ -38051,7 +38378,7 @@ var updateCommand2 = defineCommand170({
38051
38378
  hasPatch = true;
38052
38379
  }
38053
38380
  if (!hasPatch) {
38054
- failValidation3(
38381
+ failValidation4(
38055
38382
  "Provide at least one of --name, --description, --cron, --run-at, --timezone, --enabled, --spawn-agent, --prompt."
38056
38383
  );
38057
38384
  }
@@ -38059,13 +38386,13 @@ var updateCommand2 = defineCommand170({
38059
38386
  await apiPost("/api/scheduled-actions/update", body);
38060
38387
  writeOk2();
38061
38388
  } catch (err) {
38062
- failApi2(err);
38389
+ failApi3(err);
38063
38390
  }
38064
38391
  }
38065
38392
  });
38066
38393
 
38067
38394
  // src/commands/scheduled-actions/index.ts
38068
- var scheduledActionsCommand = defineCommand171({
38395
+ var scheduledActionsCommand = defineCommand174({
38069
38396
  meta: {
38070
38397
  name: "scheduled-actions",
38071
38398
  description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger.
@@ -38082,7 +38409,7 @@ Examples:
38082
38409
  Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
38083
38410
  },
38084
38411
  subCommands: {
38085
- list: listCommand14,
38412
+ list: listCommand15,
38086
38413
  get: getCommand3,
38087
38414
  create: createCommand2,
38088
38415
  update: updateCommand2,
@@ -38092,14 +38419,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
38092
38419
  });
38093
38420
 
38094
38421
  // src/commands/schema.ts
38095
- import { defineCommand as defineCommand172 } from "citty";
38422
+ import { defineCommand as defineCommand175 } from "citty";
38096
38423
  function narrowToFamily(commandName, available) {
38097
38424
  const segments = commandName.split(".");
38098
38425
  const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
38099
38426
  const siblings = available.filter((name) => name.startsWith(prefix));
38100
38427
  return siblings.length > 0 ? siblings : available;
38101
38428
  }
38102
- var schemaCommand = defineCommand172({
38429
+ var schemaCommand = defineCommand175({
38103
38430
  meta: {
38104
38431
  name: "schema",
38105
38432
  description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
@@ -38143,10 +38470,10 @@ var schemaCommand = defineCommand172({
38143
38470
  });
38144
38471
 
38145
38472
  // src/commands/studio/index.ts
38146
- import { defineCommand as defineCommand181 } from "citty";
38473
+ import { defineCommand as defineCommand184 } from "citty";
38147
38474
 
38148
38475
  // src/commands/studio/animate.ts
38149
- import { defineCommand as defineCommand173 } from "citty";
38476
+ import { defineCommand as defineCommand176 } from "citty";
38150
38477
 
38151
38478
  // src/commands/studio/batch.ts
38152
38479
  function projectBatch(generation, full) {
@@ -38591,7 +38918,7 @@ function costHintsFor(body) {
38591
38918
  }
38592
38919
  return hints;
38593
38920
  }
38594
- var animateCommand = defineCommand173({
38921
+ var animateCommand = defineCommand176({
38595
38922
  meta: {
38596
38923
  name: "animate",
38597
38924
  description: "Render a clip. With an image the look is already fixed, so the prompt describes MOVEMENT \u2014 what the camera does, what the subject does, in what order. With --from text there is no image and the prompt is the whole shot.\n\nA rendered clip is NOT usable anywhere until you keep it: `baker studio keep <id> --slot N` is what puts it in the video library. Takes nobody keeps are never ingested, which is what makes a rejected batch cheap.\n\nFor anything longer than 15 seconds, or to build on footage that already exists, use --model bytedance/seedance-2.5: it renders 4-30s and is the only model that reads an existing clip or an existing soundtrack.\n\nExamples:\n baker studio animate 'slow push in, model turns to camera and smiles' --image j57abc123def456ghi789\n baker studio animate 'handheld drift right, steam rising from the cup' --image './out/hero.png' --duration 6 --quality 1080p\n baker studio animate 'product rotates once on a turntable' --image j57abc\u2026,j57def\u2026 --from references\n baker studio animate 'she keeps walking, camera stays with her, then she stops and looks up' --image j57abc\u2026 --from references --from-clip j57batch\u2026:0 --model bytedance/seedance-2.5 --duration 20\n baker studio animate 'hold on the product, then a slow push-in' --from references --from-video j57vid\u2026 --model bytedance/seedance-2.5\n baker studio animate 'slow drone pull-back over a solar farm at golden hour, no people' --from text --model bytedance/seedance-2.5 --duration 12"
@@ -38710,7 +39037,7 @@ var animateCommand = defineCommand173({
38710
39037
  });
38711
39038
 
38712
39039
  // src/commands/studio/generate.ts
38713
- import { defineCommand as defineCommand174 } from "citty";
39040
+ import { defineCommand as defineCommand177 } from "citty";
38714
39041
  var MODEL_LIST2 = IMAGE_MODEL_IDS;
38715
39042
  var DEFAULT_MAX_WAIT_MS2 = 24e4;
38716
39043
  registerSchema({
@@ -38840,7 +39167,7 @@ function buildGenerateBody(args, prompt) {
38840
39167
  }
38841
39168
  return body;
38842
39169
  }
38843
- var generateCommand = defineCommand174({
39170
+ var generateCommand = defineCommand177({
38844
39171
  meta: {
38845
39172
  name: "generate",
38846
39173
  description: "Start here to make an image. Renders 1-8 takes of one brief, ingests each into the media library as it lands, and shows the batch in the dashboard Studio next to the ones the client ran.\n\nModel choice: google/gemini-3.1-flash-image-preview (default \u2014 fast, best at editing a reference and at extreme ratios), google/gemini-3-pro-image-preview (highest fidelity, slower), openai/gpt-image-2 (photoreal and the cleanest in-image text \u2014 no --image-size, no 4:5 / 5:4), recraft/recraft-v4.1-pro-vector (vector/flat marks with palette control).\n\n--reference is the biggest quality lever there is: a real logo, product shot, Pinterest pin or sandbox screenshot beats any amount of adjectives.\n\nExamples:\n baker studio generate 'matte black bottle on wet marble, hard studio light, 35mm' --aspect-ratio 3:2 --count 3\n baker studio generate 'this bottle on a sunlit kitchen counter' --reference './src/brand/product.png,https://\u2026/kitchen.jpg'\n baker studio generate 'founder-style selfie, kitchen background, natural light' --skill ugc-selfie-hook\n baker studio generate 'flat geometric mascot, brand palette' --model recraft/recraft-v4.1-pro-vector --rgb-colors '[[10,10,10],[255,80,0]]'"
@@ -38918,7 +39245,7 @@ var generateCommand = defineCommand174({
38918
39245
  });
38919
39246
 
38920
39247
  // src/commands/studio/get.ts
38921
- import { defineCommand as defineCommand175 } from "citty";
39248
+ import { defineCommand as defineCommand178 } from "citty";
38922
39249
  registerSchema({
38923
39250
  command: "studio.get",
38924
39251
  description: "Read one Studio batch: every take, where it lives, and why a take is missing. This is how you pick up a batch that was still rendering when the start command returned.",
@@ -38927,7 +39254,7 @@ registerSchema({
38927
39254
  full: { type: "boolean", description: "Include settings, references and attribution", required: false }
38928
39255
  }
38929
39256
  });
38930
- var getCommand4 = defineCommand175({
39257
+ var getCommand4 = defineCommand178({
38931
39258
  meta: {
38932
39259
  name: "get",
38933
39260
  description: "Read one Studio batch \u2014 the takes, their urls, whether each is in the library, and the reason for any that failed.\n\nExample: baker studio get j57abc123def456ghi789\nExample: baker studio get j57abc123def456ghi789 --full"
@@ -38956,7 +39283,7 @@ var getCommand4 = defineCommand175({
38956
39283
  });
38957
39284
 
38958
39285
  // src/commands/studio/improve.ts
38959
- import { defineCommand as defineCommand176 } from "citty";
39286
+ import { defineCommand as defineCommand179 } from "citty";
38960
39287
  var DESCRIPTION = "Sharpen a rough brief into directed art direction \u2014 the same rewrite the client gets from the wand in the Studio prompt bar. Reach for it when you are relaying the CLIENT's own words and want them shaped without substituting your voice; when you are writing the art direction yourself, just write it, because you will do a better job than this does.";
38961
39288
  registerSchema({
38962
39289
  command: "studio.improve",
@@ -38981,7 +39308,7 @@ registerSchema({
38981
39308
  }
38982
39309
  }
38983
39310
  });
38984
- var improveCommand = defineCommand176({
39311
+ var improveCommand = defineCommand179({
38985
39312
  meta: {
38986
39313
  name: "improve",
38987
39314
  description: `${DESCRIPTION}
@@ -39025,7 +39352,7 @@ Examples:
39025
39352
  });
39026
39353
 
39027
39354
  // src/commands/studio/keep.ts
39028
- import { defineCommand as defineCommand177 } from "citty";
39355
+ import { defineCommand as defineCommand180 } from "citty";
39029
39356
  registerSchema({
39030
39357
  command: "studio.keep",
39031
39358
  description: "Mark one take as the keeper. For an image this stars it, so the client reviewing the batch sees which one you used. For a CLIP it is the step that puts it in the video library \u2014 until then the clip cannot be used in a canvas, a landing, or an ad.",
@@ -39035,7 +39362,7 @@ registerSchema({
39035
39362
  undo: { type: "boolean", description: "Un-star an image, or take a kept clip back out", required: false }
39036
39363
  }
39037
39364
  });
39038
- var keepCommand = defineCommand177({
39365
+ var keepCommand = defineCommand180({
39039
39366
  meta: {
39040
39367
  name: "keep",
39041
39368
  description: "Mark one take as the keeper. An image gets starred (it was already in the library); a clip gets INGESTED into the video library, which is what makes it usable anywhere else.\n\nExample: baker studio keep j57abc123def456ghi789 --slot 2\nExample: baker studio keep j57abc123def456ghi789 --slot 2 --undo"
@@ -39086,7 +39413,7 @@ var keepCommand = defineCommand177({
39086
39413
  });
39087
39414
 
39088
39415
  // src/commands/studio/list.ts
39089
- import { defineCommand as defineCommand178 } from "citty";
39416
+ import { defineCommand as defineCommand181 } from "citty";
39090
39417
  registerSchema({
39091
39418
  command: "studio.list",
39092
39419
  description: "Recent Studio batches for THIS conversation, newest first \u2014 what you have already generated, so you re-use a take instead of paying for it twice. `--all` widens it to everything the company generated, including what people ran themselves in the dashboard.",
@@ -39097,7 +39424,7 @@ registerSchema({
39097
39424
  full: { type: "boolean", description: "Include settings, references and attribution", required: false }
39098
39425
  }
39099
39426
  });
39100
- var listCommand15 = defineCommand178({
39427
+ var listCommand16 = defineCommand181({
39101
39428
  meta: {
39102
39429
  name: "list",
39103
39430
  description: "Recent Studio batches, newest first. Scoped to this conversation unless you pass --all.\n\nExample: baker studio list\nExample: baker studio list --kind video --limit 5\nExample: baker studio list --all # includes batches the client ran in the dashboard"
@@ -39131,7 +39458,7 @@ var listCommand15 = defineCommand178({
39131
39458
  });
39132
39459
 
39133
39460
  // src/commands/studio/models.ts
39134
- import { defineCommand as defineCommand179 } from "citty";
39461
+ import { defineCommand as defineCommand182 } from "citty";
39135
39462
  var DESCRIPTION2 = "What each Studio model actually accepts: its shapes, resolutions, clip lengths, prompt character cap, how many reference images it takes, and which knobs it has. Read this before a batch you care about \u2014 the models disagree far more than they look like they do, and a setting the chosen model does not have is REFUSED, not ignored.";
39136
39463
  registerSchema({
39137
39464
  command: "studio.models",
@@ -39218,7 +39545,7 @@ function buildModelCards(kind, model) {
39218
39545
  const selected = model ? ids.filter((id) => id === model) : ids;
39219
39546
  return selected.map((id) => build(id));
39220
39547
  }
39221
- var modelsCommand = defineCommand179({
39548
+ var modelsCommand = defineCommand182({
39222
39549
  meta: {
39223
39550
  name: "models",
39224
39551
  description: `${DESCRIPTION2}
@@ -39265,13 +39592,13 @@ Examples:
39265
39592
  });
39266
39593
 
39267
39594
  // src/commands/studio/skills.ts
39268
- import { defineCommand as defineCommand180 } from "citty";
39595
+ import { defineCommand as defineCommand183 } from "citty";
39269
39596
  registerSchema({
39270
39597
  command: "studio.skills",
39271
39598
  description: "The craft directions `studio generate --skill <id>` accepts. Each one carries directed art direction plus the model, shape and take count it wants, so you pick a look by name instead of writing the boilerplate yourself.",
39272
39599
  args: {}
39273
39600
  });
39274
- var skillsCommand = defineCommand180({
39601
+ var skillsCommand = defineCommand183({
39275
39602
  meta: {
39276
39603
  name: "skills",
39277
39604
  description: "List the craft directions available to `baker studio generate --skill <id>` \u2014 what each one is for, whether it wants a reference image, and the model/shape/count it defaults to.\n\nExample: baker studio skills"
@@ -39295,7 +39622,7 @@ var skillsCommand = defineCommand180({
39295
39622
  });
39296
39623
 
39297
39624
  // src/commands/studio/index.ts
39298
- var studioCommand = defineCommand181({
39625
+ var studioCommand = defineCommand184({
39299
39626
  meta: {
39300
39627
  name: "studio",
39301
39628
  description: `Make new imagery and clips. Every batch is recorded and shows up in the dashboard Studio for the client to review, labelled with this conversation.
@@ -39329,7 +39656,7 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
39329
39656
  generate: generateCommand,
39330
39657
  animate: animateCommand,
39331
39658
  get: getCommand4,
39332
- list: listCommand15,
39659
+ list: listCommand16,
39333
39660
  keep: keepCommand,
39334
39661
  models: modelsCommand,
39335
39662
  skills: skillsCommand,
@@ -39338,14 +39665,14 @@ Full guide: __tooling__/docs/tools/baker/studio.md`
39338
39665
  });
39339
39666
 
39340
39667
  // src/commands/tag-manager/index.ts
39341
- import { defineCommand as defineCommand185 } from "citty";
39668
+ import { defineCommand as defineCommand188 } from "citty";
39342
39669
 
39343
39670
  // src/commands/tag-manager/draft.ts
39344
- import { defineCommand as defineCommand182 } from "citty";
39671
+ import { defineCommand as defineCommand185 } from "citty";
39345
39672
 
39346
39673
  // src/commands/tag-manager/shared.ts
39347
39674
  import { readFileSync as readFileSync13 } from "fs";
39348
- function failValidation4(message) {
39675
+ function failValidation5(message) {
39349
39676
  writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
39350
39677
  process.exit(1);
39351
39678
  }
@@ -39353,7 +39680,7 @@ function requireTarget5(args, entity) {
39353
39680
  const positional = Array.isArray(args._) ? args._[0] : void 0;
39354
39681
  const target = args.id ?? args.target ?? positional;
39355
39682
  if (typeof target !== "string" || target.length === 0) {
39356
- failValidation4(`pass the ${entity} id or path as the positional argument`);
39683
+ failValidation5(`pass the ${entity} id or path as the positional argument`);
39357
39684
  }
39358
39685
  return target;
39359
39686
  }
@@ -39362,16 +39689,16 @@ function loadJsonArg2(args, flag = "json") {
39362
39689
  const file = args.file;
39363
39690
  const raw = typeof file === "string" && file.length > 0 ? readFileSync13(file, "utf8") : typeof inline === "string" && inline.length > 0 ? inline : void 0;
39364
39691
  if (raw === void 0) {
39365
- failValidation4(`pass --${flag} with inline JSON or --file with a path to a JSON file`);
39692
+ failValidation5(`pass --${flag} with inline JSON or --file with a path to a JSON file`);
39366
39693
  }
39367
39694
  try {
39368
39695
  const parsed = JSON.parse(raw);
39369
39696
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
39370
- failValidation4(`--${flag} must be a JSON object`);
39697
+ failValidation5(`--${flag} must be a JSON object`);
39371
39698
  }
39372
39699
  return parsed;
39373
39700
  } catch {
39374
- return failValidation4(`--${flag} is not valid JSON`);
39701
+ return failValidation5(`--${flag} is not valid JSON`);
39375
39702
  }
39376
39703
  }
39377
39704
  var RETRYABLE_CODES2 = /* @__PURE__ */ new Set(["RATE_LIMITED", "INTERNAL_ERROR", "NETWORK_ERROR", "TIMEOUT"]);
@@ -39464,13 +39791,13 @@ registerSchema({
39464
39791
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
39465
39792
  }
39466
39793
  });
39467
- var draftCommand4 = defineCommand182({
39794
+ var draftCommand4 = defineCommand185({
39468
39795
  meta: {
39469
39796
  name: "draft",
39470
39797
  description: "List, show, amend, remove, or clear staged Tag Manager changes for this chat. `list` and `show` take --chat <id> to read an earlier chat's changes instead."
39471
39798
  },
39472
39799
  subCommands: {
39473
- list: defineCommand182({
39800
+ list: defineCommand185({
39474
39801
  meta: {
39475
39802
  name: "list",
39476
39803
  description: "Review everything staged on this chat (--json for the raw envelope)"
@@ -39483,7 +39810,7 @@ var draftCommand4 = defineCommand182({
39483
39810
  await draftList2(args.json === true, args.chat);
39484
39811
  }
39485
39812
  }),
39486
- show: defineCommand182({
39813
+ show: defineCommand185({
39487
39814
  meta: {
39488
39815
  name: "show",
39489
39816
  description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
@@ -39500,7 +39827,7 @@ var draftCommand4 = defineCommand182({
39500
39827
  );
39501
39828
  }
39502
39829
  }),
39503
- amend: defineCommand182({
39830
+ amend: defineCommand185({
39504
39831
  meta: {
39505
39832
  name: "amend",
39506
39833
  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."
@@ -39517,7 +39844,7 @@ var draftCommand4 = defineCommand182({
39517
39844
  });
39518
39845
  }
39519
39846
  }),
39520
- remove: defineCommand182({
39847
+ remove: defineCommand185({
39521
39848
  meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
39522
39849
  args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
39523
39850
  run: async ({ args }) => {
@@ -39526,7 +39853,7 @@ var draftCommand4 = defineCommand182({
39526
39853
  });
39527
39854
  }
39528
39855
  }),
39529
- clear: defineCommand182({
39856
+ clear: defineCommand185({
39530
39857
  meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
39531
39858
  run: async () => {
39532
39859
  await draftAction3("/api/tag-manager/draft/clear", {});
@@ -39536,7 +39863,7 @@ var draftCommand4 = defineCommand182({
39536
39863
  });
39537
39864
 
39538
39865
  // src/commands/tag-manager/read.ts
39539
- import { defineCommand as defineCommand183 } from "citty";
39866
+ import { defineCommand as defineCommand186 } from "citty";
39540
39867
  registerSchema({
39541
39868
  command: "tagManager.containers",
39542
39869
  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.",
@@ -39577,7 +39904,7 @@ function containersHints(containers) {
39577
39904
  }))
39578
39905
  });
39579
39906
  }
39580
- var containersCommand = defineCommand183({
39907
+ var containersCommand = defineCommand186({
39581
39908
  meta: {
39582
39909
  name: "containers",
39583
39910
  description: `List Tag Manager containers reachable by this company's connection.
@@ -39594,7 +39921,7 @@ Start here:
39594
39921
  }
39595
39922
  }
39596
39923
  });
39597
- var readCommand = defineCommand183({
39924
+ var readCommand = defineCommand186({
39598
39925
  meta: {
39599
39926
  name: "read",
39600
39927
  description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
@@ -39636,7 +39963,7 @@ Examples:
39636
39963
  });
39637
39964
 
39638
39965
  // src/commands/tag-manager/write-commands.ts
39639
- import { defineCommand as defineCommand184 } from "citty";
39966
+ import { defineCommand as defineCommand187 } from "citty";
39640
39967
  var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
39641
39968
  var ENTITIES = [
39642
39969
  {
@@ -39692,10 +40019,10 @@ for (const { entity, noun, createHint } of ENTITIES) {
39692
40019
  });
39693
40020
  }
39694
40021
  function entityCommand(entity, noun, example) {
39695
- return defineCommand184({
40022
+ return defineCommand187({
39696
40023
  meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
39697
40024
  subCommands: {
39698
- create: defineCommand184({
40025
+ create: defineCommand187({
39699
40026
  meta: {
39700
40027
  name: "create",
39701
40028
  description: `Stage a new ${noun}
@@ -39717,7 +40044,7 @@ Examples:
39717
40044
  });
39718
40045
  }
39719
40046
  }),
39720
- update: defineCommand184({
40047
+ update: defineCommand187({
39721
40048
  meta: {
39722
40049
  name: "update",
39723
40050
  description: `Stage an update to an existing ${noun} (pass its id or path)`
@@ -39737,7 +40064,7 @@ Examples:
39737
40064
  });
39738
40065
  }
39739
40066
  }),
39740
- delete: defineCommand184({
40067
+ delete: defineCommand187({
39741
40068
  meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
39742
40069
  args: {
39743
40070
  id: { type: "positional", description: `${noun} id or path`, required: false },
@@ -39778,7 +40105,7 @@ function builtinTypes(args) {
39778
40105
  }
39779
40106
  return raw.split(",").map((entry) => entry.trim());
39780
40107
  }
39781
- var builtinCommand = defineCommand184({
40108
+ var builtinCommand = defineCommand187({
39782
40109
  meta: {
39783
40110
  name: "builtin",
39784
40111
  description: `Enable or disable built-in variables
@@ -39788,7 +40115,7 @@ Examples:
39788
40115
  baker tag-manager builtin disable --types formId`
39789
40116
  },
39790
40117
  subCommands: {
39791
- enable: defineCommand184({
40118
+ enable: defineCommand187({
39792
40119
  meta: { name: "enable", description: "Stage enabling built-in variables" },
39793
40120
  args: {
39794
40121
  types: { type: "string", description: "Comma-separated types", required: false },
@@ -39802,7 +40129,7 @@ Examples:
39802
40129
  });
39803
40130
  }
39804
40131
  }),
39805
- disable: defineCommand184({
40132
+ disable: defineCommand187({
39806
40133
  meta: { name: "disable", description: "Stage disabling built-in variables" },
39807
40134
  args: {
39808
40135
  types: { type: "string", description: "Comma-separated types", required: false },
@@ -39820,7 +40147,7 @@ Examples:
39820
40147
  });
39821
40148
 
39822
40149
  // src/commands/tag-manager/index.ts
39823
- var tagManagerCommand = defineCommand185({
40150
+ var tagManagerCommand = defineCommand188({
39824
40151
  meta: {
39825
40152
  name: "tag-manager",
39826
40153
  description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
@@ -39857,10 +40184,10 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
39857
40184
  });
39858
40185
 
39859
40186
  // src/commands/tags/index.ts
39860
- import { defineCommand as defineCommand186 } from "citty";
40187
+ import { defineCommand as defineCommand189 } from "citty";
39861
40188
 
39862
40189
  // src/commands/tags/shared.ts
39863
- function failApi3(err) {
40190
+ function failApi4(err) {
39864
40191
  if (err instanceof ApiError) {
39865
40192
  writeJson({ ok: false, error: { code: err.code, message: err.message } });
39866
40193
  process.exit(1);
@@ -39920,13 +40247,13 @@ async function listTags(json) {
39920
40247
  process.stdout.write(`${response.tags.map(renderEffectiveEntry).join("\n")}
39921
40248
  `);
39922
40249
  } catch (err) {
39923
- failApi3(err);
40250
+ failApi4(err);
39924
40251
  }
39925
40252
  }
39926
40253
  var listArgs9 = {
39927
40254
  json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
39928
40255
  };
39929
- var listCommand16 = defineCommand186({
40256
+ var listCommand17 = defineCommand189({
39930
40257
  meta: {
39931
40258
  name: "list",
39932
40259
  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"
@@ -39942,10 +40269,10 @@ async function listDraft3(chat) {
39942
40269
  const response = await apiPost("/api/tags/draft", { chatId });
39943
40270
  writeJson({ ok: true, data: response });
39944
40271
  } catch (err) {
39945
- failApi3(err);
40272
+ failApi4(err);
39946
40273
  }
39947
40274
  }
39948
- var draftCommand5 = defineCommand186({
40275
+ var draftCommand5 = defineCommand189({
39949
40276
  meta: {
39950
40277
  name: "draft",
39951
40278
  description: "Review the tag changes staged in this chat (read-only). Staged changes were approved via request_tag_input and apply when the chat is published; to amend or drop one, propose a follow-up change through the same tool (a delete on a tag_temp_* ref drops the staged create). Takes --chat <id> to read an earlier chat's staged changes instead."
@@ -39955,7 +40282,7 @@ var draftCommand5 = defineCommand186({
39955
40282
  await listDraft3(args.chat);
39956
40283
  }
39957
40284
  });
39958
- var tagsCommand3 = defineCommand186({
40285
+ var tagsCommand3 = defineCommand189({
39959
40286
  meta: {
39960
40287
  name: "tags",
39961
40288
  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.
@@ -39972,7 +40299,7 @@ Examples:
39972
40299
  Full guide: __tooling__/docs/tools/baker/tags.md`
39973
40300
  },
39974
40301
  subCommands: {
39975
- list: listCommand16,
40302
+ list: listCommand17,
39976
40303
  draft: draftCommand5
39977
40304
  },
39978
40305
  // Bare `baker tags` lists the effective tags. `args` stays so citty knows this
@@ -39984,10 +40311,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
39984
40311
  });
39985
40312
 
39986
40313
  // src/commands/testimonials/index.ts
39987
- import { defineCommand as defineCommand190 } from "citty";
40314
+ import { defineCommand as defineCommand193 } from "citty";
39988
40315
 
39989
40316
  // src/commands/testimonials/get.ts
39990
- import { defineCommand as defineCommand187 } from "citty";
40317
+ import { defineCommand as defineCommand190 } from "citty";
39991
40318
  registerSchema({
39992
40319
  command: "testimonials.get",
39993
40320
  description: "Get a single testimonial by ID",
@@ -39995,7 +40322,7 @@ registerSchema({
39995
40322
  id: { type: "string", description: "Testimonial ID", required: true }
39996
40323
  }
39997
40324
  });
39998
- var getCommand5 = defineCommand187({
40325
+ var getCommand5 = defineCommand190({
39999
40326
  meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
40000
40327
  args: {
40001
40328
  id: { type: "positional", description: "Testimonial ID", required: false },
@@ -40032,7 +40359,7 @@ var getCommand5 = defineCommand187({
40032
40359
  });
40033
40360
 
40034
40361
  // src/commands/testimonials/list.ts
40035
- import { defineCommand as defineCommand188 } from "citty";
40362
+ import { defineCommand as defineCommand191 } from "citty";
40036
40363
  registerSchema({
40037
40364
  command: "testimonials.list",
40038
40365
  description: "List testimonials with optional filters.",
@@ -40062,7 +40389,7 @@ registerSchema({
40062
40389
  limit: { type: "number", description: "Max results (default 50)", required: false, default: 50 }
40063
40390
  }
40064
40391
  });
40065
- var listCommand17 = defineCommand188({
40392
+ var listCommand18 = defineCommand191({
40066
40393
  meta: {
40067
40394
  name: "list",
40068
40395
  description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
@@ -40111,7 +40438,7 @@ var listCommand17 = defineCommand188({
40111
40438
  });
40112
40439
 
40113
40440
  // src/commands/testimonials/search.ts
40114
- import { defineCommand as defineCommand189 } from "citty";
40441
+ import { defineCommand as defineCommand192 } from "citty";
40115
40442
  function languageBiasHint(results, requestedLanguage) {
40116
40443
  if (requestedLanguage) {
40117
40444
  return null;
@@ -40189,7 +40516,7 @@ function buildSearchRequest(query, args) {
40189
40516
  }
40190
40517
  return body;
40191
40518
  }
40192
- var searchCommand3 = defineCommand189({
40519
+ var searchCommand3 = defineCommand192({
40193
40520
  meta: {
40194
40521
  name: "search",
40195
40522
  description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
@@ -40245,7 +40572,7 @@ var searchCommand3 = defineCommand189({
40245
40572
  var tagsCommand4 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
40246
40573
 
40247
40574
  // src/commands/testimonials/index.ts
40248
- var testimonialsCommand = defineCommand190({
40575
+ var testimonialsCommand = defineCommand193({
40249
40576
  meta: {
40250
40577
  name: "testimonials",
40251
40578
  description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
@@ -40261,16 +40588,16 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
40261
40588
  subCommands: {
40262
40589
  get: getCommand5,
40263
40590
  search: searchCommand3,
40264
- list: listCommand17,
40591
+ list: listCommand18,
40265
40592
  tags: tagsCommand4
40266
40593
  }
40267
40594
  });
40268
40595
 
40269
40596
  // src/commands/videos/index.ts
40270
- import { defineCommand as defineCommand196 } from "citty";
40597
+ import { defineCommand as defineCommand199 } from "citty";
40271
40598
 
40272
40599
  // src/commands/videos/delete.ts
40273
- import { defineCommand as defineCommand191 } from "citty";
40600
+ import { defineCommand as defineCommand194 } from "citty";
40274
40601
  registerSchema({
40275
40602
  command: "videos.delete",
40276
40603
  description: "Delete a video by ID",
@@ -40284,7 +40611,7 @@ registerSchema({
40284
40611
  }
40285
40612
  }
40286
40613
  });
40287
- var deleteCommand3 = defineCommand191({
40614
+ var deleteCommand3 = defineCommand194({
40288
40615
  meta: {
40289
40616
  name: "delete",
40290
40617
  description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
@@ -40325,7 +40652,7 @@ var deleteCommand3 = defineCommand191({
40325
40652
  });
40326
40653
 
40327
40654
  // src/commands/videos/get.ts
40328
- import { defineCommand as defineCommand192 } from "citty";
40655
+ import { defineCommand as defineCommand195 } from "citty";
40329
40656
  registerSchema({
40330
40657
  command: "videos.get",
40331
40658
  description: "Get a single video by ID",
@@ -40333,7 +40660,7 @@ registerSchema({
40333
40660
  id: { type: "string", description: "Video ID", required: true }
40334
40661
  }
40335
40662
  });
40336
- var getCommand6 = defineCommand192({
40663
+ var getCommand6 = defineCommand195({
40337
40664
  meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
40338
40665
  args: {
40339
40666
  id: { type: "positional", description: "Video ID", required: false },
@@ -40370,7 +40697,7 @@ var getCommand6 = defineCommand192({
40370
40697
  });
40371
40698
 
40372
40699
  // src/commands/videos/group.ts
40373
- import { defineCommand as defineCommand193 } from "citty";
40700
+ import { defineCommand as defineCommand196 } from "citty";
40374
40701
  registerSchema({
40375
40702
  command: "videos.group",
40376
40703
  description: "List every clip and image that arrived in the same set as this video (carousel slides, one page)",
@@ -40379,7 +40706,7 @@ registerSchema({
40379
40706
  "group-key": { type: "string", description: "The set key directly, when you already have it", required: false }
40380
40707
  }
40381
40708
  });
40382
- var groupCommand2 = defineCommand193({
40709
+ var groupCommand2 = defineCommand196({
40383
40710
  meta: {
40384
40711
  name: "group",
40385
40712
  description: "List every asset that arrived in the same set as this clip \u2014 the other slides of the Instagram post it came from, stills included. A carousel is authored to be read in order, so a clip pulled out of one is usually missing half its meaning. Example: baker videos group <videoId>"
@@ -40399,7 +40726,7 @@ var groupCommand2 = defineCommand193({
40399
40726
  });
40400
40727
 
40401
40728
  // src/commands/videos/search.ts
40402
- import { defineCommand as defineCommand194 } from "citty";
40729
+ import { defineCommand as defineCommand197 } from "citty";
40403
40730
  registerSchema({
40404
40731
  command: "videos.search",
40405
40732
  description: "Search videos by text query. Only returns ready videos.",
@@ -40409,7 +40736,7 @@ registerSchema({
40409
40736
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
40410
40737
  }
40411
40738
  });
40412
- var searchCommand4 = defineCommand194({
40739
+ var searchCommand4 = defineCommand197({
40413
40740
  meta: {
40414
40741
  name: "search",
40415
40742
  description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
@@ -40461,7 +40788,7 @@ var tagsCommand5 = makeTagsCommand("videos", "video", "/api/videos/tags");
40461
40788
  // src/commands/videos/upload.ts
40462
40789
  import { readFile as readFile24, stat as stat7 } from "fs/promises";
40463
40790
  import { basename as basename2, extname as extname3 } from "path";
40464
- import { defineCommand as defineCommand195 } from "citty";
40791
+ import { defineCommand as defineCommand198 } from "citty";
40465
40792
  var MIME_MAP = {
40466
40793
  ".mp4": "video/mp4",
40467
40794
  ".mov": "video/quicktime",
@@ -40500,7 +40827,7 @@ function detectContentType(filePath) {
40500
40827
  }
40501
40828
  return mime;
40502
40829
  }
40503
- var uploadCommand2 = defineCommand195({
40830
+ var uploadCommand2 = defineCommand198({
40504
40831
  meta: {
40505
40832
  name: "upload",
40506
40833
  description: "Upload a video file to Baker via Mux direct upload. Auto-detects content type. Example: baker videos upload ./demo.mp4"
@@ -40570,7 +40897,7 @@ var uploadCommand2 = defineCommand195({
40570
40897
  });
40571
40898
 
40572
40899
  // src/commands/videos/index.ts
40573
- var videosCommand = defineCommand196({
40900
+ var videosCommand = defineCommand199({
40574
40901
  meta: {
40575
40902
  name: "videos",
40576
40903
  description: `Find and manage videos in Baker. Subcommands: search, get, upload, delete, tags.
@@ -40595,10 +40922,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
40595
40922
  });
40596
40923
 
40597
40924
  // src/commands/winning-ads/index.ts
40598
- import { defineCommand as defineCommand209 } from "citty";
40925
+ import { defineCommand as defineCommand212 } from "citty";
40599
40926
 
40600
40927
  // src/commands/winning-ads/advertisers.ts
40601
- import { defineCommand as defineCommand197 } from "citty";
40928
+ import { defineCommand as defineCommand200 } from "citty";
40602
40929
 
40603
40930
  // src/commands/winning-ads/shared.ts
40604
40931
  function splitList2(value) {
@@ -40651,7 +40978,7 @@ function advertiserNormalizer(record, full) {
40651
40978
  last_synced_at: record.last_synced_at ?? null
40652
40979
  };
40653
40980
  }
40654
- var advertisersCommand2 = defineCommand197({
40981
+ var advertisersCommand2 = defineCommand200({
40655
40982
  meta: {
40656
40983
  name: "advertisers",
40657
40984
  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'
@@ -40709,7 +41036,7 @@ var advertisersCommand2 = defineCommand197({
40709
41036
  });
40710
41037
 
40711
41038
  // src/commands/winning-ads/brief.ts
40712
- import { defineCommand as defineCommand198 } from "citty";
41039
+ import { defineCommand as defineCommand201 } from "citty";
40713
41040
  registerSchema({
40714
41041
  command: "winning-ads.brief",
40715
41042
  description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
@@ -40755,7 +41082,7 @@ function parseDna(raw) {
40755
41082
  }
40756
41083
  return parsed;
40757
41084
  }
40758
- var briefCommand = defineCommand198({
41085
+ var briefCommand = defineCommand201({
40759
41086
  meta: {
40760
41087
  name: "brief",
40761
41088
  description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
@@ -40791,7 +41118,7 @@ var briefCommand = defineCommand198({
40791
41118
  });
40792
41119
 
40793
41120
  // src/commands/winning-ads/content.ts
40794
- import { defineCommand as defineCommand199 } from "citty";
41121
+ import { defineCommand as defineCommand202 } from "citty";
40795
41122
  registerSchema({
40796
41123
  command: "winning-ads.content",
40797
41124
  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.",
@@ -40804,7 +41131,7 @@ registerSchema({
40804
41131
  }
40805
41132
  }
40806
41133
  });
40807
- var contentCommand = defineCommand199({
41134
+ var contentCommand = defineCommand202({
40808
41135
  meta: {
40809
41136
  name: "content",
40810
41137
  description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
@@ -40853,7 +41180,7 @@ var contentCommand = defineCommand199({
40853
41180
  });
40854
41181
 
40855
41182
  // src/commands/winning-ads/feed.ts
40856
- import { defineCommand as defineCommand200 } from "citty";
41183
+ import { defineCommand as defineCommand203 } from "citty";
40857
41184
  function buildFeedParams(input) {
40858
41185
  const params = {};
40859
41186
  const advertiser = splitList2(input.advertiser);
@@ -40905,7 +41232,7 @@ registerSchema({
40905
41232
  format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
40906
41233
  }
40907
41234
  });
40908
- var feedCommand = defineCommand200({
41235
+ var feedCommand = defineCommand203({
40909
41236
  meta: {
40910
41237
  name: "feed",
40911
41238
  description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
@@ -40990,7 +41317,7 @@ var feedCommand = defineCommand200({
40990
41317
  });
40991
41318
 
40992
41319
  // src/commands/winning-ads/follow.ts
40993
- import { defineCommand as defineCommand201 } from "citty";
41320
+ import { defineCommand as defineCommand204 } from "citty";
40994
41321
  var PLATFORMS = ["meta", "linkedin"];
40995
41322
  registerSchema({
40996
41323
  command: "winning-ads.follow",
@@ -41005,7 +41332,7 @@ registerSchema({
41005
41332
  label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
41006
41333
  }
41007
41334
  });
41008
- var followCommand = defineCommand201({
41335
+ var followCommand = defineCommand204({
41009
41336
  meta: {
41010
41337
  name: "follow",
41011
41338
  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'
@@ -41052,7 +41379,7 @@ var followCommand = defineCommand201({
41052
41379
  });
41053
41380
 
41054
41381
  // src/commands/winning-ads/follow-competitors.ts
41055
- import { defineCommand as defineCommand202 } from "citty";
41382
+ import { defineCommand as defineCommand205 } from "citty";
41056
41383
  var PLATFORMS2 = ["meta", "linkedin"];
41057
41384
  var BATCH_TIMEOUT_MS = 3e5;
41058
41385
  function buildFollowBatchBody(input) {
@@ -41085,7 +41412,7 @@ registerSchema({
41085
41412
  }
41086
41413
  }
41087
41414
  });
41088
- var followCompetitorsCommand = defineCommand202({
41415
+ var followCompetitorsCommand = defineCommand205({
41089
41416
  meta: {
41090
41417
  name: "follow-competitors",
41091
41418
  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"'
@@ -41160,7 +41487,7 @@ var followCompetitorsCommand = defineCommand202({
41160
41487
  });
41161
41488
 
41162
41489
  // src/commands/winning-ads/following.ts
41163
- import { defineCommand as defineCommand203 } from "citty";
41490
+ import { defineCommand as defineCommand206 } from "citty";
41164
41491
  registerSchema({
41165
41492
  command: "winning-ads.following",
41166
41493
  description: "List the brands you follow in your ad-dna library, with each one's status (ready vs still adding) and cached ad counts.",
@@ -41193,7 +41520,7 @@ function followingNormalizer(record, full) {
41193
41520
  platforms: Array.isArray(record.platforms) ? record.platforms : []
41194
41521
  };
41195
41522
  }
41196
- var followingCommand = defineCommand203({
41523
+ var followingCommand = defineCommand206({
41197
41524
  meta: {
41198
41525
  name: "following",
41199
41526
  description: "List brands you follow, with status (ready / adding\u2026) and cached counts. Example: baker winning-ads following --output md"
@@ -41228,7 +41555,7 @@ var followingCommand = defineCommand203({
41228
41555
  });
41229
41556
 
41230
41557
  // src/commands/winning-ads/patterns.ts
41231
- import { defineCommand as defineCommand204 } from "citty";
41558
+ import { defineCommand as defineCommand207 } from "citty";
41232
41559
  registerSchema({
41233
41560
  command: "winning-ads.patterns",
41234
41561
  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.",
@@ -41267,7 +41594,7 @@ function discriminatorRow(record) {
41267
41594
  top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
41268
41595
  };
41269
41596
  }
41270
- var patternsCommand = defineCommand204({
41597
+ var patternsCommand = defineCommand207({
41271
41598
  meta: {
41272
41599
  name: "patterns",
41273
41600
  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"
@@ -41323,7 +41650,7 @@ var patternsCommand = defineCommand204({
41323
41650
  });
41324
41651
 
41325
41652
  // src/commands/winning-ads/search.ts
41326
- import { defineCommand as defineCommand205 } from "citty";
41653
+ import { defineCommand as defineCommand208 } from "citty";
41327
41654
  registerSchema({
41328
41655
  command: "winning-ads.search",
41329
41656
  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.",
@@ -41431,7 +41758,7 @@ function buildSearchBody2(args) {
41431
41758
  }
41432
41759
  return body;
41433
41760
  }
41434
- var searchCommand5 = defineCommand205({
41761
+ var searchCommand5 = defineCommand208({
41435
41762
  meta: {
41436
41763
  name: "search",
41437
41764
  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"
@@ -41546,7 +41873,7 @@ var searchCommand5 = defineCommand205({
41546
41873
  });
41547
41874
 
41548
41875
  // src/commands/winning-ads/seeds.ts
41549
- import { defineCommand as defineCommand206 } from "citty";
41876
+ import { defineCommand as defineCommand209 } from "citty";
41550
41877
  function leanRow(r) {
41551
41878
  return {
41552
41879
  key: r.key,
@@ -41574,7 +41901,7 @@ function makeSeedCommand(opts) {
41574
41901
  limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
41575
41902
  }
41576
41903
  });
41577
- return defineCommand206({
41904
+ return defineCommand209({
41578
41905
  meta: { name: opts.name, description: opts.description },
41579
41906
  args: {
41580
41907
  platform: { type: "string", description: "Single platform to segment on", required: false },
@@ -41623,7 +41950,7 @@ var formatsCommand = makeSeedCommand({
41623
41950
  });
41624
41951
 
41625
41952
  // src/commands/winning-ads/unfollow.ts
41626
- import { defineCommand as defineCommand207 } from "citty";
41953
+ import { defineCommand as defineCommand210 } from "citty";
41627
41954
  registerSchema({
41628
41955
  command: "winning-ads.unfollow",
41629
41956
  description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
@@ -41631,7 +41958,7 @@ registerSchema({
41631
41958
  advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
41632
41959
  }
41633
41960
  });
41634
- var unfollowCommand = defineCommand207({
41961
+ var unfollowCommand = defineCommand210({
41635
41962
  meta: {
41636
41963
  name: "unfollow",
41637
41964
  description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
@@ -41652,7 +41979,7 @@ var unfollowCommand = defineCommand207({
41652
41979
  });
41653
41980
 
41654
41981
  // src/commands/winning-ads/winners.ts
41655
- import { defineCommand as defineCommand208 } from "citty";
41982
+ import { defineCommand as defineCommand211 } from "citty";
41656
41983
  registerSchema({
41657
41984
  command: "winning-ads.winners",
41658
41985
  description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
@@ -41662,7 +41989,7 @@ registerSchema({
41662
41989
  platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
41663
41990
  }
41664
41991
  });
41665
- var winnersCommand = defineCommand208({
41992
+ var winnersCommand = defineCommand211({
41666
41993
  meta: {
41667
41994
  name: "winners",
41668
41995
  description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
@@ -41712,7 +42039,7 @@ var winnersCommand = defineCommand208({
41712
42039
  });
41713
42040
 
41714
42041
  // src/commands/winning-ads/index.ts
41715
- var winningAdsCommand = defineCommand209({
42042
+ var winningAdsCommand = defineCommand212({
41716
42043
  meta: {
41717
42044
  name: "winning-ads",
41718
42045
  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.
@@ -41784,7 +42111,7 @@ function getCliVersion() {
41784
42111
  }
41785
42112
 
41786
42113
  // src/cli.ts
41787
- var main = defineCommand210({
42114
+ var main = defineCommand213({
41788
42115
  meta: {
41789
42116
  name: "baker",
41790
42117
  version: getCliVersion(),
@@ -41799,6 +42126,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
41799
42126
  subCommands: {
41800
42127
  capabilities: capabilitiesCommand,
41801
42128
  actions: actionsCommand,
42129
+ agents: agentsCommand,
41802
42130
  "scheduled-actions": scheduledActionsCommand,
41803
42131
  ads: adsCommand2,
41804
42132
  brand: brandCommand,