@koda-sl/baker-cli 0.174.0 → 0.176.0-dev.afc31fdb4

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