@koda-sl/baker-cli 0.91.0 → 0.92.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,7 +12,7 @@ import {
12
12
  } from "./chunk-LMVDA3EZ.js";
13
13
 
14
14
  // src/cli.ts
15
- import { defineCommand as defineCommand141, runMain } from "citty";
15
+ import { defineCommand as defineCommand148, runMain } from "citty";
16
16
 
17
17
  // src/commands/actions/index.ts
18
18
  import { defineCommand as defineCommand12 } from "citty";
@@ -14307,11 +14307,292 @@ Paid transforms (run on the Convex backend, cost-tracked):
14307
14307
  }
14308
14308
  });
14309
14309
 
14310
+ // src/commands/missions/index.ts
14311
+ import { defineCommand as defineCommand116 } from "citty";
14312
+
14313
+ // src/commands/missions/add-action.ts
14314
+ import { defineCommand as defineCommand110 } from "citty";
14315
+ registerSchema({
14316
+ command: "missions.add-action",
14317
+ description: "Attach an action to a mission as an ordered step. Both --mission and --action accept a real id or a temp_* ref from a create op in the same draft. --order is the 0-based position in the plan. Applies on chat publish.",
14318
+ args: {
14319
+ mission: { type: "string", description: "Mission id or missionTempId", required: true },
14320
+ action: { type: "string", description: "Action id or tempId", required: true },
14321
+ order: { type: "string", description: "0-based position within the mission", required: true }
14322
+ }
14323
+ });
14324
+ var addActionCommand = defineCommand110({
14325
+ meta: {
14326
+ name: "add-action",
14327
+ description: "Attach an action to a mission as an ordered step. Example: baker missions add-action --mission <ref> --action <ref> --order 0"
14328
+ },
14329
+ args: {
14330
+ mission: { type: "string", description: "Mission ref", required: false },
14331
+ action: { type: "string", description: "Action ref", required: false },
14332
+ order: { type: "string", description: "0-based order", required: false }
14333
+ },
14334
+ run: async ({ args }) => {
14335
+ try {
14336
+ const mission = args.mission;
14337
+ const action = args.action;
14338
+ if (!mission || !action) {
14339
+ failValidation("--mission and --action are required.");
14340
+ }
14341
+ const order = Number.parseInt(args.order ?? "", 10);
14342
+ if (Number.isNaN(order) || order < 0) {
14343
+ failValidation("--order must be a non-negative integer.");
14344
+ }
14345
+ const chatId = requireChatId();
14346
+ await apiPost("/api/missions/add-action", {
14347
+ chatId,
14348
+ missionRef: mission,
14349
+ actionRef: action,
14350
+ order
14351
+ });
14352
+ writeOk();
14353
+ } catch (err) {
14354
+ failApi(err);
14355
+ }
14356
+ }
14357
+ });
14358
+
14359
+ // src/commands/missions/create.ts
14360
+ import { defineCommand as defineCommand111 } from "citty";
14361
+ registerSchema({
14362
+ command: "missions.create",
14363
+ description: "Open a Mission to group the ordered steps of a multi-step request. A Mission has a title and a markdown overview (what you're doing and why \u2014 the human-readable plan, written as numbered Phases with NO dates and NO effort sizing). Returns a missionTempId. Next: create the action steps with `baker actions create`, then attach each in order with `baker missions add-action`. Applies when the chat is published \u2014 publishing = the user approving the plan.",
14364
+ args: {
14365
+ title: { type: "string", description: "Mission title \u2014 the goal, short", required: true },
14366
+ overview: {
14367
+ type: "string",
14368
+ description: "Markdown overview: the plan as numbered Phases (goal / what it produces / what unlocks next). No calendar or effort framing.",
14369
+ required: false
14370
+ },
14371
+ "temp-id": { type: "string", description: "Custom missionTempId (auto-generated if omitted)", required: false }
14372
+ }
14373
+ });
14374
+ var createCommand2 = defineCommand111({
14375
+ meta: {
14376
+ name: "create",
14377
+ description: 'Open a Mission to group ordered steps. Example: baker missions create --title "Audit Google Ads" --overview "..."'
14378
+ },
14379
+ args: {
14380
+ title: { type: "string", description: "Mission title", required: false },
14381
+ overview: { type: "string", description: "Markdown overview (numbered Phases)", required: false, default: "" },
14382
+ "temp-id": { type: "string", description: "Optional custom missionTempId", required: false }
14383
+ },
14384
+ run: async ({ args }) => {
14385
+ try {
14386
+ const title = args.title;
14387
+ if (!title || title.trim().length === 0) {
14388
+ failValidation("--title is required.");
14389
+ }
14390
+ const chatId = requireChatId();
14391
+ const missionTempId = args["temp-id"] || generateTempId();
14392
+ const response = await apiPost("/api/missions/create", {
14393
+ chatId,
14394
+ missionTempId,
14395
+ title,
14396
+ overview: args.overview ?? ""
14397
+ });
14398
+ const hints = [
14399
+ `Add ordered steps: create each action, then baker missions add-action --mission ${missionTempId} --action <tempId> --order 0`
14400
+ ];
14401
+ if (!args.overview) {
14402
+ hints.push(
14403
+ "Tip: pass --overview with the plan as numbered Phases (goal / produces / unlocks; no dates or effort sizing)."
14404
+ );
14405
+ }
14406
+ writeJson({ ...response, hints });
14407
+ } catch (err) {
14408
+ failApi(err);
14409
+ }
14410
+ }
14411
+ });
14412
+
14413
+ // src/commands/missions/get.ts
14414
+ import { defineCommand as defineCommand112 } from "citty";
14415
+ registerSchema({
14416
+ command: "missions.get",
14417
+ description: "Get one mission with its overview, progress, and ordered steps.",
14418
+ args: {
14419
+ id: { type: "string", description: "Mission ID", required: true }
14420
+ }
14421
+ });
14422
+ var getCommand3 = defineCommand112({
14423
+ meta: { name: "get", description: "Get a mission by ID. Example: baker missions get <mission-id>" },
14424
+ args: {
14425
+ id: { type: "positional", description: "Mission ID", required: false },
14426
+ "mission-id": { type: "string", description: "Mission ID (alternative to positional)", required: false }
14427
+ },
14428
+ run: async ({ args }) => {
14429
+ try {
14430
+ const id = args.id || args["mission-id"];
14431
+ if (!id) {
14432
+ failValidation("Mission ID is required.");
14433
+ }
14434
+ validateConvexId(id);
14435
+ const response = await apiPost("/api/missions/get", { missionId: id });
14436
+ writeJson(response);
14437
+ } catch (err) {
14438
+ failApi(err);
14439
+ }
14440
+ }
14441
+ });
14442
+
14443
+ // src/commands/missions/list.ts
14444
+ import { defineCommand as defineCommand113 } from "citty";
14445
+ registerSchema({
14446
+ command: "missions.list",
14447
+ description: "List the company's missions with per-mission progress (done/total) and ordered steps. Aborted missions are hidden unless --include-aborted.",
14448
+ args: {
14449
+ "include-aborted": {
14450
+ type: "boolean",
14451
+ description: "Include aborted missions (default: false)",
14452
+ required: false,
14453
+ default: false
14454
+ }
14455
+ }
14456
+ });
14457
+ var listCommand2 = defineCommand113({
14458
+ meta: {
14459
+ name: "list",
14460
+ description: "List missions with progress and ordered steps. Example: baker missions list"
14461
+ },
14462
+ args: {
14463
+ "include-aborted": { type: "boolean", description: "Include aborted missions", required: false, default: false }
14464
+ },
14465
+ run: async ({ args }) => {
14466
+ try {
14467
+ const body = {};
14468
+ if (args["include-aborted"] === true) {
14469
+ body.includeAborted = true;
14470
+ }
14471
+ const response = await apiPost("/api/missions/list", body);
14472
+ writeJson(response);
14473
+ } catch (err) {
14474
+ failApi(err);
14475
+ }
14476
+ }
14477
+ });
14478
+
14479
+ // src/commands/missions/set-status.ts
14480
+ import { defineCommand as defineCommand114 } from "citty";
14481
+ registerSchema({
14482
+ command: "missions.set-status",
14483
+ description: "Set a mission's status: accomplished (the goal is genuinely met), aborted (abandoned), or active (reopen). Do NOT mark accomplished just because all steps are closed \u2014 only when the goal is done. Applies on chat publish.",
14484
+ args: {
14485
+ id: { type: "string", description: "Mission ID", required: true },
14486
+ status: { type: "string", description: "active | accomplished | aborted", required: true }
14487
+ }
14488
+ });
14489
+ var setStatusCommand = defineCommand114({
14490
+ meta: {
14491
+ name: "set-status",
14492
+ description: "Set mission status. Example: baker missions set-status <id> --status accomplished"
14493
+ },
14494
+ args: {
14495
+ id: { type: "positional", description: "Mission ID", required: false },
14496
+ "mission-id": { type: "string", description: "Mission ID", required: false },
14497
+ status: { type: "string", description: "active | accomplished | aborted", required: false }
14498
+ },
14499
+ run: async ({ args }) => {
14500
+ try {
14501
+ const id = args.id || args["mission-id"];
14502
+ if (!id) {
14503
+ failValidation("Mission ID is required.");
14504
+ }
14505
+ validateConvexId(id);
14506
+ const status = args.status;
14507
+ if (status !== "active" && status !== "accomplished" && status !== "aborted") {
14508
+ failValidation("--status must be one of: active, accomplished, aborted.");
14509
+ }
14510
+ const chatId = requireChatId();
14511
+ await apiPost("/api/missions/set-status", { chatId, missionId: id, status });
14512
+ writeOk();
14513
+ } catch (err) {
14514
+ failApi(err);
14515
+ }
14516
+ }
14517
+ });
14518
+
14519
+ // src/commands/missions/update.ts
14520
+ import { defineCommand as defineCommand115 } from "citty";
14521
+ registerSchema({
14522
+ command: "missions.update",
14523
+ description: "Stage an update to a mission's title and/or overview (real mission id only). Applies on chat publish.",
14524
+ args: {
14525
+ id: { type: "string", description: "Mission ID", required: true },
14526
+ title: { type: "string", description: "New title", required: false },
14527
+ overview: { type: "string", description: "New markdown overview (numbered Phases)", required: false }
14528
+ }
14529
+ });
14530
+ var updateCommand2 = defineCommand115({
14531
+ meta: {
14532
+ name: "update",
14533
+ description: 'Stage a mission update. Example: baker missions update <id> --overview "..."'
14534
+ },
14535
+ args: {
14536
+ id: { type: "positional", description: "Mission ID", required: false },
14537
+ "mission-id": { type: "string", description: "Mission ID", required: false },
14538
+ title: { type: "string", description: "New title", required: false },
14539
+ overview: { type: "string", description: "New markdown overview", required: false }
14540
+ },
14541
+ run: async ({ args }) => {
14542
+ try {
14543
+ const id = args.id || args["mission-id"];
14544
+ if (!id) {
14545
+ failValidation("Mission ID is required.");
14546
+ }
14547
+ validateConvexId(id);
14548
+ if (args.title === void 0 && args.overview === void 0) {
14549
+ failValidation("Provide at least one of --title, --overview.");
14550
+ }
14551
+ const chatId = requireChatId();
14552
+ await apiPost("/api/missions/update", {
14553
+ chatId,
14554
+ missionId: id,
14555
+ title: args.title,
14556
+ overview: args.overview
14557
+ });
14558
+ writeOk();
14559
+ } catch (err) {
14560
+ failApi(err);
14561
+ }
14562
+ }
14563
+ });
14564
+
14565
+ // src/commands/missions/index.ts
14566
+ var missionsCommand = defineCommand116({
14567
+ meta: {
14568
+ name: "missions",
14569
+ description: `Group ordered actions into a Mission \u2014 one goal with a markdown overview (the plan) and ordered action "steps". Subcommands: list, get, create, add-action, update, set-status.
14570
+
14571
+ Use a mission whenever a request decomposes into 2+ ordered actions (audits, campaigns, multi-step plans). A single one-off capture stays a loose action.
14572
+
14573
+ Flow: create the mission \u2192 create each action step in order \u2192 attach each with add-action \u2192 wire hard dependencies with 'baker actions link' \u2192 publish the chat (= the user approving the plan). The overview is forward planning: write it as numbered Phases, no dates, no effort sizing. Mark accomplished/aborted explicitly \u2014 never auto-conclude from step status.
14574
+
14575
+ Examples:
14576
+ baker missions create --title "Audit Google Ads" --overview "..."
14577
+ baker missions add-action --mission <ref> --action <ref> --order 0
14578
+ baker missions list
14579
+ baker missions set-status <id> --status accomplished`
14580
+ },
14581
+ subCommands: {
14582
+ list: listCommand2,
14583
+ get: getCommand3,
14584
+ create: createCommand2,
14585
+ "add-action": addActionCommand,
14586
+ update: updateCommand2,
14587
+ "set-status": setStatusCommand
14588
+ }
14589
+ });
14590
+
14310
14591
  // src/commands/research/index.ts
