@koda-sl/baker-cli 0.91.0 → 0.93.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";
@@ -547,7 +547,7 @@ var completeCommand = defineCommand2({
547
547
  import { defineCommand as defineCommand3 } from "citty";
548
548
  registerSchema({
549
549
  command: "actions.create",
550
- description: "Stage creation of a new action (applies when the chat is published). Returns a tempId you can use to link in the same draft. After creating, check if this action blocks or is blocked by other actions and wire dependencies with `baker actions link`.",
550
+ description: "Stage creation of a new action (applies when the chat is published). Returns a tempId you can use to link in the same draft. After creating, check if this action blocks or is blocked by other actions and wire dependencies with `baker actions link`. To make this action a mission step, pass --mission and --order \u2014 it attaches atomically, so the step never flickers as a loose action.",
551
551
  args: {
552
552
  name: { type: "string", description: "Action name (short, action-verb, \u22646 words)", required: true },
553
553
  description: {
@@ -555,7 +555,17 @@ registerSchema({
555
555
  description: "Context-complete description: what / why / where / done-when",
556
556
  required: false
557
557
  },
558
- "temp-id": { type: "string", description: "Custom tempId (auto-generated if omitted)", required: false }
558
+ "temp-id": { type: "string", description: "Custom tempId (auto-generated if omitted)", required: false },
559
+ mission: {
560
+ type: "string",
561
+ description: "Attach the new action to this mission (id or missionTempId) as a step, in one atomic op",
562
+ required: false
563
+ },
564
+ order: {
565
+ type: "string",
566
+ description: "0-based position of the step within the mission (required when --mission is set)",
567
+ required: false
568
+ }
559
569
  }
560
570
  });
561
571
  var createCommand = defineCommand3({
@@ -566,7 +576,9 @@ var createCommand = defineCommand3({
566
576
  args: {
567
577
  name: { type: "string", description: "Action name", required: false },
568
578
  description: { type: "string", description: "Description", required: false, default: "" },
569
- "temp-id": { type: "string", description: "Optional custom tempId", required: false }
579
+ "temp-id": { type: "string", description: "Optional custom tempId", required: false },
580
+ mission: { type: "string", description: "Mission ref to attach this step to", required: false },
581
+ order: { type: "string", description: "0-based step position (required with --mission)", required: false }
570
582
  },
571
583
  run: async ({ args }) => {
572
584
  try {
@@ -574,19 +586,31 @@ var createCommand = defineCommand3({
574
586
  if (!name || name.trim().length === 0) {
575
587
  failValidation("--name is required.");
576
588
  }
589
+ const mission = args.mission;
590
+ let order;
591
+ if (mission) {
592
+ order = Number.parseInt(args.order ?? "", 10);
593
+ if (Number.isNaN(order) || order < 0) {
594
+ failValidation("--order must be a non-negative integer when --mission is set.");
595
+ }
596
+ }
577
597
  const chatId = requireChatId();
578
598
  const tempId = args["temp-id"] || generateTempId();
579
599
  const response = await apiPost("/api/actions/create", {
580
600
  chatId,
581
601
  tempId,
582
602
  name,
583
- description: args.description ?? ""
603
+ description: args.description ?? "",
604
+ ...mission ? { missionRef: mission, order } : {}
584
605
  });
585
606
  const hints = [];
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)");
589
610
  }
611
+ if (mission) {
612
+ hints.push(`Attached to mission ${mission} at order ${order}.`);
613
+ }
590
614
  writeJson({ ...response, hints });
591
615
  } catch (err) {
592
616
  failApi(err);
@@ -14307,11 +14331,292 @@ Paid transforms (run on the Convex backend, cost-tracked):
14307
14331
  }
14308
14332
  });
14309
14333
 
14334
+ // src/commands/missions/index.ts
14335
+ import { defineCommand as defineCommand116 } from "citty";
14336
+
14337
+ // src/commands/missions/add-action.ts
14338
+ import { defineCommand as defineCommand110 } from "citty";
14339
+ registerSchema({
14340
+ command: "missions.add-action",
14341
+ 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.",
14342
+ args: {
14343
+ mission: { type: "string", description: "Mission id or missionTempId", required: true },
14344
+ action: { type: "string", description: "Action id or tempId", required: true },
14345
+ order: { type: "string", description: "0-based position within the mission", required: true }
14346
+ }
14347
+ });
14348
+ var addActionCommand = defineCommand110({
14349
+ meta: {
14350
+ name: "add-action",
14351
+ description: "Attach an action to a mission as an ordered step. Example: baker missions add-action --mission <ref> --action <ref> --order 0"
14352
+ },
14353
+ args: {
14354
+ mission: { type: "string", description: "Mission ref", required: false },
14355
+ action: { type: "string", description: "Action ref", required: false },
14356
+ order: { type: "string", description: "0-based order", required: false }
14357
+ },
14358
+ run: async ({ args }) => {
14359
+ try {
14360
+ const mission = args.mission;
14361
+ const action = args.action;
14362
+ if (!mission || !action) {
14363
+ failValidation("--mission and --action are required.");
14364
+ }
14365
+ const order = Number.parseInt(args.order ?? "", 10);
14366
+ if (Number.isNaN(order) || order < 0) {
14367
+ failValidation("--order must be a non-negative integer.");
14368
+ }
14369
+ const chatId = requireChatId();
14370
+ await apiPost("/api/missions/add-action", {
14371
+ chatId,
14372
+ missionRef: mission,
14373
+ actionRef: action,
14374
+ order
14375
+ });
14376
+ writeOk();
14377
+ } catch (err) {
14378
+ failApi(err);
14379
+ }
14380
+ }
14381
+ });
14382
+
14383
+ // src/commands/missions/create.ts
14384
+ import { defineCommand as defineCommand111 } from "citty";
14385
+ registerSchema({
14386
+ command: "missions.create",
14387
+ 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.",
14388
+ args: {
14389
+ title: { type: "string", description: "Mission title \u2014 the goal, short", required: true },
14390
+ overview: {
14391
+ type: "string",
14392
+ description: "Markdown overview: the plan as numbered Phases (goal / what it produces / what unlocks next). No calendar or effort framing.",
14393
+ required: false
14394
+ },
14395
+ "temp-id": { type: "string", description: "Custom missionTempId (auto-generated if omitted)", required: false }
14396
+ }
14397
+ });
14398
+ var createCommand2 = defineCommand111({
14399
+ meta: {
14400
+ name: "create",
14401
+ description: 'Open a Mission to group ordered steps. Example: baker missions create --title "Audit Google Ads" --overview "..."'
14402
+ },
14403
+ args: {
14404
+ title: { type: "string", description: "Mission title", required: false },
14405
+ overview: { type: "string", description: "Markdown overview (numbered Phases)", required: false, default: "" },
14406
+ "temp-id": { type: "string", description: "Optional custom missionTempId", required: false }
14407
+ },
14408
+ run: async ({ args }) => {
14409
+ try {
14410
+ const title = args.title;
14411
+ if (!title || title.trim().length === 0) {
14412
+ failValidation("--title is required.");
14413
+ }
14414
+ const chatId = requireChatId();
14415
+ const missionTempId = args["temp-id"] || generateTempId();
14416
+ const response = await apiPost("/api/missions/create", {
14417
+ chatId,
14418
+ missionTempId,
14419
+ title,
14420
+ overview: args.overview ?? ""
14421
+ });
14422
+ const hints = [
14423
+ `Add ordered steps: create each action, then baker missions add-action --mission ${missionTempId} --action <tempId> --order 0`
14424
+ ];
14425
+ if (!args.overview) {
14426
+ hints.push(
14427
+ "Tip: pass --overview with the plan as numbered Phases (goal / produces / unlocks; no dates or effort sizing)."
14428
+ );
14429
+ }
14430
+ writeJson({ ...response, hints });
14431
+ } catch (err) {
14432
+ failApi(err);
14433
+ }
14434
+ }
14435
+ });
14436
+
14437
+ // src/commands/missions/get.ts
14438
+ import { defineCommand as defineCommand112 } from "citty";
14439
+ registerSchema({
14440
+ command: "missions.get",
14441
+ description: "Get one mission with its overview, progress, and ordered steps.",
14442
+ args: {
14443
+ id: { type: "string", description: "Mission ID", required: true }
14444
+ }
14445
+ });
14446
+ var getCommand3 = defineCommand112({
14447
+ meta: { name: "get", description: "Get a mission by ID. Example: baker missions get <mission-id>" },
14448
+ args: {
14449
+ id: { type: "positional", description: "Mission ID", required: false },
14450
+ "mission-id": { type: "string", description: "Mission ID (alternative to positional)", required: false }
14451
+ },
14452
+ run: async ({ args }) => {
14453
+ try {
14454
+ const id = args.id || args["mission-id"];
14455
+ if (!id) {
14456
+ failValidation("Mission ID is required.");
14457
+ }
14458
+ validateConvexId(id);
14459
+ const response = await apiPost("/api/missions/get", { missionId: id });
14460
+ writeJson(response);
14461
+ } catch (err) {
14462
+ failApi(err);
14463
+ }
14464
+ }
14465
+ });
14466
+
14467
+ // src/commands/missions/list.ts
14468
+ import { defineCommand as defineCommand113 } from "citty";
14469
+ registerSchema({
14470
+ command: "missions.list",
14471
+ description: "List the company's missions with per-mission progress (done/total) and ordered steps. Aborted missions are hidden unless --include-aborted.",
14472
+ args: {
14473
+ "include-aborted": {
14474
+ type: "boolean",
14475
+ description: "Include aborted missions (default: false)",
14476
+ required: false,
14477
+ default: false
14478
+ }
14479
+ }
14480
+ });
14481
+ var listCommand2 = defineCommand113({
14482
+ meta: {
14483
+ name: "list",
14484
+ description: "List missions with progress and ordered steps. Example: baker missions list"
14485
+ },
14486
+ args: {
14487
+ "include-aborted": { type: "boolean", description: "Include aborted missions", required: false, default: false }
14488
+ },
14489
+ run: async ({ args }) => {
14490
+ try {
14491
+ const body = {};
14492
+ if (args["include-aborted"] === true) {
14493
+ body.includeAborted = true;
14494
+ }
14495
+ const response = await apiPost("/api/missions/list", body);
14496
+ writeJson(response);
14497
+ } catch (err) {
14498
+ failApi(err);
14499
+ }
14500
+ }
14501
+ });
14502
+
14503
+ // src/commands/missions/set-status.ts
14504
+ import { defineCommand as defineCommand114 } from "citty";
14505
+ registerSchema({
14506
+ command: "missions.set-status",
14507
+ 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.",
14508
+ args: {
14509
+ id: { type: "string", description: "Mission ID", required: true },
14510
+ status: { type: "string", description: "active | accomplished | aborted", required: true }
14511
+ }
14512
+ });
14513
+ var setStatusCommand = defineCommand114({
14514
+ meta: {
14515
+ name: "set-status",
14516
+ description: "Set mission status. Example: baker missions set-status <id> --status accomplished"
14517
+ },
14518
+ args: {
14519
+ id: { type: "positional", description: "Mission ID", required: false },
14520
+ "mission-id": { type: "string", description: "Mission ID", required: false },
14521
+ status: { type: "string", description: "active | accomplished | aborted", required: false }
14522
+ },
14523
+ run: async ({ args }) => {
14524
+ try {
14525
+ const id = args.id || args["mission-id"];
14526
+ if (!id) {
14527
+ failValidation("Mission ID is required.");
14528
+ }
14529
+ validateConvexId(id);
14530
+ const status = args.status;
14531
+ if (status !== "active" && status !== "accomplished" && status !== "aborted") {
14532
+ failValidation("--status must be one of: active, accomplished, aborted.");
14533
+ }
14534
+ const chatId = requireChatId();
14535
+ await apiPost("/api/missions/set-status", { chatId, missionId: id, status });
14536
+ writeOk();
14537
+ } catch (err) {
14538
+ failApi(err);
14539
+ }
14540
+ }
14541
+ });
14542
+
14543
+ // src/commands/missions/update.ts
14544
+ import { defineCommand as defineCommand115 } from "citty";
14545
+ registerSchema({
14546
+ command: "missions.update",
14547
+ description: "Stage an update to a mission's title and/or overview (real mission id only). Applies on chat publish.",
14548
+ args: {
14549
+ id: { type: "string", description: "Mission ID", required: true },
14550
+ title: { type: "string", description: "New title", required: false },
14551
+ overview: { type: "string", description: "New markdown overview (numbered Phases)", required: false }
14552
+ }
14553
+ });
14554
+ var updateCommand2 = defineCommand115({
14555
+ meta: {
14556
+ name: "update",
14557
+ description: 'Stage a mission update. Example: baker missions update <id> --overview "..."'
14558
+ },
14559
+ args: {
14560
+ id: { type: "positional", description: "Mission ID", required: false },
14561
+ "mission-id": { type: "string", description: "Mission ID", required: false },
14562
+ title: { type: "string", description: "New title", required: false },
14563
+ overview: { type: "string", description: "New markdown overview", required: false }
14564
+ },
14565
+ run: async ({ args }) => {
14566
+ try {
14567
+ const id = args.id || args["mission-id"];
14568
+ if (!id) {
14569
+ failValidation("Mission ID is required.");
14570
+ }
14571
+ validateConvexId(id);
14572
+ if (args.title === void 0 && args.overview === void 0) {
14573
+ failValidation("Provide at least one of --title, --overview.");
14574
+ }
14575
+ const chatId = requireChatId();
14576
+ await apiPost("/api/missions/update", {
14577
+ chatId,
14578
+ missionId: id,
14579
+ title: args.title,
14580
+ overview: args.overview
14581
+ });
14582
+ writeOk();
14583
+ } catch (err) {
14584
+ failApi(err);
14585
+ }
14586
+ }
14587
+ });
14588
+
14589
+ // src/commands/missions/index.ts
14590
+ var missionsCommand = defineCommand116({
14591
+ meta: {
14592
+ name: "missions",
14593
+ 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.
14594
+
14595
+ 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.
14596
+
14597
+ 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.
14598
+
14599
+ Examples:
14600
+ baker missions create --title "Audit Google Ads" --overview "..."
14601
+ baker missions add-action --mission <ref> --action <ref> --order 0
14602
+ baker missions list
14603
+ baker missions set-status <id> --status accomplished`
14604
+ },
14605
+ subCommands: {
14606
+ list: listCommand2,
14607
+ get: getCommand3,
14608
+ create: createCommand2,
14609
+ "add-action": addActionCommand,
14610
+ update: updateCommand2,
14611
+ "set-status": setStatusCommand
14612
+ }
14613
+ });
14614
+
14310
14615
  // src/commands/research/index.ts
14311
- import { defineCommand as defineCommand120 } from "citty";
14616
+ import { defineCommand as defineCommand127 } from "citty";
14312
14617
 
14313
14618
  // src/commands/research/advertisers.ts
14314
- import { defineCommand as defineCommand110 } from "citty";
14619
+ import { defineCommand as defineCommand117 } from "citty";
14315
14620
 
14316
14621
  // src/commands/research/output.ts
14317
14622
  var RESEARCH_DATA_NOTE = "Estimates based on third-party SERP data \u2014 not exact figures. Use for directional insights, not precise measurement.";
@@ -14424,7 +14729,7 @@ var FIELDS3 = {
14424
14729
  etv: "Estimated traffic value (USD)",
14425
14730
  visibility: "SERP visibility score (0-1)"
14426
14731
  };
14427
- var advertisersCommand = defineCommand110({
14732
+ var advertisersCommand = defineCommand117({
14428
14733
  meta: {
14429
14734
  name: "advertisers",
14430
14735
  description: `Find domains competing for a keyword in Google SERPs.
@@ -14471,7 +14776,7 @@ Examples:
14471
14776
  });
14472
14777
 
14473
14778
  // src/commands/research/autocomplete.ts
14474
- import { defineCommand as defineCommand111 } from "citty";
14779
+ import { defineCommand as defineCommand118 } from "citty";
14475
14780
  registerSchema({
14476
14781
  command: "research.autocomplete",
14477
14782
  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 +14799,7 @@ registerSchema({
14494
14799
  var FIELDS4 = {
14495
14800
  suggestion: "Autocomplete suggestion from Google"
14496
14801
  };
14497
- var autocompleteCommand = defineCommand111({
14802
+ var autocompleteCommand = defineCommand118({
14498
14803
  meta: {
14499
14804
  name: "autocomplete",
14500
14805
  description: `Get Google Autocomplete suggestions for keyword expansion.
@@ -14540,7 +14845,7 @@ Examples:
14540
14845
  });
14541
14846
 
14542
14847
  // src/commands/research/countries.ts
14543
- import { defineCommand as defineCommand112 } from "citty";
14848
+ import { defineCommand as defineCommand119 } from "citty";
14544
14849
  registerSchema({
14545
14850
  command: "research.countries",
14546
14851
  description: "List all supported country codes for --location flag in research commands.",
@@ -14597,7 +14902,7 @@ var FIELDS5 = {
14597
14902
  code: "Country code to pass as --location",
14598
14903
  name: "Country name"
14599
14904
  };
14600
- var countriesCommand = defineCommand112({
14905
+ var countriesCommand = defineCommand119({
14601
14906
  meta: {
14602
14907
  name: "countries",
14603
14908
  description: "List all supported country codes for --location flag."
@@ -14608,7 +14913,7 @@ var countriesCommand = defineCommand112({
14608
14913
  });
14609
14914
 
14610
14915
  // src/commands/research/intent.ts
14611
- import { defineCommand as defineCommand113 } from "citty";
14916
+ import { defineCommand as defineCommand120 } from "citty";
14612
14917
  registerSchema({
14613
14918
  command: "research.intent",
14614
14919
  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 +14936,7 @@ var FIELDS6 = {
14631
14936
  intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
14632
14937
  probability: "Confidence score 0.0-1.0"
14633
14938
  };
14634
- var intentCommand = defineCommand113({
14939
+ var intentCommand = defineCommand120({
14635
14940
  meta: {
14636
14941
  name: "intent",
14637
14942
  description: `Classify Google Search intent for keywords. Returns intent type and confidence.
@@ -14679,7 +14984,7 @@ Examples:
14679
14984
  });
14680
14985
 
14681
14986
  // src/commands/research/keyword-gap.ts
14682
- import { defineCommand as defineCommand114 } from "citty";
14987
+ import { defineCommand as defineCommand121 } from "citty";
14683
14988
  registerSchema({
14684
14989
  command: "research.keyword-gap",
14685
14990
  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 +15013,7 @@ var FIELDS7 = {
14708
15013
  cpc: "Cost per click USD",
14709
15014
  their_position: "Competitor's ranking position"
14710
15015
  };
14711
- var keywordGapCommand = defineCommand114({
15016
+ var keywordGapCommand = defineCommand121({
14712
15017
  meta: {
14713
15018
  name: "keyword-gap",
14714
15019
  description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
@@ -14782,7 +15087,7 @@ Examples:
14782
15087
  });
14783
15088
 
14784
15089
  // src/commands/research/keywords-for-site.ts
14785
- import { defineCommand as defineCommand115 } from "citty";
15090
+ import { defineCommand as defineCommand122 } from "citty";
14786
15091
  registerSchema({
14787
15092
  command: "research.keywords-for-site",
14788
15093
  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 +15120,7 @@ var FIELDS8 = {
14815
15120
  competition: "LOW, MEDIUM, or HIGH",
14816
15121
  competition_index: "Competition score 0-100"
14817
15122
  };
14818
- var keywordsForSiteCommand = defineCommand115({
15123
+ var keywordsForSiteCommand = defineCommand122({
14819
15124
  meta: {
14820
15125
  name: "keywords-for-site",
14821
15126
  description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
@@ -14868,7 +15173,7 @@ Examples:
14868
15173
  });
14869
15174
 
14870
15175
  // src/commands/research/languages.ts
14871
- import { defineCommand as defineCommand116 } from "citty";
15176
+ import { defineCommand as defineCommand123 } from "citty";
14872
15177
  registerSchema({
14873
15178
  command: "research.languages",
14874
15179
  description: "List all supported language codes for --language flag in research commands.",
@@ -14898,7 +15203,7 @@ var FIELDS9 = {
14898
15203
  code: "Language code to pass as --language",
14899
15204
  name: "Language name (also accepted by --language)"
14900
15205
  };
14901
- var languagesCommand2 = defineCommand116({
15206
+ var languagesCommand2 = defineCommand123({
14902
15207
  meta: {
14903
15208
  name: "languages",
14904
15209
  description: "List all supported language codes for --language flag."
@@ -14909,7 +15214,7 @@ var languagesCommand2 = defineCommand116({
14909
15214
  });
14910
15215
 
14911
15216
  // src/commands/research/lighthouse.ts
14912
- import { defineCommand as defineCommand117 } from "citty";
15217
+ import { defineCommand as defineCommand124 } from "citty";
14913
15218
  registerSchema({
14914
15219
  command: "research.lighthouse",
14915
15220
  description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
@@ -14928,7 +15233,7 @@ var FIELDS10 = {
14928
15233
  speed_index_ms: "Speed Index in ms (good: < 3400)",
14929
15234
  interactive_ms: "Time to Interactive in ms (good: < 3800)"
14930
15235
  };
14931
- var lighthouseCommand = defineCommand117({
15236
+ var lighthouseCommand = defineCommand124({
14932
15237
  meta: {
14933
15238
  name: "lighthouse",
14934
15239
  description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
@@ -14966,7 +15271,7 @@ Examples:
14966
15271
  });
14967
15272
 
14968
15273
  // src/commands/research/relevant-pages.ts
14969
- import { defineCommand as defineCommand118 } from "citty";
15274
+ import { defineCommand as defineCommand125 } from "citty";
14970
15275
  registerSchema({
14971
15276
  command: "research.relevant-pages",
14972
15277
  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 +15297,7 @@ var FIELDS11 = {
14992
15297
  keywords: "Total organic keywords the page ranks for",
14993
15298
  top_10: "Keywords in positions 1-10"
14994
15299
  };
14995
- var relevantPagesCommand = defineCommand118({
15300
+ var relevantPagesCommand = defineCommand125({
14996
15301
  meta: {
14997
15302
  name: "relevant-pages",
14998
15303
  description: `Get the top pages of a competitor domain with traffic data.
@@ -15038,7 +15343,7 @@ Examples:
15038
15343
  });
15039
15344
 
15040
15345
  // src/commands/research/web.ts
15041
- import { defineCommand as defineCommand119 } from "citty";
15346
+ import { defineCommand as defineCommand126 } from "citty";
15042
15347
  registerSchema({
15043
15348
  command: "research.web",
15044
15349
  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 +15394,7 @@ async function runDeepResearch(question) {
15089
15394
  }
15090
15395
  throw new Error("Deep research timed out");
15091
15396
  }
15092
- var webCommand = defineCommand119({
15397
+ var webCommand = defineCommand126({
15093
15398
  meta: {
15094
15399
  name: "web",
15095
15400
  description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
@@ -15149,7 +15454,7 @@ Examples:
15149
15454
  });
15150
15455
 
15151
15456
  // src/commands/research/index.ts
15152
- var researchCommand = defineCommand120({
15457
+ var researchCommand = defineCommand127({
15153
15458
  meta: {
15154
15459
  name: "research",
15155
15460
  description: `Competitive intelligence and AI-powered research commands.
@@ -15189,10 +15494,10 @@ Examples:
15189
15494
  });
15190
15495
 
15191
15496
  // src/commands/scheduled-actions/index.ts
15192
- import { defineCommand as defineCommand127 } from "citty";
15497
+ import { defineCommand as defineCommand134 } from "citty";
15193
15498
 
15194
15499
  // src/commands/scheduled-actions/create.ts
15195
- import { defineCommand as defineCommand121 } from "citty";
15500
+ import { defineCommand as defineCommand128 } from "citty";
15196
15501
 
15197
15502
  // src/commands/scheduled-actions/shared.ts
15198
15503
  var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
@@ -15297,7 +15602,7 @@ registerSchema({
15297
15602
  prompt: { type: "string", description: "Additional prompt instructions for the spawned agent", required: false }
15298
15603
  }
15299
15604
  });
15300
- var createCommand2 = defineCommand121({
15605
+ var createCommand3 = defineCommand128({
15301
15606
  meta: {
15302
15607
  name: "create",
15303
15608
  description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
@@ -15345,7 +15650,7 @@ var createCommand2 = defineCommand121({
15345
15650
  });
15346
15651
 
15347
15652
  // src/commands/scheduled-actions/delete.ts
15348
- import { defineCommand as defineCommand122 } from "citty";
15653
+ import { defineCommand as defineCommand129 } from "citty";
15349
15654
  registerSchema({
15350
15655
  command: "scheduled-actions.delete",
15351
15656
  description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
@@ -15353,7 +15658,7 @@ registerSchema({
15353
15658
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
15354
15659
  }
15355
15660
  });
15356
- var deleteCommand2 = defineCommand122({
15661
+ var deleteCommand2 = defineCommand129({
15357
15662
  meta: {
15358
15663
  name: "delete",
15359
15664
  description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
@@ -15382,7 +15687,7 @@ var deleteCommand2 = defineCommand122({
15382
15687
  });
15383
15688
 
15384
15689
  // src/commands/scheduled-actions/get.ts
15385
- import { defineCommand as defineCommand123 } from "citty";
15690
+ import { defineCommand as defineCommand130 } from "citty";
15386
15691
  registerSchema({
15387
15692
  command: "scheduled-actions.get",
15388
15693
  description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
@@ -15390,7 +15695,7 @@ registerSchema({
15390
15695
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
15391
15696
  }
15392
15697
  });
15393
- var getCommand3 = defineCommand123({
15698
+ var getCommand4 = defineCommand130({
15394
15699
  meta: {
15395
15700
  name: "get",
15396
15701
  description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
@@ -15427,13 +15732,13 @@ var getCommand3 = defineCommand123({
15427
15732
  });
15428
15733
 
15429
15734
  // src/commands/scheduled-actions/list.ts
15430
- import { defineCommand as defineCommand124 } from "citty";
15735
+ import { defineCommand as defineCommand131 } from "citty";
15431
15736
  registerSchema({
15432
15737
  command: "scheduled-actions.list",
15433
15738
  description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set.",
15434
15739
  args: {}
15435
15740
  });
15436
- var listCommand2 = defineCommand124({
15741
+ var listCommand3 = defineCommand131({
15437
15742
  meta: {
15438
15743
  name: "list",
15439
15744
  description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set."
@@ -15454,7 +15759,7 @@ var listCommand2 = defineCommand124({
15454
15759
  });
15455
15760
 
15456
15761
  // src/commands/scheduled-actions/trigger.ts
15457
- import { defineCommand as defineCommand125 } from "citty";
15762
+ import { defineCommand as defineCommand132 } from "citty";
15458
15763
  registerSchema({
15459
15764
  command: "scheduled-actions.trigger",
15460
15765
  description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
@@ -15462,7 +15767,7 @@ registerSchema({
15462
15767
  id: { type: "string", description: "Published scheduled action ID", required: true }
15463
15768
  }
15464
15769
  });
15465
- var triggerCommand = defineCommand125({
15770
+ var triggerCommand = defineCommand132({
15466
15771
  meta: {
15467
15772
  name: "trigger",
15468
15773
  description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
@@ -15499,7 +15804,7 @@ var triggerCommand = defineCommand125({
15499
15804
  });
15500
15805
 
15501
15806
  // src/commands/scheduled-actions/update.ts
15502
- import { defineCommand as defineCommand126 } from "citty";
15807
+ import { defineCommand as defineCommand133 } from "citty";
15503
15808
  registerSchema({
15504
15809
  command: "scheduled-actions.update",
15505
15810
  description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
@@ -15524,7 +15829,7 @@ registerSchema({
15524
15829
  prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
15525
15830
  }
15526
15831
  });
15527
- var updateCommand2 = defineCommand126({
15832
+ var updateCommand3 = defineCommand133({
15528
15833
  meta: {
15529
15834
  name: "update",
15530
15835
  description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
@@ -15594,7 +15899,7 @@ var updateCommand2 = defineCommand126({
15594
15899
  });
15595
15900
 
15596
15901
  // src/commands/scheduled-actions/index.ts
15597
- var scheduledActionsCommand = defineCommand127({
15902
+ var scheduledActionsCommand = defineCommand134({
15598
15903
  meta: {
15599
15904
  name: "scheduled-actions",
15600
15905
  description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger.
@@ -15610,18 +15915,18 @@ Examples:
15610
15915
  baker scheduled-actions trigger <id>`
15611
15916
  },
15612
15917
  subCommands: {
15613
- list: listCommand2,
15614
- get: getCommand3,
15615
- create: createCommand2,
15616
- update: updateCommand2,
15918
+ list: listCommand3,
15919
+ get: getCommand4,
15920
+ create: createCommand3,
15921
+ update: updateCommand3,
15617
15922
  delete: deleteCommand2,
15618
15923
  trigger: triggerCommand
15619
15924
  }
15620
15925
  });
15621
15926
 
15622
15927
  // src/commands/schema.ts
15623
- import { defineCommand as defineCommand128 } from "citty";
15624
- var schemaCommand = defineCommand128({
15928
+ import { defineCommand as defineCommand135 } from "citty";
15929
+ var schemaCommand = defineCommand135({
15625
15930
  meta: {
15626
15931
  name: "schema",
15627
15932
  description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
@@ -15657,10 +15962,10 @@ var schemaCommand = defineCommand128({
15657
15962
  });
15658
15963
 
15659
15964
  // src/commands/testimonials/index.ts
15660
- import { defineCommand as defineCommand132 } from "citty";
15965
+ import { defineCommand as defineCommand139 } from "citty";
15661
15966
 
15662
15967
  // src/commands/testimonials/get.ts
15663
- import { defineCommand as defineCommand129 } from "citty";
15968
+ import { defineCommand as defineCommand136 } from "citty";
15664
15969
  registerSchema({
15665
15970
  command: "testimonials.get",
15666
15971
  description: "Get a single testimonial by ID",
@@ -15668,7 +15973,7 @@ registerSchema({
15668
15973
  id: { type: "string", description: "Testimonial ID", required: true }
15669
15974
  }
15670
15975
  });
15671
- var getCommand4 = defineCommand129({
15976
+ var getCommand5 = defineCommand136({
15672
15977
  meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
15673
15978
  args: {
15674
15979
  id: { type: "positional", description: "Testimonial ID", required: false },
@@ -15705,7 +16010,7 @@ var getCommand4 = defineCommand129({
15705
16010
  });
15706
16011
 
15707
16012
  // src/commands/testimonials/list.ts
15708
- import { defineCommand as defineCommand130 } from "citty";
16013
+ import { defineCommand as defineCommand137 } from "citty";
15709
16014
  registerSchema({
15710
16015
  command: "testimonials.list",
15711
16016
  description: "List testimonials with optional filters.",
@@ -15735,7 +16040,7 @@ registerSchema({
15735
16040
  limit: { type: "number", description: "Max results (default 50)", required: false, default: 50 }
15736
16041
  }
15737
16042
  });
15738
- var listCommand3 = defineCommand130({
16043
+ var listCommand4 = defineCommand137({
15739
16044
  meta: {
15740
16045
  name: "list",
15741
16046
  description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
@@ -15784,7 +16089,7 @@ var listCommand3 = defineCommand130({
15784
16089
  });
15785
16090
 
15786
16091
  // src/commands/testimonials/search.ts
15787
- import { defineCommand as defineCommand131 } from "citty";
16092
+ import { defineCommand as defineCommand138 } from "citty";
15788
16093
  registerSchema({
15789
16094
  command: "testimonials.search",
15790
16095
  description: "Search testimonials by text query. Uses hybrid BM25 + vector + reranking.",
@@ -15815,7 +16120,7 @@ registerSchema({
15815
16120
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
15816
16121
  }
15817
16122
  });
15818
- var searchCommand2 = defineCommand131({
16123
+ var searchCommand2 = defineCommand138({
15819
16124
  meta: {
15820
16125
  name: "search",
15821
16126
  description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
@@ -15886,7 +16191,7 @@ var searchCommand2 = defineCommand131({
15886
16191
  });
15887
16192
 
15888
16193
  // src/commands/testimonials/index.ts
15889
- var testimonialsCommand = defineCommand132({
16194
+ var testimonialsCommand = defineCommand139({
15890
16195
  meta: {
15891
16196
  name: "testimonials",
15892
16197
  description: `Find and browse testimonials in Baker. Subcommands: search, get, list.
@@ -15898,17 +16203,17 @@ Examples:
15898
16203
  baker testimonials list --source google --sentiment positive`
15899
16204
  },
15900
16205
  subCommands: {
15901
- get: getCommand4,
16206
+ get: getCommand5,
15902
16207
  search: searchCommand2,
15903
- list: listCommand3
16208
+ list: listCommand4
15904
16209
  }
15905
16210
  });
15906
16211
 
15907
16212
  // src/commands/videos/index.ts
15908
- import { defineCommand as defineCommand137 } from "citty";
16213
+ import { defineCommand as defineCommand144 } from "citty";
15909
16214
 
15910
16215
  // src/commands/videos/delete.ts
15911
- import { defineCommand as defineCommand133 } from "citty";
16216
+ import { defineCommand as defineCommand140 } from "citty";
15912
16217
  registerSchema({
15913
16218
  command: "videos.delete",
15914
16219
  description: "Delete a video by ID",
@@ -15922,7 +16227,7 @@ registerSchema({
15922
16227
  }
15923
16228
  }
15924
16229
  });
15925
- var deleteCommand3 = defineCommand133({
16230
+ var deleteCommand3 = defineCommand140({
15926
16231
  meta: {
15927
16232
  name: "delete",
15928
16233
  description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
@@ -15963,7 +16268,7 @@ var deleteCommand3 = defineCommand133({
15963
16268
  });
15964
16269
 
15965
16270
  // src/commands/videos/get.ts
15966
- import { defineCommand as defineCommand134 } from "citty";
16271
+ import { defineCommand as defineCommand141 } from "citty";
15967
16272
  registerSchema({
15968
16273
  command: "videos.get",
15969
16274
  description: "Get a single video by ID",
@@ -15971,7 +16276,7 @@ registerSchema({
15971
16276
  id: { type: "string", description: "Video ID", required: true }
15972
16277
  }
15973
16278
  });
15974
- var getCommand5 = defineCommand134({
16279
+ var getCommand6 = defineCommand141({
15975
16280
  meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
15976
16281
  args: {
15977
16282
  id: { type: "positional", description: "Video ID", required: false },
@@ -16008,7 +16313,7 @@ var getCommand5 = defineCommand134({
16008
16313
  });
16009
16314
 
16010
16315
  // src/commands/videos/search.ts
16011
- import { defineCommand as defineCommand135 } from "citty";
16316
+ import { defineCommand as defineCommand142 } from "citty";
16012
16317
  registerSchema({
16013
16318
  command: "videos.search",
16014
16319
  description: "Search videos by text query. Only returns ready videos.",
@@ -16018,7 +16323,7 @@ registerSchema({
16018
16323
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
16019
16324
  }
16020
16325
  });
16021
- var searchCommand3 = defineCommand135({
16326
+ var searchCommand3 = defineCommand142({
16022
16327
  meta: {
16023
16328
  name: "search",
16024
16329
  description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
@@ -16067,7 +16372,7 @@ var searchCommand3 = defineCommand135({
16067
16372
  // src/commands/videos/upload.ts
16068
16373
  import { readFile as readFile10, stat as stat3 } from "fs/promises";
16069
16374
  import { extname as extname3 } from "path";
16070
- import { defineCommand as defineCommand136 } from "citty";
16375
+ import { defineCommand as defineCommand143 } from "citty";
16071
16376
  var MIME_MAP2 = {
16072
16377
  ".mp4": "video/mp4",
16073
16378
  ".mov": "video/quicktime",
@@ -16101,7 +16406,7 @@ function detectContentType2(filePath) {
16101
16406
  }
16102
16407
  return mime;
16103
16408
  }
16104
- var uploadCommand2 = defineCommand136({
16409
+ var uploadCommand2 = defineCommand143({
16105
16410
  meta: {
16106
16411
  name: "upload",
16107
16412
  description: "Upload a video file to Baker via Mux direct upload. Auto-detects content type. Example: baker videos upload ./demo.mp4"
@@ -16155,7 +16460,7 @@ var uploadCommand2 = defineCommand136({
16155
16460
  });
16156
16461
 
16157
16462
  // src/commands/videos/index.ts
16158
- var videosCommand = defineCommand137({
16463
+ var videosCommand = defineCommand144({
16159
16464
  meta: {
16160
16465
  name: "videos",
16161
16466
  description: `Find and manage videos in Baker. Subcommands: search, get, upload, delete.
@@ -16168,7 +16473,7 @@ Examples:
16168
16473
  baker videos delete <video-id> --dry-run`
16169
16474
  },
16170
16475
  subCommands: {
16171
- get: getCommand5,
16476
+ get: getCommand6,
16172
16477
  search: searchCommand3,
16173
16478
  upload: uploadCommand2,
16174
16479
  delete: deleteCommand3
@@ -16176,10 +16481,10 @@ Examples:
16176
16481
  });
16177
16482
 
16178
16483
  // src/commands/winning-ads/index.ts
16179
- import { defineCommand as defineCommand140 } from "citty";
16484
+ import { defineCommand as defineCommand147 } from "citty";
16180
16485
 
16181
16486
  // src/commands/winning-ads/advertisers.ts
16182
- import { defineCommand as defineCommand138 } from "citty";
16487
+ import { defineCommand as defineCommand145 } from "citty";
16183
16488
  registerSchema({
16184
16489
  command: "winning-ads.advertisers",
16185
16490
  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 +16497,7 @@ registerSchema({
16192
16497
  function identity(record) {
16193
16498
  return record;
16194
16499
  }
16195
- var advertisersCommand2 = defineCommand138({
16500
+ var advertisersCommand2 = defineCommand145({
16196
16501
  meta: {
16197
16502
  name: "advertisers",
16198
16503
  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 +16548,7 @@ var advertisersCommand2 = defineCommand138({
16243
16548
  });
16244
16549
 
16245
16550
  // src/commands/winning-ads/search.ts
16246
- import { defineCommand as defineCommand139 } from "citty";
16551
+ import { defineCommand as defineCommand146 } from "citty";
16247
16552
  registerSchema({
16248
16553
  command: "winning-ads.search",
16249
16554
  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 +16656,7 @@ function buildSearchBody(args) {
16351
16656
  }
16352
16657
  return body;
16353
16658
  }
16354
- var searchCommand4 = defineCommand139({
16659
+ var searchCommand4 = defineCommand146({
16355
16660
  meta: {
16356
16661
  name: "search",
16357
16662
  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 +16768,7 @@ var searchCommand4 = defineCommand139({
16463
16768
  });
16464
16769
 
16465
16770
  // src/commands/winning-ads/index.ts
16466
- var winningAdsCommand = defineCommand140({
16771
+ var winningAdsCommand = defineCommand147({
16467
16772
  meta: {
16468
16773
  name: "winning-ads",
16469
16774
  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 +16808,7 @@ function getCliVersion() {
16503
16808
  }
16504
16809
 
16505
16810
  // src/cli.ts
16506
- var main = defineCommand141({
16811
+ var main = defineCommand148({
16507
16812
  meta: {
16508
16813
  name: "baker",
16509
16814
  version: getCliVersion(),
@@ -16517,6 +16822,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
16517
16822
  },
16518
16823
  subCommands: {
16519
16824
  actions: actionsCommand,
16825
+ missions: missionsCommand,
16520
16826
  "scheduled-actions": scheduledActionsCommand,
16521
16827
  ads: adsCommand,
16522
16828
  ga4: ga4Command,