@koda-sl/baker-cli 0.92.1 → 0.94.0

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
@@ -12,10 +12,10 @@ import {
12
12
  } from "./chunk-RCPMJKI7.js";
13
13
 
14
14
  // src/cli.ts
15
- import { defineCommand as defineCommand141, runMain } from "citty";
15
+ import { defineCommand as defineCommand143, runMain } from "citty";
16
16
 
17
17
  // src/commands/actions/index.ts
18
- import { defineCommand as defineCommand12 } from "citty";
18
+ import { defineCommand as defineCommand13 } from "citty";
19
19
 
20
20
  // src/commands/actions/claim.ts
21
21
  import { defineCommand } from "citty";
@@ -465,6 +465,22 @@ function generateTempId() {
465
465
  function isTempId(id) {
466
466
  return id.startsWith("temp_");
467
467
  }
468
+ var SCHEDULE_SIGNALS = [
469
+ /\brecurr(?:ing|ence)\b/i,
470
+ /\bcadence\b/i,
471
+ /\bcron\b/i,
472
+ /\bschedule[ds]?\b/i,
473
+ /\b(?:daily|weekly|monthly|quarterly|annual(?:ly)?|biweekly|nightly)\b/i,
474
+ /\bevery\s+(?:day|week|month|quarter|year|morning|monday|tuesday|wednesday|thursday|friday|saturday|sunday|\d)/i,
475
+ /\beach\s+(?:day|week|month|monday|tuesday|wednesday|thursday|friday|saturday|sunday)\b/i,
476
+ /\bremind(?:er|s)?\b/i,
477
+ /\brun\s+at\b/i
478
+ ];
479
+ function looksScheduled(name, description) {
480
+ const haystack = `${name}
481
+ ${description}`;
482
+ return SCHEDULE_SIGNALS.some((re) => re.test(haystack));
483
+ }
468
484
 
469
485
  // src/commands/actions/claim.ts
470
486
  registerSchema({
@@ -509,7 +525,7 @@ var claimCommand = defineCommand({
509
525
  import { defineCommand as defineCommand2 } from "citty";
510
526
  registerSchema({
511
527
  command: "actions.complete",
512
- description: "Stage completion of an action. Accepts a real action ID (must be claimed) or a temp ID from the same draft. The action becomes completed when the chat is published.",
528
+ description: "Stage completion of an action (it was DONE). Accepts a real action ID (must be claimed) or a temp ID from the same draft. The action becomes completed when the chat is published. Do NOT use this to drop an action you no longer want \u2014 to remove a staged op use `actions draft remove`, to close an unwanted published action use `actions discard`.",
513
529
  args: {
514
530
  id: { type: "string", description: "Action ID or temp ID", required: true },
515
531
  note: { type: "string", description: "What was done \u2014 context for the team and AI", required: false }
@@ -583,6 +599,11 @@ var createCommand = defineCommand3({
583
599
  description: args.description ?? ""
584
600
  });
585
601
  const hints = [];
602
+ if (looksScheduled(name, args.description ?? "")) {
603
+ hints.push(
604
+ 'This reads as recurring/scheduled work. If it should run on a cadence or a future date, create a Scheduled Action instead \u2014 baker scheduled-actions create --cron "0 9 * * MON" (or --run-at). Do NOT capture "set up a scheduled action" as a Work Action.'
605
+ );
606
+ }
586
607
  hints.push(`Link dependencies: baker actions link --blocker <id> --blocked ${tempId}`);
587
608
  if (!args.description) {
588
609
  hints.push("Add description: baker actions update <tempId> --description '...' (what/why/where/done-when)");
@@ -634,8 +655,133 @@ var discardCommand = defineCommand4({
634
655
  }
635
656
  });
636
657
 
637
- // src/commands/actions/get.ts
658
+ // src/commands/actions/draft.ts
638
659
  import { defineCommand as defineCommand5 } from "citty";
660
+ var REMOVE_OP_KINDS = ["update", "complete", "discard", "tagAdd", "tagRemove"];
661
+ registerSchema({
662
+ command: "actions.draft.list",
663
+ description: "Review the action ops staged in THIS chat's draft before publish (creates/updates/completes/discards/links). Staged ops are invisible to `actions list`/`status` until the chat publishes \u2014 use this to verify what will apply and catch duplicates.",
664
+ args: {}
665
+ });
666
+ registerSchema({
667
+ command: "actions.draft.remove",
668
+ description: "Drop a single staged action op from this chat's draft before publish. For a tempId, removing the create cascades into its complete/link/tagAdd ops. For a real action ID, pass --op to say which op to drop. Use this to UNDO a staged op \u2014 never stage `complete` to delete an action.",
669
+ args: {
670
+ ref: { type: "string", description: "tempId (temp_*) or real action ID to drop from the draft", required: true },
671
+ op: {
672
+ type: "string",
673
+ description: "Required for real action IDs: which op to drop (update|complete|discard|tagAdd|tagRemove)",
674
+ required: false
675
+ },
676
+ "tag-slug": { type: "string", description: "Tag slug (only for --op tagAdd|tagRemove)", required: false }
677
+ }
678
+ });
679
+ registerSchema({
680
+ command: "actions.draft.clear",
681
+ description: "Discard ALL staged action ops in this chat's draft before publish. Nothing applies on publish. Does not touch already-published actions.",
682
+ args: {}
683
+ });
684
+ var listCommand = defineCommand5({
685
+ meta: {
686
+ name: "list",
687
+ description: "Show every action op staged in this chat's draft, with footgun warnings. Example: baker actions draft"
688
+ },
689
+ run: async () => {
690
+ try {
691
+ const chatId = requireChatId();
692
+ const response = await apiPost("/api/actions/draft", { chatId });
693
+ writeJson(response);
694
+ } catch (err) {
695
+ failApi(err);
696
+ }
697
+ }
698
+ });
699
+ var removeCommand = defineCommand5({
700
+ meta: {
701
+ name: "remove",
702
+ description: "Drop one staged op from the draft. Example: baker actions draft remove temp_abc123 | baker actions draft remove jx7... --op complete"
703
+ },
704
+ args: {
705
+ ref: { type: "positional", description: "tempId or real action ID", required: false },
706
+ op: {
707
+ type: "string",
708
+ description: "Op kind for real IDs: update|complete|discard|tagAdd|tagRemove",
709
+ required: false
710
+ },
711
+ "tag-slug": { type: "string", description: "Tag slug (for tagAdd|tagRemove)", required: false }
712
+ },
713
+ run: async ({ args }) => {
714
+ try {
715
+ const ref = args.ref;
716
+ if (!ref) {
717
+ failValidation("A tempId or action ID is required.");
718
+ }
719
+ const chatId = requireChatId();
720
+ if (isTempId(ref)) {
721
+ await apiPost("/api/actions/draft-op/remove", {
722
+ chatId,
723
+ target: { kind: "tempId", tempId: ref }
724
+ });
725
+ writeJson({ ok: true, data: { removed: ref, kind: "tempId" } });
726
+ return;
727
+ }
728
+ validateConvexId(ref);
729
+ const op = args.op;
730
+ if (!op || !REMOVE_OP_KINDS.includes(op)) {
731
+ failValidation(
732
+ `Removing a staged op for a real action ID requires --op (one of: ${REMOVE_OP_KINDS.join("|")}).`
733
+ );
734
+ }
735
+ const tagSlug = args["tag-slug"];
736
+ await apiPost("/api/actions/draft-op/remove", {
737
+ chatId,
738
+ target: { kind: "actionId", actionId: ref, opKind: op, ...tagSlug ? { tagSlug } : {} }
739
+ });
740
+ writeJson({ ok: true, data: { removed: ref, kind: "actionId", op } });
741
+ } catch (err) {
742
+ failApi(err);
743
+ }
744
+ }
745
+ });
746
+ var clearCommand = defineCommand5({
747
+ meta: {
748
+ name: "clear",
749
+ description: "Discard every staged op in this chat's draft. Example: baker actions draft clear"
750
+ },
751
+ run: async () => {
752
+ try {
753
+ const chatId = requireChatId();
754
+ await apiPost("/api/actions/draft/clear", { chatId });
755
+ writeJson({ ok: true, data: { cleared: true } });
756
+ } catch (err) {
757
+ failApi(err);
758
+ }
759
+ }
760
+ });
761
+ var draftCommand = defineCommand5({
762
+ meta: {
763
+ name: "draft",
764
+ description: "Review and edit the action ops staged in this chat BEFORE publish. Subcommands: list (default), remove, clear. Staged ops are invisible to `actions list`/`status` until publish, so check here before finishing."
765
+ },
766
+ subCommands: {
767
+ list: listCommand,
768
+ remove: removeCommand,
769
+ clear: clearCommand
770
+ },
771
+ // Bare `baker actions draft` (no subcommand) shows the staged ops.
772
+ run: async () => {
773
+ try {
774
+ const chatId = requireChatId();
775
+ const response = await apiPost("/api/actions/draft", { chatId });
776
+ writeJson(response);
777
+ } catch (err) {
778
+ failApi(err);
779
+ }
780
+ }
781
+ });
782
+
783
+ // src/commands/actions/get.ts
784
+ import { defineCommand as defineCommand6 } from "citty";
639
785
  registerSchema({
640
786
  command: "actions.get",
641
787
  description: "Get a single action with tags, blockers, blocked-by, and active-chat info.",
@@ -643,7 +789,7 @@ registerSchema({
643
789
  id: { type: "string", description: "Action ID", required: true }
644
790
  }
645
791
  });
646
- var getCommand = defineCommand5({
792
+ var getCommand = defineCommand6({
647
793
  meta: { name: "get", description: "Get a single action by ID. Example: baker actions get <action-id>" },
648
794
  args: {
649
795
  id: { type: "positional", description: "Action ID", required: false },
@@ -665,7 +811,7 @@ var getCommand = defineCommand5({
665
811
  });
666
812
 
667
813
  // src/commands/actions/link.ts
668
- import { defineCommand as defineCommand6 } from "citty";
814
+ import { defineCommand as defineCommand7 } from "citty";
669
815
  registerSchema({
670
816
  command: "actions.link",
671
817
  description: "Stage a 'blocker -> blocked' dependency. Refs can be either action IDs or tempIds from create ops in the same draft.",
@@ -674,7 +820,7 @@ registerSchema({
674
820
  blocked: { type: "string", description: "Blocked action ID or tempId", required: true }
675
821
  }
676
822
  });
677
- var linkCommand = defineCommand6({
823
+ var linkCommand = defineCommand7({
678
824
  meta: {
679
825
  name: "link",
680
826
  description: "Stage a dependency link. Example: baker actions link --blocker <id> --blocked <id>"
@@ -704,7 +850,7 @@ var linkCommand = defineCommand6({
704
850
  });
705
851
 
706
852
  // src/commands/actions/list.ts
707
- import { defineCommand as defineCommand7 } from "citty";
853
+ import { defineCommand as defineCommand8 } from "citty";
708
854
  registerSchema({
709
855
  command: "actions.list",
710
856
  description: "List actions for the current company. Default: pre-bucketed (claimable/myClaims/blocked/claimedByOthers/completed/discarded). Set --bucketed=false for a flat list filterable by --status.",
@@ -722,7 +868,7 @@ registerSchema({
722
868
  }
723
869
  }
724
870
  });
725
- var listCommand = defineCommand7({
871
+ var listCommand2 = defineCommand8({
726
872
  meta: {
727
873
  name: "list",
728
874
  description: "List actions. Default: bucketed view (claimable, myClaims, blocked, claimedByOthers). Use --bucketed=false for raw filter by --status."
@@ -753,7 +899,7 @@ var listCommand = defineCommand7({
753
899
  });
754
900
 
755
901
  // src/commands/actions/release.ts
756
- import { defineCommand as defineCommand8 } from "citty";
902
+ import { defineCommand as defineCommand9 } from "citty";
757
903
  registerSchema({
758
904
  command: "actions.release",
759
905
  description: "Release an action you previously claimed (no-op if you don't own the claim).",
@@ -761,7 +907,7 @@ registerSchema({
761
907
  id: { type: "string", description: "Action ID", required: true }
762
908
  }
763
909
  });
764
- var releaseCommand = defineCommand8({
910
+ var releaseCommand = defineCommand9({
765
911
  meta: {
766
912
  name: "release",
767
913
  description: "Release a claim you made on an action. Example: baker actions release <action-id>"
@@ -787,15 +933,15 @@ var releaseCommand = defineCommand8({
787
933
  });
788
934
 
789
935
  // src/commands/actions/status.ts
790
- import { defineCommand as defineCommand9 } from "citty";
936
+ import { defineCommand as defineCommand10 } from "citty";
791
937
  registerSchema({
792
938
  command: "actions.status",
793
- description: "Resolve one or more Work Action refs by real action ID or temp_* ref in a single batch call.",
939
+ description: "Resolve one or more Work Action refs by real action ID or temp_* ref in a single batch call. When BAKER_CHAT_ID is set, a temp_* ref still staged in THIS chat resolves to status 'draft' (not 'not_found') \u2014 staged ops only become published actions on chat publish.",
794
940
  args: {
795
941
  refs: { type: "string", description: "One or more action refs: real action IDs or temp_* refs", required: true }
796
942
  }
797
943
  });
798
- var statusCommand = defineCommand9({
944
+ var statusCommand = defineCommand10({
799
945
  meta: {
800
946
  name: "status",
801
947
  description: "Resolve Work Action refs by real ID or temp_* ref. Example: baker actions status temp_hero jx123"
@@ -809,7 +955,9 @@ var statusCommand = defineCommand9({
809
955
  if (refs.length === 0) {
810
956
  failValidation("At least one action ref is required.");
811
957
  }
812
- const response = await apiPost("/api/actions/status", { refs });
958
+ const { BAKER_CHAT_ID } = getEnv();
959
+ const body = BAKER_CHAT_ID ? { refs, chatId: BAKER_CHAT_ID } : { refs };
960
+ const response = await apiPost("/api/actions/status", body);
813
961
  writeJson(response);
814
962
  } catch (err) {
815
963
  failApi(err);
@@ -818,7 +966,7 @@ var statusCommand = defineCommand9({
818
966
  });
819
967
 
820
968
  // src/commands/actions/unlink.ts
821
- import { defineCommand as defineCommand10 } from "citty";
969
+ import { defineCommand as defineCommand11 } from "citty";
822
970
  registerSchema({
823
971
  command: "actions.unlink",
824
972
  description: "Stage removal of a 'blocker -> blocked' dependency. The blocked action must be claimed by current chat.",
@@ -827,7 +975,7 @@ registerSchema({
827
975
  blocked: { type: "string", description: "Blocked action ID (must be claimed by current chat)", required: true }
828
976
  }
829
977
  });
830
- var unlinkCommand = defineCommand10({
978
+ var unlinkCommand = defineCommand11({
831
979
  meta: {
832
980
  name: "unlink",
833
981
  description: "Stage removal of a dependency. Example: baker actions unlink --blocker <id> --blocked <id>"
@@ -859,7 +1007,7 @@ var unlinkCommand = defineCommand10({
859
1007
  });
860
1008
 
861
1009
  // src/commands/actions/update.ts
862
- import { defineCommand as defineCommand11 } from "citty";
1010
+ import { defineCommand as defineCommand12 } from "citty";
863
1011
  registerSchema({
864
1012
  command: "actions.update",
865
1013
  description: "Stage an update on a claimed action (name and/or description). Applies on publish.",
@@ -869,7 +1017,7 @@ registerSchema({
869
1017
  description: { type: "string", description: "New description", required: false }
870
1018
  }
871
1019
  });
872
- var updateCommand = defineCommand11({
1020
+ var updateCommand = defineCommand12({
873
1021
  meta: {
874
1022
  name: "update",
875
1023
  description: 'Stage an update on a claimed action. Example: baker actions update <id> --name "New name"'
@@ -905,15 +1053,20 @@ var updateCommand = defineCommand11({
905
1053
  });
906
1054
 
907
1055
  // src/commands/actions/index.ts
908
- var actionsCommand = defineCommand12({
1056
+ var actionsCommand = defineCommand13({
909
1057
  meta: {
910
1058
  name: "actions",
911
- description: `Manage action items for the current chat. Subcommands: list, get, status, claim, release, create, update, complete, discard, link, unlink.
1059
+ description: `Manage action items for the current chat. Subcommands: list, draft, get, status, claim, release, create, update, complete, discard, link, unlink.
1060
+
1061
+ Lifecycle: claim an action before working on it. Stage create/update/complete/discard/link via this CLI; they apply when the chat is published. Release if you decide not to work on it after all.
912
1062
 
913
- Lifecycle: claim an action before working on it. Stage create/complete/discard via this CLI; they apply when the chat is published. Release if you decide not to work on it after all.
1063
+ Staged vs published: create/update/complete/discard/link are STAGED in this chat's draft and are invisible to \`list\`/\`status\` until the chat publishes. Review them with \`actions draft\` before finishing. To drop a staged op, use \`actions draft remove <ref>\` \u2014 never stage \`complete\` to delete a staged action (that publishes it as already-completed, leaving a duplicate).
914
1064
 
915
1065
  Examples:
916
- baker actions list # bucketed view: claimable, myClaims, blocked, claimedByOthers
1066
+ baker actions list # bucketed view of PUBLISHED actions
1067
+ baker actions draft # review what THIS chat has staged (pre-publish)
1068
+ baker actions draft remove temp_hero # drop a staged create (cascades its complete/link ops)
1069
+ baker actions draft clear # drop everything staged in this chat
917
1070
  baker actions status temp_hero jx123 # batch resolve real IDs and temp_* refs
918
1071
  baker actions claim <id>
919
1072
  baker actions create --name "Build hero" --description "..."
@@ -921,7 +1074,8 @@ Examples:
921
1074
  baker actions discard <id> --reason "obsolete"`
922
1075
  },
923
1076
  subCommands: {
924
- list: listCommand,
1077
+ list: listCommand2,
1078
+ draft: draftCommand,
925
1079
  get: getCommand,
926
1080
  status: statusCommand,
927
1081
  claim: claimCommand,
@@ -936,13 +1090,13 @@ Examples:
936
1090
  });
937
1091
 
938
1092
  // src/commands/ads/index.ts
939
- import { defineCommand as defineCommand71 } from "citty";
1093
+ import { defineCommand as defineCommand73 } from "citty";
940
1094
 
941
1095
  // src/commands/ads/google/index.ts
942
- import { defineCommand as defineCommand23 } from "citty";
1096
+ import { defineCommand as defineCommand24 } from "citty";
943
1097
 
944
1098
  // src/commands/ads/google/accounts.ts
945
- import { defineCommand as defineCommand13 } from "citty";
1099
+ import { defineCommand as defineCommand14 } from "citty";
946
1100
 
947
1101
  // src/commands/ads/cache.ts
948
1102
  import { createHash } from "crypto";
@@ -1218,7 +1372,7 @@ function handleAccountsError(err) {
1218
1372
  writeAdsJson({ ok: false, error: { code: "NETWORK_ERROR", message: "Unexpected error" } });
1219
1373
  process.exit(1);
1220
1374
  }
1221
- var accountsCommand = defineCommand13({
1375
+ var accountsCommand = defineCommand14({
1222
1376
  meta: {
1223
1377
  name: "accounts",
1224
1378
  description: `List accessible Google Ads accounts. Returns customer IDs needed for all other commands.
@@ -1258,7 +1412,7 @@ Examples:
1258
1412
  });
1259
1413
 
1260
1414
  // src/commands/ads/google/changes.ts
1261
- import { defineCommand as defineCommand14 } from "citty";
1415
+ import { defineCommand as defineCommand15 } from "citty";
1262
1416
 
1263
1417
  // src/commands/ads/field-descriptions.ts
1264
1418
  var FIELD_DESCRIPTIONS = {
@@ -1810,7 +1964,7 @@ registerSchema({
1810
1964
  output: { type: "string", description: "Format: json|csv|jsonl|md", required: false, default: "json" }
1811
1965
  }
1812
1966
  });
1813
- var changesCommand = defineCommand14({
1967
+ var changesCommand = defineCommand15({
1814
1968
  meta: {
1815
1969
  name: "changes",
1816
1970
  description: `Get recent changes in a Google Ads account with performance data.
@@ -1861,7 +2015,7 @@ Examples:
1861
2015
  });
1862
2016
 
1863
2017
  // src/commands/ads/google/currency.ts
1864
- import { defineCommand as defineCommand15 } from "citty";
2018
+ import { defineCommand as defineCommand16 } from "citty";
1865
2019
  registerSchema({
1866
2020
  command: "ads.google.currency",
1867
2021
  description: "Get the currency code for a Google Ads account. Returns currency_code, customer_id, account_name, and access_type. Call this before interpreting cost_micros values.",
@@ -1873,7 +2027,7 @@ registerSchema({
1873
2027
  }
1874
2028
  }
1875
2029
  });
1876
- var currencyCommand = defineCommand15({
2030
+ var currencyCommand = defineCommand16({
1877
2031
  meta: {
1878
2032
  name: "currency",
1879
2033
  description: `Get account currency code. Use this to interpret metrics.cost_micros values.
@@ -1922,10 +2076,10 @@ Examples:
1922
2076
  });
1923
2077
 
1924
2078
  // src/commands/ads/google/keywords/index.ts
1925
- import { defineCommand as defineCommand20 } from "citty";
2079
+ import { defineCommand as defineCommand21 } from "citty";
1926
2080
 
1927
2081
  // src/commands/ads/google/keywords/discover.ts
1928
- import { defineCommand as defineCommand16 } from "citty";
2082
+ import { defineCommand as defineCommand17 } from "citty";
1929
2083
 
1930
2084
  // src/geo-context.ts
1931
2085
  var GOOGLE_ADS_LOCATIONS = [
@@ -2200,7 +2354,7 @@ function handleKeywordError(err) {
2200
2354
  writeAdsJson({ ok: false, error: { code: "NETWORK_ERROR", message: "Unexpected error" } });
2201
2355
  process.exit(1);
2202
2356
  }
2203
- var discoverCommand = defineCommand16({
2357
+ var discoverCommand = defineCommand17({
2204
2358
  meta: {
2205
2359
  name: "discover",
2206
2360
  description: `Discover new keyword ideas from seed keywords or competitor URLs.
@@ -2262,7 +2416,7 @@ Examples:
2262
2416
  });
2263
2417
 
2264
2418
  // src/commands/ads/google/keywords/languages.ts
2265
- import { defineCommand as defineCommand17 } from "citty";
2419
+ import { defineCommand as defineCommand18 } from "citty";
2266
2420
  registerSchema({
2267
2421
  command: "ads.google.keywords.languages",
2268
2422
  description: "List all supported language IDs for --language flag in Google Ads keyword commands.",
@@ -2272,7 +2426,7 @@ var FIELDS = {
2272
2426
  id: "Language ID to pass as --language",
2273
2427
  name: "Language name"
2274
2428
  };
2275
- var languagesCommand = defineCommand17({
2429
+ var languagesCommand = defineCommand18({
2276
2430
  meta: {
2277
2431
  name: "languages",
2278
2432
  description: "List all supported language IDs for --language flag."
@@ -2283,7 +2437,7 @@ var languagesCommand = defineCommand17({
2283
2437
  });
2284
2438
 
2285
2439
  // src/commands/ads/google/keywords/locations.ts
2286
- import { defineCommand as defineCommand18 } from "citty";
2440
+ import { defineCommand as defineCommand19 } from "citty";
2287
2441
  registerSchema({
2288
2442
  command: "ads.google.keywords.locations",
2289
2443
  description: "List all supported geo target IDs for --location flag in Google Ads keyword commands.",
@@ -2293,7 +2447,7 @@ var FIELDS2 = {
2293
2447
  id: "Geo target ID to pass as --location",
2294
2448
  name: "Country/region name"
2295
2449
  };
2296
- var locationsCommand = defineCommand18({
2450
+ var locationsCommand = defineCommand19({
2297
2451
  meta: {
2298
2452
  name: "locations",
2299
2453
  description: "List all supported geo target IDs for --location flag."
@@ -2304,7 +2458,7 @@ var locationsCommand = defineCommand18({
2304
2458
  });
2305
2459
 
2306
2460
  // src/commands/ads/google/keywords/metrics.ts
2307
- import { defineCommand as defineCommand19 } from "citty";
2461
+ import { defineCommand as defineCommand20 } from "citty";
2308
2462
  registerSchema({
2309
2463
  command: "ads.google.keywords.metrics",
2310
2464
  description: "Get historical metrics for specific keywords. Returns { historical_metrics: [...] } with snake_case fields matching the Google Ads API. IMPORTANT: If --location and --language are omitted, defaults to United States (2840) and English (1000). The response includes a query_context object showing which location/language were used.",
@@ -2328,7 +2482,7 @@ registerSchema({
2328
2482
  output: { type: "string", description: "Format: json|csv|jsonl|md", required: false, default: "json" }
2329
2483
  }
2330
2484
  });
2331
- var metricsCommand = defineCommand19({
2485
+ var metricsCommand = defineCommand20({
2332
2486
  meta: {
2333
2487
  name: "metrics",
2334
2488
  description: `Get historical search metrics for specific keywords.
@@ -2415,7 +2569,7 @@ Examples:
2415
2569
  });
2416
2570
 
2417
2571
  // src/commands/ads/google/keywords/index.ts
2418
- var keywordsCommand = defineCommand20({
2572
+ var keywordsCommand = defineCommand21({
2419
2573
  meta: {
2420
2574
  name: "keywords",
2421
2575
  description: `Keyword research tools. Subcommands: discover, metrics, locations, languages.
@@ -2435,8 +2589,8 @@ Examples:
2435
2589
  });
2436
2590
 
2437
2591
  // src/commands/ads/google/library/index.ts
2438
- import { defineCommand as defineCommand21 } from "citty";
2439
- var listAdvertisers = defineCommand21({
2592
+ import { defineCommand as defineCommand22 } from "citty";
2593
+ var listAdvertisers = defineCommand22({
2440
2594
  meta: {
2441
2595
  name: "list-advertisers",
2442
2596
  description: "List tracked Google advertisers and their accounts"
@@ -2453,7 +2607,7 @@ var listAdvertisers = defineCommand21({
2453
2607
  }
2454
2608
  }
2455
2609
  });
2456
- var syncStatus = defineCommand21({
2610
+ var syncStatus = defineCommand22({
2457
2611
  meta: {
2458
2612
  name: "sync-status",
2459
2613
  description: "Check the sync status and ad counts of a Google account"
@@ -2473,7 +2627,7 @@ var syncStatus = defineCommand21({
2473
2627
  writeAdsJson({ ok: true, data });
2474
2628
  }
2475
2629
  });
2476
- var searchAds = defineCommand21({
2630
+ var searchAds = defineCommand22({
2477
2631
  meta: {
2478
2632
  name: "search-ads",
2479
2633
  description: "Search and filter Google ads for an account"
@@ -2530,7 +2684,7 @@ var searchAds = defineCommand21({
2530
2684
  }
2531
2685
  }
2532
2686
  });
2533
- var searchAdvertiser = defineCommand21({
2687
+ var searchAdvertiser = defineCommand22({
2534
2688
  meta: {
2535
2689
  name: "search-advertiser",
2536
2690
  description: "Search for an advertiser on the Google Ads Transparency Center"
@@ -2565,7 +2719,7 @@ var searchAdvertiser = defineCommand21({
2565
2719
  function sleep(ms) {
2566
2720
  return new Promise((resolve5) => setTimeout(resolve5, ms));
2567
2721
  }
2568
- var track = defineCommand21({
2722
+ var track = defineCommand22({
2569
2723
  meta: {
2570
2724
  name: "track",
2571
2725
  description: "Track a new Google advertiser (from search results). Waits for initial sync to complete before returning."
@@ -2623,7 +2777,7 @@ var track = defineCommand21({
2623
2777
  process.exit(1);
2624
2778
  }
2625
2779
  });
2626
- var sync = defineCommand21({
2780
+ var sync = defineCommand22({
2627
2781
  meta: {
2628
2782
  name: "sync",
2629
2783
  description: "Trigger an immediate sync for a Google account. Waits for completion before returning."
@@ -2667,7 +2821,7 @@ var sync = defineCommand21({
2667
2821
  process.exit(1);
2668
2822
  }
2669
2823
  });
2670
- var searchCompetitors = defineCommand21({
2824
+ var searchCompetitors = defineCommand22({
2671
2825
  meta: {
2672
2826
  name: "search-competitors",
2673
2827
  description: "Search for competitors running Google ads for a keyword (DataForSEO)"
@@ -2699,7 +2853,7 @@ var searchCompetitors = defineCommand21({
2699
2853
  }
2700
2854
  }
2701
2855
  });
2702
- var library = defineCommand21({
2856
+ var library = defineCommand22({
2703
2857
  meta: {
2704
2858
  name: "library",
2705
2859
  description: "Manage and search the Google Ads Library"
@@ -2718,7 +2872,7 @@ var library = defineCommand21({
2718
2872
  // src/commands/ads/google/query.ts
2719
2873
  import { appendFileSync, existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
2720
2874
  import { resolve } from "path";
2721
- import { defineCommand as defineCommand22 } from "citty";
2875
+ import { defineCommand as defineCommand23 } from "citty";
2722
2876
 
2723
2877
  // src/commands/ads/google/preflight.ts
2724
2878
  function buildCommand2(query, customerId) {
@@ -3174,7 +3328,7 @@ function handleQueryError(err, finalQuery, customerId) {
3174
3328
  });
3175
3329
  process.exit(1);
3176
3330
  }
3177
- var queryCommand = defineCommand22({
3331
+ var queryCommand = defineCommand23({
3178
3332
  meta: {
3179
3333
  name: "query",
3180
3334
  description: `Run GAQL queries against Google Ads. Supports raw GAQL, presets, pagination, file export, and caching.
@@ -3232,7 +3386,7 @@ Examples:
3232
3386
  });
3233
3387
 
3234
3388
  // src/commands/ads/google/index.ts
3235
- var googleCommand = defineCommand23({
3389
+ var googleCommand = defineCommand24({
3236
3390
  meta: {
3237
3391
  name: "google",
3238
3392
  description: `Google Ads commands. Query campaigns, keywords, search terms, and more via GAQL.
@@ -3260,7 +3414,7 @@ Examples:
3260
3414
  });
3261
3415
 
3262
3416
  // src/commands/ads/linkedin/index.ts
3263
- import { defineCommand as defineCommand40 } from "citty";
3417
+ import { defineCommand as defineCommand42 } from "citty";
3264
3418
 
3265
3419
  // src/commands/ads/linkedin/schemas.ts
3266
3420
  registerSchema({
@@ -3560,7 +3714,7 @@ registerSchema({
3560
3714
  });
3561
3715
 
3562
3716
  // src/commands/ads/linkedin/account.ts
3563
- import { defineCommand as defineCommand24 } from "citty";
3717
+ import { defineCommand as defineCommand25 } from "citty";
3564
3718
 
3565
3719
  // src/commands/ads/linkedin/shared.ts
3566
3720
  var DAY_MS = 864e5;
@@ -3663,7 +3817,7 @@ function resolveStatusFilter(args) {
3663
3817
  }
3664
3818
 
3665
3819
  // src/commands/ads/linkedin/account.ts
3666
- var accountCommand = defineCommand24({
3820
+ var accountCommand = defineCommand25({
3667
3821
  meta: {
3668
3822
  name: "account",
3669
3823
  description: `Single LinkedIn ad account detail (currency, status, type).
@@ -3697,9 +3851,9 @@ Examples:
3697
3851
  });
3698
3852
 
3699
3853
  // src/commands/ads/linkedin/accounts.ts
3700
- import { defineCommand as defineCommand25 } from "citty";
3854
+ import { defineCommand as defineCommand26 } from "citty";
3701
3855
  var ACCOUNTS_TTL_MS = 60 * 60 * 1e3;
3702
- var accountsCommand2 = defineCommand25({
3856
+ var accountsCommand2 = defineCommand26({
3703
3857
  meta: {
3704
3858
  name: "accounts",
3705
3859
  description: `List LinkedIn ad accounts in this company's connected scope.
@@ -3747,7 +3901,7 @@ Examples:
3747
3901
  });
3748
3902
 
3749
3903
  // src/commands/ads/linkedin/analytics.ts
3750
- import { defineCommand as defineCommand26 } from "citty";
3904
+ import { defineCommand as defineCommand27 } from "citty";
3751
3905
 
3752
3906
  // src/commands/ads/linkedin/presets.ts
3753
3907
  var INTENTS = {
@@ -4019,7 +4173,7 @@ function numberOf(v) {
4019
4173
  }
4020
4174
  return 0;
4021
4175
  }
4022
- var analyticsCommand = defineCommand26({
4176
+ var analyticsCommand = defineCommand27({
4023
4177
  meta: {
4024
4178
  name: "analytics",
4025
4179
  description: `Performance reporting \u2014 the workhorse for AI agents.
@@ -4147,7 +4301,7 @@ Examples \u2014 common AI questions:
4147
4301
 
4148
4302
  // src/commands/ads/linkedin/audience-size.ts
4149
4303
  import { readFileSync as readFileSync3 } from "fs";
4150
- import { defineCommand as defineCommand27 } from "citty";
4304
+ import { defineCommand as defineCommand28 } from "citty";
4151
4305
  function loadTargeting(args) {
4152
4306
  const inline = args.targeting;
4153
4307
  if (inline) {
@@ -4169,7 +4323,7 @@ function loadTargeting(args) {
4169
4323
  }
4170
4324
  handleLinkedinError(new Error("Pass --targeting-file <path> or --targeting '{...JSON...}'"));
4171
4325
  }
4172
- var audienceSizeCommand = defineCommand27({
4326
+ var audienceSizeCommand = defineCommand28({
4173
4327
  meta: {
4174
4328
  name: "audience-size",
4175
4329
  description: `Estimate audience size for a targeting payload \u2014 pre-launch sanity check.
@@ -4214,7 +4368,7 @@ Examples:
4214
4368
  });
4215
4369
 
4216
4370
  // src/commands/ads/linkedin/audit.ts
4217
- import { defineCommand as defineCommand28 } from "citty";
4371
+ import { defineCommand as defineCommand29 } from "citty";
4218
4372
  var SEVERITY_RANK = {
4219
4373
  critical: 0,
4220
4374
  high: 1,
@@ -4273,7 +4427,7 @@ function noteOf(f) {
4273
4427
  const fix = f.fix?.explanation ?? "";
4274
4428
  return [fix, ev].filter(Boolean).join(" \u2014 ");
4275
4429
  }
4276
- var auditCommand = defineCommand28({
4430
+ var auditCommand = defineCommand29({
4277
4431
  meta: {
4278
4432
  name: "audit",
4279
4433
  description: `Run a LinkedIn Ads playbook audit \u2014 30+ checks across Settings, Tracking,
@@ -4340,7 +4494,7 @@ Examples:
4340
4494
 
4341
4495
  // src/commands/ads/linkedin/bid-pricing.ts
4342
4496
  import { readFileSync as readFileSync4 } from "fs";
4343
- import { defineCommand as defineCommand29 } from "citty";
4497
+ import { defineCommand as defineCommand30 } from "citty";
4344
4498
  function loadTargeting2(args) {
4345
4499
  const inline = args.targeting;
4346
4500
  if (inline) {
@@ -4362,7 +4516,7 @@ function loadTargeting2(args) {
4362
4516
  }
4363
4517
  handleLinkedinError(new Error("Pass --targeting-file <path> or --targeting '{...JSON...}'"));
4364
4518
  }
4365
- var bidPricingCommand = defineCommand29({
4519
+ var bidPricingCommand = defineCommand30({
4366
4520
  meta: {
4367
4521
  name: "bid-pricing",
4368
4522
  description: `Get LinkedIn's suggested bid range for a targeting + objective + cost type.
@@ -4412,8 +4566,8 @@ Examples:
4412
4566
  });
4413
4567
 
4414
4568
  // src/commands/ads/linkedin/campaign-groups.ts
4415
- import { defineCommand as defineCommand30 } from "citty";
4416
- var campaignGroupsCommand = defineCommand30({
4569
+ import { defineCommand as defineCommand31 } from "citty";
4570
+ var campaignGroupsCommand = defineCommand31({
4417
4571
  meta: {
4418
4572
  name: "campaign-groups",
4419
4573
  description: `List LinkedIn campaign groups.
@@ -4456,8 +4610,8 @@ Examples:
4456
4610
  });
4457
4611
 
4458
4612
  // src/commands/ads/linkedin/campaigns.ts
4459
- import { defineCommand as defineCommand31 } from "citty";
4460
- var campaignsCommand = defineCommand31({
4613
+ import { defineCommand as defineCommand32 } from "citty";
4614
+ var campaignsCommand = defineCommand32({
4461
4615
  meta: {
4462
4616
  name: "campaigns",
4463
4617
  description: `List LinkedIn campaigns.
@@ -4506,8 +4660,8 @@ Examples:
4506
4660
  });
4507
4661
 
4508
4662
  // src/commands/ads/linkedin/conversation.ts
4509
- import { defineCommand as defineCommand32 } from "citty";
4510
- var conversationCommand = defineCommand32({
4663
+ import { defineCommand as defineCommand33 } from "citty";
4664
+ var conversationCommand = defineCommand33({
4511
4665
  meta: {
4512
4666
  name: "conversation",
4513
4667
  description: `Per-button click rates inside Sponsored Messaging / Conversation Ads.
@@ -4570,7 +4724,7 @@ Examples:
4570
4724
  });
4571
4725
 
4572
4726
  // src/commands/ads/linkedin/conversions.ts
4573
- import { defineCommand as defineCommand33 } from "citty";
4727
+ import { defineCommand as defineCommand34 } from "citty";
4574
4728
  var DAY_MS2 = 864e5;
4575
4729
  function healthOf(rules) {
4576
4730
  const enabled = rules.filter((r) => r.enabled !== false);
@@ -4596,7 +4750,7 @@ function healthOf(rules) {
4596
4750
  wrongLeadDedup: wrongDedup
4597
4751
  };
4598
4752
  }
4599
- var listCmd = defineCommand33({
4753
+ var listCmd = defineCommand34({
4600
4754
  meta: {
4601
4755
  name: "list",
4602
4756
  description: `List conversion rules on the account.`
@@ -4624,7 +4778,7 @@ var listCmd = defineCommand33({
4624
4778
  }
4625
4779
  }
4626
4780
  });
4627
- var healthCmd = defineCommand33({
4781
+ var healthCmd = defineCommand34({
4628
4782
  meta: {
4629
4783
  name: "health",
4630
4784
  description: `5-point Insight Tag / CAPI health check (playbook \xA707).
@@ -4654,7 +4808,7 @@ Surfaces:
4654
4808
  }
4655
4809
  }
4656
4810
  });
4657
- var conversionsCommand = defineCommand33({
4811
+ var conversionsCommand = defineCommand34({
4658
4812
  meta: {
4659
4813
  name: "conversions",
4660
4814
  description: `Conversion rules \u2014 Insight Tag and Conversions API.
@@ -4670,8 +4824,8 @@ Subcommands:
4670
4824
  });
4671
4825
 
4672
4826
  // src/commands/ads/linkedin/creatives.ts
4673
- import { defineCommand as defineCommand34 } from "citty";
4674
- var creativesCommand = defineCommand34({
4827
+ import { defineCommand as defineCommand35 } from "citty";
4828
+ var creativesCommand = defineCommand35({
4675
4829
  meta: {
4676
4830
  name: "creatives",
4677
4831
  description: `List LinkedIn creatives (ads).
@@ -4720,7 +4874,7 @@ Examples:
4720
4874
  });
4721
4875
 
4722
4876
  // src/commands/ads/linkedin/demographics.ts
4723
- import { defineCommand as defineCommand35 } from "citty";
4877
+ import { defineCommand as defineCommand36 } from "citty";
4724
4878
  var DEFAULT_PIVOTS = ["job-title", "company", "industry", "seniority", "job-function", "company-size"];
4725
4879
  function numberOf2(v) {
4726
4880
  if (typeof v === "number") return Number.isFinite(v) ? v : 0;
@@ -4733,7 +4887,7 @@ function numberOf2(v) {
4733
4887
  function topByImpressions(rows, limit) {
4734
4888
  return [...rows].sort((a, b) => numberOf2(b.impressions) - numberOf2(a.impressions)).slice(0, limit);
4735
4889
  }
4736
- var demographicsCommand = defineCommand35({
4890
+ var demographicsCommand = defineCommand36({
4737
4891
  meta: {
4738
4892
  name: "demographics",
4739
4893
  description: `Sweep all firmographic pivots in one command \u2014 LinkedIn's superpower.
@@ -4830,8 +4984,8 @@ function resolveRange(args) {
4830
4984
  }
4831
4985
 
4832
4986
  // src/commands/ads/linkedin/facets.ts
4833
- import { defineCommand as defineCommand36 } from "citty";
4834
- var listCmd2 = defineCommand36({
4987
+ import { defineCommand as defineCommand37 } from "citty";
4988
+ var listCmd2 = defineCommand37({
4835
4989
  meta: {
4836
4990
  name: "list",
4837
4991
  description: `List every targeting facet LinkedIn supports.
@@ -4859,7 +5013,7 @@ seniorities, titles, employers, growthRate, companyCategory, skills, etc.).`
4859
5013
  }
4860
5014
  }
4861
5015
  });
4862
- var valuesCmd = defineCommand36({
5016
+ var valuesCmd = defineCommand37({
4863
5017
  meta: {
4864
5018
  name: "values",
4865
5019
  description: `Look up entity values for a single facet \u2014 full list or typeahead search.
@@ -4900,7 +5054,7 @@ or the full URN (urn:li:adTargetingFacet:industries).`
4900
5054
  }
4901
5055
  }
4902
5056
  });
4903
- var facetsCommand = defineCommand36({
5057
+ var facetsCommand = defineCommand37({
4904
5058
  meta: {
4905
5059
  name: "facets",
4906
5060
  description: `LinkedIn targeting facets and entity lookup.
@@ -4918,7 +5072,7 @@ Subcommands:
4918
5072
 
4919
5073
  // src/commands/ads/linkedin/forecast.ts
4920
5074
  import { readFileSync as readFileSync5 } from "fs";
4921
- import { defineCommand as defineCommand37 } from "citty";
5075
+ import { defineCommand as defineCommand38 } from "citty";
4922
5076
  function loadTargeting3(args) {
4923
5077
  const inline = args.targeting;
4924
5078
  if (inline) {
@@ -4948,7 +5102,7 @@ function parseMoney(raw) {
4948
5102
  }
4949
5103
  return { amount: m[1] ?? "0", currencyCode: m[2] ?? "USD" };
4950
5104
  }
4951
- var forecastCommand = defineCommand37({
5105
+ var forecastCommand = defineCommand38({
4952
5106
  meta: {
4953
5107
  name: "forecast",
4954
5108
  description: `Forecast reach + impressions + clicks + spend for a hypothetical campaign.
@@ -4995,9 +5149,9 @@ Examples:
4995
5149
  });
4996
5150
 
4997
5151
  // src/commands/ads/linkedin/leads.ts
4998
- import { defineCommand as defineCommand38 } from "citty";
5152
+ import { defineCommand as defineCommand39 } from "citty";
4999
5153
  var DAY_MS3 = 864e5;
5000
- var leadsCommand = defineCommand38({
5154
+ var leadsCommand = defineCommand39({
5001
5155
  meta: {
5002
5156
  name: "leads",
5003
5157
  description: `List Lead Gen Form responses (playbook \xA707).
@@ -5056,16 +5210,69 @@ Examples:
5056
5210
  }
5057
5211
  });
5058
5212
 
5213
+ // src/commands/ads/linkedin/resolve.ts
5214
+ import { defineCommand as defineCommand40 } from "citty";
5215
+ function toOrgUrn(raw) {
5216
+ const trimmed = raw.trim();
5217
+ if (trimmed.length === 0) {
5218
+ return null;
5219
+ }
5220
+ if (trimmed.startsWith("urn:li:")) {
5221
+ return trimmed;
5222
+ }
5223
+ return /^\d+$/.test(trimmed) ? `urn:li:organization:${trimmed}` : null;
5224
+ }
5225
+ var resolveCommand = defineCommand40({
5226
+ meta: {
5227
+ name: "resolve",
5228
+ description: `Resolve organization URNs to company names.
5229
+
5230
+ Examples:
5231
+ baker ads linkedin resolve --urns urn:li:organization:17719,urn:li:organization:19022
5232
+ baker ads linkedin resolve --ids 17719,19022 --output csv
5233
+
5234
+ Accepts --urns (full URNs) and/or --ids (bare numeric ids). Rows with no name
5235
+ couldn't be resolved \u2014 typically an org outside LinkedIn's targetable set.`
5236
+ },
5237
+ args: {
5238
+ urns: { type: "string", description: "Comma-separated org URNs (urn:li:organization:NNN)" },
5239
+ ids: { type: "string", description: "Comma-separated bare org ids (17719,19022)" },
5240
+ "skip-cache": { type: "boolean", description: "Bypass server-side cache" },
5241
+ output: { type: "string", description: "json|csv|jsonl|md", default: "json" }
5242
+ },
5243
+ run: async ({ args }) => {
5244
+ const raw = [args.urns, args.ids].filter(Boolean).join(",").split(",");
5245
+ const urns = [...new Set(raw.map(toOrgUrn).filter((u) => u !== null))];
5246
+ if (urns.length === 0) {
5247
+ handleLinkedinError(new Error("Provide --urns or --ids (org URNs or bare numeric ids)."));
5248
+ }
5249
+ try {
5250
+ const data = await apiPost("/api/ads/linkedin/resolve-orgs", {
5251
+ urns,
5252
+ skipCache: Boolean(args["skip-cache"])
5253
+ });
5254
+ const fmt = csvOrJson(args);
5255
+ if (fmt !== "json") {
5256
+ writeAdsOutput(data, fmt);
5257
+ return;
5258
+ }
5259
+ writeAdsJson({ ok: true, data });
5260
+ } catch (err) {
5261
+ handleLinkedinError(err);
5262
+ }
5263
+ }
5264
+ });
5265
+
5059
5266
  // src/commands/ads/linkedin/top-companies.ts
5060
- import { defineCommand as defineCommand39 } from "citty";
5061
- var topCompaniesCommand = defineCommand39({
5267
+ import { defineCommand as defineCommand41 } from "citty";
5268
+ var topCompaniesCommand = defineCommand41({
5062
5269
  meta: {
5063
5270
  name: "top-companies",
5064
5271
  description: `Top companies whose employees saw / clicked / converted on a campaign.
5065
5272
 
5066
5273
  Wrapper for: analytics --pivot company. Returns rows sorted by impressions desc.
5067
- Each row's pivot[] contains an urn:li:organization:NNN \u2014 that's the URN you
5068
- join against the Company Engagement Report or LinkedIn's Sales Navigator.
5274
+ Each row's pivot[] contains { urn, id, name } \u2014 org names are resolved automatically.
5275
+ Cross-reference names against your target account list to spot audience leakage.
5069
5276
 
5070
5277
  Demographic data is delayed 12-24h with a \u22653-event privacy floor.
5071
5278
 
@@ -5129,7 +5336,7 @@ Examples:
5129
5336
  });
5130
5337
 
5131
5338
  // src/commands/ads/linkedin/index.ts
5132
- var linkedinCommand = defineCommand40({
5339
+ var linkedinCommand = defineCommand42({
5133
5340
  meta: {
5134
5341
  name: "linkedin",
5135
5342
  description: `LinkedIn Marketing API \u2014 AI-first command surface for B2B ad insights.
@@ -5149,7 +5356,8 @@ Performance \u2014 the workhorse (3 axes):
5149
5356
  baker ads linkedin analytics \u2014 defaults: level=account, intent=baseline, last_7d, DAILY
5150
5357
  baker ads linkedin analytics --intent revenue --last-days 28
5151
5358
  baker ads linkedin analytics --level campaign --campaign-id 1234 --pivot job-title \u2014 LinkedIn's superpower (per-title perf)
5152
- baker ads linkedin analytics --level campaign --campaign-id 1234 --pivot company \u2014 top companies seeing the ad (ABM gold)
5359
+ baker ads linkedin analytics --level campaign --campaign-id 1234 --pivot company \u2014 top companies seeing the ad (ABM gold; names auto-resolved)
5360
+ baker ads linkedin resolve --urns urn:li:organization:17719 \u2014 resolve org URNs to company names
5153
5361
  baker ads linkedin analytics --level campaign --campaign-id 1234 --intent ranking \u2014 fatigue: derives frequency
5154
5362
  baker ads linkedin analytics --list-intents
5155
5363
  baker ads linkedin analytics --list-pivots
@@ -5167,6 +5375,7 @@ Account ID format:
5167
5375
  analytics: analyticsCommand,
5168
5376
  demographics: demographicsCommand,
5169
5377
  "top-companies": topCompaniesCommand,
5378
+ resolve: resolveCommand,
5170
5379
  facets: facetsCommand,
5171
5380
  "audience-size": audienceSizeCommand,
5172
5381
  "bid-pricing": bidPricingCommand,
@@ -5179,10 +5388,10 @@ Account ID format:
5179
5388
  });
5180
5389
 
5181
5390
  // src/commands/ads/meta/index.ts
5182
- import { defineCommand as defineCommand53 } from "citty";
5391
+ import { defineCommand as defineCommand55 } from "citty";
5183
5392
 
5184
5393
  // src/commands/ads/meta/account.ts
5185
- import { defineCommand as defineCommand41 } from "citty";
5394
+ import { defineCommand as defineCommand43 } from "citty";
5186
5395
 
5187
5396
  // src/commands/ads/meta/shared.ts
5188
5397
  var DAY_MS4 = 864e5;
@@ -5261,7 +5470,7 @@ function resolveEffectiveStatus(args) {
5261
5470
  }
5262
5471
 
5263
5472
  // src/commands/ads/meta/account.ts
5264
- var accountCommand2 = defineCommand41({
5473
+ var accountCommand2 = defineCommand43({
5265
5474
  meta: {
5266
5475
  name: "account",
5267
5476
  description: `Show single Meta ad account detail (currency, timezone, balance, business).
@@ -5288,8 +5497,8 @@ Examples:
5288
5497
  });
5289
5498
 
5290
5499
  // src/commands/ads/meta/accounts.ts
5291
- import { defineCommand as defineCommand42 } from "citty";
5292
- var accountsCommand3 = defineCommand42({
5500
+ import { defineCommand as defineCommand44 } from "citty";
5501
+ var accountsCommand3 = defineCommand44({
5293
5502
  meta: {
5294
5503
  name: "accounts",
5295
5504
  description: `List Meta ad accounts in this company's connected scope.
@@ -5337,8 +5546,8 @@ Examples:
5337
5546
  });
5338
5547
 
5339
5548
  // src/commands/ads/meta/activities.ts
5340
- import { defineCommand as defineCommand43 } from "citty";
5341
- var activitiesCommand = defineCommand43({
5549
+ import { defineCommand as defineCommand45 } from "citty";
5550
+ var activitiesCommand = defineCommand45({
5342
5551
  meta: {
5343
5552
  name: "activities",
5344
5553
  description: `Audit log of recent ad-account changes (created, paused, edited). Default lookback 7 days,
@@ -5375,8 +5584,8 @@ Examples:
5375
5584
  });
5376
5585
 
5377
5586
  // src/commands/ads/meta/ads.ts
5378
- import { defineCommand as defineCommand44 } from "citty";
5379
- var adsListCommand = defineCommand44({
5587
+ import { defineCommand as defineCommand46 } from "citty";
5588
+ var adsListCommand = defineCommand46({
5380
5589
  meta: {
5381
5590
  name: "ads",
5382
5591
  description: `List ads in a Meta ad account. Defaults to ACTIVE only \u2014 pass --all-statuses to widen.
@@ -5424,8 +5633,8 @@ Examples:
5424
5633
  });
5425
5634
 
5426
5635
  // src/commands/ads/meta/adsets.ts
5427
- import { defineCommand as defineCommand45 } from "citty";
5428
- var adsetsCommand = defineCommand45({
5636
+ import { defineCommand as defineCommand47 } from "citty";
5637
+ var adsetsCommand = defineCommand47({
5429
5638
  meta: {
5430
5639
  name: "adsets",
5431
5640
  description: `List ad sets in a Meta ad account, optionally scoped to one campaign. Defaults to ACTIVE only.
@@ -5467,8 +5676,8 @@ Examples:
5467
5676
  });
5468
5677
 
5469
5678
  // src/commands/ads/meta/audiences.ts
5470
- import { defineCommand as defineCommand46 } from "citty";
5471
- var audiencesCommand = defineCommand46({
5679
+ import { defineCommand as defineCommand48 } from "citty";
5680
+ var audiencesCommand = defineCommand48({
5472
5681
  meta: {
5473
5682
  name: "audiences",
5474
5683
  description: `List custom audiences for a Meta ad account. Includes lookalikes, website-pixel audiences,
@@ -5503,8 +5712,8 @@ Examples:
5503
5712
  });
5504
5713
 
5505
5714
  // src/commands/ads/meta/businesses.ts
5506
- import { defineCommand as defineCommand47 } from "citty";
5507
- var businessesCommand = defineCommand47({
5715
+ import { defineCommand as defineCommand49 } from "citty";
5716
+ var businessesCommand = defineCommand49({
5508
5717
  meta: {
5509
5718
  name: "businesses",
5510
5719
  description: `List Meta Business Manager accounts the connected user has access to. Required for ad-studies and product-catalogs commands.
@@ -5534,8 +5743,8 @@ Examples:
5534
5743
  });
5535
5744
 
5536
5745
  // src/commands/ads/meta/campaigns.ts
5537
- import { defineCommand as defineCommand48 } from "citty";
5538
- var campaignsCommand2 = defineCommand48({
5746
+ import { defineCommand as defineCommand50 } from "citty";
5747
+ var campaignsCommand2 = defineCommand50({
5539
5748
  meta: {
5540
5749
  name: "campaigns",
5541
5750
  description: `List campaigns for a Meta ad account. Defaults to ACTIVE only \u2014 pass --all-statuses to widen.
@@ -5579,8 +5788,8 @@ Examples:
5579
5788
  });
5580
5789
 
5581
5790
  // src/commands/ads/meta/creatives.ts
5582
- import { defineCommand as defineCommand49 } from "citty";
5583
- var creativesCommand2 = defineCommand49({
5791
+ import { defineCommand as defineCommand51 } from "citty";
5792
+ var creativesCommand2 = defineCommand51({
5584
5793
  meta: {
5585
5794
  name: "creatives",
5586
5795
  description: `List ad creatives in an account, or fetch a single creative by ID.
@@ -5624,7 +5833,7 @@ Examples:
5624
5833
  });
5625
5834
 
5626
5835
  // src/commands/ads/meta/insights.ts
5627
- import { defineCommand as defineCommand50 } from "citty";
5836
+ import { defineCommand as defineCommand52 } from "citty";
5628
5837
 
5629
5838
  // src/commands/ads/meta/presets.ts
5630
5839
  var INSIGHTS_INTENTS = {
@@ -5829,7 +6038,7 @@ function sortRowsBySpendDesc(rows) {
5829
6038
  return sb - sa;
5830
6039
  });
5831
6040
  }
5832
- var insightsCommand = defineCommand50({
6041
+ var insightsCommand = defineCommand52({
5833
6042
  meta: {
5834
6043
  name: "insights",
5835
6044
  description: `Performance reporting \u2014 the main Meta tool for AI agents.
@@ -5930,8 +6139,8 @@ Async is automatic for heavy queries; pass --async to force it, or --no-async to
5930
6139
  });
5931
6140
 
5932
6141
  // src/commands/ads/meta/pixels.ts
5933
- import { defineCommand as defineCommand51 } from "citty";
5934
- var pixelsCommand = defineCommand51({
6142
+ import { defineCommand as defineCommand53 } from "citty";
6143
+ var pixelsCommand = defineCommand53({
5935
6144
  meta: {
5936
6145
  name: "pixels",
5937
6146
  description: `List Meta Pixels for an ad account, or fetch firing stats for one pixel.
@@ -6002,7 +6211,7 @@ function emit(data, args) {
6002
6211
 
6003
6212
  // src/commands/ads/meta/preview.ts
6004
6213
  import { writeFileSync as writeFileSync3 } from "fs";
6005
- import { defineCommand as defineCommand52 } from "citty";
6214
+ import { defineCommand as defineCommand54 } from "citty";
6006
6215
  var VALID_AD_FORMATS = [
6007
6216
  "DESKTOP_FEED_STANDARD",
6008
6217
  "MOBILE_FEED_STANDARD",
@@ -6036,7 +6245,7 @@ var VALID_AD_FORMATS = [
6036
6245
  "MARKETPLACE_MOBILE",
6037
6246
  "BIZ_DISCO_FEED_MOBILE"
6038
6247
  ];
6039
- var previewCommand = defineCommand52({
6248
+ var previewCommand = defineCommand54({
6040
6249
  meta: {
6041
6250
  name: "preview",
6042
6251
  description: `Generate a Meta-hosted preview iframe for a creative or ad. Returns iframe HTML which you
@@ -6083,7 +6292,7 @@ Examples:
6083
6292
  });
6084
6293
 
6085
6294
  // src/commands/ads/meta/index.ts
6086
- var metaCommand = defineCommand53({
6295
+ var metaCommand = defineCommand55({
6087
6296
  meta: {
6088
6297
  name: "meta",
6089
6298
  description: `Meta Marketing API \u2014 AI-first command surface (Facebook + Instagram ads).
@@ -6135,10 +6344,10 @@ Audit & review:
6135
6344
  });
6136
6345
 
6137
6346
  // src/commands/ads/x/index.ts
6138
- import { defineCommand as defineCommand70 } from "citty";
6347
+ import { defineCommand as defineCommand72 } from "citty";
6139
6348
 
6140
6349
  // src/commands/ads/x/accounts.ts
6141
- import { defineCommand as defineCommand54 } from "citty";
6350
+ import { defineCommand as defineCommand56 } from "citty";
6142
6351
  registerSchema({
6143
6352
  command: "ads.x.accounts",
6144
6353
  description: "List all accessible X Ads accounts. Returns accounts with id (base36), name, approval_status, timezone, currency. Run this first to find account IDs for other commands.",
@@ -6166,7 +6375,7 @@ function handleAccountsError2(err) {
6166
6375
  writeAdsJson({ ok: false, error: { code: "NETWORK_ERROR", message: "Unexpected error" } });
6167
6376
  process.exit(1);
6168
6377
  }
6169
- var accountsCommand4 = defineCommand54({
6378
+ var accountsCommand4 = defineCommand56({
6170
6379
  meta: {
6171
6380
  name: "accounts",
6172
6381
  description: `List accessible X Ads accounts. Returns account IDs needed for all other commands.
@@ -6206,7 +6415,7 @@ Examples:
6206
6415
  });
6207
6416
 
6208
6417
  // src/commands/ads/x/active-entities.ts
6209
- import { defineCommand as defineCommand55 } from "citty";
6418
+ import { defineCommand as defineCommand57 } from "citty";
6210
6419
 
6211
6420
  // src/commands/ads/x/error-parser.ts
6212
6421
  function mapXErrorCode(message) {
@@ -6357,7 +6566,7 @@ function parseCsv(v) {
6357
6566
  const parts = v.split(",").map((s) => s.trim()).filter(Boolean);
6358
6567
  return parts.length > 0 ? parts : void 0;
6359
6568
  }
6360
- var activeEntitiesCommand = defineCommand55({
6569
+ var activeEntitiesCommand = defineCommand57({
6361
6570
  meta: {
6362
6571
  name: "active-entities",
6363
6572
  description: `List entities with metric activity in a time range.
@@ -6415,7 +6624,7 @@ Examples:
6415
6624
  });
6416
6625
 
6417
6626
  // src/commands/ads/x/audiences.ts
6418
- import { defineCommand as defineCommand56 } from "citty";
6627
+ import { defineCommand as defineCommand58 } from "citty";
6419
6628
  registerSchema({
6420
6629
  command: "ads.x.audiences",
6421
6630
  description: "List custom audiences for an X Ads account. Returns id, name, audience_size, audience_type, targetable status. Audiences need 100+ active users in the past 90 days to be targetable.",
@@ -6424,7 +6633,7 @@ registerSchema({
6424
6633
  "no-cache": { type: "boolean", description: "Skip cache", required: false }
6425
6634
  }
6426
6635
  });
6427
- var audiencesCommand2 = defineCommand56({
6636
+ var audiencesCommand2 = defineCommand58({
6428
6637
  meta: {
6429
6638
  name: "audiences",
6430
6639
  description: `List X Ads custom audiences.
@@ -6473,7 +6682,7 @@ Examples:
6473
6682
  });
6474
6683
 
6475
6684
  // src/commands/ads/x/campaigns.ts
6476
- import { defineCommand as defineCommand57 } from "citty";
6685
+ import { defineCommand as defineCommand59 } from "citty";
6477
6686
 
6478
6687
  // src/commands/ads/x/run-list.ts
6479
6688
  function buildCleanParams(opts) {
@@ -6536,7 +6745,7 @@ registerSchema({
6536
6745
  "no-cache": { type: "boolean", description: "Skip cache", required: false }
6537
6746
  }
6538
6747
  });
6539
- var campaignsCommand3 = defineCommand57({
6748
+ var campaignsCommand3 = defineCommand59({
6540
6749
  meta: {
6541
6750
  name: "campaigns",
6542
6751
  description: `List X Ads campaigns. Returns budget, schedule, funding instrument, status.
@@ -6578,7 +6787,7 @@ Examples:
6578
6787
  });
6579
6788
 
6580
6789
  // src/commands/ads/x/cards.ts
6581
- import { defineCommand as defineCommand58 } from "citty";
6790
+ import { defineCommand as defineCommand60 } from "citty";
6582
6791
  registerSchema({
6583
6792
  command: "ads.x.cards",
6584
6793
  description: "List website cards, video cards, and carousels for an X Ads account.",
@@ -6587,7 +6796,7 @@ registerSchema({
6587
6796
  "no-cache": { type: "boolean", description: "Skip cache", required: false }
6588
6797
  }
6589
6798
  });
6590
- var cardsCommand = defineCommand58({
6799
+ var cardsCommand = defineCommand60({
6591
6800
  meta: {
6592
6801
  name: "cards",
6593
6802
  description: `List X Ads cards (rich creatives).
@@ -6636,7 +6845,7 @@ Examples:
6636
6845
  });
6637
6846
 
6638
6847
  // src/commands/ads/x/funding.ts
6639
- import { defineCommand as defineCommand59 } from "citty";
6848
+ import { defineCommand as defineCommand61 } from "citty";
6640
6849
  registerSchema({
6641
6850
  command: "ads.x.funding",
6642
6851
  description: "List funding instruments for an X Ads account. Returns id, type, currency, credit_limit_local_micro, funded_amount_local_micro, status. Falls back to BAKER_X_ADS_ACCOUNT_ID env var.",
@@ -6645,7 +6854,7 @@ registerSchema({
6645
6854
  "no-cache": { type: "boolean", description: "Skip cache", required: false }
6646
6855
  }
6647
6856
  });
6648
- var fundingCommand = defineCommand59({
6857
+ var fundingCommand = defineCommand61({
6649
6858
  meta: {
6650
6859
  name: "funding",
6651
6860
  description: `List funding instruments for an X Ads account.
@@ -6694,7 +6903,7 @@ Examples:
6694
6903
  });
6695
6904
 
6696
6905
  // src/commands/ads/x/line-items.ts
6697
- import { defineCommand as defineCommand60 } from "citty";
6906
+ import { defineCommand as defineCommand62 } from "citty";
6698
6907
  registerSchema({
6699
6908
  command: "ads.x.lineItems",
6700
6909
  description: "List line items (ad groups) for an X Ads account. Returns bid, product_type, objective, placements, schedule. Filter by campaign-ids or line-item-ids (CSV).",
@@ -6706,7 +6915,7 @@ registerSchema({
6706
6915
  "no-cache": { type: "boolean", description: "Skip cache", required: false }
6707
6916
  }
6708
6917
  });
6709
- var lineItemsCommand = defineCommand60({
6918
+ var lineItemsCommand = defineCommand62({
6710
6919
  meta: {
6711
6920
  name: "line-items",
6712
6921
  description: `List X Ads line items (ad groups).
@@ -6747,7 +6956,7 @@ Examples:
6747
6956
  });
6748
6957
 
6749
6958
  // src/commands/ads/x/media.ts
6750
- import { defineCommand as defineCommand61 } from "citty";
6959
+ import { defineCommand as defineCommand63 } from "citty";
6751
6960
  registerSchema({
6752
6961
  command: "ads.x.media",
6753
6962
  description: "List media assets in the X Ads media library (images, GIFs, videos). Filter by media-type (IMAGE, GIF, VIDEO).",
@@ -6757,7 +6966,7 @@ registerSchema({
6757
6966
  "no-cache": { type: "boolean", description: "Skip cache", required: false }
6758
6967
  }
6759
6968
  });
6760
- var mediaCommand = defineCommand61({
6969
+ var mediaCommand = defineCommand63({
6761
6970
  meta: {
6762
6971
  name: "media",
6763
6972
  description: `List media assets in the X Ads media library.
@@ -6809,7 +7018,7 @@ Examples:
6809
7018
  });
6810
7019
 
6811
7020
  // src/commands/ads/x/promoted-tweets.ts
6812
- import { defineCommand as defineCommand62 } from "citty";
7021
+ import { defineCommand as defineCommand64 } from "citty";
6813
7022
  registerSchema({
6814
7023
  command: "ads.x.promotedTweets",
6815
7024
  description: "List promoted tweets for an X Ads account. Returns id, line_item_id, tweet_id, approval_status. Filter by line-item-ids (CSV).",
@@ -6820,7 +7029,7 @@ registerSchema({
6820
7029
  "no-cache": { type: "boolean", description: "Skip cache", required: false }
6821
7030
  }
6822
7031
  });
6823
- var promotedTweetsCommand = defineCommand62({
7032
+ var promotedTweetsCommand = defineCommand64({
6824
7033
  meta: {
6825
7034
  name: "promoted-tweets",
6826
7035
  description: `List X Ads promoted tweets.
@@ -6874,11 +7083,11 @@ Examples:
6874
7083
  });
6875
7084
 
6876
7085
  // src/commands/ads/x/stats/index.ts
6877
- import { defineCommand as defineCommand67 } from "citty";
7086
+ import { defineCommand as defineCommand69 } from "citty";
6878
7087
 
6879
7088
  // src/commands/ads/x/stats/job.ts
6880
7089
  import { gunzipSync } from "zlib";
6881
- import { defineCommand as defineCommand63 } from "citty";
7090
+ import { defineCommand as defineCommand65 } from "citty";
6882
7091
  var POLL_INTERVAL_MS2 = 1e4;
6883
7092
  var DEADLINE_MS = 12 * 60 * 1e3;
6884
7093
  var RESULT_CACHE_TTL_MS = 6 * 60 * 60 * 1e3;
@@ -6948,7 +7157,7 @@ async function pollUntilDone(accountId, jobId) {
6948
7157
  function buildCacheKey(body) {
6949
7158
  return `stats-job:${JSON.stringify(body)}`;
6950
7159
  }
6951
- var statsJobCommand = defineCommand63({
7160
+ var statsJobCommand = defineCommand65({
6952
7161
  meta: {
6953
7162
  name: "job",
6954
7163
  description: `Async X Ads stats job, sync from the CLI's perspective. Creates \u2192 polls \u2192 downloads \u2192 returns.
@@ -7053,7 +7262,7 @@ For fine-grained control (don't wait, poll yourself), use:
7053
7262
  });
7054
7263
 
7055
7264
  // src/commands/ads/x/stats/job-create.ts
7056
- import { defineCommand as defineCommand64 } from "citty";
7265
+ import { defineCommand as defineCommand66 } from "citty";
7057
7266
  registerSchema({
7058
7267
  command: "ads.x.statsJobCreate",
7059
7268
  description: "Create an asynchronous X Ads stats job (range up to 90 days non-segmented, 45 days segmented). Returns a job id; poll with `stats job-status`. Times must be ISO 8601 hour-aligned.",
@@ -7076,7 +7285,7 @@ function parseCsv3(v) {
7076
7285
  const parts = v.split(",").map((s) => s.trim()).filter(Boolean);
7077
7286
  return parts.length > 0 ? parts : void 0;
7078
7287
  }
7079
- var statsJobCreateCommand = defineCommand64({
7288
+ var statsJobCreateCommand = defineCommand66({
7080
7289
  meta: {
7081
7290
  name: "job-create",
7082
7291
  description: `Create an async X Ads stats job (up to 90 days, supports segmentation).
@@ -7139,7 +7348,7 @@ Examples:
7139
7348
  });
7140
7349
 
7141
7350
  // src/commands/ads/x/stats/job-status.ts
7142
- import { defineCommand as defineCommand65 } from "citty";
7351
+ import { defineCommand as defineCommand67 } from "citty";
7143
7352
  registerSchema({
7144
7353
  command: "ads.x.statsJobStatus",
7145
7354
  description: "Check the status of one or more X Ads stats jobs. Returns status (PROCESSING|SUCCESS|FAILED) and a downloadable url when SUCCESS. Pass --job-id or --job-ids (CSV).",
@@ -7149,7 +7358,7 @@ registerSchema({
7149
7358
  "job-ids": { type: "string", description: "CSV of job IDs", required: false }
7150
7359
  }
7151
7360
  });
7152
- var statsJobStatusCommand = defineCommand65({
7361
+ var statsJobStatusCommand = defineCommand67({
7153
7362
  meta: {
7154
7363
  name: "job-status",
7155
7364
  description: `Poll the status of an async X Ads stats job.
@@ -7190,7 +7399,7 @@ Examples:
7190
7399
  });
7191
7400
 
7192
7401
  // src/commands/ads/x/stats/sync.ts
7193
- import { defineCommand as defineCommand66 } from "citty";
7402
+ import { defineCommand as defineCommand68 } from "citty";
7194
7403
 
7195
7404
  // src/commands/ads/x/presets.ts
7196
7405
  var X_STATS_PRESETS = [
@@ -7349,7 +7558,7 @@ async function runSync(args, q) {
7349
7558
  process.exit(1);
7350
7559
  }
7351
7560
  }
7352
- var statsSyncCommand = defineCommand66({
7561
+ var statsSyncCommand = defineCommand68({
7353
7562
  meta: {
7354
7563
  name: "sync",
7355
7564
  description: `Synchronous X Ads analytics (max 7-day window).
@@ -7392,7 +7601,7 @@ Examples:
7392
7601
  });
7393
7602
 
7394
7603
  // src/commands/ads/x/stats/index.ts
7395
- var statsCommand = defineCommand67({
7604
+ var statsCommand = defineCommand69({
7396
7605
  meta: {
7397
7606
  name: "stats",
7398
7607
  description: `X Ads analytics. Sync (\u22647 days, no segmentation) or async jobs (\u226490 days, segmentable).
@@ -7420,7 +7629,7 @@ Examples:
7420
7629
  });
7421
7630
 
7422
7631
  // src/commands/ads/x/targeting-constants.ts
7423
- import { defineCommand as defineCommand68 } from "citty";
7632
+ import { defineCommand as defineCommand70 } from "citty";
7424
7633
  var ALLOWED_CONSTANTS = [
7425
7634
  "locations",
7426
7635
  "interests",
@@ -7448,7 +7657,7 @@ registerSchema({
7448
7657
  "no-cache": { type: "boolean", description: "Skip cache", required: false }
7449
7658
  }
7450
7659
  });
7451
- var targetingConstantsCommand = defineCommand68({
7660
+ var targetingConstantsCommand = defineCommand70({
7452
7661
  meta: {
7453
7662
  name: "targeting-constants",
7454
7663
  description: `Lookup X Ads targeting constants.
@@ -7498,7 +7707,7 @@ Examples:
7498
7707
  });
7499
7708
 
7500
7709
  // src/commands/ads/x/targeting-criteria.ts
7501
- import { defineCommand as defineCommand69 } from "citty";
7710
+ import { defineCommand as defineCommand71 } from "citty";
7502
7711
  registerSchema({
7503
7712
  command: "ads.x.targetingCriteria",
7504
7713
  description: "List targeting criteria attached to line items in an X Ads account. Returns targeting_type, targeting_value, name, operator_type per criterion. Filter by line-item-ids.",
@@ -7508,7 +7717,7 @@ registerSchema({
7508
7717
  "no-cache": { type: "boolean", description: "Skip cache", required: false }
7509
7718
  }
7510
7719
  });
7511
- var targetingCriteriaCommand = defineCommand69({
7720
+ var targetingCriteriaCommand = defineCommand71({
7512
7721
  meta: {
7513
7722
  name: "targeting-criteria",
7514
7723
  description: `List targeting criteria attached to line items.
@@ -7559,7 +7768,7 @@ Examples:
7559
7768
  });
7560
7769
 
7561
7770
  // src/commands/ads/x/index.ts
7562
- var xCommand = defineCommand70({
7771
+ var xCommand = defineCommand72({
7563
7772
  meta: {
7564
7773
  name: "x",
7565
7774
  description: `X (Twitter) Ads commands. Read campaigns, line items, promoted tweets, creatives, audiences, and analytics.
@@ -7597,7 +7806,7 @@ The CLI auto-detects --account-id when exactly one X Ads account is connected, o
7597
7806
  });
7598
7807
 
7599
7808
  // src/commands/ads/index.ts
7600
- var adsCommand = defineCommand71({
7809
+ var adsCommand = defineCommand73({
7601
7810
  meta: {
7602
7811
  name: "ads",
7603
7812
  description: `Ad platform commands. Each platform exposes its own native command surface \u2014 no forced parity.
@@ -7627,11 +7836,11 @@ Examples:
7627
7836
  });
7628
7837
 
7629
7838
  // src/commands/canvas/index.ts
7630
- import { defineCommand as defineCommand78 } from "citty";
7839
+ import { defineCommand as defineCommand80 } from "citty";
7631
7840
 
7632
7841
  // src/commands/canvas/catalog.ts
7633
- import { defineCommand as defineCommand72 } from "citty";
7634
- var catalogCommand = defineCommand72({
7842
+ import { defineCommand as defineCommand74 } from "citty";
7843
+ var catalogCommand = defineCommand74({
7635
7844
  meta: {
7636
7845
  name: "catalog",
7637
7846
  description: "Print the agent-facing node catalog (JSON Schema). Includes every registered node grouped by category."
@@ -7648,9 +7857,9 @@ import { execFile } from "child_process";
7648
7857
  import { readdir, readFile, stat } from "fs/promises";
7649
7858
  import path from "path";
7650
7859
  import { promisify } from "util";
7651
- import { defineCommand as defineCommand73 } from "citty";
7860
+ import { defineCommand as defineCommand75 } from "citty";
7652
7861
  var execFileAsync = promisify(execFile);
7653
- var inspectCommand = defineCommand73({
7862
+ var inspectCommand = defineCommand75({
7654
7863
  meta: {
7655
7864
  name: "inspect",
7656
7865
  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."
@@ -7759,7 +7968,7 @@ async function probeDuration(filePath) {
7759
7968
  // src/commands/canvas/run.ts
7760
7969
  import { readFile as readFile2 } from "fs/promises";
7761
7970
  import path2 from "path";
7762
- import { defineCommand as defineCommand74 } from "citty";
7971
+ import { defineCommand as defineCommand76 } from "citty";
7763
7972
 
7764
7973
  // src/commands/canvas/placeholders.ts
7765
7974
  function unsuppliedPlaceholderAssets(canvas) {
@@ -7778,7 +7987,7 @@ function unsuppliedPlaceholderAssets(canvas) {
7778
7987
  }
7779
7988
 
7780
7989
  // src/commands/canvas/run.ts
7781
- var runCommand = defineCommand74({
7990
+ var runCommand = defineCommand76({
7782
7991
  meta: { name: "run", description: "Validate and execute a canvas JSON file." },
7783
7992
  args: {
7784
7993
  file: { type: "positional", required: true, description: "Path to canvas JSON" },
@@ -7863,7 +8072,7 @@ var runCommand = defineCommand74({
7863
8072
  // src/commands/canvas/scaffold-static-ad.ts
7864
8073
  import { readFile as readFile3, writeFile } from "fs/promises";
7865
8074
  import path3 from "path";
7866
- import { defineCommand as defineCommand75 } from "citty";
8075
+ import { defineCommand as defineCommand77 } from "citty";
7867
8076
 
7868
8077
  // src/engine/scaffold/staticAd.ts
7869
8078
  import { z as z2 } from "zod";
@@ -8182,7 +8391,7 @@ async function runVisionPasses(canvas) {
8182
8391
  return fail("read_outputs", e instanceof Error ? e.message : String(e));
8183
8392
  }
8184
8393
  }
8185
- var scaffoldStaticAdCommand = defineCommand75({
8394
+ var scaffoldStaticAdCommand = defineCommand77({
8186
8395
  meta: {
8187
8396
  name: "scaffold-static-ad",
8188
8397
  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. Edit prompt.json and drop the real assets, then `baker canvas run` it."
@@ -8276,7 +8485,7 @@ var scaffoldStaticAdCommand = defineCommand75({
8276
8485
  // src/commands/canvas/scaffold-video.ts
8277
8486
  import { cp, mkdir, readFile as readFile5, writeFile as writeFile2 } from "fs/promises";
8278
8487
  import path5 from "path";
8279
- import { defineCommand as defineCommand76 } from "citty";
8488
+ import { defineCommand as defineCommand78 } from "citty";
8280
8489
 
8281
8490
  // src/engine/nodes/local/lib/sceneDetect.ts
8282
8491
  import { execFile as execFile2 } from "child_process";
@@ -10876,7 +11085,7 @@ async function runAnalysisPasses(deconstructCanvas, selectModel) {
10876
11085
  return fail2("deconstruct", e instanceof Error ? e.message : String(e));
10877
11086
  }
10878
11087
  }
10879
- var scaffoldVideoCommand = defineCommand76({
11088
+ var scaffoldVideoCommand = defineCommand78({
10880
11089
  meta: {
10881
11090
  name: "scaffold-video",
10882
11091
  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 prompt.json as the editable 'prompt') 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 prompt.json, drop the real source images, then `baker canvas run`."
@@ -11019,8 +11228,8 @@ var scaffoldVideoCommand = defineCommand76({
11019
11228
  // src/commands/canvas/validate.ts
11020
11229
  import { readFile as readFile6 } from "fs/promises";
11021
11230
  import path6 from "path";
11022
- import { defineCommand as defineCommand77 } from "citty";
11023
- var validateCommand = defineCommand77({
11231
+ import { defineCommand as defineCommand79 } from "citty";
11232
+ var validateCommand = defineCommand79({
11024
11233
  meta: {
11025
11234
  name: "validate",
11026
11235
  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)."
@@ -11062,7 +11271,7 @@ var validateCommand = defineCommand77({
11062
11271
  });
11063
11272
 
11064
11273
  // src/commands/canvas/index.ts
11065
- var canvasCommand = defineCommand78({
11274
+ var canvasCommand = defineCommand80({
11066
11275
  meta: {
11067
11276
  name: "canvas",
11068
11277
  description: `Run Baker creative canvas JSON files locally. Local nodes execute in-process; remote nodes POST to the Convex backend gateway.
@@ -11088,10 +11297,10 @@ Subcommands:
11088
11297
  });
11089
11298
 
11090
11299
  // src/commands/ga4/index.ts
11091
- import { defineCommand as defineCommand82 } from "citty";
11300
+ import { defineCommand as defineCommand84 } from "citty";
11092
11301
 
11093
11302
  // src/commands/ga4/audit.ts
11094
- import { defineCommand as defineCommand79 } from "citty";
11303
+ import { defineCommand as defineCommand81 } from "citty";
11095
11304
 
11096
11305
  // src/commands/ga4/resolve.ts
11097
11306
  async function fetchProperties(useCache = true) {
@@ -11154,7 +11363,7 @@ registerSchema({
11154
11363
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
11155
11364
  }
11156
11365
  });
11157
- var auditCommand2 = defineCommand79({
11366
+ var auditCommand2 = defineCommand81({
11158
11367
  meta: {
11159
11368
  name: "audit",
11160
11369
  description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
@@ -11206,7 +11415,7 @@ Examples:
11206
11415
  });
11207
11416
 
11208
11417
  // src/commands/ga4/properties.ts
11209
- import { defineCommand as defineCommand80 } from "citty";
11418
+ import { defineCommand as defineCommand82 } from "citty";
11210
11419
  registerSchema({
11211
11420
  command: "ga4.properties",
11212
11421
  description: "List all accessible GA4 properties. Returns property IDs needed for query and audit commands. Run this first to find property IDs.",
@@ -11214,7 +11423,7 @@ registerSchema({
11214
11423
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
11215
11424
  }
11216
11425
  });
11217
- var propertiesCommand = defineCommand80({
11426
+ var propertiesCommand = defineCommand82({
11218
11427
  meta: {
11219
11428
  name: "properties",
11220
11429
  description: `List accessible GA4 properties.
@@ -11264,7 +11473,7 @@ Examples:
11264
11473
  // src/commands/ga4/query.ts
11265
11474
  import { appendFileSync as appendFileSync2, existsSync as existsSync4, readFileSync as readFileSync6, writeFileSync as writeFileSync4 } from "fs";
11266
11475
  import { resolve as resolve2 } from "path";
11267
- import { defineCommand as defineCommand81 } from "citty";
11476
+ import { defineCommand as defineCommand83 } from "citty";
11268
11477
 
11269
11478
  // src/commands/ga4/presets.ts
11270
11479
  var GA4_PRESETS = [
@@ -11396,7 +11605,7 @@ function handleError(err) {
11396
11605
  });
11397
11606
  process.exit(1);
11398
11607
  }
11399
- var queryCommand2 = defineCommand81({
11608
+ var queryCommand2 = defineCommand83({
11400
11609
  meta: {
11401
11610
  name: "query",
11402
11611
  description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
@@ -11467,7 +11676,7 @@ Free-form (escape hatch):
11467
11676
  });
11468
11677
 
11469
11678
  // src/commands/ga4/index.ts
11470
- var ga4Command = defineCommand82({
11679
+ var ga4Command = defineCommand84({
11471
11680
  meta: {
11472
11681
  name: "ga4",
11473
11682
  description: `Google Analytics 4 commands. Audit property config, run playbook-aligned reports.
@@ -11490,12 +11699,12 @@ Examples:
11490
11699
  });
11491
11700
 
11492
11701
  // src/commands/gsc/index.ts
11493
- import { defineCommand as defineCommand86 } from "citty";
11702
+ import { defineCommand as defineCommand88 } from "citty";
11494
11703
 
11495
11704
  // src/commands/gsc/query.ts
11496
11705
  import { appendFileSync as appendFileSync3, existsSync as existsSync5, readFileSync as readFileSync7, writeFileSync as writeFileSync5 } from "fs";
11497
11706
  import { resolve as resolve3 } from "path";
11498
- import { defineCommand as defineCommand83 } from "citty";
11707
+ import { defineCommand as defineCommand85 } from "citty";
11499
11708
 
11500
11709
  // src/commands/gsc/presets.ts
11501
11710
  var GSC_PRESETS = [
@@ -11683,7 +11892,7 @@ function handleError2(err) {
11683
11892
  });
11684
11893
  process.exit(1);
11685
11894
  }
11686
- var queryCommand3 = defineCommand83({
11895
+ var queryCommand3 = defineCommand85({
11687
11896
  meta: {
11688
11897
  name: "query",
11689
11898
  description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
@@ -11761,7 +11970,7 @@ Free-form (escape hatch):
11761
11970
  });
11762
11971
 
11763
11972
  // src/commands/gsc/sitemaps.ts
11764
- import { defineCommand as defineCommand84 } from "citty";
11973
+ import { defineCommand as defineCommand86 } from "citty";
11765
11974
  registerSchema({
11766
11975
  command: "gsc.sitemaps",
11767
11976
  description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
@@ -11770,7 +11979,7 @@ registerSchema({
11770
11979
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
11771
11980
  }
11772
11981
  });
11773
- var sitemapsCommand = defineCommand84({
11982
+ var sitemapsCommand = defineCommand86({
11774
11983
  meta: {
11775
11984
  name: "sitemaps",
11776
11985
  description: `List sitemaps for a site. Check health and errors.
@@ -11820,7 +12029,7 @@ Examples:
11820
12029
  });
11821
12030
 
11822
12031
  // src/commands/gsc/sites.ts
11823
- import { defineCommand as defineCommand85 } from "citty";
12032
+ import { defineCommand as defineCommand87 } from "citty";
11824
12033
  registerSchema({
11825
12034
  command: "gsc.sites",
11826
12035
  description: "List all verified Google Search Console sites. Returns site URLs needed for query and sitemaps commands.",
@@ -11828,7 +12037,7 @@ registerSchema({
11828
12037
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
11829
12038
  }
11830
12039
  });
11831
- var sitesCommand = defineCommand85({
12040
+ var sitesCommand = defineCommand87({
11832
12041
  meta: {
11833
12042
  name: "sites",
11834
12043
  description: `List verified Search Console sites.
@@ -11876,7 +12085,7 @@ Examples:
11876
12085
  });
11877
12086
 
11878
12087
  // src/commands/gsc/index.ts
11879
- var gscCommand = defineCommand86({
12088
+ var gscCommand = defineCommand88({
11880
12089
  meta: {
11881
12090
  name: "gsc",
11882
12091
  description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
@@ -11899,10 +12108,10 @@ Examples:
11899
12108
  });
11900
12109
 
11901
12110
  // src/commands/images/index.ts
11902
- import { defineCommand as defineCommand109 } from "citty";
12111
+ import { defineCommand as defineCommand111 } from "citty";
11903
12112
 
11904
12113
  // src/commands/images/crop.ts
11905
- import { defineCommand as defineCommand87 } from "citty";
12114
+ import { defineCommand as defineCommand89 } from "citty";
11906
12115
 
11907
12116
  // src/lib/image/crop-sprite.ts
11908
12117
  import sharp from "sharp";
@@ -12027,7 +12236,7 @@ function emitError2(err) {
12027
12236
  }
12028
12237
  process.exit(1);
12029
12238
  }
12030
- var cropCommand = defineCommand87({
12239
+ var cropCommand = defineCommand89({
12031
12240
  meta: {
12032
12241
  name: "crop",
12033
12242
  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"
@@ -12063,7 +12272,7 @@ var cropCommand = defineCommand87({
12063
12272
  });
12064
12273
 
12065
12274
  // src/commands/images/delete.ts
12066
- import { defineCommand as defineCommand88 } from "citty";
12275
+ import { defineCommand as defineCommand90 } from "citty";
12067
12276
  registerSchema({
12068
12277
  command: "images.delete",
12069
12278
  description: "Delete an image by ID",
@@ -12077,7 +12286,7 @@ registerSchema({
12077
12286
  }
12078
12287
  }
12079
12288
  });
12080
- var deleteCommand = defineCommand88({
12289
+ var deleteCommand = defineCommand90({
12081
12290
  meta: {
12082
12291
  name: "delete",
12083
12292
  description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
@@ -12118,7 +12327,7 @@ var deleteCommand = defineCommand88({
12118
12327
  });
12119
12328
 
12120
12329
  // src/commands/images/dimensions.ts
12121
- import { defineCommand as defineCommand89 } from "citty";
12330
+ import { defineCommand as defineCommand91 } from "citty";
12122
12331
 
12123
12332
  // src/lib/image/dimensions.ts
12124
12333
  import { imageSize } from "image-size";
@@ -12141,7 +12350,7 @@ registerSchema({
12141
12350
  target: { type: "string", description: "Local file path or remote http(s) URL", required: true }
12142
12351
  }
12143
12352
  });
12144
- var dimensionsCommand = defineCommand89({
12353
+ var dimensionsCommand = defineCommand91({
12145
12354
  meta: {
12146
12355
  name: "dimensions",
12147
12356
  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"
@@ -12185,7 +12394,7 @@ var dimensionsCommand = defineCommand89({
12185
12394
  });
12186
12395
 
12187
12396
  // src/commands/images/extract.ts
12188
- import { defineCommand as defineCommand90 } from "citty";
12397
+ import { defineCommand as defineCommand92 } from "citty";
12189
12398
  registerSchema({
12190
12399
  command: "images.extract",
12191
12400
  description: "Extract images from a URL via Firecrawl (formats: images).",
@@ -12201,7 +12410,7 @@ registerSchema({
12201
12410
  }
12202
12411
  }
12203
12412
  });
12204
- var extractCommand = defineCommand90({
12413
+ var extractCommand = defineCommand92({
12205
12414
  meta: {
12206
12415
  name: "extract",
12207
12416
  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"
@@ -12239,7 +12448,7 @@ var extractCommand = defineCommand90({
12239
12448
  });
12240
12449
 
12241
12450
  // src/commands/images/find.ts
12242
- import { defineCommand as defineCommand91 } from "citty";
12451
+ import { defineCommand as defineCommand93 } from "citty";
12243
12452
  registerSchema({
12244
12453
  command: "images.find",
12245
12454
  description: "Fanout image search: library first, then opted-in external providers.",
@@ -12271,7 +12480,7 @@ registerSchema({
12271
12480
  }
12272
12481
  }
12273
12482
  });
12274
- var findCommand = defineCommand91({
12483
+ var findCommand = defineCommand93({
12275
12484
  meta: {
12276
12485
  name: "find",
12277
12486
  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"
@@ -12318,7 +12527,7 @@ var findCommand = defineCommand91({
12318
12527
 
12319
12528
  // src/commands/images/generate.ts
12320
12529
  import { readFile as readFile8 } from "fs/promises";
12321
- import { defineCommand as defineCommand92 } from "citty";
12530
+ import { defineCommand as defineCommand94 } from "citty";
12322
12531
  import sharp2 from "sharp";
12323
12532
  var GENERATE_TIMEOUT_MS = 18e4;
12324
12533
  var REFERENCE_MAX_EDGE = 1536;
@@ -12414,7 +12623,7 @@ async function resolveReferences(spec) {
12414
12623
  }
12415
12624
  return out;
12416
12625
  }
12417
- var generateCommand = defineCommand92({
12626
+ var generateCommand = defineCommand94({
12418
12627
  meta: {
12419
12628
  name: "generate",
12420
12629
  description: "Generate an image with AI and store it in the library (cost-tracked per request via OpenRouter usage). Models mirror the canvas: openai/gpt-5.4-image-2 (default \u2014 photoreal, cleanest text, best for ad/landing reproduction), google/gemini-3-pro-image-preview (Nano Banana Pro), google/gemini-3.5-flash & google/gemini-3.1-flash-image-preview (fast, extreme aspect ratios), recraft/recraft-v4.1-pro-vector (vector/SVG-style with palette control). The result is auto-ingested (describe + embed), so the next `baker images library` query finds it. Pass --reference with image URLs and/or local file paths (Pinterest, stock, brand assets, sandbox files) to ground generation in reality.\n\nExamples:\n baker images generate 'a friendly golden retriever sitting in a bright modern living room' --aspect-ratio 16:9\n baker images generate 'hero shot of a matte black water bottle on marble' --model google/gemini-3-pro-image-preview --image-size 2K\n baker images generate 'lifestyle photo matching this mood' --reference 'https://\u2026/ref1.jpg,https://\u2026/ref2.jpg'\n baker images generate 'put this product on a marble countertop, soft daylight' --reference './src/brand/logos/product.png,./refs/kitchen-mood.jpg'\n baker images generate 'flat geometric mascot, brand palette' --model recraft/recraft-v4.1-pro-vector --rgb-colors '[[10,10,10],[255,80,0]]'"
@@ -12466,7 +12675,7 @@ var generateCommand = defineCommand92({
12466
12675
  });
12467
12676
 
12468
12677
  // src/commands/images/get.ts
12469
- import { defineCommand as defineCommand93 } from "citty";
12678
+ import { defineCommand as defineCommand95 } from "citty";
12470
12679
  registerSchema({
12471
12680
  command: "images.get",
12472
12681
  description: "Get a single image by ID",
@@ -12474,7 +12683,7 @@ registerSchema({
12474
12683
  id: { type: "string", description: "Image ID", required: true }
12475
12684
  }
12476
12685
  });
12477
- var getCommand2 = defineCommand93({
12686
+ var getCommand2 = defineCommand95({
12478
12687
  meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
12479
12688
  args: {
12480
12689
  id: { type: "positional", description: "Image ID", required: false },
@@ -12510,7 +12719,7 @@ var getCommand2 = defineCommand93({
12510
12719
  });
12511
12720
 
12512
12721
  // src/commands/images/gif.ts
12513
- import { defineCommand as defineCommand94 } from "citty";
12722
+ import { defineCommand as defineCommand96 } from "citty";
12514
12723
  registerSchema({
12515
12724
  command: "images.gif",
12516
12725
  description: "Search Giphy for GIFs / reaction memes (paid social creative).",
@@ -12542,7 +12751,7 @@ registerSchema({
12542
12751
  }
12543
12752
  }
12544
12753
  });
12545
- var gifCommand = defineCommand94({
12754
+ var gifCommand = defineCommand96({
12546
12755
  meta: {
12547
12756
  name: "gif",
12548
12757
  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"
@@ -12589,7 +12798,7 @@ var gifCommand = defineCommand94({
12589
12798
  });
12590
12799
 
12591
12800
  // src/commands/images/google.ts
12592
- import { defineCommand as defineCommand95 } from "citty";
12801
+ import { defineCommand as defineCommand97 } from "citty";
12593
12802
  registerSchema({
12594
12803
  command: "images.google",
12595
12804
  description: "Google Images search via the official Custom Search JSON API. Unverified source \u2014 inspect before placing.",
@@ -12625,7 +12834,7 @@ registerSchema({
12625
12834
  }
12626
12835
  }
12627
12836
  });
12628
- var googleCommand2 = defineCommand95({
12837
+ var googleCommand2 = defineCommand97({
12629
12838
  meta: {
12630
12839
  name: "google",
12631
12840
  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"
@@ -12673,7 +12882,7 @@ var googleCommand2 = defineCommand95({
12673
12882
  });
12674
12883
 
12675
12884
  // src/commands/images/icon.ts
12676
- import { defineCommand as defineCommand96 } from "citty";
12885
+ import { defineCommand as defineCommand98 } from "citty";
12677
12886
  registerSchema({
12678
12887
  command: "images.icon",
12679
12888
  description: "Icon lookup via Iconify (200+ icon sets, free CDN).",
@@ -12699,7 +12908,7 @@ registerSchema({
12699
12908
  }
12700
12909
  }
12701
12910
  });
12702
- var iconCommand = defineCommand96({
12911
+ var iconCommand = defineCommand98({
12703
12912
  meta: {
12704
12913
  name: "icon",
12705
12914
  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'"
@@ -12739,7 +12948,7 @@ var iconCommand = defineCommand96({
12739
12948
  });
12740
12949
 
12741
12950
  // src/commands/images/ingest.ts
12742
- import { defineCommand as defineCommand97 } from "citty";
12951
+ import { defineCommand as defineCommand99 } from "citty";
12743
12952
  registerSchema({
12744
12953
  command: "images.ingest",
12745
12954
  description: "Ingest a remote image URL into the library (full describe + embed).",
@@ -12751,7 +12960,7 @@ registerSchema({
12751
12960
  context: { type: "string", description: "Description context hint", required: false }
12752
12961
  }
12753
12962
  });
12754
- var ingestCommand = defineCommand97({
12963
+ var ingestCommand = defineCommand99({
12755
12964
  meta: {
12756
12965
  name: "ingest",
12757
12966
  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"
@@ -12793,7 +13002,7 @@ var ingestCommand = defineCommand97({
12793
13002
  });
12794
13003
 
12795
13004
  // src/commands/images/library.ts
12796
- import { defineCommand as defineCommand98 } from "citty";
13005
+ import { defineCommand as defineCommand100 } from "citty";
12797
13006
  registerSchema({
12798
13007
  command: "images.library",
12799
13008
  description: "Search the company image library. Returns only ready images.",
@@ -12819,7 +13028,7 @@ registerSchema({
12819
13028
  }
12820
13029
  }
12821
13030
  });
12822
- var libraryCommand = defineCommand98({
13031
+ var libraryCommand = defineCommand100({
12823
13032
  meta: {
12824
13033
  name: "library",
12825
13034
  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"
@@ -12876,7 +13085,7 @@ var libraryCommand = defineCommand98({
12876
13085
  });
12877
13086
 
12878
13087
  // src/commands/images/logo.ts
12879
- import { defineCommand as defineCommand99 } from "citty";
13088
+ import { defineCommand as defineCommand101 } from "citty";
12880
13089
  registerSchema({
12881
13090
  command: "images.logo",
12882
13091
  description: "Brand logo lookup via Brandfetch CDN (fallback/404). Auto-ingests by default.",
@@ -12901,7 +13110,7 @@ registerSchema({
12901
13110
  }
12902
13111
  }
12903
13112
  });
12904
- var logoCommand = defineCommand99({
13113
+ var logoCommand = defineCommand101({
12905
13114
  meta: {
12906
13115
  name: "logo",
12907
13116
  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"
@@ -12939,7 +13148,7 @@ var logoCommand = defineCommand99({
12939
13148
  });
12940
13149
 
12941
13150
  // src/commands/images/normalize.ts
12942
- import { defineCommand as defineCommand100 } from "citty";
13151
+ import { defineCommand as defineCommand102 } from "citty";
12943
13152
 
12944
13153
  // src/lib/image/color-changer.ts
12945
13154
  import quantize from "quantize";
@@ -13671,7 +13880,7 @@ function coerceRawArgs(args) {
13671
13880
  "dry-run": bool(args["dry-run"])
13672
13881
  };
13673
13882
  }
13674
- var normalizeCommand = defineCommand100({
13883
+ var normalizeCommand = defineCommand102({
13675
13884
  meta: {
13676
13885
  name: "normalize",
13677
13886
  description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
@@ -13726,7 +13935,7 @@ Examples:
13726
13935
  });
13727
13936
 
13728
13937
  // src/commands/images/pinterest.ts
13729
- import { defineCommand as defineCommand101 } from "citty";
13938
+ import { defineCommand as defineCommand103 } from "citty";
13730
13939
  registerSchema({
13731
13940
  command: "images.pinterest",
13732
13941
  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.",
@@ -13746,7 +13955,7 @@ registerSchema({
13746
13955
  }
13747
13956
  }
13748
13957
  });
13749
- var pinterestCommand = defineCommand101({
13958
+ var pinterestCommand = defineCommand103({
13750
13959
  meta: {
13751
13960
  name: "pinterest",
13752
13961
  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'"
@@ -13786,7 +13995,7 @@ var pinterestCommand = defineCommand101({
13786
13995
  });
13787
13996
 
13788
13997
  // src/commands/images/screenshot.ts
13789
- import { defineCommand as defineCommand102 } from "citty";
13998
+ import { defineCommand as defineCommand104 } from "citty";
13790
13999
  registerSchema({
13791
14000
  command: "images.screenshot",
13792
14001
  description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
@@ -13802,7 +14011,7 @@ registerSchema({
13802
14011
  }
13803
14012
  }
13804
14013
  });
13805
- var screenshotCommand = defineCommand102({
14014
+ var screenshotCommand = defineCommand104({
13806
14015
  meta: {
13807
14016
  name: "screenshot",
13808
14017
  description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
@@ -13852,7 +14061,7 @@ var screenshotCommand = defineCommand102({
13852
14061
  });
13853
14062
 
13854
14063
  // src/commands/images/search.ts
13855
- import { defineCommand as defineCommand103 } from "citty";
14064
+ import { defineCommand as defineCommand105 } from "citty";
13856
14065
  registerSchema({
13857
14066
  command: "images.search",
13858
14067
  description: "Search images by text query. Only returns ready images.",
@@ -13868,7 +14077,7 @@ registerSchema({
13868
14077
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
13869
14078
  }
13870
14079
  });
13871
- var searchCommand = defineCommand103({
14080
+ var searchCommand = defineCommand105({
13872
14081
  meta: {
13873
14082
  name: "search",
13874
14083
  description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
@@ -13928,7 +14137,7 @@ var searchCommand = defineCommand103({
13928
14137
  });
13929
14138
 
13930
14139
  // src/commands/images/sticker.ts
13931
- import { defineCommand as defineCommand104 } from "citty";
14140
+ import { defineCommand as defineCommand106 } from "citty";
13932
14141
  registerSchema({
13933
14142
  command: "images.sticker",
13934
14143
  description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
@@ -13960,7 +14169,7 @@ registerSchema({
13960
14169
  }
13961
14170
  }
13962
14171
  });
13963
- var stickerCommand = defineCommand104({
14172
+ var stickerCommand = defineCommand106({
13964
14173
  meta: {
13965
14174
  name: "sticker",
13966
14175
  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"
@@ -14007,7 +14216,7 @@ var stickerCommand = defineCommand104({
14007
14216
  });
14008
14217
 
14009
14218
  // src/commands/images/stock.ts
14010
- import { defineCommand as defineCommand105 } from "citty";
14219
+ import { defineCommand as defineCommand107 } from "citty";
14011
14220
  registerSchema({
14012
14221
  command: "images.stock",
14013
14222
  description: "Stock photo, vector illustration, icon-set, and PSD search via Magnific (Freepik's developer API).",
@@ -14065,7 +14274,7 @@ registerSchema({
14065
14274
  }
14066
14275
  }
14067
14276
  });
14068
- var stockCommand = defineCommand105({
14277
+ var stockCommand = defineCommand107({
14069
14278
  meta: {
14070
14279
  name: "stock",
14071
14280
  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"
@@ -14123,7 +14332,7 @@ var stockCommand = defineCommand105({
14123
14332
  // src/commands/images/upload.ts
14124
14333
  import { readFile as readFile9 } from "fs/promises";
14125
14334
  import { extname as extname2 } from "path";
14126
- import { defineCommand as defineCommand106 } from "citty";
14335
+ import { defineCommand as defineCommand108 } from "citty";
14127
14336
  var MIME_MAP = {
14128
14337
  ".png": "image/png",
14129
14338
  ".jpg": "image/jpeg",
@@ -14178,7 +14387,7 @@ function detectContentType(filePath) {
14178
14387
  }
14179
14388
  return mime;
14180
14389
  }
14181
- var uploadCommand = defineCommand106({
14390
+ var uploadCommand = defineCommand108({
14182
14391
  meta: {
14183
14392
  name: "upload",
14184
14393
  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'"
@@ -14271,7 +14480,7 @@ async function uploadLocal(target, args) {
14271
14480
  }
14272
14481
 
14273
14482
  // src/commands/images/upscale.ts
14274
- import { defineCommand as defineCommand107 } from "citty";
14483
+ import { defineCommand as defineCommand109 } from "citty";
14275
14484
  registerSchema({
14276
14485
  command: "images.upscale",
14277
14486
  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).",
@@ -14286,7 +14495,7 @@ registerSchema({
14286
14495
  }
14287
14496
  });
14288
14497
  var POLL_INTERVAL_MS3 = 1500;
14289
- var upscaleCommand = defineCommand107({
14498
+ var upscaleCommand = defineCommand109({
14290
14499
  meta: {
14291
14500
  name: "upscale",
14292
14501
  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"
@@ -14341,7 +14550,7 @@ var upscaleCommand = defineCommand107({
14341
14550
  });
14342
14551
 
14343
14552
  // src/commands/images/use.ts
14344
- import { defineCommand as defineCommand108 } from "citty";
14553
+ import { defineCommand as defineCommand110 } from "citty";
14345
14554
  registerSchema({
14346
14555
  command: "images.use",
14347
14556
  description: "Ingest a URL and wait for the library record to be ready.",
@@ -14357,7 +14566,7 @@ registerSchema({
14357
14566
  }
14358
14567
  });
14359
14568
  var POLL_INTERVAL_MS4 = 1500;
14360
- var useCommand = defineCommand108({
14569
+ var useCommand = defineCommand110({
14361
14570
  meta: {
14362
14571
  name: "use",
14363
14572
  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"
@@ -14403,7 +14612,7 @@ var useCommand = defineCommand108({
14403
14612
  });
14404
14613
 
14405
14614
  // src/commands/images/index.ts
14406
- var imagesCommand = defineCommand109({
14615
+ var imagesCommand = defineCommand111({
14407
14616
  meta: {
14408
14617
  name: "images",
14409
14618
  description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
@@ -14469,10 +14678,10 @@ Paid transforms (run on the Convex backend, cost-tracked):
14469
14678
  });
14470
14679
 
14471
14680
  // src/commands/research/index.ts
14472
- import { defineCommand as defineCommand120 } from "citty";
14681
+ import { defineCommand as defineCommand122 } from "citty";
14473
14682
 
14474
14683
  // src/commands/research/advertisers.ts
14475
- import { defineCommand as defineCommand110 } from "citty";
14684
+ import { defineCommand as defineCommand112 } from "citty";
14476
14685
 
14477
14686
  // src/commands/research/output.ts
14478
14687
  var RESEARCH_DATA_NOTE = "Estimates based on third-party SERP data \u2014 not exact figures. Use for directional insights, not precise measurement.";
@@ -14585,7 +14794,7 @@ var FIELDS3 = {
14585
14794
  etv: "Estimated traffic value (USD)",
14586
14795
  visibility: "SERP visibility score (0-1)"
14587
14796
  };
14588
- var advertisersCommand = defineCommand110({
14797
+ var advertisersCommand = defineCommand112({
14589
14798
  meta: {
14590
14799
  name: "advertisers",
14591
14800
  description: `Find domains competing for a keyword in Google SERPs.
@@ -14632,7 +14841,7 @@ Examples:
14632
14841
  });
14633
14842
 
14634
14843
  // src/commands/research/autocomplete.ts
14635
- import { defineCommand as defineCommand111 } from "citty";
14844
+ import { defineCommand as defineCommand113 } from "citty";
14636
14845
  registerSchema({
14637
14846
  command: "research.autocomplete",
14638
14847
  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).",
@@ -14655,7 +14864,7 @@ registerSchema({
14655
14864
  var FIELDS4 = {
14656
14865
  suggestion: "Autocomplete suggestion from Google"
14657
14866
  };
14658
- var autocompleteCommand = defineCommand111({
14867
+ var autocompleteCommand = defineCommand113({
14659
14868
  meta: {
14660
14869
  name: "autocomplete",
14661
14870
  description: `Get Google Autocomplete suggestions for keyword expansion.
@@ -14701,7 +14910,7 @@ Examples:
14701
14910
  });
14702
14911
 
14703
14912
  // src/commands/research/countries.ts
14704
- import { defineCommand as defineCommand112 } from "citty";
14913
+ import { defineCommand as defineCommand114 } from "citty";
14705
14914
  registerSchema({
14706
14915
  command: "research.countries",
14707
14916
  description: "List all supported country codes for --location flag in research commands.",
@@ -14758,7 +14967,7 @@ var FIELDS5 = {
14758
14967
  code: "Country code to pass as --location",
14759
14968
  name: "Country name"
14760
14969
  };
14761
- var countriesCommand = defineCommand112({
14970
+ var countriesCommand = defineCommand114({
14762
14971
  meta: {
14763
14972
  name: "countries",
14764
14973
  description: "List all supported country codes for --location flag."
@@ -14769,7 +14978,7 @@ var countriesCommand = defineCommand112({
14769
14978
  });
14770
14979
 
14771
14980
  // src/commands/research/intent.ts
14772
- import { defineCommand as defineCommand113 } from "citty";
14981
+ import { defineCommand as defineCommand115 } from "citty";
14773
14982
  registerSchema({
14774
14983
  command: "research.intent",
14775
14984
  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.",
@@ -14792,7 +15001,7 @@ var FIELDS6 = {
14792
15001
  intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
14793
15002
  probability: "Confidence score 0.0-1.0"
14794
15003
  };
14795
- var intentCommand = defineCommand113({
15004
+ var intentCommand = defineCommand115({
14796
15005
  meta: {
14797
15006
  name: "intent",
14798
15007
  description: `Classify Google Search intent for keywords. Returns intent type and confidence.
@@ -14840,7 +15049,7 @@ Examples:
14840
15049
  });
14841
15050
 
14842
15051
  // src/commands/research/keyword-gap.ts
14843
- import { defineCommand as defineCommand114 } from "citty";
15052
+ import { defineCommand as defineCommand116 } from "citty";
14844
15053
  registerSchema({
14845
15054
  command: "research.keyword-gap",
14846
15055
  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.",
@@ -14869,7 +15078,7 @@ var FIELDS7 = {
14869
15078
  cpc: "Cost per click USD",
14870
15079
  their_position: "Competitor's ranking position"
14871
15080
  };
14872
- var keywordGapCommand = defineCommand114({
15081
+ var keywordGapCommand = defineCommand116({
14873
15082
  meta: {
14874
15083
  name: "keyword-gap",
14875
15084
  description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
@@ -14943,7 +15152,7 @@ Examples:
14943
15152
  });
14944
15153
 
14945
15154
  // src/commands/research/keywords-for-site.ts
14946
- import { defineCommand as defineCommand115 } from "citty";
15155
+ import { defineCommand as defineCommand117 } from "citty";
14947
15156
  registerSchema({
14948
15157
  command: "research.keywords-for-site",
14949
15158
  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.",
@@ -14976,7 +15185,7 @@ var FIELDS8 = {
14976
15185
  competition: "LOW, MEDIUM, or HIGH",
14977
15186
  competition_index: "Competition score 0-100"
14978
15187
  };
14979
- var keywordsForSiteCommand = defineCommand115({
15188
+ var keywordsForSiteCommand = defineCommand117({
14980
15189
  meta: {
14981
15190
  name: "keywords-for-site",
14982
15191
  description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
@@ -15029,7 +15238,7 @@ Examples:
15029
15238
  });
15030
15239
 
15031
15240
  // src/commands/research/languages.ts
15032
- import { defineCommand as defineCommand116 } from "citty";
15241
+ import { defineCommand as defineCommand118 } from "citty";
15033
15242
  registerSchema({
15034
15243
  command: "research.languages",
15035
15244
  description: "List all supported language codes for --language flag in research commands.",
@@ -15059,7 +15268,7 @@ var FIELDS9 = {
15059
15268
  code: "Language code to pass as --language",
15060
15269
  name: "Language name (also accepted by --language)"
15061
15270
  };
15062
- var languagesCommand2 = defineCommand116({
15271
+ var languagesCommand2 = defineCommand118({
15063
15272
  meta: {
15064
15273
  name: "languages",
15065
15274
  description: "List all supported language codes for --language flag."
@@ -15070,7 +15279,7 @@ var languagesCommand2 = defineCommand116({
15070
15279
  });
15071
15280
 
15072
15281
  // src/commands/research/lighthouse.ts
15073
- import { defineCommand as defineCommand117 } from "citty";
15282
+ import { defineCommand as defineCommand119 } from "citty";
15074
15283
  registerSchema({
15075
15284
  command: "research.lighthouse",
15076
15285
  description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
@@ -15089,7 +15298,7 @@ var FIELDS10 = {
15089
15298
  speed_index_ms: "Speed Index in ms (good: < 3400)",
15090
15299
  interactive_ms: "Time to Interactive in ms (good: < 3800)"
15091
15300
  };
15092
- var lighthouseCommand = defineCommand117({
15301
+ var lighthouseCommand = defineCommand119({
15093
15302
  meta: {
15094
15303
  name: "lighthouse",
15095
15304
  description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
@@ -15127,7 +15336,7 @@ Examples:
15127
15336
  });
15128
15337
 
15129
15338
  // src/commands/research/relevant-pages.ts
15130
- import { defineCommand as defineCommand118 } from "citty";
15339
+ import { defineCommand as defineCommand120 } from "citty";
15131
15340
  registerSchema({
15132
15341
  command: "research.relevant-pages",
15133
15342
  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).",
@@ -15153,7 +15362,7 @@ var FIELDS11 = {
15153
15362
  keywords: "Total organic keywords the page ranks for",
15154
15363
  top_10: "Keywords in positions 1-10"
15155
15364
  };
15156
- var relevantPagesCommand = defineCommand118({
15365
+ var relevantPagesCommand = defineCommand120({
15157
15366
  meta: {
15158
15367
  name: "relevant-pages",
15159
15368
  description: `Get the top pages of a competitor domain with traffic data.
@@ -15199,7 +15408,7 @@ Examples:
15199
15408
  });
15200
15409
 
15201
15410
  // src/commands/research/web.ts
15202
- import { defineCommand as defineCommand119 } from "citty";
15411
+ import { defineCommand as defineCommand121 } from "citty";
15203
15412
  registerSchema({
15204
15413
  command: "research.web",
15205
15414
  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).",
@@ -15250,7 +15459,7 @@ async function runDeepResearch(question) {
15250
15459
  }
15251
15460
  throw new Error("Deep research timed out");
15252
15461
  }
15253
- var webCommand = defineCommand119({
15462
+ var webCommand = defineCommand121({
15254
15463
  meta: {
15255
15464
  name: "web",
15256
15465
  description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
@@ -15310,7 +15519,7 @@ Examples:
15310
15519
  });
15311
15520
 
15312
15521
  // src/commands/research/index.ts
15313
- var researchCommand = defineCommand120({
15522
+ var researchCommand = defineCommand122({
15314
15523
  meta: {
15315
15524
  name: "research",
15316
15525
  description: `Competitive intelligence and AI-powered research commands.
@@ -15350,10 +15559,10 @@ Examples:
15350
15559
  });
15351
15560
 
15352
15561
  // src/commands/scheduled-actions/index.ts
15353
- import { defineCommand as defineCommand127 } from "citty";
15562
+ import { defineCommand as defineCommand129 } from "citty";
15354
15563
 
15355
15564
  // src/commands/scheduled-actions/create.ts
15356
- import { defineCommand as defineCommand121 } from "citty";
15565
+ import { defineCommand as defineCommand123 } from "citty";
15357
15566
 
15358
15567
  // src/commands/scheduled-actions/shared.ts
15359
15568
  var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
@@ -15458,7 +15667,7 @@ registerSchema({
15458
15667
  prompt: { type: "string", description: "Additional prompt instructions for the spawned agent", required: false }
15459
15668
  }
15460
15669
  });
15461
- var createCommand2 = defineCommand121({
15670
+ var createCommand2 = defineCommand123({
15462
15671
  meta: {
15463
15672
  name: "create",
15464
15673
  description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
@@ -15506,7 +15715,7 @@ var createCommand2 = defineCommand121({
15506
15715
  });
15507
15716
 
15508
15717
  // src/commands/scheduled-actions/delete.ts
15509
- import { defineCommand as defineCommand122 } from "citty";
15718
+ import { defineCommand as defineCommand124 } from "citty";
15510
15719
  registerSchema({
15511
15720
  command: "scheduled-actions.delete",
15512
15721
  description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
@@ -15514,7 +15723,7 @@ registerSchema({
15514
15723
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
15515
15724
  }
15516
15725
  });
15517
- var deleteCommand2 = defineCommand122({
15726
+ var deleteCommand2 = defineCommand124({
15518
15727
  meta: {
15519
15728
  name: "delete",
15520
15729
  description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
@@ -15543,7 +15752,7 @@ var deleteCommand2 = defineCommand122({
15543
15752
  });
15544
15753
 
15545
15754
  // src/commands/scheduled-actions/get.ts
15546
- import { defineCommand as defineCommand123 } from "citty";
15755
+ import { defineCommand as defineCommand125 } from "citty";
15547
15756
  registerSchema({
15548
15757
  command: "scheduled-actions.get",
15549
15758
  description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
@@ -15551,7 +15760,7 @@ registerSchema({
15551
15760
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
15552
15761
  }
15553
15762
  });
15554
- var getCommand3 = defineCommand123({
15763
+ var getCommand3 = defineCommand125({
15555
15764
  meta: {
15556
15765
  name: "get",
15557
15766
  description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
@@ -15588,13 +15797,13 @@ var getCommand3 = defineCommand123({
15588
15797
  });
15589
15798
 
15590
15799
  // src/commands/scheduled-actions/list.ts
15591
- import { defineCommand as defineCommand124 } from "citty";
15800
+ import { defineCommand as defineCommand126 } from "citty";
15592
15801
  registerSchema({
15593
15802
  command: "scheduled-actions.list",
15594
15803
  description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set.",
15595
15804
  args: {}
15596
15805
  });
15597
- var listCommand2 = defineCommand124({
15806
+ var listCommand3 = defineCommand126({
15598
15807
  meta: {
15599
15808
  name: "list",
15600
15809
  description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set."
@@ -15615,7 +15824,7 @@ var listCommand2 = defineCommand124({
15615
15824
  });
15616
15825
 
15617
15826
  // src/commands/scheduled-actions/trigger.ts
15618
- import { defineCommand as defineCommand125 } from "citty";
15827
+ import { defineCommand as defineCommand127 } from "citty";
15619
15828
  registerSchema({
15620
15829
  command: "scheduled-actions.trigger",
15621
15830
  description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
@@ -15623,7 +15832,7 @@ registerSchema({
15623
15832
  id: { type: "string", description: "Published scheduled action ID", required: true }
15624
15833
  }
15625
15834
  });
15626
- var triggerCommand = defineCommand125({
15835
+ var triggerCommand = defineCommand127({
15627
15836
  meta: {
15628
15837
  name: "trigger",
15629
15838
  description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
@@ -15660,7 +15869,7 @@ var triggerCommand = defineCommand125({
15660
15869
  });
15661
15870
 
15662
15871
  // src/commands/scheduled-actions/update.ts
15663
- import { defineCommand as defineCommand126 } from "citty";
15872
+ import { defineCommand as defineCommand128 } from "citty";
15664
15873
  registerSchema({
15665
15874
  command: "scheduled-actions.update",
15666
15875
  description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
@@ -15685,7 +15894,7 @@ registerSchema({
15685
15894
  prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
15686
15895
  }
15687
15896
  });
15688
- var updateCommand2 = defineCommand126({
15897
+ var updateCommand2 = defineCommand128({
15689
15898
  meta: {
15690
15899
  name: "update",
15691
15900
  description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
@@ -15755,7 +15964,7 @@ var updateCommand2 = defineCommand126({
15755
15964
  });
15756
15965
 
15757
15966
  // src/commands/scheduled-actions/index.ts
15758
- var scheduledActionsCommand = defineCommand127({
15967
+ var scheduledActionsCommand = defineCommand129({
15759
15968
  meta: {
15760
15969
  name: "scheduled-actions",
15761
15970
  description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger.
@@ -15771,7 +15980,7 @@ Examples:
15771
15980
  baker scheduled-actions trigger <id>`
15772
15981
  },
15773
15982
  subCommands: {
15774
- list: listCommand2,
15983
+ list: listCommand3,
15775
15984
  get: getCommand3,
15776
15985
  create: createCommand2,
15777
15986
  update: updateCommand2,
@@ -15781,8 +15990,8 @@ Examples:
15781
15990
  });
15782
15991
 
15783
15992
  // src/commands/schema.ts
15784
- import { defineCommand as defineCommand128 } from "citty";
15785
- var schemaCommand = defineCommand128({
15993
+ import { defineCommand as defineCommand130 } from "citty";
15994
+ var schemaCommand = defineCommand130({
15786
15995
  meta: {
15787
15996
  name: "schema",
15788
15997
  description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
@@ -15818,10 +16027,10 @@ var schemaCommand = defineCommand128({
15818
16027
  });
15819
16028
 
15820
16029
  // src/commands/testimonials/index.ts
15821
- import { defineCommand as defineCommand132 } from "citty";
16030
+ import { defineCommand as defineCommand134 } from "citty";
15822
16031
 
15823
16032
  // src/commands/testimonials/get.ts
15824
- import { defineCommand as defineCommand129 } from "citty";
16033
+ import { defineCommand as defineCommand131 } from "citty";
15825
16034
  registerSchema({
15826
16035
  command: "testimonials.get",
15827
16036
  description: "Get a single testimonial by ID",
@@ -15829,7 +16038,7 @@ registerSchema({
15829
16038
  id: { type: "string", description: "Testimonial ID", required: true }
15830
16039
  }
15831
16040
  });
15832
- var getCommand4 = defineCommand129({
16041
+ var getCommand4 = defineCommand131({
15833
16042
  meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
15834
16043
  args: {
15835
16044
  id: { type: "positional", description: "Testimonial ID", required: false },
@@ -15866,7 +16075,7 @@ var getCommand4 = defineCommand129({
15866
16075
  });
15867
16076
 
15868
16077
  // src/commands/testimonials/list.ts
15869
- import { defineCommand as defineCommand130 } from "citty";
16078
+ import { defineCommand as defineCommand132 } from "citty";
15870
16079
  registerSchema({
15871
16080
  command: "testimonials.list",
15872
16081
  description: "List testimonials with optional filters.",
@@ -15896,7 +16105,7 @@ registerSchema({
15896
16105
  limit: { type: "number", description: "Max results (default 50)", required: false, default: 50 }
15897
16106
  }
15898
16107
  });
15899
- var listCommand3 = defineCommand130({
16108
+ var listCommand4 = defineCommand132({
15900
16109
  meta: {
15901
16110
  name: "list",
15902
16111
  description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
@@ -15945,7 +16154,7 @@ var listCommand3 = defineCommand130({
15945
16154
  });
15946
16155
 
15947
16156
  // src/commands/testimonials/search.ts
15948
- import { defineCommand as defineCommand131 } from "citty";
16157
+ import { defineCommand as defineCommand133 } from "citty";
15949
16158
  registerSchema({
15950
16159
  command: "testimonials.search",
15951
16160
  description: "Search testimonials by text query. Uses hybrid BM25 + vector + reranking.",
@@ -15976,7 +16185,7 @@ registerSchema({
15976
16185
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
15977
16186
  }
15978
16187
  });
15979
- var searchCommand2 = defineCommand131({
16188
+ var searchCommand2 = defineCommand133({
15980
16189
  meta: {
15981
16190
  name: "search",
15982
16191
  description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
@@ -16047,7 +16256,7 @@ var searchCommand2 = defineCommand131({
16047
16256
  });
16048
16257
 
16049
16258
  // src/commands/testimonials/index.ts
16050
- var testimonialsCommand = defineCommand132({
16259
+ var testimonialsCommand = defineCommand134({
16051
16260
  meta: {
16052
16261
  name: "testimonials",
16053
16262
  description: `Find and browse testimonials in Baker. Subcommands: search, get, list.
@@ -16061,15 +16270,15 @@ Examples:
16061
16270
  subCommands: {
16062
16271
  get: getCommand4,
16063
16272
  search: searchCommand2,
16064
- list: listCommand3
16273
+ list: listCommand4
16065
16274
  }
16066
16275
  });
16067
16276
 
16068
16277
  // src/commands/videos/index.ts
16069
- import { defineCommand as defineCommand137 } from "citty";
16278
+ import { defineCommand as defineCommand139 } from "citty";
16070
16279
 
16071
16280
  // src/commands/videos/delete.ts
16072
- import { defineCommand as defineCommand133 } from "citty";
16281
+ import { defineCommand as defineCommand135 } from "citty";
16073
16282
  registerSchema({
16074
16283
  command: "videos.delete",
16075
16284
  description: "Delete a video by ID",
@@ -16083,7 +16292,7 @@ registerSchema({
16083
16292
  }
16084
16293
  }
16085
16294
  });
16086
- var deleteCommand3 = defineCommand133({
16295
+ var deleteCommand3 = defineCommand135({
16087
16296
  meta: {
16088
16297
  name: "delete",
16089
16298
  description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
@@ -16124,7 +16333,7 @@ var deleteCommand3 = defineCommand133({
16124
16333
  });
16125
16334
 
16126
16335
  // src/commands/videos/get.ts
16127
- import { defineCommand as defineCommand134 } from "citty";
16336
+ import { defineCommand as defineCommand136 } from "citty";
16128
16337
  registerSchema({
16129
16338
  command: "videos.get",
16130
16339
  description: "Get a single video by ID",
@@ -16132,7 +16341,7 @@ registerSchema({
16132
16341
  id: { type: "string", description: "Video ID", required: true }
16133
16342
  }
16134
16343
  });
16135
- var getCommand5 = defineCommand134({
16344
+ var getCommand5 = defineCommand136({
16136
16345
  meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
16137
16346
  args: {
16138
16347
  id: { type: "positional", description: "Video ID", required: false },
@@ -16169,7 +16378,7 @@ var getCommand5 = defineCommand134({
16169
16378
  });
16170
16379
 
16171
16380
  // src/commands/videos/search.ts
16172
- import { defineCommand as defineCommand135 } from "citty";
16381
+ import { defineCommand as defineCommand137 } from "citty";
16173
16382
  registerSchema({
16174
16383
  command: "videos.search",
16175
16384
  description: "Search videos by text query. Only returns ready videos.",
@@ -16179,7 +16388,7 @@ registerSchema({
16179
16388
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
16180
16389
  }
16181
16390
  });
16182
- var searchCommand3 = defineCommand135({
16391
+ var searchCommand3 = defineCommand137({
16183
16392
  meta: {
16184
16393
  name: "search",
16185
16394
  description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
@@ -16228,7 +16437,7 @@ var searchCommand3 = defineCommand135({
16228
16437
  // src/commands/videos/upload.ts
16229
16438
  import { readFile as readFile10, stat as stat3 } from "fs/promises";
16230
16439
  import { extname as extname3 } from "path";
16231
- import { defineCommand as defineCommand136 } from "citty";
16440
+ import { defineCommand as defineCommand138 } from "citty";
16232
16441
  var MIME_MAP2 = {
16233
16442
  ".mp4": "video/mp4",
16234
16443
  ".mov": "video/quicktime",
@@ -16262,7 +16471,7 @@ function detectContentType2(filePath) {
16262
16471
  }
16263
16472
  return mime;
16264
16473
  }
16265
- var uploadCommand2 = defineCommand136({
16474
+ var uploadCommand2 = defineCommand138({
16266
16475
  meta: {
16267
16476
  name: "upload",
16268
16477
  description: "Upload a video file to Baker via Mux direct upload. Auto-detects content type. Example: baker videos upload ./demo.mp4"
@@ -16316,7 +16525,7 @@ var uploadCommand2 = defineCommand136({
16316
16525
  });
16317
16526
 
16318
16527
  // src/commands/videos/index.ts
16319
- var videosCommand = defineCommand137({
16528
+ var videosCommand = defineCommand139({
16320
16529
  meta: {
16321
16530
  name: "videos",
16322
16531
  description: `Find and manage videos in Baker. Subcommands: search, get, upload, delete.
@@ -16337,10 +16546,10 @@ Examples:
16337
16546
  });
16338
16547
 
16339
16548
  // src/commands/winning-ads/index.ts
16340
- import { defineCommand as defineCommand140 } from "citty";
16549
+ import { defineCommand as defineCommand142 } from "citty";
16341
16550
 
16342
16551
  // src/commands/winning-ads/advertisers.ts
16343
- import { defineCommand as defineCommand138 } from "citty";
16552
+ import { defineCommand as defineCommand140 } from "citty";
16344
16553
  registerSchema({
16345
16554
  command: "winning-ads.advertisers",
16346
16555
  description: "Resolve a brand name to advertiser_id(s) in the ad-dna corpus \u2014 to find your OWN advertiser (to --exclude-advertiser) or a competitor (to --advertiser-id).",
@@ -16353,7 +16562,7 @@ registerSchema({
16353
16562
  function identity(record) {
16354
16563
  return record;
16355
16564
  }
16356
- var advertisersCommand2 = defineCommand138({
16565
+ var advertisersCommand2 = defineCommand140({
16357
16566
  meta: {
16358
16567
  name: "advertisers",
16359
16568
  description: 'Resolve a brand name to advertiser_id(s). Use it to find your own advertiser for --exclude-advertiser, or a competitor for --advertiser-id. Example: baker winning-ads advertisers "Deel" --output md'
@@ -16404,7 +16613,7 @@ var advertisersCommand2 = defineCommand138({
16404
16613
  });
16405
16614
 
16406
16615
  // src/commands/winning-ads/search.ts
16407
- import { defineCommand as defineCommand139 } from "citty";
16616
+ import { defineCommand as defineCommand141 } from "citty";
16408
16617
  registerSchema({
16409
16618
  command: "winning-ads.search",
16410
16619
  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.",
@@ -16512,7 +16721,7 @@ function buildSearchBody(args) {
16512
16721
  }
16513
16722
  return body;
16514
16723
  }
16515
- var searchCommand4 = defineCommand139({
16724
+ var searchCommand4 = defineCommand141({
16516
16725
  meta: {
16517
16726
  name: "search",
16518
16727
  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"
@@ -16624,7 +16833,7 @@ var searchCommand4 = defineCommand139({
16624
16833
  });
16625
16834
 
16626
16835
  // src/commands/winning-ads/index.ts
16627
- var winningAdsCommand = defineCommand140({
16836
+ var winningAdsCommand = defineCommand142({
16628
16837
  meta: {
16629
16838
  name: "winning-ads",
16630
16839
  description: `Search the ad-dna corpus of scored "winning" ads for reference creatives to reproduce. Proxied through the Baker backend (BAKER_API_KEY) \u2014 no separate token needed.
@@ -16664,7 +16873,7 @@ function getCliVersion() {
16664
16873
  }
16665
16874
 
16666
16875
  // src/cli.ts
16667
- var main = defineCommand141({
16876
+ var main = defineCommand143({
16668
16877
  meta: {
16669
16878
  name: "baker",
16670
16879
  version: getCliVersion(),