14311
- import { defineCommand as defineCommand120 } from "citty";
14592
+ import { defineCommand as defineCommand127 } from "citty";
14312
14593
 
14313
14594
  // src/commands/research/advertisers.ts
14314
- import { defineCommand as defineCommand110 } from "citty";
14595
+ import { defineCommand as defineCommand117 } from "citty";
14315
14596
 
14316
14597
  // src/commands/research/output.ts
14317
14598
  var RESEARCH_DATA_NOTE = "Estimates based on third-party SERP data \u2014 not exact figures. Use for directional insights, not precise measurement.";
@@ -14424,7 +14705,7 @@ var FIELDS3 = {
14424
14705
  etv: "Estimated traffic value (USD)",
14425
14706
  visibility: "SERP visibility score (0-1)"
14426
14707
  };
14427
- var advertisersCommand = defineCommand110({
14708
+ var advertisersCommand = defineCommand117({
14428
14709
  meta: {
14429
14710
  name: "advertisers",
14430
14711
  description: `Find domains competing for a keyword in Google SERPs.
@@ -14471,7 +14752,7 @@ Examples:
14471
14752
  });
14472
14753
 
14473
14754
  // src/commands/research/autocomplete.ts
14474
- import { defineCommand as defineCommand111 } from "citty";
14755
+ import { defineCommand as defineCommand118 } from "citty";
14475
14756
  registerSchema({
14476
14757
  command: "research.autocomplete",
14477
14758
  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).",
@@ -14494,7 +14775,7 @@ registerSchema({
14494
14775
  var FIELDS4 = {
14495
14776
  suggestion: "Autocomplete suggestion from Google"
14496
14777
  };
14497
- var autocompleteCommand = defineCommand111({
14778
+ var autocompleteCommand = defineCommand118({
14498
14779
  meta: {
14499
14780
  name: "autocomplete",
14500
14781
  description: `Get Google Autocomplete suggestions for keyword expansion.
@@ -14540,7 +14821,7 @@ Examples:
14540
14821
  });
14541
14822
 
14542
14823
  // src/commands/research/countries.ts
14543
- import { defineCommand as defineCommand112 } from "citty";
14824
+ import { defineCommand as defineCommand119 } from "citty";
14544
14825
  registerSchema({
14545
14826
  command: "research.countries",
14546
14827
  description: "List all supported country codes for --location flag in research commands.",
@@ -14597,7 +14878,7 @@ var FIELDS5 = {
14597
14878
  code: "Country code to pass as --location",
14598
14879
  name: "Country name"
14599
14880
  };
14600
- var countriesCommand = defineCommand112({
14881
+ var countriesCommand = defineCommand119({
14601
14882
  meta: {
14602
14883
  name: "countries",
14603
14884
  description: "List all supported country codes for --location flag."
@@ -14608,7 +14889,7 @@ var countriesCommand = defineCommand112({
14608
14889
  });
14609
14890
 
14610
14891
  // src/commands/research/intent.ts
14611
- import { defineCommand as defineCommand113 } from "citty";
14892
+ import { defineCommand as defineCommand120 } from "citty";
14612
14893
  registerSchema({
14613
14894
  command: "research.intent",
14614
14895
  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.",
@@ -14631,7 +14912,7 @@ var FIELDS6 = {
14631
14912
  intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
14632
14913
  probability: "Confidence score 0.0-1.0"
14633
14914
  };
14634
- var intentCommand = defineCommand113({
14915
+ var intentCommand = defineCommand120({
14635
14916
  meta: {
14636
14917
  name: "intent",
14637
14918
  description: `Classify Google Search intent for keywords. Returns intent type and confidence.
@@ -14679,7 +14960,7 @@ Examples:
14679
14960
  });
14680
14961
 
14681
14962
  // src/commands/research/keyword-gap.ts
14682
- import { defineCommand as defineCommand114 } from "citty";
14963
+ import { defineCommand as defineCommand121 } from "citty";
14683
14964
  registerSchema({
14684
14965
  command: "research.keyword-gap",
14685
14966
  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.",
@@ -14708,7 +14989,7 @@ var FIELDS7 = {
14708
14989
  cpc: "Cost per click USD",
14709
14990
  their_position: "Competitor's ranking position"
14710
14991
  };
14711
- var keywordGapCommand = defineCommand114({
14992
+ var keywordGapCommand = defineCommand121({
14712
14993
  meta: {
14713
14994
  name: "keyword-gap",
14714
14995
  description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
@@ -14782,7 +15063,7 @@ Examples:
14782
15063
  });
14783
15064
 
14784
15065
  // src/commands/research/keywords-for-site.ts
14785
- import { defineCommand as defineCommand115 } from "citty";
15066
+ import { defineCommand as defineCommand122 } from "citty";
14786
15067
  registerSchema({
14787
15068
  command: "research.keywords-for-site",
14788
15069
  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.",
@@ -14815,7 +15096,7 @@ var FIELDS8 = {
14815
15096
  competition: "LOW, MEDIUM, or HIGH",
14816
15097
  competition_index: "Competition score 0-100"
14817
15098
  };
14818
- var keywordsForSiteCommand = defineCommand115({
15099
+ var keywordsForSiteCommand = defineCommand122({
14819
15100
  meta: {
14820
15101
  name: "keywords-for-site",
14821
15102
  description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
@@ -14868,7 +15149,7 @@ Examples:
14868
15149
  });
14869
15150
 
14870
15151
  // src/commands/research/languages.ts
14871
- import { defineCommand as defineCommand116 } from "citty";
15152
+ import { defineCommand as defineCommand123 } from "citty";
14872
15153
  registerSchema({
14873
15154
  command: "research.languages",
14874
15155
  description: "List all supported language codes for --language flag in research commands.",
@@ -14898,7 +15179,7 @@ var FIELDS9 = {
14898
15179
  code: "Language code to pass as --language",
14899
15180
  name: "Language name (also accepted by --language)"
14900
15181
  };
14901
- var languagesCommand2 = defineCommand116({
15182
+ var languagesCommand2 = defineCommand123({
14902
15183
  meta: {
14903
15184
  name: "languages",
14904
15185
  description: "List all supported language codes for --language flag."
@@ -14909,7 +15190,7 @@ var languagesCommand2 = defineCommand116({
14909
15190
  });
14910
15191
 
14911
15192
  // src/commands/research/lighthouse.ts
14912
- import { defineCommand as defineCommand117 } from "citty";
15193
+ import { defineCommand as defineCommand124 } from "citty";
14913
15194
  registerSchema({
14914
15195
  command: "research.lighthouse",
14915
15196
  description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
@@ -14928,7 +15209,7 @@ var FIELDS10 = {
14928
15209
  speed_index_ms: "Speed Index in ms (good: < 3400)",
14929
15210
  interactive_ms: "Time to Interactive in ms (good: < 3800)"
14930
15211
  };
14931
- var lighthouseCommand = defineCommand117({
15212
+ var lighthouseCommand = defineCommand124({
14932
15213
  meta: {
14933
15214
  name: "lighthouse",
14934
15215
  description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
@@ -14966,7 +15247,7 @@ Examples:
14966
15247
  });
14967
15248
 
14968
15249
  // src/commands/research/relevant-pages.ts
14969
- import { defineCommand as defineCommand118 } from "citty";
15250
+ import { defineCommand as defineCommand125 } from "citty";
14970
15251
  registerSchema({
14971
15252
  command: "research.relevant-pages",
14972
15253
  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).",
@@ -14992,7 +15273,7 @@ var FIELDS11 = {
14992
15273
  keywords: "Total organic keywords the page ranks for",
14993
15274
  top_10: "Keywords in positions 1-10"
14994
15275
  };
14995
- var relevantPagesCommand = defineCommand118({
15276
+ var relevantPagesCommand = defineCommand125({
14996
15277
  meta: {
14997
15278
  name: "relevant-pages",
14998
15279
  description: `Get the top pages of a competitor domain with traffic data.
@@ -15038,7 +15319,7 @@ Examples:
15038
15319
  });
15039
15320
 
15040
15321
  // src/commands/research/web.ts
15041
- import { defineCommand as defineCommand119 } from "citty";
15322
+ import { defineCommand as defineCommand126 } from "citty";
15042
15323
  registerSchema({
15043
15324
  command: "research.web",
15044
15325
  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).",
@@ -15089,7 +15370,7 @@ async function runDeepResearch(question) {
15089
15370
  }
15090
15371
  throw new Error("Deep research timed out");
15091
15372
  }
15092
- var webCommand = defineCommand119({
15373
+ var webCommand = defineCommand126({
15093
15374
  meta: {
15094
15375
  name: "web",
15095
15376
  description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
@@ -15149,7 +15430,7 @@ Examples:
15149
15430
  });
15150
15431
 
15151
15432
  // src/commands/research/index.ts
15152
- var researchCommand = defineCommand120({
15433
+ var researchCommand = defineCommand127({
15153
15434
  meta: {
15154
15435
  name: "research",
15155
15436
  description: `Competitive intelligence and AI-powered research commands.
@@ -15189,10 +15470,10 @@ Examples:
15189
15470
  });
15190
15471
 
15191
15472
  // src/commands/scheduled-actions/index.ts
15192
- import { defineCommand as defineCommand127 } from "citty";
15473
+ import { defineCommand as defineCommand134 } from "citty";
15193
15474
 
15194
15475
  // src/commands/scheduled-actions/create.ts
15195
- import { defineCommand as defineCommand121 } from "citty";
15476
+ import { defineCommand as defineCommand128 } from "citty";
15196
15477
 
15197
15478
  // src/commands/scheduled-actions/shared.ts
15198
15479
  var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
@@ -15297,7 +15578,7 @@ registerSchema({
15297
15578
  prompt: { type: "string", description: "Additional prompt instructions for the spawned agent", required: false }
15298
15579
  }
15299
15580
  });
15300
- var createCommand2 = defineCommand121({
15581
+ var createCommand3 = defineCommand128({
15301
15582
  meta: {
15302
15583
  name: "create",
15303
15584
  description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
@@ -15345,7 +15626,7 @@ var createCommand2 = defineCommand121({
15345
15626
  });
15346
15627
 
15347
15628
  // src/commands/scheduled-actions/delete.ts
15348
- import { defineCommand as defineCommand122 } from "citty";
15629
+ import { defineCommand as defineCommand129 } from "citty";
15349
15630
  registerSchema({
15350
15631
  command: "scheduled-actions.delete",
15351
15632
  description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
@@ -15353,7 +15634,7 @@ registerSchema({
15353
15634
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
15354
15635
  }
15355
15636
  });
15356
- var deleteCommand2 = defineCommand122({
15637
+ var deleteCommand2 = defineCommand129({
15357
15638
  meta: {
15358
15639
  name: "delete",
15359
15640
  description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
@@ -15382,7 +15663,7 @@ var deleteCommand2 = defineCommand122({
15382
15663
  });
15383
15664
 
15384
15665
  // src/commands/scheduled-actions/get.ts
15385
- import { defineCommand as defineCommand123 } from "citty";
15666
+ import { defineCommand as defineCommand130 } from "citty";
15386
15667
  registerSchema({
15387
15668
  command: "scheduled-actions.get",
15388
15669
  description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
@@ -15390,7 +15671,7 @@ registerSchema({
15390
15671
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
15391
15672
  }
15392
15673
  });
15393
- var getCommand3 = defineCommand123({
15674
+ var getCommand4 = defineCommand130({
15394
15675
  meta: {
15395
15676
  name: "get",
15396
15677
  description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
@@ -15427,13 +15708,13 @@ var getCommand3 = defineCommand123({
15427
15708
  });
15428
15709
 
15429
15710
  // src/commands/scheduled-actions/list.ts
15430
- import { defineCommand as defineCommand124 } from "citty";
15711
+ import { defineCommand as defineCommand131 } from "citty";
15431
15712
  registerSchema({
15432
15713
  command: "scheduled-actions.list",
15433
15714
  description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set.",
15434
15715
  args: {}
15435
15716
  });
15436
- var listCommand2 = defineCommand124({
15717
+ var listCommand3 = defineCommand131({
15437
15718
  meta: {
15438
15719
  name: "list",
15439
15720
  description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set."
@@ -15454,7 +15735,7 @@ var listCommand2 = defineCommand124({
15454
15735
  });
15455
15736
 
15456
15737
  // src/commands/scheduled-actions/trigger.ts
15457
- import { defineCommand as defineCommand125 } from "citty";
15738
+ import { defineCommand as defineCommand132 } from "citty";
15458
15739
  registerSchema({
15459
15740
  command: "scheduled-actions.trigger",
15460
15741
  description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
@@ -15462,7 +15743,7 @@ registerSchema({
15462
15743
  id: { type: "string", description: "Published scheduled action ID", required: true }
15463
15744
  }
15464
15745
  });
15465
- var triggerCommand = defineCommand125({
15746
+ var triggerCommand = defineCommand132({
15466
15747
  meta: {
15467
15748
  name: "trigger",
15468
15749
  description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
@@ -15499,7 +15780,7 @@ var triggerCommand = defineCommand125({
15499
15780
  });
15500
15781
 
15501
15782
  // src/commands/scheduled-actions/update.ts
15502
- import { defineCommand as defineCommand126 } from "citty";
15783
+ import { defineCommand as defineCommand133 } from "citty";
15503
15784
  registerSchema({
15504
15785
  command: "scheduled-actions.update",
15505
15786
  description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
@@ -15524,7 +15805,7 @@ registerSchema({
15524
15805
  prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
15525
15806
  }
15526
15807
  });
15527
- var updateCommand2 = defineCommand126({
15808
+ var updateCommand3 = defineCommand133({
15528
15809
  meta: {
15529
15810
  name: "update",
15530
15811
  description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
@@ -15594,7 +15875,7 @@ var updateCommand2 = defineCommand126({
15594
15875
  });
15595
15876
 
15596
15877
  // src/commands/scheduled-actions/index.ts
15597
- var scheduledActionsCommand = defineCommand127({
15878
+ var scheduledActionsCommand = defineCommand134({
15598
15879
  meta: {
15599
15880
  name: "scheduled-actions",
15600
15881
  description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger.
@@ -15610,18 +15891,18 @@ Examples:
15610
15891
  baker scheduled-actions trigger <id>`
15611
15892
  },
15612
15893
  subCommands: {
15613
- list: listCommand2,
15614
- get: getCommand3,
15615
- create: createCommand2,
15616
- update: updateCommand2,
15894
+ list: listCommand3,
15895
+ get: getCommand4,
15896
+ create: createCommand3,
15897
+ update: updateCommand3,
15617
15898
  delete: deleteCommand2,
15618
15899
  trigger: triggerCommand
15619
15900
  }
15620
15901
  });
15621
15902
 
15622
15903
  // src/commands/schema.ts
15623
- import { defineCommand as defineCommand128 } from "citty";
15624
- var schemaCommand = defineCommand128({
15904
+ import { defineCommand as defineCommand135 } from "citty";
15905
+ var schemaCommand = defineCommand135({
15625
15906
  meta: {
15626
15907
  name: "schema",
15627
15908
  description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
@@ -15657,10 +15938,10 @@ var schemaCommand = defineCommand128({
15657
15938
  });
15658
15939
 
15659
15940
  // src/commands/testimonials/index.ts
15660
- import { defineCommand as defineCommand132 } from "citty";
15941
+ import { defineCommand as defineCommand139 } from "citty";
15661
15942
 
15662
15943
  // src/commands/testimonials/get.ts
15663
- import { defineCommand as defineCommand129 } from "citty";
15944
+ import { defineCommand as defineCommand136 } from "citty";
15664
15945
  registerSchema({
15665
15946
  command: "testimonials.get",
15666
15947
  description: "Get a single testimonial by ID",
@@ -15668,7 +15949,7 @@ registerSchema({
15668
15949
  id: { type: "string", description: "Testimonial ID", required: true }
15669
15950
  }
15670
15951
  });
15671
- var getCommand4 = defineCommand129({
15952
+ var getCommand5 = defineCommand136({
15672
15953
  meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
15673
15954
  args: {
15674
15955
  id: { type: "positional", description: "Testimonial ID", required: false },
@@ -15705,7 +15986,7 @@ var getCommand4 = defineCommand129({
15705
15986
  });
15706
15987
 
15707
15988
  // src/commands/testimonials/list.ts
15708
- import { defineCommand as defineCommand130 } from "citty";
15989
+ import { defineCommand as defineCommand137 } from "citty";
15709
15990
  registerSchema({
15710
15991
  command: "testimonials.list",
15711
15992
  description: "List testimonials with optional filters.",
@@ -15735,7 +16016,7 @@ registerSchema({
15735
16016
  limit: { type: "number", description: "Max results (default 50)", required: false, default: 50 }
15736
16017
  }
15737
16018
  });
15738
- var listCommand3 = defineCommand130({
16019
+ var listCommand4 = defineCommand137({
15739
16020
  meta: {
15740
16021
  name: "list",
15741
16022
  description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
@@ -15784,7 +16065,7 @@ var listCommand3 = defineCommand130({
15784
16065
  });
15785
16066
 
15786
16067
  // src/commands/testimonials/search.ts
15787
- import { defineCommand as defineCommand131 } from "citty";
16068
+ import { defineCommand as defineCommand138 } from "citty";
15788
16069
  registerSchema({
15789
16070
  command: "testimonials.search",
15790
16071
  description: "Search testimonials by text query. Uses hybrid BM25 + vector + reranking.",
@@ -15815,7 +16096,7 @@ registerSchema({
15815
16096
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
15816
16097
  }
15817
16098
  });
15818
- var searchCommand2 = defineCommand131({
16099
+ var searchCommand2 = defineCommand138({
15819
16100
  meta: {
15820
16101
  name: "search",
15821
16102
  description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
@@ -15886,7 +16167,7 @@ var searchCommand2 = defineCommand131({
15886
16167
  });
15887
16168
 
15888
16169
  // src/commands/testimonials/index.ts
15889
- var testimonialsCommand = defineCommand132({
16170
+ var testimonialsCommand = defineCommand139({
15890
16171
  meta: {
15891
16172
  name: "testimonials",
15892
16173
  description: `Find and browse testimonials in Baker. Subcommands: search, get, list.
@@ -15898,17 +16179,17 @@ Examples:
15898
16179
  baker testimonials list --source google --sentiment positive`
15899
16180
  },
15900
16181
  subCommands: {
15901
- get: getCommand4,
16182
+ get: getCommand5,
15902
16183
  search: searchCommand2,
15903
- list: listCommand3
16184
+ list: listCommand4
15904
16185
  }
15905
16186
  });
15906
16187
 
15907
16188
  // src/commands/videos/index.ts
15908
- import { defineCommand as defineCommand137 } from "citty";
16189
+ import { defineCommand as defineCommand144 } from "citty";
15909
16190
 
15910
16191
  // src/commands/videos/delete.ts
15911
- import { defineCommand as defineCommand133 } from "citty";
16192
+ import { defineCommand as defineCommand140 } from "citty";
15912
16193
  registerSchema({
15913
16194
  command: "videos.delete",
15914
16195
  description: "Delete a video by ID",
@@ -15922,7 +16203,7 @@ registerSchema({
15922
16203
  }
15923
16204
  }
15924
16205
  });
15925
- var deleteCommand3 = defineCommand133({
16206
+ var deleteCommand3 = defineCommand140({
15926
16207
  meta: {
15927
16208
  name: "delete",
15928
16209
  description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
@@ -15963,7 +16244,7 @@ var deleteCommand3 = defineCommand133({
15963
16244
  });
15964
16245
 
15965
16246
  // src/commands/videos/get.ts
15966
- import { defineCommand as defineCommand134 } from "citty";
16247
+ import { defineCommand as defineCommand141 } from "citty";
15967
16248
  registerSchema({
15968
16249
  command: "videos.get",
15969
16250
  description: "Get a single video by ID",
@@ -15971,7 +16252,7 @@ registerSchema({
15971
16252
  id: { type: "string", description: "Video ID", required: true }
15972
16253
  }
15973
16254
  });
15974
- var getCommand5 = defineCommand134({
16255
+ var getCommand6 = defineCommand141({
15975
16256
  meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
15976
16257
  args: {
15977
16258
  id: { type: "positional", description: "Video ID", required: false },
@@ -16008,7 +16289,7 @@ var getCommand5 = defineCommand134({
16008
16289
  });
16009
16290
 
16010
16291
  // src/commands/videos/search.ts
16011
- import { defineCommand as defineCommand135 } from "citty";
16292
+ import { defineCommand as defineCommand142 } from "citty";
16012
16293
  registerSchema({
16013
16294
  command: "videos.search",
16014
16295
  description: "Search videos by text query. Only returns ready videos.",
@@ -16018,7 +16299,7 @@ registerSchema({
16018
16299
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
16019
16300
  }
16020
16301
  });
16021
- var searchCommand3 = defineCommand135({
16302
+ var searchCommand3 = defineCommand142({
16022
16303
  meta: {
16023
16304
  name: "search",
16024
16305
  description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
@@ -16067,7 +16348,7 @@ var searchCommand3 = defineCommand135({
16067
16348
  // src/commands/videos/upload.ts
16068
16349
  import { readFile as readFile10, stat as stat3 } from "fs/promises";
16069
16350
  import { extname as extname3 } from "path";
16070
- import { defineCommand as defineCommand136 } from "citty";
16351
+ import { defineCommand as defineCommand143 } from "citty";
16071
16352
  var MIME_MAP2 = {
16072
16353
  ".mp4": "video/mp4",
16073
16354
  ".mov": "video/quicktime",
@@ -16101,7 +16382,7 @@ function detectContentType2(filePath) {
16101
16382
  }
16102
16383
  return mime;
16103
16384
  }
16104
- var uploadCommand2 = defineCommand136({
16385
+ var uploadCommand2 = defineCommand143({
16105
16386
  meta: {
16106
16387
  name: "upload",
16107
16388
  description: "Upload a video file to Baker via Mux direct upload. Auto-detects content type. Example: baker videos upload ./demo.mp4"
@@ -16155,7 +16436,7 @@ var uploadCommand2 = defineCommand136({
16155
16436
  });
16156
16437
 
16157
16438
  // src/commands/videos/index.ts
16158
- var videosCommand = defineCommand137({
16439
+ var videosCommand = defineCommand144({
16159
16440
  meta: {
16160
16441
  name: "videos",
16161
16442
  description: `Find and manage videos in Baker. Subcommands: search, get, upload, delete.
@@ -16168,7 +16449,7 @@ Examples:
16168
16449
  baker videos delete <video-id> --dry-run`
16169
16450
  },
16170
16451
  subCommands: {
16171
- get: getCommand5,
16452
+ get: getCommand6,
16172
16453
  search: searchCommand3,
16173
16454
  upload: uploadCommand2,
16174
16455
  delete: deleteCommand3
@@ -16176,10 +16457,10 @@ Examples:
16176
16457
  });
16177
16458
 
16178
16459
  // src/commands/winning-ads/index.ts
16179
- import { defineCommand as defineCommand140 } from "citty";
16460
+ import { defineCommand as defineCommand147 } from "citty";
16180
16461
 
16181
16462
  // src/commands/winning-ads/advertisers.ts
16182
- import { defineCommand as defineCommand138 } from "citty";
16463
+ import { defineCommand as defineCommand145 } from "citty";
16183
16464
  registerSchema({
16184
16465
  command: "winning-ads.advertisers",
16185
16466
  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).",
@@ -16192,7 +16473,7 @@ registerSchema({
16192
16473
  function identity(record) {
16193
16474
  return record;
16194
16475
  }
16195
- var advertisersCommand2 = defineCommand138({
16476
+ var advertisersCommand2 = defineCommand145({
16196
16477
  meta: {
16197
16478
  name: "advertisers",
16198
16479
  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'
@@ -16243,7 +16524,7 @@ var advertisersCommand2 = defineCommand138({
16243
16524
  });
16244
16525
 
16245
16526
  // src/commands/winning-ads/search.ts
16246
- import { defineCommand as defineCommand139 } from "citty";
16527
+ import { defineCommand as defineCommand146 } from "citty";
16247
16528
  registerSchema({
16248
16529
  command: "winning-ads.search",
16249
16530
  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.",
@@ -16351,7 +16632,7 @@ function buildSearchBody(args) {
16351
16632
  }
16352
16633
  return body;
16353
16634
  }
16354
- var searchCommand4 = defineCommand139({
16635
+ var searchCommand4 = defineCommand146({
16355
16636
  meta: {
16356
16637
  name: "search",
16357
16638
  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"
@@ -16463,7 +16744,7 @@ var searchCommand4 = defineCommand139({
16463
16744
  });
16464
16745
 
16465
16746
  // src/commands/winning-ads/index.ts
16466
- var winningAdsCommand = defineCommand140({
16747
+ var winningAdsCommand = defineCommand147({
16467
16748
  meta: {
16468
16749
  name: "winning-ads",
16469
16750
  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.
@@ -16503,7 +16784,7 @@ function getCliVersion() {
16503
16784
  }
16504
16785
 
16505
16786
  // src/cli.ts
16506
- var main = defineCommand141({
16787
+ var main = defineCommand148({
16507
16788
  meta: {
16508
16789
  name: "baker",
16509
16790
  version: getCliVersion(),
@@ -16517,6 +16798,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
16517
16798
  },
16518
16799
  subCommands: {
16519
16800
  actions: actionsCommand,
16801
+ missions: missionsCommand,
16520
16802
  "scheduled-actions": scheduledActionsCommand,
16521
16803
  ads: adsCommand,
16522
16804
  ga4: ga4Command,