@koda-sl/baker-cli 0.174.0 → 0.176.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.
Files changed (28) hide show
  1. package/README.md +11 -0
  2. package/dist/{chunk-7I2POXSJ.js → chunk-K3PWXVF7.js} +2 -2
  3. package/dist/{chunk-CG6OTNUU.js → chunk-P2T3IZRE.js} +3 -3
  4. package/dist/{chunk-7QMWNMRW.js → chunk-PXXJ3HJW.js} +4 -4
  5. package/dist/{chunk-TFPZLUVM.js → chunk-X5C6HE24.js} +5 -5
  6. package/dist/chunk-X5C6HE24.js.map +1 -0
  7. package/dist/{chunk-RK67WL4O.js → chunk-YL3HDEIJ.js} +6 -2
  8. package/dist/{chunk-RK67WL4O.js.map → chunk-YL3HDEIJ.js.map} +1 -1
  9. package/dist/{chunk-ZH6ZNYPB.js → chunk-ZWYQIEBI.js} +3 -3
  10. package/dist/cli.js +690 -74
  11. package/dist/cli.js.map +1 -1
  12. package/dist/client-PJ7ID35L.js +15 -0
  13. package/dist/engine/index.js +3 -3
  14. package/dist/env-6QJCMTRK.js +13 -0
  15. package/dist/{output-FL7WRIJF.js → output-NWX3YW64.js} +5 -5
  16. package/dist/{shared-OIYLDW3G.js → shared-5ZEOG664.js} +6 -6
  17. package/package.json +1 -1
  18. package/dist/chunk-TFPZLUVM.js.map +0 -1
  19. package/dist/client-XRQWOADV.js +0 -15
  20. package/dist/env-3JMYIH25.js +0 -11
  21. /package/dist/{chunk-7I2POXSJ.js.map → chunk-K3PWXVF7.js.map} +0 -0
  22. /package/dist/{chunk-CG6OTNUU.js.map → chunk-P2T3IZRE.js.map} +0 -0
  23. /package/dist/{chunk-7QMWNMRW.js.map → chunk-PXXJ3HJW.js.map} +0 -0
  24. /package/dist/{chunk-ZH6ZNYPB.js.map → chunk-ZWYQIEBI.js.map} +0 -0
  25. /package/dist/{client-XRQWOADV.js.map → client-PJ7ID35L.js.map} +0 -0
  26. /package/dist/{env-3JMYIH25.js.map → env-6QJCMTRK.js.map} +0 -0
  27. /package/dist/{output-FL7WRIJF.js.map → output-NWX3YW64.js.map} +0 -0
  28. /package/dist/{shared-OIYLDW3G.js.map → shared-5ZEOG664.js.map} +0 -0
package/dist/cli.js CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  toModelSafeImage,
37
37
  ulid,
38
38
  validateCanvasDeep
39
- } from "./chunk-CG6OTNUU.js";
39
+ } from "./chunk-P2T3IZRE.js";
40
40
  import {
41
41
  csvOrJson,
42
42
  daysAgoIso,
@@ -45,7 +45,7 @@ import {
45
45
  resolveAccountIdArg,
46
46
  resolveEffectiveStatus,
47
47
  todayIso
48
- } from "./chunk-7QMWNMRW.js";
48
+ } from "./chunk-PXXJ3HJW.js";
49
49
  import {
50
50
  buildQueryCacheKey,
51
51
  cacheGet,
@@ -61,21 +61,22 @@ import {
61
61
  writeAdsJson,
62
62
  writeAdsOutput,
63
63
  writeJsonEnvelope
64
- } from "./chunk-TFPZLUVM.js";
64
+ } from "./chunk-X5C6HE24.js";
65
65
  import {
66
66
  ApiError,
67
67
  apiGet,
68
68
  apiPost,
69
69
  validateConvexId
70
- } from "./chunk-ZH6ZNYPB.js";
70
+ } from "./chunk-ZWYQIEBI.js";
71
71
  import {
72
72
  installStreamTaps,
73
73
  logInvocation
74
- } from "./chunk-7I2POXSJ.js";
74
+ } from "./chunk-K3PWXVF7.js";
75
75
  import {
76
76
  getEnv,
77
- requireChatId
78
- } from "./chunk-RK67WL4O.js";
77
+ requireChatId,
78
+ resolveChatId
79
+ } from "./chunk-YL3HDEIJ.js";
79
80
 
80
81
  // src/cli.ts
81
82
  import { defineCommand as defineCommand188, runMain } from "citty";
@@ -2632,7 +2633,17 @@ var adEffectSchema = z7.object({
2632
2633
  staged: z7.boolean(),
2633
2634
  entity: z7.string().nullable(),
2634
2635
  operation: z7.string().nullable(),
2635
- summary: z7.string().nullable()
2636
+ summary: z7.string().nullable(),
2637
+ /** Addresses the op for `draft show --chat <thisChat> <ref>`, which returns the full payload. */
2638
+ ref: z7.string(),
2639
+ /**
2640
+ * What the publish did with this op, or null while it is still staged. Without it a reader cannot
2641
+ * tell a change that reached the platform from one that was rejected — a whole failed publish
2642
+ * reads exactly like a successful one.
2643
+ */
2644
+ outcome: z7.enum(["applied", "simulated", "failed", "skipped"]).nullable(),
2645
+ /** Why it failed, verbatim from the platform. Null unless the op failed. */
2646
+ error: z7.string().nullable()
2636
2647
  });
