@koda-sl/baker-cli 0.178.0 → 0.180.0-dev.e916855f4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  toModelSafeImage,
37
37
  ulid,
38
38
  validateCanvasDeep
39
- } from "./chunk-P2T3IZRE.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-PXXJ3HJW.js";
48
+ } from "./chunk-YXQOSMWG.js";
49
49
  import {
50
50
  buildQueryCacheKey,
51
51
  cacheGet,
@@ -61,13 +61,14 @@ import {
61
61
  writeAdsJson,
62
62
  writeAdsOutput,
63
63
  writeJsonEnvelope
64
- } from "./chunk-X5C6HE24.js";
64
+ } from "./chunk-VKFY7XN5.js";
65
65
  import {
66
66
  ApiError,
67
67
  apiGet,
68
68
  apiPost,
69
+ apiPut,
69
70
  validateConvexId
70
- } from "./chunk-ZWYQIEBI.js";
71
+ } from "./chunk-RKGSX6ZR.js";
71
72
  import {
72
73
  installStreamTaps,
73
74
  logInvocation
@@ -79,7 +80,7 @@ import {
79
80
  } from "./chunk-YL3HDEIJ.js";
80
81
 
81
82
  // src/cli.ts
82
- import { defineCommand as defineCommand191, runMain } from "citty";
83
+ import { defineCommand as defineCommand192, runMain } from "citty";
83
84
 
84
85
  // src/commands/actions/index.ts
85
86
  import { defineCommand as defineCommand18 } from "citty";
@@ -3504,8 +3505,37 @@ var imagesIngestResponseSchema = z11.object({
3504
3505
  contentHash: z11.string()
3505
3506
  });
3506
3507
 
3507
- // ../api/src/tags.ts
3508
+ // ../api/src/landings.ts
3508
3509
  import { z as z12 } from "zod";
3510
+ var MAX_LANDING_FOLDER_NAME_LENGTH = 48;
3511
+ var landingFolderSchema = z12.object({
3512
+ name: z12.string(),
3513
+ /** How many landings are filed under it. A folder with none does not exist. */
3514
+ count: z12.number()
3515
+ });
3516
+ var landingFoldersListResponseSchema = z12.object({
3517
+ folders: z12.array(landingFolderSchema),
3518
+ /** Published landings sitting loose in the root. */
3519
+ unfiled: z12.number()
3520
+ });
3521
+ var landingFolderSetRequestSchema = z12.object({
3522
+ slugs: z12.array(z12.string().min(1)).min(1).max(200),
3523
+ /** `null` unfiles the pages. */
3524
+ folder: z12.string().max(MAX_LANDING_FOLDER_NAME_LENGTH).nullable()
3525
+ });
3526
+ var landingFolderSetResponseSchema = z12.object({
3527
+ /** Slugs whose live filing changed, with the normalized folder applied. */
3528
+ moved: z12.array(z12.string()),
3529
+ /** Slugs already filed there — no-ops, reported so the caller isn't misled. */
3530
+ unchanged: z12.array(z12.string()),
3531
+ /** Slugs with no published page. Their filing waits on the first publish. */
3532
+ notFound: z12.array(z12.string()),
3533
+ /** The company's folders after the move, so the caller never has to re-list. */
3534
+ folders: z12.array(landingFolderSchema)
3535
+ });
3536
+
3537
+ // ../api/src/tags.ts
3538
+ import { z as z13 } from "zod";
3509
3539
  var TAG_TYPES = [
3510
3540
  "meta",
3511
3541
  "amplitude",
@@ -3526,7 +3556,7 @@ var TAG_TYPES = [
3526
3556
  "recaptcha",
3527
3557
  "twitterAds"
3528
3558
  ];
3529
- var tagTypeSchema = z12.enum(TAG_TYPES);
3559
+ var tagTypeSchema = z13.enum(TAG_TYPES);
3530
3560
  var TAG_IDENTIFYING_FIELD = {
3531
3561
  meta: "pixelId",
3532
3562
  googleAds: "conversionID",
@@ -3547,218 +3577,218 @@ var TAG_IDENTIFYING_FIELD = {
3547
3577
  recaptcha: "siteKey",
3548
3578
  twitterAds: "pixelId"
3549
3579
  };
3550
- var tagDraftOpKindSchema = z12.enum(["create", "update", "delete"]);
3551
- var tagDraftOpViewSchema = z12.object({
3580
+ var tagDraftOpKindSchema = z13.enum(["create", "update", "delete"]);
3581
+ var tagDraftOpViewSchema = z13.object({
3552
3582
  /** `tag_temp_*` for staged creates; the real tag id for update/delete ops. */
3553
- ref: z12.string(),
3583
+ ref: z13.string(),
3554
3584
  kind: tagDraftOpKindSchema,
3555
3585
  type: tagTypeSchema,
3556
3586
  /** Present on update/delete ops — the real tag this op targets. */
3557
- tagId: z12.string().optional(),
3587
+ tagId: z13.string().optional(),
3558
3588
  /** Non-secret config (create: full; update: the staged patch). Secrets are structurally absent. */
3559
- config: z12.record(z12.string(), z12.string()),
3589
+ config: z13.record(z13.string(), z13.string()),
3560
3590
  /** Update only — fields the op explicitly clears. */
3561
- clearFields: z12.array(z12.string()).optional(),
3591
+ clearFields: z13.array(z13.string()).optional(),
3562
3592
  /** Names of secret fields already provided via the dashboard secure form. Never values. */
3563
- secretsSet: z12.array(z12.string()),
3593
+ secretsSet: z13.array(z13.string()),
3564
3594
  /** Names of secret fields still awaiting user input. */
3565
- secretsPending: z12.array(z12.string()),
3566
- summary: z12.string(),
3567
- stagedAt: z12.number()
3595
+ secretsPending: z13.array(z13.string()),
3596
+ summary: z13.string(),
3597
+ stagedAt: z13.number()
3568
3598
  });
3569
- var tagsEffectiveEntrySchema = z12.object({
3599
+ var tagsEffectiveEntrySchema = z13.object({
3570
3600
  /** Real tag id, or `tag_temp_*` for staged creates. Use as flow side-effect `tagIds` value. */
3571
- ref: z12.string(),
3572
- tagId: z12.string().optional(),
3601
+ ref: z13.string(),
3602
+ tagId: z13.string().optional(),
3573
3603
  type: tagTypeSchema,
3574
3604
  /** Value of the type's identifying field, when set. */
3575
- identifier: z12.string().optional(),
3605
+ identifier: z13.string().optional(),
3576
3606
  /** Redacted config; for staged updates, production config with the patch merged. */
3577
- config: z12.record(z12.string(), z12.string()),
3607
+ config: z13.record(z13.string(), z13.string()),
3578
3608
  /** Absent = live production tag with no staged changes in this chat. */
3579
3609
  staged: tagDraftOpKindSchema.optional(),
3580
- secretsSet: z12.array(z12.string()),
3581
- secretsPending: z12.array(z12.string())
3610
+ secretsSet: z13.array(z13.string()),
3611
+ secretsPending: z13.array(z13.string())
3582
3612
  });
3583
- var tagsListRequestSchema = z12.object({ chatId: z12.string() });
3584
- var tagsListResponseSchema = z12.object({ tags: z12.array(tagsEffectiveEntrySchema) });
3585
- var tagsDraftListRequestSchema = z12.object({ chatId: z12.string() });
3586
- var tagsDraftListResponseSchema = z12.object({
3587
- status: z12.enum(["active", "publishing", "applied", "discarded", "none"]),
3588
- ops: z12.array(tagDraftOpViewSchema)
3613
+ var tagsListRequestSchema = z13.object({ chatId: z13.string() });
3614
+ var tagsListResponseSchema = z13.object({ tags: z13.array(tagsEffectiveEntrySchema) });
3615
+ var tagsDraftListRequestSchema = z13.object({ chatId: z13.string() });
3616
+ var tagsDraftListResponseSchema = z13.object({
3617
+ status: z13.enum(["active", "publishing", "applied", "discarded", "none"]),
3618
+ ops: z13.array(tagDraftOpViewSchema)
3589
3619
  });
3590
- var tagInputRequestSchema = z12.object({
3620
+ var tagInputRequestSchema = z13.object({
3591
3621
  // Every tag change is a tab in the approval form: create/edit show the full
3592
3622
  // body; delete shows a confirm. No tag change bypasses this approval.
3593
- mode: z12.enum(["create", "edit", "delete"]),
3623
+ mode: z13.enum(["create", "edit", "delete"]),
3594
3624
  tagType: tagTypeSchema,
3595
3625
  /** Edit/delete mode — the real tag id or `tag_temp_*` ref being changed. */
3596
- ref: z12.string().optional(),
3626
+ ref: z13.string().optional(),
3597
3627
  /** Non-secret values the agent proposes to prefill. Secret keys are stripped at every boundary. */
3598
- prefilledConfig: z12.record(z12.string(), z12.string()).optional(),
3628
+ prefilledConfig: z13.record(z13.string(), z13.string()).optional(),
3599
3629
  /** Secret field names the agent asks the user to provide. */
3600
- requestedSecretFields: z12.array(z12.string()).optional(),
3630
+ requestedSecretFields: z13.array(z13.string()).optional(),
3601
3631
  /** Short message shown above the form explaining why the input is needed. */
3602
- message: z12.string().optional()
3632
+ message: z13.string().optional()
3603
3633
  });
3604
- var tagChangeToolInputSchema = z12.object({
3605
- changes: z12.array(tagInputRequestSchema).min(1).max(8)
3634
+ var tagChangeToolInputSchema = z13.object({
3635
+ changes: z13.array(tagInputRequestSchema).min(1).max(8)
3606
3636
  });
3607
- var tagInputResultSchema = z12.discriminatedUnion("status", [
3608
- z12.object({
3609
- status: z12.literal("submitted"),
3610
- ref: z12.string(),
3637
+ var tagInputResultSchema = z13.discriminatedUnion("status", [
3638
+ z13.object({
3639
+ status: z13.literal("submitted"),
3640
+ ref: z13.string(),
3611
3641
  type: tagTypeSchema,
3612
3642
  /** Identifying field name → value (non-secret), when the type has one. */
3613
- identifier: z12.record(z12.string(), z12.string()).optional(),
3614
- secretFieldsSet: z12.array(z12.string()),
3615
- note: z12.string().optional()
3643
+ identifier: z13.record(z13.string(), z13.string()).optional(),
3644
+ secretFieldsSet: z13.array(z13.string()),
3645
+ note: z13.string().optional()
3616
3646
  }),
3617
- z12.object({
3618
- status: z12.literal("declined"),
3619
- reason: z12.string().optional()
3647
+ z13.object({
3648
+ status: z13.literal("declined"),
3649
+ reason: z13.string().optional()
3620
3650
  })
3621
3651
  ]);
3622
- var tagChangeToolResultSchema = z12.object({
3623
- results: z12.array(tagInputResultSchema)
3652
+ var tagChangeToolResultSchema = z13.object({
3653
+ results: z13.array(tagInputResultSchema)
3624
3654
  });
3625
3655
 
3626
3656
  // ../api/src/testimonials.ts
3627
- import { z as z13 } from "zod";
3628
- var testimonialSourceTypeSchema = z13.enum(["google", "trustpilot"]);
3629
- var testimonialStatusSchema = z13.enum(["pending", "processing", "ready", "error"]);
3630
- var testimonialSentimentSchema = z13.enum(["positive", "neutral", "negative"]);
3631
- var testimonialDocSchema = z13.object({
3632
- _id: z13.string(),
3633
- _creationTime: z13.number(),
3634
- companyId: z13.string(),
3635
- sourceId: z13.string(),
3657
+ import { z as z14 } from "zod";
3658
+ var testimonialSourceTypeSchema = z14.enum(["google", "trustpilot"]);
3659
+ var testimonialStatusSchema = z14.enum(["pending", "processing", "ready", "error"]);
3660
+ var testimonialSentimentSchema = z14.enum(["positive", "neutral", "negative"]);
3661
+ var testimonialDocSchema = z14.object({
3662
+ _id: z14.string(),
3663
+ _creationTime: z14.number(),
3664
+ companyId: z14.string(),
3665
+ sourceId: z14.string(),
3636
3666
  sourceType: testimonialSourceTypeSchema,
3637
- reviewText: z13.string(),
3638
- reviewTitle: z13.string().optional(),
3639
- searchText: z13.string().optional(),
3640
- reviewerName: z13.string().optional(),
3641
- reviewerImageUrl: z13.string().optional(),
3642
- reviewerImageId: z13.string().optional(),
3643
- reviewerLocation: z13.string().optional(),
3644
- rating: z13.number().optional(),
3645
- reviewDate: z13.number().optional(),
3646
- ownerAnswer: z13.string().optional(),
3647
- mediaUrls: z13.array(z13.string()).optional(),
3648
- imageIds: z13.array(z13.string()).optional(),
3649
- videoIds: z13.array(z13.string()).optional(),
3650
- sourceUrl: z13.string().optional(),
3651
- rawData: z13.unknown().optional(),
3652
- tags: z13.array(z13.string()),
3653
- highlight: z13.string().optional(),
3654
- language: z13.string().optional(),
3655
- summary: z13.string().optional(),
3667
+ reviewText: z14.string(),
3668
+ reviewTitle: z14.string().optional(),
3669
+ searchText: z14.string().optional(),
3670
+ reviewerName: z14.string().optional(),
3671
+ reviewerImageUrl: z14.string().optional(),
3672
+ reviewerImageId: z14.string().optional(),
3673
+ reviewerLocation: z14.string().optional(),
3674
+ rating: z14.number().optional(),
3675
+ reviewDate: z14.number().optional(),
3676
+ ownerAnswer: z14.string().optional(),
3677
+ mediaUrls: z14.array(z14.string()).optional(),
3678
+ imageIds: z14.array(z14.string()).optional(),
3679
+ videoIds: z14.array(z14.string()).optional(),
3680
+ sourceUrl: z14.string().optional(),
3681
+ rawData: z14.unknown().optional(),
3682
+ tags: z14.array(z14.string()),
3683
+ highlight: z14.string().optional(),
3684
+ language: z14.string().optional(),
3685
+ summary: z14.string().optional(),
3656
3686
  sentiment: testimonialSentimentSchema.optional(),
3657
- textEmbedding: z13.array(z13.number()).optional(),
3658
- externalId: z13.string().optional(),
3659
- contentHash: z13.string().optional(),
3687
+ textEmbedding: z14.array(z14.number()).optional(),
3688
+ externalId: z14.string().optional(),
3689
+ contentHash: z14.string().optional(),
3660
3690
  status: testimonialStatusSchema,
3661
- errorMessage: z13.string().optional(),
3662
- createdAt: z13.number(),
3663
- updatedAt: z13.number()
3691
+ errorMessage: z14.string().optional(),
3692
+ createdAt: z14.number(),
3693
+ updatedAt: z14.number()
3664
3694
  });
3665
- var testimonialsListRequestSchema = z13.object({
3695
+ var testimonialsListRequestSchema = z14.object({
3666
3696
  source: testimonialSourceTypeSchema.optional(),
3667
- rating_min: z13.coerce.number().int().min(1).max(5).optional(),
3668
- rating_max: z13.coerce.number().int().min(1).max(5).optional(),
3669
- tags: z13.string().transform((s) => s.split(",").filter(Boolean)).optional(),
3697
+ rating_min: z14.coerce.number().int().min(1).max(5).optional(),
3698
+ rating_max: z14.coerce.number().int().min(1).max(5).optional(),
3699
+ tags: z14.string().transform((s) => s.split(",").filter(Boolean)).optional(),
3670
3700
  status: testimonialStatusSchema.optional(),
3671
3701
  sentiment: testimonialSentimentSchema.optional(),
3672
- language: z13.string().min(2).max(5).optional(),
3673
- limit: z13.coerce.number().int().positive().max(200).optional()
3674
- });
3675
- var testimonialsListResponseSchema = z13.array(testimonialDocSchema);
3676
- var testimonialsGetRequestSchema = z13.object({ id: z13.string().min(1, "Missing id parameter") });
3677
- var testimonialsSearchRequestSchema = z13.object({
3678
- query: z13.string().min(1),
3679
- limit: z13.coerce.number().int().positive().max(100).optional(),
3702
+ language: z14.string().min(2).max(5).optional(),
3703
+ limit: z14.coerce.number().int().positive().max(200).optional()
3704
+ });
3705
+ var testimonialsListResponseSchema = z14.array(testimonialDocSchema);
3706
+ var testimonialsGetRequestSchema = z14.object({ id: z14.string().min(1, "Missing id parameter") });
3707
+ var testimonialsSearchRequestSchema = z14.object({
3708
+ query: z14.string().min(1),
3709
+ limit: z14.coerce.number().int().positive().max(100).optional(),
3680
3710
  source: testimonialSourceTypeSchema.optional(),
3681
- rating_min: z13.coerce.number().int().min(1).max(5).optional(),
3682
- rating_max: z13.coerce.number().int().min(1).max(5).optional(),
3683
- tags: z13.array(z13.string()).optional(),
3711
+ rating_min: z14.coerce.number().int().min(1).max(5).optional(),
3712
+ rating_max: z14.coerce.number().int().min(1).max(5).optional(),
3713
+ tags: z14.array(z14.string()).optional(),
3684
3714
  status: testimonialStatusSchema.optional(),
3685
3715
  sentiment: testimonialSentimentSchema.optional(),
3686
- language: z13.string().min(2).max(5).optional()
3716
+ language: z14.string().min(2).max(5).optional()
3687
3717
  }).refine(
3688
3718
  (data) => data.rating_min === void 0 || data.rating_max === void 0 || data.rating_min <= data.rating_max,
3689
3719
  { message: "rating_min must be less than or equal to rating_max" }
3690
3720
  );
3691
- var testimonialsSearchResponseSchema = z13.array(testimonialDocSchema);
3692
- var testimonialsOutscraperWebhookResponseSchema = z13.object({
3693
- ok: z13.literal(true),
3694
- note: z13.string().optional()
3721
+ var testimonialsSearchResponseSchema = z14.array(testimonialDocSchema);
3722
+ var testimonialsOutscraperWebhookResponseSchema = z14.object({
3723
+ ok: z14.literal(true),
3724
+ note: z14.string().optional()
3695
3725
  });
3696
3726
 
3697
3727
  // ../api/src/videos.ts
3698
- import { z as z14 } from "zod";
3699
- var videoStatusSchema = z14.enum(["uploading", "uploaded", "processing", "ready", "error"]);
3700
- var videoTranscriptSegmentSchema = z14.object({
3701
- text: z14.string(),
3702
- startSecond: z14.number(),
3703
- endSecond: z14.number()
3704
- });
3705
- var videoSceneSchema = z14.object({
3706
- title: z14.string(),
3707
- description: z14.string(),
3708
- startSecond: z14.number(),
3709
- endSecond: z14.number(),
3710
- thumbnailTime: z14.number()
3711
- });
3712
- var videoDocSchema = z14.object({
3713
- _id: z14.string(),
3714
- _creationTime: z14.number(),
3715
- companyId: z14.string(),
3716
- muxAssetId: z14.string(),
3717
- muxPlaybackId: z14.string(),
3718
- muxUploadId: z14.string(),
3719
- name: z14.string(),
3720
- description: z14.string(),
3721
- tags: z14.array(z14.string()),
3722
- source: z14.string(),
3723
- externalId: z14.string().optional(),
3724
- sourceId: z14.string().optional(),
3725
- width: z14.number().optional(),
3726
- height: z14.number().optional(),
3727
- aspectRatio: z14.number().optional(),
3728
- duration: z14.number().optional(),
3729
- transcript: z14.string().optional(),
3730
- transcriptSegments: z14.array(videoTranscriptSegmentSchema).optional(),
3731
- scenes: z14.array(videoSceneSchema).optional(),
3732
- descriptionEmbedding: z14.array(z14.number()).optional(),
3733
- searchText: z14.string().optional(),
3728
+ import { z as z15 } from "zod";
3729
+ var videoStatusSchema = z15.enum(["uploading", "uploaded", "processing", "ready", "error"]);
3730
+ var videoTranscriptSegmentSchema = z15.object({
3731
+ text: z15.string(),
3732
+ startSecond: z15.number(),
3733
+ endSecond: z15.number()
3734
+ });
3735
+ var videoSceneSchema = z15.object({
3736
+ title: z15.string(),
3737
+ description: z15.string(),
3738
+ startSecond: z15.number(),
3739
+ endSecond: z15.number(),
3740
+ thumbnailTime: z15.number()
3741
+ });
3742
+ var videoDocSchema = z15.object({
3743
+ _id: z15.string(),
3744
+ _creationTime: z15.number(),
3745
+ companyId: z15.string(),
3746
+ muxAssetId: z15.string(),
3747
+ muxPlaybackId: z15.string(),
3748
+ muxUploadId: z15.string(),
3749
+ name: z15.string(),
3750
+ description: z15.string(),
3751
+ tags: z15.array(z15.string()),
3752
+ source: z15.string(),
3753
+ externalId: z15.string().optional(),
3754
+ sourceId: z15.string().optional(),
3755
+ width: z15.number().optional(),
3756
+ height: z15.number().optional(),
3757
+ aspectRatio: z15.number().optional(),
3758
+ duration: z15.number().optional(),
3759
+ transcript: z15.string().optional(),
3760
+ transcriptSegments: z15.array(videoTranscriptSegmentSchema).optional(),
3761
+ scenes: z15.array(videoSceneSchema).optional(),
3762
+ descriptionEmbedding: z15.array(z15.number()).optional(),
3763
+ searchText: z15.string().optional(),
3734
3764
  status: videoStatusSchema,
3735
- errorMessage: z14.string().optional(),
3736
- createdAt: z14.number(),
3737
- updatedAt: z14.number(),
3738
- thumbnailUrl: z14.string()
3739
- });
3740
- var videosWebhookResponseSchema = z14.object({ ok: z14.literal(true) });
3741
- var videosGetRequestSchema = z14.object({ id: z14.string().min(1, "Missing id parameter") });
3742
- var videosSearchRequestSchema = z14.object({
3743
- query: z14.string().min(1),
3744
- limit: z14.coerce.number().int().positive().max(100).optional(),
3745
- tags: z14.array(z14.string()).optional()
3746
- });
3747
- var videoSearchResultSchema = z14.object({
3748
- _id: z14.string(),
3749
- thumbnailUrl: z14.string(),
3750
- name: z14.string(),
3751
- description: z14.string(),
3752
- tags: z14.array(z14.string()),
3753
- status: z14.string(),
3754
- duration: z14.number().optional(),
3755
- muxPlaybackId: z14.string(),
3756
- createdAt: z14.number()
3757
- });
3758
- var videosSearchResponseSchema = z14.array(videoSearchResultSchema);
3759
- var videosUploadResponseSchema = z14.object({ uploadUrl: z14.string(), videoId: z14.string() });
3760
- var videosDeleteRequestSchema = z14.object({ id: z14.string().min(1, "Missing video ID") });
3761
- var videosDeleteResponseSchema = z14.object({ ok: z14.literal(true) });
3765
+ errorMessage: z15.string().optional(),
3766
+ createdAt: z15.number(),
3767
+ updatedAt: z15.number(),
3768
+ thumbnailUrl: z15.string()
3769
+ });
3770
+ var videosWebhookResponseSchema = z15.object({ ok: z15.literal(true) });
3771
+ var videosGetRequestSchema = z15.object({ id: z15.string().min(1, "Missing id parameter") });
3772
+ var videosSearchRequestSchema = z15.object({
3773
+ query: z15.string().min(1),
3774
+ limit: z15.coerce.number().int().positive().max(100).optional(),
3775
+ tags: z15.array(z15.string()).optional()
3776
+ });
3777
+ var videoSearchResultSchema = z15.object({
3778
+ _id: z15.string(),
3779
+ thumbnailUrl: z15.string(),
3780
+ name: z15.string(),
3781
+ description: z15.string(),
3782
+ tags: z15.array(z15.string()),
3783
+ status: z15.string(),
3784
+ duration: z15.number().optional(),
3785
+ muxPlaybackId: z15.string(),
3786
+ createdAt: z15.number()
3787
+ });
3788
+ var videosSearchResponseSchema = z15.array(videoSearchResultSchema);
3789
+ var videosUploadResponseSchema = z15.object({ uploadUrl: z15.string(), videoId: z15.string() });
3790
+ var videosDeleteRequestSchema = z15.object({ id: z15.string().min(1, "Missing video ID") });
3791
+ var videosDeleteResponseSchema = z15.object({ ok: z15.literal(true) });
3762
3792
 
3763
3793
  // src/commands/actions/complete.ts
3764
3794
  import { defineCommand as defineCommand2 } from "citty";
@@ -5359,7 +5389,7 @@ var GEO_TARGET_CONSTANT_REGEX = /^geoTargetConstants\/\d+$/;
5359
5389
  var LANGUAGE_CONSTANT_REGEX = /^languageConstants\/\d+$/;
5360
5390
 
5361
5391
  // ../api/src/ads-google/ops.ts
5362
- import { z as z15 } from "zod";
5392
+ import { z as z16 } from "zod";
5363
5393
 
5364
5394
  // ../api/src/ads-google/structured-snippet-headers.ts
5365
5395
  var STRUCTURED_SNIPPET_HEADERS_EN = [
@@ -5854,54 +5884,54 @@ function canonicalStructuredSnippetHeader(header) {
5854
5884
  }
5855
5885
 
5856
5886
  // ../api/src/ads-google/ops.ts
5857
- var tempRefSchema2 = z15.string().regex(TEMP_REF_REGEX2, "expected a g_temp_* reference");
5858
- var refSchema = z15.union([
5859
- z15.string().regex(RESOURCE_NAME_REGEX, "expected a customers/\u2026/\u2026/\u2026 resource name"),
5860
- z15.string().regex(NUMERIC_ID_REGEX2, "expected a numeric id"),
5887
+ var tempRefSchema2 = z16.string().regex(TEMP_REF_REGEX2, "expected a g_temp_* reference");
5888
+ var refSchema = z16.union([
5889
+ z16.string().regex(RESOURCE_NAME_REGEX, "expected a customers/\u2026/\u2026/\u2026 resource name"),
5890
+ z16.string().regex(NUMERIC_ID_REGEX2, "expected a numeric id"),
5861
5891
  tempRefSchema2
5862
5892
  ]);
5863
5893
  var targetRefSchema = refSchema;
5864
- var microsSchema = z15.number().int().positive("expected a positive micros amount");
5865
- var httpsUrlSchema2 = z15.string().url().refine((u) => u.startsWith("https://"), "final URLs must be https");
5866
- var customerIdSchema = z15.string().regex(NUMERIC_ID_REGEX2, "customerId must be the bare numeric customer id");
5867
- var stageableStatusSchema2 = z15.enum(STAGEABLE_CREATE_STATUSES2);
5868
- var matchTypeSchema = z15.enum(KEYWORD_MATCH_TYPES);
5869
- var finalUrlSuffixSchema = z15.string().max(GOOGLE_ADS_LIMITS.campaign.finalUrlSuffixMax).refine((s) => !/^[?&]/.test(s), "drop the leading ? or & \u2014 a final URL suffix is bare query parameters").refine((s) => !s.includes("{lpurl}"), "{lpurl} belongs in a tracking template, not in a final URL suffix").refine((s) => !/\s/.test(s), "a final URL suffix cannot contain whitespace").refine((s) => s === "" || s.includes("="), 'expected key=value pairs, e.g. "utm_source=google&utm_agency=baker"');
5894
+ var microsSchema = z16.number().int().positive("expected a positive micros amount");
5895
+ var httpsUrlSchema2 = z16.string().url().refine((u) => u.startsWith("https://"), "final URLs must be https");
5896
+ var customerIdSchema = z16.string().regex(NUMERIC_ID_REGEX2, "customerId must be the bare numeric customer id");
5897
+ var stageableStatusSchema2 = z16.enum(STAGEABLE_CREATE_STATUSES2);
5898
+ var matchTypeSchema = z16.enum(KEYWORD_MATCH_TYPES);
5899
+ var finalUrlSuffixSchema = z16.string().max(GOOGLE_ADS_LIMITS.campaign.finalUrlSuffixMax).refine((s) => !/^[?&]/.test(s), "drop the leading ? or & \u2014 a final URL suffix is bare query parameters").refine((s) => !s.includes("{lpurl}"), "{lpurl} belongs in a tracking template, not in a final URL suffix").refine((s) => !/\s/.test(s), "a final URL suffix cannot contain whitespace").refine((s) => s === "" || s.includes("="), 'expected key=value pairs, e.g. "utm_source=google&utm_agency=baker"');
5870
5900
  var LANDING_PAGE_TAGS = ["{lpurl}", "{unescapedlpurl}", "{escapedlpurl}", "{lpurl+2}", "{lpurl+3}"];
5871
- var trackingUrlTemplateSchema = z15.string().max(GOOGLE_ADS_LIMITS.campaign.trackingUrlTemplateMax).refine((t) => !/\s/.test(t), "a tracking template cannot contain whitespace").refine(
5901
+ var trackingUrlTemplateSchema = z16.string().max(GOOGLE_ADS_LIMITS.campaign.trackingUrlTemplateMax).refine((t) => !/\s/.test(t), "a tracking template cannot contain whitespace").refine(
5872
5902
  (t) => t === "" || LANDING_PAGE_TAGS.some((tag) => t.includes(tag)),
5873
5903
  `a tracking template must carry the landing page through one of ${LANDING_PAGE_TAGS.join(", ")}, e.g. "https://tracker.example/?url={lpurl}"`
5874
5904
  ).refine(
5875
5905
  (t) => t === "" || /^(https?:\/\/|\{)/.test(t),
5876
5906
  "a tracking template must start with http://, https:// or a {lpurl} tag"
5877
5907
  );
5878
- var urlCustomParametersSchema = z15.array(
5879
- z15.strictObject({
5880
- key: z15.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.urlCustomParameterKeyMax).regex(/^[A-Za-z0-9_]+$/, "a custom parameter key is letters, digits and underscores only"),
5881
- value: z15.string().max(GOOGLE_ADS_LIMITS.campaign.urlCustomParameterValueMax)
5908
+ var urlCustomParametersSchema = z16.array(
5909
+ z16.strictObject({
5910
+ key: z16.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.urlCustomParameterKeyMax).regex(/^[A-Za-z0-9_]+$/, "a custom parameter key is letters, digits and underscores only"),
5911
+ value: z16.string().max(GOOGLE_ADS_LIMITS.campaign.urlCustomParameterValueMax)
5882
5912
  })
5883
5913
  ).max(GOOGLE_ADS_LIMITS.campaign.urlCustomParametersMax).refine(
5884
5914
  (params) => new Set(params.map((p) => p.key)).size === params.length,
5885
5915
  "each custom parameter key can appear only once"
5886
5916
  );
5887
- var keywordTextSchema = z15.string().min(1).max(GOOGLE_ADS_LIMITS.keyword.textMax).refine((t) => t.trim().split(/\s+/).length <= GOOGLE_ADS_LIMITS.keyword.wordsMax, "keyword exceeds 10 words");
5888
- var budgetCreateSchema = z15.object({
5889
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.budget.nameMax),
5917
+ var keywordTextSchema = z16.string().min(1).max(GOOGLE_ADS_LIMITS.keyword.textMax).refine((t) => t.trim().split(/\s+/).length <= GOOGLE_ADS_LIMITS.keyword.wordsMax, "keyword exceeds 10 words");
5918
+ var budgetCreateSchema = z16.object({
5919
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.budget.nameMax),
5890
5920
  amountMicros: microsSchema,
5891
- deliveryMethod: z15.enum(BUDGET_DELIVERY_METHODS).default("STANDARD"),
5892
- explicitlyShared: z15.boolean().default(false)
5921
+ deliveryMethod: z16.enum(BUDGET_DELIVERY_METHODS).default("STANDARD"),
5922
+ explicitlyShared: z16.boolean().default(false)
5893
5923
  });
5894
- var budgetUpdateSchema = z15.object({
5895
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.budget.nameMax).optional(),
5924
+ var budgetUpdateSchema = z16.object({
5925
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.budget.nameMax).optional(),
5896
5926
  amountMicros: microsSchema.optional(),
5897
- deliveryMethod: z15.enum(BUDGET_DELIVERY_METHODS).optional()
5927
+ deliveryMethod: z16.enum(BUDGET_DELIVERY_METHODS).optional()
5898
5928
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
5899
- var biddingConfigSchema = z15.object({
5900
- type: z15.enum(BIDDING_STRATEGY_TYPES),
5929
+ var biddingConfigSchema = z16.object({
5930
+ type: z16.enum(BIDDING_STRATEGY_TYPES),
5901
5931
  targetCpaMicros: microsSchema.optional(),
5902
- targetRoas: z15.number().positive().optional(),
5932
+ targetRoas: z16.number().positive().optional(),
5903
5933
  cpcBidCeilingMicros: microsSchema.optional(),
5904
- enhancedCpcEnabled: z15.boolean().optional()
5934
+ enhancedCpcEnabled: z16.boolean().optional()
5905
5935
  }).superRefine((p, ctx) => {
5906
5936
  if (p.type === "TARGET_CPA" && p.targetCpaMicros === void 0) {
5907
5937
  ctx.addIssue({ code: "custom", path: ["targetCpaMicros"], message: "TARGET_CPA needs targetCpaMicros" });
@@ -5910,24 +5940,24 @@ var biddingConfigSchema = z15.object({
5910
5940
  ctx.addIssue({ code: "custom", path: ["targetRoas"], message: "TARGET_ROAS needs targetRoas" });
5911
5941
  }
5912
5942
  });
5913
- var networkSettingsSchema = z15.object({
5914
- targetGoogleSearch: z15.boolean().optional(),
5915
- targetSearchNetwork: z15.boolean().optional(),
5916
- targetContentNetwork: z15.boolean().optional(),
5917
- targetPartnerSearchNetwork: z15.boolean().optional()
5943
+ var networkSettingsSchema = z16.object({
5944
+ targetGoogleSearch: z16.boolean().optional(),
5945
+ targetSearchNetwork: z16.boolean().optional(),
5946
+ targetContentNetwork: z16.boolean().optional(),
5947
+ targetPartnerSearchNetwork: z16.boolean().optional()
5918
5948
  });
5919
- var dateSchema = z15.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected a YYYY-MM-DD date");
5920
- var geoTargetTypeSettingSchema = z15.strictObject({
5921
- positiveGeoTargetType: z15.enum(POSITIVE_GEO_TARGET_TYPES).optional(),
5922
- negativeGeoTargetType: z15.enum(NEGATIVE_GEO_TARGET_TYPES).optional()
5949
+ var dateSchema = z16.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected a YYYY-MM-DD date");
5950
+ var geoTargetTypeSettingSchema = z16.strictObject({
5951
+ positiveGeoTargetType: z16.enum(POSITIVE_GEO_TARGET_TYPES).optional(),
5952
+ negativeGeoTargetType: z16.enum(NEGATIVE_GEO_TARGET_TYPES).optional()
5923
5953
  }).refine(
5924
5954
  (p) => p.positiveGeoTargetType !== void 0 || p.negativeGeoTargetType !== void 0,
5925
5955
  "geoTargetTypeSetting needs positiveGeoTargetType and/or negativeGeoTargetType"
5926
5956
  );
5927
- var campaignCreateSchema2 = z15.strictObject({
5928
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.nameMax),
5929
- channelType: z15.enum(ADVERTISING_CHANNEL_TYPES),
5930
- channelSubType: z15.enum(ADVERTISING_CHANNEL_SUB_TYPES).optional(),
5957
+ var campaignCreateSchema2 = z16.strictObject({
5958
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.nameMax),
5959
+ channelType: z16.enum(ADVERTISING_CHANNEL_TYPES),
5960
+ channelSubType: z16.enum(ADVERTISING_CHANNEL_SUB_TYPES).optional(),
5931
5961
  budget: refSchema,
5932
5962
  /** Inline standard bidding, or a portfolio strategy ref via biddingStrategy. */
5933
5963
  bidding: biddingConfigSchema.optional(),
@@ -5947,12 +5977,12 @@ var campaignCreateSchema2 = z15.strictObject({
5947
5977
  /** The `{_name}` parameters this campaign's tracking template and final URLs can reference. */
5948
5978
  urlCustomParameters: urlCustomParametersSchema.optional(),
5949
5979
  /** Advisory Google Ads UI objective — drives warnings, not sent to the API. */
5950
- objective: z15.enum(CAMPAIGN_OBJECTIVES).optional(),
5980
+ objective: z16.enum(CAMPAIGN_OBJECTIVES).optional(),
5951
5981
  /**
5952
5982
  * Whether the campaign contains EU political advertising. Google requires the declaration on
5953
5983
  * every campaign create (FieldError.REQUIRED without it); omitted means it does not.
5954
5984
  */
5955
- euPoliticalAds: z15.boolean().optional(),
5985
+ euPoliticalAds: z16.boolean().optional(),
5956
5986
  status: stageableStatusSchema2.default("PAUSED")
5957
5987
  }).superRefine((p, ctx) => {
5958
5988
  if (!p.bidding && !p.biddingStrategy) {
@@ -5976,8 +6006,8 @@ var campaignCreateSchema2 = z15.strictObject({
5976
6006
  ctx.addIssue({ code: "custom", path: ["endDate"], message: "endDate must be after startDate" });
5977
6007
  }
5978
6008
  });
5979
- var campaignUpdateSchema2 = z15.strictObject({
5980
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.nameMax).optional(),
6009
+ var campaignUpdateSchema2 = z16.strictObject({
6010
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.nameMax).optional(),
5981
6011
  budget: refSchema.optional(),
5982
6012
  bidding: biddingConfigSchema.optional(),
5983
6013
  networkSettings: networkSettingsSchema.optional(),
@@ -5992,130 +6022,130 @@ var campaignUpdateSchema2 = z15.strictObject({
5992
6022
  /** Replaces the campaign's custom parameters wholesale; `[]` removes them all. */
5993
6023
  urlCustomParameters: urlCustomParametersSchema.optional(),
5994
6024
  /** Corrects the campaign's EU political advertising declaration (true = contains, false = does not). */
5995
- euPoliticalAds: z15.boolean().optional(),
5996
- status: z15.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
6025
+ euPoliticalAds: z16.boolean().optional(),
6026
+ status: z16.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
5997
6027
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
5998
- var adGroupCreateSchema = z15.object({
5999
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.adGroup.nameMax),
6028
+ var adGroupCreateSchema = z16.object({
6029
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.adGroup.nameMax),
6000
6030
  campaign: refSchema,
6001
- type: z15.enum(AD_GROUP_TYPES).default("SEARCH_STANDARD"),
6031
+ type: z16.enum(AD_GROUP_TYPES).default("SEARCH_STANDARD"),
6002
6032
  cpcBidMicros: microsSchema.optional(),
6003
6033
  status: stageableStatusSchema2.default("PAUSED")
6004
6034
  });
6005
- var adGroupUpdateSchema = z15.object({
6006
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.adGroup.nameMax).optional(),
6035
+ var adGroupUpdateSchema = z16.object({
6036
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.adGroup.nameMax).optional(),
6007
6037
  cpcBidMicros: microsSchema.optional(),
6008
- status: z15.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
6038
+ status: z16.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
6009
6039
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
6010
- var keywordAddSchema = z15.object({
6040
+ var keywordAddSchema = z16.object({
6011
6041
  adGroup: refSchema,
6012
6042
  text: keywordTextSchema,
6013
6043
  matchType: matchTypeSchema,
6014
6044
  cpcBidMicros: microsSchema.optional(),
6015
- finalUrls: z15.array(httpsUrlSchema2).optional(),
6045
+ finalUrls: z16.array(httpsUrlSchema2).optional(),
6016
6046
  status: stageableStatusSchema2.default("ENABLED")
6017
6047
  });
6018
- var keywordUpdateSchema = z15.object({
6048
+ var keywordUpdateSchema = z16.object({
6019
6049
  cpcBidMicros: microsSchema.optional(),
6020
- finalUrls: z15.array(httpsUrlSchema2).optional(),
6021
- status: z15.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
6050
+ finalUrls: z16.array(httpsUrlSchema2).optional(),
6051
+ status: z16.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
6022
6052
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
6023
- var negativeKeywordAddSchema = z15.object({
6024
- level: z15.enum(["adGroup", "campaign"]),
6053
+ var negativeKeywordAddSchema = z16.object({
6054
+ level: z16.enum(["adGroup", "campaign"]),
6025
6055
  parent: refSchema,
6026
6056
  text: keywordTextSchema,
6027
6057
  matchType: matchTypeSchema
6028
6058
  });
6029
- var sharedSetCreateSchema = z15.object({
6030
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.sharedSet.nameMax),
6031
- type: z15.enum(SHARED_SET_TYPES).default("NEGATIVE_KEYWORDS")
6059
+ var sharedSetCreateSchema = z16.object({
6060
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.sharedSet.nameMax),
6061
+ type: z16.enum(SHARED_SET_TYPES).default("NEGATIVE_KEYWORDS")
6032
6062
  });
6033
- var sharedSetMemberAddSchema = z15.object({
6063
+ var sharedSetMemberAddSchema = z16.object({
6034
6064
  sharedSet: refSchema,
6035
6065
  text: keywordTextSchema,
6036
6066
  matchType: matchTypeSchema
6037
6067
  });
6038
- var campaignSharedSetAttachSchema = z15.object({
6068
+ var campaignSharedSetAttachSchema = z16.object({
6039
6069
  campaign: refSchema,
6040
6070
  sharedSet: refSchema
6041
6071
  });
6042
- var adTextAssetSchema = z15.object({
6043
- text: z15.string().min(1),
6044
- pinnedField: z15.enum(PINNED_FIELDS).optional()
6072
+ var adTextAssetSchema = z16.object({
6073
+ text: z16.string().min(1),
6074
+ pinnedField: z16.enum(PINNED_FIELDS).optional()
6045
6075
  });
6046
- var responsiveSearchAdSchema = z15.strictObject({
6047
- format: z15.literal("responsiveSearch"),
6048
- headlines: z15.array(
6076
+ var responsiveSearchAdSchema = z16.strictObject({
6077
+ format: z16.literal("responsiveSearch"),
6078
+ headlines: z16.array(
6049
6079
  adTextAssetSchema.refine(
6050
6080
  (a) => a.text.length <= GOOGLE_ADS_LIMITS.responsiveSearchAd.headlineTextMax,
6051
6081
  "headline exceeds 30 chars"
6052
6082
  )
6053
6083
  ).min(GOOGLE_ADS_LIMITS.responsiveSearchAd.headlinesMin).max(GOOGLE_ADS_LIMITS.responsiveSearchAd.headlinesMax),
6054
- descriptions: z15.array(
6084
+ descriptions: z16.array(
6055
6085
  adTextAssetSchema.refine(
6056
6086
  (a) => a.text.length <= GOOGLE_ADS_LIMITS.responsiveSearchAd.descriptionTextMax,
6057
6087
  "description exceeds 90 chars"
6058
6088
  )
6059
6089
  ).min(GOOGLE_ADS_LIMITS.responsiveSearchAd.descriptionsMin).max(GOOGLE_ADS_LIMITS.responsiveSearchAd.descriptionsMax),
6060
- path1: z15.string().max(GOOGLE_ADS_LIMITS.responsiveSearchAd.pathMax).optional(),
6061
- path2: z15.string().max(GOOGLE_ADS_LIMITS.responsiveSearchAd.pathMax).optional(),
6062
- finalUrls: z15.array(httpsUrlSchema2).min(1)
6063
- });
6064
- var responsiveDisplayAdSchema = z15.strictObject({
6065
- format: z15.literal("responsiveDisplay"),
6066
- headlines: z15.array(z15.object({ text: z15.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.headlineTextMax) })).min(1).max(5),
6067
- longHeadline: z15.object({ text: z15.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.longHeadlineTextMax) }),
6068
- descriptions: z15.array(z15.object({ text: z15.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.descriptionTextMax) })).min(1).max(5),
6069
- businessName: z15.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.businessNameMax),
6090
+ path1: z16.string().max(GOOGLE_ADS_LIMITS.responsiveSearchAd.pathMax).optional(),
6091
+ path2: z16.string().max(GOOGLE_ADS_LIMITS.responsiveSearchAd.pathMax).optional(),
6092
+ finalUrls: z16.array(httpsUrlSchema2).min(1)
6093
+ });
6094
+ var responsiveDisplayAdSchema = z16.strictObject({
6095
+ format: z16.literal("responsiveDisplay"),
6096
+ headlines: z16.array(z16.object({ text: z16.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.headlineTextMax) })).min(1).max(5),
6097
+ longHeadline: z16.object({ text: z16.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.longHeadlineTextMax) }),
6098
+ descriptions: z16.array(z16.object({ text: z16.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.descriptionTextMax) })).min(1).max(5),
6099
+ businessName: z16.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.businessNameMax),
6070
6100
  // A Responsive Display Ad's images are fields on the ad's own content (never campaign-level
6071
6101
  // asset links). Google requires ≥1 landscape marketing image (1.91:1) AND ≥1 square marketing
6072
6102
  // image (1:1) to serve; the logo images are optional.
6073
- marketingImageAssets: z15.array(refSchema).optional(),
6074
- squareMarketingImageAssets: z15.array(refSchema).optional(),
6075
- logoImageAssets: z15.array(refSchema).optional(),
6076
- finalUrls: z15.array(httpsUrlSchema2).min(1)
6077
- });
6078
- var callAdSchema = z15.strictObject({
6079
- format: z15.literal("call"),
6080
- countryCode: z15.string().length(2),
6081
- phoneNumber: z15.string().min(3),
6082
- headline1: z15.string().min(1).max(30),
6083
- headline2: z15.string().min(1).max(30),
6084
- description1: z15.string().min(1).max(90),
6085
- description2: z15.string().min(1).max(90),
6086
- businessName: z15.string().min(1).max(25),
6087
- finalUrls: z15.array(httpsUrlSchema2).min(1)
6088
- });
6089
- var appAdSchema = z15.strictObject({
6090
- format: z15.literal("app"),
6091
- headlines: z15.array(z15.object({ text: z15.string().min(1).max(GOOGLE_ADS_LIMITS.appAd.headlineTextMax) })).min(GOOGLE_ADS_LIMITS.appAd.headlinesMin).max(GOOGLE_ADS_LIMITS.appAd.headlinesMax),
6092
- descriptions: z15.array(z15.object({ text: z15.string().min(1).max(GOOGLE_ADS_LIMITS.appAd.descriptionTextMax) })).min(GOOGLE_ADS_LIMITS.appAd.descriptionsMin).max(GOOGLE_ADS_LIMITS.appAd.descriptionsMax),
6103
+ marketingImageAssets: z16.array(refSchema).optional(),
6104
+ squareMarketingImageAssets: z16.array(refSchema).optional(),
6105
+ logoImageAssets: z16.array(refSchema).optional(),
6106
+ finalUrls: z16.array(httpsUrlSchema2).min(1)
6107
+ });
6108
+ var callAdSchema = z16.strictObject({
6109
+ format: z16.literal("call"),
6110
+ countryCode: z16.string().length(2),
6111
+ phoneNumber: z16.string().min(3),
6112
+ headline1: z16.string().min(1).max(30),
6113
+ headline2: z16.string().min(1).max(30),
6114
+ description1: z16.string().min(1).max(90),
6115
+ description2: z16.string().min(1).max(90),
6116
+ businessName: z16.string().min(1).max(25),
6117
+ finalUrls: z16.array(httpsUrlSchema2).min(1)
6118
+ });
6119
+ var appAdSchema = z16.strictObject({
6120
+ format: z16.literal("app"),
6121
+ headlines: z16.array(z16.object({ text: z16.string().min(1).max(GOOGLE_ADS_LIMITS.appAd.headlineTextMax) })).min(GOOGLE_ADS_LIMITS.appAd.headlinesMin).max(GOOGLE_ADS_LIMITS.appAd.headlinesMax),
6122
+ descriptions: z16.array(z16.object({ text: z16.string().min(1).max(GOOGLE_ADS_LIMITS.appAd.descriptionTextMax) })).min(GOOGLE_ADS_LIMITS.appAd.descriptionsMin).max(GOOGLE_ADS_LIMITS.appAd.descriptionsMax),
6093
6123
  // An App campaign ad carries its images on its own content (`AppAdInfo.images`), not as
6094
6124
  // campaign-level asset links — same shape as a responsive display ad's marketing images.
6095
- images: z15.array(refSchema).max(GOOGLE_ADS_LIMITS.appAd.imagesMax).optional(),
6125
+ images: z16.array(refSchema).max(GOOGLE_ADS_LIMITS.appAd.imagesMax).optional(),
6096
6126
  // `AppAdInfo.youtube_videos` — an App ad's videos live on its content too. Without this field
6097
6127
  // there is no way to express "keep these videos on the ad", so a content update that only
6098
6128
  // restated headlines silently left the ad's videos to whatever the mask happened to omit.
6099
- youtubeVideos: z15.array(refSchema).max(GOOGLE_ADS_LIMITS.appAd.youtubeVideosMax).optional()
6129
+ youtubeVideos: z16.array(refSchema).max(GOOGLE_ADS_LIMITS.appAd.youtubeVideosMax).optional()
6100
6130
  });
6101
- var videoAdSchema = z15.strictObject({
6102
- format: z15.literal("video"),
6131
+ var videoAdSchema = z16.strictObject({
6132
+ format: z16.literal("video"),
6103
6133
  // A raw YouTube id is not a publishable Google Ads reference — the video must be staged as
6104
6134
  // its own `google.asset.create` (type: youtubeVideo) first, then referenced here by asset ref.
6105
- videoAssets: z15.array(refSchema).min(1),
6106
- finalUrls: z15.array(httpsUrlSchema2).min(1)
6107
- });
6108
- var demandGenAdSchema = z15.strictObject({
6109
- format: z15.literal("demandGen"),
6110
- headlines: z15.array(z15.object({ text: z15.string().min(1).max(40) })).min(1).max(5),
6111
- descriptions: z15.array(z15.object({ text: z15.string().min(1).max(90) })).min(1).max(5),
6112
- businessName: z15.string().min(1).max(25),
6113
- finalUrls: z15.array(httpsUrlSchema2).min(1),
6114
- imageAssets: z15.array(refSchema).optional(),
6115
- squareImageAssets: z15.array(refSchema).optional(),
6116
- logoImageAssets: z15.array(refSchema).optional()
6117
- });
6118
- var adContentSchema2 = z15.discriminatedUnion("format", [
6135
+ videoAssets: z16.array(refSchema).min(1),
6136
+ finalUrls: z16.array(httpsUrlSchema2).min(1)
6137
+ });
6138
+ var demandGenAdSchema = z16.strictObject({
6139
+ format: z16.literal("demandGen"),
6140
+ headlines: z16.array(z16.object({ text: z16.string().min(1).max(40) })).min(1).max(5),
6141
+ descriptions: z16.array(z16.object({ text: z16.string().min(1).max(90) })).min(1).max(5),
6142
+ businessName: z16.string().min(1).max(25),
6143
+ finalUrls: z16.array(httpsUrlSchema2).min(1),
6144
+ imageAssets: z16.array(refSchema).optional(),
6145
+ squareImageAssets: z16.array(refSchema).optional(),
6146
+ logoImageAssets: z16.array(refSchema).optional()
6147
+ });
6148
+ var adContentSchema2 = z16.discriminatedUnion("format", [
6119
6149
  responsiveSearchAdSchema,
6120
6150
  responsiveDisplayAdSchema,
6121
6151
  callAdSchema,
@@ -6123,56 +6153,56 @@ var adContentSchema2 = z15.discriminatedUnion("format", [
6123
6153
  videoAdSchema,
6124
6154
  demandGenAdSchema
6125
6155
  ]);
6126
- var adCreateSchema = z15.object({
6156
+ var adCreateSchema = z16.object({
6127
6157
  adGroup: refSchema,
6128
6158
  status: stageableStatusSchema2.default("PAUSED"),
6129
6159
  content: adContentSchema2
6130
6160
  });
6131
- var adUpdateSchema = z15.object({
6132
- status: z15.enum(["ENABLED", "PAUSED", "REMOVED"]).optional(),
6161
+ var adUpdateSchema = z16.object({
6162
+ status: z16.enum(["ENABLED", "PAUSED", "REMOVED"]).optional(),
6133
6163
  /** Whole-content replacement for RSA-like formats; re-validated against adContentSchema. */
6134
- content: z15.record(z15.string(), z15.unknown()).optional()
6164
+ content: z16.record(z16.string(), z16.unknown()).optional()
6135
6165
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
6136
- var textAssetSchema = z15.object({ type: z15.literal("text"), text: z15.string().min(1) });
6137
- var imageAssetSchema = z15.object({
6138
- type: z15.literal("image"),
6139
- imageId: z15.string().min(1),
6140
- name: z15.string().optional()
6141
- });
6142
- var youtubeVideoAssetSchema = z15.object({
6143
- type: z15.literal("youtubeVideo"),
6144
- youtubeVideoId: z15.string().min(1),
6145
- name: z15.string().optional()
6146
- });
6147
- var sitelinkAssetSchema = z15.object({
6148
- type: z15.literal("sitelink"),
6149
- linkText: z15.string().min(1).max(GOOGLE_ADS_LIMITS.asset.sitelinkLinkTextMax),
6150
- description1: z15.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
6151
- description2: z15.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
6152
- finalUrls: z15.array(httpsUrlSchema2).min(1)
6153
- });
6154
- var calloutAssetSchema = z15.object({
6155
- type: z15.literal("callout"),
6156
- calloutText: z15.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax)
6157
- });
6158
- var structuredSnippetHeaderSchema = z15.string().min(1).transform((header, ctx) => {
6166
+ var textAssetSchema = z16.object({ type: z16.literal("text"), text: z16.string().min(1) });
6167
+ var imageAssetSchema = z16.object({
6168
+ type: z16.literal("image"),
6169
+ imageId: z16.string().min(1),
6170
+ name: z16.string().optional()
6171
+ });
6172
+ var youtubeVideoAssetSchema = z16.object({
6173
+ type: z16.literal("youtubeVideo"),
6174
+ youtubeVideoId: z16.string().min(1),
6175
+ name: z16.string().optional()
6176
+ });
6177
+ var sitelinkAssetSchema = z16.object({
6178
+ type: z16.literal("sitelink"),
6179
+ linkText: z16.string().min(1).max(GOOGLE_ADS_LIMITS.asset.sitelinkLinkTextMax),
6180
+ description1: z16.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
6181
+ description2: z16.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
6182
+ finalUrls: z16.array(httpsUrlSchema2).min(1)
6183
+ });
6184
+ var calloutAssetSchema = z16.object({
6185
+ type: z16.literal("callout"),
6186
+ calloutText: z16.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax)
6187
+ });
6188
+ var structuredSnippetHeaderSchema = z16.string().min(1).transform((header, ctx) => {
6159
6189
  const canonical2 = canonicalStructuredSnippetHeader(header);
6160
6190
  if (!canonical2) {
6161
6191
  ctx.addIssue({
6162
6192
  code: "custom",
6163
6193
  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.`
6164
6194
  });
6165
- return z15.NEVER;
6195
+ return z16.NEVER;
6166
6196
  }
6167
6197
  return canonical2;
6168
6198
  });
6169
- var structuredSnippetAssetSchema = z15.object({
6170
- type: z15.literal("structuredSnippet"),
6199
+ var structuredSnippetAssetSchema = z16.object({
6200
+ type: z16.literal("structuredSnippet"),
6171
6201
  header: structuredSnippetHeaderSchema,
6172
- values: z15.array(z15.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax)
6202
+ values: z16.array(z16.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax)
6173
6203
  });
6174
- var callToActionAssetSchema = z15.object({ type: z15.literal("callToAction"), callToAction: z15.string().min(1) });
6175
- var assetCreateSchema = z15.discriminatedUnion("type", [
6204
+ var callToActionAssetSchema = z16.object({ type: z16.literal("callToAction"), callToAction: z16.string().min(1) });
6205
+ var assetCreateSchema = z16.discriminatedUnion("type", [
6176
6206
  textAssetSchema,
6177
6207
  imageAssetSchema,
6178
6208
  youtubeVideoAssetSchema,
@@ -6181,80 +6211,80 @@ var assetCreateSchema = z15.discriminatedUnion("type", [
6181
6211
  structuredSnippetAssetSchema,
6182
6212
  callToActionAssetSchema
6183
6213
  ]);
6184
- var assetUpdateSchema = z15.object({
6185
- name: z15.string().min(1).optional(),
6186
- linkText: z15.string().min(1).max(GOOGLE_ADS_LIMITS.asset.sitelinkLinkTextMax).optional(),
6187
- description1: z15.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
6188
- description2: z15.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
6189
- finalUrls: z15.array(httpsUrlSchema2).min(1).optional(),
6190
- calloutText: z15.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax).optional(),
6214
+ var assetUpdateSchema = z16.object({
6215
+ name: z16.string().min(1).optional(),
6216
+ linkText: z16.string().min(1).max(GOOGLE_ADS_LIMITS.asset.sitelinkLinkTextMax).optional(),
6217
+ description1: z16.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
6218
+ description2: z16.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
6219
+ finalUrls: z16.array(httpsUrlSchema2).min(1).optional(),
6220
+ calloutText: z16.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax).optional(),
6191
6221
  header: structuredSnippetHeaderSchema.optional(),
6192
- values: z15.array(z15.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax).optional(),
6193
- callToAction: z15.string().min(1).optional(),
6194
- text: z15.string().min(1).optional()
6222
+ values: z16.array(z16.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax).optional(),
6223
+ callToAction: z16.string().min(1).optional(),
6224
+ text: z16.string().min(1).optional()
6195
6225
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
6196
- var assetLinkAttachSchema = z15.object({
6197
- level: z15.enum(["campaign", "adGroup", "customer"]),
6226
+ var assetLinkAttachSchema = z16.object({
6227
+ level: z16.enum(["campaign", "adGroup", "customer"]),
6198
6228
  parent: refSchema.optional(),
6199
6229
  asset: refSchema,
6200
- fieldType: z15.enum(ASSET_FIELD_TYPES)
6230
+ fieldType: z16.enum(ASSET_FIELD_TYPES)
6201
6231
  }).superRefine((value, ctx) => {
6202
6232
  if (value.level !== "customer" && !value.parent) {
6203
6233
  ctx.addIssue({
6204
- code: z15.ZodIssueCode.custom,
6234
+ code: z16.ZodIssueCode.custom,
6205
6235
  path: ["parent"],
6206
6236
  message: `parent is required for a ${value.level}-level asset link (--parent-ref)`
6207
6237
  });
6208
6238
  }
6209
6239
  });
6210
- var assetGroupCreateSchema = z15.object({
6240
+ var assetGroupCreateSchema = z16.object({
6211
6241
  campaign: refSchema,
6212
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.nameMax),
6213
- finalUrls: z15.array(httpsUrlSchema2).min(1),
6214
- headlines: z15.array(z15.object({ text: z15.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.headlineTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.headlinesMin).max(GOOGLE_ADS_LIMITS.assetGroup.headlinesMax),
6215
- longHeadlines: z15.array(z15.object({ text: z15.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.longHeadlineTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.longHeadlinesMin).max(GOOGLE_ADS_LIMITS.assetGroup.longHeadlinesMax),
6216
- descriptions: z15.array(z15.object({ text: z15.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.descriptionTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.descriptionsMin).max(GOOGLE_ADS_LIMITS.assetGroup.descriptionsMax),
6217
- businessName: z15.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.businessNameMax),
6218
- imageAssets: z15.array(refSchema).optional(),
6219
- squareImageAssets: z15.array(refSchema).optional(),
6220
- portraitImageAssets: z15.array(refSchema).optional(),
6221
- logoAssets: z15.array(refSchema).optional(),
6222
- status: z15.enum(["ENABLED", "PAUSED"]).default("PAUSED")
6223
- });
6224
- var assetGroupAssetAttachSchema = z15.object({
6242
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.nameMax),
6243
+ finalUrls: z16.array(httpsUrlSchema2).min(1),
6244
+ headlines: z16.array(z16.object({ text: z16.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.headlineTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.headlinesMin).max(GOOGLE_ADS_LIMITS.assetGroup.headlinesMax),
6245
+ longHeadlines: z16.array(z16.object({ text: z16.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.longHeadlineTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.longHeadlinesMin).max(GOOGLE_ADS_LIMITS.assetGroup.longHeadlinesMax),
6246
+ descriptions: z16.array(z16.object({ text: z16.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.descriptionTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.descriptionsMin).max(GOOGLE_ADS_LIMITS.assetGroup.descriptionsMax),
6247
+ businessName: z16.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.businessNameMax),
6248
+ imageAssets: z16.array(refSchema).optional(),
6249
+ squareImageAssets: z16.array(refSchema).optional(),
6250
+ portraitImageAssets: z16.array(refSchema).optional(),
6251
+ logoAssets: z16.array(refSchema).optional(),
6252
+ status: z16.enum(["ENABLED", "PAUSED"]).default("PAUSED")
6253
+ });
6254
+ var assetGroupAssetAttachSchema = z16.object({
6225
6255
  assetGroup: refSchema,
6226
6256
  asset: refSchema,
6227
- fieldType: z15.enum(ASSET_GROUP_ASSET_FIELD_TYPES)
6257
+ fieldType: z16.enum(ASSET_GROUP_ASSET_FIELD_TYPES)
6228
6258
  });
6229
- var assetGroupUpdateSchema = z15.object({
6230
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.nameMax).optional(),
6231
- finalUrls: z15.array(httpsUrlSchema2).min(1).optional(),
6232
- status: z15.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
6259
+ var assetGroupUpdateSchema = z16.object({
6260
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.nameMax).optional(),
6261
+ finalUrls: z16.array(httpsUrlSchema2).min(1).optional(),
6262
+ status: z16.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
6233
6263
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
6234
- var audienceCreateSchema2 = z15.object({
6235
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.audience.nameMax),
6236
- type: z15.enum(USER_LIST_TYPES).default("BASIC"),
6237
- description: z15.string().optional(),
6264
+ var audienceCreateSchema2 = z16.object({
6265
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.audience.nameMax),
6266
+ type: z16.enum(USER_LIST_TYPES).default("BASIC"),
6267
+ description: z16.string().optional(),
6238
6268
  /** Customer-match members (crm-based) — file-first for large lists. */
6239
- members: z15.array(z15.record(z15.string(), z15.string())).optional(),
6240
- sourceFileRef: z15.string().optional()
6269
+ members: z16.array(z16.record(z16.string(), z16.string())).optional(),
6270
+ sourceFileRef: z16.string().optional()
6241
6271
  });
6242
- var audienceCriterionAttachSchema = z15.object({
6243
- level: z15.enum(["campaign", "adGroup"]),
6272
+ var audienceCriterionAttachSchema = z16.object({
6273
+ level: z16.enum(["campaign", "adGroup"]),
6244
6274
  parent: refSchema,
6245
6275
  userList: refSchema,
6246
- negative: z15.boolean().default(false)
6276
+ negative: z16.boolean().default(false)
6247
6277
  });
6248
- var conversionActionCreateSchema = z15.object({
6249
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.conversionAction.nameMax),
6250
- type: z15.enum(CONVERSION_ACTION_TYPES).optional(),
6251
- category: z15.enum(CONVERSION_ACTION_CATEGORIES).optional(),
6252
- countingType: z15.enum(CONVERSION_COUNTING_TYPES).optional(),
6278
+ var conversionActionCreateSchema = z16.object({
6279
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.conversionAction.nameMax),
6280
+ type: z16.enum(CONVERSION_ACTION_TYPES).optional(),
6281
+ category: z16.enum(CONVERSION_ACTION_CATEGORIES).optional(),
6282
+ countingType: z16.enum(CONVERSION_COUNTING_TYPES).optional(),
6253
6283
  defaultValueMicros: microsSchema.optional(),
6254
- defaultCurrencyCode: z15.string().length(3).optional(),
6255
- clickThroughLookbackWindowDays: z15.number().int().positive().optional(),
6256
- viewThroughLookbackWindowDays: z15.number().int().positive().optional(),
6257
- status: z15.enum(["ENABLED", "PAUSED"]).optional(),
6284
+ defaultCurrencyCode: z16.string().length(3).optional(),
6285
+ clickThroughLookbackWindowDays: z16.number().int().positive().optional(),
6286
+ viewThroughLookbackWindowDays: z16.number().int().positive().optional(),
6287
+ status: z16.enum(["ENABLED", "PAUSED"]).optional(),
6258
6288
  /**
6259
6289
  * Primary = Google bids toward this conversion; secondary = it is only reported ("Primary action
6260
6290
  * used for bidding optimization" / "Secondary action not used for bidding optimization" in the UI).
@@ -6264,17 +6294,17 @@ var conversionActionCreateSchema = z15.object({
6264
6294
  * exists yet to flip on a create, so a fixed resolved value is safe here in a way it would never be
6265
6295
  * on an update: joining bidding becomes an explicit `primaryForGoal: true`, never an accident.
6266
6296
  */
6267
- primaryForGoal: z15.boolean().optional()
6297
+ primaryForGoal: z16.boolean().optional()
6268
6298
  });
6269
6299
  var HIDDEN_CONVERSION_STATUS_ERROR = 'Google rejects status HIDDEN on every conversion action write ("the field\'s value is on a deny-list"), so it is not part of this contract. To stop automated bidding optimizing toward a conversion while it keeps measuring, demote it instead: `baker ads google conversions update --target <id> --no-primary`. To stop it counting altogether, use `status: "REMOVED"`. Pick one of those and carry on with the rest of the job.';
6270
- var conversionActionUpdateSchema = z15.object({
6271
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.conversionAction.nameMax).optional(),
6272
- category: z15.enum(CONVERSION_ACTION_CATEGORIES).optional(),
6273
- countingType: z15.enum(CONVERSION_COUNTING_TYPES).optional(),
6300
+ var conversionActionUpdateSchema = z16.object({
6301
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.conversionAction.nameMax).optional(),
6302
+ category: z16.enum(CONVERSION_ACTION_CATEGORIES).optional(),
6303
+ countingType: z16.enum(CONVERSION_COUNTING_TYPES).optional(),
6274
6304
  defaultValueMicros: microsSchema.optional(),
6275
- defaultCurrencyCode: z15.string().length(3).optional(),
6276
- clickThroughLookbackWindowDays: z15.number().int().positive().optional(),
6277
- viewThroughLookbackWindowDays: z15.number().int().positive().optional(),
6305
+ defaultCurrencyCode: z16.string().length(3).optional(),
6306
+ clickThroughLookbackWindowDays: z16.number().int().positive().optional(),
6307
+ viewThroughLookbackWindowDays: z16.number().int().positive().optional(),
6278
6308
  /**
6279
6309
  * `HIDDEN` is deliberately not writable. Google returns it — an action hidden long ago reads
6280
6310
  * back as HIDDEN, and every read path keeps it — but it is on the API's deny-list for a write:
@@ -6283,70 +6313,70 @@ var conversionActionUpdateSchema = z15.object({
6283
6313
  * obvious pick for an agent told to retire an action gently, and the whole cleanup published
6284
6314
  * nothing.
6285
6315
  */
6286
- status: z15.enum(["ENABLED", "REMOVED"], {
6316
+ status: z16.enum(["ENABLED", "REMOVED"], {
6287
6317
  error: (issue) => issue.input === "HIDDEN" ? HIDDEN_CONVERSION_STATUS_ERROR : void 0
6288
6318
  }).optional(),
6289
6319
  /** Promote to primary (bid toward it) or demote to secondary (report only). No default — an
6290
6320
  * update must never change an existing action's bidding role unless it was asked to. */
6291
- primaryForGoal: z15.boolean().optional()
6321
+ primaryForGoal: z16.boolean().optional()
6292
6322
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
6293
- var conversionGoalSetSchema = z15.object({
6294
- category: z15.enum(CONVERSION_ACTION_CATEGORIES),
6295
- origin: z15.enum(CONVERSION_ORIGINS),
6323
+ var conversionGoalSetSchema = z16.object({
6324
+ category: z16.enum(CONVERSION_ACTION_CATEGORIES),
6325
+ origin: z16.enum(CONVERSION_ORIGINS),
6296
6326
  /** True = conversions of this category/origin count toward automated bidding; false = reported only. */
6297
- biddable: z15.boolean()
6327
+ biddable: z16.boolean()
6298
6328
  });
6299
- var biddingStrategyCreateSchema = z15.object({
6300
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.biddingStrategy.nameMax),
6329
+ var biddingStrategyCreateSchema = z16.object({
6330
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.biddingStrategy.nameMax),
6301
6331
  config: biddingConfigSchema
6302
6332
  }).superRefine((p, ctx) => {
6303
6333
  if (p.config.type === "MANUAL_CPC") {
6304
6334
  ctx.addIssue({ code: "custom", path: ["config", "type"], message: "portfolio strategies cannot be Manual CPC" });
6305
6335
  }
6306
6336
  });
6307
- var biddingStrategyUpdateSchema = z15.object({
6308
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.biddingStrategy.nameMax).optional(),
6337
+ var biddingStrategyUpdateSchema = z16.object({
6338
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.biddingStrategy.nameMax).optional(),
6309
6339
  config: biddingConfigSchema.optional()
6310
6340
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
6311
- var labelCreateSchema = z15.object({
6312
- name: z15.string().min(1).max(GOOGLE_ADS_LIMITS.label.nameMax),
6313
- backgroundColor: z15.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
6314
- description: z15.string().optional()
6341
+ var labelCreateSchema = z16.object({
6342
+ name: z16.string().min(1).max(GOOGLE_ADS_LIMITS.label.nameMax),
6343
+ backgroundColor: z16.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
6344
+ description: z16.string().optional()
6315
6345
  });
6316
- var labelAttachSchema = z15.object({
6317
- level: z15.enum(["campaign", "adGroup", "ad"]),
6346
+ var labelAttachSchema = z16.object({
6347
+ level: z16.enum(["campaign", "adGroup", "ad"]),
6318
6348
  parent: refSchema,
6319
6349
  label: refSchema
6320
6350
  });
6321
- var locationCriterionSchema = z15.object({
6322
- criterionType: z15.literal("location"),
6323
- geoTargetConstant: z15.union([z15.string().regex(GEO_TARGET_CONSTANT_REGEX), z15.string().regex(NUMERIC_ID_REGEX2)])
6324
- });
6325
- var languageCriterionSchema = z15.object({
6326
- criterionType: z15.literal("language"),
6327
- languageConstant: z15.union([z15.string().regex(LANGUAGE_CONSTANT_REGEX), z15.string().regex(NUMERIC_ID_REGEX2)])
6328
- });
6329
- var adScheduleCriterionSchema = z15.object({
6330
- criterionType: z15.literal("adSchedule"),
6331
- dayOfWeek: z15.enum(DAYS_OF_WEEK),
6332
- startHour: z15.number().int().min(0).max(23),
6333
- startMinute: z15.enum(["ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).default("ZERO"),
6334
- endHour: z15.number().int().min(0).max(24),
6335
- endMinute: z15.enum(["ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).default("ZERO")
6336
- });
6337
- var deviceCriterionSchema = z15.object({
6338
- criterionType: z15.literal("device"),
6339
- device: z15.enum(DEVICE_TYPES),
6351
+ var locationCriterionSchema = z16.object({
6352
+ criterionType: z16.literal("location"),
6353
+ geoTargetConstant: z16.union([z16.string().regex(GEO_TARGET_CONSTANT_REGEX), z16.string().regex(NUMERIC_ID_REGEX2)])
6354
+ });
6355
+ var languageCriterionSchema = z16.object({
6356
+ criterionType: z16.literal("language"),
6357
+ languageConstant: z16.union([z16.string().regex(LANGUAGE_CONSTANT_REGEX), z16.string().regex(NUMERIC_ID_REGEX2)])
6358
+ });
6359
+ var adScheduleCriterionSchema = z16.object({
6360
+ criterionType: z16.literal("adSchedule"),
6361
+ dayOfWeek: z16.enum(DAYS_OF_WEEK),
6362
+ startHour: z16.number().int().min(0).max(23),
6363
+ startMinute: z16.enum(["ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).default("ZERO"),
6364
+ endHour: z16.number().int().min(0).max(24),
6365
+ endMinute: z16.enum(["ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).default("ZERO")
6366
+ });
6367
+ var deviceCriterionSchema = z16.object({
6368
+ criterionType: z16.literal("device"),
6369
+ device: z16.enum(DEVICE_TYPES),
6340
6370
  // Google's `CampaignCriterion.bid_modifier`: "The modifier must be in the range 0.1 - 10.0. Use 0
6341
6371
  // to opt out of a Device type." So 0 (exclude the device) and 0.1–10.0 are valid; the (0, 0.1) gap is not.
6342
- bidModifier: z15.number().min(0).max(10).optional().refine((v) => v === void 0 || v === 0 || v >= 0.1, {
6372
+ bidModifier: z16.number().min(0).max(10).optional().refine((v) => v === void 0 || v === 0 || v >= 0.1, {
6343
6373
  message: "bid modifier must be 0 (exclude the device) or between 0.1 and 10.0"
6344
6374
  })
6345
6375
  });
6346
- var campaignCriterionAddSchema = z15.object({
6376
+ var campaignCriterionAddSchema = z16.object({
6347
6377
  campaign: refSchema,
6348
- negative: z15.boolean().default(false),
6349
- criterion: z15.discriminatedUnion("criterionType", [
6378
+ negative: z16.boolean().default(false),
6379
+ criterion: z16.discriminatedUnion("criterionType", [
6350
6380
  locationCriterionSchema,
6351
6381
  languageCriterionSchema,
6352
6382
  adScheduleCriterionSchema,
@@ -6356,7 +6386,7 @@ var campaignCriterionAddSchema = z15.object({
6356
6386
  const c = val.criterion;
6357
6387
  if (c.criterionType === "adSchedule" && c.endHour === 24 && c.endMinute !== "ZERO") {
6358
6388
  ctx.addIssue({
6359
- code: z15.ZodIssueCode.custom,
6389
+ code: z16.ZodIssueCode.custom,
6360
6390
  message: "endHour 24 (midnight) cannot have a non-zero endMinute",
6361
6391
  path: ["criterion", "endMinute"]
6362
6392
  });
@@ -6411,17 +6441,17 @@ var GOOGLE_DRAFT_OP_KINDS = [
6411
6441
  "google.campaignCriterion.add",
6412
6442
  "google.campaignCriterion.remove"
6413
6443
  ];
6414
- var googleDraftOpKindSchema = z15.enum(GOOGLE_DRAFT_OP_KINDS);
6444
+ var googleDraftOpKindSchema = z16.enum(GOOGLE_DRAFT_OP_KINDS);
6415
6445
  function createOp2(kind, payload) {
6416
- return z15.object({ kind: z15.literal(kind), customerId: customerIdSchema, payload });
6446
+ return z16.object({ kind: z16.literal(kind), customerId: customerIdSchema, payload });
6417
6447
  }
6418
6448
  function updateOp2(kind, payload) {
6419
- return z15.object({ kind: z15.literal(kind), customerId: customerIdSchema, target: targetRefSchema, payload });
6449
+ return z16.object({ kind: z16.literal(kind), customerId: customerIdSchema, target: targetRefSchema, payload });
6420
6450
  }
6421
6451
  function targetOp(kind) {
6422
- return z15.object({ kind: z15.literal(kind), customerId: customerIdSchema, target: targetRefSchema });
6452
+ return z16.object({ kind: z16.literal(kind), customerId: customerIdSchema, target: targetRefSchema });
6423
6453
  }
6424
- var googleDraftOpInputSchema = z15.discriminatedUnion("kind", [
6454
+ var googleDraftOpInputSchema = z16.discriminatedUnion("kind", [
6425
6455
  createOp2("google.budget.create", budgetCreateSchema),
6426
6456
  updateOp2("google.budget.update", budgetUpdateSchema),
6427
6457
  createOp2("google.campaign.create", campaignCreateSchema2),
@@ -6472,48 +6502,48 @@ var googleDraftOpInputSchema = z15.discriminatedUnion("kind", [
6472
6502
  ]);
6473
6503
 
6474
6504
  // ../api/src/ads-google/url-options.ts
6475
- import { z as z16 } from "zod";
6505
+ import { z as z17 } from "zod";
6476
6506
  var URL_OPTION_LEVELS = ["account", "campaign", "ad_group", "ad"];
6477
- var googleUrlOptionValueSchema = z16.discriminatedUnion("state", [
6478
- z16.object({ state: z16.literal("set"), value: z16.string() }),
6479
- z16.object({ state: z16.literal("not_set") }),
6480
- z16.object({ state: z16.literal("not_read"), reason: z16.string() })
6507
+ var googleUrlOptionValueSchema = z17.discriminatedUnion("state", [
6508
+ z17.object({ state: z17.literal("set"), value: z17.string() }),
6509
+ z17.object({ state: z17.literal("not_set") }),
6510
+ z17.object({ state: z17.literal("not_read"), reason: z17.string() })
6481
6511
  ]);
6482
- var googleUrlOptionsRequestSchema = z16.object({
6483
- customerId: z16.string().regex(NUMERIC_ID_REGEX2, "customerId must be the bare numeric customer id"),
6484
- managerId: z16.string().optional(),
6512
+ var googleUrlOptionsRequestSchema = z17.object({
6513
+ customerId: z17.string().regex(NUMERIC_ID_REGEX2, "customerId must be the bare numeric customer id"),
6514
+ managerId: z17.string().optional(),
6485
6515
  /** Compact by default: only campaigns that actually override the account. `full` lists every campaign. */
6486
- full: z16.boolean().optional(),
6487
- skipCache: z16.boolean().optional()
6516
+ full: z17.boolean().optional(),
6517
+ skipCache: z17.boolean().optional()
6488
6518
  });
6489
- var googleUrlOptionsCampaignSchema = z16.object({
6490
- id: z16.string(),
6491
- name: z16.string(),
6492
- status: z16.string(),
6519
+ var googleUrlOptionsCampaignSchema = z17.object({
6520
+ id: z17.string(),
6521
+ name: z17.string(),
6522
+ status: z17.string(),
6493
6523
  final_url_suffix: googleUrlOptionValueSchema,
6494
6524
  tracking_url_template: googleUrlOptionValueSchema
6495
6525
  });
6496
- var googleUrlOptionsResponseSchema = z16.object({
6497
- customer_id: z16.string(),
6498
- account: z16.object({
6499
- level: z16.literal("account"),
6500
- read: z16.boolean(),
6526
+ var googleUrlOptionsResponseSchema = z17.object({
6527
+ customer_id: z17.string(),
6528
+ account: z17.object({
6529
+ level: z17.literal("account"),
6530
+ read: z17.boolean(),
6501
6531
  final_url_suffix: googleUrlOptionValueSchema,
6502
6532
  tracking_url_template: googleUrlOptionValueSchema
6503
6533
  }),
6504
- campaigns: z16.object({
6505
- level: z16.literal("campaign"),
6506
- read: z16.boolean(),
6534
+ campaigns: z17.object({
6535
+ level: z17.literal("campaign"),
6536
+ read: z17.boolean(),
6507
6537
  /** Campaigns actually observed. 0 with `read: true` means the account has no non-removed campaigns. */
6508
- campaigns_read: z16.number().int().nonnegative(),
6538
+ campaigns_read: z17.number().int().nonnegative(),
6509
6539
  /** Campaigns observed to carry no override of their own — an explicit finding, not an omission. */
6510
- campaigns_without_override: z16.number().int().nonnegative(),
6511
- overrides: z16.array(googleUrlOptionsCampaignSchema),
6540
+ campaigns_without_override: z17.number().int().nonnegative(),
6541
+ overrides: z17.array(googleUrlOptionsCampaignSchema),
6512
6542
  /** Compact mode only: campaigns read but not listed because they carry no override. */
6513
- omitted: z16.number().int().nonnegative()
6543
+ omitted: z17.number().int().nonnegative()
6514
6544
  }),
6515
6545
  /** Levels this command never queried. Nothing here may be reported as "not configured". */
6516
- levels_not_read: z16.array(z16.object({ level: z16.enum(URL_OPTION_LEVELS), reason: z16.string() }))
6546
+ levels_not_read: z17.array(z17.object({ level: z17.enum(URL_OPTION_LEVELS), reason: z17.string() }))
6517
6547
  });
6518
6548
  var ACCOUNT_URL_OPTIONS_LOCATION = "Google Ads UI \u2192 Admin \u2192 Account settings \u2192 Tracking (account-level tracking template and final URL suffix)";
6519
6549
  var ACCOUNT_URL_OPTIONS_NOT_STAGEABLE = "Account-level URL options are written by a different Google service than the one Baker's staged changes apply through, so they can't be staged or published from here.";
@@ -6558,149 +6588,149 @@ function urlOptionsHints(report) {
6558
6588
  }
6559
6589
 
6560
6590
  // ../api/src/ads-google/wire.ts
6561
- import { z as z17 } from "zod";
6562
- var googleWriteModeSchema = z17.enum(["live", "simulated"]);
6563
- var publishVerificationSchema = z17.object({
6564
- status: z17.enum(["confirmed", "unconfirmed", "drifted"]),
6565
- note: z17.string().optional(),
6566
- checkedAt: z17.number()
6567
- });
6568
- var googleDraftOpResultSchema = z17.object({
6569
- status: z17.enum(["applied", "simulated", "failed", "skipped"]),
6570
- resourceName: z17.string().optional(),
6571
- error: z17.string().optional(),
6572
- skippedBecause: z17.string().optional(),
6573
- executedAt: z17.number().optional(),
6591
+ import { z as z18 } from "zod";
6592
+ var googleWriteModeSchema = z18.enum(["live", "simulated"]);
6593
+ var publishVerificationSchema = z18.object({
6594
+ status: z18.enum(["confirmed", "unconfirmed", "drifted"]),
6595
+ note: z18.string().optional(),
6596
+ checkedAt: z18.number()
6597
+ });
6598
+ var googleDraftOpResultSchema = z18.object({
6599
+ status: z18.enum(["applied", "simulated", "failed", "skipped"]),
6600
+ resourceName: z18.string().optional(),
6601
+ error: z18.string().optional(),
6602
+ skippedBecause: z18.string().optional(),
6603
+ executedAt: z18.number().optional(),
6574
6604
  verification: publishVerificationSchema.optional()
6575
6605
  });
6576
- var googleDraftStageRequestSchema = z17.object({
6577
- chatId: z17.string(),
6606
+ var googleDraftStageRequestSchema = z18.object({
6607
+ chatId: z18.string(),
6578
6608
  op: googleDraftOpInputSchema
6579
6609
  });
6580
- var googleDraftStageResponseSchema = z17.discriminatedUnion("staged", [
6581
- z17.object({
6582
- staged: z17.literal(true),
6583
- ref: z17.string(),
6610
+ var googleDraftStageResponseSchema = z18.discriminatedUnion("staged", [
6611
+ z18.object({
6612
+ staged: z18.literal(true),
6613
+ ref: z18.string(),
6584
6614
  kind: googleDraftOpKindSchema,
6585
6615
  mode: googleWriteModeSchema,
6586
- dependsOn: z17.array(z17.string()),
6587
- summary: z17.string(),
6588
- warnings: z17.array(z17.string()),
6616
+ dependsOn: z18.array(z18.string()),
6617
+ summary: z18.string(),
6618
+ warnings: z18.array(z18.string()),
6589
6619
  /** True when the op amended an already-staged op in place instead of appending a new one. */
6590
- amended: z17.boolean().optional()
6620
+ amended: z18.boolean().optional()
6591
6621
  }),
6592
- z17.object({
6593
- staged: z17.literal(false),
6594
- noop: z17.literal(true),
6622
+ z18.object({
6623
+ staged: z18.literal(false),
6624
+ noop: z18.literal(true),
6595
6625
  kind: googleDraftOpKindSchema,
6596
6626
  mode: googleWriteModeSchema,
6597
- summary: z17.string(),
6598
- reason: z17.string()
6627
+ summary: z18.string(),
6628
+ reason: z18.string()
6599
6629
  })
6600
6630
  ]);
6601
- var googleDraftAmendRequestSchema = z17.object({
6602
- chatId: z17.string(),
6603
- ref: z17.string(),
6604
- patch: z17.record(z17.string(), z17.unknown())
6631
+ var googleDraftAmendRequestSchema = z18.object({
6632
+ chatId: z18.string(),
6633
+ ref: z18.string(),
6634
+ patch: z18.record(z18.string(), z18.unknown())
6605
6635
  });
6606
- var googleDraftShowRequestSchema = z17.object({
6607
- chatId: z17.string(),
6608
- ref: z17.string()
6636
+ var googleDraftShowRequestSchema = z18.object({
6637
+ chatId: z18.string(),
6638
+ ref: z18.string()
6609
6639
  });
6610
6640
  var GOOGLE_DRAFT_BATCH_MAX = 500;
6611
- var googleDraftStageBatchRequestSchema = z17.object({
6612
- chatId: z17.string(),
6613
- ops: z17.array(googleDraftOpInputSchema).min(1).max(GOOGLE_DRAFT_BATCH_MAX)
6641
+ var googleDraftStageBatchRequestSchema = z18.object({
6642
+ chatId: z18.string(),
6643
+ ops: z18.array(googleDraftOpInputSchema).min(1).max(GOOGLE_DRAFT_BATCH_MAX)
6614
6644
  });
6615
- var googleDraftStageBatchResponseSchema = z17.object({
6616
- staged: z17.literal(true),
6645
+ var googleDraftStageBatchResponseSchema = z18.object({
6646
+ staged: z18.literal(true),
6617
6647
  mode: googleWriteModeSchema,
6618
- count: z17.number(),
6619
- ops: z17.array(
6620
- z17.object({
6621
- ref: z17.string(),
6648
+ count: z18.number(),
6649
+ ops: z18.array(
6650
+ z18.object({
6651
+ ref: z18.string(),
6622
6652
  kind: googleDraftOpKindSchema,
6623
- dependsOn: z17.array(z17.string()),
6624
- summary: z17.string(),
6625
- warnings: z17.array(z17.string())
6653
+ dependsOn: z18.array(z18.string()),
6654
+ summary: z18.string(),
6655
+ warnings: z18.array(z18.string())
6626
6656
  })
6627
6657
  ),
6628
- skipped: z17.array(z17.object({ kind: googleDraftOpKindSchema, summary: z17.string(), reason: z17.string() })).optional()
6658
+ skipped: z18.array(z18.object({ kind: googleDraftOpKindSchema, summary: z18.string(), reason: z18.string() })).optional()
6629
6659
  });
6630
- var googleDraftOpViewSchema = z17.object({
6631
- ref: z17.string(),
6660
+ var googleDraftOpViewSchema = z18.object({
6661
+ ref: z18.string(),
6632
6662
  kind: googleDraftOpKindSchema,
6633
- customerId: z17.string(),
6634
- target: z17.string().optional(),
6635
- dependsOn: z17.array(z17.string()),
6636
- summary: z17.string(),
6637
- stagedAt: z17.number(),
6663
+ customerId: z18.string(),
6664
+ target: z18.string().optional(),
6665
+ dependsOn: z18.array(z18.string()),
6666
+ summary: z18.string(),
6667
+ stagedAt: z18.number(),
6638
6668
  result: googleDraftOpResultSchema.optional()
6639
6669
  });
6640
- var googleDraftShowResponseSchema = z17.object({
6670
+ var googleDraftShowResponseSchema = z18.object({
6641
6671
  op: googleDraftOpViewSchema.extend({
6642
- payload: z17.unknown().optional(),
6643
- warnings: z17.array(z17.string()).optional(),
6644
- annotations: z17.unknown().optional()
6672
+ payload: z18.unknown().optional(),
6673
+ warnings: z18.array(z18.string()).optional(),
6674
+ annotations: z18.unknown().optional()
6645
6675
  })
6646
6676
  });
6647
- var googleDraftListRequestSchema = z17.object({
6648
- chatId: z17.string()
6677
+ var googleDraftListRequestSchema = z18.object({
6678
+ chatId: z18.string()
6649
6679
  });
6650
- var googleDraftAdvisorySchema = z17.object({
6651
- scope: z17.enum(["campaign", "adGroup"]),
6652
- message: z17.string()
6680
+ var googleDraftAdvisorySchema = z18.object({
6681
+ scope: z18.enum(["campaign", "adGroup"]),
6682
+ message: z18.string()
6653
6683
  });
6654
- var googleDraftStatusCollectionSchema = z17.object({
6655
- label: z17.string(),
6656
- added: z17.number(),
6657
- removed: z17.number(),
6658
- existing: z17.number()
6684
+ var googleDraftStatusCollectionSchema = z18.object({
6685
+ label: z18.string(),
6686
+ added: z18.number(),
6687
+ removed: z18.number(),
6688
+ existing: z18.number()
6659
6689
  });
6660
- var googleDraftChangeOperationSchema = z17.enum(["create", "update", "pause", "resume", "remove"]);
6661
- var googleDraftStatusNodeSchema = z17.lazy(
6662
- () => z17.object({
6663
- entity: z17.string(),
6664
- name: z17.string(),
6690
+ var googleDraftChangeOperationSchema = z18.enum(["create", "update", "pause", "resume", "remove"]);
6691
+ var googleDraftStatusNodeSchema = z18.lazy(
6692
+ () => z18.object({
6693
+ entity: z18.string(),
6694
+ name: z18.string(),
6665
6695
  operation: googleDraftChangeOperationSchema.optional(),
6666
- existing: z17.boolean(),
6667
- collections: z17.array(googleDraftStatusCollectionSchema),
6668
- children: z17.array(googleDraftStatusNodeSchema),
6669
- warnings: z17.array(z17.string()).optional()
6696
+ existing: z18.boolean(),
6697
+ collections: z18.array(googleDraftStatusCollectionSchema),
6698
+ children: z18.array(googleDraftStatusNodeSchema),
6699
+ warnings: z18.array(z18.string()).optional()
6670
6700
  })
6671
6701
  );
6672
- var googleDraftListResponseSchema = z17.object({
6673
- status: z17.enum(["active", "publishing", "applied", "discarded", "none"]),
6702
+ var googleDraftListResponseSchema = z18.object({
6703
+ status: z18.enum(["active", "publishing", "applied", "discarded", "none"]),
6674
6704
  mode: googleWriteModeSchema,
6675
- count: z17.number(),
6676
- ops: z17.array(googleDraftOpViewSchema),
6705
+ count: z18.number(),
6706
+ ops: z18.array(googleDraftOpViewSchema),
6677
6707
  /** Grouped campaign ▸ ad group ▸ ad tree for the readable CLI status view. */
6678
- tree: z17.array(googleDraftStatusNodeSchema).optional(),
6708
+ tree: z18.array(googleDraftStatusNodeSchema).optional(),
6679
6709
  /** Non-blocking completeness advisories for the whole draft. */
6680
- advisories: z17.array(googleDraftAdvisorySchema).optional()
6710
+ advisories: z18.array(googleDraftAdvisorySchema).optional()
6681
6711
  });
6682
- var googleDraftRemoveRequestSchema = z17.object({
6683
- chatId: z17.string(),
6684
- ref: z17.string()
6712
+ var googleDraftRemoveRequestSchema = z18.object({
6713
+ chatId: z18.string(),
6714
+ ref: z18.string()
6685
6715
  });
6686
- var googleDraftRemoveResponseSchema = z17.object({
6716
+ var googleDraftRemoveResponseSchema = z18.object({
6687
6717
  /** The requested ref plus any dependents removed by cascade. */
6688
- removed: z17.array(z17.string())
6718
+ removed: z18.array(z18.string())
6689
6719
  });
6690
- var googleDraftClearRequestSchema = z17.object({
6691
- chatId: z17.string()
6720
+ var googleDraftClearRequestSchema = z18.object({
6721
+ chatId: z18.string()
6692
6722
  });
6693
- var googleDraftClearResponseSchema = z17.object({
6694
- cleared: z17.number()
6723
+ var googleDraftClearResponseSchema = z18.object({
6724
+ cleared: z18.number()
6695
6725
  });
6696
- var googleFieldErrorSchema = z17.object({
6697
- path: z17.string(),
6698
- message: z17.string()
6726
+ var googleFieldErrorSchema = z18.object({
6727
+ path: z18.string(),
6728
+ message: z18.string()
6699
6729
  });
6700
- var googleDraftErrorResponseSchema = z17.object({
6701
- code: z17.string(),
6702
- error: z17.string(),
6703
- fields: z17.array(googleFieldErrorSchema).optional()
6730
+ var googleDraftErrorResponseSchema = z18.object({
6731
+ code: z18.string(),
6732
+ error: z18.string(),
6733
+ fields: z18.array(googleFieldErrorSchema).optional()
6704
6734
  });
6705
6735
 
6706
6736
  // src/commands/ads/google/changes-window.ts
@@ -8122,11 +8152,11 @@ function rawTextEntries(value) {
8122
8152
  const values = Array.isArray(value) ? value : typeof value === "string" ? [value] : [];
8123
8153
  return values.filter((v) => typeof v === "string").flatMap((v) => v.split(",")).map((v) => v.trim()).filter(Boolean);
8124
8154
  }
8125
- function rawFileEntries(path28) {
8126
- if (typeof path28 !== "string" || path28.length === 0) {
8155
+ function rawFileEntries(path29) {
8156
+ if (typeof path29 !== "string" || path29.length === 0) {
8127
8157
  return [];
8128
8158
  }
8129
- return readFileSync2(path28, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
8159
+ return readFileSync2(path29, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
8130
8160
  }
8131
8161
  function keywordEntries(args) {
8132
8162
  const defaultMatch = typeof args["match-type"] === "string" ? args["match-type"].toUpperCase() : void 0;
@@ -8149,19 +8179,19 @@ function keywordEntries(args) {
8149
8179
  }
8150
8180
  return entries;
8151
8181
  }
8152
- function loadJsonFileArg(path28) {
8153
- if (typeof path28 !== "string" || path28.length === 0) {
8182
+ function loadJsonFileArg(path29) {
8183
+ if (typeof path29 !== "string" || path29.length === 0) {
8154
8184
  return {};
8155
8185
  }
8156
8186
  try {
8157
- const parsed = JSON.parse(readFileSync2(path28, "utf8"));
8187
+ const parsed = JSON.parse(readFileSync2(path29, "utf8"));
8158
8188
  if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
8159
- failWriteValidation(`${path28} must contain a JSON object`);
8189
+ failWriteValidation(`${path29} must contain a JSON object`);
8160
8190
  }
8161
8191
  return parsed;
8162
8192
  } catch (err) {
8163
8193
  if (err instanceof SyntaxError) {
8164
- failWriteValidation(`${path28} is not valid JSON: ${err.message}`);
8194
+ failWriteValidation(`${path29} is not valid JSON: ${err.message}`);
8165
8195
  }
8166
8196
  throw err;
8167
8197
  }
@@ -8291,10 +8321,10 @@ async function stageUpdate(kind, customerId, target, payload, hints) {
8291
8321
  async function stageTarget(kind, customerId, target, hints) {
8292
8322
  await stageGoogleOp({ kind, customerId, target }, hints);
8293
8323
  }
8294
- async function draftAction(path28, body, chat) {
8324
+ async function draftAction(path29, body, chat) {
8295
8325
  try {
8296
8326
  const chatId = resolveChatId(chat);
8297
- const response = await apiPost(path28, { chatId, ...body });
8327
+ const response = await apiPost(path29, { chatId, ...body });
8298
8328
  writeJsonEnvelope(response);
8299
8329
  } catch (err) {
8300
8330
  handleGoogleError(err);
@@ -9968,11 +9998,24 @@ function keywordFinalUrlHints(finalUrl, count) {
9968
9998
  return [];
9969
9999
  }
9970
10000
  return count > 1 ? [
9971
- `--final-url applied the same landing page to all ${count} keywords. A keyword-level URL only earns its place when that keyword must land somewhere the ad doesn't \u2014 one URL shared by every keyword belongs on the ad instead. Re-stage without --final-url unless the destinations genuinely differ per keyword, and set the ad's final URL to this page.`
10001
+ `--final-url applied the same landing page to all ${count} keywords \u2014 the flag has no per-keyword form. A keyword-level URL only earns its place when that keyword must land somewhere the ad doesn't, so one URL shared by every keyword belongs on the ad instead: set the ad's final URL to this page and re-stage the keywords without --final-url. Keep it only if this page is genuinely each keyword's own destination and not the ad's.`
9972
10002
  ] : [
9973
10003
  "Keep --final-url only if this keyword's destination differs from the ad's final URL \u2014 otherwise drop it and let the keyword inherit the ad's landing page."
9974
10004
  ];
9975
10005
  }
10006
+ function keywordUpdateFinalUrls(args) {
10007
+ const finalUrl = args["final-url"];
10008
+ const clear = args["clear-final-url"] === true;
10009
+ if (typeof finalUrl !== "string" || finalUrl.length === 0) {
10010
+ return clear ? [] : void 0;
10011
+ }
10012
+ if (clear) {
10013
+ failWriteValidation(
10014
+ "--clear-final-url sends the keyword back to the ad's landing page \u2014 pass it OR --final-url, not both"
10015
+ );
10016
+ }
10017
+ return [finalUrl];
10018
+ }
9976
10019
  var keywordWriteSubcommands = {
9977
10020
  add: defineCommand30({
9978
10021
  meta: { name: "add", description: "Add keyword(s) to an ad group \u2014 one --text or a whole batch" },
@@ -10009,15 +10052,28 @@ var keywordWriteSubcommands = {
10009
10052
  }),
10010
10053
  update: defineCommand30({
10011
10054
  meta: { name: "update", description: "Update a keyword" },
10012
- args: { ...customerIdArg, "cpc-bid": { type: "string" }, status: { type: "string" } },
10055
+ args: {
10056
+ ...customerIdArg,
10057
+ "cpc-bid": { type: "string" },
10058
+ status: { type: "string" },
10059
+ "final-url": {
10060
+ type: "string",
10061
+ description: "Rarely needed: send THIS keyword to a page the ad doesn't go to. Leave unset unless the destination is keyword-specific \u2014 otherwise set the ad's final URL"
10062
+ },
10063
+ "clear-final-url": {
10064
+ type: "boolean",
10065
+ description: "Drop this keyword's own landing page so it inherits the ad's again"
10066
+ }
10067
+ },
10013
10068
  run: async ({ args }) => {
10014
10069
  const customerId = requireCustomerId(args);
10070
+ const finalUrls = keywordUpdateFinalUrls(args);
10015
10071
  await stageUpdate(
10016
10072
  "google.keyword.update",
10017
10073
  customerId,
10018
10074
  requireTarget(args, "keyword"),
10019
- { cpcBidMicros: microsFlag(args["cpc-bid"], "--cpc-bid"), status: args.status },
10020
- keywordKillHints(args.status)
10075
+ { cpcBidMicros: microsFlag(args["cpc-bid"], "--cpc-bid"), status: args.status, finalUrls },
10076
+ [...keywordKillHints(args.status), ...keywordFinalUrlHints(args["final-url"], 1)]
10021
10077
  );
10022
10078
  }
10023
10079
  }),
@@ -10879,19 +10935,19 @@ function failWriteValidation2(message) {
10879
10935
  writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
10880
10936
  process.exit(1);
10881
10937
  }
10882
- function loadJsonFileArg2(path28) {
10883
- if (typeof path28 !== "string" || path28.length === 0) {
10938
+ function loadJsonFileArg2(path29) {
10939
+ if (typeof path29 !== "string" || path29.length === 0) {
10884
10940
  return {};
10885
10941
  }
10886
10942
  try {
10887
- const parsed = JSON.parse(readFileSync4(path28, "utf8"));
10943
+ const parsed = JSON.parse(readFileSync4(path29, "utf8"));
10888
10944
  if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
10889
- failWriteValidation2(`${path28} must contain a JSON object`);
10945
+ failWriteValidation2(`${path29} must contain a JSON object`);
10890
10946
  }
10891
10947
  return parsed;
10892
10948
  } catch (err) {
10893
10949
  if (err instanceof SyntaxError) {
10894
- failWriteValidation2(`${path28} is not valid JSON: ${err.message}`);
10950
+ failWriteValidation2(`${path29} is not valid JSON: ${err.message}`);
10895
10951
  }
10896
10952
  throw err;
10897
10953
  }
@@ -10976,15 +11032,15 @@ function parseLocaleFlag(value) {
10976
11032
  }
10977
11033
  return { language: match[1], country: match[2].toUpperCase() };
10978
11034
  }
10979
- function loadTargetingFileArg(path28) {
10980
- if (typeof path28 !== "string" || path28.length === 0) {
11035
+ function loadTargetingFileArg(path29) {
11036
+ if (typeof path29 !== "string" || path29.length === 0) {
10981
11037
  return void 0;
10982
11038
  }
10983
- const parsed = loadJsonFileArg2(path28);
11039
+ const parsed = loadJsonFileArg2(path29);
10984
11040
  const criteria = parsed.targetingCriteria ?? parsed;
10985
11041
  if (!criteria.include) {
10986
11042
  failWriteValidation2(
10987
- `${path28} must contain targeting criteria with an "include" block (see baker schema ads.linkedin.campaigns.create)`
11043
+ `${path29} must contain targeting criteria with an "include" block (see baker schema ads.linkedin.campaigns.create)`
10988
11044
  );
10989
11045
  }
10990
11046
  return criteria;
@@ -11019,14 +11075,14 @@ function parseCsvLine(line) {
11019
11075
  cells.push(current);
11020
11076
  return cells.map((cell) => cell.trim());
11021
11077
  }
11022
- function parseListFileArg(path28, maxRows) {
11023
- if (typeof path28 !== "string" || path28.length === 0) {
11078
+ function parseListFileArg(path29, maxRows) {
11079
+ if (typeof path29 !== "string" || path29.length === 0) {
11024
11080
  return void 0;
11025
11081
  }
11026
- const raw = readFileSync4(path28, "utf8");
11082
+ const raw = readFileSync4(path29, "utf8");
11027
11083
  const lines = raw.split(/\r?\n/).filter((line) => line.trim().length > 0);
11028
11084
  if (lines.length < 2) {
11029
- failWriteValidation2(`${path28} needs a header row and at least one data row`);
11085
+ failWriteValidation2(`${path29} needs a header row and at least one data row`);
11030
11086
  }
11031
11087
  const columns = parseCsvLine(lines[0]).map((column) => column.trim());
11032
11088
  const rows = [];
@@ -11045,7 +11101,7 @@ function parseListFileArg(path28, maxRows) {
11045
11101
  }
11046
11102
  }
11047
11103
  if (rows.length > maxRows) {
11048
- failWriteValidation2(`${path28} has ${rows.length} rows \u2014 the inline limit is ${maxRows}. Split the list.`);
11104
+ failWriteValidation2(`${path29} has ${rows.length} rows \u2014 the inline limit is ${maxRows}. Split the list.`);
11049
11105
  }
11050
11106
  return { columns, rows };
11051
11107
  }
@@ -11141,11 +11197,11 @@ function readPositionals(args) {
11141
11197
  function splitIdList(raw) {
11142
11198
  return raw.split(",").map((id) => id.trim()).filter(Boolean);
11143
11199
  }
11144
- function idsFileEntries(path28) {
11145
- if (typeof path28 !== "string" || path28.length === 0) {
11200
+ function idsFileEntries(path29) {
11201
+ if (typeof path29 !== "string" || path29.length === 0) {
11146
11202
  return [];
11147
11203
  }
11148
- return readFileSync4(path28, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#")).flatMap(splitIdList);
11204
+ return readFileSync4(path29, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#")).flatMap(splitIdList);
11149
11205
  }
11150
11206
  function requireTargets(args, entity) {
11151
11207
  const positionals = readPositionals(args);
@@ -13768,9 +13824,9 @@ function compactRow(row) {
13768
13824
  ...destination.postUrn ? { postUrn: destination.postUrn } : {}
13769
13825
  };
13770
13826
  }
13771
- function readPath(row, path28) {
13827
+ function readPath(row, path29) {
13772
13828
  let current = row;
13773
- for (const segment of path28.split(".")) {
13829
+ for (const segment of path29.split(".")) {
13774
13830
  const record = asRecord2(current);
13775
13831
  if (!record) return void 0;
13776
13832
  current = record[segment];
@@ -13780,10 +13836,10 @@ function readPath(row, path28) {
13780
13836
  function projectFields(rows, paths) {
13781
13837
  return rows.map((row) => {
13782
13838
  const projected = {};
13783
- for (const path28 of paths) {
13784
- const value = readPath(row, path28);
13839
+ for (const path29 of paths) {
13840
+ const value = readPath(row, path29);
13785
13841
  if (value !== void 0) {
13786
- projected[path28] = value;
13842
+ projected[path29] = value;
13787
13843
  }
13788
13844
  }
13789
13845
  return projected;
@@ -14976,57 +15032,57 @@ var NUMERIC_ID_REGEX3 = /^\d+$/;
14976
15032
  var IMAGE_HASH_REGEX = /^[A-Fa-f0-9]{16,}$/;
14977
15033
 
14978
15034
  // ../api/src/ads-meta/ops.ts
14979
- import { z as z18 } from "zod";
14980
- var tempRefSchema3 = z18.string().regex(TEMP_REF_REGEX3, "expected a meta_temp_* reference");
14981
- var parentRefSchema2 = z18.union([z18.string().regex(NUMERIC_ID_REGEX3, "expected a numeric id"), tempRefSchema3]);
14982
- var moneySchema2 = z18.object({
14983
- amount: z18.string().regex(/^\d+(\.\d{1,2})?$/, "expected a decimal amount like 50 or 50.00").refine((val) => Number(val) > 0, "amount must be greater than zero"),
14984
- currencyCode: z18.string().length(3).optional()
14985
- });
14986
- var httpsUrlSchema3 = z18.string().url().refine((u) => u.startsWith("https://"), "destination URLs must be https");
14987
- var bakerMediaIdSchema2 = z18.string().min(1);
14988
- var stageableStatusSchema3 = z18.enum(STAGEABLE_CREATE_STATUSES3);
14989
- var updateStatusSchema = z18.enum(UPDATE_STATUSES);
15035
+ import { z as z19 } from "zod";
15036
+ var tempRefSchema3 = z19.string().regex(TEMP_REF_REGEX3, "expected a meta_temp_* reference");
15037
+ var parentRefSchema2 = z19.union([z19.string().regex(NUMERIC_ID_REGEX3, "expected a numeric id"), tempRefSchema3]);
15038
+ var moneySchema2 = z19.object({
15039
+ amount: z19.string().regex(/^\d+(\.\d{1,2})?$/, "expected a decimal amount like 50 or 50.00").refine((val) => Number(val) > 0, "amount must be greater than zero"),
15040
+ currencyCode: z19.string().length(3).optional()
15041
+ });
15042
+ var httpsUrlSchema3 = z19.string().url().refine((u) => u.startsWith("https://"), "destination URLs must be https");
15043
+ var bakerMediaIdSchema2 = z19.string().min(1);
15044
+ var stageableStatusSchema3 = z19.enum(STAGEABLE_CREATE_STATUSES3);
15045
+ var updateStatusSchema = z19.enum(UPDATE_STATUSES);
14990
15046
  function currencyMinimums2(currencyCode) {
14991
15047
  return CURRENCY_MINIMUMS2[currencyCode] ?? DEFAULT_CURRENCY_MINIMUM2;
14992
15048
  }
14993
- function validateDailyBudgetFloor(money, ctx, path28) {
15049
+ function validateDailyBudgetFloor(money, ctx, path29) {
14994
15050
  if (money?.currencyCode) {
14995
15051
  const min = currencyMinimums2(money.currencyCode).dailyBudgetMin;
14996
15052
  if (Number(money.amount) < min) {
14997
- ctx.addIssue({ code: "custom", path: path28, message: `below the ${min} ${money.currencyCode} daily minimum` });
15053
+ ctx.addIssue({ code: "custom", path: path29, message: `below the ${min} ${money.currencyCode} daily minimum` });
14998
15054
  }
14999
15055
  }
15000
15056
  }
15001
- var geoLocationsSchema = z18.object({
15002
- countries: z18.array(z18.string().length(2)).optional(),
15003
- regions: z18.array(z18.object({ key: z18.string() })).optional(),
15004
- cities: z18.array(z18.object({ key: z18.string(), radius: z18.number().optional(), distance_unit: z18.string().optional() })).optional(),
15005
- zips: z18.array(z18.object({ key: z18.string() })).optional(),
15006
- location_types: z18.array(z18.string()).optional()
15007
- }).catchall(z18.unknown());
15008
- var idNameSchema = z18.object({ id: z18.string(), name: z18.string().optional() });
15009
- var metaTargetingSchema = z18.object({
15057
+ var geoLocationsSchema = z19.object({
15058
+ countries: z19.array(z19.string().length(2)).optional(),
15059
+ regions: z19.array(z19.object({ key: z19.string() })).optional(),
15060
+ cities: z19.array(z19.object({ key: z19.string(), radius: z19.number().optional(), distance_unit: z19.string().optional() })).optional(),
15061
+ zips: z19.array(z19.object({ key: z19.string() })).optional(),
15062
+ location_types: z19.array(z19.string()).optional()
15063
+ }).catchall(z19.unknown());
15064
+ var idNameSchema = z19.object({ id: z19.string(), name: z19.string().optional() });
15065
+ var metaTargetingSchema = z19.object({
15010
15066
  geo_locations: geoLocationsSchema.optional(),
15011
15067
  excluded_geo_locations: geoLocationsSchema.optional(),
15012
- age_min: z18.number().int().min(13).max(65).optional(),
15013
- age_max: z18.number().int().min(13).max(65).optional(),
15014
- genders: z18.array(z18.union([z18.literal(1), z18.literal(2)])).optional(),
15015
- locales: z18.array(z18.number().int()).optional(),
15016
- interests: z18.array(idNameSchema).optional(),
15017
- behaviors: z18.array(idNameSchema).optional(),
15018
- custom_audiences: z18.array(z18.object({ id: parentRefSchema2 })).optional(),
15019
- excluded_custom_audiences: z18.array(z18.object({ id: parentRefSchema2 })).optional(),
15020
- flexible_spec: z18.array(z18.record(z18.string(), z18.unknown())).optional(),
15021
- exclusions: z18.record(z18.string(), z18.unknown()).optional(),
15022
- publisher_platforms: z18.array(z18.string()).optional(),
15023
- facebook_positions: z18.array(z18.string()).optional(),
15024
- instagram_positions: z18.array(z18.string()).optional(),
15025
- audience_network_positions: z18.array(z18.string()).optional(),
15026
- messenger_positions: z18.array(z18.string()).optional(),
15027
- device_platforms: z18.array(z18.string()).optional(),
15028
- targeting_automation: z18.object({ advantage_audience: z18.union([z18.literal(0), z18.literal(1)]) }).partial().optional()
15029
- }).catchall(z18.unknown());
15068
+ age_min: z19.number().int().min(13).max(65).optional(),
15069
+ age_max: z19.number().int().min(13).max(65).optional(),
15070
+ genders: z19.array(z19.union([z19.literal(1), z19.literal(2)])).optional(),
15071
+ locales: z19.array(z19.number().int()).optional(),
15072
+ interests: z19.array(idNameSchema).optional(),
15073
+ behaviors: z19.array(idNameSchema).optional(),
15074
+ custom_audiences: z19.array(z19.object({ id: parentRefSchema2 })).optional(),
15075
+ excluded_custom_audiences: z19.array(z19.object({ id: parentRefSchema2 })).optional(),
15076
+ flexible_spec: z19.array(z19.record(z19.string(), z19.unknown())).optional(),
15077
+ exclusions: z19.record(z19.string(), z19.unknown()).optional(),
15078
+ publisher_platforms: z19.array(z19.string()).optional(),
15079
+ facebook_positions: z19.array(z19.string()).optional(),
15080
+ instagram_positions: z19.array(z19.string()).optional(),
15081
+ audience_network_positions: z19.array(z19.string()).optional(),
15082
+ messenger_positions: z19.array(z19.string()).optional(),
15083
+ device_platforms: z19.array(z19.string()).optional(),
15084
+ targeting_automation: z19.object({ advantage_audience: z19.union([z19.literal(0), z19.literal(1)]) }).partial().optional()
15085
+ }).catchall(z19.unknown());
15030
15086
  var GEO_INCLUSION_KEYS = [
15031
15087
  "countries",
15032
15088
  "country_groups",
@@ -15065,21 +15121,21 @@ function targetingHardLimitsDemographics(t) {
15065
15121
  const narrowsGender = Array.isArray(t.genders) && t.genders.length === 1;
15066
15122
  return narrowsAgeMax || narrowsAgeMin || narrowsGender;
15067
15123
  }
15068
- var specialAdCategoriesSchema = z18.array(z18.enum(SPECIAL_AD_CATEGORIES)).default(["NONE"]);
15069
- var campaignCreateSchema3 = z18.object({
15070
- name: z18.string().min(1).max(META_LIMITS.campaign.nameMax),
15071
- objective: z18.enum(OBJECTIVES),
15124
+ var specialAdCategoriesSchema = z19.array(z19.enum(SPECIAL_AD_CATEGORIES)).default(["NONE"]);
15125
+ var campaignCreateSchema3 = z19.object({
15126
+ name: z19.string().min(1).max(META_LIMITS.campaign.nameMax),
15127
+ objective: z19.enum(OBJECTIVES),
15072
15128
  status: stageableStatusSchema3.default("PAUSED"),
15073
15129
  special_ad_categories: specialAdCategoriesSchema,
15074
- special_ad_category_country: z18.array(z18.string().length(2)).optional(),
15075
- buying_type: z18.enum(BUYING_TYPES).default("AUCTION"),
15076
- bid_strategy: z18.enum(BID_STRATEGIES).optional(),
15130
+ special_ad_category_country: z19.array(z19.string().length(2)).optional(),
15131
+ buying_type: z19.enum(BUYING_TYPES).default("AUCTION"),
15132
+ bid_strategy: z19.enum(BID_STRATEGIES).optional(),
15077
15133
  /** Campaign Budget Optimization (Advantage campaign budget) — mutually exclusive with ad-set budgets. */
15078
15134
  dailyBudget: moneySchema2.optional(),
15079
15135
  lifetimeBudget: moneySchema2.optional(),
15080
15136
  spendCap: moneySchema2.optional(),
15081
- start_time: z18.number().int().positive().optional(),
15082
- stop_time: z18.number().int().positive().optional()
15137
+ start_time: z19.number().int().positive().optional(),
15138
+ stop_time: z19.number().int().positive().optional()
15083
15139
  }).superRefine((p, ctx) => {
15084
15140
  if (p.dailyBudget && p.lifetimeBudget) {
15085
15141
  ctx.addIssue({ code: "custom", path: ["dailyBudget"], message: "set only one of dailyBudget or lifetimeBudget" });
@@ -15097,15 +15153,15 @@ var campaignCreateSchema3 = z18.object({
15097
15153
  });
15098
15154
  }
15099
15155
  });
15100
- var campaignUpdateSchema3 = z18.object({
15101
- name: z18.string().min(1).max(META_LIMITS.campaign.nameMax).optional(),
15156
+ var campaignUpdateSchema3 = z19.object({
15157
+ name: z19.string().min(1).max(META_LIMITS.campaign.nameMax).optional(),
15102
15158
  status: updateStatusSchema.optional(),
15103
- bid_strategy: z18.enum(BID_STRATEGIES).optional(),
15159
+ bid_strategy: z19.enum(BID_STRATEGIES).optional(),
15104
15160
  dailyBudget: moneySchema2.optional(),
15105
15161
  lifetimeBudget: moneySchema2.optional(),
15106
15162
  spendCap: moneySchema2.optional(),
15107
- start_time: z18.number().int().positive().optional(),
15108
- stop_time: z18.number().int().positive().optional()
15163
+ start_time: z19.number().int().positive().optional(),
15164
+ stop_time: z19.number().int().positive().optional()
15109
15165
  }).superRefine((p, ctx) => {
15110
15166
  if (!Object.values(p).some((val) => val !== void 0)) {
15111
15167
  ctx.addIssue({ code: "custom", message: "update needs at least one field" });
@@ -15115,42 +15171,42 @@ var campaignUpdateSchema3 = z18.object({
15115
15171
  }
15116
15172
  validateDailyBudgetFloor(p.dailyBudget, ctx, ["dailyBudget", "amount"]);
15117
15173
  });
15118
- var promotedObjectSchema = z18.object({
15174
+ var promotedObjectSchema = z19.object({
15119
15175
  page_id: parentRefSchema2.optional(),
15120
- pixel_id: z18.string().regex(NUMERIC_ID_REGEX3).optional(),
15121
- custom_event_type: z18.enum(CUSTOM_EVENT_TYPES).optional(),
15122
- application_id: z18.string().regex(NUMERIC_ID_REGEX3).optional(),
15123
- object_store_url: z18.string().url().optional(),
15124
- product_catalog_id: z18.string().regex(NUMERIC_ID_REGEX3).optional(),
15125
- product_set_id: z18.string().regex(NUMERIC_ID_REGEX3).optional(),
15126
- whatsapp_phone_number: z18.string().optional(),
15127
- offline_conversion_data_set_id: z18.string().regex(NUMERIC_ID_REGEX3).optional()
15176
+ pixel_id: z19.string().regex(NUMERIC_ID_REGEX3).optional(),
15177
+ custom_event_type: z19.enum(CUSTOM_EVENT_TYPES).optional(),
15178
+ application_id: z19.string().regex(NUMERIC_ID_REGEX3).optional(),
15179
+ object_store_url: z19.string().url().optional(),
15180
+ product_catalog_id: z19.string().regex(NUMERIC_ID_REGEX3).optional(),
15181
+ product_set_id: z19.string().regex(NUMERIC_ID_REGEX3).optional(),
15182
+ whatsapp_phone_number: z19.string().optional(),
15183
+ offline_conversion_data_set_id: z19.string().regex(NUMERIC_ID_REGEX3).optional()
15128
15184
  }).partial();
15129
- var attributionSpecSchema = z18.array(
15130
- z18.object({
15131
- event_type: z18.enum(ATTRIBUTION_EVENT_TYPES),
15132
- window_days: z18.union([z18.literal(1), z18.literal(7), z18.literal(28)])
15185
+ var attributionSpecSchema = z19.array(
15186
+ z19.object({
15187
+ event_type: z19.enum(ATTRIBUTION_EVENT_TYPES),
15188
+ window_days: z19.union([z19.literal(1), z19.literal(7), z19.literal(28)])
15133
15189
  })
15134
15190
  );
15135
15191
  var adSetFields = {
15136
- name: z18.string().min(1).max(META_LIMITS.adSet.nameMax),
15192
+ name: z19.string().min(1).max(META_LIMITS.adSet.nameMax),
15137
15193
  campaign_id: parentRefSchema2,
15138
15194
  status: stageableStatusSchema3.default("PAUSED"),
15139
15195
  dailyBudget: moneySchema2.optional(),
15140
15196
  lifetimeBudget: moneySchema2.optional(),
15141
15197
  bidAmount: moneySchema2.optional(),
15142
- bid_strategy: z18.enum(BID_STRATEGIES).optional(),
15143
- billing_event: z18.enum(BILLING_EVENTS),
15144
- optimization_goal: z18.enum(OPTIMIZATION_GOALS),
15145
- destination_type: z18.enum(DESTINATION_TYPES).optional(),
15198
+ bid_strategy: z19.enum(BID_STRATEGIES).optional(),
15199
+ billing_event: z19.enum(BILLING_EVENTS),
15200
+ optimization_goal: z19.enum(OPTIMIZATION_GOALS),
15201
+ destination_type: z19.enum(DESTINATION_TYPES).optional(),
15146
15202
  promoted_object: promotedObjectSchema.optional(),
15147
15203
  attribution_spec: attributionSpecSchema.optional(),
15148
- start_time: z18.number().int().positive().optional(),
15149
- end_time: z18.number().int().positive().optional(),
15204
+ start_time: z19.number().int().positive().optional(),
15205
+ end_time: z19.number().int().positive().optional(),
15150
15206
  targeting: metaTargetingSchema,
15151
15207
  /** EU Digital Services Act: who benefits from / pays for the ad. Auto-filled from the account for EU geo when omitted. */
15152
- dsa_beneficiary: z18.string().min(1).max(100).optional(),
15153
- dsa_payor: z18.string().min(1).max(100).optional()
15208
+ dsa_beneficiary: z19.string().min(1).max(100).optional(),
15209
+ dsa_payor: z19.string().min(1).max(100).optional()
15154
15210
  };
15155
15211
  function validateBidStrategy(p, ctx) {
15156
15212
  const strategy = p.bid_strategy;
@@ -15247,7 +15303,7 @@ function validateAdvantageAudience(p, ctx) {
15247
15303
  });
15248
15304
  }
15249
15305
  }
15250
- var adSetCreateSchema = z18.object(adSetFields).superRefine((p, ctx) => {
15306
+ var adSetCreateSchema = z19.object(adSetFields).superRefine((p, ctx) => {
15251
15307
  validateAdSetBudgetAndBid(p, ctx);
15252
15308
  validateAdSetPromotedObject(p, ctx);
15253
15309
  validateAdvantageAudience(p, ctx);
@@ -15259,22 +15315,22 @@ var adSetCreateSchema = z18.object(adSetFields).superRefine((p, ctx) => {
15259
15315
  });
15260
15316
  }
15261
15317
  });
15262
- var adSetUpdateSchema = z18.object({
15318
+ var adSetUpdateSchema = z19.object({
15263
15319
  name: adSetFields.name.optional(),
15264
15320
  status: updateStatusSchema.optional(),
15265
15321
  dailyBudget: moneySchema2.optional(),
15266
15322
  lifetimeBudget: moneySchema2.optional(),
15267
15323
  bidAmount: moneySchema2.optional(),
15268
- bid_strategy: z18.enum(BID_STRATEGIES).optional(),
15269
- optimization_goal: z18.enum(OPTIMIZATION_GOALS).optional(),
15270
- destination_type: z18.enum(DESTINATION_TYPES).optional(),
15324
+ bid_strategy: z19.enum(BID_STRATEGIES).optional(),
15325
+ optimization_goal: z19.enum(OPTIMIZATION_GOALS).optional(),
15326
+ destination_type: z19.enum(DESTINATION_TYPES).optional(),
15271
15327
  promoted_object: promotedObjectSchema.optional(),
15272
15328
  attribution_spec: attributionSpecSchema.optional(),
15273
- start_time: z18.number().int().positive().optional(),
15274
- end_time: z18.number().int().positive().optional(),
15329
+ start_time: z19.number().int().positive().optional(),
15330
+ end_time: z19.number().int().positive().optional(),
15275
15331
  targeting: metaTargetingSchema.optional(),
15276
- dsa_beneficiary: z18.string().min(1).max(100).optional(),
15277
- dsa_payor: z18.string().min(1).max(100).optional()
15332
+ dsa_beneficiary: z19.string().min(1).max(100).optional(),
15333
+ dsa_payor: z19.string().min(1).max(100).optional()
15278
15334
  }).superRefine((p, ctx) => {
15279
15335
  if (!Object.values(p).some((val) => val !== void 0)) {
15280
15336
  ctx.addIssue({ code: "custom", message: "update needs at least one field" });
@@ -15285,38 +15341,38 @@ var adSetUpdateSchema = z18.object({
15285
15341
  }
15286
15342
  validateAdvantageAudience(p, ctx);
15287
15343
  });
15288
- var messageSchema = z18.string().min(1).max(META_LIMITS.creative.messageHardMax);
15289
- var headlineSchema2 = z18.string().min(1).max(META_LIMITS.creative.headlineMax);
15290
- var descriptionSchema = z18.string().min(1).max(META_LIMITS.creative.descriptionMax);
15291
- var callToActionSchema = z18.object({
15292
- type: z18.enum(CTA_TYPES2),
15344
+ var messageSchema = z19.string().min(1).max(META_LIMITS.creative.messageHardMax);
15345
+ var headlineSchema2 = z19.string().min(1).max(META_LIMITS.creative.headlineMax);
15346
+ var descriptionSchema = z19.string().min(1).max(META_LIMITS.creative.descriptionMax);
15347
+ var callToActionSchema = z19.object({
15348
+ type: z19.enum(CTA_TYPES2),
15293
15349
  /** Overrides the base link for the CTA button; defaults to the ad's link. */
15294
15350
  link: httpsUrlSchema3.optional()
15295
15351
  });
15296
- var creativeEnhancementsSchema = z18.object({
15297
- standardEnhancements: z18.enum(ENROLL_STATUSES).optional(),
15298
- features: z18.record(z18.string(), z18.enum(ENROLL_STATUSES)).optional()
15352
+ var creativeEnhancementsSchema = z19.object({
15353
+ standardEnhancements: z19.enum(ENROLL_STATUSES).optional(),
15354
+ features: z19.record(z19.string(), z19.enum(ENROLL_STATUSES)).optional()
15299
15355
  });
15300
15356
  var creativeSharedFields = {
15301
- name: z18.string().max(META_LIMITS.creative.nameMax).optional(),
15357
+ name: z19.string().max(META_LIMITS.creative.nameMax).optional(),
15302
15358
  /** Facebook Page id backing the ad's identity. */
15303
15359
  page_id: parentRefSchema2,
15304
15360
  /** Instagram account id for IG placements (aka instagram_actor_id on read). */
15305
- instagram_user_id: z18.string().regex(NUMERIC_ID_REGEX3).optional(),
15361
+ instagram_user_id: z19.string().regex(NUMERIC_ID_REGEX3).optional(),
15306
15362
  /** URL tracking parameters appended to the destination, e.g. "utm_source=fb&utm_campaign=x". */
15307
- url_tags: z18.string().max(1e3).optional(),
15363
+ url_tags: z19.string().max(1e3).optional(),
15308
15364
  enhancements: creativeEnhancementsSchema.optional()
15309
15365
  };
15310
15366
  var imageMediaFields = {
15311
- imageHash: z18.string().regex(IMAGE_HASH_REGEX).optional(),
15367
+ imageHash: z19.string().regex(IMAGE_HASH_REGEX).optional(),
15312
15368
  imageRef: tempRefSchema3.optional()
15313
15369
  };
15314
15370
  var videoMediaFields = {
15315
- videoId: z18.string().regex(NUMERIC_ID_REGEX3).optional(),
15371
+ videoId: z19.string().regex(NUMERIC_ID_REGEX3).optional(),
15316
15372
  videoRef: tempRefSchema3.optional(),
15317
15373
  /** Thumbnail for a video creative — image hash, ref, or public url. */
15318
- thumbnailHash: z18.string().regex(IMAGE_HASH_REGEX).optional(),
15319
- imageUrl: z18.string().url().optional()
15374
+ thumbnailHash: z19.string().regex(IMAGE_HASH_REGEX).optional(),
15375
+ imageUrl: z19.string().url().optional()
15320
15376
  };
15321
15377
  function countImageRefs(p) {
15322
15378
  return [p.imageHash, p.imageRef].filter(Boolean).length;
@@ -15324,8 +15380,8 @@ function countImageRefs(p) {
15324
15380
  function countVideoRefs(p) {
15325
15381
  return [p.videoId, p.videoRef].filter(Boolean).length;
15326
15382
  }
15327
- var singleCreativeSchema = z18.object({
15328
- creativeType: z18.literal("single"),
15383
+ var singleCreativeSchema = z19.object({
15384
+ creativeType: z19.literal("single"),
15329
15385
  ...creativeSharedFields,
15330
15386
  /** Primary text. */
15331
15387
  message: messageSchema,
@@ -15334,7 +15390,7 @@ var singleCreativeSchema = z18.object({
15334
15390
  headline: headlineSchema2.optional(),
15335
15391
  description: descriptionSchema.optional(),
15336
15392
  /** Display URL / caption shown under the headline. */
15337
- caption: z18.string().max(255).optional(),
15393
+ caption: z19.string().max(255).optional(),
15338
15394
  call_to_action: callToActionSchema.optional(),
15339
15395
  ...imageMediaFields,
15340
15396
  ...videoMediaFields
@@ -15358,10 +15414,10 @@ var singleCreativeSchema = z18.object({
15358
15414
  });
15359
15415
  }
15360
15416
  });
15361
- var carouselCardSchema = z18.object({
15417
+ var carouselCardSchema = z19.object({
15362
15418
  link: httpsUrlSchema3,
15363
- headline: z18.string().max(META_LIMITS.creative.headlineMax).optional(),
15364
- description: z18.string().max(META_LIMITS.creative.descriptionMax).optional(),
15419
+ headline: z19.string().max(META_LIMITS.creative.headlineMax).optional(),
15420
+ description: z19.string().max(META_LIMITS.creative.descriptionMax).optional(),
15365
15421
  call_to_action: callToActionSchema.optional(),
15366
15422
  ...imageMediaFields,
15367
15423
  ...videoMediaFields
@@ -15381,35 +15437,35 @@ var carouselCardSchema = z18.object({
15381
15437
  ctx.addIssue({ code: "custom", path: ["videoId"], message: "each card is an image OR a video, not both" });
15382
15438
  }
15383
15439
  });
15384
- var carouselCreativeSchema2 = z18.object({
15385
- creativeType: z18.literal("carousel"),
15440
+ var carouselCreativeSchema2 = z19.object({
15441
+ creativeType: z19.literal("carousel"),
15386
15442
  ...creativeSharedFields,
15387
15443
  message: messageSchema,
15388
15444
  /** Optional "see more" card destination applied when a card has no own link. */
15389
15445
  link: httpsUrlSchema3.optional(),
15390
15446
  call_to_action: callToActionSchema.optional(),
15391
- cards: z18.array(carouselCardSchema).min(META_LIMITS.creative.carouselCardsMin).max(META_LIMITS.creative.carouselCardsMax)
15447
+ cards: z19.array(carouselCardSchema).min(META_LIMITS.creative.carouselCardsMin).max(META_LIMITS.creative.carouselCardsMax)
15392
15448
  });
15393
- var dynamicImageSchema = z18.object({ ...imageMediaFields }).refine((p) => countImageRefs(p) === 1, "each dynamic image needs exactly one reference");
15394
- var dynamicVideoSchema = z18.object({
15449
+ var dynamicImageSchema = z19.object({ ...imageMediaFields }).refine((p) => countImageRefs(p) === 1, "each dynamic image needs exactly one reference");
15450
+ var dynamicVideoSchema = z19.object({
15395
15451
  videoId: videoMediaFields.videoId,
15396
15452
  videoRef: videoMediaFields.videoRef,
15397
15453
  thumbnailHash: videoMediaFields.thumbnailHash
15398
15454
  }).refine((p) => countVideoRefs(p) === 1, "each dynamic video needs exactly one reference");
15399
15455
  var DYN = META_LIMITS.creative;
15400
- var dynamicCreativeSchema = z18.object({
15401
- creativeType: z18.literal("dynamic"),
15456
+ var dynamicCreativeSchema = z19.object({
15457
+ creativeType: z19.literal("dynamic"),
15402
15458
  ...creativeSharedFields,
15403
- bodies: z18.array(z18.object({ text: messageSchema })).min(DYN.dynamicTextsMin).max(DYN.dynamicTextsMax),
15404
- titles: z18.array(z18.object({ text: headlineSchema2 })).min(DYN.dynamicTextsMin).max(DYN.dynamicTextsMax),
15405
- descriptions: z18.array(z18.object({ text: descriptionSchema })).max(DYN.dynamicTextsMax).optional(),
15406
- images: z18.array(dynamicImageSchema).optional(),
15407
- videos: z18.array(dynamicVideoSchema).optional(),
15408
- ad_formats: z18.array(z18.enum(AD_FORMATS2)).min(1),
15409
- call_to_action_types: z18.array(z18.enum(CTA_TYPES2)).optional(),
15410
- link_urls: z18.array(z18.object({ website_url: httpsUrlSchema3, display_url: z18.string().optional() })).min(1),
15459
+ bodies: z19.array(z19.object({ text: messageSchema })).min(DYN.dynamicTextsMin).max(DYN.dynamicTextsMax),
15460
+ titles: z19.array(z19.object({ text: headlineSchema2 })).min(DYN.dynamicTextsMin).max(DYN.dynamicTextsMax),
15461
+ descriptions: z19.array(z19.object({ text: descriptionSchema })).max(DYN.dynamicTextsMax).optional(),
15462
+ images: z19.array(dynamicImageSchema).optional(),
15463
+ videos: z19.array(dynamicVideoSchema).optional(),
15464
+ ad_formats: z19.array(z19.enum(AD_FORMATS2)).min(1),
15465
+ call_to_action_types: z19.array(z19.enum(CTA_TYPES2)).optional(),
15466
+ link_urls: z19.array(z19.object({ website_url: httpsUrlSchema3, display_url: z19.string().optional() })).min(1),
15411
15467
  /** Multi-language / placement customization — structural passthrough for v1. */
15412
- asset_customization_rules: z18.array(z18.record(z18.string(), z18.unknown())).optional()
15468
+ asset_customization_rules: z19.array(z19.record(z19.string(), z19.unknown())).optional()
15413
15469
  }).superRefine((p, ctx) => {
15414
15470
  if (!(p.images?.length || p.videos?.length)) {
15415
15471
  ctx.addIssue({
@@ -15419,57 +15475,57 @@ var dynamicCreativeSchema = z18.object({
15419
15475
  });
15420
15476
  }
15421
15477
  });
15422
- var existingPostCreativeSchema = z18.object({
15423
- creativeType: z18.literal("existing_post"),
15478
+ var existingPostCreativeSchema = z19.object({
15479
+ creativeType: z19.literal("existing_post"),
15424
15480
  name: creativeSharedFields.name,
15425
15481
  /** "<page_id>_<post_id>" object story id of the post to promote. */
15426
- object_story_id: z18.string().regex(/^\d+_\d+$/, 'expected "<page_id>_<post_id>"'),
15482
+ object_story_id: z19.string().regex(/^\d+_\d+$/, 'expected "<page_id>_<post_id>"'),
15427
15483
  instagram_user_id: creativeSharedFields.instagram_user_id,
15428
15484
  url_tags: creativeSharedFields.url_tags,
15429
15485
  enhancements: creativeSharedFields.enhancements
15430
15486
  });
15431
- var creativeContentSchema2 = z18.discriminatedUnion("creativeType", [
15487
+ var creativeContentSchema2 = z19.discriminatedUnion("creativeType", [
15432
15488
  singleCreativeSchema,
15433
15489
  carouselCreativeSchema2,
15434
15490
  dynamicCreativeSchema,
15435
15491
  existingPostCreativeSchema
15436
15492
  ]);
15437
15493
  var adCreativeCreateSchema = creativeContentSchema2;
15438
- var adCreativeUpdateSchema = z18.object({
15439
- name: z18.string().max(META_LIMITS.creative.nameMax).optional(),
15494
+ var adCreativeUpdateSchema = z19.object({
15495
+ name: z19.string().max(META_LIMITS.creative.nameMax).optional(),
15440
15496
  status: updateStatusSchema.optional(),
15441
15497
  /** Content patch — only honored when the target is a staged meta_temp_* creative. */
15442
- content: z18.record(z18.string(), z18.unknown()).optional()
15498
+ content: z19.record(z19.string(), z19.unknown()).optional()
15443
15499
  }).refine((p) => Object.values(p).some((val) => val !== void 0), "update needs at least one field");
15444
- var adCreateSchema2 = z18.object({
15445
- name: z18.string().min(1).max(META_LIMITS.ad.nameMax),
15500
+ var adCreateSchema2 = z19.object({
15501
+ name: z19.string().min(1).max(META_LIMITS.ad.nameMax),
15446
15502
  adset_id: parentRefSchema2,
15447
15503
  status: stageableStatusSchema3.default("PAUSED"),
15448
- creative: z18.object({ creative_id: parentRefSchema2 }),
15504
+ creative: z19.object({ creative_id: parentRefSchema2 }),
15449
15505
  /** Conversion pixel / offline event set / view tags — structural passthrough. */
15450
- tracking_specs: z18.array(z18.record(z18.string(), z18.unknown())).optional()
15506
+ tracking_specs: z19.array(z19.record(z19.string(), z19.unknown())).optional()
15451
15507
  });
15452
- var adUpdateSchema2 = z18.object({
15453
- name: z18.string().min(1).max(META_LIMITS.ad.nameMax).optional(),
15508
+ var adUpdateSchema2 = z19.object({
15509
+ name: z19.string().min(1).max(META_LIMITS.ad.nameMax).optional(),
15454
15510
  status: updateStatusSchema.optional(),
15455
15511
  /** Swapping the creative is the Meta way to "edit" an ad's creative. */
15456
- creative: z18.object({ creative_id: parentRefSchema2 }).optional(),
15457
- tracking_specs: z18.array(z18.record(z18.string(), z18.unknown())).optional()
15512
+ creative: z19.object({ creative_id: parentRefSchema2 }).optional(),
15513
+ tracking_specs: z19.array(z19.record(z19.string(), z19.unknown())).optional()
15458
15514
  }).refine((p) => Object.values(p).some((val) => val !== void 0), "update needs at least one field");
15459
- var lookalikeSpecSchema = z18.object({
15460
- origin: z18.array(z18.object({ id: parentRefSchema2 })).min(1),
15461
- ratio: z18.number().min(0.01).max(0.2).optional(),
15462
- country: z18.string().length(2).optional()
15463
- });
15464
- var customAudienceCreateSchema = z18.object({
15465
- name: z18.string().min(1).max(META_LIMITS.audience.nameMax),
15466
- subtype: z18.enum(CUSTOM_AUDIENCE_SUBTYPES),
15467
- description: z18.string().max(500).optional(),
15468
- customer_file_source: z18.string().optional(),
15469
- retention_days: z18.number().int().min(1).max(META_LIMITS.audience.retentionDaysMax).optional(),
15515
+ var lookalikeSpecSchema = z19.object({
15516
+ origin: z19.array(z19.object({ id: parentRefSchema2 })).min(1),
15517
+ ratio: z19.number().min(0.01).max(0.2).optional(),
15518
+ country: z19.string().length(2).optional()
15519
+ });
15520
+ var customAudienceCreateSchema = z19.object({
15521
+ name: z19.string().min(1).max(META_LIMITS.audience.nameMax),
15522
+ subtype: z19.enum(CUSTOM_AUDIENCE_SUBTYPES),
15523
+ description: z19.string().max(500).optional(),
15524
+ customer_file_source: z19.string().optional(),
15525
+ retention_days: z19.number().int().min(1).max(META_LIMITS.audience.retentionDaysMax).optional(),
15470
15526
  lookalike_spec: lookalikeSpecSchema.optional(),
15471
15527
  /** Website/engagement rule — structural passthrough validated by Meta. */
15472
- rule: z18.record(z18.string(), z18.unknown()).optional()
15528
+ rule: z19.record(z19.string(), z19.unknown()).optional()
15473
15529
  }).superRefine((p, ctx) => {
15474
15530
  if (p.subtype === "LOOKALIKE" && !p.lookalike_spec) {
15475
15531
  ctx.addIssue({ code: "custom", path: ["lookalike_spec"], message: "LOOKALIKE audiences need a lookalike_spec" });
@@ -15478,16 +15534,16 @@ var customAudienceCreateSchema = z18.object({
15478
15534
  ctx.addIssue({ code: "custom", path: ["rule"], message: `${p.subtype} audiences need a rule (use --file)` });
15479
15535
  }
15480
15536
  });
15481
- var customAudienceUpdateSchema = z18.object({
15482
- name: z18.string().min(1).max(META_LIMITS.audience.nameMax).optional(),
15483
- description: z18.string().max(500).optional()
15537
+ var customAudienceUpdateSchema = z19.object({
15538
+ name: z19.string().min(1).max(META_LIMITS.audience.nameMax).optional(),
15539
+ description: z19.string().max(500).optional()
15484
15540
  }).refine((p) => Object.values(p).some((val) => val !== void 0), "update needs at least one field");
15485
- var mediaUploadSchema = z18.object({
15486
- kind: z18.enum(MEDIA_KINDS),
15541
+ var mediaUploadSchema = z19.object({
15542
+ kind: z19.enum(MEDIA_KINDS),
15487
15543
  bakerImageId: bakerMediaIdSchema2.optional(),
15488
15544
  bakerVideoId: bakerMediaIdSchema2.optional(),
15489
15545
  /** Optional display name / filename hint. */
15490
- name: z18.string().max(255).optional()
15546
+ name: z19.string().max(255).optional()
15491
15547
  }).superRefine((p, ctx) => {
15492
15548
  if (p.kind === "image" && !p.bakerImageId) {
15493
15549
  ctx.addIssue({ code: "custom", path: ["bakerImageId"], message: "image uploads need a bakerImageId" });
@@ -15509,16 +15565,16 @@ var META_DRAFT_OP_KINDS = [
15509
15565
  "customAudience.update",
15510
15566
  "media.upload"
15511
15567
  ];
15512
- var metaDraftOpKindSchema = z18.enum(META_DRAFT_OP_KINDS);
15513
- var accountIdSchema2 = z18.string().regex(NUMERIC_ID_REGEX3, "accountId must be the bare numeric ad account id");
15514
- var updateTargetSchema2 = z18.union([z18.string().regex(NUMERIC_ID_REGEX3), tempRefSchema3]);
15568
+ var metaDraftOpKindSchema = z19.enum(META_DRAFT_OP_KINDS);
15569
+ var accountIdSchema2 = z19.string().regex(NUMERIC_ID_REGEX3, "accountId must be the bare numeric ad account id");
15570
+ var updateTargetSchema2 = z19.union([z19.string().regex(NUMERIC_ID_REGEX3), tempRefSchema3]);
15515
15571
  function createOp3(kind, payload) {
15516
- return z18.object({ kind: z18.literal(kind), accountId: accountIdSchema2, payload });
15572
+ return z19.object({ kind: z19.literal(kind), accountId: accountIdSchema2, payload });
15517
15573
  }
15518
15574
  function updateOp3(kind, payload) {
15519
- return z18.object({ kind: z18.literal(kind), accountId: accountIdSchema2, target: updateTargetSchema2, payload });
15575
+ return z19.object({ kind: z19.literal(kind), accountId: accountIdSchema2, target: updateTargetSchema2, payload });
15520
15576
  }
15521
- var metaDraftOpInputSchema = z18.discriminatedUnion("kind", [
15577
+ var metaDraftOpInputSchema = z19.discriminatedUnion("kind", [
15522
15578
  createOp3("campaign.create", campaignCreateSchema3),
15523
15579
  updateOp3("campaign.update", campaignUpdateSchema3),
15524
15580
  createOp3("adSet.create", adSetCreateSchema),
@@ -15533,100 +15589,100 @@ var metaDraftOpInputSchema = z18.discriminatedUnion("kind", [
15533
15589
  ]);
15534
15590
 
15535
15591
  // ../api/src/ads-meta/wire.ts
15536
- import { z as z19 } from "zod";
15537
- var metaWriteModeSchema = z19.enum(["live", "simulated"]);
15538
- var metaDraftOpResultSchema = z19.object({
15539
- status: z19.enum(["applied", "simulated", "failed", "skipped"]),
15592
+ import { z as z20 } from "zod";
15593
+ var metaWriteModeSchema = z20.enum(["live", "simulated"]);
15594
+ var metaDraftOpResultSchema = z20.object({
15595
+ status: z20.enum(["applied", "simulated", "failed", "skipped"]),
15540
15596
  /** The resulting Meta node id (campaign/adset/creative/ad/audience) or simulated id. */
15541
- id: z19.string().optional(),
15597
+ id: z20.string().optional(),
15542
15598
  /** For media.upload ops: the resulting image hash. */
15543
- hash: z19.string().optional(),
15544
- error: z19.string().optional(),
15545
- skippedBecause: z19.string().optional(),
15546
- executedAt: z19.number().optional()
15599
+ hash: z20.string().optional(),
15600
+ error: z20.string().optional(),
15601
+ skippedBecause: z20.string().optional(),
15602
+ executedAt: z20.number().optional()
15547
15603
  });
15548
- var metaDraftStageRequestSchema = z19.object({
15549
- chatId: z19.string(),
15604
+ var metaDraftStageRequestSchema = z20.object({
15605
+ chatId: z20.string(),
15550
15606
  op: metaDraftOpInputSchema
15551
15607
  });
15552
- var metaDraftStageResponseSchema = z19.object({
15553
- staged: z19.literal(true),
15554
- ref: z19.string(),
15608
+ var metaDraftStageResponseSchema = z20.object({
15609
+ staged: z20.literal(true),
15610
+ ref: z20.string(),
15555
15611
  kind: metaDraftOpKindSchema,
15556
15612
  mode: metaWriteModeSchema,
15557
- dependsOn: z19.array(z19.string()),
15558
- summary: z19.string(),
15559
- warnings: z19.array(z19.string()),
15613
+ dependsOn: z20.array(z20.string()),
15614
+ summary: z20.string(),
15615
+ warnings: z20.array(z20.string()),
15560
15616
  /** True when the op amended an already-staged op in place instead of appending a new one. */
15561
- amended: z19.boolean().optional()
15562
- });
15563
- var metaDraftDuplicateRequestSchema = z19.object({
15564
- chatId: z19.string(),
15565
- accountId: z19.string(),
15566
- entity: z19.enum(["campaign", "adSet", "ad"]),
15567
- sourceId: z19.string(),
15568
- overrides: z19.record(z19.string(), z19.unknown()).optional(),
15617
+ amended: z20.boolean().optional()
15618
+ });
15619
+ var metaDraftDuplicateRequestSchema = z20.object({
15620
+ chatId: z20.string(),
15621
+ accountId: z20.string(),
15622
+ entity: z20.enum(["campaign", "adSet", "ad"]),
15623
+ sourceId: z20.string(),
15624
+ overrides: z20.record(z20.string(), z20.unknown()).optional(),
15569
15625
  /** Pause the original after the copy publishes. */
15570
- replace: z19.boolean().optional()
15626
+ replace: z20.boolean().optional()
15571
15627
  });
15572
- var metaDraftOpViewSchema = z19.object({
15573
- ref: z19.string(),
15628
+ var metaDraftOpViewSchema = z20.object({
15629
+ ref: z20.string(),
15574
15630
  kind: metaDraftOpKindSchema,
15575
- accountId: z19.string(),
15576
- target: z19.string().optional(),
15577
- dependsOn: z19.array(z19.string()),
15578
- summary: z19.string(),
15579
- stagedAt: z19.number(),
15631
+ accountId: z20.string(),
15632
+ target: z20.string().optional(),
15633
+ dependsOn: z20.array(z20.string()),
15634
+ summary: z20.string(),
15635
+ stagedAt: z20.number(),
15580
15636
  result: metaDraftOpResultSchema.optional()
15581
15637
  });
15582
- var metaDraftListRequestSchema = z19.object({
15583
- chatId: z19.string()
15638
+ var metaDraftListRequestSchema = z20.object({
15639
+ chatId: z20.string()
15584
15640
  });
15585
- var metaDraftAdvisorySchema = z19.object({
15586
- ref: z19.string(),
15587
- message: z19.string()
15641
+ var metaDraftAdvisorySchema = z20.object({
15642
+ ref: z20.string(),
15643
+ message: z20.string()
15588
15644
  });
15589
- var metaDraftListResponseSchema = z19.object({
15590
- status: z19.enum(["active", "publishing", "applied", "discarded", "none"]),
15645
+ var metaDraftListResponseSchema = z20.object({
15646
+ status: z20.enum(["active", "publishing", "applied", "discarded", "none"]),
15591
15647
  mode: metaWriteModeSchema,
15592
- count: z19.number(),
15593
- ops: z19.array(metaDraftOpViewSchema),
15648
+ count: z20.number(),
15649
+ ops: z20.array(metaDraftOpViewSchema),
15594
15650
  /** Non-blocking cross-op quality advisories — "good campaign, not just valid". */
15595
- advisories: z19.array(metaDraftAdvisorySchema)
15651
+ advisories: z20.array(metaDraftAdvisorySchema)
15596
15652
  });
15597
- var metaDraftShowRequestSchema = z19.object({
15598
- chatId: z19.string(),
15599
- ref: z19.string()
15653
+ var metaDraftShowRequestSchema = z20.object({
15654
+ chatId: z20.string(),
15655
+ ref: z20.string()
15600
15656
  });
15601
- var metaDraftShowResponseSchema = z19.object({
15657
+ var metaDraftShowResponseSchema = z20.object({
15602
15658
  op: metaDraftOpViewSchema.extend({
15603
- payload: z19.unknown().optional(),
15604
- warnings: z19.array(z19.string()).optional(),
15605
- annotations: z19.unknown().optional()
15659
+ payload: z20.unknown().optional(),
15660
+ warnings: z20.array(z20.string()).optional(),
15661
+ annotations: z20.unknown().optional()
15606
15662
  })
15607
15663
  });
15608
- var metaDraftRemoveRequestSchema = z19.object({
15609
- chatId: z19.string(),
15610
- ref: z19.string()
15664
+ var metaDraftRemoveRequestSchema = z20.object({
15665
+ chatId: z20.string(),
15666
+ ref: z20.string()
15611
15667
  });
15612
- var metaDraftRemoveResponseSchema = z19.object({
15668
+ var metaDraftRemoveResponseSchema = z20.object({
15613
15669
  /** The requested ref plus any dependents removed by cascade. */
15614
- removed: z19.array(z19.string())
15670
+ removed: z20.array(z20.string())
15615
15671
  });
15616
- var metaDraftClearRequestSchema = z19.object({
15617
- chatId: z19.string()
15672
+ var metaDraftClearRequestSchema = z20.object({
15673
+ chatId: z20.string()
15618
15674
  });
15619
- var metaDraftClearResponseSchema = z19.object({
15620
- cleared: z19.number()
15675
+ var metaDraftClearResponseSchema = z20.object({
15676
+ cleared: z20.number()
15621
15677
  });
15622
- var metaFieldErrorSchema = z19.object({
15623
- path: z19.string(),
15624
- message: z19.string()
15678
+ var metaFieldErrorSchema = z20.object({
15679
+ path: z20.string(),
15680
+ message: z20.string()
15625
15681
  });
15626
- var metaDraftErrorResponseSchema = z19.object({
15627
- code: z19.string(),
15628
- error: z19.string(),
15629
- fields: z19.array(metaFieldErrorSchema).optional()
15682
+ var metaDraftErrorResponseSchema = z20.object({
15683
+ code: z20.string(),
15684
+ error: z20.string(),
15685
+ fields: z20.array(metaFieldErrorSchema).optional()
15630
15686
  });
15631
15687
 
15632
15688
  // src/commands/ads/meta/write-shared.ts
@@ -15637,19 +15693,19 @@ function failWriteValidation3(message) {
15637
15693
  writeJsonEnvelope({ ok: false, error: { code: "VALIDATION_ERROR", message } });
15638
15694
  process.exit(1);
15639
15695
  }
15640
- function loadJsonFileArg3(path28) {
15641
- if (typeof path28 !== "string" || path28.length === 0) {
15696
+ function loadJsonFileArg3(path29) {
15697
+ if (typeof path29 !== "string" || path29.length === 0) {
15642
15698
  return {};
15643
15699
  }
15644
15700
  try {
15645
- const parsed = JSON.parse(readFileSync8(path28, "utf8"));
15701
+ const parsed = JSON.parse(readFileSync8(path29, "utf8"));
15646
15702
  if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
15647
- failWriteValidation3(`${path28} must contain a JSON object`);
15703
+ failWriteValidation3(`${path29} must contain a JSON object`);
15648
15704
  }
15649
15705
  return parsed;
15650
15706
  } catch (err) {
15651
15707
  if (err instanceof SyntaxError) {
15652
- failWriteValidation3(`${path28} is not valid JSON: ${err.message}`);
15708
+ failWriteValidation3(`${path29} is not valid JSON: ${err.message}`);
15653
15709
  }
15654
15710
  throw err;
15655
15711
  }
@@ -16192,10 +16248,10 @@ function duplicateCommand2(entity, label) {
16192
16248
  replace: { type: "boolean", description: "Pause the original once the copy publishes" }
16193
16249
  },
16194
16250
  run: async ({ args }) => {
16195
- const { apiPost: apiPost2 } = await import("./client-PJ7ID35L.js");
16251
+ const { apiPost: apiPost2 } = await import("./client-HXMDU745.js");
16196
16252
  const { requireChatId: requireChatId2 } = await import("./env-6QJCMTRK.js");
16197
- const { writeJsonEnvelope: writeJsonEnvelope2 } = await import("./output-NWX3YW64.js");
16198
- const { handleMetaError: handleMetaError2 } = await import("./shared-5ZEOG664.js");
16253
+ const { writeJsonEnvelope: writeJsonEnvelope2 } = await import("./output-XB3PKLPQ.js");
16254
+ const { handleMetaError: handleMetaError2 } = await import("./shared-QRHBP3JR.js");
16199
16255
  try {
16200
16256
  const accountId = bareAccountId2(args);
16201
16257
  const chatId = requireChatId2();
@@ -19568,7 +19624,7 @@ import { toCardinal as nwKo } from "n2words/ko-KR";
19568
19624
  import { toCardinal as nwNl } from "n2words/nl-NL";
19569
19625
  import { toCardinal as nwPl } from "n2words/pl-PL";
19570
19626
  import { toCardinal as nwPt } from "n2words/pt-PT";
19571
- import { z as z20 } from "zod";
19627
+ import { z as z21 } from "zod";
19572
19628
 
19573
19629
  // src/engine/scaffold/lib/shoot-modes.ts
19574
19630
  var SHOOT_MODES = [
@@ -19904,71 +19960,71 @@ function trimArgs(durationS, offsetS = 0, dims) {
19904
19960
  "{{out.video}}"
19905
19961
  ];
19906
19962
  }
19907
- var FrameAsset = z20.object({ url: z20.string().optional() }).loose().optional();
19908
- var DialogueLine = z20.object({
19909
- speaker: z20.string().optional(),
19910
- line: z20.string().optional(),
19963
+ var FrameAsset = z21.object({ url: z21.string().optional() }).loose().optional();
19964
+ var DialogueLine = z21.object({
19965
+ speaker: z21.string().optional(),
19966
+ line: z21.string().optional(),
19911
19967
  // Absolute seconds on the source timeline (the deconstruct emits both).
19912
- start_s: z20.number().optional(),
19913
- end_s: z20.number().optional(),
19914
- delivery: z20.string().optional(),
19915
- voice_description: z20.string().optional(),
19968
+ start_s: z21.number().optional(),
19969
+ end_s: z21.number().optional(),
19970
+ delivery: z21.string().optional(),
19971
+ voice_description: z21.string().optional(),
19916
19972
  // DECON-supplied: is this speaker's FACE visibly speaking in THIS scene? Element
19917
19973
  // presence alone can't answer that — a founder pictured in a polaroid close-up is
19918
19974
  // "present" yet the line is voiceover, and treating it as on-camera produced a
19919
19975
  // native Seedance lip-sync clip of a still photograph. `false` pins the line to
19920
19976
  // the VO path; absent keeps the presence-based decision (old blueprints).
19921
- on_camera: z20.boolean().optional()
19977
+ on_camera: z21.boolean().optional()
19922
19978
  }).loose();
19923
- var Sfx = z20.object({
19924
- at_s: z20.number().optional(),
19925
- duration_s: z20.number().optional(),
19926
- sound_effect_prompt: z20.string().optional(),
19927
- description: z20.string().optional()
19979
+ var Sfx = z21.object({
19980
+ at_s: z21.number().optional(),
19981
+ duration_s: z21.number().optional(),
19982
+ sound_effect_prompt: z21.string().optional(),
19983
+ description: z21.string().optional()
19928
19984
  }).loose();
19929
- var CompositionRegion = z20.object({
19985
+ var CompositionRegion = z21.object({
19930
19986
  // full | top | bottom | left | right | inset
19931
- panel: z20.string().optional(),
19987
+ panel: z21.string().optional(),
19932
19988
  // 9-grid anchor for an `inset` presenter box.
19933
- position: z20.string().optional(),
19934
- is_presenter: z20.boolean().optional(),
19989
+ position: z21.string().optional(),
19990
+ is_presenter: z21.boolean().optional(),
19935
19991
  // The cast id shown/speaking in this region (routes lip-sync + element refs).
19936
- cast_ref: z20.string().optional(),
19992
+ cast_ref: z21.string().optional(),
19937
19993
  // What the region's content IS: camera | screen_capture | static_graphic |
19938
19994
  // generated. Authoritative for routing when present (regex-over-prose fallback
19939
19995
  // otherwise): screen_capture/static_graphic are rebuilt from REAL surfaces on the
19940
19996
  // overlay layer, never AI-generated.
19941
- kind: z20.string().optional(),
19997
+ kind: z21.string().optional(),
19942
19998
  // Opaque id naming the SPECIFIC on-screen document/note/app-state this
19943
19999
  // screen_capture region shows. Two scenes share it only when they show the SAME
19944
20000
  // recording continuing (scrolling/typing/waiting within it) — a genuinely
19945
20001
  // DIFFERENT document/note/recording (a source video splicing two screen captures)
19946
20002
  // gets a different id. Breaks a persistent-layout run into separate surface stubs
19947
20003
  // instead of asking the operator for one screenshot that can't cover both.
19948
- surface_id: z20.string().optional(),
20004
+ surface_id: z21.string().optional(),
19949
20005
  // Camera bubble(s)/inset(s) embedded INSIDE this region's surface (a Loom-style
19950
20006
  // presenter bubble inside a screen recording) — video-in-video the reproduction
19951
20007
  // must re-composite, not paint into the surface.
19952
- nested: z20.array(z20.object({}).loose()).optional(),
19953
- summary: z20.string().optional(),
19954
- frame_prompt: z20.string().optional(),
19955
- motion_prompt: z20.string().optional()
20008
+ nested: z21.array(z21.object({}).loose()).optional(),
20009
+ summary: z21.string().optional(),
20010
+ frame_prompt: z21.string().optional(),
20011
+ motion_prompt: z21.string().optional()
19956
20012
  }).loose();
19957
- var SceneComposition = z20.object({
20013
+ var SceneComposition = z21.object({
19958
20014
  // full_frame (default) | split_screen | pip | keyed_overlay
19959
- layout: z20.string().optional(),
20015
+ layout: z21.string().optional(),
19960
20016
  // split_screen only: vertical (top/bottom) | horizontal (left/right).
19961
- split_axis: z20.string().optional(),
19962
- regions: z20.array(CompositionRegion).optional()
20017
+ split_axis: z21.string().optional(),
20018
+ regions: z21.array(CompositionRegion).optional()
19963
20019
  }).loose();
19964
- var CameraMotion = z20.object({ movement: z20.string().optional(), detail: z20.string().optional() }).loose();
19965
- var TranscriptWord = z20.object({ text: z20.string().optional() }).loose();
19966
- var Scene = z20.object({
19967
- start_s: z20.number().optional(),
19968
- end_s: z20.number().optional(),
19969
- duration_s: z20.number().optional(),
19970
- summary: z20.string().optional(),
19971
- action_detail: z20.string().optional(),
20020
+ var CameraMotion = z21.object({ movement: z21.string().optional(), detail: z21.string().optional() }).loose();
20021
+ var TranscriptWord = z21.object({ text: z21.string().optional() }).loose();
20022
+ var Scene = z21.object({
20023
+ start_s: z21.number().optional(),
20024
+ end_s: z21.number().optional(),
20025
+ duration_s: z21.number().optional(),
20026
+ summary: z21.string().optional(),
20027
+ action_detail: z21.string().optional(),
19972
20028
  // The scene's spatial layout. Absent/full_frame ⇒ one uncut shot (default path).
19973
20029
  // A layered layout (split_screen/pip/keyed_overlay) with regions ⇒ the scaffold
19974
20030
  // builds one clip per region and stacks/overlays them into the scene picture.
@@ -19976,82 +20032,82 @@ var Scene = z20.object({
19976
20032
  // The capture "look" for this scene — selected from the ad-native shoot-mode
19977
20033
  // grammar (see lib/shoot-modes.ts). When absent the scaffold auto-derives a
19978
20034
  // UGC/product mode; a human can override per scene by setting this.
19979
- shoot_mode: z20.string().optional(),
20035
+ shoot_mode: z21.string().optional(),
19980
20036
  // Diegetic ambient the clip's native audio should carry (no music). When
19981
20037
  // absent the scene falls back to its shoot mode's default ambience.
19982
- ambient: z20.string().optional(),
20038
+ ambient: z21.string().optional(),
19983
20039
  camera_motion: CameraMotion.optional(),
19984
- start_frame_prompt: z20.string().optional(),
19985
- end_frame_prompt: z20.string().optional(),
19986
- motion_prompt: z20.string().optional(),
20040
+ start_frame_prompt: z21.string().optional(),
20041
+ end_frame_prompt: z21.string().optional(),
20042
+ motion_prompt: z21.string().optional(),
19987
20043
  // The scene's role in the ad's persuasion arc (DECON-supplied); drives the
19988
20044
  // script re-craft checklist. Inferred from position when absent.
19989
- narrative_role: z20.string().optional(),
20045
+ narrative_role: z21.string().optional(),
19990
20046
  // DECON-supplied on the HOOK scene: the engineered physical/emotional state that
19991
20047
  // makes the first frame stop the scroll (sweaty/breathless/urgent …). Injected
19992
20048
  // into the hook's start-frame description so the generator renders that state,
19993
20049
  // not a calm influencer (CCA-11).
19994
- hook_mechanic: z20.object({ mechanic: z20.string().optional(), why_it_stops_scroll: z20.string().optional() }).loose().optional(),
20050
+ hook_mechanic: z21.object({ mechanic: z21.string().optional(), why_it_stops_scroll: z21.string().optional() }).loose().optional(),
19995
20051
  // DECON-supplied per-scene location (so a gym hook isn't flattened to "home").
19996
- scene_setting: z20.string().optional(),
20052
+ scene_setting: z21.string().optional(),
19997
20053
  // How this scene cuts to the next (DECON-supplied). A recognized non-cut type
19998
20054
  // (fade/whip/zoom/dissolve/swipe) is reproduced as an ffmpeg xfade at the
19999
20055
  // boundary; cut/match_cut/none/other stay hard cuts. The last scene's value is
20000
20056
  // ignored (nothing follows it).
20001
- transition_out: z20.object({ type: z20.string().optional(), description: z20.string().optional() }).loose().optional(),
20002
- dialogue: z20.array(DialogueLine).optional(),
20003
- sfx: z20.array(Sfx).optional(),
20004
- overlays: z20.array(z20.unknown()).optional(),
20005
- floating_elements: z20.array(z20.unknown()).optional(),
20057
+ transition_out: z21.object({ type: z21.string().optional(), description: z21.string().optional() }).loose().optional(),
20058
+ dialogue: z21.array(DialogueLine).optional(),
20059
+ sfx: z21.array(Sfx).optional(),
20060
+ overlays: z21.array(z21.unknown()).optional(),
20061
+ floating_elements: z21.array(z21.unknown()).optional(),
20006
20062
  // DECON-supplied: how much the picture itself moves within the shot. Gates the
20007
20063
  // flash-hold optimization — a sub-2s b-roll flash with REAL subject motion
20008
20064
  // (pouring, spreading, hands working) must stay a real clip; freezing it turns
20009
20065
  // a montage into a slideshow. Absent (old blueprints) keeps the cheap still.
20010
- motion_level: z20.enum(["static", "subtle", "dynamic"]).optional(),
20011
- transcript_slice: z20.array(TranscriptWord).optional(),
20066
+ motion_level: z21.enum(["static", "subtle", "dynamic"]).optional(),
20067
+ transcript_slice: z21.array(TranscriptWord).optional(),
20012
20068
  start_frame_asset: FrameAsset,
20013
20069
  end_frame_asset: FrameAsset,
20014
20070
  // DECON-supplied: true when this scene is a length-split CONTINUATION of the
20015
20071
  // previous one (the SAME physical shot, broken up only because it exceeded the
20016
20072
  // clip ceiling). The scaffold then shares the splice keyframe — this scene's
20017
20073
  // start frame IS the previous scene's end frame — so the join is seamless.
20018
- continues_previous: z20.boolean().optional()
20074
+ continues_previous: z21.boolean().optional()
20019
20075
  }).loose();
20020
- var VideoBlueprint = z20.object({
20021
- source: z20.object({ aspect_ratio: z20.string().optional(), duration_s: z20.number().optional() }).loose().optional(),
20022
- global: z20.object({
20023
- music: z20.object({
20024
- present: z20.boolean().optional(),
20025
- music_prompt: z20.string().optional(),
20076
+ var VideoBlueprint = z21.object({
20077
+ source: z21.object({ aspect_ratio: z21.string().optional(), duration_s: z21.number().optional() }).loose().optional(),
20078
+ global: z21.object({
20079
+ music: z21.object({
20080
+ present: z21.boolean().optional(),
20081
+ music_prompt: z21.string().optional(),
20026
20082
  // Absolute second the music enters in the reference (the bed often
20027
20083
  // kicks in mid-ad, after the hook). We start the regenerated track here
20028
20084
  // instead of at 0 so the timing matches.
20029
- starts_at_s: z20.number().optional(),
20085
+ starts_at_s: z21.number().optional(),
20030
20086
  // Populated by the deconstruct when AudD (Shazam-style) recognizes the
20031
20087
  // reference track. We never reuse it — only style the regenerated bed.
20032
- identified_track: z20.object({ title: z20.string().optional(), artist: z20.string().optional() }).loose().nullish()
20088
+ identified_track: z21.object({ title: z21.string().optional(), artist: z21.string().optional() }).loose().nullish()
20033
20089
  }).loose().optional(),
20034
- cast: z20.array(
20035
- z20.object({
20036
- id: z20.string().optional(),
20037
- description: z20.string().optional(),
20090
+ cast: z21.array(
20091
+ z21.object({
20092
+ id: z21.string().optional(),
20093
+ description: z21.string().optional(),
20038
20094
  // The deconstruct's note on the target-market localization (e.g. "native
20039
20095
  // French speaker") — read to derive the spoken-track language code.
20040
- market_localization_note: z20.string().optional()
20096
+ market_localization_note: z21.string().optional()
20041
20097
  }).loose()
20042
20098
  ).optional(),
20043
- voiceover: z20.object({
20099
+ voiceover: z21.object({
20044
20100
  // on_camera | mixed → mouths are on screen (lip-sync candidates);
20045
20101
  // voiceover | none → narration over the picture (no lip-sync).
20046
- mode: z20.string().optional(),
20047
- voice_description: z20.string().optional(),
20048
- persona: z20.string().optional()
20102
+ mode: z21.string().optional(),
20103
+ voice_description: z21.string().optional(),
20104
+ persona: z21.string().optional()
20049
20105
  }).loose().optional(),
20050
20106
  // Visual palette — read only to colour a clean brand-card/CTA plate (the
20051
20107
  // first hex is the dominant brand colour); never to drive frame generation.
20052
- style: z20.object({ palette: z20.array(z20.object({ hex: z20.string().optional() }).loose()).optional() }).loose().optional()
20108
+ style: z21.object({ palette: z21.array(z21.object({ hex: z21.string().optional() }).loose()).optional() }).loose().optional()
20053
20109
  }).loose().optional(),
20054
- scenes: z20.array(Scene).min(1)
20110
+ scenes: z21.array(Scene).min(1)
20055
20111
  }).loose();
20056
20112
  function injectHookPhysicality(blueprint) {
20057
20113
  for (const scene of blueprint.scenes) {
@@ -20068,26 +20124,26 @@ function clipIntentOf(scene, sceneIndex) {
20068
20124
  if (/hero|reveal|product|payoff|transformation|result/.test(role) || scene.motion_level === "dynamic") return "hero";
20069
20125
  return "body";
20070
20126
  }
20071
- var AppearsItem = z20.union([z20.number(), z20.object({ scene: z20.number(), edge: z20.string().optional() }).loose()]);
20072
- var RecurringElement = z20.object({
20127
+ var AppearsItem = z21.union([z21.number(), z21.object({ scene: z21.number(), edge: z21.string().optional() }).loose()]);
20128
+ var RecurringElement = z21.object({
20073
20129
  // person | animal | product | logo | badge | other
20074
- type: z20.string(),
20075
- label: z20.string().optional(),
20076
- description: z20.string().optional(),
20077
- expression: z20.string().nullable().optional(),
20130
+ type: z21.string(),
20131
+ label: z21.string().optional(),
20132
+ description: z21.string().optional(),
20133
+ expression: z21.string().nullable().optional(),
20078
20134
  // When the element maps to a global cast entry, its stable id (for annotation).
20079
- cast_id: z20.string().nullable().optional(),
20135
+ cast_id: z21.string().nullable().optional(),
20080
20136
  // The label of another element that is the SAME individual as this one, shown
20081
20137
  // in a DIFFERENT wardrobe/persona/state (e.g. one creator playing skeptic in a
20082
20138
  // pink shirt and believer in a white shirt). Each look gets its own reference
20083
20139
  // slot, but the face/identity must stay identical across them.
20084
- same_as: z20.string().nullable().optional(),
20140
+ same_as: z21.string().nullable().optional(),
20085
20141
  // Scenes the element appears in. Either a bare list of scene indices (both
20086
20142
  // edges) or per-{scene,edge} entries. Both forms are accepted and merged.
20087
- scenes: z20.array(z20.number()).optional(),
20088
- appears_in: z20.array(AppearsItem).optional()
20143
+ scenes: z21.array(z21.number()).optional(),
20144
+ appears_in: z21.array(AppearsItem).optional()
20089
20145
  }).loose();
20090
- var RecurringElements = z20.array(RecurringElement);
20146
+ var RecurringElements = z21.array(RecurringElement);
20091
20147
  function sanitizeId(raw, fallback) {
20092
20148
  const id = raw.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
20093
20149
  return /^[a-z]/.test(id) ? id : `${fallback}_${id}`.replace(/_+$/g, "") || fallback;
@@ -20562,7 +20618,7 @@ function scrubFloatSentences(text, floatDescs) {
20562
20618
  return kept;
20563
20619
  }
20564
20620
  function sceneFloatDescs(scene) {
20565
- const floats = z20.array(FloatingElement).safeParse(scene.floating_elements ?? []);
20621
+ const floats = z21.array(FloatingElement).safeParse(scene.floating_elements ?? []);
20566
20622
  if (!floats.success) return [];
20567
20623
  return floats.data.map((f) => f.description?.trim() ?? "").filter(Boolean);
20568
20624
  }
@@ -21986,25 +22042,25 @@ function buildSfxMusic(blueprint, clock, nodes) {
21986
22042
  }
21987
22043
  return tracks;
21988
22044
  }
21989
- var OverlayStyle = z20.object({ color_hex: z20.string().optional(), background: z20.string().optional(), size: z20.string().optional() }).loose();
21990
- var Overlay = z20.object({
21991
- text: z20.string().optional(),
21992
- appears_at_s: z20.number().optional(),
21993
- duration_s: z20.number().optional(),
21994
- position: z20.string().optional(),
21995
- role: z20.string().optional(),
21996
- animation: z20.string().optional(),
21997
- animation_detail: z20.string().optional(),
22045
+ var OverlayStyle = z21.object({ color_hex: z21.string().optional(), background: z21.string().optional(), size: z21.string().optional() }).loose();
22046
+ var Overlay = z21.object({
22047
+ text: z21.string().optional(),
22048
+ appears_at_s: z21.number().optional(),
22049
+ duration_s: z21.number().optional(),
22050
+ position: z21.string().optional(),
22051
+ role: z21.string().optional(),
22052
+ animation: z21.string().optional(),
22053
+ animation_detail: z21.string().optional(),
21998
22054
  style: OverlayStyle.optional()
21999
22055
  }).loose();
22000
- var FloatingElement = z20.object({
22001
- kind: z20.string().optional(),
22002
- description: z20.string().optional(),
22003
- brand_name: z20.string().nullish(),
22004
- what_it_represents: z20.string().optional(),
22005
- appears_at_s: z20.number().optional(),
22006
- duration_s: z20.number().optional(),
22007
- position: z20.string().optional()
22056
+ var FloatingElement = z21.object({
22057
+ kind: z21.string().optional(),
22058
+ description: z21.string().optional(),
22059
+ brand_name: z21.string().nullish(),
22060
+ what_it_represents: z21.string().optional(),
22061
+ appears_at_s: z21.number().optional(),
22062
+ duration_s: z21.number().optional(),
22063
+ position: z21.string().optional()
22008
22064
  }).loose();
22009
22065
  function escapeHtml(s) {
22010
22066
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
@@ -22036,7 +22092,7 @@ function positionClass(position) {
22036
22092
  function collectCaptions(blueprint, clock) {
22037
22093
  return blueprint.scenes.flatMap((scene, i) => {
22038
22094
  const sceneStart = scene.start_s ?? 0;
22039
- const overlays = z20.array(Overlay).safeParse(scene.overlays ?? []);
22095
+ const overlays = z21.array(Overlay).safeParse(scene.overlays ?? []);
22040
22096
  return overlays.success ? overlays.data.filter((ov) => Boolean(ov.text?.trim())).map((ov) => {
22041
22097
  const at = clock.map(i, ov.appears_at_s ?? sceneStart);
22042
22098
  return { text: ov.text.trim(), at, end: at + (ov.duration_s ?? 2.5), ov };
@@ -22116,7 +22172,7 @@ function collectFloatWindows(blueprint, uiRouted, clock) {
22116
22172
  const windows = /* @__PURE__ */ new Map();
22117
22173
  blueprint.scenes.forEach((scene, i) => {
22118
22174
  const sceneStart = scene.start_s ?? 0;
22119
- const floats = z20.array(FloatingElement).safeParse(scene.floating_elements ?? []);
22175
+ const floats = z21.array(FloatingElement).safeParse(scene.floating_elements ?? []);
22120
22176
  if (!floats.success) return;
22121
22177
  for (const fe of floats.data) {
22122
22178
  const at = clock.map(i, fe.appears_at_s ?? sceneStart);
@@ -22564,8 +22620,8 @@ function buildMotionBoard(blueprint) {
22564
22620
  const end_s = scene.end_s ?? start_s + sceneDurationS(scene);
22565
22621
  cursor = end_s;
22566
22622
  const spoken = sceneSpokenText(scene);
22567
- const overlays = z20.array(Overlay).safeParse(scene.overlays ?? []);
22568
- const floats = z20.array(FloatingElement).safeParse(scene.floating_elements ?? []);
22623
+ const overlays = z21.array(Overlay).safeParse(scene.overlays ?? []);
22624
+ const floats = z21.array(FloatingElement).safeParse(scene.floating_elements ?? []);
22569
22625
  const graphics = [
22570
22626
  ...(overlays.success ? overlays.data : []).filter((ov) => ov.text?.trim()).map((ov) => ({
22571
22627
  kind: "text",
@@ -24004,7 +24060,7 @@ import path18 from "path";
24004
24060
  import { defineCommand as defineCommand95 } from "citty";
24005
24061
 
24006
24062
  // src/engine/scaffold/staticAd.ts
24007
- import { z as z21 } from "zod";
24063
+ import { z as z22 } from "zod";
24008
24064
  var GEN_ASPECT_RATIOS = /* @__PURE__ */ new Set(["1:1", "4:5", "9:16", "16:9", "4:3", "3:4", "2:3", "3:2", "21:9"]);
24009
24065
  var DEFAULT_ASPECT_RATIO = "9:16";
24010
24066
  var SHEET_SUBJECT_TYPE2 = {
@@ -24016,24 +24072,24 @@ var ACTOR_SHEET_IMAGE_SIZE = "4K";
24016
24072
  var ADAPT_MODEL = "google/gemini-3-pro-image-preview";
24017
24073
  var ADAPT_IMAGE_SIZE = "2K";
24018
24074
  var ADAPT_GUIDANCE = "Keep the headline, logo, CTA, and hero subject fully visible in every ratio. Reproduce every text string verbatim \u2014 no dropped, added, or altered characters \u2014 and preserve the exact brand-color treatment (e.g. a black\u2192red word pivot), never flattening it.";
24019
- var Blueprint = z21.object({
24020
- meta: z21.object({ estimated_aspect_ratio: z21.string().optional() }).loose().optional(),
24021
- text_content: z21.array(z21.object({ text: z21.string().optional() }).loose()).optional()
24075
+ var Blueprint = z22.object({
24076
+ meta: z22.object({ estimated_aspect_ratio: z22.string().optional() }).loose().optional(),
24077
+ text_content: z22.array(z22.object({ text: z22.string().optional() }).loose()).optional()
24022
24078
  }).loose();
24023
- var ElementLocator = z21.object({
24024
- collection: z21.enum(["subjects", "people", "brands_logos"]),
24025
- index: z21.number().int().nonnegative()
24079
+ var ElementLocator = z22.object({
24080
+ collection: z22.enum(["subjects", "people", "brands_logos"]),
24081
+ index: z22.number().int().nonnegative()
24026
24082
  }).loose();
24027
- var MainElement = z21.object({
24083
+ var MainElement = z22.object({
24028
24084
  // logo | product | person | animal | badge | other
24029
- type: z21.string(),
24030
- label: z21.string().optional(),
24031
- description: z21.string().optional(),
24032
- expression: z21.string().nullable().optional(),
24033
- reason: z21.string().optional(),
24085
+ type: z22.string(),
24086
+ label: z22.string().optional(),
24087
+ description: z22.string().optional(),
24088
+ expression: z22.string().nullable().optional(),
24089
+ reason: z22.string().optional(),
24034
24090
  locator: ElementLocator.optional()
24035
24091
  }).loose();
24036
- var MainElements = z21.array(MainElement);
24092
+ var MainElements = z22.array(MainElement);
24037
24093
  function sanitizeId2(raw, fallback) {
24038
24094
  const id = raw.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
24039
24095
  return /^[a-z]/.test(id) ? id : `${fallback}_${id}`.replace(/_+$/g, "") || fallback;
@@ -24334,9 +24390,9 @@ function resolveScaffoldStaticAdPaths(rawFile, out, cwd = process.cwd(), slug) {
24334
24390
  const outPath = out ? path16.resolve(cwd, out) : slug ? path16.join(cwd, "src", "creatives", slug, `${slug}.canvas.json`) : imageIsUrl ? path16.join(cwd, "static-ad.canvas.json") : path16.join(path16.dirname(imageSource), "static-ad.canvas.json");
24335
24391
  const blueprintPath = path16.join(path16.dirname(outPath), "prompt.json");
24336
24392
  const creativeDir = slug ? path16.dirname(outPath) : null;
24337
- const definitionPath = creativeDir ? path16.join(creativeDir, "_definition.md") : null;
24393
+ const definitionPath2 = creativeDir ? path16.join(creativeDir, "_definition.md") : null;
24338
24394
  const referencesDir = creativeDir ? path16.join(creativeDir, "references") : null;
24339
- return { imageIsUrl, imageSource, outPath, blueprintPath, creativeDir, definitionPath, referencesDir };
24395
+ return { imageIsUrl, imageSource, outPath, blueprintPath, creativeDir, definitionPath: definitionPath2, referencesDir };
24340
24396
  }
24341
24397
  var SCAFFOLD_SLUG_PATTERN = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
24342
24398
  var SCAFFOLD_SLUG_MAX_LENGTH = 100;
@@ -24731,7 +24787,7 @@ var scaffoldStaticAdCommand = defineCommand95({
24731
24787
  );
24732
24788
  process.exit(2);
24733
24789
  }
24734
- const { imageIsUrl, imageSource, outPath, blueprintPath, definitionPath, referencesDir } = resolveScaffoldStaticAdPaths(
24790
+ const { imageIsUrl, imageSource, outPath, blueprintPath, definitionPath: definitionPath2, referencesDir } = resolveScaffoldStaticAdPaths(
24735
24791
  String(args.file),
24736
24792
  args.out ? String(args.out) : void 0,
24737
24793
  process.cwd(),
@@ -24810,9 +24866,9 @@ var scaffoldStaticAdCommand = defineCommand95({
24810
24866
  }
24811
24867
  await writeFile7(outPath, `${JSON.stringify(canvas, null, 2)}
24812
24868
  `, "utf8");
24813
- if (definitionPath && !await fileExists(definitionPath)) {
24869
+ if (definitionPath2 && !await fileExists(definitionPath2)) {
24814
24870
  await writeFile7(
24815
- definitionPath,
24871
+ definitionPath2,
24816
24872
  buildCreativeDefinition({
24817
24873
  title: args.title ? String(args.title) : titleFromSlug(slug ?? ""),
24818
24874
  kind: "static",
@@ -24843,7 +24899,7 @@ var scaffoldStaticAdCommand = defineCommand95({
24843
24899
  ok: true,
24844
24900
  canvas_path: outPath,
24845
24901
  prompt_path: blueprintPath,
24846
- definition_path: definitionPath ?? void 0,
24902
+ definition_path: definitionPath2 ?? void 0,
24847
24903
  source_reference: durableSourceUrl ?? void 0,
24848
24904
  output: canvas.output,
24849
24905
  models: { describe: describeModel, select: selectModel, layout: layoutModel, gen: opts.genModel },
@@ -25551,10 +25607,10 @@ var scaffoldVideoCommand = defineCommand96({
25551
25607
  await ensureGitignore(process.cwd(), ["canvas/", ".context/"]);
25552
25608
  const sourceRef = videoSourceReference(blueprint, fileArg2);
25553
25609
  if (slug) {
25554
- const definitionPath = path21.join(outDir, "_definition.md");
25555
- if (!await fileExists2(definitionPath)) {
25610
+ const definitionPath2 = path21.join(outDir, "_definition.md");
25611
+ if (!await fileExists2(definitionPath2)) {
25556
25612
  await writeFile8(
25557
- definitionPath,
25613
+ definitionPath2,
25558
25614
  buildCreativeDefinition({
25559
25615
  title: titleFromSlug(slug),
25560
25616
  kind: "video",
@@ -26417,12 +26473,12 @@ function listFlowSlugs() {
26417
26473
  return readdirSync2(dir, { withFileTypes: true }).filter((entry) => entry.isDirectory() && !entry.name.startsWith("_") && entry.name !== ".gitkeep").map((entry) => entry.name).sort();
26418
26474
  }
26419
26475
  function readFlowTree(slug) {
26420
- const path28 = join3(flowsDir(), slug, "_data.json");
26421
- if (!existsSync4(path28)) {
26476
+ const path29 = join3(flowsDir(), slug, "_data.json");
26477
+ if (!existsSync4(path29)) {
26422
26478
  failLocal(`No form "${slug}". Run "baker flows list" to see the forms in this workspace.`);
26423
26479
  }
26424
26480
  try {
26425
- return JSON.parse(readFileSync9(path28, "utf-8"));
26481
+ return JSON.parse(readFileSync9(path29, "utf-8"));
26426
26482
  } catch (error) {
26427
26483
  failLocal(`Could not read form "${slug}": ${error instanceof Error ? error.message : String(error)}`);
26428
26484
  }
@@ -26835,10 +26891,10 @@ async function stageOps(ops) {
26835
26891
  handleError(err);
26836
26892
  }
26837
26893
  }
26838
- async function draftAction2(path28, body, chat) {
26894
+ async function draftAction2(path29, body, chat) {
26839
26895
  const chatId = resolveChatId(chat);
26840
26896
  try {
26841
- const data = await apiPost(path28, { chatId, ...body });
26897
+ const data = await apiPost(path29, { chatId, ...body });
26842
26898
  writeJsonEnvelope({ ok: true, data });
26843
26899
  return data;
26844
26900
  } catch (err) {
@@ -28862,9 +28918,9 @@ async function readImageBuffer(pathOrUrl) {
28862
28918
  }
28863
28919
  return readFile19(pathOrUrl);
28864
28920
  }
28865
- async function isDirectory(path28) {
28921
+ async function isDirectory(path29) {
28866
28922
  try {
28867
- const s = await stat4(path28);
28923
+ const s = await stat4(path29);
28868
28924
  return s.isDirectory();
28869
28925
  } catch {
28870
28926
  return false;
@@ -31484,11 +31540,10 @@ Full guide: __tooling__/docs/tools/baker/images.md`
31484
31540
  });
31485
31541
 
31486
31542
  // src/commands/landing/index.ts
31487
- import { defineCommand as defineCommand143 } from "citty";
31543
+ import { defineCommand as defineCommand144 } from "citty";
31488
31544
 
31489
31545
  // src/commands/landing/critique.ts
31490
- import { readdir as readdir8, stat as stat6 } from "fs/promises";
31491
- import path27 from "path";
31546
+ import path28 from "path";
31492
31547
  import { defineCommand as defineCommand142 } from "citty";
31493
31548
 
31494
31549
  // src/engine/landing/lib/brand-tokens.ts
@@ -32660,15 +32715,43 @@ function describeCounts(findings) {
32660
32715
  return [b ? `${b} block` : "", w ? `${w} warn` : "", a ? `${a} advisory` : ""].filter(Boolean).join(", ");
32661
32716
  }
32662
32717
 
32718
+ // src/commands/landing/pages.ts
32719
+ import { readdir as readdir7, stat as stat5 } from "fs/promises";
32720
+ import path25 from "path";
32721
+ async function listLandingSlugs(projectRoot) {
32722
+ try {
32723
+ const entries = await readdir7(path25.join(projectRoot, "src", "pages"), { withFileTypes: true });
32724
+ return entries.filter((e) => e.isDirectory() && !e.name.startsWith("_") && !e.name.startsWith(".")).map((e) => e.name).sort();
32725
+ } catch {
32726
+ return [];
32727
+ }
32728
+ }
32729
+ async function isDir(p) {
32730
+ try {
32731
+ return (await stat5(p)).isDirectory();
32732
+ } catch {
32733
+ return false;
32734
+ }
32735
+ }
32736
+ function definitionPath(projectRoot, slug) {
32737
+ return path25.resolve(projectRoot, "src", "pages", slug, "_definition.md");
32738
+ }
32739
+ function foldersCollide(a, b) {
32740
+ return foldKey(a) === foldKey(b);
32741
+ }
32742
+ function foldKey(name) {
32743
+ return name.normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase().replace(/[^a-z0-9]+/g, "");
32744
+ }
32745
+
32663
32746
  // src/commands/landing/snapshot.ts
32664
32747
  import { mkdir as mkdir8, rename as rename2, writeFile as writeFile11 } from "fs/promises";
32665
- import path25 from "path";
32748
+ import path26 from "path";
32666
32749
  var CRITIC_VERSION = "2";
32667
32750
  function critiqueCacheDir(projectRoot) {
32668
- return path25.join(projectRoot, ".cache", "landing-critique");
32751
+ return path26.join(projectRoot, ".cache", "landing-critique");
32669
32752
  }
32670
32753
  function snapshotPath(projectRoot, slug) {
32671
- return path25.join(critiqueCacheDir(projectRoot), `${slug}.json`);
32754
+ return path26.join(critiqueCacheDir(projectRoot), `${slug}.json`);
32672
32755
  }
32673
32756
  async function writeCritiqueSnapshot(projectRoot, snapshot) {
32674
32757
  await mkdir8(critiqueCacheDir(projectRoot), { recursive: true });
@@ -32680,21 +32763,21 @@ async function writeCritiqueSnapshot(projectRoot, snapshot) {
32680
32763
  }
32681
32764
 
32682
32765
  // src/commands/landing/source-version.ts
32683
- import { readdir as readdir7, readFile as readFile22, stat as stat5 } from "fs/promises";
32684
- import path26 from "path";
32766
+ import { readdir as readdir8, readFile as readFile22, stat as stat6 } from "fs/promises";
32767
+ import path27 from "path";
32685
32768
  async function landingSourceRelPaths(landingDir) {
32686
32769
  const rel = [];
32687
- if (await isFile(path26.join(landingDir, "index.astro"))) rel.push("index.astro");
32688
- const componentsDir = path26.join(landingDir, "_components");
32770
+ if (await isFile(path27.join(landingDir, "index.astro"))) rel.push("index.astro");
32771
+ const componentsDir = path27.join(landingDir, "_components");
32689
32772
  for (const abs of await walkAstro(componentsDir)) {
32690
- rel.push(path26.relative(landingDir, abs).split(path26.sep).join("/"));
32773
+ rel.push(path27.relative(landingDir, abs).split(path27.sep).join("/"));
32691
32774
  }
32692
32775
  return rel.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
32693
32776
  }
32694
32777
  async function readLandingSources(landingDir) {
32695
32778
  const rel = await landingSourceRelPaths(landingDir);
32696
32779
  const out = [];
32697
- for (const r of rel) out.push({ path: r, text: await readFile22(path26.join(landingDir, r), "utf8") });
32780
+ for (const r of rel) out.push({ path: r, text: await readFile22(path27.join(landingDir, r), "utf8") });
32698
32781
  return out;
32699
32782
  }
32700
32783
  async function computeLandingSourceSha(landingDir) {
@@ -32703,7 +32786,7 @@ async function computeLandingSourceSha(landingDir) {
32703
32786
  for (const r of rel) {
32704
32787
  let bytes;
32705
32788
  try {
32706
- bytes = await readFile22(path26.join(landingDir, r));
32789
+ bytes = await readFile22(path27.join(landingDir, r));
32707
32790
  } catch {
32708
32791
  bytes = Buffer.alloc(0);
32709
32792
  }
@@ -32713,7 +32796,7 @@ async function computeLandingSourceSha(landingDir) {
32713
32796
  }
32714
32797
  async function isFile(p) {
32715
32798
  try {
32716
- return (await stat5(p)).isFile();
32799
+ return (await stat6(p)).isFile();
32717
32800
  } catch {
32718
32801
  return false;
32719
32802
  }
@@ -32721,13 +32804,13 @@ async function isFile(p) {
32721
32804
  async function walkAstro(dir) {
32722
32805
  let entries;
32723
32806
  try {
32724
- entries = await readdir7(dir, { withFileTypes: true });
32807
+ entries = await readdir8(dir, { withFileTypes: true });
32725
32808
  } catch {
32726
32809
  return [];
32727
32810
  }
32728
32811
  const out = [];
32729
32812
  for (const entry of entries) {
32730
- const abs = path26.join(dir, entry.name);
32813
+ const abs = path27.join(dir, entry.name);
32731
32814
  if (entry.isDirectory()) out.push(...await walkAstro(abs));
32732
32815
  else if (entry.isFile() && entry.name.endsWith(".astro")) out.push(abs);
32733
32816
  }
@@ -32788,7 +32871,7 @@ var critiqueCommand2 = defineCommand142({
32788
32871
  { availableSlugs: await listLandingSlugs(projectRoot) }
32789
32872
  );
32790
32873
  }
32791
- if (!await isDir(path27.resolve(projectRoot, "src", "pages", slug))) {
32874
+ if (!await isDir(path28.resolve(projectRoot, "src", "pages", slug))) {
32792
32875
  fail5("NOT_FOUND", `No landing at src/pages/${slug}/`, {
32793
32876
  availableSlugs: await listLandingSlugs(projectRoot)
32794
32877
  });
@@ -32827,7 +32910,7 @@ var critiqueCommand2 = defineCommand142({
32827
32910
  }
32828
32911
  });
32829
32912
  async function critiqueOne(projectRoot, slug, brand) {
32830
- const landingDir = path27.resolve(projectRoot, "src", "pages", slug);
32913
+ const landingDir = path28.resolve(projectRoot, "src", "pages", slug);
32831
32914
  const [sources, sourceSha] = await Promise.all([readLandingSources(landingDir), computeLandingSourceSha(landingDir)]);
32832
32915
  const report = critiqueLanding({ slug, sources, brand });
32833
32916
  let snapshotFailed = false;
@@ -32845,14 +32928,6 @@ async function critiqueOne(projectRoot, slug, brand) {
32845
32928
  }
32846
32929
  return { slug, report, snapshotFailed };
32847
32930
  }
32848
- async function listLandingSlugs(projectRoot) {
32849
- try {
32850
- const entries = await readdir8(path27.join(projectRoot, "src", "pages"), { withFileTypes: true });
32851
- return entries.filter((e) => e.isDirectory() && !e.name.startsWith("_") && !e.name.startsWith(".")).map((e) => e.name).sort();
32852
- } catch {
32853
- return [];
32854
- }
32855
- }
32856
32931
  function present(f) {
32857
32932
  return {
32858
32933
  id: f.id,
@@ -32864,32 +32939,261 @@ function present(f) {
32864
32939
  ...f.brandDrift ? { brandDrift: true } : {}
32865
32940
  };
32866
32941
  }
32867
- async function isDir(p) {
32868
- try {
32869
- return (await stat6(p)).isDirectory();
32870
- } catch {
32871
- return false;
32942
+
32943
+ // src/commands/landing/folder.ts
32944
+ import { readFile as readFile23, writeFile as writeFile12 } from "fs/promises";
32945
+ import { defineCommand as defineCommand143 } from "citty";
32946
+
32947
+ // src/commands/landing/definition-folder.ts
32948
+ var FRONTMATTER_DELIMITER = "---";
32949
+ var TOP_LEVEL_FOLDER_RE = /^folder\s*:/;
32950
+ var DefinitionFormatError = class extends Error {
32951
+ };
32952
+ function toYamlString(value) {
32953
+ return `"${value.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
32954
+ }
32955
+ function setFolderInFrontmatter(source, folder) {
32956
+ const lines = source.split("\n");
32957
+ if (lines[0]?.trim() !== FRONTMATTER_DELIMITER) {
32958
+ throw new DefinitionFormatError("The page's definition does not start with a frontmatter block");
32959
+ }
32960
+ const closing = lines.findIndex((line2, i) => i > 0 && line2.trim() === FRONTMATTER_DELIMITER);
32961
+ if (closing === -1) {
32962
+ throw new DefinitionFormatError("The page's definition has an unterminated frontmatter block");
32963
+ }
32964
+ const existing = lines.findIndex((line2, i) => i > 0 && i < closing && TOP_LEVEL_FOLDER_RE.test(line2));
32965
+ if (folder === null) {
32966
+ if (existing === -1) {
32967
+ return source;
32968
+ }
32969
+ return [...lines.slice(0, existing), ...lines.slice(existing + 1)].join("\n");
32872
32970
  }
32971
+ const line = `folder: ${toYamlString(folder)}`;
32972
+ if (existing !== -1) {
32973
+ return [...lines.slice(0, existing), line, ...lines.slice(existing + 1)].join("\n");
32974
+ }
32975
+ return [...lines.slice(0, closing), line, ...lines.slice(closing)].join("\n");
32873
32976
  }
32874
32977
 
32978
+ // src/commands/landing/folder.ts
32979
+ registerSchema({
32980
+ command: "landing.folder.list",
32981
+ description: "Start here before filing anything: the folders this company already uses, with how many landings each holds. Reuse one of these rather than inventing a near-duplicate name.",
32982
+ args: {}
32983
+ });
32984
+ registerSchema({
32985
+ command: "landing.folder.set",
32986
+ description: "File landings under a folder in Baker (or pull them out with --none). Takes several slugs at once. Applies immediately to pages that are already published, and writes the folder into each page's definition so a page that has never been published is filed the moment it is.",
32987
+ args: {
32988
+ slug: {
32989
+ type: "string",
32990
+ description: "Landing slug (folder under src/pages/). Pass several, space-separated.",
32991
+ required: true
32992
+ },
32993
+ name: {
32994
+ type: "string",
32995
+ description: "Folder to file them under. Run `baker landing folder list` first and reuse an existing one.",
32996
+ required: false
32997
+ },
32998
+ none: { type: "boolean", description: "Pull the landings out of their folder", required: false }
32999
+ }
33000
+ });
33001
+ function fail6(code, message, fix) {
33002
+ process.stderr.write(
33003
+ `${JSON.stringify({ ok: false, error: { code, message, ...fix ? { fix } : {} } }, null, 2)}
33004
+ `
33005
+ );
33006
+ process.exit(2);
33007
+ }
33008
+ function normalizeName(raw) {
33009
+ const collapsed = raw.replace(/\s+/g, " ").trim();
33010
+ if (collapsed === "") {
33011
+ fail6("VALIDATION_ERROR", "Give the folder a name, or pass --none to unfile the pages.");
33012
+ }
33013
+ if (collapsed.length > MAX_LANDING_FOLDER_NAME_LENGTH) {
33014
+ fail6("VALIDATION_ERROR", `Folder names can be at most ${MAX_LANDING_FOLDER_NAME_LENGTH} characters.`);
33015
+ }
33016
+ if (collapsed.includes("/")) {
33017
+ fail6("VALIDATION_ERROR", "Folder names can't contain a slash \u2014 a folder is not part of the page's URL.");
33018
+ }
33019
+ return collapsed;
33020
+ }
33021
+ function parseSlugs(args) {
33022
+ const rest = Array.isArray(args._) ? args._ : [];
33023
+ const all = [args.slug, ...rest].filter((s) => typeof s === "string" && s.length > 0);
33024
+ return [...new Set(all)];
33025
+ }
33026
+ var listCommand13 = defineCommand143({
33027
+ meta: {
33028
+ name: "list",
33029
+ description: "Folders this company already uses, with how many landings each holds. Run this BEFORE naming a folder \u2014 reusing one is the difference between an organised list and the same wall of cards split across near-duplicate names. Example: baker landing folder list"
33030
+ },
33031
+ async run() {
33032
+ const data = await apiGet("/api/landings/folders");
33033
+ writeJson({
33034
+ ok: true,
33035
+ data,
33036
+ hints: [
33037
+ data.folders.length === 0 ? "No folders yet. The first `baker landing folder set` creates one \u2014 pick a name that will still fit the next five pages." : "Reuse one of these names exactly. A near-duplicate ('Masters' vs 'Master IA') splits one group into two."
33038
+ ]
33039
+ });
33040
+ }
33041
+ });
33042
+ async function updateDefinitions(projectRoot, slugs, folder) {
33043
+ const updated = [];
33044
+ const problems = [];
33045
+ for (const slug of slugs) {
33046
+ const file = definitionPath(projectRoot, slug);
33047
+ let source;
33048
+ try {
33049
+ source = await readFile23(file, "utf8");
33050
+ } catch {
33051
+ continue;
33052
+ }
33053
+ try {
33054
+ const next = setFolderInFrontmatter(source, folder);
33055
+ if (next !== source) {
33056
+ await writeFile12(file, next, "utf8");
33057
+ }
33058
+ updated.push(slug);
33059
+ } catch (error) {
33060
+ problems.push(`${slug}: ${error instanceof DefinitionFormatError ? error.message : "could not be updated"}`);
33061
+ }
33062
+ }
33063
+ return { updated, problems };
33064
+ }
33065
+ function collisionHint(folder, foldersBefore) {
33066
+ if (folder === null) {
33067
+ return [];
33068
+ }
33069
+ const existed = foldersBefore.some((f) => f.name === folder);
33070
+ if (existed) {
33071
+ return [];
33072
+ }
33073
+ const nearMatch = foldersBefore.find((f) => foldersCollide(f.name, folder));
33074
+ return nearMatch ? [
33075
+ `Created "${folder}", but "${nearMatch.name}" already exists and reads as the same group. If you meant that one, re-run with --name "${nearMatch.name}" \u2014 two names for one idea is the mess folders are meant to fix.`
33076
+ ] : [];
33077
+ }
33078
+ var setCommand = defineCommand143({
33079
+ meta: {
33080
+ name: "set",
33081
+ description: "File landings under a folder in Baker. Applies immediately to published pages and writes the folder into each page's definition, so a page that has never been published is filed the moment it is. Run `baker landing folder list` first and reuse an existing folder. Examples: baker landing folder set maii-info maii-dossier --name Masters | baker landing folder set maii-info --none"
33082
+ },
33083
+ args: {
33084
+ slug: {
33085
+ type: "positional",
33086
+ required: true,
33087
+ description: "Landing slug (folder under src/pages/). Space-separate several to file them in one call."
33088
+ },
33089
+ name: { type: "string", description: "Folder to file them under" },
33090
+ none: { type: "boolean", description: "Pull the landings out of their folder", default: false }
33091
+ },
33092
+ async run({ args }) {
33093
+ const slugs = parseSlugs(args);
33094
+ const projectRoot = process.cwd();
33095
+ if (args.none === true && typeof args.name === "string" && args.name.length > 0) {
33096
+ fail6("VALIDATION_ERROR", "Pass either --name or --none, not both.");
33097
+ }
33098
+ if (args.none !== true && (typeof args.name !== "string" || args.name.length === 0)) {
33099
+ fail6("VALIDATION_ERROR", "Missing --name. Pass the folder to file these pages under, or --none to unfile them.");
33100
+ }
33101
+ const folder = args.none === true ? null : normalizeName(String(args.name));
33102
+ const before = await apiGet("/api/landings/folders");
33103
+ const definitions = await updateDefinitions(projectRoot, slugs, folder);
33104
+ const result = await apiPut("/api/landings/folders", { slugs, folder });
33105
+ if (result.notFound.length === slugs.length && definitions.updated.length === 0) {
33106
+ fail6("NOT_FOUND", `No landing matches ${slugs.join(", ")}.`, {
33107
+ action: "Re-run with a slug that exists",
33108
+ explanation: "A slug is the folder name directly under src/pages/.",
33109
+ availableSlugs: await listLandingSlugs(projectRoot)
33110
+ });
33111
+ }
33112
+ const pendingPublish = result.notFound.filter((slug) => definitions.updated.includes(slug));
33113
+ const unknown = result.notFound.filter((slug) => !definitions.updated.includes(slug));
33114
+ writeJson({
33115
+ ok: true,
33116
+ data: {
33117
+ folder,
33118
+ moved: result.moved,
33119
+ unchanged: result.unchanged,
33120
+ pendingPublish,
33121
+ unknown,
33122
+ folders: result.folders
33123
+ },
33124
+ hints: setHints({ folder, before: before.folders, pendingPublish, unknown, problems: definitions.problems })
33125
+ });
33126
+ }
33127
+ });
33128
+ function setHints({
33129
+ folder,
33130
+ before,
33131
+ pendingPublish,
33132
+ unknown,
33133
+ problems
33134
+ }) {
33135
+ const hints = collisionHint(folder, before);
33136
+ if (pendingPublish.length > 0) {
33137
+ const one = pendingPublish.length === 1;
33138
+ hints.push(
33139
+ `${pendingPublish.join(", ")} ${one ? "has" : "have"} not been published yet, so ${one ? "it is" : "they are"} filed in the page's own definition and will land in "${folder ?? "no folder"}" on the first publish.`
33140
+ );
33141
+ }
33142
+ if (unknown.length > 0) {
33143
+ hints.push(`No landing found for ${unknown.join(", ")} \u2014 neither published nor in this workspace. Check the slug.`);
33144
+ }
33145
+ if (problems.length > 0) {
33146
+ hints.push(
33147
+ `Filed in Baker, but could not record it in ${problems.join("; ")}. The page stays where you just put it; only its birth folder is unrecorded.`
33148
+ );
33149
+ }
33150
+ return hints;
33151
+ }
33152
+ var folderCommand = defineCommand143({
33153
+ meta: {
33154
+ name: "folder",
33155
+ description: `File landing pages into folders in Baker \u2014 how the user's Landings view is organised when there are more pages than fit on a screen.
33156
+
33157
+ A folder is nothing but the name its landings share: there is no folder to create, and the last page leaving one takes the folder with it. It is NOT part of the page's URL \u2014 filing a page never moves it.
33158
+
33159
+ Two things to know:
33160
+ - Run \`baker landing folder list\` BEFORE naming a folder, and reuse an existing name. A near-duplicate splits one group in two.
33161
+ - The user can also file pages themselves in the dashboard, and their filing wins. \`set\` records the folder in the page's definition too, so a page that has never been published is filed the moment it is.
33162
+
33163
+ Examples:
33164
+ baker landing folder list
33165
+ baker landing folder set maii-info maii-dossier --name Masters
33166
+ baker landing folder set old-promo --none
33167
+ Full guide: __tooling__/docs/tools/baker/landing.md`
33168
+ },
33169
+ subCommands: {
33170
+ list: listCommand13,
33171
+ set: setCommand
33172
+ },
33173
+ default: "list"
33174
+ });
33175
+
32875
33176
  // src/commands/landing/index.ts
32876
- var landingCommand = defineCommand143({
33177
+ var landingCommand = defineCommand144({
32877
33178
  meta: {
32878
33179
  name: "landing",
32879
- description: `Design-quality tools for landing pages (src/pages/<slug>/).
33180
+ description: `Tools for landing pages (src/pages/<slug>/): design quality, and how the pages are filed in Baker.
32880
33181
 
32881
33182
  Start here: \`baker landing critique <slug>\` after building or editing a landing.
32882
33183
 
32883
33184
  Subcommands:
32884
- baker landing critique <slug> \u2014 deterministic design-quality critic (advisory): flags the known AI 'slop' tells (gradient text, overused fonts, side-tab borders, cream palettes, buzzword copy, broken images) tiered block/warn/advisory, respecting the client's BRAND.md. Records the critique the publish quality gate requires \u2014 run it before finishing a landing.`
33185
+ baker landing critique <slug> \u2014 deterministic design-quality critic (advisory): flags the known AI 'slop' tells (gradient text, overused fonts, side-tab borders, cream palettes, buzzword copy, broken images) tiered block/warn/advisory, respecting the client's BRAND.md. Records the critique the publish quality gate requires \u2014 run it before finishing a landing.
33186
+ baker landing folder list \u2014 the folders this company already uses. Run BEFORE naming a folder and reuse one.
33187
+ baker landing folder set <slug\u2026> --name <folder> | --none \u2014 file pages into a folder in the user's Landings view (never changes a page's URL).`
32885
33188
  },
32886
33189
  subCommands: {
32887
- critique: critiqueCommand2
33190
+ critique: critiqueCommand2,
33191
+ folder: folderCommand
32888
33192
  }
32889
33193
  });
32890
33194
 
32891
33195
  // src/commands/mcp/index.ts
32892
- import { defineCommand as defineCommand144 } from "citty";
33196
+ import { defineCommand as defineCommand145 } from "citty";
32893
33197
 
32894
33198
  // src/commands/mcp/platforms.ts
32895
33199
  function readsKey(label) {
@@ -32944,7 +33248,7 @@ function parseHeaders(raw) {
32944
33248
  }
32945
33249
  return Object.keys(headers).length > 0 ? headers : void 0;
32946
33250
  }
32947
- function fail6(err) {
33251
+ function fail7(err) {
32948
33252
  if (err instanceof ApiError) {
32949
33253
  writeJson({ ok: false, error: { code: err.code, message: err.message } });
32950
33254
  process.exit(1);
@@ -32958,7 +33262,7 @@ registerSchema({
32958
33262
  description: "List everything this chat can reach: managed integrations (Attio, Slack, Gmail, Google Sheets, \u2026), custom MCP servers, and the platforms the company signed in to (HubSpot, Google Ads, GA4, Search Console, Tag Manager) which you read through their own `baker` commands. Start here when the user mentions an external tool or platform.",
32959
33263
  args: {}
32960
33264
  });
32961
- var connectedCommand = defineCommand144({
33265
+ var connectedCommand = defineCommand145({
32962
33266
  meta: {
32963
33267
  name: "connected",
32964
33268
  description: `Everything this chat can reach \u2014 managed integrations, custom MCP servers, and connected platforms.
@@ -33008,7 +33312,7 @@ A tool or platform the user names that is NOT listed anywhere here is simply not
33008
33312
  hints
33009
33313
  });
33010
33314
  } catch (err) {
33011
- fail6(err);
33315
+ fail7(err);
33012
33316
  }
33013
33317
  }
33014
33318
  });
@@ -33017,7 +33321,7 @@ registerSchema({
33017
33321
  description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
33018
33322
  args: {}
33019
33323
  });
33020
- var listCommand13 = defineCommand144({
33324
+ var listCommand14 = defineCommand145({
33021
33325
  meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
33022
33326
  run: async () => {
33023
33327
  try {
@@ -33036,7 +33340,7 @@ var listCommand13 = defineCommand144({
33036
33340
  } : {}
33037
33341
  });
33038
33342
  } catch (err) {
33039
- fail6(err);
33343
+ fail7(err);
33040
33344
  }
33041
33345
  }
33042
33346
  });
@@ -33054,7 +33358,7 @@ registerSchema({
33054
33358
  header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
33055
33359
  }
33056
33360
  });
33057
- var addCommand = defineCommand144({
33361
+ var addCommand = defineCommand145({
33058
33362
  meta: {
33059
33363
  name: "add",
33060
33364
  description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
@@ -33097,7 +33401,7 @@ Examples:
33097
33401
  ]
33098
33402
  });
33099
33403
  } catch (err) {
33100
- fail6(err);
33404
+ fail7(err);
33101
33405
  }
33102
33406
  }
33103
33407
  });
@@ -33106,7 +33410,7 @@ registerSchema({
33106
33410
  description: "Remove a company custom MCP server by name.",
33107
33411
  args: { name: { type: "string", description: "Server name to remove", required: true } }
33108
33412
  });
33109
- var removeCommand4 = defineCommand144({
33413
+ var removeCommand4 = defineCommand145({
33110
33414
  meta: {
33111
33415
  name: "remove",
33112
33416
  description: `Remove a company custom MCP server by name.
@@ -33124,11 +33428,11 @@ Example:
33124
33428
  });
33125
33429
  writeJson({ ok: true, data });
33126
33430
  } catch (err) {
33127
- fail6(err);
33431
+ fail7(err);
33128
33432
  }
33129
33433
  }
33130
33434
  });
33131
- var mcpCommand = defineCommand144({
33435
+ var mcpCommand = defineCommand145({
33132
33436
  meta: {
33133
33437
  name: "mcp",
33134
33438
  description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
@@ -33147,17 +33451,17 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
33147
33451
  },
33148
33452
  subCommands: {
33149
33453
  connected: connectedCommand,
33150
- list: listCommand13,
33454
+ list: listCommand14,
33151
33455
  add: addCommand,
33152
33456
  remove: removeCommand4
33153
33457
  }
33154
33458
  });
33155
33459
 
33156
33460
  // src/commands/research/index.ts
33157
- import { defineCommand as defineCommand155 } from "citty";
33461
+ import { defineCommand as defineCommand156 } from "citty";
33158
33462
 
33159
33463
  // src/commands/research/advertisers.ts
33160
- import { defineCommand as defineCommand145 } from "citty";
33464
+ import { defineCommand as defineCommand146 } from "citty";
33161
33465
 
33162
33466
  // src/commands/research/output.ts
33163
33467
  var RESEARCH_DATA_NOTE = "Estimates based on third-party SERP data \u2014 not exact figures. Use for directional insights, not precise measurement.";
@@ -33270,7 +33574,7 @@ var FIELDS3 = {
33270
33574
  etv: "Estimated traffic value (USD)",
33271
33575
  visibility: "SERP visibility score (0-1)"
33272
33576
  };
33273
- var advertisersCommand = defineCommand145({
33577
+ var advertisersCommand = defineCommand146({
33274
33578
  meta: {
33275
33579
  name: "advertisers",
33276
33580
  description: `Find domains competing for a keyword in Google SERPs.
@@ -33317,7 +33621,7 @@ Examples:
33317
33621
  });
33318
33622
 
33319
33623
  // src/commands/research/autocomplete.ts
33320
- import { defineCommand as defineCommand146 } from "citty";
33624
+ import { defineCommand as defineCommand147 } from "citty";
33321
33625
  registerSchema({
33322
33626
  command: "research.autocomplete",
33323
33627
  description: "Get Google Autocomplete suggestions for a seed keyword. Useful for keyword expansion and discovering what people actually search for. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en).",
@@ -33340,7 +33644,7 @@ registerSchema({
33340
33644
  var FIELDS4 = {
33341
33645
  suggestion: "Autocomplete suggestion from Google"
33342
33646
  };
33343
- var autocompleteCommand = defineCommand146({
33647
+ var autocompleteCommand = defineCommand147({
33344
33648
  meta: {
33345
33649
  name: "autocomplete",
33346
33650
  description: `Get Google Autocomplete suggestions for keyword expansion.
@@ -33386,7 +33690,7 @@ Examples:
33386
33690
  });
33387
33691
 
33388
33692
  // src/commands/research/countries.ts
33389
- import { defineCommand as defineCommand147 } from "citty";
33693
+ import { defineCommand as defineCommand148 } from "citty";
33390
33694
  registerSchema({
33391
33695
  command: "research.countries",
33392
33696
  description: "List all supported country codes for --location flag in research commands.",
@@ -33443,7 +33747,7 @@ var FIELDS5 = {
33443
33747
  code: "Country code to pass as --location",
33444
33748
  name: "Country name"
33445
33749
  };
33446
- var countriesCommand = defineCommand147({
33750
+ var countriesCommand = defineCommand148({
33447
33751
  meta: {
33448
33752
  name: "countries",
33449
33753
  description: "List all supported country codes for --location flag."
@@ -33454,7 +33758,7 @@ var countriesCommand = defineCommand147({
33454
33758
  });
33455
33759
 
33456
33760
  // src/commands/research/intent.ts
33457
- import { defineCommand as defineCommand148 } from "citty";
33761
+ import { defineCommand as defineCommand149 } from "citty";
33458
33762
  registerSchema({
33459
33763
  command: "research.intent",
33460
33764
  description: "Classify Google Search intent for keywords. Determines if someone searching is looking to buy, research, or navigate. IMPORTANT: If --language is omitted, defaults to English (en). The response includes a query_context object showing which language was used.",
@@ -33477,7 +33781,7 @@ var FIELDS6 = {
33477
33781
  intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
33478
33782
  probability: "Confidence score 0.0-1.0"
33479
33783
  };
33480
- var intentCommand = defineCommand148({
33784
+ var intentCommand = defineCommand149({
33481
33785
  meta: {
33482
33786
  name: "intent",
33483
33787
  description: `Classify Google Search intent for keywords. Returns intent type and confidence.
@@ -33525,7 +33829,7 @@ Examples:
33525
33829
  });
33526
33830
 
33527
33831
  // src/commands/research/keyword-gap.ts
33528
- import { defineCommand as defineCommand149 } from "citty";
33832
+ import { defineCommand as defineCommand150 } from "citty";
33529
33833
  registerSchema({
33530
33834
  command: "research.keyword-gap",
33531
33835
  description: "Find keywords a competitor ranks for (organic or paid) that you don't. Discovers expansion opportunities. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en). The response includes a query_context object showing which location/language were used.",
@@ -33554,7 +33858,7 @@ var FIELDS7 = {
33554
33858
  cpc: "Cost per click USD",
33555
33859
  their_position: "Competitor's ranking position"
33556
33860
  };
33557
- var keywordGapCommand = defineCommand149({
33861
+ var keywordGapCommand = defineCommand150({
33558
33862
  meta: {
33559
33863
  name: "keyword-gap",
33560
33864
  description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
@@ -33628,7 +33932,7 @@ Examples:
33628
33932
  });
33629
33933
 
33630
33934
  // src/commands/research/keywords-for-site.ts
33631
- import { defineCommand as defineCommand150 } from "citty";
33935
+ import { defineCommand as defineCommand151 } from "citty";
33632
33936
  registerSchema({
33633
33937
  command: "research.keywords-for-site",
33634
33938
  description: "Get keywords a competitor targets in Google. Use --type paid to see only paid keywords, --type organic for organic only. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en). The response includes a query_context object showing which location/language were used.",
@@ -33661,7 +33965,7 @@ var FIELDS8 = {
33661
33965
  competition: "LOW, MEDIUM, or HIGH",
33662
33966
  competition_index: "Competition score 0-100"
33663
33967
  };
33664
- var keywordsForSiteCommand = defineCommand150({
33968
+ var keywordsForSiteCommand = defineCommand151({
33665
33969
  meta: {
33666
33970
  name: "keywords-for-site",
33667
33971
  description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
@@ -33714,7 +34018,7 @@ Examples:
33714
34018
  });
33715
34019
 
33716
34020
  // src/commands/research/languages.ts
33717
- import { defineCommand as defineCommand151 } from "citty";
34021
+ import { defineCommand as defineCommand152 } from "citty";
33718
34022
  registerSchema({
33719
34023
  command: "research.languages",
33720
34024
  description: "List all supported language codes for --language flag in research commands.",
@@ -33744,7 +34048,7 @@ var FIELDS9 = {
33744
34048
  code: "Language code to pass as --language",
33745
34049
  name: "Language name (also accepted by --language)"
33746
34050
  };
33747
- var languagesCommand2 = defineCommand151({
34051
+ var languagesCommand2 = defineCommand152({
33748
34052
  meta: {
33749
34053
  name: "languages",
33750
34054
  description: "List all supported language codes for --language flag."
@@ -33755,7 +34059,7 @@ var languagesCommand2 = defineCommand151({
33755
34059
  });
33756
34060
 
33757
34061
  // src/commands/research/lighthouse.ts
33758
- import { defineCommand as defineCommand152 } from "citty";
34062
+ import { defineCommand as defineCommand153 } from "citty";
33759
34063
  registerSchema({
33760
34064
  command: "research.lighthouse",
33761
34065
  description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
@@ -33774,7 +34078,7 @@ var FIELDS10 = {
33774
34078
  speed_index_ms: "Speed Index in ms (good: < 3400)",
33775
34079
  interactive_ms: "Time to Interactive in ms (good: < 3800)"
33776
34080
  };
33777
- var lighthouseCommand = defineCommand152({
34081
+ var lighthouseCommand = defineCommand153({
33778
34082
  meta: {
33779
34083
  name: "lighthouse",
33780
34084
  description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
@@ -33812,7 +34116,7 @@ Examples:
33812
34116
  });
33813
34117
 
33814
34118
  // src/commands/research/relevant-pages.ts
33815
- import { defineCommand as defineCommand153 } from "citty";
34119
+ import { defineCommand as defineCommand154 } from "citty";
33816
34120
  registerSchema({
33817
34121
  command: "research.relevant-pages",
33818
34122
  description: "Get the top pages of a competitor domain with organic traffic and ranking data. Shows which pages drive the most traffic. IMPORTANT: If --location and --language are omitted, defaults to United States (us) and English (en).",
@@ -33838,7 +34142,7 @@ var FIELDS11 = {
33838
34142
  keywords: "Total organic keywords the page ranks for",
33839
34143
  top_10: "Keywords in positions 1-10"
33840
34144
  };
33841
- var relevantPagesCommand = defineCommand153({
34145
+ var relevantPagesCommand = defineCommand154({
33842
34146
  meta: {
33843
34147
  name: "relevant-pages",
33844
34148
  description: `Get the top pages of a competitor domain with traffic data.
@@ -33884,7 +34188,7 @@ Examples:
33884
34188
  });
33885
34189
 
33886
34190
  // src/commands/research/web.ts
33887
- import { defineCommand as defineCommand154 } from "citty";
34191
+ import { defineCommand as defineCommand155 } from "citty";
33888
34192
  registerSchema({
33889
34193
  command: "research.web",
33890
34194
  description: "Search the web with AI to answer marketing questions \u2014 competitors, ICP, pricing, pain points, market trends. Three depth levels: medium (quick, default), high (thorough), xhigh (exhaustive deep research).",
@@ -33935,7 +34239,7 @@ async function runDeepResearch(question) {
33935
34239
  }
33936
34240
  throw new Error("Deep research timed out");
33937
34241
  }
33938
- var webCommand = defineCommand154({
34242
+ var webCommand = defineCommand155({
33939
34243
  meta: {
33940
34244
  name: "web",
33941
34245
  description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
@@ -33995,7 +34299,7 @@ Examples:
33995
34299
  });
33996
34300
 
33997
34301
  // src/commands/research/index.ts
33998
- var researchCommand = defineCommand155({
34302
+ var researchCommand = defineCommand156({
33999
34303
  meta: {
34000
34304
  name: "research",
34001
34305
  description: `Competitive intelligence and AI-powered research commands.
@@ -34036,10 +34340,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
34036
34340
  });
34037
34341
 
34038
34342
  // src/commands/scheduled-actions/index.ts
34039
- import { defineCommand as defineCommand162 } from "citty";
34343
+ import { defineCommand as defineCommand163 } from "citty";
34040
34344
 
34041
34345
  // src/commands/scheduled-actions/create.ts
34042
- import { defineCommand as defineCommand156 } from "citty";
34346
+ import { defineCommand as defineCommand157 } from "citty";
34043
34347
 
34044
34348
  // src/commands/scheduled-actions/shared.ts
34045
34349
  var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
@@ -34154,7 +34458,7 @@ registerSchema({
34154
34458
  prompt: { type: "string", description: "Additional prompt instructions for the spawned agent", required: false }
34155
34459
  }
34156
34460
  });
34157
- var createCommand2 = defineCommand156({
34461
+ var createCommand2 = defineCommand157({
34158
34462
  meta: {
34159
34463
  name: "create",
34160
34464
  description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
@@ -34203,7 +34507,7 @@ var createCommand2 = defineCommand156({
34203
34507
  });
34204
34508
 
34205
34509
  // src/commands/scheduled-actions/delete.ts
34206
- import { defineCommand as defineCommand157 } from "citty";
34510
+ import { defineCommand as defineCommand158 } from "citty";
34207
34511
  registerSchema({
34208
34512
  command: "scheduled-actions.delete",
34209
34513
  description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
@@ -34211,7 +34515,7 @@ registerSchema({
34211
34515
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
34212
34516
  }
34213
34517
  });
34214
- var deleteCommand2 = defineCommand157({
34518
+ var deleteCommand2 = defineCommand158({
34215
34519
  meta: {
34216
34520
  name: "delete",
34217
34521
  description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
@@ -34240,7 +34544,7 @@ var deleteCommand2 = defineCommand157({
34240
34544
  });
34241
34545
 
34242
34546
  // src/commands/scheduled-actions/get.ts
34243
- import { defineCommand as defineCommand158 } from "citty";
34547
+ import { defineCommand as defineCommand159 } from "citty";
34244
34548
  registerSchema({
34245
34549
  command: "scheduled-actions.get",
34246
34550
  description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
@@ -34249,7 +34553,7 @@ registerSchema({
34249
34553
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
34250
34554
  }
34251
34555
  });
34252
- var getCommand3 = defineCommand158({
34556
+ var getCommand3 = defineCommand159({
34253
34557
  meta: {
34254
34558
  name: "get",
34255
34559
  description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
@@ -34288,7 +34592,7 @@ var getCommand3 = defineCommand158({
34288
34592
  });
34289
34593
 
34290
34594
  // src/commands/scheduled-actions/list.ts
34291
- import { defineCommand as defineCommand159 } from "citty";
34595
+ import { defineCommand as defineCommand160 } from "citty";
34292
34596
  registerSchema({
34293
34597
  command: "scheduled-actions.list",
34294
34598
  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.",
@@ -34296,7 +34600,7 @@ registerSchema({
34296
34600
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
34297
34601
  }
34298
34602
  });
34299
- var listCommand14 = defineCommand159({
34603
+ var listCommand15 = defineCommand160({
34300
34604
  meta: {
34301
34605
  name: "list",
34302
34606
  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."
@@ -34319,7 +34623,7 @@ var listCommand14 = defineCommand159({
34319
34623
  });
34320
34624
 
34321
34625
  // src/commands/scheduled-actions/trigger.ts
34322
- import { defineCommand as defineCommand160 } from "citty";
34626
+ import { defineCommand as defineCommand161 } from "citty";
34323
34627
  registerSchema({
34324
34628
  command: "scheduled-actions.trigger",
34325
34629
  description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
@@ -34327,7 +34631,7 @@ registerSchema({
34327
34631
  id: { type: "string", description: "Published scheduled action ID", required: true }
34328
34632
  }
34329
34633
  });
34330
- var triggerCommand = defineCommand160({
34634
+ var triggerCommand = defineCommand161({
34331
34635
  meta: {
34332
34636
  name: "trigger",
34333
34637
  description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
@@ -34364,7 +34668,7 @@ var triggerCommand = defineCommand160({
34364
34668
  });
34365
34669
 
34366
34670
  // src/commands/scheduled-actions/update.ts
34367
- import { defineCommand as defineCommand161 } from "citty";
34671
+ import { defineCommand as defineCommand162 } from "citty";
34368
34672
  registerSchema({
34369
34673
  command: "scheduled-actions.update",
34370
34674
  description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
@@ -34389,7 +34693,7 @@ registerSchema({
34389
34693
  prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
34390
34694
  }
34391
34695
  });
34392
- var updateCommand2 = defineCommand161({
34696
+ var updateCommand2 = defineCommand162({
34393
34697
  meta: {
34394
34698
  name: "update",
34395
34699
  description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
@@ -34460,7 +34764,7 @@ var updateCommand2 = defineCommand161({
34460
34764
  });
34461
34765
 
34462
34766
  // src/commands/scheduled-actions/index.ts
34463
- var scheduledActionsCommand = defineCommand162({
34767
+ var scheduledActionsCommand = defineCommand163({
34464
34768
  meta: {
34465
34769
  name: "scheduled-actions",
34466
34770
  description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger.
@@ -34477,7 +34781,7 @@ Examples:
34477
34781
  Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
34478
34782
  },
34479
34783
  subCommands: {
34480
- list: listCommand14,
34784
+ list: listCommand15,
34481
34785
  get: getCommand3,
34482
34786
  create: createCommand2,
34483
34787
  update: updateCommand2,
@@ -34487,14 +34791,14 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
34487
34791
  });
34488
34792
 
34489
34793
  // src/commands/schema.ts
34490
- import { defineCommand as defineCommand163 } from "citty";
34794
+ import { defineCommand as defineCommand164 } from "citty";
34491
34795
  function narrowToFamily(commandName, available) {
34492
34796
  const segments = commandName.split(".");
34493
34797
  const prefix = segments[0] === "ads" && segments[1] ? `ads.${segments[1]}.` : `${segments[0]}.`;
34494
34798
  const siblings = available.filter((name) => name.startsWith(prefix));
34495
34799
  return siblings.length > 0 ? siblings : available;
34496
34800
  }
34497
- var schemaCommand = defineCommand163({
34801
+ var schemaCommand = defineCommand164({
34498
34802
  meta: {
34499
34803
  name: "schema",
34500
34804
  description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
@@ -34538,10 +34842,10 @@ var schemaCommand = defineCommand163({
34538
34842
  });
34539
34843
 
34540
34844
  // src/commands/tag-manager/index.ts
34541
- import { defineCommand as defineCommand167 } from "citty";
34845
+ import { defineCommand as defineCommand168 } from "citty";
34542
34846
 
34543
34847
  // src/commands/tag-manager/draft.ts
34544
- import { defineCommand as defineCommand164 } from "citty";
34848
+ import { defineCommand as defineCommand165 } from "citty";
34545
34849
 
34546
34850
  // src/commands/tag-manager/shared.ts
34547
34851
  import { readFileSync as readFileSync13 } from "fs";
@@ -34608,10 +34912,10 @@ async function stageOp4(op) {
34608
34912
  handleError4(err);
34609
34913
  }
34610
34914
  }
34611
- async function draftAction3(path28, body, chat) {
34915
+ async function draftAction3(path29, body, chat) {
34612
34916
  const chatId = resolveChatId(chat);
34613
34917
  try {
34614
- const data = await apiPost(path28, { chatId, ...body });
34918
+ const data = await apiPost(path29, { chatId, ...body });
34615
34919
  writeJsonEnvelope({ ok: true, data });
34616
34920
  return data;
34617
34921
  } catch (err) {
@@ -34664,13 +34968,13 @@ registerSchema({
34664
34968
  chat: { type: "string", description: CHAT_READ_ARG.description, required: false }
34665
34969
  }
34666
34970
  });
34667
- var draftCommand4 = defineCommand164({
34971
+ var draftCommand4 = defineCommand165({
34668
34972
  meta: {
34669
34973
  name: "draft",
34670
34974
  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."
34671
34975
  },
34672
34976
  subCommands: {
34673
- list: defineCommand164({
34977
+ list: defineCommand165({
34674
34978
  meta: {
34675
34979
  name: "list",
34676
34980
  description: "Review everything staged on this chat (--json for the raw envelope)"
@@ -34683,7 +34987,7 @@ var draftCommand4 = defineCommand164({
34683
34987
  await draftList2(args.json === true, args.chat);
34684
34988
  }
34685
34989
  }),
34686
- show: defineCommand164({
34990
+ show: defineCommand165({
34687
34991
  meta: {
34688
34992
  name: "show",
34689
34993
  description: "Print the full staged payload for one change \u2014 the receipt to verify it looks right before publish (never truncated)."
@@ -34700,7 +35004,7 @@ var draftCommand4 = defineCommand164({
34700
35004
  );
34701
35005
  }
34702
35006
  }),
34703
- amend: defineCommand164({
35007
+ amend: defineCommand165({
34704
35008
  meta: {
34705
35009
  name: "amend",
34706
35010
  description: "Update a staged change in place \u2014 merges a JSON patch into its payload (objects deep-merge, null deletes a key, arrays/scalars replace) and re-validates. Use this instead of remove + re-create."
@@ -34717,7 +35021,7 @@ var draftCommand4 = defineCommand164({
34717
35021
  });
34718
35022
  }
34719
35023
  }),
34720
- remove: defineCommand164({
35024
+ remove: defineCommand165({
34721
35025
  meta: { name: "remove", description: "Remove one staged change (cascades to anything depending on it)" },
34722
35026
  args: { ref: { type: "positional", description: "Staged ref (gtm_temp_*) or target", required: false } },
34723
35027
  run: async ({ args }) => {
@@ -34726,7 +35030,7 @@ var draftCommand4 = defineCommand164({
34726
35030
  });
34727
35031
  }
34728
35032
  }),
34729
- clear: defineCommand164({
35033
+ clear: defineCommand165({
34730
35034
  meta: { name: "clear", description: "Discard all Tag Manager changes staged on this chat" },
34731
35035
  run: async () => {
34732
35036
  await draftAction3("/api/tag-manager/draft/clear", {});
@@ -34736,7 +35040,7 @@ var draftCommand4 = defineCommand164({
34736
35040
  });
34737
35041
 
34738
35042
  // src/commands/tag-manager/read.ts
34739
- import { defineCommand as defineCommand165 } from "citty";
35043
+ import { defineCommand as defineCommand166 } from "citty";
34740
35044
  registerSchema({
34741
35045
  command: "tagManager.containers",
34742
35046
  description: "List the Google Tag Manager containers this company's connection can reach. Every container the company connected is flagged `connected: true` \u2014 there can be several, and Baker may read and change all of them. Start here to confirm which containers you are managing.",
@@ -34777,7 +35081,7 @@ function containersHints(containers) {
34777
35081
  }))
34778
35082
  });
34779
35083
  }
34780
- var containersCommand = defineCommand165({
35084
+ var containersCommand = defineCommand166({
34781
35085
  meta: {
34782
35086
  name: "containers",
34783
35087
  description: `List Tag Manager containers reachable by this company's connection.
@@ -34794,7 +35098,7 @@ Start here:
34794
35098
  }
34795
35099
  }
34796
35100
  });
34797
- var readCommand = defineCommand165({
35101
+ var readCommand = defineCommand166({
34798
35102
  meta: {
34799
35103
  name: "read",
34800
35104
  description: `Read the current contents of the Tag Manager container \u2014 always do this before staging changes.
@@ -34836,7 +35140,7 @@ Examples:
34836
35140
  });
34837
35141
 
34838
35142
  // src/commands/tag-manager/write-commands.ts
34839
- import { defineCommand as defineCommand166 } from "citty";
35143
+ import { defineCommand as defineCommand167 } from "citty";
34840
35144
  var CONTAINER_ARG_DESCRIPTION = "Numeric container id (optional only when one container is connected \u2014 run `baker tag-manager containers`)";
34841
35145
  var ENTITIES = [
34842
35146
  {
@@ -34892,10 +35196,10 @@ for (const { entity, noun, createHint } of ENTITIES) {
34892
35196
  });
34893
35197
  }
34894
35198
  function entityCommand(entity, noun, example) {
34895
- return defineCommand166({
35199
+ return defineCommand167({
34896
35200
  meta: { name: entity, description: `Stage ${noun} changes on this chat's Tag Manager draft` },
34897
35201
  subCommands: {
34898
- create: defineCommand166({
35202
+ create: defineCommand167({
34899
35203
  meta: {
34900
35204
  name: "create",
34901
35205
  description: `Stage a new ${noun}
@@ -34917,7 +35221,7 @@ Examples:
34917
35221
  });
34918
35222
  }
34919
35223
  }),
34920
- update: defineCommand166({
35224
+ update: defineCommand167({
34921
35225
  meta: {
34922
35226
  name: "update",
34923
35227
  description: `Stage an update to an existing ${noun} (pass its id or path)`
@@ -34937,7 +35241,7 @@ Examples:
34937
35241
  });
34938
35242
  }
34939
35243
  }),
34940
- delete: defineCommand166({
35244
+ delete: defineCommand167({
34941
35245
  meta: { name: "delete", description: `Stage the deletion of a ${noun} (pass its id or path)` },
34942
35246
  args: {
34943
35247
  id: { type: "positional", description: `${noun} id or path`, required: false },
@@ -34958,7 +35262,7 @@ var exampleFor = (entity) => ENTITIES.find((e) => e.entity === entity)?.example
34958
35262
  var tagCommand = entityCommand("tag", "tag", exampleFor("tag"));
34959
35263
  var triggerCommand2 = entityCommand("trigger", "trigger", exampleFor("trigger"));
34960
35264
  var variableCommand = entityCommand("variable", "variable", exampleFor("variable"));
34961
- var folderCommand = entityCommand("folder", "folder", exampleFor("folder"));
35265
+ var folderCommand2 = entityCommand("folder", "folder", exampleFor("folder"));
34962
35266
  registerSchema({
34963
35267
  command: "tagManager.builtin",
34964
35268
  description: "Enable or disable Tag Manager built-in variables by type (e.g. clickUrl, pageUrl, formId). Built-in variables must be enabled before a trigger or tag can reference them as {{Click URL}}.",
@@ -34978,7 +35282,7 @@ function builtinTypes(args) {
34978
35282
  }
34979
35283
  return raw.split(",").map((entry) => entry.trim());
34980
35284
  }
34981
- var builtinCommand = defineCommand166({
35285
+ var builtinCommand = defineCommand167({
34982
35286
  meta: {
34983
35287
  name: "builtin",
34984
35288
  description: `Enable or disable built-in variables
@@ -34988,7 +35292,7 @@ Examples:
34988
35292
  baker tag-manager builtin disable --types formId`
34989
35293
  },
34990
35294
  subCommands: {
34991
- enable: defineCommand166({
35295
+ enable: defineCommand167({
34992
35296
  meta: { name: "enable", description: "Stage enabling built-in variables" },
34993
35297
  args: {
34994
35298
  types: { type: "string", description: "Comma-separated types", required: false },
@@ -35002,7 +35306,7 @@ Examples:
35002
35306
  });
35003
35307
  }
35004
35308
  }),
35005
- disable: defineCommand166({
35309
+ disable: defineCommand167({
35006
35310
  meta: { name: "disable", description: "Stage disabling built-in variables" },
35007
35311
  args: {
35008
35312
  types: { type: "string", description: "Comma-separated types", required: false },
@@ -35020,7 +35324,7 @@ Examples:
35020
35324
  });
35021
35325
 
35022
35326
  // src/commands/tag-manager/index.ts
35023
- var tagManagerCommand = defineCommand167({
35327
+ var tagManagerCommand = defineCommand168({
35024
35328
  meta: {
35025
35329
  name: "tag-manager",
35026
35330
  description: `Read and change what lives inside the client's Google Tag Manager container \u2014 tags, triggers, variables, folders and built-in variables.
@@ -35047,14 +35351,14 @@ Full guide: __tooling__/docs/tools/baker/tag-manager.md`
35047
35351
  tag: tagCommand,
35048
35352
  trigger: triggerCommand2,
35049
35353
  variable: variableCommand,
35050
- folder: folderCommand,
35354
+ folder: folderCommand2,
35051
35355
  builtin: builtinCommand,
35052
35356
  draft: draftCommand4
35053
35357
  }
35054
35358
  });
35055
35359
 
35056
35360
  // src/commands/tags/index.ts
35057
- import { defineCommand as defineCommand168 } from "citty";
35361
+ import { defineCommand as defineCommand169 } from "citty";
35058
35362
 
35059
35363
  // src/commands/tags/shared.ts
35060
35364
  function failApi3(err) {
@@ -35123,7 +35427,7 @@ async function listTags(json) {
35123
35427
  var listArgs9 = {
35124
35428
  json: { type: "boolean", description: "Print the raw JSON envelope instead of the readable list" }
35125
35429
  };
35126
- var listCommand15 = defineCommand168({
35430
+ var listCommand16 = defineCommand169({
35127
35431
  meta: {
35128
35432
  name: "list",
35129
35433
  description: "Effective tags for this chat (production + staged), with each tag's full readable config (secrets excluded) \u2014 reuse a stored value to pre-fill a change rather than asking the user. Refs printed here are what flow side-effect tagIds should use. Example: baker tags list"
@@ -35142,7 +35446,7 @@ async function listDraft3(chat) {
35142
35446
  failApi3(err);
35143
35447
  }
35144
35448
  }
35145
- var draftCommand5 = defineCommand168({
35449
+ var draftCommand5 = defineCommand169({
35146
35450
  meta: {
35147
35451
  name: "draft",
35148
35452
  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."
@@ -35152,7 +35456,7 @@ var draftCommand5 = defineCommand168({
35152
35456
  await listDraft3(args.chat);
35153
35457
  }
35154
35458
  });
35155
- var tagsCommand3 = defineCommand168({
35459
+ var tagsCommand3 = defineCommand169({
35156
35460
  meta: {
35157
35461
  name: "tags",
35158
35462
  description: `Read the client's marketing/analytics tags (Meta pixel, GA4, Google Ads, GTM, Clarity, Hotjar, \u2026) \u2014 production tags plus the changes staged in this chat.
@@ -35169,7 +35473,7 @@ Examples:
35169
35473
  Full guide: __tooling__/docs/tools/baker/tags.md`
35170
35474
  },
35171
35475
  subCommands: {
35172
- list: listCommand15,
35476
+ list: listCommand16,
35173
35477
  draft: draftCommand5
35174
35478
  },
35175
35479
  // Bare `baker tags` lists the effective tags. `args` stays so citty knows this
@@ -35181,10 +35485,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
35181
35485
  });
35182
35486
 
35183
35487
  // src/commands/testimonials/index.ts
35184
- import { defineCommand as defineCommand172 } from "citty";
35488
+ import { defineCommand as defineCommand173 } from "citty";
35185
35489
 
35186
35490
  // src/commands/testimonials/get.ts
35187
- import { defineCommand as defineCommand169 } from "citty";
35491
+ import { defineCommand as defineCommand170 } from "citty";
35188
35492
  registerSchema({
35189
35493
  command: "testimonials.get",
35190
35494
  description: "Get a single testimonial by ID",
@@ -35192,7 +35496,7 @@ registerSchema({
35192
35496
  id: { type: "string", description: "Testimonial ID", required: true }
35193
35497
  }
35194
35498
  });
35195
- var getCommand4 = defineCommand169({
35499
+ var getCommand4 = defineCommand170({
35196
35500
  meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
35197
35501
  args: {
35198
35502
  id: { type: "positional", description: "Testimonial ID", required: false },
@@ -35229,7 +35533,7 @@ var getCommand4 = defineCommand169({
35229
35533
  });
35230
35534
 
35231
35535
  // src/commands/testimonials/list.ts
35232
- import { defineCommand as defineCommand170 } from "citty";
35536
+ import { defineCommand as defineCommand171 } from "citty";
35233
35537
  registerSchema({
35234
35538
  command: "testimonials.list",
35235
35539
  description: "List testimonials with optional filters.",
@@ -35259,7 +35563,7 @@ registerSchema({
35259
35563
  limit: { type: "number", description: "Max results (default 50)", required: false, default: 50 }
35260
35564
  }
35261
35565
  });
35262
- var listCommand16 = defineCommand170({
35566
+ var listCommand17 = defineCommand171({
35263
35567
  meta: {
35264
35568
  name: "list",
35265
35569
  description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
@@ -35308,7 +35612,7 @@ var listCommand16 = defineCommand170({
35308
35612
  });
35309
35613
 
35310
35614
  // src/commands/testimonials/search.ts
35311
- import { defineCommand as defineCommand171 } from "citty";
35615
+ import { defineCommand as defineCommand172 } from "citty";
35312
35616
  function languageBiasHint(results, requestedLanguage) {
35313
35617
  if (requestedLanguage) {
35314
35618
  return null;
@@ -35386,7 +35690,7 @@ function buildSearchRequest(query, args) {
35386
35690
  }
35387
35691
  return body;
35388
35692
  }
35389
- var searchCommand2 = defineCommand171({
35693
+ var searchCommand2 = defineCommand172({
35390
35694
  meta: {
35391
35695
  name: "search",
35392
35696
  description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
@@ -35442,7 +35746,7 @@ var searchCommand2 = defineCommand171({
35442
35746
  var tagsCommand4 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
35443
35747
 
35444
35748
  // src/commands/testimonials/index.ts
35445
- var testimonialsCommand = defineCommand172({
35749
+ var testimonialsCommand = defineCommand173({
35446
35750
  meta: {
35447
35751
  name: "testimonials",
35448
35752
  description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
@@ -35458,16 +35762,16 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
35458
35762
  subCommands: {
35459
35763
  get: getCommand4,
35460
35764
  search: searchCommand2,
35461
- list: listCommand16,
35765
+ list: listCommand17,
35462
35766
  tags: tagsCommand4
35463
35767
  }
35464
35768
  });
35465
35769
 
35466
35770
  // src/commands/videos/index.ts
35467
- import { defineCommand as defineCommand177 } from "citty";
35771
+ import { defineCommand as defineCommand178 } from "citty";
35468
35772
 
35469
35773
  // src/commands/videos/delete.ts
35470
- import { defineCommand as defineCommand173 } from "citty";
35774
+ import { defineCommand as defineCommand174 } from "citty";
35471
35775
  registerSchema({
35472
35776
  command: "videos.delete",
35473
35777
  description: "Delete a video by ID",
@@ -35481,7 +35785,7 @@ registerSchema({
35481
35785
  }
35482
35786
  }
35483
35787
  });
35484
- var deleteCommand3 = defineCommand173({
35788
+ var deleteCommand3 = defineCommand174({
35485
35789
  meta: {
35486
35790
  name: "delete",
35487
35791
  description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
@@ -35522,7 +35826,7 @@ var deleteCommand3 = defineCommand173({
35522
35826
  });
35523
35827
 
35524
35828
  // src/commands/videos/get.ts
35525
- import { defineCommand as defineCommand174 } from "citty";
35829
+ import { defineCommand as defineCommand175 } from "citty";
35526
35830
  registerSchema({
35527
35831
  command: "videos.get",
35528
35832
  description: "Get a single video by ID",
@@ -35530,7 +35834,7 @@ registerSchema({
35530
35834
  id: { type: "string", description: "Video ID", required: true }
35531
35835
  }
35532
35836
  });
35533
- var getCommand5 = defineCommand174({
35837
+ var getCommand5 = defineCommand175({
35534
35838
  meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
35535
35839
  args: {
35536
35840
  id: { type: "positional", description: "Video ID", required: false },
@@ -35567,7 +35871,7 @@ var getCommand5 = defineCommand174({
35567
35871
  });
35568
35872
 
35569
35873
  // src/commands/videos/search.ts
35570
- import { defineCommand as defineCommand175 } from "citty";
35874
+ import { defineCommand as defineCommand176 } from "citty";
35571
35875
  registerSchema({
35572
35876
  command: "videos.search",
35573
35877
  description: "Search videos by text query. Only returns ready videos.",
@@ -35577,7 +35881,7 @@ registerSchema({
35577
35881
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
35578
35882
  }
35579
35883
  });
35580
- var searchCommand3 = defineCommand175({
35884
+ var searchCommand3 = defineCommand176({
35581
35885
  meta: {
35582
35886
  name: "search",
35583
35887
  description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
@@ -35627,9 +35931,9 @@ var searchCommand3 = defineCommand175({
35627
35931
  var tagsCommand5 = makeTagsCommand("videos", "video", "/api/videos/tags");
35628
35932
 
35629
35933
  // src/commands/videos/upload.ts
35630
- import { readFile as readFile23, stat as stat7 } from "fs/promises";
35934
+ import { readFile as readFile24, stat as stat7 } from "fs/promises";
35631
35935
  import { extname as extname3 } from "path";
35632
- import { defineCommand as defineCommand176 } from "citty";
35936
+ import { defineCommand as defineCommand177 } from "citty";
35633
35937
  var MIME_MAP = {
35634
35938
  ".mp4": "video/mp4",
35635
35939
  ".mov": "video/quicktime",
@@ -35663,7 +35967,7 @@ function detectContentType(filePath) {
35663
35967
  }
35664
35968
  return mime;
35665
35969
  }
35666
- var uploadCommand2 = defineCommand176({
35970
+ var uploadCommand2 = defineCommand177({
35667
35971
  meta: {
35668
35972
  name: "upload",
35669
35973
  description: "Upload a video file to Baker via Mux direct upload. Auto-detects content type. Example: baker videos upload ./demo.mp4"
@@ -35692,7 +35996,7 @@ var uploadCommand2 = defineCommand176({
35692
35996
  return;
35693
35997
  }
35694
35998
  const { uploadUrl, videoId } = await apiPost("/api/videos/upload", {});
35695
- const fileBuffer = await readFile23(filePath);
35999
+ const fileBuffer = await readFile24(filePath);
35696
36000
  const uploadResponse = await fetch(uploadUrl, {
35697
36001
  method: "PUT",
35698
36002
  headers: { "Content-Type": contentType },
@@ -35717,7 +36021,7 @@ var uploadCommand2 = defineCommand176({
35717
36021
  });
35718
36022
 
35719
36023
  // src/commands/videos/index.ts
35720
- var videosCommand = defineCommand177({
36024
+ var videosCommand = defineCommand178({
35721
36025
  meta: {
35722
36026
  name: "videos",
35723
36027
  description: `Find and manage videos in Baker. Subcommands: search, get, upload, delete, tags.
@@ -35741,10 +36045,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
35741
36045
  });
35742
36046
 
35743
36047
  // src/commands/winning-ads/index.ts
35744
- import { defineCommand as defineCommand190 } from "citty";
36048
+ import { defineCommand as defineCommand191 } from "citty";
35745
36049
 
35746
36050
  // src/commands/winning-ads/advertisers.ts
35747
- import { defineCommand as defineCommand178 } from "citty";
36051
+ import { defineCommand as defineCommand179 } from "citty";
35748
36052
 
35749
36053
  // src/commands/winning-ads/shared.ts
35750
36054
  function splitList(value) {
@@ -35797,7 +36101,7 @@ function advertiserNormalizer(record, full) {
35797
36101
  last_synced_at: record.last_synced_at ?? null
35798
36102
  };
35799
36103
  }
35800
- var advertisersCommand2 = defineCommand178({
36104
+ var advertisersCommand2 = defineCommand179({
35801
36105
  meta: {
35802
36106
  name: "advertisers",
35803
36107
  description: 'List corpus advertisers by name or domain. Find your own advertiser for --exclude-advertiser, or a competitor for --advertiser-id / winners. Example: baker winning-ads advertisers "Deel" --output md'
@@ -35855,7 +36159,7 @@ var advertisersCommand2 = defineCommand178({
35855
36159
  });
35856
36160
 
35857
36161
  // src/commands/winning-ads/brief.ts
35858
- import { defineCommand as defineCommand179 } from "citty";
36162
+ import { defineCommand as defineCommand180 } from "citty";
35859
36163
  registerSchema({
35860
36164
  command: "winning-ads.brief",
35861
36165
  description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
@@ -35901,7 +36205,7 @@ function parseDna(raw) {
35901
36205
  }
35902
36206
  return parsed;
35903
36207
  }
35904
- var briefCommand = defineCommand179({
36208
+ var briefCommand = defineCommand180({
35905
36209
  meta: {
35906
36210
  name: "brief",
35907
36211
  description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
@@ -35937,7 +36241,7 @@ var briefCommand = defineCommand179({
35937
36241
  });
35938
36242
 
35939
36243
  // src/commands/winning-ads/content.ts
35940
- import { defineCommand as defineCommand180 } from "citty";
36244
+ import { defineCommand as defineCommand181 } from "citty";
35941
36245
  registerSchema({
35942
36246
  command: "winning-ads.content",
35943
36247
  description: "Read what's INSIDE one winning ad: the spoken transcript, the on-screen text, and the ad copy. Use this after `search`/`winners`/`feed` return a shortlist \u2014 pass an ad_id to understand a reference before reproducing it. Add --full for speech, pacing, and soundtrack detail. Video ads carry the transcript/on-screen text; static ads carry only the copy.",
@@ -35950,7 +36254,7 @@ registerSchema({
35950
36254
  }
35951
36255
  }
35952
36256
  });
35953
- var contentCommand = defineCommand180({
36257
+ var contentCommand = defineCommand181({
35954
36258
  meta: {
35955
36259
  name: "content",
35956
36260
  description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
@@ -35999,7 +36303,7 @@ var contentCommand = defineCommand180({
35999
36303
  });
36000
36304
 
36001
36305
  // src/commands/winning-ads/feed.ts
36002
- import { defineCommand as defineCommand181 } from "citty";
36306
+ import { defineCommand as defineCommand182 } from "citty";
36003
36307
  function buildFeedParams(input) {
36004
36308
  const params = {};
36005
36309
  const advertiser = splitList(input.advertiser);
@@ -36051,7 +36355,7 @@ registerSchema({
36051
36355
  format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
36052
36356
  }
36053
36357
  });
36054
- var feedCommand = defineCommand181({
36358
+ var feedCommand = defineCommand182({
36055
36359
  meta: {
36056
36360
  name: "feed",
36057
36361
  description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
@@ -36136,7 +36440,7 @@ var feedCommand = defineCommand181({
36136
36440
  });
36137
36441
 
36138
36442
  // src/commands/winning-ads/follow.ts
36139
- import { defineCommand as defineCommand182 } from "citty";
36443
+ import { defineCommand as defineCommand183 } from "citty";
36140
36444
  var PLATFORMS = ["meta", "linkedin"];
36141
36445
  registerSchema({
36142
36446
  command: "winning-ads.follow",
@@ -36151,7 +36455,7 @@ registerSchema({
36151
36455
  label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
36152
36456
  }
36153
36457
  });
36154
- var followCommand = defineCommand182({
36458
+ var followCommand = defineCommand183({
36155
36459
  meta: {
36156
36460
  name: "follow",
36157
36461
  description: 'Follow a brand to track ALL its ads \u2014 every platform and country. --platform is how we read your input, not a limit. A domain tracks both Meta + LinkedIn. Example: baker winning-ads follow "deel.com" --platform meta'
@@ -36198,7 +36502,7 @@ var followCommand = defineCommand182({
36198
36502
  });
36199
36503
 
36200
36504
  // src/commands/winning-ads/follow-competitors.ts
36201
- import { defineCommand as defineCommand183 } from "citty";
36505
+ import { defineCommand as defineCommand184 } from "citty";
36202
36506
  var PLATFORMS2 = ["meta", "linkedin"];
36203
36507
  var BATCH_TIMEOUT_MS = 3e5;
36204
36508
  function buildFollowBatchBody(input) {
@@ -36231,7 +36535,7 @@ registerSchema({
36231
36535
  }
36232
36536
  }
36233
36537
  });
36234
- var followCompetitorsCommand = defineCommand183({
36538
+ var followCompetitorsCommand = defineCommand184({
36235
36539
  meta: {
36236
36540
  name: "follow-competitors",
36237
36541
  description: 'Follow many brands at once by domain \u2014 add every competitor in one call. Example: baker winning-ads follow-competitors "deel.com,notion.so,hubspot.com"'
@@ -36306,7 +36610,7 @@ var followCompetitorsCommand = defineCommand183({
36306
36610
  });
36307
36611
 
36308
36612
  // src/commands/winning-ads/following.ts
36309
- import { defineCommand as defineCommand184 } from "citty";
36613
+ import { defineCommand as defineCommand185 } from "citty";
36310
36614
  registerSchema({
36311
36615
  command: "winning-ads.following",
36312
36616
  description: "List the brands you follow in your ad-dna library, with each one's status (ready vs still adding) and cached ad counts.",
@@ -36339,7 +36643,7 @@ function followingNormalizer(record, full) {
36339
36643
  platforms: Array.isArray(record.platforms) ? record.platforms : []
36340
36644
  };
36341
36645
  }
36342
- var followingCommand = defineCommand184({
36646
+ var followingCommand = defineCommand185({
36343
36647
  meta: {
36344
36648
  name: "following",
36345
36649
  description: "List brands you follow, with status (ready / adding\u2026) and cached counts. Example: baker winning-ads following --output md"
@@ -36374,7 +36678,7 @@ var followingCommand = defineCommand184({
36374
36678
  });
36375
36679
 
36376
36680
  // src/commands/winning-ads/patterns.ts
36377
- import { defineCommand as defineCommand185 } from "citty";
36681
+ import { defineCommand as defineCommand186 } from "citty";
36378
36682
  registerSchema({
36379
36683
  command: "winning-ads.patterns",
36380
36684
  description: "Mine what separates two cohorts of ads: pass a comma-list of winning ad ids (--winners) and a comma-list of weaker ad ids (--duds). Returns the discriminating DNA fields.",
@@ -36413,7 +36717,7 @@ function discriminatorRow(record) {
36413
36717
  top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
36414
36718
  };
36415
36719
  }
36416
- var patternsCommand = defineCommand185({
36720
+ var patternsCommand = defineCommand186({
36417
36721
  meta: {
36418
36722
  name: "patterns",
36419
36723
  description: "Discover what separates winning ads from weak ones. Example: baker winning-ads patterns --winners a_1,a_2,a_3 --duds a_9,a_8 --output md"
@@ -36469,7 +36773,7 @@ var patternsCommand = defineCommand185({
36469
36773
  });
36470
36774
 
36471
36775
  // src/commands/winning-ads/search.ts
36472
- import { defineCommand as defineCommand186 } from "citty";
36776
+ import { defineCommand as defineCommand187 } from "citty";
36473
36777
  registerSchema({
36474
36778
  command: "winning-ads.search",
36475
36779
  description: "Search the ad-dna corpus of scored winning ads. Returns a lean shortlist (advertiser, summary, scores, media_url) to pick a reference to reproduce.",
@@ -36577,7 +36881,7 @@ function buildSearchBody(args) {
36577
36881
  }
36578
36882
  return body;
36579
36883
  }
36580
- var searchCommand4 = defineCommand186({
36884
+ var searchCommand4 = defineCommand187({
36581
36885
  meta: {
36582
36886
  name: "search",
36583
36887
  description: "Search winning reference ads. Example: baker winning-ads search 'B2B SaaS before/after AI automation' --platform meta --format static --winner-category winner --exclude-advertiser adv_123 --output md"
@@ -36692,7 +36996,7 @@ var searchCommand4 = defineCommand186({
36692
36996
  });
36693
36997
 
36694
36998
  // src/commands/winning-ads/seeds.ts
36695
- import { defineCommand as defineCommand187 } from "citty";
36999
+ import { defineCommand as defineCommand188 } from "citty";
36696
37000
  function leanRow(r) {
36697
37001
  return {
36698
37002
  key: r.key,
@@ -36720,7 +37024,7 @@ function makeSeedCommand(opts) {
36720
37024
  limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
36721
37025
  }
36722
37026
  });
36723
- return defineCommand187({
37027
+ return defineCommand188({
36724
37028
  meta: { name: opts.name, description: opts.description },
36725
37029
  args: {
36726
37030
  platform: { type: "string", description: "Single platform to segment on", required: false },
@@ -36769,7 +37073,7 @@ var formatsCommand = makeSeedCommand({
36769
37073
  });
36770
37074
 
36771
37075
  // src/commands/winning-ads/unfollow.ts
36772
- import { defineCommand as defineCommand188 } from "citty";
37076
+ import { defineCommand as defineCommand189 } from "citty";
36773
37077
  registerSchema({
36774
37078
  command: "winning-ads.unfollow",
36775
37079
  description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
@@ -36777,7 +37081,7 @@ registerSchema({
36777
37081
  advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
36778
37082
  }
36779
37083
  });
36780
- var unfollowCommand = defineCommand188({
37084
+ var unfollowCommand = defineCommand189({
36781
37085
  meta: {
36782
37086
  name: "unfollow",
36783
37087
  description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
@@ -36798,7 +37102,7 @@ var unfollowCommand = defineCommand188({
36798
37102
  });
36799
37103
 
36800
37104
  // src/commands/winning-ads/winners.ts
36801
- import { defineCommand as defineCommand189 } from "citty";
37105
+ import { defineCommand as defineCommand190 } from "citty";
36802
37106
  registerSchema({
36803
37107
  command: "winning-ads.winners",
36804
37108
  description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
@@ -36808,7 +37112,7 @@ registerSchema({
36808
37112
  platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
36809
37113
  }
36810
37114
  });
36811
- var winnersCommand = defineCommand189({
37115
+ var winnersCommand = defineCommand190({
36812
37116
  meta: {
36813
37117
  name: "winners",
36814
37118
  description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
@@ -36858,7 +37162,7 @@ var winnersCommand = defineCommand189({
36858
37162
  });
36859
37163
 
36860
37164
  // src/commands/winning-ads/index.ts
36861
- var winningAdsCommand = defineCommand190({
37165
+ var winningAdsCommand = defineCommand191({
36862
37166
  meta: {
36863
37167
  name: "winning-ads",
36864
37168
  description: `Search the ad-dna corpus of scored "winning" ads for reference creatives to reproduce, and manage the brands your library tracks. Proxied through the Baker backend (BAKER_API_KEY) \u2014 no separate token needed.
@@ -36930,7 +37234,7 @@ function getCliVersion() {
36930
37234
  }
36931
37235
 
36932
37236
  // src/cli.ts
36933
- var main = defineCommand191({
37237
+ var main = defineCommand192({
36934
37238
  meta: {
36935
37239
  name: "baker",
36936
37240
  version: getCliVersion(),