2637
2648
  var creativeEffectSchema = z7.object({
2638
2649
  op: effectOpSchema,
@@ -3907,11 +3918,21 @@ var discardCommand = defineCommand4({
3907
3918
 
3908
3919
  // src/commands/actions/draft.ts
3909
3920
  import { defineCommand as defineCommand5 } from "citty";
3921
+
3922
+ // src/commands/chat-arg.ts
3923
+ var CHAT_READ_ARG = {
3924
+ type: "string",
3925
+ description: "Read another chat's staged changes instead of this one's. Start here when asked to redo, reapply or explain what an earlier chat did \u2014 its changes are kept verbatim, including what happened to each one on publish. Never retype an earlier chat's work from a summary."
3926
+ };
3927
+
3928
+ // src/commands/actions/draft.ts
3910
3929
  var REMOVE_OP_KINDS = ["update", "complete", "discard"];
3911
3930
  registerSchema({
3912
3931
  command: "actions.draft.list",
3913
- 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.",
3914
- args: {}
3932
+ 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. Takes --chat <id> to read an earlier chat's staged ops instead.",
3933
+ args: {
3934
+ chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
3935
+ }
3915
3936
  });
3916
3937
  registerSchema({
3917
3938
  command: "actions.draft.remove",
@@ -3935,9 +3956,10 @@ var listCommand = defineCommand5({
3935
3956
  name: "list",
3936
3957
  description: "Show every action op staged in this chat's draft, with footgun warnings. Example: baker actions draft"
3937
3958
  },
3938
- run: async () => {
3959
+ args: { chat: CHAT_READ_ARG },
3960
+ run: async ({ args }) => {
3939
3961
  try {
3940
- const chatId = requireChatId();
3962
+ const chatId = resolveChatId(args.chat);
3941
3963
  const response = await apiPost("/api/actions/draft", { chatId });
3942
3964
  writeJson(response);
3943
3965
  } catch (err) {
@@ -4008,8 +4030,11 @@ var clearCommand = defineCommand5({
4008
4030
  var draftCommand = defineCommand5({
4009
4031
  meta: {
4010
4032
  name: "draft",
4011
- 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."
4033
+ 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. `list` takes --chat <id> to read an earlier chat's staged ops instead."
4012
4034
  },
4035
+ // Declared on the parent too: `default: "list"` dispatches the bare `draft --chat <id>` form, and
4036
+ // citty prints help for a flag the parent does not know instead of forwarding it.
4037
+ args: { chat: CHAT_READ_ARG },
4013
4038
  subCommands: {
4014
4039
  list: listCommand,
4015
4040
  remove: removeCommand,
@@ -5145,7 +5170,9 @@ var GOOGLE_ADS_LIMITS = {
5145
5170
  sitelinkLinkTextMax: 25,
5146
5171
  sitelinkDescriptionMax: 35,
5147
5172
  calloutTextMax: 25,
5148
- structuredSnippetHeaderMax: 25,
5173
+ // A snippet's HEADER has no length limit of its own — it has to be one of
5174
+ // Google's published headers (`structured-snippet-headers.ts`), the longest
5175
+ // of which is 29 characters. Only the values are capped.
5149
5176
  structuredSnippetValuesMin: 3,
5150
5177
  structuredSnippetValuesMax: 10
5151
5178
  },
@@ -5325,6 +5352,500 @@ var LANGUAGE_CONSTANT_REGEX = /^languageConstants\/\d+$/;
5325
5352
 
5326
5353
  // ../api/src/ads-google/ops.ts
5327
5354
  import { z as z15 } from "zod";
5355
+
5356
+ // ../api/src/ads-google/structured-snippet-headers.ts
5357
+ var STRUCTURED_SNIPPET_HEADERS_EN = [
5358
+ "Brands",
5359
+ "Amenities",
5360
+ "Styles",
5361
+ "Types",
5362
+ "Destinations",
5363
+ "Services",
5364
+ "Courses",
5365
+ "Neighborhoods",
5366
+ "Shows",
5367
+ "Insurance coverage",
5368
+ "Degree programs",
5369
+ "Featured hotels",
5370
+ "Models"
5371
+ ];
5372
+ var STRUCTURED_SNIPPET_HEADERS_LOCALIZED = [
5373
+ "Aanbevolen hotels",
5374
+ "Acara",
5375
+ "Apdro\u0161in\u0101\u0161ana",
5376
+ "Apkaimes",
5377
+ "Arredores",
5378
+ "Asigurare",
5379
+ "Asseguran\xE7a",
5380
+ "Ausstattung",
5381
+ "Automerkit",
5382
+ "Bairros",
5383
+ "Barrios",
5384
+ "Barris",
5385
+ "Bestemmingen",
5386
+ "Biztos\xEDt\xE1si m\xF3dozat",
5387
+ "Blagovne znamke",
5388
+ "Brand",
5389
+ "Br\xE4ndid",
5390
+ "Br\xE4ndit",
5391
+ "Buurten",
5392
+ "Cakupan asuransi",
5393
+ "Carreras universitarias",
5394
+ "Cartiere",
5395
+ "Ch\u01B0\u01A1ng tr\xECnh",
5396
+ "Cilji",
5397
+ "Cobertura de seguro",
5398
+ "Cobertura do seguro",
5399
+ "Comodidades",
5400
+ "Coperture assicurativa",
5401
+ "Corsi",
5402
+ "Corsi di laurea",
5403
+ "Cours",
5404
+ "Couverture d'assurance",
5405
+ "Cursos",
5406
+ "Cursuri",
5407
+ "Cursussen",
5408
+ "C\xEDle",
5409
+ "C\u1EA5p b\u1EB1ng",
5410
+ "Degree programmes",
5411
+ "Dekking",
5412
+ "Design",
5413
+ "Destinacions",
5414
+ "Destinasi",
5415
+ "Destinasjoner",
5416
+ "Destinationer",
5417
+ "Destinazioni",
5418
+ "Destina\u021Bii",
5419
+ "Destinos",
5420
+ "Destin\xE1cie",
5421
+ "Dienstleistungen",
5422
+ "Diplomaprogramok",
5423
+ "Dot\u0103ri",
5424
+ "Draudimo apr\u0117ptis",
5425
+ "Dzielnice",
5426
+ "D\u1ECBch v\u1EE5",
5427
+ "Emisije",
5428
+ "Emisiuni",
5429
+ "Espect\xE1culos",
5430
+ "Estilos",
5431
+ "Estils",
5432
+ "Faciliteter",
5433
+ "Fasilitas",
5434
+ "Fasiliteter",
5435
+ "Forsikringsdekning",
5436
+ "Forsikringsd\xE6kning",
5437
+ "F\xF6rs\xE4kringstyper",
5438
+ "Galam\u0113r\u0137i",
5439
+ "Gaya",
5440
+ "Hizmetler",
5441
+ "Hotel consigliati",
5442
+ "Hotel ditampilkan",
5443
+ "Hotel pilihan",
5444
+ "Hoteles destacados",
5445
+ "Hotels destacats",
5446
+ "Hoteluri prezentate",
5447
+ "Hot\xE9is em destaque",
5448
+ "Istaknuti hoteli",
5449
+ "Itinatampok na hotel",
5450
+ "Jenama",
5451
+ "Jenis",
5452
+ "Kaupunginosat",
5453
+ "Kawasan",
5454
+ "Kejiranan",
5455
+ "Kemudahan",
5456
+ "Kh\xE1ch s\u1EA1n n\u1ED5i b\u1EADt",
5457
+ "Kh\xF3a h\u1ECDc",
5458
+ "Kiemelt sz\xE1llod\xE1k",
5459
+ "Kierunki studi\xF3w",
5460
+ "Kindlustuskaitse",
5461
+ "Ki\u1EC3u",
5462
+ "Kohteet",
5463
+ "Kraadi\xF5ppeprogrammid",
5464
+ "Kritje zavarovanj",
5465
+ "Kurs",
5466
+ "Kursai",
5467
+ "Kurse",
5468
+ "Kurser",
5469
+ "Kursi",
5470
+ "Kurslar",
5471
+ "Kurssit",
5472
+ "Kursus",
5473
+ "Kursused",
5474
+ "Kursy",
5475
+ "Kurzy",
5476
+ "Laidos",
5477
+ "Layanan",
5478
+ "Licenciaturas",
5479
+ "Liputan insurans",
5480
+ "Lisans programlar\u0131",
5481
+ "Lis\xE4palvelut",
5482
+ "Lokalomr\xE5der",
5483
+ "Lo\u1EA1i",
5484
+ "Mahalleler",
5485
+ "Marcas",
5486
+ "Markalar",
5487
+ "Marken",
5488
+ "Marki",
5489
+ "Marques",
5490
+ "Mata pelajaran",
5491
+ "Merek",
5492
+ "Merken",
5493
+ "Merkevarer",
5494
+ "Mga Amenity",
5495
+ "Mga Brand",
5496
+ "Mga Destinasyon",
5497
+ "Mga Istilo",
5498
+ "Mga Komunidad",
5499
+ "Mga Kurso",
5500
+ "Mga Modelo",
5501
+ "Mga Palabas",
5502
+ "Mga Serbisyo",
5503
+ "Mga Uri",
5504
+ "Mga degree program",
5505
+ "Miejsca",
5506
+ "Model",
5507
+ "Modele",
5508
+ "Modeli",
5509
+ "Modeliai",
5510
+ "Modelle",
5511
+ "Modellek",
5512
+ "Modellen",
5513
+ "Modeller",
5514
+ "Modelli",
5515
+ "Modelos",
5516
+ "Modely",
5517
+ "Mode\u013Ci",
5518
+ "Mod\xE8les",
5519
+ "Moksliniai laipsniai",
5520
+ "Mudelid",
5521
+ "Mugavusteenused",
5522
+ "M\xE1rk\xE1k",
5523
+ "M\u0103rci",
5524
+ "M\u0171sorok",
5525
+ "Nabolag",
5526
+ "Nam\u0173 apylink\u0117s",
5527
+ "Neighbourhoods",
5528
+ "Oddaje",
5529
+ "Odpor\xFA\u010Dan\xE9 hotely",
5530
+ "Odredi\u0161ta",
5531
+ "Oppiaineet",
5532
+ "Osiguranje",
5533
+ "Pakalpojumi",
5534
+ "Palvelut",
5535
+ "Paskirties vietos",
5536
+ "Paslaugos",
5537
+ "Patogumai",
5538
+ "Perkhidmatan",
5539
+ "Ph\u1EA1m vi b\u1EA3o hi\u1EC3m",
5540
+ "Pied\u0101v\u0101t\u0101s viesn\u012Bcas",
5541
+ "Poistenie",
5542
+ "Poji\u0161t\u011Bn\xED",
5543
+ "Polecane hotele",
5544
+ "Ponudba",
5545
+ "Po\u0159ady",
5546
+ "Predstavljeni hoteli",
5547
+ "Preki\u0173 \u017Eenklai",
5548
+ "Program",
5549
+ "Program ijazah",
5550
+ "Program sarjana",
5551
+ "Programas",
5552
+ "Programas de gradua\xE7\xE3o",
5553
+ "Programe de studiu",
5554
+ "Programes",
5555
+ "Programlar",
5556
+ "Programmer",
5557
+ "Programmes d'\xE9tudes",
5558
+ "Programmi",
5559
+ "Programy",
5560
+ "P\u0101rraides",
5561
+ "Quartieri",
5562
+ "Quartiers",
5563
+ "Rancangan",
5564
+ "Rel\xE1cie",
5565
+ "Resm\xE5l",
5566
+ "Robne marke",
5567
+ "Saated ja etendused",
5568
+ "Sadr\u017Eaji",
5569
+ "Sakop ng insurance",
5570
+ "Serien",
5571
+ "Serier",
5572
+ "Serveis",
5573
+ "Serveis addicionals",
5574
+ "Servicii",
5575
+ "Servicios",
5576
+ "Servicios adicionales",
5577
+ "Servizi",
5578
+ "Servi\xE7os",
5579
+ "Show't",
5580
+ "Sigorta kapsam\u0131",
5581
+ "Sihtkohad",
5582
+ "Si\u016Blomi vie\u0161bu\u010Diai",
5583
+ "Slogi",
5584
+ "Slu\u017Eby",
5585
+ "Soovitatud hotellid",
5586
+ "Soseske",
5587
+ "Stiilid",
5588
+ "Stijlen",
5589
+ "Stilar",
5590
+ "Stile",
5591
+ "Stiler",
5592
+ "Stili",
5593
+ "Stiliai",
5594
+ "Stiller",
5595
+ "Stilovi",
5596
+ "Stiluri",
5597
+ "Storitve",
5598
+ "Studieng\xE4nge",
5599
+ "Studieprogramma's",
5600
+ "Studijn\xED programy",
5601
+ "Studijski programi",
5602
+ "Studiju programmas",
5603
+ "Style",
5604
+ "Styly",
5605
+ "St\xEDlusok",
5606
+ "Sunulan olanaklar",
5607
+ "Suositellut hotellit",
5608
+ "Szolg\xE1ltat\xE1sok",
5609
+ "S\xE9lection d'h\xF4tels",
5610
+ "Tanfolyamok",
5611
+ "Teenused",
5612
+ "Te\u010Dajevi",
5613
+ "Te\u010Daji",
5614
+ "Th\u01B0\u01A1ng hi\u1EC7u",
5615
+ "Tipai",
5616
+ "Tipi",
5617
+ "Tipos",
5618
+ "Tipuri",
5619
+ "Tipus",
5620
+ "Titulacions",
5621
+ "Ti\u1EC7n nghi",
5622
+ "Tjenester",
5623
+ "Tj\xE4nster",
5624
+ "Typen",
5625
+ "Typer",
5626
+ "Typy",
5627
+ "Tyylit",
5628
+ "Tyypit",
5629
+ "T\xEDpusok",
5630
+ "T\xFCrler",
5631
+ "T\xFC\xFCbid",
5632
+ "Ubezpieczenia",
5633
+ "Uddannelser",
5634
+ "Udogodnienia",
5635
+ "Udvalgte hoteller",
5636
+ "Usluge",
5637
+ "Us\u0142ugi",
5638
+ "Utbildningsprogram",
5639
+ "Utdanningsprogrammer",
5640
+ "Utvalda hotell",
5641
+ "Utvalgte hoteller",
5642
+ "Vakuutukset",
5643
+ "Varum\xE4rken",
5644
+ "Veidi",
5645
+ "Versicherungsleistung",
5646
+ "Viertel",
5647
+ "Voorzieningen",
5648
+ "Vorgestellte Hotels",
5649
+ "Vrste",
5650
+ "Vybavenie",
5651
+ "Vybaven\xED",
5652
+ "Vybran\xE9 hotely",
5653
+ "Vzdel\xE1vacie programy",
5654
+ "V\xE1rosr\xE9szek",
5655
+ "V\xF9ng l\xE2n c\u1EADn",
5656
+ "Ziele",
5657
+ "Zna\u010Dky",
5658
+ "Zn\xE1m\xE9 oblasti",
5659
+ "Z\u012Bmoli",
5660
+ "destinasyonlar",
5661
+ "\xC9missions",
5662
+ "\xC9quipements",
5663
+ "\xD6ne \xE7\u0131kan oteller",
5664
+ "\xDAti c\xE9lok",
5665
+ "\xDCmbruskonnad",
5666
+ "\u010Cetvrti",
5667
+ "\u0110i\u1EC3m \u0111\u1EBFn",
5668
+ "\u0112rt\u012Bbas",
5669
+ "\u0160tudijski programi",
5670
+ "\u0160tvrte",
5671
+ "\u0160t\xFDly",
5672
+ "\u0391\u03C3\u03C6\u03B1\u03BB\u03B9\u03C3\u03C4\u03B9\u03BA\u03AE \u03BA\u03AC\u03BB\u03C5\u03C8\u03B7",
5673
+ "\u0393\u03B5\u03B9\u03C4\u03BF\u03BD\u03B9\u03AD\u03C2",
5674
+ "\u0395\u03BA\u03C0\u03BF\u03BC\u03C0\u03AD\u03C2",
5675
+ "\u0395\u03C0\u03C9\u03BD\u03C5\u03BC\u03AF\u03B5\u03C2",
5676
+ "\u039C\u03B1\u03B8\u03AE\u03BC\u03B1\u03C4\u03B1",
5677
+ "\u039C\u03BF\u03BD\u03C4\u03AD\u03BB\u03B1",
5678
+ "\u039E\u03B5\u03BD\u03BF\u03B4\u03BF\u03C7\u03B5\u03AF\u03B1",
5679
+ "\u03A0\u03B1\u03C1\u03BF\u03C7\u03AD\u03C2",
5680
+ "\u03A0\u03C1\u03BF\u03B3\u03C1\u03AC\u03BC\u03BC\u03B1\u03C4\u03B1 \u03C0\u03C4\u03C5\u03C7\u03AF\u03C9\u03BD",
5681
+ "\u03A0\u03C1\u03BF\u03BF\u03C1\u03B9\u03C3\u03BC\u03BF\u03AF",
5682
+ "\u03A3\u03C4\u03C5\u03BB",
5683
+ "\u03A4\u03CD\u03C0\u03BF\u03B9",
5684
+ "\u03A5\u03C0\u03B7\u03C1\u03B5\u03C3\u03AF\u03B5\u03C2",
5685
+ "\u0411\u0440\u0435\u043D\u0434\u0438",
5686
+ "\u0411\u0440\u0435\u043D\u0434\u044B",
5687
+ "\u0414\u0435\u0441\u0442\u0438\u043D\u0430\u0446\u0438\u0438",
5688
+ "\u0417\u0430\u0441\u0442\u0440\u0430\u0445\u043E\u0432\u043A\u0430",
5689
+ "\u0417\u0440\u0443\u0447\u043D\u043E\u0441\u0442\u0456",
5690
+ "\u041A\u0432\u0430\u0440\u0442\u0430\u043B\u0438",
5691
+ "\u041A\u0443\u0440\u0441\u0438",
5692
+ "\u041A\u0443\u0440\u0441\u043E\u0432\u0435",
5693
+ "\u041A\u0443\u0440\u0441\u044B",
5694
+ "\u041C\u0430\u0440\u043A\u0438",
5695
+ "\u041C\u0435\u0441\u0442\u0430",
5696
+ "\u041C\u043E\u0434\u0435\u043B\u0438",
5697
+ "\u041C\u043E\u0434\u0435\u043B\u0456",
5698
+ "\u041C\u0456\u0441\u0446\u044F",
5699
+ "\u041E\u0441\u0432\u0456\u0442\u043D\u0456 \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u0438",
5700
+ "\u041F\u043E\u0441\u043B\u0443\u0433\u0438",
5701
+ "\u041F\u0440\u0435\u0434\u0430\u0432\u0430\u043D\u0438\u044F",
5702
+ "\u041F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0435\u043D\u0438 \u0445\u043E\u0442\u0435\u043B\u0438",
5703
+ "\u041F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u044B \u0432\u044B\u0441\u0448\u0435\u0433\u043E \u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u043D\u0438\u044F",
5704
+ "\u0420\u0430\u0439\u043E\u043D\u044B",
5705
+ "\u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u043E\u0432\u0430\u043D\u0456 \u0433\u043E\u0442\u0435\u043B\u0456",
5706
+ "\u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u043C\u044B\u0435 \u043E\u0442\u0435\u043B\u0438",
5707
+ "\u0421\u043F\u0435\u0446\u0438\u0430\u043B\u043D\u043E\u0441\u0442\u0438",
5708
+ "\u0421\u0442\u0438\u043B\u0438",
5709
+ "\u0421\u0442\u0438\u043B\u043E\u0432\u0435",
5710
+ "\u0421\u0442\u0438\u043B\u0456",
5711
+ "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430",
5712
+ "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0438\u0439 \u0437\u0430\u0445\u0438\u0441\u0442",
5713
+ "\u0422\u0438\u043F\u0438",
5714
+ "\u0422\u0438\u043F\u043E\u0432\u0435",
5715
+ "\u0422\u0438\u043F\u044B",
5716
+ "\u0423\u0434\u043E\u0431\u0441\u0442\u0432\u0430",
5717
+ "\u0423\u0441\u043B\u0443\u0433\u0438",
5718
+ "\u0428\u043E\u0443",
5719
+ "\u0431\u0440\u0435\u043D\u0434\u043E\u0432\u0438",
5720
+ "\u0434\u0435\u043B\u043E\u0432\u0438 \u0433\u0440\u0430\u0434\u0430",
5721
+ "\u0434\u0435\u0441\u0442\u0438\u043D\u0430\u0446\u0438\u0458\u0435",
5722
+ "\u0434\u0438\u043F\u043B\u043E\u043C\u0435",
5723
+ "\u0435\u043C\u0438\u0441\u0438\u0458\u0435",
5724
+ "\u0438\u0441\u0442\u0430\u043A\u043D\u0443\u0442\u0438 \u0445\u043E\u0442\u0435\u043B\u0438",
5725
+ "\u043A\u0443\u0440\u0441\u0435\u0432\u0438",
5726
+ "\u043C\u043E\u0434\u0435\u043B\u0438",
5727
+ "\u043E\u0441\u0438\u0433\u0443\u0440\u0430\u045A\u0435",
5728
+ "\u0441\u0430\u0434\u0440\u0436\u0430\u0458\u0438",
5729
+ "\u0441\u0442\u0438\u043B\u043E\u0432\u0438",
5730
+ "\u0442\u0438\u043F\u043E\u0432\u0438",
5731
+ "\u0443\u0441\u043B\u0443\u0433\u0435",
5732
+ "\u05D3\u05D2\u05DE\u05D9\u05DD",
5733
+ "\u05D4\u05D5\u05E4\u05E2\u05D5\u05EA \u05D5\u05EA\u05D5\u05DB\u05E0\u05D9\u05D5\u05EA",
5734
+ "\u05D9\u05E2\u05D3\u05D9\u05DD \u05D2\u05D9\u05D0\u05D5\u05D2\u05E8\u05E4\u05D9\u05D9\u05DD",
5735
+ "\u05DB\u05D9\u05E1\u05D5\u05D9 \u05D1\u05D9\u05D8\u05D5\u05D7\u05D9",
5736
+ "\u05DE\u05D5\u05EA\u05D2\u05D9\u05DD",
5737
+ "\u05DE\u05DC\u05D5\u05E0\u05D5\u05EA \u05DE\u05D5\u05DE\u05DC\u05E6\u05D9\u05DD",
5738
+ "\u05E1\u05D2\u05E0\u05D5\u05E0\u05D5\u05EA",
5739
+ "\u05E1\u05D5\u05D2\u05D9\u05DD",
5740
+ "\u05E7\u05D5\u05E8\u05E1\u05D9\u05DD",
5741
+ "\u05E9\u05D9\u05E8\u05D5\u05EA\u05D9 \u05D4\u05DE\u05E7\u05D5\u05DD",
5742
+ "\u05E9\u05D9\u05E8\u05D5\u05EA\u05D9\u05DD",
5743
+ "\u05E9\u05DB\u05D5\u05E0\u05D5\u05EA",
5744
+ "\u05EA\u05D5\u05DB\u05E0\u05D9\u05D5\u05EA \u05DC\u05DC\u05D9\u05DE\u05D5\u05D3\u05D9 \u05EA\u05D5\u05D0\u05E8",
5745
+ "\u0627\u0644\u0623\u062D\u064A\u0627\u0621",
5746
+ "\u0627\u0644\u0623\u0646\u0645\u0627\u0637",
5747
+ "\u0627\u0644\u0623\u0646\u0648\u0627\u0639",
5748
+ "\u0627\u0644\u062A\u063A\u0637\u064A\u0629 \u0627\u0644\u062A\u0623\u0645\u064A\u0646\u064A\u0629",
5749
+ "\u0627\u0644\u062E\u062F\u0645\u0627\u062A",
5750
+ "\u0627\u0644\u062F\u0648\u0631\u0627\u062A \u0627\u0644\u062A\u062F\u0631\u064A\u0628\u064A\u0629",
5751
+ "\u0627\u0644\u0639\u0631\u0648\u0636",
5752
+ "\u0627\u0644\u0639\u0644\u0627\u0645\u0627\u062A \u0627\u0644\u062A\u062C\u0627\u0631\u064A\u0629",
5753
+ "\u0627\u0644\u0641\u0646\u0627\u062F\u0642 \u0627\u0644\u0645\u0645\u064A\u0651\u0632\u0629",
5754
+ "\u0627\u0644\u0646\u0645\u0627\u0630\u062C",
5755
+ "\u0627\u0644\u0648\u062C\u0647\u0627\u062A",
5756
+ "\u0628\u0631\u0627\u0645\u062C \u0627\u0644\u0634\u0647\u0627\u062F\u0627\u062A",
5757
+ "\u0648\u0633\u0627\u0626\u0644 \u0627\u0644\u0631\u0627\u062D\u0629",
5758
+ "\u0906\u0938-\u092A\u0921\u093C\u094B\u0938",
5759
+ "\u0917\u0902\u0924\u0935\u094D\u092F",
5760
+ "\u0921\u093F\u0917\u094D\u0930\u0940 \u0915\u093E\u0930\u094D\u092F\u0915\u094D\u0930\u092E",
5761
+ "\u092A\u093E\u0920\u094D\u200D\u092F\u0915\u094D\u0930\u092E",
5762
+ "\u092A\u094D\u0930\u0915\u093E\u0930",
5763
+ "\u092A\u094D\u0930\u0926\u0930\u094D\u0936\u093F\u0924 \u0939\u094B\u091F\u0932",
5764
+ "\u092C\u0940\u092E\u093E \u0915\u0935\u0930\u0947\u091C",
5765
+ "\u092C\u094D\u0930\u093E\u0902\u0921",
5766
+ "\u092E\u0949\u0921\u0932",
5767
+ "\u0936\u0948\u0932\u093F\u092F\u093E\u0902",
5768
+ "\u0936\u094B",
5769
+ "\u0938\u0941\u0935\u093F\u0927\u093E\u090F\u0902",
5770
+ "\u0938\u0947\u0935\u093E\u090F\u0902",
5771
+ "\u0E04\u0E27\u0E32\u0E21\u0E04\u0E38\u0E49\u0E21\u0E04\u0E23\u0E2D\u0E07\u0E43\u0E19\u0E1B\u0E23\u0E30\u0E01\u0E31\u0E19",
5772
+ "\u0E1A\u0E23\u0E34\u0E01\u0E32\u0E23",
5773
+ "\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17",
5774
+ "\u0E1B\u0E25\u0E32\u0E22\u0E17\u0E32\u0E07",
5775
+ "\u0E22\u0E48\u0E32\u0E19\u0E43\u0E01\u0E25\u0E49\u0E40\u0E04\u0E35\u0E22\u0E07",
5776
+ "\u0E23\u0E38\u0E48\u0E19",
5777
+ "\u0E2A\u0E34\u0E48\u0E07\u0E2D\u0E33\u0E19\u0E27\u0E22\u0E04\u0E27\u0E32\u0E21\u0E2A\u0E30\u0E14\u0E27\u0E01",
5778
+ "\u0E2A\u0E44\u0E15\u0E25\u0E4C",
5779
+ "\u0E2B\u0E25\u0E31\u0E01\u0E2A\u0E39\u0E15\u0E23",
5780
+ "\u0E2B\u0E25\u0E31\u0E01\u0E2A\u0E39\u0E15\u0E23\u0E1B\u0E23\u0E34\u0E0D\u0E0D\u0E32",
5781
+ "\u0E41\u0E1A\u0E23\u0E19\u0E14\u0E4C",
5782
+ "\u0E42\u0E0A\u0E27\u0E4C",
5783
+ "\u0E42\u0E23\u0E07\u0E41\u0E23\u0E21\u0E40\u0E14\u0E48\u0E19",
5784
+ "\u304A\u3059\u3059\u3081\u306E\u30DB\u30C6\u30EB",
5785
+ "\u30B3\u30FC\u30B9",
5786
+ "\u30B5\u30FC\u30D3\u30B9",
5787
+ "\u30B9\u30BF\u30A4\u30EB",
5788
+ "\u30BF\u30A4\u30D7",
5789
+ "\u30D6\u30E9\u30F3\u30C9",
5790
+ "\u30E2\u30C7\u30EB",
5791
+ "\u4FDD\u967A\u306E\u4FDD\u969C",
5792
+ "\u4FDD\u969C\u7BC4\u570D",
5793
+ "\u5230\u7740\u5730",
5794
+ "\u5468\u8FBA\u5730\u57DF",
5795
+ "\u54C1\u724C",
5796
+ "\u578B\u53F7",
5797
+ "\u578B\u865F",
5798
+ "\u5B66\u4F4D\u30D7\u30ED\u30B0\u30E9\u30E0",
5799
+ "\u5B66\u4F4D\u8BFE\u7A0B",
5800
+ "\u5B78\u4F4D\u8AB2\u7A0B",
5801
+ "\u627F\u4FDD\u7BC4\u570D",
5802
+ "\u670D\u52A1",
5803
+ "\u670D\u52D9",
5804
+ "\u6B3E\u5F0F",
5805
+ "\u7279\u8272\u9152\u5E97",
5806
+ "\u756A\u7D44",
5807
+ "\u76EE\u7684\u5730",
5808
+ "\u793E\u533A",
5809
+ "\u793E\u5340",
5810
+ "\u7BC0\u76EE",
5811
+ "\u7C7B\u578B",
5812
+ "\u7CBE\u9009\u9152\u5E97",
5813
+ "\u7CBE\u9078\u98EF\u5E97",
5814
+ "\u8282\u76EE",
5815
+ "\u8A2D\u5099",
5816
+ "\u8A2D\u65BD",
5817
+ "\u8AB2\u7A0B",
5818
+ "\u8BBE\u65BD",
5819
+ "\u8BFE\u7A0B",
5820
+ "\u9669\u79CD",
5821
+ "\u985E\u578B",
5822
+ "\uACFC\uC815",
5823
+ "\uBAA8\uB378",
5824
+ "\uBAA9\uC801\uC9C0",
5825
+ "\uBCF4\uD5D8 \uBCF4\uC0C1 \uBC94\uC704",
5826
+ "\uBE0C\uB79C\uB4DC",
5827
+ "\uC11C\uBE44\uC2A4",
5828
+ "\uC2A4\uD0C0\uC77C",
5829
+ "\uC720\uD615",
5830
+ "\uC778\uADFC \uC9C0\uC5ED",
5831
+ "\uCD94\uCC9C \uD638\uD154",
5832
+ "\uD3B8\uC758 \uC2DC\uC124",
5833
+ "\uD504\uB85C\uADF8\uB7A8",
5834
+ "\uD559\uC704 \uCDE8\uB4DD \uD504\uB85C\uADF8\uB7A8"
5835
+ ];
5836
+ var HEADER_ALIASES = /* @__PURE__ */ new Map([["service catalog", "Services"]]);
5837
+ var ACCEPTED = /* @__PURE__ */ new Set([...STRUCTURED_SNIPPET_HEADERS_EN, ...STRUCTURED_SNIPPET_HEADERS_LOCALIZED]);
5838
+ var BY_FOLDED_CASE = new Map([...ACCEPTED].map((header) => [header.toLowerCase(), header]));
5839
+ function canonicalStructuredSnippetHeader(header) {
5840
+ const trimmed = header.trim();
5841
+ if (ACCEPTED.has(trimmed)) {
5842
+ return trimmed;
5843
+ }
5844
+ const folded = trimmed.toLowerCase();
5845
+ return HEADER_ALIASES.get(folded) ?? BY_FOLDED_CASE.get(folded);
5846
+ }
5847
+
5848
+ // ../api/src/ads-google/ops.ts
5328
5849
  var tempRefSchema2 = z15.string().regex(TEMP_REF_REGEX2, "expected a g_temp_* reference");
5329
5850
  var refSchema = z15.union([
5330
5851
  z15.string().regex(RESOURCE_NAME_REGEX, "expected a customers/\u2026/\u2026/\u2026 resource name"),
@@ -5626,9 +6147,20 @@ var calloutAssetSchema = z15.object({
5626
6147
  type: z15.literal("callout"),
5627
6148
  calloutText: z15.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax)
5628
6149
  });
6150
+ var structuredSnippetHeaderSchema = z15.string().min(1).transform((header, ctx) => {
6151
+ const canonical2 = canonicalStructuredSnippetHeader(header);
6152
+ if (!canonical2) {
6153
+ ctx.addIssue({
6154
+ code: "custom",
6155
+ message: `Google Ads does not accept "${header}" as a structured snippet header. Use one of: ${STRUCTURED_SNIPPET_HEADERS_EN.join(", ")} \u2014 or that header in the campaign's language.`
6156
+ });
6157
+ return z15.NEVER;
6158
+ }
6159
+ return canonical2;
6160
+ });
5629
6161
  var structuredSnippetAssetSchema = z15.object({
5630
6162
  type: z15.literal("structuredSnippet"),
5631
- header: z15.string().min(1).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetHeaderMax),
6163
+ header: structuredSnippetHeaderSchema,
5632
6164
  values: z15.array(z15.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax)
5633
6165
  });
5634
6166
  var callToActionAssetSchema = z15.object({ type: z15.literal("callToAction"), callToAction: z15.string().min(1) });
@@ -5648,7 +6180,7 @@ var assetUpdateSchema = z15.object({
5648
6180
  description2: z15.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
5649
6181
  finalUrls: z15.array(httpsUrlSchema2).min(1).optional(),
5650
6182
  calloutText: z15.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax).optional(),
5651
- header: z15.string().min(1).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetHeaderMax).optional(),
6183
+ header: structuredSnippetHeaderSchema.optional(),
5652
6184
  values: z15.array(z15.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax).optional(),
5653
6185
  callToAction: z15.string().min(1).optional(),
5654
6186
  text: z15.string().min(1).optional()
@@ -7751,18 +8283,18 @@ async function stageUpdate(kind, customerId, target, payload, hints) {
7751
8283
  async function stageTarget(kind, customerId, target, hints) {
7752
8284
  await stageGoogleOp({ kind, customerId, target }, hints);
7753
8285
  }
7754
- async function draftAction(path28, body) {
8286
+ async function draftAction(path28, body, chat) {
7755
8287
  try {
7756
- const chatId = requireChatId();
8288
+ const chatId = resolveChatId(chat);
7757
8289
  const response = await apiPost(path28, { chatId, ...body });
7758
8290
  writeJsonEnvelope(response);
7759
8291
  } catch (err) {
7760
8292
  handleGoogleError(err);
7761
8293
  }
7762
8294
  }
7763
- async function draftListAction(json) {
8295
+ async function draftListAction(json, chat) {
7764
8296
  try {
7765
- const chatId = requireChatId();
8297
+ const chatId = resolveChatId(chat);
7766
8298
  const response = await apiPost("/api/ads/google/draft", { chatId });
7767
8299
  if (json || !response.ok || !response.data) {
7768
8300
  writeJsonEnvelope(response);
@@ -7777,16 +8309,22 @@ async function draftListAction(json) {
7777
8309
 
7778
8310
  // src/commands/ads/google/draft.ts
7779
8311
  var draftCommand2 = defineCommand22({
7780
- meta: { name: "draft", description: "List, remove, clear, amend, or show staged Google Ads write ops for this chat" },
8312
+ meta: {
8313
+ name: "draft",
8314
+ description: "List, remove, clear, amend, or show staged Google Ads write ops for this chat. `list` and `show` take --chat <id> to read an earlier chat's changes instead."
8315
+ },
7781
8316
  subCommands: {
7782
8317
  list: defineCommand22({
7783
8318
  meta: {
7784
8319
  name: "list",
7785
8320
  description: "Review everything staged as a campaign \u25B8 ad group \u25B8 ad tree (--json for the raw envelope)"
7786
8321
  },
7787
- args: { json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable tree" } },
8322
+ args: {
8323
+ json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable tree" },
8324
+ chat: CHAT_READ_ARG
8325
+ },
7788
8326
  run: async ({ args }) => {
7789
- await draftListAction(args.json === true);
8327
+ await draftListAction(args.json === true, args.chat);
7790
8328
  }
7791
8329
  }),
7792
8330
  remove: defineCommand22({
@@ -7832,10 +8370,11 @@ var draftCommand2 = defineCommand22({
7832
8370
  type: "positional",
7833
8371
  description: "Staged op ref (g_temp_*) or target id/resource name",
7834
8372
  required: false
7835
- }
8373
+ },
8374
+ chat: CHAT_READ_ARG
7836
8375
  },
7837
8376
  run: async ({ args }) => {
7838
- await draftAction("/api/ads/google/draft/show", { ref: requireTarget(args, "op") });
8377
+ await draftAction("/api/ads/google/draft/show", { ref: requireTarget(args, "op") }, args.chat);
7839
8378
  }
7840
8379
  })
7841
8380
  }
@@ -10606,6 +11145,7 @@ function requireTargets(args, entity) {
10606
11145
  }
10607
11146
 
10608
11147
  // src/commands/ads/linkedin/schemas.ts
11148
+ var CHAT_READ_ARG_DESCRIPTION = CHAT_READ_ARG.description;
10609
11149
  registerSchema({
10610
11150
  command: "ads.linkedin.accounts",
10611
11151
  description: "List LinkedIn ad accounts in the company's connected scope. Pass --include-all to list every account the OAuth token can see.",
@@ -11304,7 +11844,8 @@ registerSchema({
11304
11844
  type: "boolean",
11305
11845
  description: "Print the raw JSON envelope instead of the readable tree",
11306
11846
  required: false
11307
- }
11847
+ },
11848
+ chat: { type: "string", description: CHAT_READ_ARG_DESCRIPTION, required: false }
11308
11849
  }
11309
11850
  });
11310
11851
  registerSchema({
@@ -11318,6 +11859,18 @@ registerSchema({
11318
11859
  }
11319
11860
  }
11320
11861
  });
11862
+ registerSchema({
11863
+ command: "ads.linkedin.draft.show",
11864
+ description: "Print the full staged payload for one LinkedIn op \u2014 the receipt to verify a change looks right before publish (never truncated), and the only way to read back verbatim what an earlier chat wrote.",
11865
+ args: {
11866
+ ref: {
11867
+ type: "positional",
11868
+ description: "Op ref (li_temp_* for creates, target id/URN for updates)",
11869
+ required: true
11870
+ },
11871
+ chat: { type: "string", description: CHAT_READ_ARG_DESCRIPTION, required: false }
11872
+ }
11873
+ });
11321
11874
  registerSchema({
11322
11875
  command: "ads.linkedin.draft.clear",
11323
11876
  description: "Discard ALL staged LinkedIn ops in this chat's draft. Nothing applies on publish.",
@@ -13508,9 +14061,9 @@ function renderDraftStatus2(data) {
13508
14061
  }
13509
14062
 
13510
14063
  // src/commands/ads/linkedin/draft.ts
13511
- async function listDraft(json) {
14064
+ async function listDraft(json, chat) {
13512
14065
  try {
13513
- const chatId = requireChatId();
14066
+ const chatId = resolveChatId(chat);
13514
14067
  const response = await apiPost("/api/ads/linkedin/draft", {
13515
14068
  chatId
13516
14069
  });
@@ -13529,9 +14082,12 @@ var listCommand3 = defineCommand45({
13529
14082
  name: "list",
13530
14083
  description: "Review everything staged as a Campaign group \u25B8 Campaign \u25B8 Creative tree (--json for the raw envelope). Example: baker ads linkedin draft"
13531
14084
  },
13532
- args: { json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable tree" } },
14085
+ args: {
14086
+ json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable tree" },
14087
+ chat: CHAT_READ_ARG
14088
+ },
13533
14089
  run: async ({ args }) => {
13534
- await listDraft(args.json === true);
14090
+ await listDraft(args.json === true, args.chat);
13535
14091
  }
13536
14092
  });
13537
14093
  var removeCommand2 = defineCommand45({
@@ -13608,12 +14164,13 @@ var showCommand = defineCommand45({
13608
14164
  description: "Print the full staged payload for one op \u2014 the receipt to verify a change looks right before publish (never truncated)."
13609
14165
  },
13610
14166
  args: {
13611
- ref: { type: "positional", description: "Staged op ref (li_temp_*) or target id/URN", required: true }
14167
+ ref: { type: "positional", description: "Staged op ref (li_temp_*) or target id/URN", required: true },
14168
+ chat: CHAT_READ_ARG
13612
14169
  },
13613
14170
  run: async ({ args }) => {
13614
14171
  const ref = requireTarget2(args, "op");
13615
14172
  try {
13616
- const chatId = requireChatId();
14173
+ const chatId = resolveChatId(args.chat);
13617
14174
  const body = { chatId, ref };
13618
14175
  const response = await apiPost(
13619
14176
  "/api/ads/linkedin/draft/show",
@@ -13628,8 +14185,11 @@ var showCommand = defineCommand45({
13628
14185
  var linkedinDraftCommand = defineCommand45({
13629
14186
  meta: {
13630
14187
  name: "draft",
13631
- description: "Review and edit the LinkedIn write ops staged in this chat BEFORE publish. Subcommands: list (default), remove, clear, amend, show. Ops never hit LinkedIn until the chat is published."
14188
+ description: "Review and edit the LinkedIn write ops staged in this chat BEFORE publish. Subcommands: list (default), remove, clear, amend, show. Ops never hit LinkedIn until the chat is published. `list` and `show` take --chat <id> to read an earlier chat's changes instead."
13632
14189
  },
14190
+ // Declared on the parent too: `default: "list"` dispatches the bare `draft --chat <id>` form, and
14191
+ // citty prints help for a flag the parent does not know instead of forwarding it.
14192
+ args: { chat: CHAT_READ_ARG },
13633
14193
  subCommands: {
13634
14194
  list: listCommand3,
13635
14195
  remove: removeCommand2,
@@ -15011,6 +15571,17 @@ var metaDraftListResponseSchema = z19.object({
15011
15571
  /** Non-blocking cross-op quality advisories — "good campaign, not just valid". */
15012
15572
  advisories: z19.array(metaDraftAdvisorySchema)
15013
15573
  });
15574
+ var metaDraftShowRequestSchema = z19.object({
15575
+ chatId: z19.string(),
15576
+ ref: z19.string()
15577
+ });
15578
+ var metaDraftShowResponseSchema = z19.object({
15579
+ op: metaDraftOpViewSchema.extend({
15580
+ payload: z19.unknown().optional(),
15581
+ warnings: z19.array(z19.string()).optional(),
15582
+ annotations: z19.unknown().optional()
15583
+ })
15584
+ });
15014
15585
  var metaDraftRemoveRequestSchema = z19.object({
15015
15586
  chatId: z19.string(),
15016
15587
  ref: z19.string()
@@ -15598,10 +16169,10 @@ function duplicateCommand2(entity, label) {
15598
16169
  replace: { type: "boolean", description: "Pause the original once the copy publishes" }
15599
16170
  },
15600
16171
  run: async ({ args }) => {
15601
- const { apiPost: apiPost2 } = await import("./client-XRQWOADV.js");
15602
- const { requireChatId: requireChatId2 } = await import("./env-3JMYIH25.js");
15603
- const { writeJsonEnvelope: writeJsonEnvelope2 } = await import("./output-FL7WRIJF.js");
15604
- const { handleMetaError: handleMetaError2 } = await import("./shared-OIYLDW3G.js");
16172
+ const { apiPost: apiPost2 } = await import("./client-PJ7ID35L.js");
16173
+ const { requireChatId: requireChatId2 } = await import("./env-6QJCMTRK.js");
16174
+ const { writeJsonEnvelope: writeJsonEnvelope2 } = await import("./output-NWX3YW64.js");
16175
+ const { handleMetaError: handleMetaError2 } = await import("./shared-5ZEOG664.js");
15605
16176
  try {
15606
16177
  const accountId = bareAccountId2(args);
15607
16178
  const chatId = requireChatId2();
@@ -15990,9 +16561,9 @@ Examples:
15990
16561
 
15991
16562
  // src/commands/ads/meta/draft.ts
15992
16563
  import { defineCommand as defineCommand62 } from "citty";
15993
- async function listDraft2() {
16564
+ async function listDraft2(chat) {
15994
16565
  try {
15995
- const chatId = requireChatId();
16566
+ const chatId = resolveChatId(chat);
15996
16567
  const response = await apiPost("/api/ads/meta/draft", { chatId });
15997
16568
  writeJsonEnvelope(response);
15998
16569
  } catch (err) {
@@ -16004,7 +16575,32 @@ var listCommand9 = defineCommand62({
16004
16575
  name: "list",
16005
16576
  description: "Show every Meta write op staged in this chat, its mode (simulated = publish will NOT hit Meta), dependencies, and post-publish results. Example: baker ads meta draft"
16006
16577
  },
16007
- run: listDraft2
16578
+ args: { chat: CHAT_READ_ARG },
16579
+ run: async ({ args }) => {
16580
+ await listDraft2(args.chat);
16581
+ }
16582
+ });
16583
+ var showCommand2 = defineCommand62({
16584
+ meta: {
16585
+ name: "show",
16586
+ description: "Print the full staged payload for one op \u2014 the receipt to verify a change looks right before publish (never truncated). Example: baker ads meta draft show meta_temp_abc123"
16587
+ },
16588
+ args: {
16589
+ ref: { type: "positional", description: "Op ref (meta_temp_* for creates, target id for updates)", required: true },
16590
+ chat: CHAT_READ_ARG
16591
+ },
16592
+ run: async ({ args }) => {
16593
+ try {
16594
+ const chatId = resolveChatId(args.chat);
16595
+ const response = await apiPost("/api/ads/meta/draft/show", {
16596
+ chatId,
16597
+ ref: args.ref
16598
+ });
16599
+ writeJsonEnvelope(response);
16600
+ } catch (err) {
16601
+ handleMetaError(err);
16602
+ }
16603
+ }
16008
16604
  });
16009
16605
  var removeCommand3 = defineCommand62({
16010
16606
  meta: {
@@ -16047,9 +16643,12 @@ var clearCommand3 = defineCommand62({
16047
16643
  var metaDraftCommand = defineCommand62({
16048
16644
  meta: {
16049
16645
  name: "draft",
16050
- description: "Review and edit the Meta write ops staged in this chat BEFORE publish. Subcommands: list (default), remove, clear. Ops never hit Meta until the chat is published."
16646
+ description: "Review and edit the Meta write ops staged in this chat BEFORE publish. Subcommands: list (default), show, remove, clear. Ops never hit Meta until the chat is published. `list` and `show` take --chat <id> to read an earlier chat's changes instead."
16051
16647
  },
16052
- subCommands: { list: listCommand9, remove: removeCommand3, clear: clearCommand3 },
16648
+ // Declared on the parent too: `default: "list"` dispatches the bare `draft --chat <id>` form, and
16649
+ // citty prints help for a flag the parent does not know instead of forwarding it.
16650
+ args: { chat: CHAT_READ_ARG },
16651
+ subCommands: { list: listCommand9, show: showCommand2, remove: removeCommand3, clear: clearCommand3 },
16053
16652
  // `default` (not `run`) dispatches the bare invocation: citty falls through to `run`
16054
16653
  // after dispatching a subcommand, so a `run` here would list the draft a second time
16055
16654
  // on every `draft list` / `draft remove` / `draft clear`.
@@ -25931,7 +26530,7 @@ var listCommand11 = defineCommand104({
25931
26530
  writeJson({ ok: true, data: { flows } });
25932
26531
  }
25933
26532
  });
25934
- var showCommand2 = defineCommand104({
26533
+ var showCommand3 = defineCommand104({
25935
26534
  meta: {
25936
26535
  name: "show",
25937
26536
  description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
@@ -25967,7 +26566,7 @@ Full guide: __tooling__/docs/tools/baker/flows.md`
25967
26566
  },
25968
26567
  subCommands: {
25969
26568
  list: listCommand11,
25970
- show: showCommand2
26569
+ show: showCommand3
25971
26570
  },
25972
26571
  // Bare `baker flows` lists the Forms. This must be `default`, not `run`: citty falls
25973
26572
  // through to `run` after dispatching a subcommand, so a `run` here would also print
@@ -32946,7 +33545,8 @@ registerSchema({
32946
33545
  command: "scheduled-actions.get",
32947
33546
  description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
32948
33547
  args: {
32949
- id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
33548
+ id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true },
33549
+ chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
32950
33550
  }
32951
33551
  });
32952
33552
  var getCommand3 = defineCommand155({
@@ -32960,7 +33560,8 @@ var getCommand3 = defineCommand155({
32960
33560
  type: "string",
32961
33561
  description: "Scheduled action ID (alternative to positional)",
32962
33562
  required: false
32963
- }
33563
+ },
33564
+ chat: CHAT_READ_ARG
32964
33565
  },
32965
33566
  run: async ({ args }) => {
32966
33567
  try {
@@ -32970,12 +33571,13 @@ var getCommand3 = defineCommand155({
32970
33571
  }
32971
33572
  validateScheduledActionRef(id);
32972
33573
  const env = getEnv();
32973
- if (isTempScheduledActionId(id) && !env.BAKER_CHAT_ID) {
32974
- failValidation2("BAKER_CHAT_ID is required to get a temp scheduled action ID.");
33574
+ const chatId = typeof args.chat === "string" && args.chat.length > 0 ? args.chat : env.BAKER_CHAT_ID;
33575
+ if (isTempScheduledActionId(id) && !chatId) {
33576
+ failValidation2("BAKER_CHAT_ID or --chat is required to get a temp scheduled action ID.");
32975
33577
  }
32976
33578
  const body = { id };
32977
- if (env.BAKER_CHAT_ID) {
32978
- body.chatId = env.BAKER_CHAT_ID;
33579
+ if (chatId) {
33580
+ body.chatId = chatId;
32979
33581
  }
32980
33582
  const response = await apiPost("/api/scheduled-actions/get", body);
32981
33583
  writeJson(response);
@@ -32989,20 +33591,24 @@ var getCommand3 = defineCommand155({
32989
33591
  import { defineCommand as defineCommand156 } from "citty";
32990
33592
  registerSchema({
32991
33593
  command: "scheduled-actions.list",
32992
- description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set.",
32993
- args: {}
33594
+ description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set, or --chat <id> to read an earlier chat's staged schedules instead.",
33595
+ args: {
33596
+ chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
33597
+ }
32994
33598
  });
32995
33599
  var listCommand14 = defineCommand156({
32996
33600
  meta: {
32997
33601
  name: "list",
32998
- description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set."
33602
+ description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set, or --chat <id> to read an earlier chat's staged schedules instead."
32999
33603
  },
33000
- run: async () => {
33604
+ args: { chat: CHAT_READ_ARG },
33605
+ run: async ({ args }) => {
33001
33606
  try {
33002
33607
  const env = getEnv();
33003
33608
  const body = {};
33004
- if (env.BAKER_CHAT_ID) {
33005
- body.chatId = env.BAKER_CHAT_ID;
33609
+ const chatId = typeof args.chat === "string" && args.chat.length > 0 ? args.chat : env.BAKER_CHAT_ID;
33610
+ if (chatId) {
33611
+ body.chatId = chatId;
33006
33612
  }
33007
33613
  const response = await apiPost("/api/scheduled-actions/list", body);
33008
33614
  writeJson(response);
@@ -33302,8 +33908,8 @@ async function stageOp3(op) {
33302
33908
  handleError3(err);
33303
33909
  }
33304
33910
  }
33305
- async function draftAction2(path28, body) {
33306
- const chatId = requireChatId();
33911
+ async function draftAction2(path28, body, chat) {
33912
+ const chatId = resolveChatId(chat);
33307
33913
  try {
33308
33914
  const data = await apiPost(path28, { chatId, ...body });
33309
33915
  writeJsonEnvelope({ ok: true, data });
@@ -33334,8 +33940,8 @@ function renderDraft(response) {
33334
33940
  }
33335
33941
  return lines.join("\n");
33336
33942
  }
33337
- async function draftList(json) {
33338
- const chatId = requireChatId();
33943
+ async function draftList(json, chat) {
33944
+ const chatId = resolveChatId(chat);
33339
33945
  try {
33340
33946
  const data = await apiPost("/api/tag-manager/draft", { chatId });
33341
33947
  if (json) {
@@ -33352,15 +33958,16 @@ async function draftList(json) {
33352
33958
  // src/commands/tag-manager/draft.ts
33353
33959
  registerSchema({
33354
33960
  command: "tagManager.draft",
33355
- description: "Review and undo the Tag Manager changes staged on this chat. Use `list` to see everything staged, `show` to inspect one change in full before publish, `amend` to correct one in place, and `remove`/`clear` to drop them.",
33961
+ description: "Review and undo the Tag Manager changes staged on this chat. Use `list` to see everything staged, `show` to inspect one change in full before publish, `amend` to correct one in place, and `remove`/`clear` to drop them. `list` and `show` take --chat <id> to read an earlier chat's changes instead.",
33356
33962
  args: {
33357
- json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list", required: false }
33963
+ json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list", required: false },
33964
+ chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
33358
33965
  }
33359
33966
  });
33360
33967
  var draftCommand3 = defineCommand161({
33361
33968
  meta: {
33362
33969
  name: "draft",
33363
- description: "List, show, amend, remove, or clear staged Tag Manager changes for this chat"
33970
+ description: "List, show, amend, remove, or clear staged Tag Manager changes for this chat. `list` and `show` take --chat <id> to read an earlier chat's changes instead."
33364
33971
  },
33365
33972
  subCommands: {
33366
33973
  list: defineCommand161({
@@ -33368,9 +33975,12 @@ var draftCommand3 = defineCommand161({
33368
33975
  name: "list",
33369
33976
  description: "Review everything staged on this chat (--json for the raw envelope)"
33370
33977
  },
33371
- args: { json: { type: "boolean", description: "Print the raw JSON envelope", required: false } },
33978
+ args: {
33979
+ json: { type: "boolean", description: "Print the raw JSON envelope", required: false },
33980
+ chat: CHAT_READ_ARG
33981
+ },
33372
33982
  run: async ({ args }) => {
33373
- await draftList(args.json === true);
33983
+ await draftList(args.json === true, args.chat);
33374
33984
  }
33375
33985
  }),
33376
33986
  show: defineCommand161({
@@ -33378,11 +33988,16 @@ var draftCommand3 = defineCommand161({
33378
33988
  name: "show",
33379
33989
  description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
33380
33990
  },
33381
- args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
33991
+ args: {
33992
+ ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false },
33993
+ chat: CHAT_READ_ARG
33994
+ },
33382
33995
  run: async ({ args }) => {
33383
- await draftAction2("/api/tag-manager/draft/show", {
33384
- ref: requireTarget4(args, "change")
33385
- });
33996
+ await draftAction2(
33997
+ "/api/tag-manager/draft/show",
33998
+ { ref: requireTarget4(args, "change") },
33999
+ args.chat
34000
+ );
33386
34001
  }
33387
34002
  }),
33388
34003
  amend: defineCommand161({
@@ -33818,9 +34433,9 @@ var listCommand15 = defineCommand165({
33818
34433
  await listTags(args.json === true);
33819
34434
  }
33820
34435
  });
33821
- async function listDraft3() {
34436
+ async function listDraft3(chat) {
33822
34437
  try {
33823
- const chatId = requireChatId();
34438
+ const chatId = resolveChatId(chat);
33824
34439
  const response = await apiPost("/api/tags/draft", { chatId });
33825
34440
  writeJson({ ok: true, data: response });
33826
34441
  } catch (err) {
@@ -33830,10 +34445,11 @@ async function listDraft3() {
33830
34445
  var draftCommand4 = defineCommand165({
33831
34446
  meta: {
33832
34447
  name: "draft",
33833
- description: "Review the tag changes staged in this chat (read-only). Staged changes were approved via request_tag_input and apply when the chat is published; to amend or drop one, propose a follow-up change through the same tool (a delete on a tag_temp_* ref drops the staged create)."
34448
+ description: "Review the tag changes staged in this chat (read-only). Staged changes were approved via request_tag_input and apply when the chat is published; to amend or drop one, propose a follow-up change through the same tool (a delete on a tag_temp_* ref drops the staged create). Takes --chat <id> to read an earlier chat's staged changes instead."
33834
34449
  },
33835
- run: async () => {
33836
- await listDraft3();
34450
+ args: { chat: CHAT_READ_ARG },
34451
+ run: async ({ args }) => {
34452
+ await listDraft3(args.chat);
33837
34453
  }
33838
34454
  });
33839
34455
  var tagsCommand3 = defineCommand165({