@koda-sl/baker-cli 0.153.0 → 0.154.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  toModelSafeImage,
37
37
  ulid,
38
38
  validateCanvasDeep
39
- } from "./chunk-OO5BDH3J.js";
39
+ } from "./chunk-7Z6C5OVO.js";
40
40
  import {
41
41
  csvOrJson,
42
42
  daysAgoIso,
@@ -75,7 +75,7 @@ import {
75
75
  } from "./chunk-RK67WL4O.js";
76
76
 
77
77
  // src/cli.ts
78
- import { defineCommand as defineCommand180, runMain } from "citty";
78
+ import { defineCommand as defineCommand181, runMain } from "citty";
79
79
 
80
80
  // src/commands/actions/index.ts
81
81
  import { defineCommand as defineCommand18 } from "citty";
@@ -2550,9 +2550,166 @@ var historyListResponseSchema = z7.object({
2550
2550
  data: z7.object({ entries: z7.array(historyEntrySchema) })
2551
2551
  });
2552
2552
 
2553
- // ../api/src/images.ts
2553
+ // ../api/src/hubspot.ts
2554
2554
  import { z as z8 } from "zod";
2555
- var imageSourceSchema = z8.enum([
2555
+ var hubspotEmbedTypeSchema = z8.enum(["legacy", "v4", "unknown"]);
2556
+ var hubspotPostSubmitActionSchema = z8.object({
2557
+ type: z8.enum(["redirect_url", "thank_you"]),
2558
+ value: z8.string()
2559
+ });
2560
+ var hubspotFormFieldSchema = z8.object({
2561
+ name: z8.string(),
2562
+ label: z8.string(),
2563
+ fieldType: z8.string(),
2564
+ objectTypeId: z8.string().optional(),
2565
+ required: z8.boolean().optional(),
2566
+ hidden: z8.boolean().optional(),
2567
+ placeholder: z8.string().optional(),
2568
+ description: z8.string().optional(),
2569
+ options: z8.array(z8.object({ label: z8.string(), value: z8.string() })).optional()
2570
+ });
2571
+ var hubspotFormSummarySchema = z8.object({
2572
+ id: z8.string(),
2573
+ name: z8.string(),
2574
+ embedType: hubspotEmbedTypeSchema,
2575
+ /** Total visible + hidden fields across every field group. */
2576
+ fieldCount: z8.number().int(),
2577
+ postSubmitAction: hubspotPostSubmitActionSchema.nullable()
2578
+ });
2579
+ var hubspotFormsListRequestSchema = z8.object({
2580
+ /** Case-insensitive substring match on the form name. */
2581
+ search: z8.string().min(1).max(200).optional(),
2582
+ /** Only forms whose post-submit action redirects away. */
2583
+ redirectingOnly: z8.boolean().optional(),
2584
+ embedType: hubspotEmbedTypeSchema.optional()
2585
+ });
2586
+ var hubspotFormsListResponseSchema = z8.object({
2587
+ ok: z8.literal(true),
2588
+ data: z8.object({
2589
+ /** Same for every form on the account — sent once, not per row. */
2590
+ portalId: z8.number().nullable(),
2591
+ forms: z8.array(hubspotFormSummarySchema)
2592
+ })
2593
+ });
2594
+ var hubspotFormsViewRequestSchema = z8.object({
2595
+ formId: z8.string().min(1),
2596
+ /** Include the untouched HubSpot payload alongside the summarized view. */
2597
+ full: z8.boolean().optional(),
2598
+ /**
2599
+ * Return the resource blob to write into a flow node's `form.external`
2600
+ * instead of the human-readable view.
2601
+ */
2602
+ asNode: z8.boolean().optional()
2603
+ });
2604
+ var hubspotFormDetailSchema = hubspotFormSummarySchema.extend({
2605
+ portalId: z8.number().nullable(),
2606
+ captchaEnabled: z8.boolean(),
2607
+ language: z8.string().nullable(),
2608
+ fields: z8.array(hubspotFormFieldSchema),
2609
+ /** HubSpot's "Data privacy and consent options"; `null` when not configured. */
2610
+ legalConsentType: z8.string().nullable(),
2611
+ raw: z8.record(z8.string(), z8.unknown()).optional()
2612
+ });
2613
+ var hubspotFormNodeExternalSchema = z8.object({
2614
+ id: z8.string(),
2615
+ name: z8.string(),
2616
+ providerId: z8.string(),
2617
+ portalId: z8.number(),
2618
+ embedType: z8.enum(["legacy", "v4"]).optional(),
2619
+ region: z8.string().optional(),
2620
+ captchaEnabled: z8.boolean(),
2621
+ fieldGroups: z8.array(z8.object({ fields: z8.array(hubspotFormFieldSchema) })),
2622
+ configuration: z8.object({ postSubmitAction: hubspotPostSubmitActionSchema }).optional(),
2623
+ legalConsentOptions: z8.record(z8.string(), z8.unknown()).optional()
2624
+ });
2625
+ var hubspotFormsViewResponseSchema = z8.object({
2626
+ ok: z8.literal(true),
2627
+ data: z8.object({
2628
+ form: hubspotFormDetailSchema.optional(),
2629
+ /** Present instead of `form` when `asNode` was requested. */
2630
+ external: hubspotFormNodeExternalSchema.optional()
2631
+ })
2632
+ });
2633
+ var hubspotMeetingFieldSchema = z8.object({
2634
+ name: z8.string(),
2635
+ label: z8.string(),
2636
+ fieldType: z8.string(),
2637
+ isRequired: z8.boolean(),
2638
+ isCustom: z8.boolean(),
2639
+ options: z8.array(z8.object({ label: z8.string(), value: z8.string() })).optional()
2640
+ });
2641
+ var hubspotMeetingSummarySchema = z8.object({
2642
+ id: z8.string(),
2643
+ name: z8.string(),
2644
+ slug: z8.string(),
2645
+ linkType: z8.string(),
2646
+ /**
2647
+ * Where HubSpot sends the visitor after booking. `null` means either "no
2648
+ * redirect" or "not known" — read `redirectKnown` before concluding.
2649
+ */
2650
+ redirectUrl: z8.string().nullable(),
2651
+ /**
2652
+ * False when the list endpoint omitted `customParams` entirely, in which case
2653
+ * `redirectUrl: null` is an absence of information, not a confirmed absence
2654
+ * of a redirect. `meetings view <slug>` resolves it.
2655
+ */
2656
+ redirectKnown: z8.boolean(),
2657
+ /**
2658
+ * Booking-form field count, or `null` when the list endpoint did not carry
2659
+ * `customParams` — HubSpot only populates those reliably on the per-slug
2660
+ * booking endpoint, so `meetings view <slug>` is the source of truth.
2661
+ */
2662
+ fieldCount: z8.number().int().nullable()
2663
+ });
2664
+ var hubspotMeetingsListRequestSchema = z8.object({
2665
+ search: z8.string().min(1).max(200).optional(),
2666
+ /** Only meeting links that redirect after booking. */
2667
+ redirectingOnly: z8.boolean().optional()
2668
+ });
2669
+ var hubspotMeetingsListResponseSchema = z8.object({
2670
+ ok: z8.literal(true),
2671
+ data: z8.object({ meetings: z8.array(hubspotMeetingSummarySchema) })
2672
+ });
2673
+ var hubspotMeetingsViewRequestSchema = z8.object({
2674
+ slug: z8.string().min(1),
2675
+ /**
2676
+ * Return the resource blob to write into a flow node's `form.external`
2677
+ * instead of the human-readable view.
2678
+ */
2679
+ asNode: z8.boolean().optional()
2680
+ });
2681
+ var hubspotMeetingDetailSchema = z8.object({
2682
+ name: z8.string(),
2683
+ slug: z8.string(),
2684
+ link: z8.string(),
2685
+ linkType: z8.string(),
2686
+ redirectUrl: z8.string().nullable(),
2687
+ fields: z8.array(hubspotMeetingFieldSchema)
2688
+ });
2689
+ var hubspotMeetingNodeExternalSchema = z8.object({
2690
+ name: z8.string(),
2691
+ slug: z8.string(),
2692
+ /** Non-empty: an empty booking link renders an iframe pointed at nothing. */
2693
+ link: z8.string().min(1),
2694
+ linkType: z8.enum(["PERSONAL_LINK", "GROUP_CALENDAR", "ROUND_ROBIN_CALENDAR"]),
2695
+ providerId: z8.string(),
2696
+ customParams: z8.object({
2697
+ formFields: z8.array(hubspotMeetingFieldSchema),
2698
+ redirectUrl: z8.string().nullable()
2699
+ })
2700
+ });
2701
+ var hubspotMeetingsViewResponseSchema = z8.object({
2702
+ ok: z8.literal(true),
2703
+ data: z8.object({
2704
+ meeting: hubspotMeetingDetailSchema.optional(),
2705
+ /** Present instead of `meeting` when `asNode` was requested. */
2706
+ external: hubspotMeetingNodeExternalSchema.optional()
2707
+ })
2708
+ });
2709
+
2710
+ // ../api/src/images.ts
2711
+ import { z as z9 } from "zod";
2712
+ var imageSourceSchema = z9.enum([
2556
2713
  "uploaded",
2557
2714
  "website",
2558
2715
  "google_testimonial",
@@ -2568,49 +2725,49 @@ var imageSourceSchema = z8.enum([
2568
2725
  "pinterest",
2569
2726
  "ai_generated"
2570
2727
  ]);
2571
- var imageStatusSchema = z8.enum(["uploading", "processing", "ready", "error"]);
2572
- var upscaleConfigSchema = z8.object({
2573
- model: z8.literal("philz1337x/crystal-upscaler"),
2574
- input: z8.object({
2575
- scale_factor: z8.number(),
2576
- creativity: z8.number(),
2577
- output_format: z8.string()
2728
+ var imageStatusSchema = z9.enum(["uploading", "processing", "ready", "error"]);
2729
+ var upscaleConfigSchema = z9.object({
2730
+ model: z9.literal("philz1337x/crystal-upscaler"),
2731
+ input: z9.object({
2732
+ scale_factor: z9.number(),
2733
+ creativity: z9.number(),
2734
+ output_format: z9.string()
2578
2735
  }),
2579
- status: z8.enum(["pending", "completed"])
2736
+ status: z9.enum(["pending", "completed"])
2580
2737
  });
2581
- var imageDocSchema = z8.object({
2582
- _id: z8.string(),
2583
- _creationTime: z8.number(),
2584
- companyId: z8.string(),
2585
- storageKey: z8.string(),
2738
+ var imageDocSchema = z9.object({
2739
+ _id: z9.string(),
2740
+ _creationTime: z9.number(),
2741
+ companyId: z9.string(),
2742
+ storageKey: z9.string(),
2586
2743
  upscaleConfig: upscaleConfigSchema.optional(),
2587
- upscaledStorageKey: z8.string().optional(),
2588
- name: z8.string(),
2589
- description: z8.string(),
2590
- tags: z8.array(z8.string()),
2591
- source: z8.string(),
2592
- externalId: z8.string().optional(),
2593
- externalUrl: z8.string().optional(),
2594
- contentHash: z8.string().optional(),
2595
- sourceId: z8.string().optional(),
2596
- descriptionContext: z8.string().optional(),
2597
- width: z8.number().optional(),
2598
- height: z8.number().optional(),
2599
- aspectRatio: z8.number().optional(),
2600
- dominantColor: z8.string().optional(),
2601
- imagePalette: z8.array(z8.string()).optional(),
2602
- thumbhashDataUri: z8.string().optional(),
2603
- isLightImage: z8.boolean().optional(),
2604
- descriptionEmbedding: z8.array(z8.number()).optional(),
2605
- imageEmbedding: z8.array(z8.number()).optional(),
2606
- searchText: z8.string().optional(),
2744
+ upscaledStorageKey: z9.string().optional(),
2745
+ name: z9.string(),
2746
+ description: z9.string(),
2747
+ tags: z9.array(z9.string()),
2748
+ source: z9.string(),
2749
+ externalId: z9.string().optional(),
2750
+ externalUrl: z9.string().optional(),
2751
+ contentHash: z9.string().optional(),
2752
+ sourceId: z9.string().optional(),
2753
+ descriptionContext: z9.string().optional(),
2754
+ width: z9.number().optional(),
2755
+ height: z9.number().optional(),
2756
+ aspectRatio: z9.number().optional(),
2757
+ dominantColor: z9.string().optional(),
2758
+ imagePalette: z9.array(z9.string()).optional(),
2759
+ thumbhashDataUri: z9.string().optional(),
2760
+ isLightImage: z9.boolean().optional(),
2761
+ descriptionEmbedding: z9.array(z9.number()).optional(),
2762
+ imageEmbedding: z9.array(z9.number()).optional(),
2763
+ searchText: z9.string().optional(),
2607
2764
  status: imageStatusSchema,
2608
- errorMessage: z8.string().optional(),
2609
- createdAt: z8.number(),
2610
- updatedAt: z8.number(),
2611
- imageUrl: z8.string()
2765
+ errorMessage: z9.string().optional(),
2766
+ createdAt: z9.number(),
2767
+ updatedAt: z9.number(),
2768
+ imageUrl: z9.string()
2612
2769
  });
2613
- var imageHitSourceSchema = z8.enum([
2770
+ var imageHitSourceSchema = z9.enum([
2614
2771
  "library",
2615
2772
  "magnific",
2616
2773
  "google_images",
@@ -2621,145 +2778,145 @@ var imageHitSourceSchema = z8.enum([
2621
2778
  "giphy",
2622
2779
  "pinterest"
2623
2780
  ]);
2624
- var imageHitSchema = z8.object({
2781
+ var imageHitSchema = z9.object({
2625
2782
  source: imageHitSourceSchema,
2626
- url: z8.string(),
2627
- thumbnailUrl: z8.string().optional(),
2628
- width: z8.number().optional(),
2629
- height: z8.number().optional(),
2630
- aspectRatio: z8.number().optional(),
2631
- dominantColor: z8.string().optional(),
2632
- externalId: z8.string().optional(),
2633
- externalUrl: z8.string().optional(),
2634
- providerMeta: z8.record(z8.string(), z8.unknown()).optional(),
2635
- descriptionContext: z8.string().optional(),
2636
- _id: z8.string().optional(),
2637
- name: z8.string().optional(),
2638
- description: z8.string().optional(),
2639
- tags: z8.array(z8.string()).optional(),
2640
- score: z8.number().optional(),
2641
- alsoInLibrary: z8.string().optional(),
2642
- prefetchedBytes: z8.string().optional(),
2643
- prefetchedContentType: z8.string().optional()
2783
+ url: z9.string(),
2784
+ thumbnailUrl: z9.string().optional(),
2785
+ width: z9.number().optional(),
2786
+ height: z9.number().optional(),
2787
+ aspectRatio: z9.number().optional(),
2788
+ dominantColor: z9.string().optional(),
2789
+ externalId: z9.string().optional(),
2790
+ externalUrl: z9.string().optional(),
2791
+ providerMeta: z9.record(z9.string(), z9.unknown()).optional(),
2792
+ descriptionContext: z9.string().optional(),
2793
+ _id: z9.string().optional(),
2794
+ name: z9.string().optional(),
2795
+ description: z9.string().optional(),
2796
+ tags: z9.array(z9.string()).optional(),
2797
+ score: z9.number().optional(),
2798
+ alsoInLibrary: z9.string().optional(),
2799
+ prefetchedBytes: z9.string().optional(),
2800
+ prefetchedContentType: z9.string().optional()
2644
2801
  });
2645
2802
  var ingestedImageHitSchema = imageHitSchema.extend({
2646
- imageId: z8.string().optional(),
2647
- imageUrl: z8.string().optional(),
2648
- deduped: z8.boolean().optional(),
2649
- sourceUrl: z8.string().optional()
2650
- });
2651
- var autoIngestItemSchema = z8.object({
2652
- imageId: z8.string(),
2653
- deduped: z8.boolean(),
2654
- imageUrl: z8.string(),
2655
- sourceUrl: z8.string(),
2656
- externalUrl: z8.string().optional()
2803
+ imageId: z9.string().optional(),
2804
+ imageUrl: z9.string().optional(),
2805
+ deduped: z9.boolean().optional(),
2806
+ sourceUrl: z9.string().optional()
2807
+ });
2808
+ var autoIngestItemSchema = z9.object({
2809
+ imageId: z9.string(),
2810
+ deduped: z9.boolean(),
2811
+ imageUrl: z9.string(),
2812
+ sourceUrl: z9.string(),
2813
+ externalUrl: z9.string().optional()
2657
2814
  });
2658
2815
  function providerHitsResponseSchema() {
2659
- return z8.object({
2660
- hits: z8.array(ingestedImageHitSchema),
2661
- ingested: z8.array(autoIngestItemSchema)
2816
+ return z9.object({
2817
+ hits: z9.array(ingestedImageHitSchema),
2818
+ ingested: z9.array(autoIngestItemSchema)
2662
2819
  });
2663
2820
  }
2664
- var imagesGetRequestSchema = z8.object({ id: z8.string().min(1, "Missing id parameter") });
2665
- var imagesSearchRequestSchema = z8.object({
2666
- query: z8.string().min(1),
2667
- limit: z8.coerce.number().int().positive().max(100).optional(),
2668
- aspectRatio: z8.string().optional(),
2669
- tags: z8.array(z8.string()).optional(),
2670
- source: z8.string().optional(),
2671
- externalUrlHost: z8.string().optional()
2672
- });
2673
- var imageSearchResultSchema = z8.object({
2674
- _id: z8.string(),
2675
- imageUrl: z8.string(),
2676
- name: z8.string(),
2677
- description: z8.string(),
2678
- tags: z8.array(z8.string()),
2679
- width: z8.number().optional(),
2680
- height: z8.number().optional(),
2681
- aspectRatio: z8.number().optional(),
2682
- dominantColor: z8.string().optional(),
2683
- imagePalette: z8.array(z8.string()).optional(),
2684
- source: z8.string(),
2685
- externalUrl: z8.string().optional(),
2686
- score: z8.number()
2687
- });
2688
- var imagesSearchResponseSchema = z8.array(imageSearchResultSchema);
2689
- var imagesUploadRequestSchema = z8.object({
2690
- base64: z8.string().min(1),
2691
- contentType: z8.string().min(1),
2692
- source: z8.string().optional(),
2693
- descriptionContext: z8.string().optional()
2694
- });
2695
- var imagesUploadResponseSchema = z8.object({ imageId: z8.string() });
2696
- var imagesDeleteRequestSchema = z8.object({ id: z8.string().min(1, "Missing image ID") });
2697
- var imagesDeleteResponseSchema = z8.object({ ok: z8.literal(true) });
2698
- var imagesUpscaleRequestSchema = z8.object({ imageId: z8.string().min(1, "Missing image ID") });
2699
- var imagesUpscaleResponseSchema = z8.object({
2700
- imageId: z8.string(),
2701
- status: z8.literal("processing")
2821
+ var imagesGetRequestSchema = z9.object({ id: z9.string().min(1, "Missing id parameter") });
2822
+ var imagesSearchRequestSchema = z9.object({
2823
+ query: z9.string().min(1),
2824
+ limit: z9.coerce.number().int().positive().max(100).optional(),
2825
+ aspectRatio: z9.string().optional(),
2826
+ tags: z9.array(z9.string()).optional(),
2827
+ source: z9.string().optional(),
2828
+ externalUrlHost: z9.string().optional()
2829
+ });
2830
+ var imageSearchResultSchema = z9.object({
2831
+ _id: z9.string(),
2832
+ imageUrl: z9.string(),
2833
+ name: z9.string(),
2834
+ description: z9.string(),
2835
+ tags: z9.array(z9.string()),
2836
+ width: z9.number().optional(),
2837
+ height: z9.number().optional(),
2838
+ aspectRatio: z9.number().optional(),
2839
+ dominantColor: z9.string().optional(),
2840
+ imagePalette: z9.array(z9.string()).optional(),
2841
+ source: z9.string(),
2842
+ externalUrl: z9.string().optional(),
2843
+ score: z9.number()
2844
+ });
2845
+ var imagesSearchResponseSchema = z9.array(imageSearchResultSchema);
2846
+ var imagesUploadRequestSchema = z9.object({
2847
+ base64: z9.string().min(1),
2848
+ contentType: z9.string().min(1),
2849
+ source: z9.string().optional(),
2850
+ descriptionContext: z9.string().optional()
2851
+ });
2852
+ var imagesUploadResponseSchema = z9.object({ imageId: z9.string() });
2853
+ var imagesDeleteRequestSchema = z9.object({ id: z9.string().min(1, "Missing image ID") });
2854
+ var imagesDeleteResponseSchema = z9.object({ ok: z9.literal(true) });
2855
+ var imagesUpscaleRequestSchema = z9.object({ imageId: z9.string().min(1, "Missing image ID") });
2856
+ var imagesUpscaleResponseSchema = z9.object({
2857
+ imageId: z9.string(),
2858
+ status: z9.literal("processing")
2702
2859
  });
2703
2860
  var IMAGES_FIND_SOURCES = ["library", "magnific", "google", "iconify", "giphy", "pinterest"];
2704
- var imagesFindRequestSchema = z8.object({
2705
- query: z8.string().min(1),
2706
- sources: z8.array(z8.enum(IMAGES_FIND_SOURCES)).optional(),
2707
- limit: z8.coerce.number().int().positive().max(50).optional(),
2708
- fallback: z8.boolean().optional(),
2709
- threshold: z8.number().min(0).max(1).optional(),
2710
- autoIngest: z8.coerce.number().int().min(0).max(20).optional(),
2711
- descriptionContext: z8.string().optional()
2712
- });
2713
- var imagesFindResponseSchema = z8.object({
2714
- groups: z8.object({
2715
- library: z8.array(imageHitSchema),
2716
- external: z8.array(ingestedImageHitSchema)
2861
+ var imagesFindRequestSchema = z9.object({
2862
+ query: z9.string().min(1),
2863
+ sources: z9.array(z9.enum(IMAGES_FIND_SOURCES)).optional(),
2864
+ limit: z9.coerce.number().int().positive().max(50).optional(),
2865
+ fallback: z9.boolean().optional(),
2866
+ threshold: z9.number().min(0).max(1).optional(),
2867
+ autoIngest: z9.coerce.number().int().min(0).max(20).optional(),
2868
+ descriptionContext: z9.string().optional()
2869
+ });
2870
+ var imagesFindResponseSchema = z9.object({
2871
+ groups: z9.object({
2872
+ library: z9.array(imageHitSchema),
2873
+ external: z9.array(ingestedImageHitSchema)
2717
2874
  }),
2718
- meta: z8.object({
2719
- counts: z8.record(z8.string(), z8.number()),
2720
- errors: z8.array(z8.object({ source: imageHitSourceSchema, message: z8.string() }))
2875
+ meta: z9.object({
2876
+ counts: z9.record(z9.string(), z9.number()),
2877
+ errors: z9.array(z9.object({ source: imageHitSourceSchema, message: z9.string() }))
2721
2878
  }),
2722
- ingested: z8.array(autoIngestItemSchema)
2723
- });
2724
- var imagesStockRequestSchema = z8.object({
2725
- query: z8.string().min(1),
2726
- orientation: z8.enum(["landscape", "portrait", "square", "panoramic"]).optional(),
2727
- contentType: z8.enum(["photo", "vector", "psd"]).optional(),
2728
- license: z8.enum(["freemium", "premium"]).optional(),
2729
- color: z8.string().optional(),
2730
- aiGenerated: z8.enum(["exclude", "only"]).optional(),
2731
- people: z8.enum(["include", "exclude", "only"]).optional(),
2732
- order: z8.enum(["relevance", "recent"]).optional(),
2733
- limit: z8.coerce.number().int().positive().max(50).optional(),
2734
- page: z8.coerce.number().int().positive().optional(),
2735
- autoIngest: z8.coerce.number().int().min(0).max(20).optional(),
2736
- descriptionContext: z8.string().optional()
2879
+ ingested: z9.array(autoIngestItemSchema)
2880
+ });
2881
+ var imagesStockRequestSchema = z9.object({
2882
+ query: z9.string().min(1),
2883
+ orientation: z9.enum(["landscape", "portrait", "square", "panoramic"]).optional(),
2884
+ contentType: z9.enum(["photo", "vector", "psd"]).optional(),
2885
+ license: z9.enum(["freemium", "premium"]).optional(),
2886
+ color: z9.string().optional(),
2887
+ aiGenerated: z9.enum(["exclude", "only"]).optional(),
2888
+ people: z9.enum(["include", "exclude", "only"]).optional(),
2889
+ order: z9.enum(["relevance", "recent"]).optional(),
2890
+ limit: z9.coerce.number().int().positive().max(50).optional(),
2891
+ page: z9.coerce.number().int().positive().optional(),
2892
+ autoIngest: z9.coerce.number().int().min(0).max(20).optional(),
2893
+ descriptionContext: z9.string().optional()
2737
2894
  });
2738
2895
  var imagesStockResponseSchema = providerHitsResponseSchema();
2739
- var imagesGoogleRequestSchema = z8.object({
2740
- query: z8.string().min(1),
2741
- type: z8.string().optional(),
2742
- size: z8.string().optional(),
2743
- color: z8.string().optional(),
2744
- safe: z8.enum(["off", "active"]).optional(),
2745
- limit: z8.coerce.number().int().positive().max(50).optional(),
2746
- autoIngest: z8.coerce.number().int().min(0).max(20).optional(),
2747
- descriptionContext: z8.string().optional()
2896
+ var imagesGoogleRequestSchema = z9.object({
2897
+ query: z9.string().min(1),
2898
+ type: z9.string().optional(),
2899
+ size: z9.string().optional(),
2900
+ color: z9.string().optional(),
2901
+ safe: z9.enum(["off", "active"]).optional(),
2902
+ limit: z9.coerce.number().int().positive().max(50).optional(),
2903
+ autoIngest: z9.coerce.number().int().min(0).max(20).optional(),
2904
+ descriptionContext: z9.string().optional()
2748
2905
  });
2749
2906
  var imagesGoogleResponseSchema = providerHitsResponseSchema();
2750
- var imagesPinterestRequestSchema = z8.object({
2751
- query: z8.string().min(1),
2752
- limit: z8.coerce.number().int().positive().max(20).optional(),
2753
- autoIngest: z8.coerce.number().int().min(0).max(20).optional(),
2754
- descriptionContext: z8.string().optional()
2907
+ var imagesPinterestRequestSchema = z9.object({
2908
+ query: z9.string().min(1),
2909
+ limit: z9.coerce.number().int().positive().max(20).optional(),
2910
+ autoIngest: z9.coerce.number().int().min(0).max(20).optional(),
2911
+ descriptionContext: z9.string().optional()
2755
2912
  });
2756
2913
  var imagesPinterestResponseSchema = providerHitsResponseSchema();
2757
- var rgbTriple = z8.tuple([
2758
- z8.number().int().min(0).max(255),
2759
- z8.number().int().min(0).max(255),
2760
- z8.number().int().min(0).max(255)
2914
+ var rgbTriple = z9.tuple([
2915
+ z9.number().int().min(0).max(255),
2916
+ z9.number().int().min(0).max(255),
2917
+ z9.number().int().min(0).max(255)
2761
2918
  ]);
2762
- var imageGenerateModelSchema = z8.enum([
2919
+ var imageGenerateModelSchema = z9.enum([
2763
2920
  "openai/gpt-image-2",
2764
2921
  // Legacy — see the registry entry; kept so pre-switch canvases still run.
2765
2922
  "openai/gpt-5.4-image-2",
@@ -2767,97 +2924,97 @@ var imageGenerateModelSchema = z8.enum([
2767
2924
  "google/gemini-3-pro-image-preview",
2768
2925
  "recraft/recraft-v4.1-pro-vector"
2769
2926
  ]);
2770
- var imagesGenerateRequestSchema = z8.object({
2771
- prompt: z8.string().min(1),
2927
+ var imagesGenerateRequestSchema = z9.object({
2928
+ prompt: z9.string().min(1),
2772
2929
  model: imageGenerateModelSchema.optional(),
2773
2930
  // Aspect ratio + size are validated loosely as strings; the per-model enum
2774
2931
  // lives in canvas-contract and OpenRouter rejects unsupported combinations.
2775
- aspectRatio: z8.string().optional(),
2776
- imageSize: z8.string().optional(),
2932
+ aspectRatio: z9.string().optional(),
2933
+ imageSize: z9.string().optional(),
2777
2934
  // Rendering quality (auto|low|medium|high) — honored by gpt-image / Gemini, ignored elsewhere.
2778
- quality: z8.enum(["auto", "low", "medium", "high"]).optional(),
2935
+ quality: z9.enum(["auto", "low", "medium", "high"]).optional(),
2779
2936
  // Recraft v4.1 Pro Vector levers (ignored by other models).
2780
- strength: z8.coerce.number().min(0).max(1).optional(),
2781
- rgbColors: z8.array(rgbTriple).optional(),
2937
+ strength: z9.coerce.number().min(0).max(1).optional(),
2938
+ rgbColors: z9.array(rgbTriple).optional(),
2782
2939
  backgroundRgbColor: rgbTriple.optional(),
2783
2940
  // Public image URLs used as visual references (multi-reference, in order).
2784
- referenceUrls: z8.array(z8.string().url()).optional(),
2785
- descriptionContext: z8.string().optional()
2786
- });
2787
- var generatedImageSchema = z8.object({
2788
- imageId: z8.string(),
2789
- deduped: z8.boolean(),
2790
- imageUrl: z8.string(),
2791
- width: z8.number().optional(),
2792
- height: z8.number().optional()
2793
- });
2794
- var imagesGenerateResponseSchema = z8.object({
2795
- model: z8.string(),
2796
- costUsd: z8.number(),
2797
- images: z8.array(generatedImageSchema)
2798
- });
2799
- var imagesLogoRequestSchema = z8.object({
2800
- domain: z8.string().min(1),
2801
- variant: z8.enum(["icon", "logo", "symbol"]).optional(),
2802
- autoIngest: z8.coerce.number().int().min(0).max(5).optional(),
2803
- descriptionContext: z8.string().optional()
2941
+ referenceUrls: z9.array(z9.string().url()).optional(),
2942
+ descriptionContext: z9.string().optional()
2943
+ });
2944
+ var generatedImageSchema = z9.object({
2945
+ imageId: z9.string(),
2946
+ deduped: z9.boolean(),
2947
+ imageUrl: z9.string(),
2948
+ width: z9.number().optional(),
2949
+ height: z9.number().optional()
2950
+ });
2951
+ var imagesGenerateResponseSchema = z9.object({
2952
+ model: z9.string(),
2953
+ costUsd: z9.number(),
2954
+ images: z9.array(generatedImageSchema)
2955
+ });
2956
+ var imagesLogoRequestSchema = z9.object({
2957
+ domain: z9.string().min(1),
2958
+ variant: z9.enum(["icon", "logo", "symbol"]).optional(),
2959
+ autoIngest: z9.coerce.number().int().min(0).max(5).optional(),
2960
+ descriptionContext: z9.string().optional()
2804
2961
  });
2805
2962
  var imagesLogoResponseSchema = providerHitsResponseSchema();
2806
- var imagesIconRequestSchema = z8.object({
2807
- name: z8.string().min(1),
2808
- set: z8.string().optional(),
2809
- color: z8.string().optional(),
2810
- width: z8.coerce.number().int().positive().optional(),
2811
- autoIngest: z8.coerce.number().int().min(0).max(20).optional(),
2812
- descriptionContext: z8.string().optional()
2963
+ var imagesIconRequestSchema = z9.object({
2964
+ name: z9.string().min(1),
2965
+ set: z9.string().optional(),
2966
+ color: z9.string().optional(),
2967
+ width: z9.coerce.number().int().positive().optional(),
2968
+ autoIngest: z9.coerce.number().int().min(0).max(20).optional(),
2969
+ descriptionContext: z9.string().optional()
2813
2970
  });
2814
2971
  var imagesIconResponseSchema = providerHitsResponseSchema();
2815
- var imagesExtractRequestSchema = z8.object({
2816
- url: z8.string().url(),
2817
- waitFor: z8.coerce.number().int().min(0).max(3e4).optional(),
2818
- limit: z8.coerce.number().int().positive().max(50).optional(),
2819
- autoIngest: z8.coerce.number().int().min(0).max(20).optional(),
2820
- descriptionContext: z8.string().optional()
2972
+ var imagesExtractRequestSchema = z9.object({
2973
+ url: z9.string().url(),
2974
+ waitFor: z9.coerce.number().int().min(0).max(3e4).optional(),
2975
+ limit: z9.coerce.number().int().positive().max(50).optional(),
2976
+ autoIngest: z9.coerce.number().int().min(0).max(20).optional(),
2977
+ descriptionContext: z9.string().optional()
2821
2978
  });
2822
2979
  var imagesExtractResponseSchema = providerHitsResponseSchema();
2823
- var imagesScreenshotRequestSchema = z8.object({
2824
- url: z8.string().url(),
2825
- fullPage: z8.boolean().optional(),
2826
- viewportWidth: z8.coerce.number().int().positive().max(3840).optional(),
2827
- viewportHeight: z8.coerce.number().int().positive().max(2160).optional(),
2828
- format: z8.enum(["webp", "png", "jpg"]).optional(),
2829
- descriptionContext: z8.string().optional()
2980
+ var imagesScreenshotRequestSchema = z9.object({
2981
+ url: z9.string().url(),
2982
+ fullPage: z9.boolean().optional(),
2983
+ viewportWidth: z9.coerce.number().int().positive().max(3840).optional(),
2984
+ viewportHeight: z9.coerce.number().int().positive().max(2160).optional(),
2985
+ format: z9.enum(["webp", "png", "jpg"]).optional(),
2986
+ descriptionContext: z9.string().optional()
2830
2987
  });
2831
2988
  var imagesScreenshotResponseSchema = providerHitsResponseSchema();
2832
- var imagesGiphyRequestSchema = z8.object({
2833
- query: z8.string().min(1).optional(),
2834
- trending: z8.coerce.boolean().optional(),
2835
- limit: z8.coerce.number().int().positive().max(50).optional(),
2836
- rating: z8.enum(["g", "pg", "pg-13", "r"]).optional(),
2837
- lang: z8.string().optional(),
2838
- autoIngest: z8.coerce.number().int().min(0).max(20).optional(),
2839
- descriptionContext: z8.string().optional()
2989
+ var imagesGiphyRequestSchema = z9.object({
2990
+ query: z9.string().min(1).optional(),
2991
+ trending: z9.coerce.boolean().optional(),
2992
+ limit: z9.coerce.number().int().positive().max(50).optional(),
2993
+ rating: z9.enum(["g", "pg", "pg-13", "r"]).optional(),
2994
+ lang: z9.string().optional(),
2995
+ autoIngest: z9.coerce.number().int().min(0).max(20).optional(),
2996
+ descriptionContext: z9.string().optional()
2840
2997
  });
2841
2998
  var imagesGifResponseSchema = providerHitsResponseSchema();
2842
2999
  var imagesStickerResponseSchema = providerHitsResponseSchema();
2843
- var imagesIngestRequestSchema = z8.object({
2844
- url: z8.string().url(),
3000
+ var imagesIngestRequestSchema = z9.object({
3001
+ url: z9.string().url(),
2845
3002
  // Validate source at the HTTP boundary so unknown values produce the standard
2846
3003
  // `{ code: "BAD_REQUEST", message }` shape instead of a plain Error from
2847
3004
  // `assertImageSource` inside the action.
2848
3005
  source: imageSourceSchema,
2849
- externalId: z8.string().optional(),
2850
- externalUrl: z8.string().optional(),
2851
- descriptionContext: z8.string().optional()
3006
+ externalId: z9.string().optional(),
3007
+ externalUrl: z9.string().optional(),
3008
+ descriptionContext: z9.string().optional()
2852
3009
  });
2853
- var imagesIngestResponseSchema = z8.object({
2854
- imageId: z8.string(),
2855
- deduped: z8.boolean(),
2856
- contentHash: z8.string()
3010
+ var imagesIngestResponseSchema = z9.object({
3011
+ imageId: z9.string(),
3012
+ deduped: z9.boolean(),
3013
+ contentHash: z9.string()
2857
3014
  });
2858
3015
 
2859
3016
  // ../api/src/tags.ts
2860
- import { z as z9 } from "zod";
3017
+ import { z as z10 } from "zod";
2861
3018
  var TAG_TYPES = [
2862
3019
  "meta",
2863
3020
  "amplitude",
@@ -2878,7 +3035,7 @@ var TAG_TYPES = [
2878
3035
  "recaptcha",
2879
3036
  "twitterAds"
2880
3037
  ];
2881
- var tagTypeSchema = z9.enum(TAG_TYPES);
3038
+ var tagTypeSchema = z10.enum(TAG_TYPES);
2882
3039
  var TAG_IDENTIFYING_FIELD = {
2883
3040
  meta: "pixelId",
2884
3041
  googleAds: "conversionID",
@@ -2899,218 +3056,218 @@ var TAG_IDENTIFYING_FIELD = {
2899
3056
  recaptcha: "siteKey",
2900
3057
  twitterAds: "pixelId"
2901
3058
  };
2902
- var tagDraftOpKindSchema = z9.enum(["create", "update", "delete"]);
2903
- var tagDraftOpViewSchema = z9.object({
3059
+ var tagDraftOpKindSchema = z10.enum(["create", "update", "delete"]);
3060
+ var tagDraftOpViewSchema = z10.object({
2904
3061
  /** `tag_temp_*` for staged creates; the real tag id for update/delete ops. */
2905
- ref: z9.string(),
3062
+ ref: z10.string(),
2906
3063
  kind: tagDraftOpKindSchema,
2907
3064
  type: tagTypeSchema,
2908
3065
  /** Present on update/delete ops — the real tag this op targets. */
2909
- tagId: z9.string().optional(),
3066
+ tagId: z10.string().optional(),
2910
3067
  /** Non-secret config (create: full; update: the staged patch). Secrets are structurally absent. */
2911
- config: z9.record(z9.string(), z9.string()),
3068
+ config: z10.record(z10.string(), z10.string()),
2912
3069
  /** Update only — fields the op explicitly clears. */
2913
- clearFields: z9.array(z9.string()).optional(),
3070
+ clearFields: z10.array(z10.string()).optional(),
2914
3071
  /** Names of secret fields already provided via the dashboard secure form. Never values. */
2915
- secretsSet: z9.array(z9.string()),
3072
+ secretsSet: z10.array(z10.string()),
2916
3073
  /** Names of secret fields still awaiting user input. */
2917
- secretsPending: z9.array(z9.string()),
2918
- summary: z9.string(),
2919
- stagedAt: z9.number()
3074
+ secretsPending: z10.array(z10.string()),
3075
+ summary: z10.string(),
3076
+ stagedAt: z10.number()
2920
3077
  });
2921
- var tagsEffectiveEntrySchema = z9.object({
3078
+ var tagsEffectiveEntrySchema = z10.object({
2922
3079
  /** Real tag id, or `tag_temp_*` for staged creates. Use as flow side-effect `tagIds` value. */
2923
- ref: z9.string(),
2924
- tagId: z9.string().optional(),
3080
+ ref: z10.string(),
3081
+ tagId: z10.string().optional(),
2925
3082
  type: tagTypeSchema,
2926
3083
  /** Value of the type's identifying field, when set. */
2927
- identifier: z9.string().optional(),
3084
+ identifier: z10.string().optional(),
2928
3085
  /** Redacted config; for staged updates, production config with the patch merged. */
2929
- config: z9.record(z9.string(), z9.string()),
3086
+ config: z10.record(z10.string(), z10.string()),
2930
3087
  /** Absent = live production tag with no staged changes in this chat. */
2931
3088
  staged: tagDraftOpKindSchema.optional(),
2932
- secretsSet: z9.array(z9.string()),
2933
- secretsPending: z9.array(z9.string())
3089
+ secretsSet: z10.array(z10.string()),
3090
+ secretsPending: z10.array(z10.string())
2934
3091
  });
2935
- var tagsListRequestSchema = z9.object({ chatId: z9.string() });
2936
- var tagsListResponseSchema = z9.object({ tags: z9.array(tagsEffectiveEntrySchema) });
2937
- var tagsDraftListRequestSchema = z9.object({ chatId: z9.string() });
2938
- var tagsDraftListResponseSchema = z9.object({
2939
- status: z9.enum(["active", "publishing", "applied", "discarded", "none"]),
2940
- ops: z9.array(tagDraftOpViewSchema)
3092
+ var tagsListRequestSchema = z10.object({ chatId: z10.string() });
3093
+ var tagsListResponseSchema = z10.object({ tags: z10.array(tagsEffectiveEntrySchema) });
3094
+ var tagsDraftListRequestSchema = z10.object({ chatId: z10.string() });
3095
+ var tagsDraftListResponseSchema = z10.object({
3096
+ status: z10.enum(["active", "publishing", "applied", "discarded", "none"]),
3097
+ ops: z10.array(tagDraftOpViewSchema)
2941
3098
  });
2942
- var tagInputRequestSchema = z9.object({
3099
+ var tagInputRequestSchema = z10.object({
2943
3100
  // Every tag change is a tab in the approval form: create/edit show the full
2944
3101
  // body; delete shows a confirm. No tag change bypasses this approval.
2945
- mode: z9.enum(["create", "edit", "delete"]),
3102
+ mode: z10.enum(["create", "edit", "delete"]),
2946
3103
  tagType: tagTypeSchema,
2947
3104
  /** Edit/delete mode — the real tag id or `tag_temp_*` ref being changed. */
2948
- ref: z9.string().optional(),
3105
+ ref: z10.string().optional(),
2949
3106
  /** Non-secret values the agent proposes to prefill. Secret keys are stripped at every boundary. */
2950
- prefilledConfig: z9.record(z9.string(), z9.string()).optional(),
3107
+ prefilledConfig: z10.record(z10.string(), z10.string()).optional(),
2951
3108
  /** Secret field names the agent asks the user to provide. */
2952
- requestedSecretFields: z9.array(z9.string()).optional(),
3109
+ requestedSecretFields: z10.array(z10.string()).optional(),
2953
3110
  /** Short message shown above the form explaining why the input is needed. */
2954
- message: z9.string().optional()
3111
+ message: z10.string().optional()
2955
3112
  });
2956
- var tagChangeToolInputSchema = z9.object({
2957
- changes: z9.array(tagInputRequestSchema).min(1).max(8)
3113
+ var tagChangeToolInputSchema = z10.object({
3114
+ changes: z10.array(tagInputRequestSchema).min(1).max(8)
2958
3115
  });
2959
- var tagInputResultSchema = z9.discriminatedUnion("status", [
2960
- z9.object({
2961
- status: z9.literal("submitted"),
2962
- ref: z9.string(),
3116
+ var tagInputResultSchema = z10.discriminatedUnion("status", [
3117
+ z10.object({
3118
+ status: z10.literal("submitted"),
3119
+ ref: z10.string(),
2963
3120
  type: tagTypeSchema,
2964
3121
  /** Identifying field name → value (non-secret), when the type has one. */
2965
- identifier: z9.record(z9.string(), z9.string()).optional(),
2966
- secretFieldsSet: z9.array(z9.string()),
2967
- note: z9.string().optional()
3122
+ identifier: z10.record(z10.string(), z10.string()).optional(),
3123
+ secretFieldsSet: z10.array(z10.string()),
3124
+ note: z10.string().optional()
2968
3125
  }),
2969
- z9.object({
2970
- status: z9.literal("declined"),
2971
- reason: z9.string().optional()
3126
+ z10.object({
3127
+ status: z10.literal("declined"),
3128
+ reason: z10.string().optional()
2972
3129
  })
2973
3130
  ]);
2974
- var tagChangeToolResultSchema = z9.object({
2975
- results: z9.array(tagInputResultSchema)
3131
+ var tagChangeToolResultSchema = z10.object({
3132
+ results: z10.array(tagInputResultSchema)
2976
3133
  });
2977
3134
 
2978
3135
  // ../api/src/testimonials.ts
2979
- import { z as z10 } from "zod";
2980
- var testimonialSourceTypeSchema = z10.enum(["google", "trustpilot"]);
2981
- var testimonialStatusSchema = z10.enum(["pending", "processing", "ready", "error"]);
2982
- var testimonialSentimentSchema = z10.enum(["positive", "neutral", "negative"]);
2983
- var testimonialDocSchema = z10.object({
2984
- _id: z10.string(),
2985
- _creationTime: z10.number(),
2986
- companyId: z10.string(),
2987
- sourceId: z10.string(),
3136
+ import { z as z11 } from "zod";
3137
+ var testimonialSourceTypeSchema = z11.enum(["google", "trustpilot"]);
3138
+ var testimonialStatusSchema = z11.enum(["pending", "processing", "ready", "error"]);
3139
+ var testimonialSentimentSchema = z11.enum(["positive", "neutral", "negative"]);
3140
+ var testimonialDocSchema = z11.object({
3141
+ _id: z11.string(),
3142
+ _creationTime: z11.number(),
3143
+ companyId: z11.string(),
3144
+ sourceId: z11.string(),
2988
3145
  sourceType: testimonialSourceTypeSchema,
2989
- reviewText: z10.string(),
2990
- reviewTitle: z10.string().optional(),
2991
- searchText: z10.string().optional(),
2992
- reviewerName: z10.string().optional(),
2993
- reviewerImageUrl: z10.string().optional(),
2994
- reviewerImageId: z10.string().optional(),
2995
- reviewerLocation: z10.string().optional(),
2996
- rating: z10.number().optional(),
2997
- reviewDate: z10.number().optional(),
2998
- ownerAnswer: z10.string().optional(),
2999
- mediaUrls: z10.array(z10.string()).optional(),
3000
- imageIds: z10.array(z10.string()).optional(),
3001
- videoIds: z10.array(z10.string()).optional(),
3002
- sourceUrl: z10.string().optional(),
3003
- rawData: z10.unknown().optional(),
3004
- tags: z10.array(z10.string()),
3005
- highlight: z10.string().optional(),
3006
- language: z10.string().optional(),
3007
- summary: z10.string().optional(),
3146
+ reviewText: z11.string(),
3147
+ reviewTitle: z11.string().optional(),
3148
+ searchText: z11.string().optional(),
3149
+ reviewerName: z11.string().optional(),
3150
+ reviewerImageUrl: z11.string().optional(),
3151
+ reviewerImageId: z11.string().optional(),
3152
+ reviewerLocation: z11.string().optional(),
3153
+ rating: z11.number().optional(),
3154
+ reviewDate: z11.number().optional(),
3155
+ ownerAnswer: z11.string().optional(),
3156
+ mediaUrls: z11.array(z11.string()).optional(),
3157
+ imageIds: z11.array(z11.string()).optional(),
3158
+ videoIds: z11.array(z11.string()).optional(),
3159
+ sourceUrl: z11.string().optional(),
3160
+ rawData: z11.unknown().optional(),
3161
+ tags: z11.array(z11.string()),
3162
+ highlight: z11.string().optional(),
3163
+ language: z11.string().optional(),
3164
+ summary: z11.string().optional(),
3008
3165
  sentiment: testimonialSentimentSchema.optional(),
3009
- textEmbedding: z10.array(z10.number()).optional(),
3010
- externalId: z10.string().optional(),
3011
- contentHash: z10.string().optional(),
3166
+ textEmbedding: z11.array(z11.number()).optional(),
3167
+ externalId: z11.string().optional(),
3168
+ contentHash: z11.string().optional(),
3012
3169
  status: testimonialStatusSchema,
3013
- errorMessage: z10.string().optional(),
3014
- createdAt: z10.number(),
3015
- updatedAt: z10.number()
3170
+ errorMessage: z11.string().optional(),
3171
+ createdAt: z11.number(),
3172
+ updatedAt: z11.number()
3016
3173
  });
3017
- var testimonialsListRequestSchema = z10.object({
3174
+ var testimonialsListRequestSchema = z11.object({
3018
3175
  source: testimonialSourceTypeSchema.optional(),
3019
- rating_min: z10.coerce.number().int().min(1).max(5).optional(),
3020
- rating_max: z10.coerce.number().int().min(1).max(5).optional(),
3021
- tags: z10.string().transform((s) => s.split(",").filter(Boolean)).optional(),
3176
+ rating_min: z11.coerce.number().int().min(1).max(5).optional(),
3177
+ rating_max: z11.coerce.number().int().min(1).max(5).optional(),
3178
+ tags: z11.string().transform((s) => s.split(",").filter(Boolean)).optional(),
3022
3179
  status: testimonialStatusSchema.optional(),
3023
3180
  sentiment: testimonialSentimentSchema.optional(),
3024
- language: z10.string().min(2).max(5).optional(),
3025
- limit: z10.coerce.number().int().positive().max(200).optional()
3026
- });
3027
- var testimonialsListResponseSchema = z10.array(testimonialDocSchema);
3028
- var testimonialsGetRequestSchema = z10.object({ id: z10.string().min(1, "Missing id parameter") });
3029
- var testimonialsSearchRequestSchema = z10.object({
3030
- query: z10.string().min(1),
3031
- limit: z10.coerce.number().int().positive().max(100).optional(),
3181
+ language: z11.string().min(2).max(5).optional(),
3182
+ limit: z11.coerce.number().int().positive().max(200).optional()
3183
+ });
3184
+ var testimonialsListResponseSchema = z11.array(testimonialDocSchema);
3185
+ var testimonialsGetRequestSchema = z11.object({ id: z11.string().min(1, "Missing id parameter") });
3186
+ var testimonialsSearchRequestSchema = z11.object({
3187
+ query: z11.string().min(1),
3188
+ limit: z11.coerce.number().int().positive().max(100).optional(),
3032
3189
  source: testimonialSourceTypeSchema.optional(),
3033
- rating_min: z10.coerce.number().int().min(1).max(5).optional(),
3034
- rating_max: z10.coerce.number().int().min(1).max(5).optional(),
3035
- tags: z10.array(z10.string()).optional(),
3190
+ rating_min: z11.coerce.number().int().min(1).max(5).optional(),
3191
+ rating_max: z11.coerce.number().int().min(1).max(5).optional(),
3192
+ tags: z11.array(z11.string()).optional(),
3036
3193
  status: testimonialStatusSchema.optional(),
3037
3194
  sentiment: testimonialSentimentSchema.optional(),
3038
- language: z10.string().min(2).max(5).optional()
3195
+ language: z11.string().min(2).max(5).optional()
3039
3196
  }).refine(
3040
3197
  (data) => data.rating_min === void 0 || data.rating_max === void 0 || data.rating_min <= data.rating_max,
3041
3198
  { message: "rating_min must be less than or equal to rating_max" }
3042
3199
  );
3043
- var testimonialsSearchResponseSchema = z10.array(testimonialDocSchema);
3044
- var testimonialsOutscraperWebhookResponseSchema = z10.object({
3045
- ok: z10.literal(true),
3046
- note: z10.string().optional()
3200
+ var testimonialsSearchResponseSchema = z11.array(testimonialDocSchema);
3201
+ var testimonialsOutscraperWebhookResponseSchema = z11.object({
3202
+ ok: z11.literal(true),
3203
+ note: z11.string().optional()
3047
3204
  });
3048
3205
 
3049
3206
  // ../api/src/videos.ts
3050
- import { z as z11 } from "zod";
3051
- var videoStatusSchema = z11.enum(["uploading", "uploaded", "processing", "ready", "error"]);
3052
- var videoTranscriptSegmentSchema = z11.object({
3053
- text: z11.string(),
3054
- startSecond: z11.number(),
3055
- endSecond: z11.number()
3056
- });
3057
- var videoSceneSchema = z11.object({
3058
- title: z11.string(),
3059
- description: z11.string(),
3060
- startSecond: z11.number(),
3061
- endSecond: z11.number(),
3062
- thumbnailTime: z11.number()
3063
- });
3064
- var videoDocSchema = z11.object({
3065
- _id: z11.string(),
3066
- _creationTime: z11.number(),
3067
- companyId: z11.string(),
3068
- muxAssetId: z11.string(),
3069
- muxPlaybackId: z11.string(),
3070
- muxUploadId: z11.string(),
3071
- name: z11.string(),
3072
- description: z11.string(),
3073
- tags: z11.array(z11.string()),
3074
- source: z11.string(),
3075
- externalId: z11.string().optional(),
3076
- sourceId: z11.string().optional(),
3077
- width: z11.number().optional(),
3078
- height: z11.number().optional(),
3079
- aspectRatio: z11.number().optional(),
3080
- duration: z11.number().optional(),
3081
- transcript: z11.string().optional(),
3082
- transcriptSegments: z11.array(videoTranscriptSegmentSchema).optional(),
3083
- scenes: z11.array(videoSceneSchema).optional(),
3084
- descriptionEmbedding: z11.array(z11.number()).optional(),
3085
- searchText: z11.string().optional(),
3207
+ import { z as z12 } from "zod";
3208
+ var videoStatusSchema = z12.enum(["uploading", "uploaded", "processing", "ready", "error"]);
3209
+ var videoTranscriptSegmentSchema = z12.object({
3210
+ text: z12.string(),
3211
+ startSecond: z12.number(),
3212
+ endSecond: z12.number()
3213
+ });
3214
+ var videoSceneSchema = z12.object({
3215
+ title: z12.string(),
3216
+ description: z12.string(),
3217
+ startSecond: z12.number(),
3218
+ endSecond: z12.number(),
3219
+ thumbnailTime: z12.number()
3220
+ });
3221
+ var videoDocSchema = z12.object({
3222
+ _id: z12.string(),
3223
+ _creationTime: z12.number(),
3224
+ companyId: z12.string(),
3225
+ muxAssetId: z12.string(),
3226
+ muxPlaybackId: z12.string(),
3227
+ muxUploadId: z12.string(),
3228
+ name: z12.string(),
3229
+ description: z12.string(),
3230
+ tags: z12.array(z12.string()),
3231
+ source: z12.string(),
3232
+ externalId: z12.string().optional(),
3233
+ sourceId: z12.string().optional(),
3234
+ width: z12.number().optional(),
3235
+ height: z12.number().optional(),
3236
+ aspectRatio: z12.number().optional(),
3237
+ duration: z12.number().optional(),
3238
+ transcript: z12.string().optional(),
3239
+ transcriptSegments: z12.array(videoTranscriptSegmentSchema).optional(),
3240
+ scenes: z12.array(videoSceneSchema).optional(),
3241
+ descriptionEmbedding: z12.array(z12.number()).optional(),
3242
+ searchText: z12.string().optional(),
3086
3243
  status: videoStatusSchema,
3087
- errorMessage: z11.string().optional(),
3088
- createdAt: z11.number(),
3089
- updatedAt: z11.number(),
3090
- thumbnailUrl: z11.string()
3091
- });
3092
- var videosWebhookResponseSchema = z11.object({ ok: z11.literal(true) });
3093
- var videosGetRequestSchema = z11.object({ id: z11.string().min(1, "Missing id parameter") });
3094
- var videosSearchRequestSchema = z11.object({
3095
- query: z11.string().min(1),
3096
- limit: z11.coerce.number().int().positive().max(100).optional(),
3097
- tags: z11.array(z11.string()).optional()
3098
- });
3099
- var videoSearchResultSchema = z11.object({
3100
- _id: z11.string(),
3101
- thumbnailUrl: z11.string(),
3102
- name: z11.string(),
3103
- description: z11.string(),
3104
- tags: z11.array(z11.string()),
3105
- status: z11.string(),
3106
- duration: z11.number().optional(),
3107
- muxPlaybackId: z11.string(),
3108
- createdAt: z11.number()
3109
- });
3110
- var videosSearchResponseSchema = z11.array(videoSearchResultSchema);
3111
- var videosUploadResponseSchema = z11.object({ uploadUrl: z11.string(), videoId: z11.string() });
3112
- var videosDeleteRequestSchema = z11.object({ id: z11.string().min(1, "Missing video ID") });
3113
- var videosDeleteResponseSchema = z11.object({ ok: z11.literal(true) });
3244
+ errorMessage: z12.string().optional(),
3245
+ createdAt: z12.number(),
3246
+ updatedAt: z12.number(),
3247
+ thumbnailUrl: z12.string()
3248
+ });
3249
+ var videosWebhookResponseSchema = z12.object({ ok: z12.literal(true) });
3250
+ var videosGetRequestSchema = z12.object({ id: z12.string().min(1, "Missing id parameter") });
3251
+ var videosSearchRequestSchema = z12.object({
3252
+ query: z12.string().min(1),
3253
+ limit: z12.coerce.number().int().positive().max(100).optional(),
3254
+ tags: z12.array(z12.string()).optional()
3255
+ });
3256
+ var videoSearchResultSchema = z12.object({
3257
+ _id: z12.string(),
3258
+ thumbnailUrl: z12.string(),
3259
+ name: z12.string(),
3260
+ description: z12.string(),
3261
+ tags: z12.array(z12.string()),
3262
+ status: z12.string(),
3263
+ duration: z12.number().optional(),
3264
+ muxPlaybackId: z12.string(),
3265
+ createdAt: z12.number()
3266
+ });
3267
+ var videosSearchResponseSchema = z12.array(videoSearchResultSchema);
3268
+ var videosUploadResponseSchema = z12.object({ uploadUrl: z12.string(), videoId: z12.string() });
3269
+ var videosDeleteRequestSchema = z12.object({ id: z12.string().min(1, "Missing video ID") });
3270
+ var videosDeleteResponseSchema = z12.object({ ok: z12.literal(true) });
3114
3271
 
3115
3272
  // src/commands/actions/complete.ts
3116
3273
  import { defineCommand as defineCommand2 } from "citty";
@@ -4335,37 +4492,37 @@ var GEO_TARGET_CONSTANT_REGEX = /^geoTargetConstants\/\d+$/;
4335
4492
  var LANGUAGE_CONSTANT_REGEX = /^languageConstants\/\d+$/;
4336
4493
 
4337
4494
  // ../api/src/ads-google/ops.ts
4338
- import { z as z12 } from "zod";
4339
- var tempRefSchema2 = z12.string().regex(TEMP_REF_REGEX2, "expected a g_temp_* reference");
4340
- var refSchema = z12.union([
4341
- z12.string().regex(RESOURCE_NAME_REGEX, "expected a customers/\u2026/\u2026/\u2026 resource name"),
4342
- z12.string().regex(NUMERIC_ID_REGEX2, "expected a numeric id"),
4495
+ import { z as z13 } from "zod";
4496
+ var tempRefSchema2 = z13.string().regex(TEMP_REF_REGEX2, "expected a g_temp_* reference");
4497
+ var refSchema = z13.union([
4498
+ z13.string().regex(RESOURCE_NAME_REGEX, "expected a customers/\u2026/\u2026/\u2026 resource name"),
4499
+ z13.string().regex(NUMERIC_ID_REGEX2, "expected a numeric id"),
4343
4500
  tempRefSchema2
4344
4501
  ]);
4345
4502
  var targetRefSchema = refSchema;
4346
- var microsSchema = z12.number().int().positive("expected a positive micros amount");
4347
- var httpsUrlSchema2 = z12.string().url().refine((u) => u.startsWith("https://"), "final URLs must be https");
4348
- var customerIdSchema = z12.string().regex(NUMERIC_ID_REGEX2, "customerId must be the bare numeric customer id");
4349
- var stageableStatusSchema2 = z12.enum(STAGEABLE_CREATE_STATUSES2);
4350
- var matchTypeSchema = z12.enum(KEYWORD_MATCH_TYPES);
4351
- var keywordTextSchema = z12.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");
4352
- var budgetCreateSchema = z12.object({
4353
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.budget.nameMax),
4503
+ var microsSchema = z13.number().int().positive("expected a positive micros amount");
4504
+ var httpsUrlSchema2 = z13.string().url().refine((u) => u.startsWith("https://"), "final URLs must be https");
4505
+ var customerIdSchema = z13.string().regex(NUMERIC_ID_REGEX2, "customerId must be the bare numeric customer id");
4506
+ var stageableStatusSchema2 = z13.enum(STAGEABLE_CREATE_STATUSES2);
4507
+ var matchTypeSchema = z13.enum(KEYWORD_MATCH_TYPES);
4508
+ var keywordTextSchema = z13.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");
4509
+ var budgetCreateSchema = z13.object({
4510
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.budget.nameMax),
4354
4511
  amountMicros: microsSchema,
4355
- deliveryMethod: z12.enum(BUDGET_DELIVERY_METHODS).default("STANDARD"),
4356
- explicitlyShared: z12.boolean().default(false)
4512
+ deliveryMethod: z13.enum(BUDGET_DELIVERY_METHODS).default("STANDARD"),
4513
+ explicitlyShared: z13.boolean().default(false)
4357
4514
  });
4358
- var budgetUpdateSchema = z12.object({
4359
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.budget.nameMax).optional(),
4515
+ var budgetUpdateSchema = z13.object({
4516
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.budget.nameMax).optional(),
4360
4517
  amountMicros: microsSchema.optional(),
4361
- deliveryMethod: z12.enum(BUDGET_DELIVERY_METHODS).optional()
4518
+ deliveryMethod: z13.enum(BUDGET_DELIVERY_METHODS).optional()
4362
4519
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4363
- var biddingConfigSchema = z12.object({
4364
- type: z12.enum(BIDDING_STRATEGY_TYPES),
4520
+ var biddingConfigSchema = z13.object({
4521
+ type: z13.enum(BIDDING_STRATEGY_TYPES),
4365
4522
  targetCpaMicros: microsSchema.optional(),
4366
- targetRoas: z12.number().positive().optional(),
4523
+ targetRoas: z13.number().positive().optional(),
4367
4524
  cpcBidCeilingMicros: microsSchema.optional(),
4368
- enhancedCpcEnabled: z12.boolean().optional()
4525
+ enhancedCpcEnabled: z13.boolean().optional()
4369
4526
  }).superRefine((p, ctx) => {
4370
4527
  if (p.type === "TARGET_CPA" && p.targetCpaMicros === void 0) {
4371
4528
  ctx.addIssue({ code: "custom", path: ["targetCpaMicros"], message: "TARGET_CPA needs targetCpaMicros" });
@@ -4374,17 +4531,17 @@ var biddingConfigSchema = z12.object({
4374
4531
  ctx.addIssue({ code: "custom", path: ["targetRoas"], message: "TARGET_ROAS needs targetRoas" });
4375
4532
  }
4376
4533
  });
4377
- var networkSettingsSchema = z12.object({
4378
- targetGoogleSearch: z12.boolean().optional(),
4379
- targetSearchNetwork: z12.boolean().optional(),
4380
- targetContentNetwork: z12.boolean().optional(),
4381
- targetPartnerSearchNetwork: z12.boolean().optional()
4534
+ var networkSettingsSchema = z13.object({
4535
+ targetGoogleSearch: z13.boolean().optional(),
4536
+ targetSearchNetwork: z13.boolean().optional(),
4537
+ targetContentNetwork: z13.boolean().optional(),
4538
+ targetPartnerSearchNetwork: z13.boolean().optional()
4382
4539
  });
4383
- var dateSchema = z12.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected a YYYY-MM-DD date");
4384
- var campaignCreateSchema2 = z12.object({
4385
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.nameMax),
4386
- channelType: z12.enum(ADVERTISING_CHANNEL_TYPES),
4387
- channelSubType: z12.enum(ADVERTISING_CHANNEL_SUB_TYPES).optional(),
4540
+ var dateSchema = z13.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected a YYYY-MM-DD date");
4541
+ var campaignCreateSchema2 = z13.object({
4542
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.nameMax),
4543
+ channelType: z13.enum(ADVERTISING_CHANNEL_TYPES),
4544
+ channelSubType: z13.enum(ADVERTISING_CHANNEL_SUB_TYPES).optional(),
4388
4545
  budget: refSchema,
4389
4546
  /** Inline standard bidding, or a portfolio strategy ref via biddingStrategy. */
4390
4547
  bidding: biddingConfigSchema.optional(),
@@ -4393,7 +4550,7 @@ var campaignCreateSchema2 = z12.object({
4393
4550
  startDate: dateSchema.optional(),
4394
4551
  endDate: dateSchema.optional(),
4395
4552
  /** Advisory Google Ads UI objective — drives warnings, not sent to the API. */
4396
- objective: z12.enum(CAMPAIGN_OBJECTIVES).optional(),
4553
+ objective: z13.enum(CAMPAIGN_OBJECTIVES).optional(),
4397
4554
  status: stageableStatusSchema2.default("PAUSED")
4398
4555
  }).superRefine((p, ctx) => {
4399
4556
  if (!p.bidding && !p.biddingStrategy) {
@@ -4417,129 +4574,129 @@ var campaignCreateSchema2 = z12.object({
4417
4574
  ctx.addIssue({ code: "custom", path: ["endDate"], message: "endDate must be after startDate" });
4418
4575
  }
4419
4576
  });
4420
- var campaignUpdateSchema2 = z12.object({
4421
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.nameMax).optional(),
4577
+ var campaignUpdateSchema2 = z13.object({
4578
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.nameMax).optional(),
4422
4579
  budget: refSchema.optional(),
4423
4580
  bidding: biddingConfigSchema.optional(),
4424
4581
  networkSettings: networkSettingsSchema.optional(),
4425
4582
  startDate: dateSchema.optional(),
4426
4583
  endDate: dateSchema.optional(),
4427
- status: z12.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4584
+ status: z13.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4428
4585
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4429
- var adGroupCreateSchema = z12.object({
4430
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.adGroup.nameMax),
4586
+ var adGroupCreateSchema = z13.object({
4587
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.adGroup.nameMax),
4431
4588
  campaign: refSchema,
4432
- type: z12.enum(AD_GROUP_TYPES).default("SEARCH_STANDARD"),
4589
+ type: z13.enum(AD_GROUP_TYPES).default("SEARCH_STANDARD"),
4433
4590
  cpcBidMicros: microsSchema.optional(),
4434
4591
  status: stageableStatusSchema2.default("PAUSED")
4435
4592
  });
4436
- var adGroupUpdateSchema = z12.object({
4437
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.adGroup.nameMax).optional(),
4593
+ var adGroupUpdateSchema = z13.object({
4594
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.adGroup.nameMax).optional(),
4438
4595
  cpcBidMicros: microsSchema.optional(),
4439
- status: z12.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4596
+ status: z13.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4440
4597
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4441
- var keywordAddSchema = z12.object({
4598
+ var keywordAddSchema = z13.object({
4442
4599
  adGroup: refSchema,
4443
4600
  text: keywordTextSchema,
4444
4601
  matchType: matchTypeSchema,
4445
4602
  cpcBidMicros: microsSchema.optional(),
4446
- finalUrls: z12.array(httpsUrlSchema2).optional(),
4603
+ finalUrls: z13.array(httpsUrlSchema2).optional(),
4447
4604
  status: stageableStatusSchema2.default("ENABLED")
4448
4605
  });
4449
- var keywordUpdateSchema = z12.object({
4606
+ var keywordUpdateSchema = z13.object({
4450
4607
  cpcBidMicros: microsSchema.optional(),
4451
- finalUrls: z12.array(httpsUrlSchema2).optional(),
4452
- status: z12.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4608
+ finalUrls: z13.array(httpsUrlSchema2).optional(),
4609
+ status: z13.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4453
4610
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4454
- var negativeKeywordAddSchema = z12.object({
4455
- level: z12.enum(["adGroup", "campaign"]),
4611
+ var negativeKeywordAddSchema = z13.object({
4612
+ level: z13.enum(["adGroup", "campaign"]),
4456
4613
  parent: refSchema,
4457
4614
  text: keywordTextSchema,
4458
4615
  matchType: matchTypeSchema
4459
4616
  });
4460
- var sharedSetCreateSchema = z12.object({
4461
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.sharedSet.nameMax),
4462
- type: z12.enum(SHARED_SET_TYPES).default("NEGATIVE_KEYWORDS")
4617
+ var sharedSetCreateSchema = z13.object({
4618
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.sharedSet.nameMax),
4619
+ type: z13.enum(SHARED_SET_TYPES).default("NEGATIVE_KEYWORDS")
4463
4620
  });
4464
- var sharedSetMemberAddSchema = z12.object({
4621
+ var sharedSetMemberAddSchema = z13.object({
4465
4622
  sharedSet: refSchema,
4466
4623
  text: keywordTextSchema,
4467
4624
  matchType: matchTypeSchema
4468
4625
  });
4469
- var campaignSharedSetAttachSchema = z12.object({
4626
+ var campaignSharedSetAttachSchema = z13.object({
4470
4627
  campaign: refSchema,
4471
4628
  sharedSet: refSchema
4472
4629
  });
4473
- var adTextAssetSchema = z12.object({
4474
- text: z12.string().min(1),
4475
- pinnedField: z12.enum(PINNED_FIELDS).optional()
4630
+ var adTextAssetSchema = z13.object({
4631
+ text: z13.string().min(1),
4632
+ pinnedField: z13.enum(PINNED_FIELDS).optional()
4476
4633
  });
4477
- var responsiveSearchAdSchema = z12.object({
4478
- format: z12.literal("responsiveSearch"),
4479
- headlines: z12.array(
4634
+ var responsiveSearchAdSchema = z13.object({
4635
+ format: z13.literal("responsiveSearch"),
4636
+ headlines: z13.array(
4480
4637
  adTextAssetSchema.refine(
4481
4638
  (a) => a.text.length <= GOOGLE_ADS_LIMITS.responsiveSearchAd.headlineTextMax,
4482
4639
  "headline exceeds 30 chars"
4483
4640
  )
4484
4641
  ).min(GOOGLE_ADS_LIMITS.responsiveSearchAd.headlinesMin).max(GOOGLE_ADS_LIMITS.responsiveSearchAd.headlinesMax),
4485
- descriptions: z12.array(
4642
+ descriptions: z13.array(
4486
4643
  adTextAssetSchema.refine(
4487
4644
  (a) => a.text.length <= GOOGLE_ADS_LIMITS.responsiveSearchAd.descriptionTextMax,
4488
4645
  "description exceeds 90 chars"
4489
4646
  )
4490
4647
  ).min(GOOGLE_ADS_LIMITS.responsiveSearchAd.descriptionsMin).max(GOOGLE_ADS_LIMITS.responsiveSearchAd.descriptionsMax),
4491
- path1: z12.string().max(GOOGLE_ADS_LIMITS.responsiveSearchAd.pathMax).optional(),
4492
- path2: z12.string().max(GOOGLE_ADS_LIMITS.responsiveSearchAd.pathMax).optional(),
4493
- finalUrls: z12.array(httpsUrlSchema2).min(1)
4494
- });
4495
- var responsiveDisplayAdSchema = z12.object({
4496
- format: z12.literal("responsiveDisplay"),
4497
- headlines: z12.array(z12.object({ text: z12.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.headlineTextMax) })).min(1).max(5),
4498
- longHeadline: z12.object({ text: z12.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.longHeadlineTextMax) }),
4499
- descriptions: z12.array(z12.object({ text: z12.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.descriptionTextMax) })).min(1).max(5),
4500
- businessName: z12.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.businessNameMax),
4648
+ path1: z13.string().max(GOOGLE_ADS_LIMITS.responsiveSearchAd.pathMax).optional(),
4649
+ path2: z13.string().max(GOOGLE_ADS_LIMITS.responsiveSearchAd.pathMax).optional(),
4650
+ finalUrls: z13.array(httpsUrlSchema2).min(1)
4651
+ });
4652
+ var responsiveDisplayAdSchema = z13.object({
4653
+ format: z13.literal("responsiveDisplay"),
4654
+ headlines: z13.array(z13.object({ text: z13.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.headlineTextMax) })).min(1).max(5),
4655
+ longHeadline: z13.object({ text: z13.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.longHeadlineTextMax) }),
4656
+ descriptions: z13.array(z13.object({ text: z13.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.descriptionTextMax) })).min(1).max(5),
4657
+ businessName: z13.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.businessNameMax),
4501
4658
  // A Responsive Display Ad's images are fields on the ad's own content (never campaign-level
4502
4659
  // asset links). Google requires ≥1 landscape marketing image (1.91:1) AND ≥1 square marketing
4503
4660
  // image (1:1) to serve; the logo images are optional.
4504
- marketingImageAssets: z12.array(refSchema).optional(),
4505
- squareMarketingImageAssets: z12.array(refSchema).optional(),
4506
- logoImageAssets: z12.array(refSchema).optional(),
4507
- finalUrls: z12.array(httpsUrlSchema2).min(1)
4508
- });
4509
- var callAdSchema = z12.object({
4510
- format: z12.literal("call"),
4511
- countryCode: z12.string().length(2),
4512
- phoneNumber: z12.string().min(3),
4513
- headline1: z12.string().min(1).max(30),
4514
- headline2: z12.string().min(1).max(30),
4515
- description1: z12.string().min(1).max(90),
4516
- description2: z12.string().min(1).max(90),
4517
- businessName: z12.string().min(1).max(25),
4518
- finalUrls: z12.array(httpsUrlSchema2).min(1)
4519
- });
4520
- var appAdSchema = z12.object({
4521
- format: z12.literal("app"),
4522
- headlines: z12.array(z12.object({ text: z12.string().min(1).max(30) })).min(1),
4523
- descriptions: z12.array(z12.object({ text: z12.string().min(1).max(90) })).min(1)
4524
- });
4525
- var videoAdSchema = z12.object({
4526
- format: z12.literal("video"),
4661
+ marketingImageAssets: z13.array(refSchema).optional(),
4662
+ squareMarketingImageAssets: z13.array(refSchema).optional(),
4663
+ logoImageAssets: z13.array(refSchema).optional(),
4664
+ finalUrls: z13.array(httpsUrlSchema2).min(1)
4665
+ });
4666
+ var callAdSchema = z13.object({
4667
+ format: z13.literal("call"),
4668
+ countryCode: z13.string().length(2),
4669
+ phoneNumber: z13.string().min(3),
4670
+ headline1: z13.string().min(1).max(30),
4671
+ headline2: z13.string().min(1).max(30),
4672
+ description1: z13.string().min(1).max(90),
4673
+ description2: z13.string().min(1).max(90),
4674
+ businessName: z13.string().min(1).max(25),
4675
+ finalUrls: z13.array(httpsUrlSchema2).min(1)
4676
+ });
4677
+ var appAdSchema = z13.object({
4678
+ format: z13.literal("app"),
4679
+ headlines: z13.array(z13.object({ text: z13.string().min(1).max(30) })).min(1),
4680
+ descriptions: z13.array(z13.object({ text: z13.string().min(1).max(90) })).min(1)
4681
+ });
4682
+ var videoAdSchema = z13.object({
4683
+ format: z13.literal("video"),
4527
4684
  // A raw YouTube id is not a publishable Google Ads reference — the video must be staged as
4528
4685
  // its own `google.asset.create` (type: youtubeVideo) first, then referenced here by asset ref.
4529
- videoAssets: z12.array(refSchema).min(1),
4530
- finalUrls: z12.array(httpsUrlSchema2).min(1)
4531
- });
4532
- var demandGenAdSchema = z12.object({
4533
- format: z12.literal("demandGen"),
4534
- headlines: z12.array(z12.object({ text: z12.string().min(1).max(40) })).min(1).max(5),
4535
- descriptions: z12.array(z12.object({ text: z12.string().min(1).max(90) })).min(1).max(5),
4536
- businessName: z12.string().min(1).max(25),
4537
- finalUrls: z12.array(httpsUrlSchema2).min(1),
4538
- imageAssets: z12.array(refSchema).optional(),
4539
- squareImageAssets: z12.array(refSchema).optional(),
4540
- logoImageAssets: z12.array(refSchema).optional()
4541
- });
4542
- var adContentSchema2 = z12.discriminatedUnion("format", [
4686
+ videoAssets: z13.array(refSchema).min(1),
4687
+ finalUrls: z13.array(httpsUrlSchema2).min(1)
4688
+ });
4689
+ var demandGenAdSchema = z13.object({
4690
+ format: z13.literal("demandGen"),
4691
+ headlines: z13.array(z13.object({ text: z13.string().min(1).max(40) })).min(1).max(5),
4692
+ descriptions: z13.array(z13.object({ text: z13.string().min(1).max(90) })).min(1).max(5),
4693
+ businessName: z13.string().min(1).max(25),
4694
+ finalUrls: z13.array(httpsUrlSchema2).min(1),
4695
+ imageAssets: z13.array(refSchema).optional(),
4696
+ squareImageAssets: z13.array(refSchema).optional(),
4697
+ logoImageAssets: z13.array(refSchema).optional()
4698
+ });
4699
+ var adContentSchema2 = z13.discriminatedUnion("format", [
4543
4700
  responsiveSearchAdSchema,
4544
4701
  responsiveDisplayAdSchema,
4545
4702
  callAdSchema,
@@ -4547,45 +4704,45 @@ var adContentSchema2 = z12.discriminatedUnion("format", [
4547
4704
  videoAdSchema,
4548
4705
  demandGenAdSchema
4549
4706
  ]);
4550
- var adCreateSchema = z12.object({
4707
+ var adCreateSchema = z13.object({
4551
4708
  adGroup: refSchema,
4552
4709
  status: stageableStatusSchema2.default("PAUSED"),
4553
4710
  content: adContentSchema2
4554
4711
  });
4555
- var adUpdateSchema = z12.object({
4556
- status: z12.enum(["ENABLED", "PAUSED", "REMOVED"]).optional(),
4712
+ var adUpdateSchema = z13.object({
4713
+ status: z13.enum(["ENABLED", "PAUSED", "REMOVED"]).optional(),
4557
4714
  /** Whole-content replacement for RSA-like formats; re-validated against adContentSchema. */
4558
- content: z12.record(z12.string(), z12.unknown()).optional()
4715
+ content: z13.record(z13.string(), z13.unknown()).optional()
4559
4716
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4560
- var textAssetSchema = z12.object({ type: z12.literal("text"), text: z12.string().min(1) });
4561
- var imageAssetSchema = z12.object({
4562
- type: z12.literal("image"),
4563
- imageId: z12.string().min(1),
4564
- name: z12.string().optional()
4565
- });
4566
- var youtubeVideoAssetSchema = z12.object({
4567
- type: z12.literal("youtubeVideo"),
4568
- youtubeVideoId: z12.string().min(1),
4569
- name: z12.string().optional()
4570
- });
4571
- var sitelinkAssetSchema = z12.object({
4572
- type: z12.literal("sitelink"),
4573
- linkText: z12.string().min(1).max(GOOGLE_ADS_LIMITS.asset.sitelinkLinkTextMax),
4574
- description1: z12.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4575
- description2: z12.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4576
- finalUrls: z12.array(httpsUrlSchema2).min(1)
4577
- });
4578
- var calloutAssetSchema = z12.object({
4579
- type: z12.literal("callout"),
4580
- calloutText: z12.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax)
4581
- });
4582
- var structuredSnippetAssetSchema = z12.object({
4583
- type: z12.literal("structuredSnippet"),
4584
- header: z12.string().min(1).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetHeaderMax),
4585
- values: z12.array(z12.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax)
4586
- });
4587
- var callToActionAssetSchema = z12.object({ type: z12.literal("callToAction"), callToAction: z12.string().min(1) });
4588
- var assetCreateSchema = z12.discriminatedUnion("type", [
4717
+ var textAssetSchema = z13.object({ type: z13.literal("text"), text: z13.string().min(1) });
4718
+ var imageAssetSchema = z13.object({
4719
+ type: z13.literal("image"),
4720
+ imageId: z13.string().min(1),
4721
+ name: z13.string().optional()
4722
+ });
4723
+ var youtubeVideoAssetSchema = z13.object({
4724
+ type: z13.literal("youtubeVideo"),
4725
+ youtubeVideoId: z13.string().min(1),
4726
+ name: z13.string().optional()
4727
+ });
4728
+ var sitelinkAssetSchema = z13.object({
4729
+ type: z13.literal("sitelink"),
4730
+ linkText: z13.string().min(1).max(GOOGLE_ADS_LIMITS.asset.sitelinkLinkTextMax),
4731
+ description1: z13.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4732
+ description2: z13.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4733
+ finalUrls: z13.array(httpsUrlSchema2).min(1)
4734
+ });
4735
+ var calloutAssetSchema = z13.object({
4736
+ type: z13.literal("callout"),
4737
+ calloutText: z13.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax)
4738
+ });
4739
+ var structuredSnippetAssetSchema = z13.object({
4740
+ type: z13.literal("structuredSnippet"),
4741
+ header: z13.string().min(1).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetHeaderMax),
4742
+ values: z13.array(z13.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax)
4743
+ });
4744
+ var callToActionAssetSchema = z13.object({ type: z13.literal("callToAction"), callToAction: z13.string().min(1) });
4745
+ var assetCreateSchema = z13.discriminatedUnion("type", [
4589
4746
  textAssetSchema,
4590
4747
  imageAssetSchema,
4591
4748
  youtubeVideoAssetSchema,
@@ -4594,136 +4751,136 @@ var assetCreateSchema = z12.discriminatedUnion("type", [
4594
4751
  structuredSnippetAssetSchema,
4595
4752
  callToActionAssetSchema
4596
4753
  ]);
4597
- var assetUpdateSchema = z12.object({
4598
- name: z12.string().min(1).optional(),
4599
- linkText: z12.string().min(1).max(GOOGLE_ADS_LIMITS.asset.sitelinkLinkTextMax).optional(),
4600
- description1: z12.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4601
- description2: z12.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4602
- finalUrls: z12.array(httpsUrlSchema2).min(1).optional(),
4603
- calloutText: z12.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax).optional(),
4604
- header: z12.string().min(1).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetHeaderMax).optional(),
4605
- values: z12.array(z12.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax).optional(),
4606
- callToAction: z12.string().min(1).optional(),
4607
- text: z12.string().min(1).optional()
4754
+ var assetUpdateSchema = z13.object({
4755
+ name: z13.string().min(1).optional(),
4756
+ linkText: z13.string().min(1).max(GOOGLE_ADS_LIMITS.asset.sitelinkLinkTextMax).optional(),
4757
+ description1: z13.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4758
+ description2: z13.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4759
+ finalUrls: z13.array(httpsUrlSchema2).min(1).optional(),
4760
+ calloutText: z13.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax).optional(),
4761
+ header: z13.string().min(1).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetHeaderMax).optional(),
4762
+ values: z13.array(z13.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax).optional(),
4763
+ callToAction: z13.string().min(1).optional(),
4764
+ text: z13.string().min(1).optional()
4608
4765
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4609
- var assetLinkAttachSchema = z12.object({
4610
- level: z12.enum(["campaign", "adGroup", "customer"]),
4766
+ var assetLinkAttachSchema = z13.object({
4767
+ level: z13.enum(["campaign", "adGroup", "customer"]),
4611
4768
  parent: refSchema.optional(),
4612
4769
  asset: refSchema,
4613
- fieldType: z12.enum(ASSET_FIELD_TYPES)
4770
+ fieldType: z13.enum(ASSET_FIELD_TYPES)
4614
4771
  }).superRefine((value, ctx) => {
4615
4772
  if (value.level !== "customer" && !value.parent) {
4616
4773
  ctx.addIssue({
4617
- code: z12.ZodIssueCode.custom,
4774
+ code: z13.ZodIssueCode.custom,
4618
4775
  path: ["parent"],
4619
4776
  message: `parent is required for a ${value.level}-level asset link (--parent-ref)`
4620
4777
  });
4621
4778
  }
4622
4779
  });
4623
- var assetGroupCreateSchema = z12.object({
4780
+ var assetGroupCreateSchema = z13.object({
4624
4781
  campaign: refSchema,
4625
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.nameMax),
4626
- finalUrls: z12.array(httpsUrlSchema2).min(1),
4627
- headlines: z12.array(z12.object({ text: z12.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.headlineTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.headlinesMin).max(GOOGLE_ADS_LIMITS.assetGroup.headlinesMax),
4628
- longHeadlines: z12.array(z12.object({ text: z12.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.longHeadlineTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.longHeadlinesMin).max(GOOGLE_ADS_LIMITS.assetGroup.longHeadlinesMax),
4629
- descriptions: z12.array(z12.object({ text: z12.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.descriptionTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.descriptionsMin).max(GOOGLE_ADS_LIMITS.assetGroup.descriptionsMax),
4630
- businessName: z12.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.businessNameMax),
4631
- imageAssets: z12.array(refSchema).optional(),
4632
- squareImageAssets: z12.array(refSchema).optional(),
4633
- logoAssets: z12.array(refSchema).optional(),
4634
- status: z12.enum(["ENABLED", "PAUSED"]).default("PAUSED")
4635
- });
4636
- var assetGroupUpdateSchema = z12.object({
4637
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.nameMax).optional(),
4638
- finalUrls: z12.array(httpsUrlSchema2).min(1).optional(),
4639
- status: z12.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4782
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.nameMax),
4783
+ finalUrls: z13.array(httpsUrlSchema2).min(1),
4784
+ headlines: z13.array(z13.object({ text: z13.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.headlineTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.headlinesMin).max(GOOGLE_ADS_LIMITS.assetGroup.headlinesMax),
4785
+ longHeadlines: z13.array(z13.object({ text: z13.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.longHeadlineTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.longHeadlinesMin).max(GOOGLE_ADS_LIMITS.assetGroup.longHeadlinesMax),
4786
+ descriptions: z13.array(z13.object({ text: z13.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.descriptionTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.descriptionsMin).max(GOOGLE_ADS_LIMITS.assetGroup.descriptionsMax),
4787
+ businessName: z13.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.businessNameMax),
4788
+ imageAssets: z13.array(refSchema).optional(),
4789
+ squareImageAssets: z13.array(refSchema).optional(),
4790
+ logoAssets: z13.array(refSchema).optional(),
4791
+ status: z13.enum(["ENABLED", "PAUSED"]).default("PAUSED")
4792
+ });
4793
+ var assetGroupUpdateSchema = z13.object({
4794
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.nameMax).optional(),
4795
+ finalUrls: z13.array(httpsUrlSchema2).min(1).optional(),
4796
+ status: z13.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4640
4797
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4641
- var audienceCreateSchema2 = z12.object({
4642
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.audience.nameMax),
4643
- type: z12.enum(USER_LIST_TYPES).default("BASIC"),
4644
- description: z12.string().optional(),
4798
+ var audienceCreateSchema2 = z13.object({
4799
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.audience.nameMax),
4800
+ type: z13.enum(USER_LIST_TYPES).default("BASIC"),
4801
+ description: z13.string().optional(),
4645
4802
  /** Customer-match members (crm-based) — file-first for large lists. */
4646
- members: z12.array(z12.record(z12.string(), z12.string())).optional(),
4647
- sourceFileRef: z12.string().optional()
4803
+ members: z13.array(z13.record(z13.string(), z13.string())).optional(),
4804
+ sourceFileRef: z13.string().optional()
4648
4805
  });
4649
- var audienceCriterionAttachSchema = z12.object({
4650
- level: z12.enum(["campaign", "adGroup"]),
4806
+ var audienceCriterionAttachSchema = z13.object({
4807
+ level: z13.enum(["campaign", "adGroup"]),
4651
4808
  parent: refSchema,
4652
4809
  userList: refSchema,
4653
- negative: z12.boolean().default(false)
4810
+ negative: z13.boolean().default(false)
4654
4811
  });
4655
- var conversionActionCreateSchema = z12.object({
4656
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.conversionAction.nameMax),
4657
- type: z12.enum(CONVERSION_ACTION_TYPES).default("WEBPAGE"),
4658
- category: z12.enum(CONVERSION_ACTION_CATEGORIES).default("DEFAULT"),
4659
- countingType: z12.enum(CONVERSION_COUNTING_TYPES).default("ONE_PER_CLICK"),
4812
+ var conversionActionCreateSchema = z13.object({
4813
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.conversionAction.nameMax),
4814
+ type: z13.enum(CONVERSION_ACTION_TYPES).default("WEBPAGE"),
4815
+ category: z13.enum(CONVERSION_ACTION_CATEGORIES).default("DEFAULT"),
4816
+ countingType: z13.enum(CONVERSION_COUNTING_TYPES).default("ONE_PER_CLICK"),
4660
4817
  defaultValueMicros: microsSchema.optional(),
4661
- defaultCurrencyCode: z12.string().length(3).optional(),
4662
- clickThroughLookbackWindowDays: z12.number().int().positive().optional(),
4663
- viewThroughLookbackWindowDays: z12.number().int().positive().optional(),
4664
- status: z12.enum(["ENABLED", "PAUSED"]).default("ENABLED")
4665
- });
4666
- var conversionActionUpdateSchema = z12.object({
4667
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.conversionAction.nameMax).optional(),
4668
- category: z12.enum(CONVERSION_ACTION_CATEGORIES).optional(),
4669
- countingType: z12.enum(CONVERSION_COUNTING_TYPES).optional(),
4818
+ defaultCurrencyCode: z13.string().length(3).optional(),
4819
+ clickThroughLookbackWindowDays: z13.number().int().positive().optional(),
4820
+ viewThroughLookbackWindowDays: z13.number().int().positive().optional(),
4821
+ status: z13.enum(["ENABLED", "PAUSED"]).default("ENABLED")
4822
+ });
4823
+ var conversionActionUpdateSchema = z13.object({
4824
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.conversionAction.nameMax).optional(),
4825
+ category: z13.enum(CONVERSION_ACTION_CATEGORIES).optional(),
4826
+ countingType: z13.enum(CONVERSION_COUNTING_TYPES).optional(),
4670
4827
  defaultValueMicros: microsSchema.optional(),
4671
- defaultCurrencyCode: z12.string().length(3).optional(),
4672
- clickThroughLookbackWindowDays: z12.number().int().positive().optional(),
4673
- viewThroughLookbackWindowDays: z12.number().int().positive().optional(),
4674
- status: z12.enum(["ENABLED", "REMOVED", "HIDDEN"]).optional()
4828
+ defaultCurrencyCode: z13.string().length(3).optional(),
4829
+ clickThroughLookbackWindowDays: z13.number().int().positive().optional(),
4830
+ viewThroughLookbackWindowDays: z13.number().int().positive().optional(),
4831
+ status: z13.enum(["ENABLED", "REMOVED", "HIDDEN"]).optional()
4675
4832
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4676
- var biddingStrategyCreateSchema = z12.object({
4677
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.biddingStrategy.nameMax),
4833
+ var biddingStrategyCreateSchema = z13.object({
4834
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.biddingStrategy.nameMax),
4678
4835
  config: biddingConfigSchema
4679
4836
  }).superRefine((p, ctx) => {
4680
4837
  if (p.config.type === "MANUAL_CPC") {
4681
4838
  ctx.addIssue({ code: "custom", path: ["config", "type"], message: "portfolio strategies cannot be Manual CPC" });
4682
4839
  }
4683
4840
  });
4684
- var biddingStrategyUpdateSchema = z12.object({
4685
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.biddingStrategy.nameMax).optional(),
4841
+ var biddingStrategyUpdateSchema = z13.object({
4842
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.biddingStrategy.nameMax).optional(),
4686
4843
  config: biddingConfigSchema.optional()
4687
4844
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4688
- var labelCreateSchema = z12.object({
4689
- name: z12.string().min(1).max(GOOGLE_ADS_LIMITS.label.nameMax),
4690
- backgroundColor: z12.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
4691
- description: z12.string().optional()
4845
+ var labelCreateSchema = z13.object({
4846
+ name: z13.string().min(1).max(GOOGLE_ADS_LIMITS.label.nameMax),
4847
+ backgroundColor: z13.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
4848
+ description: z13.string().optional()
4692
4849
  });
4693
- var labelAttachSchema = z12.object({
4694
- level: z12.enum(["campaign", "adGroup", "ad"]),
4850
+ var labelAttachSchema = z13.object({
4851
+ level: z13.enum(["campaign", "adGroup", "ad"]),
4695
4852
  parent: refSchema,
4696
4853
  label: refSchema
4697
4854
  });
4698
- var locationCriterionSchema = z12.object({
4699
- criterionType: z12.literal("location"),
4700
- geoTargetConstant: z12.union([z12.string().regex(GEO_TARGET_CONSTANT_REGEX), z12.string().regex(NUMERIC_ID_REGEX2)])
4701
- });
4702
- var languageCriterionSchema = z12.object({
4703
- criterionType: z12.literal("language"),
4704
- languageConstant: z12.union([z12.string().regex(LANGUAGE_CONSTANT_REGEX), z12.string().regex(NUMERIC_ID_REGEX2)])
4705
- });
4706
- var adScheduleCriterionSchema = z12.object({
4707
- criterionType: z12.literal("adSchedule"),
4708
- dayOfWeek: z12.enum(DAYS_OF_WEEK),
4709
- startHour: z12.number().int().min(0).max(23),
4710
- startMinute: z12.enum(["ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).default("ZERO"),
4711
- endHour: z12.number().int().min(0).max(24),
4712
- endMinute: z12.enum(["ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).default("ZERO")
4713
- });
4714
- var deviceCriterionSchema = z12.object({
4715
- criterionType: z12.literal("device"),
4716
- device: z12.enum(DEVICE_TYPES),
4855
+ var locationCriterionSchema = z13.object({
4856
+ criterionType: z13.literal("location"),
4857
+ geoTargetConstant: z13.union([z13.string().regex(GEO_TARGET_CONSTANT_REGEX), z13.string().regex(NUMERIC_ID_REGEX2)])
4858
+ });
4859
+ var languageCriterionSchema = z13.object({
4860
+ criterionType: z13.literal("language"),
4861
+ languageConstant: z13.union([z13.string().regex(LANGUAGE_CONSTANT_REGEX), z13.string().regex(NUMERIC_ID_REGEX2)])
4862
+ });
4863
+ var adScheduleCriterionSchema = z13.object({
4864
+ criterionType: z13.literal("adSchedule"),
4865
+ dayOfWeek: z13.enum(DAYS_OF_WEEK),
4866
+ startHour: z13.number().int().min(0).max(23),
4867
+ startMinute: z13.enum(["ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).default("ZERO"),
4868
+ endHour: z13.number().int().min(0).max(24),
4869
+ endMinute: z13.enum(["ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).default("ZERO")
4870
+ });
4871
+ var deviceCriterionSchema = z13.object({
4872
+ criterionType: z13.literal("device"),
4873
+ device: z13.enum(DEVICE_TYPES),
4717
4874
  // Google's `CampaignCriterion.bid_modifier`: "The modifier must be in the range 0.1 - 10.0. Use 0
4718
4875
  // 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.
4719
- bidModifier: z12.number().min(0).max(10).optional().refine((v) => v === void 0 || v === 0 || v >= 0.1, {
4876
+ bidModifier: z13.number().min(0).max(10).optional().refine((v) => v === void 0 || v === 0 || v >= 0.1, {
4720
4877
  message: "bid modifier must be 0 (exclude the device) or between 0.1 and 10.0"
4721
4878
  })
4722
4879
  });
4723
- var campaignCriterionAddSchema = z12.object({
4880
+ var campaignCriterionAddSchema = z13.object({
4724
4881
  campaign: refSchema,
4725
- negative: z12.boolean().default(false),
4726
- criterion: z12.discriminatedUnion("criterionType", [
4882
+ negative: z13.boolean().default(false),
4883
+ criterion: z13.discriminatedUnion("criterionType", [
4727
4884
  locationCriterionSchema,
4728
4885
  languageCriterionSchema,
4729
4886
  adScheduleCriterionSchema,
@@ -4733,7 +4890,7 @@ var campaignCriterionAddSchema = z12.object({
4733
4890
  const c = val.criterion;
4734
4891
  if (c.criterionType === "adSchedule" && c.endHour === 24 && c.endMinute !== "ZERO") {
4735
4892
  ctx.addIssue({
4736
- code: z12.ZodIssueCode.custom,
4893
+ code: z13.ZodIssueCode.custom,
4737
4894
  message: "endHour 24 (midnight) cannot have a non-zero endMinute",
4738
4895
  path: ["criterion", "endMinute"]
4739
4896
  });
@@ -4785,17 +4942,17 @@ var GOOGLE_DRAFT_OP_KINDS = [
4785
4942
  "google.campaignCriterion.add",
4786
4943
  "google.campaignCriterion.remove"
4787
4944
  ];
4788
- var googleDraftOpKindSchema = z12.enum(GOOGLE_DRAFT_OP_KINDS);
4945
+ var googleDraftOpKindSchema = z13.enum(GOOGLE_DRAFT_OP_KINDS);
4789
4946
  function createOp2(kind, payload) {
4790
- return z12.object({ kind: z12.literal(kind), customerId: customerIdSchema, payload });
4947
+ return z13.object({ kind: z13.literal(kind), customerId: customerIdSchema, payload });
4791
4948
  }
4792
4949
  function updateOp2(kind, payload) {
4793
- return z12.object({ kind: z12.literal(kind), customerId: customerIdSchema, target: targetRefSchema, payload });
4950
+ return z13.object({ kind: z13.literal(kind), customerId: customerIdSchema, target: targetRefSchema, payload });
4794
4951
  }
4795
4952
  function targetOp(kind) {
4796
- return z12.object({ kind: z12.literal(kind), customerId: customerIdSchema, target: targetRefSchema });
4953
+ return z13.object({ kind: z13.literal(kind), customerId: customerIdSchema, target: targetRefSchema });
4797
4954
  }
4798
- var googleDraftOpInputSchema = z12.discriminatedUnion("kind", [
4955
+ var googleDraftOpInputSchema = z13.discriminatedUnion("kind", [
4799
4956
  createOp2("google.budget.create", budgetCreateSchema),
4800
4957
  updateOp2("google.budget.update", budgetUpdateSchema),
4801
4958
  createOp2("google.campaign.create", campaignCreateSchema2),
@@ -4843,143 +5000,143 @@ var googleDraftOpInputSchema = z12.discriminatedUnion("kind", [
4843
5000
  ]);
4844
5001
 
4845
5002
  // ../api/src/ads-google/wire.ts
4846
- import { z as z13 } from "zod";
4847
- var googleWriteModeSchema = z13.enum(["live", "simulated"]);
4848
- var googleDraftOpResultSchema = z13.object({
4849
- status: z13.enum(["applied", "simulated", "failed", "skipped"]),
4850
- resourceName: z13.string().optional(),
4851
- error: z13.string().optional(),
4852
- skippedBecause: z13.string().optional(),
4853
- executedAt: z13.number().optional()
4854
- });
4855
- var googleDraftStageRequestSchema = z13.object({
4856
- chatId: z13.string(),
5003
+ import { z as z14 } from "zod";
5004
+ var googleWriteModeSchema = z14.enum(["live", "simulated"]);
5005
+ var googleDraftOpResultSchema = z14.object({
5006
+ status: z14.enum(["applied", "simulated", "failed", "skipped"]),
5007
+ resourceName: z14.string().optional(),
5008
+ error: z14.string().optional(),
5009
+ skippedBecause: z14.string().optional(),
5010
+ executedAt: z14.number().optional()
5011
+ });
5012
+ var googleDraftStageRequestSchema = z14.object({
5013
+ chatId: z14.string(),
4857
5014
  op: googleDraftOpInputSchema
4858
5015
  });
4859
- var googleDraftStageResponseSchema = z13.discriminatedUnion("staged", [
4860
- z13.object({
4861
- staged: z13.literal(true),
4862
- ref: z13.string(),
5016
+ var googleDraftStageResponseSchema = z14.discriminatedUnion("staged", [
5017
+ z14.object({
5018
+ staged: z14.literal(true),
5019
+ ref: z14.string(),
4863
5020
  kind: googleDraftOpKindSchema,
4864
5021
  mode: googleWriteModeSchema,
4865
- dependsOn: z13.array(z13.string()),
4866
- summary: z13.string(),
4867
- warnings: z13.array(z13.string()),
5022
+ dependsOn: z14.array(z14.string()),
5023
+ summary: z14.string(),
5024
+ warnings: z14.array(z14.string()),
4868
5025
  /** True when the op amended an already-staged op in place instead of appending a new one. */
4869
- amended: z13.boolean().optional()
5026
+ amended: z14.boolean().optional()
4870
5027
  }),
4871
- z13.object({
4872
- staged: z13.literal(false),
4873
- noop: z13.literal(true),
5028
+ z14.object({
5029
+ staged: z14.literal(false),
5030
+ noop: z14.literal(true),
4874
5031
  kind: googleDraftOpKindSchema,
4875
5032
  mode: googleWriteModeSchema,
4876
- summary: z13.string(),
4877
- reason: z13.string()
5033
+ summary: z14.string(),
5034
+ reason: z14.string()
4878
5035
  })
4879
5036
  ]);
4880
- var googleDraftAmendRequestSchema = z13.object({
4881
- chatId: z13.string(),
4882
- ref: z13.string(),
4883
- patch: z13.record(z13.string(), z13.unknown())
5037
+ var googleDraftAmendRequestSchema = z14.object({
5038
+ chatId: z14.string(),
5039
+ ref: z14.string(),
5040
+ patch: z14.record(z14.string(), z14.unknown())
4884
5041
  });
4885
- var googleDraftShowRequestSchema = z13.object({
4886
- chatId: z13.string(),
4887
- ref: z13.string()
5042
+ var googleDraftShowRequestSchema = z14.object({
5043
+ chatId: z14.string(),
5044
+ ref: z14.string()
4888
5045
  });
4889
5046
  var GOOGLE_DRAFT_BATCH_MAX = 500;
4890
- var googleDraftStageBatchRequestSchema = z13.object({
4891
- chatId: z13.string(),
4892
- ops: z13.array(googleDraftOpInputSchema).min(1).max(GOOGLE_DRAFT_BATCH_MAX)
5047
+ var googleDraftStageBatchRequestSchema = z14.object({
5048
+ chatId: z14.string(),
5049
+ ops: z14.array(googleDraftOpInputSchema).min(1).max(GOOGLE_DRAFT_BATCH_MAX)
4893
5050
  });
4894
- var googleDraftStageBatchResponseSchema = z13.object({
4895
- staged: z13.literal(true),
5051
+ var googleDraftStageBatchResponseSchema = z14.object({
5052
+ staged: z14.literal(true),
4896
5053
  mode: googleWriteModeSchema,
4897
- count: z13.number(),
4898
- ops: z13.array(
4899
- z13.object({
4900
- ref: z13.string(),
5054
+ count: z14.number(),
5055
+ ops: z14.array(
5056
+ z14.object({
5057
+ ref: z14.string(),
4901
5058
  kind: googleDraftOpKindSchema,
4902
- dependsOn: z13.array(z13.string()),
4903
- summary: z13.string(),
4904
- warnings: z13.array(z13.string())
5059
+ dependsOn: z14.array(z14.string()),
5060
+ summary: z14.string(),
5061
+ warnings: z14.array(z14.string())
4905
5062
  })
4906
5063
  ),
4907
- skipped: z13.array(z13.object({ kind: googleDraftOpKindSchema, summary: z13.string(), reason: z13.string() })).optional()
5064
+ skipped: z14.array(z14.object({ kind: googleDraftOpKindSchema, summary: z14.string(), reason: z14.string() })).optional()
4908
5065
  });
4909
- var googleDraftOpViewSchema = z13.object({
4910
- ref: z13.string(),
5066
+ var googleDraftOpViewSchema = z14.object({
5067
+ ref: z14.string(),
4911
5068
  kind: googleDraftOpKindSchema,
4912
- customerId: z13.string(),
4913
- target: z13.string().optional(),
4914
- dependsOn: z13.array(z13.string()),
4915
- summary: z13.string(),
4916
- stagedAt: z13.number(),
5069
+ customerId: z14.string(),
5070
+ target: z14.string().optional(),
5071
+ dependsOn: z14.array(z14.string()),
5072
+ summary: z14.string(),
5073
+ stagedAt: z14.number(),
4917
5074
  result: googleDraftOpResultSchema.optional()
4918
5075
  });
4919
- var googleDraftShowResponseSchema = z13.object({
5076
+ var googleDraftShowResponseSchema = z14.object({
4920
5077
  op: googleDraftOpViewSchema.extend({
4921
- payload: z13.unknown().optional(),
4922
- warnings: z13.array(z13.string()).optional(),
4923
- annotations: z13.unknown().optional()
5078
+ payload: z14.unknown().optional(),
5079
+ warnings: z14.array(z14.string()).optional(),
5080
+ annotations: z14.unknown().optional()
4924
5081
  })
4925
5082
  });
4926
- var googleDraftListRequestSchema = z13.object({
4927
- chatId: z13.string()
5083
+ var googleDraftListRequestSchema = z14.object({
5084
+ chatId: z14.string()
4928
5085
  });
4929
- var googleDraftAdvisorySchema = z13.object({
4930
- scope: z13.enum(["campaign", "adGroup"]),
4931
- message: z13.string()
5086
+ var googleDraftAdvisorySchema = z14.object({
5087
+ scope: z14.enum(["campaign", "adGroup"]),
5088
+ message: z14.string()
4932
5089
  });
4933
- var googleDraftStatusCollectionSchema = z13.object({
4934
- label: z13.string(),
4935
- added: z13.number(),
4936
- removed: z13.number(),
4937
- existing: z13.number()
5090
+ var googleDraftStatusCollectionSchema = z14.object({
5091
+ label: z14.string(),
5092
+ added: z14.number(),
5093
+ removed: z14.number(),
5094
+ existing: z14.number()
4938
5095
  });
4939
- var googleDraftChangeOperationSchema = z13.enum(["create", "update", "pause", "resume", "remove"]);
4940
- var googleDraftStatusNodeSchema = z13.lazy(
4941
- () => z13.object({
4942
- entity: z13.string(),
4943
- name: z13.string(),
5096
+ var googleDraftChangeOperationSchema = z14.enum(["create", "update", "pause", "resume", "remove"]);
5097
+ var googleDraftStatusNodeSchema = z14.lazy(
5098
+ () => z14.object({
5099
+ entity: z14.string(),
5100
+ name: z14.string(),
4944
5101
  operation: googleDraftChangeOperationSchema.optional(),
4945
- existing: z13.boolean(),
4946
- collections: z13.array(googleDraftStatusCollectionSchema),
4947
- children: z13.array(googleDraftStatusNodeSchema),
4948
- warnings: z13.array(z13.string()).optional()
5102
+ existing: z14.boolean(),
5103
+ collections: z14.array(googleDraftStatusCollectionSchema),
5104
+ children: z14.array(googleDraftStatusNodeSchema),
5105
+ warnings: z14.array(z14.string()).optional()
4949
5106
  })
4950
5107
  );
4951
- var googleDraftListResponseSchema = z13.object({
4952
- status: z13.enum(["active", "publishing", "applied", "discarded", "none"]),
5108
+ var googleDraftListResponseSchema = z14.object({
5109
+ status: z14.enum(["active", "publishing", "applied", "discarded", "none"]),
4953
5110
  mode: googleWriteModeSchema,
4954
- count: z13.number(),
4955
- ops: z13.array(googleDraftOpViewSchema),
5111
+ count: z14.number(),
5112
+ ops: z14.array(googleDraftOpViewSchema),
4956
5113
  /** Grouped campaign ▸ ad group ▸ ad tree for the readable CLI status view. */
4957
- tree: z13.array(googleDraftStatusNodeSchema).optional(),
5114
+ tree: z14.array(googleDraftStatusNodeSchema).optional(),
4958
5115
  /** Non-blocking completeness advisories for the whole draft. */
4959
- advisories: z13.array(googleDraftAdvisorySchema).optional()
5116
+ advisories: z14.array(googleDraftAdvisorySchema).optional()
4960
5117
  });
4961
- var googleDraftRemoveRequestSchema = z13.object({
4962
- chatId: z13.string(),
4963
- ref: z13.string()
5118
+ var googleDraftRemoveRequestSchema = z14.object({
5119
+ chatId: z14.string(),
5120
+ ref: z14.string()
4964
5121
  });
4965
- var googleDraftRemoveResponseSchema = z13.object({
5122
+ var googleDraftRemoveResponseSchema = z14.object({
4966
5123
  /** The requested ref plus any dependents removed by cascade. */
4967
- removed: z13.array(z13.string())
5124
+ removed: z14.array(z14.string())
4968
5125
  });
4969
- var googleDraftClearRequestSchema = z13.object({
4970
- chatId: z13.string()
5126
+ var googleDraftClearRequestSchema = z14.object({
5127
+ chatId: z14.string()
4971
5128
  });
4972
- var googleDraftClearResponseSchema = z13.object({
4973
- cleared: z13.number()
5129
+ var googleDraftClearResponseSchema = z14.object({
5130
+ cleared: z14.number()
4974
5131
  });
4975
- var googleFieldErrorSchema = z13.object({
4976
- path: z13.string(),
4977
- message: z13.string()
5132
+ var googleFieldErrorSchema = z14.object({
5133
+ path: z14.string(),
5134
+ message: z14.string()
4978
5135
  });
4979
- var googleDraftErrorResponseSchema = z13.object({
4980
- code: z13.string(),
4981
- error: z13.string(),
4982
- fields: z13.array(googleFieldErrorSchema).optional()
5136
+ var googleDraftErrorResponseSchema = z14.object({
5137
+ code: z14.string(),
5138
+ error: z14.string(),
5139
+ fields: z14.array(googleFieldErrorSchema).optional()
4983
5140
  });
4984
5141
 
4985
5142
  // src/commands/ads/google/changes-window.ts
@@ -12025,17 +12182,17 @@ var NUMERIC_ID_REGEX3 = /^\d+$/;
12025
12182
  var IMAGE_HASH_REGEX = /^[A-Fa-f0-9]{16,}$/;
12026
12183
 
12027
12184
  // ../api/src/ads-meta/ops.ts
12028
- import { z as z14 } from "zod";
12029
- var tempRefSchema3 = z14.string().regex(TEMP_REF_REGEX3, "expected a meta_temp_* reference");
12030
- var parentRefSchema2 = z14.union([z14.string().regex(NUMERIC_ID_REGEX3, "expected a numeric id"), tempRefSchema3]);
12031
- var moneySchema2 = z14.object({
12032
- amount: z14.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"),
12033
- currencyCode: z14.string().length(3).optional()
12034
- });
12035
- var httpsUrlSchema3 = z14.string().url().refine((u) => u.startsWith("https://"), "destination URLs must be https");
12036
- var bakerMediaIdSchema2 = z14.string().min(1);
12037
- var stageableStatusSchema3 = z14.enum(STAGEABLE_CREATE_STATUSES3);
12038
- var updateStatusSchema = z14.enum(UPDATE_STATUSES);
12185
+ import { z as z15 } from "zod";
12186
+ var tempRefSchema3 = z15.string().regex(TEMP_REF_REGEX3, "expected a meta_temp_* reference");
12187
+ var parentRefSchema2 = z15.union([z15.string().regex(NUMERIC_ID_REGEX3, "expected a numeric id"), tempRefSchema3]);
12188
+ var moneySchema2 = z15.object({
12189
+ amount: z15.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"),
12190
+ currencyCode: z15.string().length(3).optional()
12191
+ });
12192
+ var httpsUrlSchema3 = z15.string().url().refine((u) => u.startsWith("https://"), "destination URLs must be https");
12193
+ var bakerMediaIdSchema2 = z15.string().min(1);
12194
+ var stageableStatusSchema3 = z15.enum(STAGEABLE_CREATE_STATUSES3);
12195
+ var updateStatusSchema = z15.enum(UPDATE_STATUSES);
12039
12196
  function currencyMinimums2(currencyCode) {
12040
12197
  return CURRENCY_MINIMUMS2[currencyCode] ?? DEFAULT_CURRENCY_MINIMUM2;
12041
12198
  }
@@ -12047,35 +12204,35 @@ function validateDailyBudgetFloor(money, ctx, path28) {
12047
12204
  }
12048
12205
  }
12049
12206
  }
12050
- var geoLocationsSchema = z14.object({
12051
- countries: z14.array(z14.string().length(2)).optional(),
12052
- regions: z14.array(z14.object({ key: z14.string() })).optional(),
12053
- cities: z14.array(z14.object({ key: z14.string(), radius: z14.number().optional(), distance_unit: z14.string().optional() })).optional(),
12054
- zips: z14.array(z14.object({ key: z14.string() })).optional(),
12055
- location_types: z14.array(z14.string()).optional()
12056
- }).catchall(z14.unknown());
12057
- var idNameSchema = z14.object({ id: z14.string(), name: z14.string().optional() });
12058
- var metaTargetingSchema = z14.object({
12207
+ var geoLocationsSchema = z15.object({
12208
+ countries: z15.array(z15.string().length(2)).optional(),
12209
+ regions: z15.array(z15.object({ key: z15.string() })).optional(),
12210
+ cities: z15.array(z15.object({ key: z15.string(), radius: z15.number().optional(), distance_unit: z15.string().optional() })).optional(),
12211
+ zips: z15.array(z15.object({ key: z15.string() })).optional(),
12212
+ location_types: z15.array(z15.string()).optional()
12213
+ }).catchall(z15.unknown());
12214
+ var idNameSchema = z15.object({ id: z15.string(), name: z15.string().optional() });
12215
+ var metaTargetingSchema = z15.object({
12059
12216
  geo_locations: geoLocationsSchema.optional(),
12060
12217
  excluded_geo_locations: geoLocationsSchema.optional(),
12061
- age_min: z14.number().int().min(13).max(65).optional(),
12062
- age_max: z14.number().int().min(13).max(65).optional(),
12063
- genders: z14.array(z14.union([z14.literal(1), z14.literal(2)])).optional(),
12064
- locales: z14.array(z14.number().int()).optional(),
12065
- interests: z14.array(idNameSchema).optional(),
12066
- behaviors: z14.array(idNameSchema).optional(),
12067
- custom_audiences: z14.array(z14.object({ id: parentRefSchema2 })).optional(),
12068
- excluded_custom_audiences: z14.array(z14.object({ id: parentRefSchema2 })).optional(),
12069
- flexible_spec: z14.array(z14.record(z14.string(), z14.unknown())).optional(),
12070
- exclusions: z14.record(z14.string(), z14.unknown()).optional(),
12071
- publisher_platforms: z14.array(z14.string()).optional(),
12072
- facebook_positions: z14.array(z14.string()).optional(),
12073
- instagram_positions: z14.array(z14.string()).optional(),
12074
- audience_network_positions: z14.array(z14.string()).optional(),
12075
- messenger_positions: z14.array(z14.string()).optional(),
12076
- device_platforms: z14.array(z14.string()).optional(),
12077
- targeting_automation: z14.object({ advantage_audience: z14.union([z14.literal(0), z14.literal(1)]) }).partial().optional()
12078
- }).catchall(z14.unknown());
12218
+ age_min: z15.number().int().min(13).max(65).optional(),
12219
+ age_max: z15.number().int().min(13).max(65).optional(),
12220
+ genders: z15.array(z15.union([z15.literal(1), z15.literal(2)])).optional(),
12221
+ locales: z15.array(z15.number().int()).optional(),
12222
+ interests: z15.array(idNameSchema).optional(),
12223
+ behaviors: z15.array(idNameSchema).optional(),
12224
+ custom_audiences: z15.array(z15.object({ id: parentRefSchema2 })).optional(),
12225
+ excluded_custom_audiences: z15.array(z15.object({ id: parentRefSchema2 })).optional(),
12226
+ flexible_spec: z15.array(z15.record(z15.string(), z15.unknown())).optional(),
12227
+ exclusions: z15.record(z15.string(), z15.unknown()).optional(),
12228
+ publisher_platforms: z15.array(z15.string()).optional(),
12229
+ facebook_positions: z15.array(z15.string()).optional(),
12230
+ instagram_positions: z15.array(z15.string()).optional(),
12231
+ audience_network_positions: z15.array(z15.string()).optional(),
12232
+ messenger_positions: z15.array(z15.string()).optional(),
12233
+ device_platforms: z15.array(z15.string()).optional(),
12234
+ targeting_automation: z15.object({ advantage_audience: z15.union([z15.literal(0), z15.literal(1)]) }).partial().optional()
12235
+ }).catchall(z15.unknown());
12079
12236
  var GEO_INCLUSION_KEYS = [
12080
12237
  "countries",
12081
12238
  "country_groups",
@@ -12114,21 +12271,21 @@ function targetingHardLimitsDemographics(t) {
12114
12271
  const narrowsGender = Array.isArray(t.genders) && t.genders.length === 1;
12115
12272
  return narrowsAgeMax || narrowsAgeMin || narrowsGender;
12116
12273
  }
12117
- var specialAdCategoriesSchema = z14.array(z14.enum(SPECIAL_AD_CATEGORIES)).default(["NONE"]);
12118
- var campaignCreateSchema3 = z14.object({
12119
- name: z14.string().min(1).max(META_LIMITS.campaign.nameMax),
12120
- objective: z14.enum(OBJECTIVES),
12274
+ var specialAdCategoriesSchema = z15.array(z15.enum(SPECIAL_AD_CATEGORIES)).default(["NONE"]);
12275
+ var campaignCreateSchema3 = z15.object({
12276
+ name: z15.string().min(1).max(META_LIMITS.campaign.nameMax),
12277
+ objective: z15.enum(OBJECTIVES),
12121
12278
  status: stageableStatusSchema3.default("PAUSED"),
12122
12279
  special_ad_categories: specialAdCategoriesSchema,
12123
- special_ad_category_country: z14.array(z14.string().length(2)).optional(),
12124
- buying_type: z14.enum(BUYING_TYPES).default("AUCTION"),
12125
- bid_strategy: z14.enum(BID_STRATEGIES).optional(),
12280
+ special_ad_category_country: z15.array(z15.string().length(2)).optional(),
12281
+ buying_type: z15.enum(BUYING_TYPES).default("AUCTION"),
12282
+ bid_strategy: z15.enum(BID_STRATEGIES).optional(),
12126
12283
  /** Campaign Budget Optimization (Advantage campaign budget) — mutually exclusive with ad-set budgets. */
12127
12284
  dailyBudget: moneySchema2.optional(),
12128
12285
  lifetimeBudget: moneySchema2.optional(),
12129
12286
  spendCap: moneySchema2.optional(),
12130
- start_time: z14.number().int().positive().optional(),
12131
- stop_time: z14.number().int().positive().optional()
12287
+ start_time: z15.number().int().positive().optional(),
12288
+ stop_time: z15.number().int().positive().optional()
12132
12289
  }).superRefine((p, ctx) => {
12133
12290
  if (p.dailyBudget && p.lifetimeBudget) {
12134
12291
  ctx.addIssue({ code: "custom", path: ["dailyBudget"], message: "set only one of dailyBudget or lifetimeBudget" });
@@ -12146,15 +12303,15 @@ var campaignCreateSchema3 = z14.object({
12146
12303
  });
12147
12304
  }
12148
12305
  });
12149
- var campaignUpdateSchema3 = z14.object({
12150
- name: z14.string().min(1).max(META_LIMITS.campaign.nameMax).optional(),
12306
+ var campaignUpdateSchema3 = z15.object({
12307
+ name: z15.string().min(1).max(META_LIMITS.campaign.nameMax).optional(),
12151
12308
  status: updateStatusSchema.optional(),
12152
- bid_strategy: z14.enum(BID_STRATEGIES).optional(),
12309
+ bid_strategy: z15.enum(BID_STRATEGIES).optional(),
12153
12310
  dailyBudget: moneySchema2.optional(),
12154
12311
  lifetimeBudget: moneySchema2.optional(),
12155
12312
  spendCap: moneySchema2.optional(),
12156
- start_time: z14.number().int().positive().optional(),
12157
- stop_time: z14.number().int().positive().optional()
12313
+ start_time: z15.number().int().positive().optional(),
12314
+ stop_time: z15.number().int().positive().optional()
12158
12315
  }).superRefine((p, ctx) => {
12159
12316
  if (!Object.values(p).some((val) => val !== void 0)) {
12160
12317
  ctx.addIssue({ code: "custom", message: "update needs at least one field" });
@@ -12164,42 +12321,42 @@ var campaignUpdateSchema3 = z14.object({
12164
12321
  }
12165
12322
  validateDailyBudgetFloor(p.dailyBudget, ctx, ["dailyBudget", "amount"]);
12166
12323
  });
12167
- var promotedObjectSchema = z14.object({
12324
+ var promotedObjectSchema = z15.object({
12168
12325
  page_id: parentRefSchema2.optional(),
12169
- pixel_id: z14.string().regex(NUMERIC_ID_REGEX3).optional(),
12170
- custom_event_type: z14.enum(CUSTOM_EVENT_TYPES).optional(),
12171
- application_id: z14.string().regex(NUMERIC_ID_REGEX3).optional(),
12172
- object_store_url: z14.string().url().optional(),
12173
- product_catalog_id: z14.string().regex(NUMERIC_ID_REGEX3).optional(),
12174
- product_set_id: z14.string().regex(NUMERIC_ID_REGEX3).optional(),
12175
- whatsapp_phone_number: z14.string().optional(),
12176
- offline_conversion_data_set_id: z14.string().regex(NUMERIC_ID_REGEX3).optional()
12326
+ pixel_id: z15.string().regex(NUMERIC_ID_REGEX3).optional(),
12327
+ custom_event_type: z15.enum(CUSTOM_EVENT_TYPES).optional(),
12328
+ application_id: z15.string().regex(NUMERIC_ID_REGEX3).optional(),
12329
+ object_store_url: z15.string().url().optional(),
12330
+ product_catalog_id: z15.string().regex(NUMERIC_ID_REGEX3).optional(),
12331
+ product_set_id: z15.string().regex(NUMERIC_ID_REGEX3).optional(),
12332
+ whatsapp_phone_number: z15.string().optional(),
12333
+ offline_conversion_data_set_id: z15.string().regex(NUMERIC_ID_REGEX3).optional()
12177
12334
  }).partial();
12178
- var attributionSpecSchema = z14.array(
12179
- z14.object({
12180
- event_type: z14.enum(ATTRIBUTION_EVENT_TYPES),
12181
- window_days: z14.union([z14.literal(1), z14.literal(7), z14.literal(28)])
12335
+ var attributionSpecSchema = z15.array(
12336
+ z15.object({
12337
+ event_type: z15.enum(ATTRIBUTION_EVENT_TYPES),
12338
+ window_days: z15.union([z15.literal(1), z15.literal(7), z15.literal(28)])
12182
12339
  })
12183
12340
  );
12184
12341
  var adSetFields = {
12185
- name: z14.string().min(1).max(META_LIMITS.adSet.nameMax),
12342
+ name: z15.string().min(1).max(META_LIMITS.adSet.nameMax),
12186
12343
  campaign_id: parentRefSchema2,
12187
12344
  status: stageableStatusSchema3.default("PAUSED"),
12188
12345
  dailyBudget: moneySchema2.optional(),
12189
12346
  lifetimeBudget: moneySchema2.optional(),
12190
12347
  bidAmount: moneySchema2.optional(),
12191
- bid_strategy: z14.enum(BID_STRATEGIES).optional(),
12192
- billing_event: z14.enum(BILLING_EVENTS),
12193
- optimization_goal: z14.enum(OPTIMIZATION_GOALS),
12194
- destination_type: z14.enum(DESTINATION_TYPES).optional(),
12348
+ bid_strategy: z15.enum(BID_STRATEGIES).optional(),
12349
+ billing_event: z15.enum(BILLING_EVENTS),
12350
+ optimization_goal: z15.enum(OPTIMIZATION_GOALS),
12351
+ destination_type: z15.enum(DESTINATION_TYPES).optional(),
12195
12352
  promoted_object: promotedObjectSchema.optional(),
12196
12353
  attribution_spec: attributionSpecSchema.optional(),
12197
- start_time: z14.number().int().positive().optional(),
12198
- end_time: z14.number().int().positive().optional(),
12354
+ start_time: z15.number().int().positive().optional(),
12355
+ end_time: z15.number().int().positive().optional(),
12199
12356
  targeting: metaTargetingSchema,
12200
12357
  /** EU Digital Services Act: who benefits from / pays for the ad. Auto-filled from the account for EU geo when omitted. */
12201
- dsa_beneficiary: z14.string().min(1).max(100).optional(),
12202
- dsa_payor: z14.string().min(1).max(100).optional()
12358
+ dsa_beneficiary: z15.string().min(1).max(100).optional(),
12359
+ dsa_payor: z15.string().min(1).max(100).optional()
12203
12360
  };
12204
12361
  function validateBidStrategy(p, ctx) {
12205
12362
  const strategy = p.bid_strategy;
@@ -12296,7 +12453,7 @@ function validateAdvantageAudience(p, ctx) {
12296
12453
  });
12297
12454
  }
12298
12455
  }
12299
- var adSetCreateSchema = z14.object(adSetFields).superRefine((p, ctx) => {
12456
+ var adSetCreateSchema = z15.object(adSetFields).superRefine((p, ctx) => {
12300
12457
  validateAdSetBudgetAndBid(p, ctx);
12301
12458
  validateAdSetPromotedObject(p, ctx);
12302
12459
  validateAdvantageAudience(p, ctx);
@@ -12308,22 +12465,22 @@ var adSetCreateSchema = z14.object(adSetFields).superRefine((p, ctx) => {
12308
12465
  });
12309
12466
  }
12310
12467
  });
12311
- var adSetUpdateSchema = z14.object({
12468
+ var adSetUpdateSchema = z15.object({
12312
12469
  name: adSetFields.name.optional(),
12313
12470
  status: updateStatusSchema.optional(),
12314
12471
  dailyBudget: moneySchema2.optional(),
12315
12472
  lifetimeBudget: moneySchema2.optional(),
12316
12473
  bidAmount: moneySchema2.optional(),
12317
- bid_strategy: z14.enum(BID_STRATEGIES).optional(),
12318
- optimization_goal: z14.enum(OPTIMIZATION_GOALS).optional(),
12319
- destination_type: z14.enum(DESTINATION_TYPES).optional(),
12474
+ bid_strategy: z15.enum(BID_STRATEGIES).optional(),
12475
+ optimization_goal: z15.enum(OPTIMIZATION_GOALS).optional(),
12476
+ destination_type: z15.enum(DESTINATION_TYPES).optional(),
12320
12477
  promoted_object: promotedObjectSchema.optional(),
12321
12478
  attribution_spec: attributionSpecSchema.optional(),
12322
- start_time: z14.number().int().positive().optional(),
12323
- end_time: z14.number().int().positive().optional(),
12479
+ start_time: z15.number().int().positive().optional(),
12480
+ end_time: z15.number().int().positive().optional(),
12324
12481
  targeting: metaTargetingSchema.optional(),
12325
- dsa_beneficiary: z14.string().min(1).max(100).optional(),
12326
- dsa_payor: z14.string().min(1).max(100).optional()
12482
+ dsa_beneficiary: z15.string().min(1).max(100).optional(),
12483
+ dsa_payor: z15.string().min(1).max(100).optional()
12327
12484
  }).superRefine((p, ctx) => {
12328
12485
  if (!Object.values(p).some((val) => val !== void 0)) {
12329
12486
  ctx.addIssue({ code: "custom", message: "update needs at least one field" });
@@ -12334,38 +12491,38 @@ var adSetUpdateSchema = z14.object({
12334
12491
  }
12335
12492
  validateAdvantageAudience(p, ctx);
12336
12493
  });
12337
- var messageSchema = z14.string().min(1).max(META_LIMITS.creative.messageHardMax);
12338
- var headlineSchema2 = z14.string().min(1).max(META_LIMITS.creative.headlineMax);
12339
- var descriptionSchema = z14.string().min(1).max(META_LIMITS.creative.descriptionMax);
12340
- var callToActionSchema = z14.object({
12341
- type: z14.enum(CTA_TYPES2),
12494
+ var messageSchema = z15.string().min(1).max(META_LIMITS.creative.messageHardMax);
12495
+ var headlineSchema2 = z15.string().min(1).max(META_LIMITS.creative.headlineMax);
12496
+ var descriptionSchema = z15.string().min(1).max(META_LIMITS.creative.descriptionMax);
12497
+ var callToActionSchema = z15.object({
12498
+ type: z15.enum(CTA_TYPES2),
12342
12499
  /** Overrides the base link for the CTA button; defaults to the ad's link. */
12343
12500
  link: httpsUrlSchema3.optional()
12344
12501
  });
12345
- var creativeEnhancementsSchema = z14.object({
12346
- standardEnhancements: z14.enum(ENROLL_STATUSES).optional(),
12347
- features: z14.record(z14.string(), z14.enum(ENROLL_STATUSES)).optional()
12502
+ var creativeEnhancementsSchema = z15.object({
12503
+ standardEnhancements: z15.enum(ENROLL_STATUSES).optional(),
12504
+ features: z15.record(z15.string(), z15.enum(ENROLL_STATUSES)).optional()
12348
12505
  });
12349
12506
  var creativeSharedFields = {
12350
- name: z14.string().max(META_LIMITS.creative.nameMax).optional(),
12507
+ name: z15.string().max(META_LIMITS.creative.nameMax).optional(),
12351
12508
  /** Facebook Page id backing the ad's identity. */
12352
12509
  page_id: parentRefSchema2,
12353
12510
  /** Instagram account id for IG placements (aka instagram_actor_id on read). */
12354
- instagram_user_id: z14.string().regex(NUMERIC_ID_REGEX3).optional(),
12511
+ instagram_user_id: z15.string().regex(NUMERIC_ID_REGEX3).optional(),
12355
12512
  /** URL tracking parameters appended to the destination, e.g. "utm_source=fb&utm_campaign=x". */
12356
- url_tags: z14.string().max(1e3).optional(),
12513
+ url_tags: z15.string().max(1e3).optional(),
12357
12514
  enhancements: creativeEnhancementsSchema.optional()
12358
12515
  };
12359
12516
  var imageMediaFields = {
12360
- imageHash: z14.string().regex(IMAGE_HASH_REGEX).optional(),
12517
+ imageHash: z15.string().regex(IMAGE_HASH_REGEX).optional(),
12361
12518
  imageRef: tempRefSchema3.optional()
12362
12519
  };
12363
12520
  var videoMediaFields = {
12364
- videoId: z14.string().regex(NUMERIC_ID_REGEX3).optional(),
12521
+ videoId: z15.string().regex(NUMERIC_ID_REGEX3).optional(),
12365
12522
  videoRef: tempRefSchema3.optional(),
12366
12523
  /** Thumbnail for a video creative — image hash, ref, or public url. */
12367
- thumbnailHash: z14.string().regex(IMAGE_HASH_REGEX).optional(),
12368
- imageUrl: z14.string().url().optional()
12524
+ thumbnailHash: z15.string().regex(IMAGE_HASH_REGEX).optional(),
12525
+ imageUrl: z15.string().url().optional()
12369
12526
  };
12370
12527
  function countImageRefs(p) {
12371
12528
  return [p.imageHash, p.imageRef].filter(Boolean).length;
@@ -12373,8 +12530,8 @@ function countImageRefs(p) {
12373
12530
  function countVideoRefs(p) {
12374
12531
  return [p.videoId, p.videoRef].filter(Boolean).length;
12375
12532
  }
12376
- var singleCreativeSchema = z14.object({
12377
- creativeType: z14.literal("single"),
12533
+ var singleCreativeSchema = z15.object({
12534
+ creativeType: z15.literal("single"),
12378
12535
  ...creativeSharedFields,
12379
12536
  /** Primary text. */
12380
12537
  message: messageSchema,
@@ -12383,7 +12540,7 @@ var singleCreativeSchema = z14.object({
12383
12540
  headline: headlineSchema2.optional(),
12384
12541
  description: descriptionSchema.optional(),
12385
12542
  /** Display URL / caption shown under the headline. */
12386
- caption: z14.string().max(255).optional(),
12543
+ caption: z15.string().max(255).optional(),
12387
12544
  call_to_action: callToActionSchema.optional(),
12388
12545
  ...imageMediaFields,
12389
12546
  ...videoMediaFields
@@ -12407,10 +12564,10 @@ var singleCreativeSchema = z14.object({
12407
12564
  });
12408
12565
  }
12409
12566
  });
12410
- var carouselCardSchema = z14.object({
12567
+ var carouselCardSchema = z15.object({
12411
12568
  link: httpsUrlSchema3,
12412
- headline: z14.string().max(META_LIMITS.creative.headlineMax).optional(),
12413
- description: z14.string().max(META_LIMITS.creative.descriptionMax).optional(),
12569
+ headline: z15.string().max(META_LIMITS.creative.headlineMax).optional(),
12570
+ description: z15.string().max(META_LIMITS.creative.descriptionMax).optional(),
12414
12571
  call_to_action: callToActionSchema.optional(),
12415
12572
  ...imageMediaFields,
12416
12573
  ...videoMediaFields
@@ -12430,35 +12587,35 @@ var carouselCardSchema = z14.object({
12430
12587
  ctx.addIssue({ code: "custom", path: ["videoId"], message: "each card is an image OR a video, not both" });
12431
12588
  }
12432
12589
  });
12433
- var carouselCreativeSchema2 = z14.object({
12434
- creativeType: z14.literal("carousel"),
12590
+ var carouselCreativeSchema2 = z15.object({
12591
+ creativeType: z15.literal("carousel"),
12435
12592
  ...creativeSharedFields,
12436
12593
  message: messageSchema,
12437
12594
  /** Optional "see more" card destination applied when a card has no own link. */
12438
12595
  link: httpsUrlSchema3.optional(),
12439
12596
  call_to_action: callToActionSchema.optional(),
12440
- cards: z14.array(carouselCardSchema).min(META_LIMITS.creative.carouselCardsMin).max(META_LIMITS.creative.carouselCardsMax)
12597
+ cards: z15.array(carouselCardSchema).min(META_LIMITS.creative.carouselCardsMin).max(META_LIMITS.creative.carouselCardsMax)
12441
12598
  });
12442
- var dynamicImageSchema = z14.object({ ...imageMediaFields }).refine((p) => countImageRefs(p) === 1, "each dynamic image needs exactly one reference");
12443
- var dynamicVideoSchema = z14.object({
12599
+ var dynamicImageSchema = z15.object({ ...imageMediaFields }).refine((p) => countImageRefs(p) === 1, "each dynamic image needs exactly one reference");
12600
+ var dynamicVideoSchema = z15.object({
12444
12601
  videoId: videoMediaFields.videoId,
12445
12602
  videoRef: videoMediaFields.videoRef,
12446
12603
  thumbnailHash: videoMediaFields.thumbnailHash
12447
12604
  }).refine((p) => countVideoRefs(p) === 1, "each dynamic video needs exactly one reference");
12448
12605
  var DYN = META_LIMITS.creative;
12449
- var dynamicCreativeSchema = z14.object({
12450
- creativeType: z14.literal("dynamic"),
12606
+ var dynamicCreativeSchema = z15.object({
12607
+ creativeType: z15.literal("dynamic"),
12451
12608
  ...creativeSharedFields,
12452
- bodies: z14.array(z14.object({ text: messageSchema })).min(DYN.dynamicTextsMin).max(DYN.dynamicTextsMax),
12453
- titles: z14.array(z14.object({ text: headlineSchema2 })).min(DYN.dynamicTextsMin).max(DYN.dynamicTextsMax),
12454
- descriptions: z14.array(z14.object({ text: descriptionSchema })).max(DYN.dynamicTextsMax).optional(),
12455
- images: z14.array(dynamicImageSchema).optional(),
12456
- videos: z14.array(dynamicVideoSchema).optional(),
12457
- ad_formats: z14.array(z14.enum(AD_FORMATS2)).min(1),
12458
- call_to_action_types: z14.array(z14.enum(CTA_TYPES2)).optional(),
12459
- link_urls: z14.array(z14.object({ website_url: httpsUrlSchema3, display_url: z14.string().optional() })).min(1),
12609
+ bodies: z15.array(z15.object({ text: messageSchema })).min(DYN.dynamicTextsMin).max(DYN.dynamicTextsMax),
12610
+ titles: z15.array(z15.object({ text: headlineSchema2 })).min(DYN.dynamicTextsMin).max(DYN.dynamicTextsMax),
12611
+ descriptions: z15.array(z15.object({ text: descriptionSchema })).max(DYN.dynamicTextsMax).optional(),
12612
+ images: z15.array(dynamicImageSchema).optional(),
12613
+ videos: z15.array(dynamicVideoSchema).optional(),
12614
+ ad_formats: z15.array(z15.enum(AD_FORMATS2)).min(1),
12615
+ call_to_action_types: z15.array(z15.enum(CTA_TYPES2)).optional(),
12616
+ link_urls: z15.array(z15.object({ website_url: httpsUrlSchema3, display_url: z15.string().optional() })).min(1),
12460
12617
  /** Multi-language / placement customization — structural passthrough for v1. */
12461
- asset_customization_rules: z14.array(z14.record(z14.string(), z14.unknown())).optional()
12618
+ asset_customization_rules: z15.array(z15.record(z15.string(), z15.unknown())).optional()
12462
12619
  }).superRefine((p, ctx) => {
12463
12620
  if (!(p.images?.length || p.videos?.length)) {
12464
12621
  ctx.addIssue({
@@ -12468,57 +12625,57 @@ var dynamicCreativeSchema = z14.object({
12468
12625
  });
12469
12626
  }
12470
12627
  });
12471
- var existingPostCreativeSchema = z14.object({
12472
- creativeType: z14.literal("existing_post"),
12628
+ var existingPostCreativeSchema = z15.object({
12629
+ creativeType: z15.literal("existing_post"),
12473
12630
  name: creativeSharedFields.name,
12474
12631
  /** "<page_id>_<post_id>" object story id of the post to promote. */
12475
- object_story_id: z14.string().regex(/^\d+_\d+$/, 'expected "<page_id>_<post_id>"'),
12632
+ object_story_id: z15.string().regex(/^\d+_\d+$/, 'expected "<page_id>_<post_id>"'),
12476
12633
  instagram_user_id: creativeSharedFields.instagram_user_id,
12477
12634
  url_tags: creativeSharedFields.url_tags,
12478
12635
  enhancements: creativeSharedFields.enhancements
12479
12636
  });
12480
- var creativeContentSchema2 = z14.discriminatedUnion("creativeType", [
12637
+ var creativeContentSchema2 = z15.discriminatedUnion("creativeType", [
12481
12638
  singleCreativeSchema,
12482
12639
  carouselCreativeSchema2,
12483
12640
  dynamicCreativeSchema,
12484
12641
  existingPostCreativeSchema
12485
12642
  ]);
12486
12643
  var adCreativeCreateSchema = creativeContentSchema2;
12487
- var adCreativeUpdateSchema = z14.object({
12488
- name: z14.string().max(META_LIMITS.creative.nameMax).optional(),
12644
+ var adCreativeUpdateSchema = z15.object({
12645
+ name: z15.string().max(META_LIMITS.creative.nameMax).optional(),
12489
12646
  status: updateStatusSchema.optional(),
12490
12647
  /** Content patch — only honored when the target is a staged meta_temp_* creative. */
12491
- content: z14.record(z14.string(), z14.unknown()).optional()
12648
+ content: z15.record(z15.string(), z15.unknown()).optional()
12492
12649
  }).refine((p) => Object.values(p).some((val) => val !== void 0), "update needs at least one field");
12493
- var adCreateSchema2 = z14.object({
12494
- name: z14.string().min(1).max(META_LIMITS.ad.nameMax),
12650
+ var adCreateSchema2 = z15.object({
12651
+ name: z15.string().min(1).max(META_LIMITS.ad.nameMax),
12495
12652
  adset_id: parentRefSchema2,
12496
12653
  status: stageableStatusSchema3.default("PAUSED"),
12497
- creative: z14.object({ creative_id: parentRefSchema2 }),
12654
+ creative: z15.object({ creative_id: parentRefSchema2 }),
12498
12655
  /** Conversion pixel / offline event set / view tags — structural passthrough. */
12499
- tracking_specs: z14.array(z14.record(z14.string(), z14.unknown())).optional()
12656
+ tracking_specs: z15.array(z15.record(z15.string(), z15.unknown())).optional()
12500
12657
  });
12501
- var adUpdateSchema2 = z14.object({
12502
- name: z14.string().min(1).max(META_LIMITS.ad.nameMax).optional(),
12658
+ var adUpdateSchema2 = z15.object({
12659
+ name: z15.string().min(1).max(META_LIMITS.ad.nameMax).optional(),
12503
12660
  status: updateStatusSchema.optional(),
12504
12661
  /** Swapping the creative is the Meta way to "edit" an ad's creative. */
12505
- creative: z14.object({ creative_id: parentRefSchema2 }).optional(),
12506
- tracking_specs: z14.array(z14.record(z14.string(), z14.unknown())).optional()
12662
+ creative: z15.object({ creative_id: parentRefSchema2 }).optional(),
12663
+ tracking_specs: z15.array(z15.record(z15.string(), z15.unknown())).optional()
12507
12664
  }).refine((p) => Object.values(p).some((val) => val !== void 0), "update needs at least one field");
12508
- var lookalikeSpecSchema = z14.object({
12509
- origin: z14.array(z14.object({ id: parentRefSchema2 })).min(1),
12510
- ratio: z14.number().min(0.01).max(0.2).optional(),
12511
- country: z14.string().length(2).optional()
12512
- });
12513
- var customAudienceCreateSchema = z14.object({
12514
- name: z14.string().min(1).max(META_LIMITS.audience.nameMax),
12515
- subtype: z14.enum(CUSTOM_AUDIENCE_SUBTYPES),
12516
- description: z14.string().max(500).optional(),
12517
- customer_file_source: z14.string().optional(),
12518
- retention_days: z14.number().int().min(1).max(META_LIMITS.audience.retentionDaysMax).optional(),
12665
+ var lookalikeSpecSchema = z15.object({
12666
+ origin: z15.array(z15.object({ id: parentRefSchema2 })).min(1),
12667
+ ratio: z15.number().min(0.01).max(0.2).optional(),
12668
+ country: z15.string().length(2).optional()
12669
+ });
12670
+ var customAudienceCreateSchema = z15.object({
12671
+ name: z15.string().min(1).max(META_LIMITS.audience.nameMax),
12672
+ subtype: z15.enum(CUSTOM_AUDIENCE_SUBTYPES),
12673
+ description: z15.string().max(500).optional(),
12674
+ customer_file_source: z15.string().optional(),
12675
+ retention_days: z15.number().int().min(1).max(META_LIMITS.audience.retentionDaysMax).optional(),
12519
12676
  lookalike_spec: lookalikeSpecSchema.optional(),
12520
12677
  /** Website/engagement rule — structural passthrough validated by Meta. */
12521
- rule: z14.record(z14.string(), z14.unknown()).optional()
12678
+ rule: z15.record(z15.string(), z15.unknown()).optional()
12522
12679
  }).superRefine((p, ctx) => {
12523
12680
  if (p.subtype === "LOOKALIKE" && !p.lookalike_spec) {
12524
12681
  ctx.addIssue({ code: "custom", path: ["lookalike_spec"], message: "LOOKALIKE audiences need a lookalike_spec" });
@@ -12527,16 +12684,16 @@ var customAudienceCreateSchema = z14.object({
12527
12684
  ctx.addIssue({ code: "custom", path: ["rule"], message: `${p.subtype} audiences need a rule (use --file)` });
12528
12685
  }
12529
12686
  });
12530
- var customAudienceUpdateSchema = z14.object({
12531
- name: z14.string().min(1).max(META_LIMITS.audience.nameMax).optional(),
12532
- description: z14.string().max(500).optional()
12687
+ var customAudienceUpdateSchema = z15.object({
12688
+ name: z15.string().min(1).max(META_LIMITS.audience.nameMax).optional(),
12689
+ description: z15.string().max(500).optional()
12533
12690
  }).refine((p) => Object.values(p).some((val) => val !== void 0), "update needs at least one field");
12534
- var mediaUploadSchema = z14.object({
12535
- kind: z14.enum(MEDIA_KINDS),
12691
+ var mediaUploadSchema = z15.object({
12692
+ kind: z15.enum(MEDIA_KINDS),
12536
12693
  bakerImageId: bakerMediaIdSchema2.optional(),
12537
12694
  bakerVideoId: bakerMediaIdSchema2.optional(),
12538
12695
  /** Optional display name / filename hint. */
12539
- name: z14.string().max(255).optional()
12696
+ name: z15.string().max(255).optional()
12540
12697
  }).superRefine((p, ctx) => {
12541
12698
  if (p.kind === "image" && !p.bakerImageId) {
12542
12699
  ctx.addIssue({ code: "custom", path: ["bakerImageId"], message: "image uploads need a bakerImageId" });
@@ -12558,16 +12715,16 @@ var META_DRAFT_OP_KINDS = [
12558
12715
  "customAudience.update",
12559
12716
  "media.upload"
12560
12717
  ];
12561
- var metaDraftOpKindSchema = z14.enum(META_DRAFT_OP_KINDS);
12562
- var accountIdSchema2 = z14.string().regex(NUMERIC_ID_REGEX3, "accountId must be the bare numeric ad account id");
12563
- var updateTargetSchema2 = z14.union([z14.string().regex(NUMERIC_ID_REGEX3), tempRefSchema3]);
12718
+ var metaDraftOpKindSchema = z15.enum(META_DRAFT_OP_KINDS);
12719
+ var accountIdSchema2 = z15.string().regex(NUMERIC_ID_REGEX3, "accountId must be the bare numeric ad account id");
12720
+ var updateTargetSchema2 = z15.union([z15.string().regex(NUMERIC_ID_REGEX3), tempRefSchema3]);
12564
12721
  function createOp3(kind, payload) {
12565
- return z14.object({ kind: z14.literal(kind), accountId: accountIdSchema2, payload });
12722
+ return z15.object({ kind: z15.literal(kind), accountId: accountIdSchema2, payload });
12566
12723
  }
12567
12724
  function updateOp3(kind, payload) {
12568
- return z14.object({ kind: z14.literal(kind), accountId: accountIdSchema2, target: updateTargetSchema2, payload });
12725
+ return z15.object({ kind: z15.literal(kind), accountId: accountIdSchema2, target: updateTargetSchema2, payload });
12569
12726
  }
12570
- var metaDraftOpInputSchema = z14.discriminatedUnion("kind", [
12727
+ var metaDraftOpInputSchema = z15.discriminatedUnion("kind", [
12571
12728
  createOp3("campaign.create", campaignCreateSchema3),
12572
12729
  updateOp3("campaign.update", campaignUpdateSchema3),
12573
12730
  createOp3("adSet.create", adSetCreateSchema),
@@ -12582,89 +12739,89 @@ var metaDraftOpInputSchema = z14.discriminatedUnion("kind", [
12582
12739
  ]);
12583
12740
 
12584
12741
  // ../api/src/ads-meta/wire.ts
12585
- import { z as z15 } from "zod";
12586
- var metaWriteModeSchema = z15.enum(["live", "simulated"]);
12587
- var metaDraftOpResultSchema = z15.object({
12588
- status: z15.enum(["applied", "simulated", "failed", "skipped"]),
12742
+ import { z as z16 } from "zod";
12743
+ var metaWriteModeSchema = z16.enum(["live", "simulated"]);
12744
+ var metaDraftOpResultSchema = z16.object({
12745
+ status: z16.enum(["applied", "simulated", "failed", "skipped"]),
12589
12746
  /** The resulting Meta node id (campaign/adset/creative/ad/audience) or simulated id. */
12590
- id: z15.string().optional(),
12747
+ id: z16.string().optional(),
12591
12748
  /** For media.upload ops: the resulting image hash. */
12592
- hash: z15.string().optional(),
12593
- error: z15.string().optional(),
12594
- skippedBecause: z15.string().optional(),
12595
- executedAt: z15.number().optional()
12749
+ hash: z16.string().optional(),
12750
+ error: z16.string().optional(),
12751
+ skippedBecause: z16.string().optional(),
12752
+ executedAt: z16.number().optional()
12596
12753
  });
12597
- var metaDraftStageRequestSchema = z15.object({
12598
- chatId: z15.string(),
12754
+ var metaDraftStageRequestSchema = z16.object({
12755
+ chatId: z16.string(),
12599
12756
  op: metaDraftOpInputSchema
12600
12757
  });
12601
- var metaDraftStageResponseSchema = z15.object({
12602
- staged: z15.literal(true),
12603
- ref: z15.string(),
12758
+ var metaDraftStageResponseSchema = z16.object({
12759
+ staged: z16.literal(true),
12760
+ ref: z16.string(),
12604
12761
  kind: metaDraftOpKindSchema,
12605
12762
  mode: metaWriteModeSchema,
12606
- dependsOn: z15.array(z15.string()),
12607
- summary: z15.string(),
12608
- warnings: z15.array(z15.string()),
12763
+ dependsOn: z16.array(z16.string()),
12764
+ summary: z16.string(),
12765
+ warnings: z16.array(z16.string()),
12609
12766
  /** True when the op amended an already-staged op in place instead of appending a new one. */
12610
- amended: z15.boolean().optional()
12611
- });
12612
- var metaDraftDuplicateRequestSchema = z15.object({
12613
- chatId: z15.string(),
12614
- accountId: z15.string(),
12615
- entity: z15.enum(["campaign", "adSet", "ad"]),
12616
- sourceId: z15.string(),
12617
- overrides: z15.record(z15.string(), z15.unknown()).optional(),
12767
+ amended: z16.boolean().optional()
12768
+ });
12769
+ var metaDraftDuplicateRequestSchema = z16.object({
12770
+ chatId: z16.string(),
12771
+ accountId: z16.string(),
12772
+ entity: z16.enum(["campaign", "adSet", "ad"]),
12773
+ sourceId: z16.string(),
12774
+ overrides: z16.record(z16.string(), z16.unknown()).optional(),
12618
12775
  /** Pause the original after the copy publishes. */
12619
- replace: z15.boolean().optional()
12776
+ replace: z16.boolean().optional()
12620
12777
  });
12621
- var metaDraftOpViewSchema = z15.object({
12622
- ref: z15.string(),
12778
+ var metaDraftOpViewSchema = z16.object({
12779
+ ref: z16.string(),
12623
12780
  kind: metaDraftOpKindSchema,
12624
- accountId: z15.string(),
12625
- target: z15.string().optional(),
12626
- dependsOn: z15.array(z15.string()),
12627
- summary: z15.string(),
12628
- stagedAt: z15.number(),
12781
+ accountId: z16.string(),
12782
+ target: z16.string().optional(),
12783
+ dependsOn: z16.array(z16.string()),
12784
+ summary: z16.string(),
12785
+ stagedAt: z16.number(),
12629
12786
  result: metaDraftOpResultSchema.optional()
12630
12787
  });
12631
- var metaDraftListRequestSchema = z15.object({
12632
- chatId: z15.string()
12788
+ var metaDraftListRequestSchema = z16.object({
12789
+ chatId: z16.string()
12633
12790
  });
12634
- var metaDraftAdvisorySchema = z15.object({
12635
- ref: z15.string(),
12636
- message: z15.string()
12791
+ var metaDraftAdvisorySchema = z16.object({
12792
+ ref: z16.string(),
12793
+ message: z16.string()
12637
12794
  });
12638
- var metaDraftListResponseSchema = z15.object({
12639
- status: z15.enum(["active", "publishing", "applied", "discarded", "none"]),
12795
+ var metaDraftListResponseSchema = z16.object({
12796
+ status: z16.enum(["active", "publishing", "applied", "discarded", "none"]),
12640
12797
  mode: metaWriteModeSchema,
12641
- count: z15.number(),
12642
- ops: z15.array(metaDraftOpViewSchema),
12798
+ count: z16.number(),
12799
+ ops: z16.array(metaDraftOpViewSchema),
12643
12800
  /** Non-blocking cross-op quality advisories — "good campaign, not just valid". */
12644
- advisories: z15.array(metaDraftAdvisorySchema)
12801
+ advisories: z16.array(metaDraftAdvisorySchema)
12645
12802
  });
12646
- var metaDraftRemoveRequestSchema = z15.object({
12647
- chatId: z15.string(),
12648
- ref: z15.string()
12803
+ var metaDraftRemoveRequestSchema = z16.object({
12804
+ chatId: z16.string(),
12805
+ ref: z16.string()
12649
12806
  });
12650
- var metaDraftRemoveResponseSchema = z15.object({
12807
+ var metaDraftRemoveResponseSchema = z16.object({
12651
12808
  /** The requested ref plus any dependents removed by cascade. */
12652
- removed: z15.array(z15.string())
12809
+ removed: z16.array(z16.string())
12653
12810
  });
12654
- var metaDraftClearRequestSchema = z15.object({
12655
- chatId: z15.string()
12811
+ var metaDraftClearRequestSchema = z16.object({
12812
+ chatId: z16.string()
12656
12813
  });
12657
- var metaDraftClearResponseSchema = z15.object({
12658
- cleared: z15.number()
12814
+ var metaDraftClearResponseSchema = z16.object({
12815
+ cleared: z16.number()
12659
12816
  });
12660
- var metaFieldErrorSchema = z15.object({
12661
- path: z15.string(),
12662
- message: z15.string()
12817
+ var metaFieldErrorSchema = z16.object({
12818
+ path: z16.string(),
12819
+ message: z16.string()
12663
12820
  });
12664
- var metaDraftErrorResponseSchema = z15.object({
12665
- code: z15.string(),
12666
- error: z15.string(),
12667
- fields: z15.array(metaFieldErrorSchema).optional()
12821
+ var metaDraftErrorResponseSchema = z16.object({
12822
+ code: z16.string(),
12823
+ error: z16.string(),
12824
+ fields: z16.array(metaFieldErrorSchema).optional()
12668
12825
  });
12669
12826
 
12670
12827
  // src/commands/ads/meta/write-shared.ts
@@ -16419,7 +16576,7 @@ import { toCardinal as nwKo } from "n2words/ko-KR";
16419
16576
  import { toCardinal as nwNl } from "n2words/nl-NL";
16420
16577
  import { toCardinal as nwPl } from "n2words/pl-PL";
16421
16578
  import { toCardinal as nwPt } from "n2words/pt-PT";
16422
- import { z as z16 } from "zod";
16579
+ import { z as z17 } from "zod";
16423
16580
 
16424
16581
  // src/engine/scaffold/lib/shoot-modes.ts
16425
16582
  var SHOOT_MODES = [
@@ -16755,71 +16912,71 @@ function trimArgs(durationS, offsetS = 0, dims) {
16755
16912
  "{{out.video}}"
16756
16913
  ];
16757
16914
  }
16758
- var FrameAsset = z16.object({ url: z16.string().optional() }).loose().optional();
16759
- var DialogueLine = z16.object({
16760
- speaker: z16.string().optional(),
16761
- line: z16.string().optional(),
16915
+ var FrameAsset = z17.object({ url: z17.string().optional() }).loose().optional();
16916
+ var DialogueLine = z17.object({
16917
+ speaker: z17.string().optional(),
16918
+ line: z17.string().optional(),
16762
16919
  // Absolute seconds on the source timeline (the deconstruct emits both).
16763
- start_s: z16.number().optional(),
16764
- end_s: z16.number().optional(),
16765
- delivery: z16.string().optional(),
16766
- voice_description: z16.string().optional(),
16920
+ start_s: z17.number().optional(),
16921
+ end_s: z17.number().optional(),
16922
+ delivery: z17.string().optional(),
16923
+ voice_description: z17.string().optional(),
16767
16924
  // DECON-supplied: is this speaker's FACE visibly speaking in THIS scene? Element
16768
16925
  // presence alone can't answer that — a founder pictured in a polaroid close-up is
16769
16926
  // "present" yet the line is voiceover, and treating it as on-camera produced a
16770
16927
  // native Seedance lip-sync clip of a still photograph. `false` pins the line to
16771
16928
  // the VO path; absent keeps the presence-based decision (old blueprints).
16772
- on_camera: z16.boolean().optional()
16929
+ on_camera: z17.boolean().optional()
16773
16930
  }).loose();
16774
- var Sfx = z16.object({
16775
- at_s: z16.number().optional(),
16776
- duration_s: z16.number().optional(),
16777
- sound_effect_prompt: z16.string().optional(),
16778
- description: z16.string().optional()
16931
+ var Sfx = z17.object({
16932
+ at_s: z17.number().optional(),
16933
+ duration_s: z17.number().optional(),
16934
+ sound_effect_prompt: z17.string().optional(),
16935
+ description: z17.string().optional()
16779
16936
  }).loose();
16780
- var CompositionRegion = z16.object({
16937
+ var CompositionRegion = z17.object({
16781
16938
  // full | top | bottom | left | right | inset
16782
- panel: z16.string().optional(),
16939
+ panel: z17.string().optional(),
16783
16940
  // 9-grid anchor for an `inset` presenter box.
16784
- position: z16.string().optional(),
16785
- is_presenter: z16.boolean().optional(),
16941
+ position: z17.string().optional(),
16942
+ is_presenter: z17.boolean().optional(),
16786
16943
  // The cast id shown/speaking in this region (routes lip-sync + element refs).
16787
- cast_ref: z16.string().optional(),
16944
+ cast_ref: z17.string().optional(),
16788
16945
  // What the region's content IS: camera | screen_capture | static_graphic |
16789
16946
  // generated. Authoritative for routing when present (regex-over-prose fallback
16790
16947
  // otherwise): screen_capture/static_graphic are rebuilt from REAL surfaces on the
16791
16948
  // overlay layer, never AI-generated.
16792
- kind: z16.string().optional(),
16949
+ kind: z17.string().optional(),
16793
16950
  // Opaque id naming the SPECIFIC on-screen document/note/app-state this
16794
16951
  // screen_capture region shows. Two scenes share it only when they show the SAME
16795
16952
  // recording continuing (scrolling/typing/waiting within it) — a genuinely
16796
16953
  // DIFFERENT document/note/recording (a source video splicing two screen captures)
16797
16954
  // gets a different id. Breaks a persistent-layout run into separate surface stubs
16798
16955
  // instead of asking the operator for one screenshot that can't cover both.
16799
- surface_id: z16.string().optional(),
16956
+ surface_id: z17.string().optional(),
16800
16957
  // Camera bubble(s)/inset(s) embedded INSIDE this region's surface (a Loom-style
16801
16958
  // presenter bubble inside a screen recording) — video-in-video the reproduction
16802
16959
  // must re-composite, not paint into the surface.
16803
- nested: z16.array(z16.object({}).loose()).optional(),
16804
- summary: z16.string().optional(),
16805
- frame_prompt: z16.string().optional(),
16806
- motion_prompt: z16.string().optional()
16960
+ nested: z17.array(z17.object({}).loose()).optional(),
16961
+ summary: z17.string().optional(),
16962
+ frame_prompt: z17.string().optional(),
16963
+ motion_prompt: z17.string().optional()
16807
16964
  }).loose();
16808
- var SceneComposition = z16.object({
16965
+ var SceneComposition = z17.object({
16809
16966
  // full_frame (default) | split_screen | pip | keyed_overlay
16810
- layout: z16.string().optional(),
16967
+ layout: z17.string().optional(),
16811
16968
  // split_screen only: vertical (top/bottom) | horizontal (left/right).
16812
- split_axis: z16.string().optional(),
16813
- regions: z16.array(CompositionRegion).optional()
16969
+ split_axis: z17.string().optional(),
16970
+ regions: z17.array(CompositionRegion).optional()
16814
16971
  }).loose();
16815
- var CameraMotion = z16.object({ movement: z16.string().optional(), detail: z16.string().optional() }).loose();
16816
- var TranscriptWord = z16.object({ text: z16.string().optional() }).loose();
16817
- var Scene = z16.object({
16818
- start_s: z16.number().optional(),
16819
- end_s: z16.number().optional(),
16820
- duration_s: z16.number().optional(),
16821
- summary: z16.string().optional(),
16822
- action_detail: z16.string().optional(),
16972
+ var CameraMotion = z17.object({ movement: z17.string().optional(), detail: z17.string().optional() }).loose();
16973
+ var TranscriptWord = z17.object({ text: z17.string().optional() }).loose();
16974
+ var Scene = z17.object({
16975
+ start_s: z17.number().optional(),
16976
+ end_s: z17.number().optional(),
16977
+ duration_s: z17.number().optional(),
16978
+ summary: z17.string().optional(),
16979
+ action_detail: z17.string().optional(),
16823
16980
  // The scene's spatial layout. Absent/full_frame ⇒ one uncut shot (default path).
16824
16981
  // A layered layout (split_screen/pip/keyed_overlay) with regions ⇒ the scaffold
16825
16982
  // builds one clip per region and stacks/overlays them into the scene picture.
@@ -16827,82 +16984,82 @@ var Scene = z16.object({
16827
16984
  // The capture "look" for this scene — selected from the ad-native shoot-mode
16828
16985
  // grammar (see lib/shoot-modes.ts). When absent the scaffold auto-derives a
16829
16986
  // UGC/product mode; a human can override per scene by setting this.
16830
- shoot_mode: z16.string().optional(),
16987
+ shoot_mode: z17.string().optional(),
16831
16988
  // Diegetic ambient the clip's native audio should carry (no music). When
16832
16989
  // absent the scene falls back to its shoot mode's default ambience.
16833
- ambient: z16.string().optional(),
16990
+ ambient: z17.string().optional(),
16834
16991
  camera_motion: CameraMotion.optional(),
16835
- start_frame_prompt: z16.string().optional(),
16836
- end_frame_prompt: z16.string().optional(),
16837
- motion_prompt: z16.string().optional(),
16992
+ start_frame_prompt: z17.string().optional(),
16993
+ end_frame_prompt: z17.string().optional(),
16994
+ motion_prompt: z17.string().optional(),
16838
16995
  // The scene's role in the ad's persuasion arc (DECON-supplied); drives the
16839
16996
  // script re-craft checklist. Inferred from position when absent.
16840
- narrative_role: z16.string().optional(),
16997
+ narrative_role: z17.string().optional(),
16841
16998
  // DECON-supplied on the HOOK scene: the engineered physical/emotional state that
16842
16999
  // makes the first frame stop the scroll (sweaty/breathless/urgent …). Injected
16843
17000
  // into the hook's start-frame description so the generator renders that state,
16844
17001
  // not a calm influencer (CCA-11).
16845
- hook_mechanic: z16.object({ mechanic: z16.string().optional(), why_it_stops_scroll: z16.string().optional() }).loose().optional(),
17002
+ hook_mechanic: z17.object({ mechanic: z17.string().optional(), why_it_stops_scroll: z17.string().optional() }).loose().optional(),
16846
17003
  // DECON-supplied per-scene location (so a gym hook isn't flattened to "home").
16847
- scene_setting: z16.string().optional(),
17004
+ scene_setting: z17.string().optional(),
16848
17005
  // How this scene cuts to the next (DECON-supplied). A recognized non-cut type
16849
17006
  // (fade/whip/zoom/dissolve/swipe) is reproduced as an ffmpeg xfade at the
16850
17007
  // boundary; cut/match_cut/none/other stay hard cuts. The last scene's value is
16851
17008
  // ignored (nothing follows it).
16852
- transition_out: z16.object({ type: z16.string().optional(), description: z16.string().optional() }).loose().optional(),
16853
- dialogue: z16.array(DialogueLine).optional(),
16854
- sfx: z16.array(Sfx).optional(),
16855
- overlays: z16.array(z16.unknown()).optional(),
16856
- floating_elements: z16.array(z16.unknown()).optional(),
17009
+ transition_out: z17.object({ type: z17.string().optional(), description: z17.string().optional() }).loose().optional(),
17010
+ dialogue: z17.array(DialogueLine).optional(),
17011
+ sfx: z17.array(Sfx).optional(),
17012
+ overlays: z17.array(z17.unknown()).optional(),
17013
+ floating_elements: z17.array(z17.unknown()).optional(),
16857
17014
  // DECON-supplied: how much the picture itself moves within the shot. Gates the
16858
17015
  // flash-hold optimization — a sub-2s b-roll flash with REAL subject motion
16859
17016
  // (pouring, spreading, hands working) must stay a real clip; freezing it turns
16860
17017
  // a montage into a slideshow. Absent (old blueprints) keeps the cheap still.
16861
- motion_level: z16.enum(["static", "subtle", "dynamic"]).optional(),
16862
- transcript_slice: z16.array(TranscriptWord).optional(),
17018
+ motion_level: z17.enum(["static", "subtle", "dynamic"]).optional(),
17019
+ transcript_slice: z17.array(TranscriptWord).optional(),
16863
17020
  start_frame_asset: FrameAsset,
16864
17021
  end_frame_asset: FrameAsset,
16865
17022
  // DECON-supplied: true when this scene is a length-split CONTINUATION of the
16866
17023
  // previous one (the SAME physical shot, broken up only because it exceeded the
16867
17024
  // clip ceiling). The scaffold then shares the splice keyframe — this scene's
16868
17025
  // start frame IS the previous scene's end frame — so the join is seamless.
16869
- continues_previous: z16.boolean().optional()
17026
+ continues_previous: z17.boolean().optional()
16870
17027
  }).loose();
16871
- var VideoBlueprint = z16.object({
16872
- source: z16.object({ aspect_ratio: z16.string().optional(), duration_s: z16.number().optional() }).loose().optional(),
16873
- global: z16.object({
16874
- music: z16.object({
16875
- present: z16.boolean().optional(),
16876
- music_prompt: z16.string().optional(),
17028
+ var VideoBlueprint = z17.object({
17029
+ source: z17.object({ aspect_ratio: z17.string().optional(), duration_s: z17.number().optional() }).loose().optional(),
17030
+ global: z17.object({
17031
+ music: z17.object({
17032
+ present: z17.boolean().optional(),
17033
+ music_prompt: z17.string().optional(),
16877
17034
  // Absolute second the music enters in the reference (the bed often
16878
17035
  // kicks in mid-ad, after the hook). We start the regenerated track here
16879
17036
  // instead of at 0 so the timing matches.
16880
- starts_at_s: z16.number().optional(),
17037
+ starts_at_s: z17.number().optional(),
16881
17038
  // Populated by the deconstruct when AudD (Shazam-style) recognizes the
16882
17039
  // reference track. We never reuse it — only style the regenerated bed.
16883
- identified_track: z16.object({ title: z16.string().optional(), artist: z16.string().optional() }).loose().nullish()
17040
+ identified_track: z17.object({ title: z17.string().optional(), artist: z17.string().optional() }).loose().nullish()
16884
17041
  }).loose().optional(),
16885
- cast: z16.array(
16886
- z16.object({
16887
- id: z16.string().optional(),
16888
- description: z16.string().optional(),
17042
+ cast: z17.array(
17043
+ z17.object({
17044
+ id: z17.string().optional(),
17045
+ description: z17.string().optional(),
16889
17046
  // The deconstruct's note on the target-market localization (e.g. "native
16890
17047
  // French speaker") — read to derive the spoken-track language code.
16891
- market_localization_note: z16.string().optional()
17048
+ market_localization_note: z17.string().optional()
16892
17049
  }).loose()
16893
17050
  ).optional(),
16894
- voiceover: z16.object({
17051
+ voiceover: z17.object({
16895
17052
  // on_camera | mixed → mouths are on screen (lip-sync candidates);
16896
17053
  // voiceover | none → narration over the picture (no lip-sync).
16897
- mode: z16.string().optional(),
16898
- voice_description: z16.string().optional(),
16899
- persona: z16.string().optional()
17054
+ mode: z17.string().optional(),
17055
+ voice_description: z17.string().optional(),
17056
+ persona: z17.string().optional()
16900
17057
  }).loose().optional(),
16901
17058
  // Visual palette — read only to colour a clean brand-card/CTA plate (the
16902
17059
  // first hex is the dominant brand colour); never to drive frame generation.
16903
- style: z16.object({ palette: z16.array(z16.object({ hex: z16.string().optional() }).loose()).optional() }).loose().optional()
17060
+ style: z17.object({ palette: z17.array(z17.object({ hex: z17.string().optional() }).loose()).optional() }).loose().optional()
16904
17061
  }).loose().optional(),
16905
- scenes: z16.array(Scene).min(1)
17062
+ scenes: z17.array(Scene).min(1)
16906
17063
  }).loose();
16907
17064
  function injectHookPhysicality(blueprint) {
16908
17065
  for (const scene of blueprint.scenes) {
@@ -16919,26 +17076,26 @@ function clipIntentOf(scene, sceneIndex) {
16919
17076
  if (/hero|reveal|product|payoff|transformation|result/.test(role) || scene.motion_level === "dynamic") return "hero";
16920
17077
  return "body";
16921
17078
  }
16922
- var AppearsItem = z16.union([z16.number(), z16.object({ scene: z16.number(), edge: z16.string().optional() }).loose()]);
16923
- var RecurringElement = z16.object({
17079
+ var AppearsItem = z17.union([z17.number(), z17.object({ scene: z17.number(), edge: z17.string().optional() }).loose()]);
17080
+ var RecurringElement = z17.object({
16924
17081
  // person | animal | product | logo | badge | other
16925
- type: z16.string(),
16926
- label: z16.string().optional(),
16927
- description: z16.string().optional(),
16928
- expression: z16.string().nullable().optional(),
17082
+ type: z17.string(),
17083
+ label: z17.string().optional(),
17084
+ description: z17.string().optional(),
17085
+ expression: z17.string().nullable().optional(),
16929
17086
  // When the element maps to a global cast entry, its stable id (for annotation).
16930
- cast_id: z16.string().nullable().optional(),
17087
+ cast_id: z17.string().nullable().optional(),
16931
17088
  // The label of another element that is the SAME individual as this one, shown
16932
17089
  // in a DIFFERENT wardrobe/persona/state (e.g. one creator playing skeptic in a
16933
17090
  // pink shirt and believer in a white shirt). Each look gets its own reference
16934
17091
  // slot, but the face/identity must stay identical across them.
16935
- same_as: z16.string().nullable().optional(),
17092
+ same_as: z17.string().nullable().optional(),
16936
17093
  // Scenes the element appears in. Either a bare list of scene indices (both
16937
17094
  // edges) or per-{scene,edge} entries. Both forms are accepted and merged.
16938
- scenes: z16.array(z16.number()).optional(),
16939
- appears_in: z16.array(AppearsItem).optional()
17095
+ scenes: z17.array(z17.number()).optional(),
17096
+ appears_in: z17.array(AppearsItem).optional()
16940
17097
  }).loose();
16941
- var RecurringElements = z16.array(RecurringElement);
17098
+ var RecurringElements = z17.array(RecurringElement);
16942
17099
  function sanitizeId(raw, fallback) {
16943
17100
  const id = raw.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
16944
17101
  return /^[a-z]/.test(id) ? id : `${fallback}_${id}`.replace(/_+$/g, "") || fallback;
@@ -17413,7 +17570,7 @@ function scrubFloatSentences(text, floatDescs) {
17413
17570
  return kept;
17414
17571
  }
17415
17572
  function sceneFloatDescs(scene) {
17416
- const floats = z16.array(FloatingElement).safeParse(scene.floating_elements ?? []);
17573
+ const floats = z17.array(FloatingElement).safeParse(scene.floating_elements ?? []);
17417
17574
  if (!floats.success) return [];
17418
17575
  return floats.data.map((f) => f.description?.trim() ?? "").filter(Boolean);
17419
17576
  }
@@ -18837,25 +18994,25 @@ function buildSfxMusic(blueprint, clock, nodes) {
18837
18994
  }
18838
18995
  return tracks;
18839
18996
  }
18840
- var OverlayStyle = z16.object({ color_hex: z16.string().optional(), background: z16.string().optional(), size: z16.string().optional() }).loose();
18841
- var Overlay = z16.object({
18842
- text: z16.string().optional(),
18843
- appears_at_s: z16.number().optional(),
18844
- duration_s: z16.number().optional(),
18845
- position: z16.string().optional(),
18846
- role: z16.string().optional(),
18847
- animation: z16.string().optional(),
18848
- animation_detail: z16.string().optional(),
18997
+ var OverlayStyle = z17.object({ color_hex: z17.string().optional(), background: z17.string().optional(), size: z17.string().optional() }).loose();
18998
+ var Overlay = z17.object({
18999
+ text: z17.string().optional(),
19000
+ appears_at_s: z17.number().optional(),
19001
+ duration_s: z17.number().optional(),
19002
+ position: z17.string().optional(),
19003
+ role: z17.string().optional(),
19004
+ animation: z17.string().optional(),
19005
+ animation_detail: z17.string().optional(),
18849
19006
  style: OverlayStyle.optional()
18850
19007
  }).loose();
18851
- var FloatingElement = z16.object({
18852
- kind: z16.string().optional(),
18853
- description: z16.string().optional(),
18854
- brand_name: z16.string().nullish(),
18855
- what_it_represents: z16.string().optional(),
18856
- appears_at_s: z16.number().optional(),
18857
- duration_s: z16.number().optional(),
18858
- position: z16.string().optional()
19008
+ var FloatingElement = z17.object({
19009
+ kind: z17.string().optional(),
19010
+ description: z17.string().optional(),
19011
+ brand_name: z17.string().nullish(),
19012
+ what_it_represents: z17.string().optional(),
19013
+ appears_at_s: z17.number().optional(),
19014
+ duration_s: z17.number().optional(),
19015
+ position: z17.string().optional()
18859
19016
  }).loose();
18860
19017
  function escapeHtml(s) {
18861
19018
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
@@ -18887,7 +19044,7 @@ function positionClass(position) {
18887
19044
  function collectCaptions(blueprint, clock) {
18888
19045
  return blueprint.scenes.flatMap((scene, i) => {
18889
19046
  const sceneStart = scene.start_s ?? 0;
18890
- const overlays = z16.array(Overlay).safeParse(scene.overlays ?? []);
19047
+ const overlays = z17.array(Overlay).safeParse(scene.overlays ?? []);
18891
19048
  return overlays.success ? overlays.data.filter((ov) => Boolean(ov.text?.trim())).map((ov) => {
18892
19049
  const at = clock.map(i, ov.appears_at_s ?? sceneStart);
18893
19050
  return { text: ov.text.trim(), at, end: at + (ov.duration_s ?? 2.5), ov };
@@ -18967,7 +19124,7 @@ function collectFloatWindows(blueprint, uiRouted, clock) {
18967
19124
  const windows = /* @__PURE__ */ new Map();
18968
19125
  blueprint.scenes.forEach((scene, i) => {
18969
19126
  const sceneStart = scene.start_s ?? 0;
18970
- const floats = z16.array(FloatingElement).safeParse(scene.floating_elements ?? []);
19127
+ const floats = z17.array(FloatingElement).safeParse(scene.floating_elements ?? []);
18971
19128
  if (!floats.success) return;
18972
19129
  for (const fe of floats.data) {
18973
19130
  const at = clock.map(i, fe.appears_at_s ?? sceneStart);
@@ -19415,8 +19572,8 @@ function buildMotionBoard(blueprint) {
19415
19572
  const end_s = scene.end_s ?? start_s + sceneDurationS(scene);
19416
19573
  cursor = end_s;
19417
19574
  const spoken = sceneSpokenText(scene);
19418
- const overlays = z16.array(Overlay).safeParse(scene.overlays ?? []);
19419
- const floats = z16.array(FloatingElement).safeParse(scene.floating_elements ?? []);
19575
+ const overlays = z17.array(Overlay).safeParse(scene.overlays ?? []);
19576
+ const floats = z17.array(FloatingElement).safeParse(scene.floating_elements ?? []);
19420
19577
  const graphics = [
19421
19578
  ...(overlays.success ? overlays.data : []).filter((ov) => ov.text?.trim()).map((ov) => ({
19422
19579
  kind: "text",
@@ -20855,7 +21012,7 @@ import path18 from "path";
20855
21012
  import { defineCommand as defineCommand93 } from "citty";
20856
21013
 
20857
21014
  // src/engine/scaffold/staticAd.ts
20858
- import { z as z17 } from "zod";
21015
+ import { z as z18 } from "zod";
20859
21016
  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"]);
20860
21017
  var DEFAULT_ASPECT_RATIO = "9:16";
20861
21018
  var SHEET_SUBJECT_TYPE2 = {
@@ -20867,24 +21024,24 @@ var ACTOR_SHEET_IMAGE_SIZE = "4K";
20867
21024
  var ADAPT_MODEL = "google/gemini-3-pro-image-preview";
20868
21025
  var ADAPT_IMAGE_SIZE = "2K";
20869
21026
  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.";
20870
- var Blueprint = z17.object({
20871
- meta: z17.object({ estimated_aspect_ratio: z17.string().optional() }).loose().optional(),
20872
- text_content: z17.array(z17.object({ text: z17.string().optional() }).loose()).optional()
21027
+ var Blueprint = z18.object({
21028
+ meta: z18.object({ estimated_aspect_ratio: z18.string().optional() }).loose().optional(),
21029
+ text_content: z18.array(z18.object({ text: z18.string().optional() }).loose()).optional()
20873
21030
  }).loose();
20874
- var ElementLocator = z17.object({
20875
- collection: z17.enum(["subjects", "people", "brands_logos"]),
20876
- index: z17.number().int().nonnegative()
21031
+ var ElementLocator = z18.object({
21032
+ collection: z18.enum(["subjects", "people", "brands_logos"]),
21033
+ index: z18.number().int().nonnegative()
20877
21034
  }).loose();
20878
- var MainElement = z17.object({
21035
+ var MainElement = z18.object({
20879
21036
  // logo | product | person | animal | badge | other
20880
- type: z17.string(),
20881
- label: z17.string().optional(),
20882
- description: z17.string().optional(),
20883
- expression: z17.string().nullable().optional(),
20884
- reason: z17.string().optional(),
21037
+ type: z18.string(),
21038
+ label: z18.string().optional(),
21039
+ description: z18.string().optional(),
21040
+ expression: z18.string().nullable().optional(),
21041
+ reason: z18.string().optional(),
20885
21042
  locator: ElementLocator.optional()
20886
21043
  }).loose();
20887
- var MainElements = z17.array(MainElement);
21044
+ var MainElements = z18.array(MainElement);
20888
21045
  function sanitizeId2(raw, fallback) {
20889
21046
  const id = raw.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
20890
21047
  return /^[a-z]/.test(id) ? id : `${fallback}_${id}`.replace(/_+$/g, "") || fallback;
@@ -24271,11 +24428,305 @@ Full guide: __tooling__/docs/tools/baker/history.md`
24271
24428
  subCommands: { list: listCommand7 }
24272
24429
  });
24273
24430
 
24431
+ // src/commands/hubspot/index.ts
24432
+ import { defineCommand as defineCommand111 } from "citty";
24433
+ var EMBED_TYPES = ["legacy", "v4", "unknown"];
24434
+ function failNotConnected(err) {
24435
+ if (err instanceof ApiError && err.code === "NOT_FOUND" && err.message.includes("No HubSpot account is connected")) {
24436
+ writeJson({
24437
+ ok: false,
24438
+ error: {
24439
+ code: "NO_HUBSPOT_CONNECTION",
24440
+ message: err.message,
24441
+ fix: {
24442
+ action: "connect",
24443
+ explanation: "AGENT INSTRUCTION: You cannot resolve this yourself \u2014 only the user can connect the account. Tell them to open the dashboard, go to Brain -> Integrations -> Tools, pick HubSpot from the catalog and choose the scope; it is available from their next message. Do not abort the wider task: note that HubSpot data was unavailable, skip this check, and carry on."
24444
+ }
24445
+ }
24446
+ });
24447
+ process.exit(1);
24448
+ }
24449
+ failApi(err);
24450
+ }
24451
+ function assertEmbedType(value) {
24452
+ if (value === void 0) {
24453
+ return void 0;
24454
+ }
24455
+ if (!EMBED_TYPES.includes(value)) {
24456
+ throw new Error(`--embed-type must be one of: ${EMBED_TYPES.join("|")}`);
24457
+ }
24458
+ return value;
24459
+ }
24460
+ registerSchema({
24461
+ command: "hubspot.forms.list",
24462
+ description: "Start here for HubSpot forms: every form on the connected account, with just enough to choose one \u2014 embed type (legacy vs v4), field count, and its post-submit action (inline thank-you vs redirect to a URL). Answers 'which of my forms redirect after submit?' and 'is this form legacy or v4?'. portalId is returned once on data, not per row. Next step is usually `hubspot forms view <id> --as-node`, which gives you the blob to write straight into a Form step \u2014 you do not need request_flow_input for HubSpot.",
24463
+ args: {
24464
+ search: { type: "string", description: "Case-insensitive substring match on the form name", required: false },
24465
+ "redirecting-only": {
24466
+ type: "boolean",
24467
+ description: "Only forms whose post-submit action redirects away",
24468
+ required: false,
24469
+ default: false
24470
+ },
24471
+ "embed-type": { type: "string", description: "Filter: legacy|v4|unknown", required: false, enum: [...EMBED_TYPES] }
24472
+ }
24473
+ });
24474
+ registerSchema({
24475
+ command: "hubspot.forms.view",
24476
+ description: "One HubSpot form in detail: every field (name, label, type, required, hidden, options), the legal-consent mode, the post-submit action, captcha, and language. Read it before wiring a form into a Form (flow) so you know what fields exist to autofill. Add --full for the untouched HubSpot payload, or --as-node to get the object to write into the step's form.external instead.",
24477
+ args: {
24478
+ formId: { type: "positional", description: "HubSpot form id (from `baker hubspot forms list`)", required: true },
24479
+ full: { type: "boolean", description: "Include the raw HubSpot payload", required: false, default: false },
24480
+ "as-node": {
24481
+ type: "boolean",
24482
+ description: "Emit the resource blob to write into a flow node's form.external, instead of the readable view. Write it into the node yourself; no need for request_flow_input when the account is connected and the form is unambiguous.",
24483
+ required: false,
24484
+ default: false
24485
+ }
24486
+ }
24487
+ });
24488
+ registerSchema({
24489
+ command: "hubspot.meetings.list",
24490
+ description: "Every HubSpot meeting link (calendar) on the connected account, with just enough to choose one: name, slug, link type (personal / group / round-robin), whether booking redirects somewhere, and how many booking fields it asks for (null = unknown, read it with `meetings view`). Next step is usually `hubspot meetings view <slug> --as-node`, which gives you the blob to write straight into a hubspotMeeting step.",
24491
+ args: {
24492
+ search: { type: "string", description: "Case-insensitive substring match on the meeting name", required: false },
24493
+ "redirecting-only": {
24494
+ type: "boolean",
24495
+ description: "Only meeting links that redirect after booking",
24496
+ required: false,
24497
+ default: false
24498
+ }
24499
+ }
24500
+ });
24501
+ registerSchema({
24502
+ command: "hubspot.meetings.view",
24503
+ description: "One HubSpot meeting link in detail: its booking-form fields (name, label, type, required, custom), link, and redirect URL. This is the source of truth for a calendar's fields \u2014 the list command cannot see them reliably. Add --as-node to get the object to write into the step's form.external instead.",
24504
+ args: {
24505
+ slug: { type: "positional", description: "Meeting slug (from `baker hubspot meetings list`)", required: true },
24506
+ "as-node": {
24507
+ type: "boolean",
24508
+ description: "Emit the resource blob to write into a flow node's form.external, instead of the readable view.",
24509
+ required: false,
24510
+ default: false
24511
+ }
24512
+ }
24513
+ });
24514
+ var formsListCommand = defineCommand111({
24515
+ meta: {
24516
+ name: "list",
24517
+ description: "List HubSpot forms with embed type and post-submit action. Example: baker hubspot forms list --redirecting-only"
24518
+ },
24519
+ args: {
24520
+ search: { type: "string", description: "Match on form name", required: false },
24521
+ "redirecting-only": { type: "boolean", description: "Only forms that redirect on submit", required: false },
24522
+ "embed-type": { type: "string", description: "Filter: legacy|v4|unknown", required: false }
24523
+ },
24524
+ run: async ({ args }) => {
24525
+ try {
24526
+ const body = {};
24527
+ if (args.search) {
24528
+ body.search = args.search;
24529
+ }
24530
+ if (args["redirecting-only"]) {
24531
+ body.redirectingOnly = true;
24532
+ }
24533
+ const embedType = assertEmbedType(args["embed-type"]);
24534
+ if (embedType) {
24535
+ body.embedType = embedType;
24536
+ }
24537
+ const response = await apiPost("/api/hubspot/forms/list", body);
24538
+ const { forms } = response.data;
24539
+ const redirecting = forms.filter((form) => form.postSubmitAction?.type === "redirect_url");
24540
+ const hints = [];
24541
+ if (forms.length === 0) {
24542
+ hints.push("No forms matched. Drop --search/--embed-type, or check the connected HubSpot account.");
24543
+ } else {
24544
+ hints.push(
24545
+ "To put one on a page: `baker hubspot forms view <id> --as-node` returns the object to write into the step's form.external. No request_flow_input needed for HubSpot."
24546
+ );
24547
+ }
24548
+ if (redirecting.length > 0) {
24549
+ hints.push(
24550
+ `${redirecting.length} form(s) redirect after submit. That is fine mid-Form: the renderer suppresses the redirect whenever a step follows the form, and honors it when the form is the last step.`
24551
+ );
24552
+ }
24553
+ writeJson({ ...response, meta: { count: forms.length }, ...hints.length > 0 ? { hints } : {} });
24554
+ } catch (err) {
24555
+ failNotConnected(err);
24556
+ }
24557
+ }
24558
+ });
24559
+ var formsViewCommand = defineCommand111({
24560
+ meta: {
24561
+ name: "view",
24562
+ description: "Show one HubSpot form's fields and configuration. Example: baker hubspot forms view 1a2b3c"
24563
+ },
24564
+ args: {
24565
+ formId: { type: "positional", description: "HubSpot form id", required: true },
24566
+ full: { type: "boolean", description: "Include the raw HubSpot payload", required: false },
24567
+ "as-node": { type: "boolean", description: "Emit the node-ready form.external blob", required: false }
24568
+ },
24569
+ run: async ({ args }) => {
24570
+ try {
24571
+ const response = await apiPost("/api/hubspot/forms/view", {
24572
+ formId: args.formId,
24573
+ ...args.full ? { full: true } : {},
24574
+ ...args["as-node"] ? { asNode: true } : {}
24575
+ });
24576
+ if (args["as-node"]) {
24577
+ const { external } = response.data;
24578
+ writeJson({
24579
+ ...response,
24580
+ hints: [
24581
+ "Write this object into the node's `form.external` in the flow's _data.json, keeping the rest of the node as-is. No request_flow_input needed \u2014 the account is already connected.",
24582
+ ...external?.configuration?.postSubmitAction.type === "redirect_url" ? [
24583
+ "This form redirects on submit. Safe unless it is the last step: the renderer suppresses the redirect whenever a step follows it."
24584
+ ] : [],
24585
+ ...external?.embedType === "v4" && !external.region ? [
24586
+ "WARNING: this is a v4 form and the connected account has no region recorded, so the step will load HubSpot's na1 script host. That is correct for US portals and breaks the form on eu1/ap1 ones. If it renders blank, have the user reconnect HubSpot from Brain -> Integrations -> Tools, then re-run this command."
24587
+ ] : []
24588
+ ]
24589
+ });
24590
+ return;
24591
+ }
24592
+ const form = response.data.form;
24593
+ if (!form) {
24594
+ throw new Error("Response did not include the form view");
24595
+ }
24596
+ const hints = [];
24597
+ if (form.postSubmitAction?.type === "redirect_url") {
24598
+ hints.push(
24599
+ `This form redirects to ${form.postSubmitAction.value} on submit. Placed anywhere but the last step of a Form, that redirect is suppressed so the next step can render.`
24600
+ );
24601
+ }
24602
+ if (form.embedType === "unknown") {
24603
+ hints.push("Embed type could not be determined from HubSpot's response; the renderer treats it as legacy.");
24604
+ }
24605
+ writeJson({ ...response, meta: { count: form.fields.length }, ...hints.length > 0 ? { hints } : {} });
24606
+ } catch (err) {
24607
+ failNotConnected(err);
24608
+ }
24609
+ }
24610
+ });
24611
+ var meetingsListCommand = defineCommand111({
24612
+ meta: {
24613
+ name: "list",
24614
+ description: "List HubSpot meeting links (calendars). Example: baker hubspot meetings list"
24615
+ },
24616
+ args: {
24617
+ search: { type: "string", description: "Match on meeting name", required: false },
24618
+ "redirecting-only": { type: "boolean", description: "Only links that redirect after booking", required: false }
24619
+ },
24620
+ run: async ({ args }) => {
24621
+ try {
24622
+ const body = {};
24623
+ if (args.search) {
24624
+ body.search = args.search;
24625
+ }
24626
+ if (args["redirecting-only"]) {
24627
+ body.redirectingOnly = true;
24628
+ }
24629
+ const response = await apiPost("/api/hubspot/meetings/list", body);
24630
+ const { meetings } = response.data;
24631
+ const hints = [];
24632
+ if (meetings.length === 0) {
24633
+ hints.push("No meeting links matched. Drop --search, or check the connected HubSpot account.");
24634
+ } else {
24635
+ hints.push(
24636
+ "To put one on a page: `baker hubspot meetings view <slug> --as-node` returns the object to write into the step's form.external."
24637
+ );
24638
+ }
24639
+ const unknown = meetings.filter((meeting) => !meeting.redirectKnown);
24640
+ if (unknown.length > 0) {
24641
+ hints.push(
24642
+ `HubSpot did not report booking settings for ${unknown.length} of these (${unknown.map((meeting) => meeting.slug).join(
24643
+ ", "
24644
+ )}), so their redirect and field count are UNKNOWN, not absent. Run \`baker hubspot meetings view <slug>\` before concluding one does not redirect.`
24645
+ );
24646
+ }
24647
+ writeJson({ ...response, meta: { count: meetings.length }, ...hints.length > 0 ? { hints } : {} });
24648
+ } catch (err) {
24649
+ failNotConnected(err);
24650
+ }
24651
+ }
24652
+ });
24653
+ var meetingsViewCommand = defineCommand111({
24654
+ meta: {
24655
+ name: "view",
24656
+ description: "Show one HubSpot meeting link's booking fields. Example: baker hubspot meetings view discovery-call"
24657
+ },
24658
+ args: {
24659
+ slug: { type: "positional", description: "Meeting slug", required: true },
24660
+ "as-node": { type: "boolean", description: "Emit the node-ready form.external blob", required: false }
24661
+ },
24662
+ run: async ({ args }) => {
24663
+ try {
24664
+ const response = await apiPost("/api/hubspot/meetings/view", {
24665
+ slug: args.slug,
24666
+ ...args["as-node"] ? { asNode: true } : {}
24667
+ });
24668
+ if (args["as-node"]) {
24669
+ const { external } = response.data;
24670
+ writeJson({
24671
+ ...response,
24672
+ hints: [
24673
+ "Write this object into the node's `form.external` in the flow's _data.json, keeping the rest of the node as-is. No request_flow_input needed \u2014 the account is already connected.",
24674
+ ...external?.customParams.redirectUrl ? [
24675
+ `This calendar redirects to ${external.customParams.redirectUrl} after booking, and that redirect is NOT suppressed \u2014 any step placed after it is unreachable. Keep it as the last step, or ask the user to clear the redirect in HubSpot.`
24676
+ ] : []
24677
+ ]
24678
+ });
24679
+ return;
24680
+ }
24681
+ const meeting = response.data.meeting;
24682
+ if (!meeting) {
24683
+ throw new Error("Response did not include the meeting view");
24684
+ }
24685
+ const hints = [];
24686
+ if (meeting.redirectUrl) {
24687
+ hints.push(
24688
+ `This calendar redirects to ${meeting.redirectUrl} after booking. A step placed after it will not be reached \u2014 keep it as the last step, or clear the redirect in HubSpot.`
24689
+ );
24690
+ }
24691
+ writeJson({ ...response, meta: { count: meeting.fields.length }, ...hints.length > 0 ? { hints } : {} });
24692
+ } catch (err) {
24693
+ failNotConnected(err);
24694
+ }
24695
+ }
24696
+ });
24697
+ var formsCommand = defineCommand111({
24698
+ meta: { name: "forms", description: "HubSpot forms on the connected account." },
24699
+ subCommands: { list: formsListCommand, view: formsViewCommand }
24700
+ });
24701
+ var meetingsCommand = defineCommand111({
24702
+ meta: { name: "meetings", description: "HubSpot meeting links (calendars) on the connected account." },
24703
+ subCommands: { list: meetingsListCommand, view: meetingsViewCommand }
24704
+ });
24705
+ var hubspotCommand = defineCommand111({
24706
+ meta: {
24707
+ name: "hubspot",
24708
+ description: `Read the connected HubSpot account \u2014 forms and meeting links (calendars) \u2014 and get the blob to wire one into a Form step yourself.
24709
+
24710
+ Examples:
24711
+ baker hubspot forms list # every form: embed type + post-submit action
24712
+ baker hubspot forms list --redirecting-only # which forms redirect away on submit
24713
+ baker hubspot forms view <formId> # fields, consent mode, full configuration
24714
+ baker hubspot forms view <formId> --as-node # the form.external blob -> write into the step
24715
+ baker hubspot meetings list # every calendar + whether booking redirects
24716
+ baker hubspot meetings view <slug> --as-node # same, for a hubspotMeeting step
24717
+
24718
+ Nothing here is secret, so HubSpot steps do not need request_flow_input: take --as-node and edit the
24719
+ flow's _data.json. Use the approval form only when no account is connected or the right form is unclear.
24720
+ Full guide: __tooling__/docs/tools/baker/hubspot.md`
24721
+ },
24722
+ subCommands: { forms: formsCommand, meetings: meetingsCommand }
24723
+ });
24724
+
24274
24725
  // src/commands/images/index.ts
24275
- import { defineCommand as defineCommand134 } from "citty";
24726
+ import { defineCommand as defineCommand135 } from "citty";
24276
24727
 
24277
24728
  // src/commands/images/crop.ts
24278
- import { defineCommand as defineCommand111 } from "citty";
24729
+ import { defineCommand as defineCommand112 } from "citty";
24279
24730
 
24280
24731
  // src/lib/image/crop-sprite.ts
24281
24732
  import sharp from "sharp";
@@ -24400,7 +24851,7 @@ function emitError2(err) {
24400
24851
  }
24401
24852
  process.exit(1);
24402
24853
  }
24403
- var cropCommand = defineCommand111({
24854
+ var cropCommand = defineCommand112({
24404
24855
  meta: {
24405
24856
  name: "crop",
24406
24857
  description: "Crop a rectangular region from an image.\n\nExample: baker images crop sprite.png --x 0 --y 0 --width 64 --height 64 --output icon.png"
@@ -24436,7 +24887,7 @@ var cropCommand = defineCommand111({
24436
24887
  });
24437
24888
 
24438
24889
  // src/commands/images/delete.ts
24439
- import { defineCommand as defineCommand112 } from "citty";
24890
+ import { defineCommand as defineCommand113 } from "citty";
24440
24891
  registerSchema({
24441
24892
  command: "images.delete",
24442
24893
  description: "Delete an image by ID",
@@ -24450,7 +24901,7 @@ registerSchema({
24450
24901
  }
24451
24902
  }
24452
24903
  });
24453
- var deleteCommand = defineCommand112({
24904
+ var deleteCommand = defineCommand113({
24454
24905
  meta: {
24455
24906
  name: "delete",
24456
24907
  description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
@@ -24491,7 +24942,7 @@ var deleteCommand = defineCommand112({
24491
24942
  });
24492
24943
 
24493
24944
  // src/commands/images/dimensions.ts
24494
- import { defineCommand as defineCommand113 } from "citty";
24945
+ import { defineCommand as defineCommand114 } from "citty";
24495
24946
 
24496
24947
  // src/lib/image/dimensions.ts
24497
24948
  import { imageSize } from "image-size";
@@ -24514,7 +24965,7 @@ registerSchema({
24514
24965
  target: { type: "string", description: "Local file path or remote http(s) URL", required: true }
24515
24966
  }
24516
24967
  });
24517
- var dimensionsCommand = defineCommand113({
24968
+ var dimensionsCommand = defineCommand114({
24518
24969
  meta: {
24519
24970
  name: "dimensions",
24520
24971
  description: "Read image dimensions without decoding the full file.\n\nExample: baker images dimensions ./logo.png\nExample: baker images dimensions https://acme.com/hero.png"
@@ -24558,7 +25009,7 @@ var dimensionsCommand = defineCommand113({
24558
25009
  });
24559
25010
 
24560
25011
  // src/commands/images/extract.ts
24561
- import { defineCommand as defineCommand114 } from "citty";
25012
+ import { defineCommand as defineCommand115 } from "citty";
24562
25013
  registerSchema({
24563
25014
  command: "images.extract",
24564
25015
  description: "Extract images from a URL via Firecrawl (formats: images).",
@@ -24574,7 +25025,7 @@ registerSchema({
24574
25025
  }
24575
25026
  }
24576
25027
  });
24577
- var extractCommand = defineCommand114({
25028
+ var extractCommand = defineCommand115({
24578
25029
  meta: {
24579
25030
  name: "extract",
24580
25031
  description: "Pull every image from a single URL via Firecrawl. ~$0.001/scrape. Cap auto-ingest at 20.\n\nExample: baker images extract https://stripe.com --auto-ingest 5"
@@ -24612,7 +25063,7 @@ var extractCommand = defineCommand114({
24612
25063
  });
24613
25064
 
24614
25065
  // src/commands/images/find.ts
24615
- import { defineCommand as defineCommand115 } from "citty";
25066
+ import { defineCommand as defineCommand116 } from "citty";
24616
25067
  registerSchema({
24617
25068
  command: "images.find",
24618
25069
  description: "Fanout image search: library first, then opted-in external providers.",
@@ -24644,7 +25095,7 @@ registerSchema({
24644
25095
  }
24645
25096
  }
24646
25097
  });
24647
- var findCommand = defineCommand115({
25098
+ var findCommand = defineCommand116({
24648
25099
  meta: {
24649
25100
  name: "find",
24650
25101
  description: "Library-first fanout image search. Opt in to providers with --sources. `--fallback` short-circuits to externals only when library is thin. With --auto-ingest, ingested external hits return Baker-owned URLs.\n\nExample: baker images find 'office' --sources library,magnific --limit 20"
@@ -24693,7 +25144,7 @@ var findCommand = defineCommand115({
24693
25144
 
24694
25145
  // src/commands/images/generate.ts
24695
25146
  import { readFile as readFile20 } from "fs/promises";
24696
- import { defineCommand as defineCommand116 } from "citty";
25147
+ import { defineCommand as defineCommand117 } from "citty";
24697
25148
  import sharp2 from "sharp";
24698
25149
  var GENERATE_TIMEOUT_MS = 18e4;
24699
25150
  var REFERENCE_MAX_EDGE = 1536;
@@ -24796,7 +25247,7 @@ async function resolveReferences(spec) {
24796
25247
  }
24797
25248
  return out;
24798
25249
  }
24799
- var generateCommand = defineCommand116({
25250
+ var generateCommand = defineCommand117({
24800
25251
  meta: {
24801
25252
  name: "generate",
24802
25253
  description: "Generate an image with AI and store it in the library (cost-tracked per request via OpenRouter usage). Models mirror the canvas: google/gemini-3.1-flash-image-preview (Nano Banana flash \u2014 default, fast, extreme aspect ratios), google/gemini-3-pro-image-preview (Nano Banana Pro \u2014 highest fidelity), openai/gpt-image-2 (photoreal, cleanest in-image text, best for ad/landing reproduction \u2014 no --image-size, and no 4:5 / 5:4), recraft/recraft-v4.1-pro-vector (vector/SVG-style with palette control). The result is auto-ingested (describe + embed), so the next `baker images library` query finds it. Pass --reference with image URLs and/or local file paths (Pinterest, stock, brand assets, sandbox files) to ground generation in reality.\n\nExamples:\n baker images generate 'a friendly golden retriever sitting in a bright modern living room' --aspect-ratio 16:9\n baker images generate 'hero shot of a matte black water bottle on marble' --model openai/gpt-image-2 --aspect-ratio 3:2\n baker images generate 'lifestyle photo matching this mood' --reference 'https://\u2026/ref1.jpg,https://\u2026/ref2.jpg'\n baker images generate 'put this product on a marble countertop, soft daylight' --reference './src/brand/logos/product.png,./refs/kitchen-mood.jpg'\n baker images generate 'flat geometric mascot, brand palette' --model recraft/recraft-v4.1-pro-vector --rgb-colors '[[10,10,10],[255,80,0]]'"
@@ -24848,7 +25299,7 @@ var generateCommand = defineCommand116({
24848
25299
  });
24849
25300
 
24850
25301
  // src/commands/images/get.ts
24851
- import { defineCommand as defineCommand117 } from "citty";
25302
+ import { defineCommand as defineCommand118 } from "citty";
24852
25303
  registerSchema({
24853
25304
  command: "images.get",
24854
25305
  description: "Get a single image by ID",
@@ -24856,7 +25307,7 @@ registerSchema({
24856
25307
  id: { type: "string", description: "Image ID", required: true }
24857
25308
  }
24858
25309
  });
24859
- var getCommand2 = defineCommand117({
25310
+ var getCommand2 = defineCommand118({
24860
25311
  meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
24861
25312
  args: {
24862
25313
  id: { type: "positional", description: "Image ID", required: false },
@@ -24892,7 +25343,7 @@ var getCommand2 = defineCommand117({
24892
25343
  });
24893
25344
 
24894
25345
  // src/commands/images/gif.ts
24895
- import { defineCommand as defineCommand118 } from "citty";
25346
+ import { defineCommand as defineCommand119 } from "citty";
24896
25347
  registerSchema({
24897
25348
  command: "images.gif",
24898
25349
  description: "Search Giphy for GIFs / reaction memes (paid social creative).",
@@ -24924,7 +25375,7 @@ registerSchema({
24924
25375
  }
24925
25376
  }
24926
25377
  });
24927
- var gifCommand = defineCommand118({
25378
+ var gifCommand = defineCommand119({
24928
25379
  meta: {
24929
25380
  name: "gif",
24930
25381
  description: "Search Giphy for GIFs / reaction memes \u2014 built for paid-social creative (Meta, TikTok, LinkedIn, X). Free API. Each hit carries WebP + GIF + MP4 URLs in providerMeta so you can pick the right format per platform.\n\nExample: baker images gif 'this is fine' --limit 10\nExample: baker images gif 'office reaction' --rating pg --auto-ingest 2\nExample: baker images gif --trending --limit 25"
@@ -24971,7 +25422,7 @@ var gifCommand = defineCommand118({
24971
25422
  });
24972
25423
 
24973
25424
  // src/commands/images/google.ts
24974
- import { defineCommand as defineCommand119 } from "citty";
25425
+ import { defineCommand as defineCommand120 } from "citty";
24975
25426
 
24976
25427
  // src/commands/images/searchHints.ts
24977
25428
  var FALLBACK = {
@@ -25035,7 +25486,7 @@ registerSchema({
25035
25486
  }
25036
25487
  }
25037
25488
  });
25038
- var googleCommand2 = defineCommand119({
25489
+ var googleCommand2 = defineCommand120({
25039
25490
  meta: {
25040
25491
  name: "google",
25041
25492
  description: "Google Images via the official Custom Search JSON API ($0.005/query, free 100/day). \u26A0 Source unverified \u2014 watermarks, low-res, mislabeled results are common. Use as last resort. With --auto-ingest, ingested hits return Baker-owned URLs.\n\nExample: baker images google 'industrial workshop' --type photo --size large --limit 20"
@@ -25091,7 +25542,7 @@ var googleCommand2 = defineCommand119({
25091
25542
  });
25092
25543
 
25093
25544
  // src/commands/images/icon.ts
25094
- import { defineCommand as defineCommand120 } from "citty";
25545
+ import { defineCommand as defineCommand121 } from "citty";
25095
25546
  registerSchema({
25096
25547
  command: "images.icon",
25097
25548
  description: "Icon lookup via Iconify (200+ icon sets, free CDN).",
@@ -25117,7 +25568,7 @@ registerSchema({
25117
25568
  }
25118
25569
  }
25119
25570
  });
25120
- var iconCommand = defineCommand120({
25571
+ var iconCommand = defineCommand121({
25121
25572
  meta: {
25122
25573
  name: "icon",
25123
25574
  description: "Icon via Iconify (simple-icons, logos, lucide, devicon, heroicons, tabler, phosphor, material-symbols, \u2026). Free CDN, no API key.\n\nExample: baker images icon react --set devicon\nExample: baker images icon lucide:check --color '#0a0a0a'"
@@ -25157,7 +25608,7 @@ var iconCommand = defineCommand120({
25157
25608
  });
25158
25609
 
25159
25610
  // src/commands/images/ingest.ts
25160
- import { defineCommand as defineCommand121 } from "citty";
25611
+ import { defineCommand as defineCommand122 } from "citty";
25161
25612
  registerSchema({
25162
25613
  command: "images.ingest",
25163
25614
  description: "Ingest a remote image URL into the library (full describe + embed).",
@@ -25169,7 +25620,7 @@ registerSchema({
25169
25620
  context: { type: "string", description: "Description context hint", required: false }
25170
25621
  }
25171
25622
  });
25172
- var ingestCommand = defineCommand121({
25623
+ var ingestCommand = defineCommand122({
25173
25624
  meta: {
25174
25625
  name: "ingest",
25175
25626
  description: "Download a remote URL and store it in the library. Hash-deduped on bytes + externalId.\n\nExample: baker images ingest https://img.freepik.com/free-photo/xyz.jpg --source magnific --external-id 12345"
@@ -25211,7 +25662,7 @@ var ingestCommand = defineCommand121({
25211
25662
  });
25212
25663
 
25213
25664
  // src/commands/images/library.ts
25214
- import { defineCommand as defineCommand122 } from "citty";
25665
+ import { defineCommand as defineCommand123 } from "citty";
25215
25666
  registerSchema({
25216
25667
  command: "images.library",
25217
25668
  description: "Search the company image library. Returns only ready images.",
@@ -25237,7 +25688,7 @@ registerSchema({
25237
25688
  }
25238
25689
  }
25239
25690
  });
25240
- var libraryCommand = defineCommand122({
25691
+ var libraryCommand = defineCommand123({
25241
25692
  meta: {
25242
25693
  name: "library",
25243
25694
  description: "Search the company image library (hybrid BM25 + vector + Cohere rerank). Use this BEFORE any external provider.\n\nExample: baker images library 'hero banner' --aspect-ratio 16:9 --source magnific"
@@ -25294,7 +25745,7 @@ var libraryCommand = defineCommand122({
25294
25745
  });
25295
25746
 
25296
25747
  // src/commands/images/logo.ts
25297
- import { defineCommand as defineCommand123 } from "citty";
25748
+ import { defineCommand as defineCommand124 } from "citty";
25298
25749
  registerSchema({
25299
25750
  command: "images.logo",
25300
25751
  description: "Brand logo lookup via Brandfetch CDN (fallback/404). Auto-ingests by default.",
@@ -25319,7 +25770,7 @@ registerSchema({
25319
25770
  }
25320
25771
  }
25321
25772
  });
25322
- var logoCommand = defineCommand123({
25773
+ var logoCommand = defineCommand124({
25323
25774
  meta: {
25324
25775
  name: "logo",
25325
25776
  description: "Brand logo via Brandfetch CDN. Returns up to 5 variants (icon, light/dark logo, light/dark symbol). Auto-ingests the first variant.\n\nExample: baker images logo stripe.com --variant logo"
@@ -25357,7 +25808,7 @@ var logoCommand = defineCommand123({
25357
25808
  });
25358
25809
 
25359
25810
  // src/commands/images/normalize.ts
25360
- import { defineCommand as defineCommand124 } from "citty";
25811
+ import { defineCommand as defineCommand125 } from "citty";
25361
25812
 
25362
25813
  // src/lib/image/color-changer.ts
25363
25814
  import quantize from "quantize";
@@ -26089,7 +26540,7 @@ function coerceRawArgs(args) {
26089
26540
  "dry-run": bool(args["dry-run"])
26090
26541
  };
26091
26542
  }
26092
- var normalizeCommand = defineCommand124({
26543
+ var normalizeCommand = defineCommand125({
26093
26544
  meta: {
26094
26545
  name: "normalize",
26095
26546
  description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
@@ -26144,7 +26595,7 @@ Examples:
26144
26595
  });
26145
26596
 
26146
26597
  // src/commands/images/pinterest.ts
26147
- import { defineCommand as defineCommand125 } from "citty";
26598
+ import { defineCommand as defineCommand126 } from "citty";
26148
26599
  registerSchema({
26149
26600
  command: "images.pinterest",
26150
26601
  description: "Pinterest image search via ScrapeCreators. Reference-grade real-world photography, product styling, interiors, fashion, food, and aesthetic mood boards. Inspect before placing \u2014 Pinterest is unverified, trademark-bearing web content.",
@@ -26164,7 +26615,7 @@ registerSchema({
26164
26615
  }
26165
26616
  }
26166
26617
  });
26167
- var pinterestCommand = defineCommand125({
26618
+ var pinterestCommand = defineCommand126({
26168
26619
  meta: {
26169
26620
  name: "pinterest",
26170
26621
  description: "Pinterest image search via ScrapeCreators ($0.00188/request). Best for photo-realistic reference imagery \u2014 lifestyle, interiors, fashion, food, product styling, and mood boards to brief AI generation against. \u26A0 Unverified, trademark-bearing web content \u2014 inspect and respect rights before placing on a customer page. Browse first; auto-ingest only the pins you commit to.\n\nExamples:\n baker images pinterest 'scandinavian living room'\n baker images pinterest 'minimalist skincare product photography' --limit 20\n baker images pinterest 'cozy coffee shop interior' --auto-ingest 2 --context 'Mood reference for hero photography'"
@@ -26204,7 +26655,7 @@ var pinterestCommand = defineCommand125({
26204
26655
  });
26205
26656
 
26206
26657
  // src/commands/images/screenshot.ts
26207
- import { defineCommand as defineCommand126 } from "citty";
26658
+ import { defineCommand as defineCommand127 } from "citty";
26208
26659
  registerSchema({
26209
26660
  command: "images.screenshot",
26210
26661
  description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
@@ -26220,7 +26671,7 @@ registerSchema({
26220
26671
  }
26221
26672
  }
26222
26673
  });
26223
- var screenshotCommand = defineCommand126({
26674
+ var screenshotCommand = defineCommand127({
26224
26675
  meta: {
26225
26676
  name: "screenshot",
26226
26677
  description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
@@ -26283,7 +26734,7 @@ var screenshotCommand = defineCommand126({
26283
26734
  });
26284
26735
 
26285
26736
  // src/commands/images/search.ts
26286
- import { defineCommand as defineCommand127 } from "citty";
26737
+ import { defineCommand as defineCommand128 } from "citty";
26287
26738
  registerSchema({
26288
26739
  command: "images.search",
26289
26740
  description: "Search images by text query. Only returns ready images.",
@@ -26299,7 +26750,7 @@ registerSchema({
26299
26750
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
26300
26751
  }
26301
26752
  });
26302
- var searchCommand = defineCommand127({
26753
+ var searchCommand = defineCommand128({
26303
26754
  meta: {
26304
26755
  name: "search",
26305
26756
  description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
@@ -26359,7 +26810,7 @@ var searchCommand = defineCommand127({
26359
26810
  });
26360
26811
 
26361
26812
  // src/commands/images/sticker.ts
26362
- import { defineCommand as defineCommand128 } from "citty";
26813
+ import { defineCommand as defineCommand129 } from "citty";
26363
26814
  registerSchema({
26364
26815
  command: "images.sticker",
26365
26816
  description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
@@ -26391,7 +26842,7 @@ registerSchema({
26391
26842
  }
26392
26843
  }
26393
26844
  });
26394
- var stickerCommand = defineCommand128({
26845
+ var stickerCommand = defineCommand129({
26395
26846
  meta: {
26396
26847
  name: "sticker",
26397
26848
  description: "Search Giphy's sticker corpus \u2014 transparent-background WebPs / GIFs ideal for overlaying on ad creative (Meta, TikTok, Stories). Same Giphy free API as `baker images gif`; results carry WebP + GIF + MP4 URLs in providerMeta.\n\nExample: baker images sticker 'thumbs up' --limit 10\nExample: baker images sticker celebration --rating g --auto-ingest 3\nExample: baker images sticker --trending --limit 25"
@@ -26438,7 +26889,7 @@ var stickerCommand = defineCommand128({
26438
26889
  });
26439
26890
 
26440
26891
  // src/commands/images/stock.ts
26441
- import { defineCommand as defineCommand129 } from "citty";
26892
+ import { defineCommand as defineCommand130 } from "citty";
26442
26893
  var STOCK_ERROR_FIX = {
26443
26894
  action: "use_different_resource",
26444
26895
  explanation: "Switch provider instead of retrying stock search. Stock search is one of several image sources. Run `baker images find <query> --sources library,pinterest,google` (`--sources` is required \u2014 `find` alone searches the library only) or `baker images generate` to make the asset. Never sleep-and-retry this command \u2014 the CLI already backs off on rate limits. If no image can be sourced, continue the rest of the task with a placeholder rather than aborting it."
@@ -26515,7 +26966,7 @@ function buildStockRequest(query, args) {
26515
26966
  if (args.context) body.descriptionContext = args.context;
26516
26967
  return body;
26517
26968
  }
26518
- var stockCommand = defineCommand129({
26969
+ var stockCommand = defineCommand130({
26519
26970
  meta: {
26520
26971
  name: "stock",
26521
26972
  description: "Stock search via Magnific \u2014 Freepik's developer API (~250M assets: photos, vectors, illustrations, icons, PSDs). $0.002/req. With --auto-ingest, ingested hits return Baker-owned URLs.\n\nExamples:\n baker images stock 'minimalist office'\n baker images stock 'flat office workers' --type vector\n baker images stock 'hero photo of a kitchen' --type photo --orientation landscape --ai exclude\n baker images stock 'brand pattern' --color '#0a0a0a' --license freemium --auto-ingest 2"
@@ -26571,7 +27022,7 @@ var stockCommand = defineCommand129({
26571
27022
  });
26572
27023
 
26573
27024
  // src/lib/tags-command.ts
26574
- import { defineCommand as defineCommand130 } from "citty";
27025
+ import { defineCommand as defineCommand131 } from "citty";
26575
27026
  function makeTagsCommand(command, label, endpoint) {
26576
27027
  registerSchema({
26577
27028
  command: `${command}.tags`,
@@ -26580,7 +27031,7 @@ function makeTagsCommand(command, label, endpoint) {
26580
27031
  output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
26581
27032
  }
26582
27033
  });
26583
- return defineCommand130({
27034
+ return defineCommand131({
26584
27035
  meta: {
26585
27036
  name: "tags",
26586
27037
  description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
@@ -26616,7 +27067,7 @@ function makeTagsCommand(command, label, endpoint) {
26616
27067
  var tagsCommand2 = makeTagsCommand("images", "image", "/api/images/tags");
26617
27068
 
26618
27069
  // src/commands/images/upload.ts
26619
- import { defineCommand as defineCommand131 } from "citty";
27070
+ import { defineCommand as defineCommand132 } from "citty";
26620
27071
  registerSchema({
26621
27072
  command: "images.upload",
26622
27073
  description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
@@ -26654,7 +27105,7 @@ registerSchema({
26654
27105
  function isRemoteUrl2(value) {
26655
27106
  return /^https?:\/\//i.test(value);
26656
27107
  }
26657
- var uploadCommand = defineCommand131({
27108
+ var uploadCommand = defineCommand132({
26658
27109
  meta: {
26659
27110
  name: "upload",
26660
27111
  description: "Upload an image to the library \u2014 accepts a local file path OR a remote http(s) URL.\n\nLocal: reads bytes, sends to /api/images/upload, content-type auto-detected from extension.\nRemote: dispatches to /api/images/ingest with hash-dedup on bytes + externalId.\n\nExamples:\n baker images upload ./logo.png --source uploaded\n baker images upload ./cert.png --context 'ISO 27001 badge \u2014 enterprise tier'\n baker images upload https://acme.com/hero.png --source firecrawl --context 'Acme competitor pricing hero'"
@@ -26747,7 +27198,7 @@ async function uploadLocal(target, args) {
26747
27198
  }
26748
27199
 
26749
27200
  // src/commands/images/upscale.ts
26750
- import { defineCommand as defineCommand132 } from "citty";
27201
+ import { defineCommand as defineCommand133 } from "citty";
26751
27202
  registerSchema({
26752
27203
  command: "images.upscale",
26753
27204
  description: "Upscale a library image via the backend (Replicate, cost-tracked). Waits for completion by default. The image must be status 'ready' and raster (not SVG/AVIF).",
@@ -26762,7 +27213,7 @@ registerSchema({
26762
27213
  }
26763
27214
  });
26764
27215
  var POLL_INTERVAL_MS3 = 1500;
26765
- var upscaleCommand = defineCommand132({
27216
+ var upscaleCommand = defineCommand133({
26766
27217
  meta: {
26767
27218
  name: "upscale",
26768
27219
  description: "Upscale a library image via the Convex backend (Replicate, cost-tracked at $0.05/image). Waits for completion by default.\n\nExample: baker images upscale j571abc123def\nExample: baker images upscale j571abc123def --max-wait 0 # fire-and-forget"
@@ -26817,7 +27268,7 @@ var upscaleCommand = defineCommand132({
26817
27268
  });
26818
27269
 
26819
27270
  // src/commands/images/use.ts
26820
- import { defineCommand as defineCommand133 } from "citty";
27271
+ import { defineCommand as defineCommand134 } from "citty";
26821
27272
  registerSchema({
26822
27273
  command: "images.use",
26823
27274
  description: "Ingest a URL and wait for the library record to be ready.",
@@ -26833,7 +27284,7 @@ registerSchema({
26833
27284
  }
26834
27285
  });
26835
27286
  var POLL_INTERVAL_MS4 = 1500;
26836
- var useCommand = defineCommand133({
27287
+ var useCommand = defineCommand134({
26837
27288
  meta: {
26838
27289
  name: "use",
26839
27290
  description: "Sugar over `ingest`: download \u2192 store \u2192 wait until describe + embed complete \u2192 return ready library record.\n\nExample: baker images use https://cdn.example.com/hero.png --source uploaded"
@@ -26879,7 +27330,7 @@ var useCommand = defineCommand133({
26879
27330
  });
26880
27331
 
26881
27332
  // src/commands/images/index.ts
26882
- var imagesCommand = defineCommand134({
27333
+ var imagesCommand = defineCommand135({
26883
27334
  meta: {
26884
27335
  name: "images",
26885
27336
  description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
@@ -26950,12 +27401,12 @@ Full guide: __tooling__/docs/tools/baker/images.md`
26950
27401
  });
26951
27402
 
26952
27403
  // src/commands/landing/index.ts
26953
- import { defineCommand as defineCommand136 } from "citty";
27404
+ import { defineCommand as defineCommand137 } from "citty";
26954
27405
 
26955
27406
  // src/commands/landing/critique.ts
26956
27407
  import { readdir as readdir8, stat as stat6 } from "fs/promises";
26957
27408
  import path27 from "path";
26958
- import { defineCommand as defineCommand135 } from "citty";
27409
+ import { defineCommand as defineCommand136 } from "citty";
26959
27410
 
26960
27411
  // src/engine/landing/lib/brand-tokens.ts
26961
27412
  import { readFile as readFile21 } from "fs/promises";
@@ -28090,7 +28541,7 @@ function fail5(code, message, fix) {
28090
28541
  );
28091
28542
  process.exit(2);
28092
28543
  }
28093
- var critiqueCommand2 = defineCommand135({
28544
+ var critiqueCommand2 = defineCommand136({
28094
28545
  meta: {
28095
28546
  name: "critique",
28096
28547
  description: "Start here: `baker landing critique <slug>` after building or editing a landing. Deterministic design-quality critic (ADVISORY \u2014 findings never fail it). Flags the known AI design tells (gradient text, overused fonts, side-tab borders, cream palettes, buzzword copy, broken images) tiered block/warn/advisory, respecting the client's BRAND.md as the allowlist. Also records the critique that publishing requires \u2014 run it before finishing a landing."
@@ -28199,7 +28650,7 @@ async function isDir(p) {
28199
28650
  }
28200
28651
 
28201
28652
  // src/commands/landing/index.ts
28202
- var landingCommand = defineCommand136({
28653
+ var landingCommand = defineCommand137({
28203
28654
  meta: {
28204
28655
  name: "landing",
28205
28656
  description: `Design-quality tools for landing pages (src/pages/<slug>/).
@@ -28215,7 +28666,7 @@ Subcommands:
28215
28666
  });
28216
28667
 
28217
28668
  // src/commands/mcp/index.ts
28218
- import { defineCommand as defineCommand137 } from "citty";
28669
+ import { defineCommand as defineCommand138 } from "citty";
28219
28670
  var SCOPES = ["user", "user_org", "company", "org"];
28220
28671
  function parseScope(raw) {
28221
28672
  const scope = raw === void 0 ? "company" : String(raw);
@@ -28254,7 +28705,7 @@ registerSchema({
28254
28705
  description: "List every third-party tool this chat can reach: managed integrations (Attio, Slack, Gmail, Google Sheets, \u2026) plus custom MCP servers. Start here when the user mentions an external tool.",
28255
28706
  args: {}
28256
28707
  });
28257
- var connectedCommand = defineCommand137({
28708
+ var connectedCommand = defineCommand138({
28258
28709
  meta: {
28259
28710
  name: "connected",
28260
28711
  description: `List all connected third-party tools \u2014 managed integrations plus custom MCP servers.
@@ -28301,7 +28752,7 @@ registerSchema({
28301
28752
  description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
28302
28753
  args: {}
28303
28754
  });
28304
- var listCommand8 = defineCommand137({
28755
+ var listCommand8 = defineCommand138({
28305
28756
  meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
28306
28757
  run: async () => {
28307
28758
  try {
@@ -28326,7 +28777,7 @@ registerSchema({
28326
28777
  header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
28327
28778
  }
28328
28779
  });
28329
- var addCommand = defineCommand137({
28780
+ var addCommand = defineCommand138({
28330
28781
  meta: {
28331
28782
  name: "add",
28332
28783
  description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
@@ -28367,7 +28818,7 @@ registerSchema({
28367
28818
  description: "Remove a company custom MCP server by name.",
28368
28819
  args: { name: { type: "string", description: "Server name to remove", required: true } }
28369
28820
  });
28370
- var removeCommand4 = defineCommand137({
28821
+ var removeCommand4 = defineCommand138({
28371
28822
  meta: {
28372
28823
  name: "remove",
28373
28824
  description: `Remove a company custom MCP server by name.
@@ -28389,7 +28840,7 @@ Example:
28389
28840
  }
28390
28841
  }
28391
28842
  });
28392
- var mcpCommand = defineCommand137({
28843
+ var mcpCommand = defineCommand138({
28393
28844
  meta: {
28394
28845
  name: "mcp",
28395
28846
  description: `Third-party tools for this company \u2014 see what's connected, register custom HTTPS MCP endpoints.
@@ -28415,10 +28866,10 @@ Full guide: __tooling__/docs/tools/baker/mcp.md`
28415
28866
  });
28416
28867
 
28417
28868
  // src/commands/research/index.ts
28418
- import { defineCommand as defineCommand148 } from "citty";
28869
+ import { defineCommand as defineCommand149 } from "citty";
28419
28870
 
28420
28871
  // src/commands/research/advertisers.ts
28421
- import { defineCommand as defineCommand138 } from "citty";
28872
+ import { defineCommand as defineCommand139 } from "citty";
28422
28873
 
28423
28874
  // src/commands/research/output.ts
28424
28875
  var RESEARCH_DATA_NOTE = "Estimates based on third-party SERP data \u2014 not exact figures. Use for directional insights, not precise measurement.";
@@ -28531,7 +28982,7 @@ var FIELDS3 = {
28531
28982
  etv: "Estimated traffic value (USD)",
28532
28983
  visibility: "SERP visibility score (0-1)"
28533
28984
  };
28534
- var advertisersCommand = defineCommand138({
28985
+ var advertisersCommand = defineCommand139({
28535
28986
  meta: {
28536
28987
  name: "advertisers",
28537
28988
  description: `Find domains competing for a keyword in Google SERPs.
@@ -28578,7 +29029,7 @@ Examples:
28578
29029
  });
28579
29030
 
28580
29031
  // src/commands/research/autocomplete.ts
28581
- import { defineCommand as defineCommand139 } from "citty";
29032
+ import { defineCommand as defineCommand140 } from "citty";
28582
29033
  registerSchema({
28583
29034
  command: "research.autocomplete",
28584
29035
  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).",
@@ -28601,7 +29052,7 @@ registerSchema({
28601
29052
  var FIELDS4 = {
28602
29053
  suggestion: "Autocomplete suggestion from Google"
28603
29054
  };
28604
- var autocompleteCommand = defineCommand139({
29055
+ var autocompleteCommand = defineCommand140({
28605
29056
  meta: {
28606
29057
  name: "autocomplete",
28607
29058
  description: `Get Google Autocomplete suggestions for keyword expansion.
@@ -28647,7 +29098,7 @@ Examples:
28647
29098
  });
28648
29099
 
28649
29100
  // src/commands/research/countries.ts
28650
- import { defineCommand as defineCommand140 } from "citty";
29101
+ import { defineCommand as defineCommand141 } from "citty";
28651
29102
  registerSchema({
28652
29103
  command: "research.countries",
28653
29104
  description: "List all supported country codes for --location flag in research commands.",
@@ -28704,7 +29155,7 @@ var FIELDS5 = {
28704
29155
  code: "Country code to pass as --location",
28705
29156
  name: "Country name"
28706
29157
  };
28707
- var countriesCommand = defineCommand140({
29158
+ var countriesCommand = defineCommand141({
28708
29159
  meta: {
28709
29160
  name: "countries",
28710
29161
  description: "List all supported country codes for --location flag."
@@ -28715,7 +29166,7 @@ var countriesCommand = defineCommand140({
28715
29166
  });
28716
29167
 
28717
29168
  // src/commands/research/intent.ts
28718
- import { defineCommand as defineCommand141 } from "citty";
29169
+ import { defineCommand as defineCommand142 } from "citty";
28719
29170
  registerSchema({
28720
29171
  command: "research.intent",
28721
29172
  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.",
@@ -28738,7 +29189,7 @@ var FIELDS6 = {
28738
29189
  intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
28739
29190
  probability: "Confidence score 0.0-1.0"
28740
29191
  };
28741
- var intentCommand = defineCommand141({
29192
+ var intentCommand = defineCommand142({
28742
29193
  meta: {
28743
29194
  name: "intent",
28744
29195
  description: `Classify Google Search intent for keywords. Returns intent type and confidence.
@@ -28786,7 +29237,7 @@ Examples:
28786
29237
  });
28787
29238
 
28788
29239
  // src/commands/research/keyword-gap.ts
28789
- import { defineCommand as defineCommand142 } from "citty";
29240
+ import { defineCommand as defineCommand143 } from "citty";
28790
29241
  registerSchema({
28791
29242
  command: "research.keyword-gap",
28792
29243
  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.",
@@ -28815,7 +29266,7 @@ var FIELDS7 = {
28815
29266
  cpc: "Cost per click USD",
28816
29267
  their_position: "Competitor's ranking position"
28817
29268
  };
28818
- var keywordGapCommand = defineCommand142({
29269
+ var keywordGapCommand = defineCommand143({
28819
29270
  meta: {
28820
29271
  name: "keyword-gap",
28821
29272
  description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
@@ -28889,7 +29340,7 @@ Examples:
28889
29340
  });
28890
29341
 
28891
29342
  // src/commands/research/keywords-for-site.ts
28892
- import { defineCommand as defineCommand143 } from "citty";
29343
+ import { defineCommand as defineCommand144 } from "citty";
28893
29344
  registerSchema({
28894
29345
  command: "research.keywords-for-site",
28895
29346
  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.",
@@ -28922,7 +29373,7 @@ var FIELDS8 = {
28922
29373
  competition: "LOW, MEDIUM, or HIGH",
28923
29374
  competition_index: "Competition score 0-100"
28924
29375
  };
28925
- var keywordsForSiteCommand = defineCommand143({
29376
+ var keywordsForSiteCommand = defineCommand144({
28926
29377
  meta: {
28927
29378
  name: "keywords-for-site",
28928
29379
  description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
@@ -28975,7 +29426,7 @@ Examples:
28975
29426
  });
28976
29427
 
28977
29428
  // src/commands/research/languages.ts
28978
- import { defineCommand as defineCommand144 } from "citty";
29429
+ import { defineCommand as defineCommand145 } from "citty";
28979
29430
  registerSchema({
28980
29431
  command: "research.languages",
28981
29432
  description: "List all supported language codes for --language flag in research commands.",
@@ -29005,7 +29456,7 @@ var FIELDS9 = {
29005
29456
  code: "Language code to pass as --language",
29006
29457
  name: "Language name (also accepted by --language)"
29007
29458
  };
29008
- var languagesCommand2 = defineCommand144({
29459
+ var languagesCommand2 = defineCommand145({
29009
29460
  meta: {
29010
29461
  name: "languages",
29011
29462
  description: "List all supported language codes for --language flag."
@@ -29016,7 +29467,7 @@ var languagesCommand2 = defineCommand144({
29016
29467
  });
29017
29468
 
29018
29469
  // src/commands/research/lighthouse.ts
29019
- import { defineCommand as defineCommand145 } from "citty";
29470
+ import { defineCommand as defineCommand146 } from "citty";
29020
29471
  registerSchema({
29021
29472
  command: "research.lighthouse",
29022
29473
  description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
@@ -29035,7 +29486,7 @@ var FIELDS10 = {
29035
29486
  speed_index_ms: "Speed Index in ms (good: < 3400)",
29036
29487
  interactive_ms: "Time to Interactive in ms (good: < 3800)"
29037
29488
  };
29038
- var lighthouseCommand = defineCommand145({
29489
+ var lighthouseCommand = defineCommand146({
29039
29490
  meta: {
29040
29491
  name: "lighthouse",
29041
29492
  description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
@@ -29073,7 +29524,7 @@ Examples:
29073
29524
  });
29074
29525
 
29075
29526
  // src/commands/research/relevant-pages.ts
29076
- import { defineCommand as defineCommand146 } from "citty";
29527
+ import { defineCommand as defineCommand147 } from "citty";
29077
29528
  registerSchema({
29078
29529
  command: "research.relevant-pages",
29079
29530
  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).",
@@ -29099,7 +29550,7 @@ var FIELDS11 = {
29099
29550
  keywords: "Total organic keywords the page ranks for",
29100
29551
  top_10: "Keywords in positions 1-10"
29101
29552
  };
29102
- var relevantPagesCommand = defineCommand146({
29553
+ var relevantPagesCommand = defineCommand147({
29103
29554
  meta: {
29104
29555
  name: "relevant-pages",
29105
29556
  description: `Get the top pages of a competitor domain with traffic data.
@@ -29145,7 +29596,7 @@ Examples:
29145
29596
  });
29146
29597
 
29147
29598
  // src/commands/research/web.ts
29148
- import { defineCommand as defineCommand147 } from "citty";
29599
+ import { defineCommand as defineCommand148 } from "citty";
29149
29600
  registerSchema({
29150
29601
  command: "research.web",
29151
29602
  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).",
@@ -29196,7 +29647,7 @@ async function runDeepResearch(question) {
29196
29647
  }
29197
29648
  throw new Error("Deep research timed out");
29198
29649
  }
29199
- var webCommand = defineCommand147({
29650
+ var webCommand = defineCommand148({
29200
29651
  meta: {
29201
29652
  name: "web",
29202
29653
  description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
@@ -29256,7 +29707,7 @@ Examples:
29256
29707
  });
29257
29708
 
29258
29709
  // src/commands/research/index.ts
29259
- var researchCommand = defineCommand148({
29710
+ var researchCommand = defineCommand149({
29260
29711
  meta: {
29261
29712
  name: "research",
29262
29713
  description: `Competitive intelligence and AI-powered research commands.
@@ -29297,10 +29748,10 @@ Full guide: __tooling__/docs/tools/baker/research.md`
29297
29748
  });
29298
29749
 
29299
29750
  // src/commands/scheduled-actions/index.ts
29300
- import { defineCommand as defineCommand155 } from "citty";
29751
+ import { defineCommand as defineCommand156 } from "citty";
29301
29752
 
29302
29753
  // src/commands/scheduled-actions/create.ts
29303
- import { defineCommand as defineCommand149 } from "citty";
29754
+ import { defineCommand as defineCommand150 } from "citty";
29304
29755
 
29305
29756
  // src/commands/scheduled-actions/shared.ts
29306
29757
  var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
@@ -29415,7 +29866,7 @@ registerSchema({
29415
29866
  prompt: { type: "string", description: "Additional prompt instructions for the spawned agent", required: false }
29416
29867
  }
29417
29868
  });
29418
- var createCommand2 = defineCommand149({
29869
+ var createCommand2 = defineCommand150({
29419
29870
  meta: {
29420
29871
  name: "create",
29421
29872
  description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
@@ -29464,7 +29915,7 @@ var createCommand2 = defineCommand149({
29464
29915
  });
29465
29916
 
29466
29917
  // src/commands/scheduled-actions/delete.ts
29467
- import { defineCommand as defineCommand150 } from "citty";
29918
+ import { defineCommand as defineCommand151 } from "citty";
29468
29919
  registerSchema({
29469
29920
  command: "scheduled-actions.delete",
29470
29921
  description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
@@ -29472,7 +29923,7 @@ registerSchema({
29472
29923
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
29473
29924
  }
29474
29925
  });
29475
- var deleteCommand2 = defineCommand150({
29926
+ var deleteCommand2 = defineCommand151({
29476
29927
  meta: {
29477
29928
  name: "delete",
29478
29929
  description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
@@ -29501,7 +29952,7 @@ var deleteCommand2 = defineCommand150({
29501
29952
  });
29502
29953
 
29503
29954
  // src/commands/scheduled-actions/get.ts
29504
- import { defineCommand as defineCommand151 } from "citty";
29955
+ import { defineCommand as defineCommand152 } from "citty";
29505
29956
  registerSchema({
29506
29957
  command: "scheduled-actions.get",
29507
29958
  description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
@@ -29509,7 +29960,7 @@ registerSchema({
29509
29960
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
29510
29961
  }
29511
29962
  });
29512
- var getCommand3 = defineCommand151({
29963
+ var getCommand3 = defineCommand152({
29513
29964
  meta: {
29514
29965
  name: "get",
29515
29966
  description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
@@ -29546,13 +29997,13 @@ var getCommand3 = defineCommand151({
29546
29997
  });
29547
29998
 
29548
29999
  // src/commands/scheduled-actions/list.ts
29549
- import { defineCommand as defineCommand152 } from "citty";
30000
+ import { defineCommand as defineCommand153 } from "citty";
29550
30001
  registerSchema({
29551
30002
  command: "scheduled-actions.list",
29552
30003
  description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set.",
29553
30004
  args: {}
29554
30005
  });
29555
- var listCommand9 = defineCommand152({
30006
+ var listCommand9 = defineCommand153({
29556
30007
  meta: {
29557
30008
  name: "list",
29558
30009
  description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set."
@@ -29573,7 +30024,7 @@ var listCommand9 = defineCommand152({
29573
30024
  });
29574
30025
 
29575
30026
  // src/commands/scheduled-actions/trigger.ts
29576
- import { defineCommand as defineCommand153 } from "citty";
30027
+ import { defineCommand as defineCommand154 } from "citty";
29577
30028
  registerSchema({
29578
30029
  command: "scheduled-actions.trigger",
29579
30030
  description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
@@ -29581,7 +30032,7 @@ registerSchema({
29581
30032
  id: { type: "string", description: "Published scheduled action ID", required: true }
29582
30033
  }
29583
30034
  });
29584
- var triggerCommand = defineCommand153({
30035
+ var triggerCommand = defineCommand154({
29585
30036
  meta: {
29586
30037
  name: "trigger",
29587
30038
  description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
@@ -29618,7 +30069,7 @@ var triggerCommand = defineCommand153({
29618
30069
  });
29619
30070
 
29620
30071
  // src/commands/scheduled-actions/update.ts
29621
- import { defineCommand as defineCommand154 } from "citty";
30072
+ import { defineCommand as defineCommand155 } from "citty";
29622
30073
  registerSchema({
29623
30074
  command: "scheduled-actions.update",
29624
30075
  description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
@@ -29643,7 +30094,7 @@ registerSchema({
29643
30094
  prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
29644
30095
  }
29645
30096
  });
29646
- var updateCommand2 = defineCommand154({
30097
+ var updateCommand2 = defineCommand155({
29647
30098
  meta: {
29648
30099
  name: "update",
29649
30100
  description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
@@ -29714,7 +30165,7 @@ var updateCommand2 = defineCommand154({
29714
30165
  });
29715
30166
 
29716
30167
  // src/commands/scheduled-actions/index.ts
29717
- var scheduledActionsCommand = defineCommand155({
30168
+ var scheduledActionsCommand = defineCommand156({
29718
30169
  meta: {
29719
30170
  name: "scheduled-actions",
29720
30171
  description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger.
@@ -29741,8 +30192,8 @@ Full guide: __tooling__/docs/tools/baker/scheduled-actions.md`
29741
30192
  });
29742
30193
 
29743
30194
  // src/commands/schema.ts
29744
- import { defineCommand as defineCommand156 } from "citty";
29745
- var schemaCommand = defineCommand156({
30195
+ import { defineCommand as defineCommand157 } from "citty";
30196
+ var schemaCommand = defineCommand157({
29746
30197
  meta: {
29747
30198
  name: "schema",
29748
30199
  description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
@@ -29784,7 +30235,7 @@ var schemaCommand = defineCommand156({
29784
30235
  });
29785
30236
 
29786
30237
  // src/commands/tags/index.ts
29787
- import { defineCommand as defineCommand157 } from "citty";
30238
+ import { defineCommand as defineCommand158 } from "citty";
29788
30239
 
29789
30240
  // src/commands/tags/shared.ts
29790
30241
  function failApi3(err) {
@@ -29850,7 +30301,7 @@ async function listTags(json) {
29850
30301
  failApi3(err);
29851
30302
  }
29852
30303
  }
29853
- var listCommand10 = defineCommand157({
30304
+ var listCommand10 = defineCommand158({
29854
30305
  meta: {
29855
30306
  name: "list",
29856
30307
  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"
@@ -29869,7 +30320,7 @@ async function listDraft3() {
29869
30320
  failApi3(err);
29870
30321
  }
29871
30322
  }
29872
- var draftCommand3 = defineCommand157({
30323
+ var draftCommand3 = defineCommand158({
29873
30324
  meta: {
29874
30325
  name: "draft",
29875
30326
  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)."
@@ -29878,7 +30329,7 @@ var draftCommand3 = defineCommand157({
29878
30329
  await listDraft3();
29879
30330
  }
29880
30331
  });
29881
- var tagsCommand3 = defineCommand157({
30332
+ var tagsCommand3 = defineCommand158({
29882
30333
  meta: {
29883
30334
  name: "tags",
29884
30335
  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.
@@ -29904,10 +30355,10 @@ Full guide: __tooling__/docs/tools/baker/tags.md`
29904
30355
  });
29905
30356
 
29906
30357
  // src/commands/testimonials/index.ts
29907
- import { defineCommand as defineCommand161 } from "citty";
30358
+ import { defineCommand as defineCommand162 } from "citty";
29908
30359
 
29909
30360
  // src/commands/testimonials/get.ts
29910
- import { defineCommand as defineCommand158 } from "citty";
30361
+ import { defineCommand as defineCommand159 } from "citty";
29911
30362
  registerSchema({
29912
30363
  command: "testimonials.get",
29913
30364
  description: "Get a single testimonial by ID",
@@ -29915,7 +30366,7 @@ registerSchema({
29915
30366
  id: { type: "string", description: "Testimonial ID", required: true }
29916
30367
  }
29917
30368
  });
29918
- var getCommand4 = defineCommand158({
30369
+ var getCommand4 = defineCommand159({
29919
30370
  meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
29920
30371
  args: {
29921
30372
  id: { type: "positional", description: "Testimonial ID", required: false },
@@ -29952,7 +30403,7 @@ var getCommand4 = defineCommand158({
29952
30403
  });
29953
30404
 
29954
30405
  // src/commands/testimonials/list.ts
29955
- import { defineCommand as defineCommand159 } from "citty";
30406
+ import { defineCommand as defineCommand160 } from "citty";
29956
30407
  registerSchema({
29957
30408
  command: "testimonials.list",
29958
30409
  description: "List testimonials with optional filters.",
@@ -29982,7 +30433,7 @@ registerSchema({
29982
30433
  limit: { type: "number", description: "Max results (default 50)", required: false, default: 50 }
29983
30434
  }
29984
30435
  });
29985
- var listCommand11 = defineCommand159({
30436
+ var listCommand11 = defineCommand160({
29986
30437
  meta: {
29987
30438
  name: "list",
29988
30439
  description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
@@ -30031,7 +30482,7 @@ var listCommand11 = defineCommand159({
30031
30482
  });
30032
30483
 
30033
30484
  // src/commands/testimonials/search.ts
30034
- import { defineCommand as defineCommand160 } from "citty";
30485
+ import { defineCommand as defineCommand161 } from "citty";
30035
30486
  function languageBiasHint(results, requestedLanguage) {
30036
30487
  if (requestedLanguage) {
30037
30488
  return null;
@@ -30109,7 +30560,7 @@ function buildSearchRequest(query, args) {
30109
30560
  }
30110
30561
  return body;
30111
30562
  }
30112
- var searchCommand2 = defineCommand160({
30563
+ var searchCommand2 = defineCommand161({
30113
30564
  meta: {
30114
30565
  name: "search",
30115
30566
  description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
@@ -30165,7 +30616,7 @@ var searchCommand2 = defineCommand160({
30165
30616
  var tagsCommand4 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
30166
30617
 
30167
30618
  // src/commands/testimonials/index.ts
30168
- var testimonialsCommand = defineCommand161({
30619
+ var testimonialsCommand = defineCommand162({
30169
30620
  meta: {
30170
30621
  name: "testimonials",
30171
30622
  description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
@@ -30187,10 +30638,10 @@ Full guide: __tooling__/docs/tools/baker/testimonials.md`
30187
30638
  });
30188
30639
 
30189
30640
  // src/commands/videos/index.ts
30190
- import { defineCommand as defineCommand166 } from "citty";
30641
+ import { defineCommand as defineCommand167 } from "citty";
30191
30642
 
30192
30643
  // src/commands/videos/delete.ts
30193
- import { defineCommand as defineCommand162 } from "citty";
30644
+ import { defineCommand as defineCommand163 } from "citty";
30194
30645
  registerSchema({
30195
30646
  command: "videos.delete",
30196
30647
  description: "Delete a video by ID",
@@ -30204,7 +30655,7 @@ registerSchema({
30204
30655
  }
30205
30656
  }
30206
30657
  });
30207
- var deleteCommand3 = defineCommand162({
30658
+ var deleteCommand3 = defineCommand163({
30208
30659
  meta: {
30209
30660
  name: "delete",
30210
30661
  description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
@@ -30245,7 +30696,7 @@ var deleteCommand3 = defineCommand162({
30245
30696
  });
30246
30697
 
30247
30698
  // src/commands/videos/get.ts
30248
- import { defineCommand as defineCommand163 } from "citty";
30699
+ import { defineCommand as defineCommand164 } from "citty";
30249
30700
  registerSchema({
30250
30701
  command: "videos.get",
30251
30702
  description: "Get a single video by ID",
@@ -30253,7 +30704,7 @@ registerSchema({
30253
30704
  id: { type: "string", description: "Video ID", required: true }
30254
30705
  }
30255
30706
  });
30256
- var getCommand5 = defineCommand163({
30707
+ var getCommand5 = defineCommand164({
30257
30708
  meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
30258
30709
  args: {
30259
30710
  id: { type: "positional", description: "Video ID", required: false },
@@ -30290,7 +30741,7 @@ var getCommand5 = defineCommand163({
30290
30741
  });
30291
30742
 
30292
30743
  // src/commands/videos/search.ts
30293
- import { defineCommand as defineCommand164 } from "citty";
30744
+ import { defineCommand as defineCommand165 } from "citty";
30294
30745
  registerSchema({
30295
30746
  command: "videos.search",
30296
30747
  description: "Search videos by text query. Only returns ready videos.",
@@ -30300,7 +30751,7 @@ registerSchema({
30300
30751
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
30301
30752
  }
30302
30753
  });
30303
- var searchCommand3 = defineCommand164({
30754
+ var searchCommand3 = defineCommand165({
30304
30755
  meta: {
30305
30756
  name: "search",
30306
30757
  description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
@@ -30352,7 +30803,7 @@ var tagsCommand5 = makeTagsCommand("videos", "video", "/api/videos/tags");
30352
30803
  // src/commands/videos/upload.ts
30353
30804
  import { readFile as readFile23, stat as stat7 } from "fs/promises";
30354
30805
  import { extname as extname3 } from "path";
30355
- import { defineCommand as defineCommand165 } from "citty";
30806
+ import { defineCommand as defineCommand166 } from "citty";
30356
30807
  var MIME_MAP = {
30357
30808
  ".mp4": "video/mp4",
30358
30809
  ".mov": "video/quicktime",
@@ -30386,7 +30837,7 @@ function detectContentType(filePath) {
30386
30837
  }
30387
30838
  return mime;
30388
30839
  }
30389
- var uploadCommand2 = defineCommand165({
30840
+ var uploadCommand2 = defineCommand166({
30390
30841
  meta: {
30391
30842
  name: "upload",
30392
30843
  description: "Upload a video file to Baker via Mux direct upload. Auto-detects content type. Example: baker videos upload ./demo.mp4"
@@ -30440,7 +30891,7 @@ var uploadCommand2 = defineCommand165({
30440
30891
  });
30441
30892
 
30442
30893
  // src/commands/videos/index.ts
30443
- var videosCommand = defineCommand166({
30894
+ var videosCommand = defineCommand167({
30444
30895
  meta: {
30445
30896
  name: "videos",
30446
30897
  description: `Find and manage videos in Baker. Subcommands: search, get, upload, delete, tags.
@@ -30464,10 +30915,10 @@ Full guide: __tooling__/docs/tools/baker/videos.md`
30464
30915
  });
30465
30916
 
30466
30917
  // src/commands/winning-ads/index.ts
30467
- import { defineCommand as defineCommand179 } from "citty";
30918
+ import { defineCommand as defineCommand180 } from "citty";
30468
30919
 
30469
30920
  // src/commands/winning-ads/advertisers.ts
30470
- import { defineCommand as defineCommand167 } from "citty";
30921
+ import { defineCommand as defineCommand168 } from "citty";
30471
30922
 
30472
30923
  // src/commands/winning-ads/shared.ts
30473
30924
  function splitList(value) {
@@ -30520,7 +30971,7 @@ function advertiserNormalizer(record, full) {
30520
30971
  last_synced_at: record.last_synced_at ?? null
30521
30972
  };
30522
30973
  }
30523
- var advertisersCommand2 = defineCommand167({
30974
+ var advertisersCommand2 = defineCommand168({
30524
30975
  meta: {
30525
30976
  name: "advertisers",
30526
30977
  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'
@@ -30578,7 +31029,7 @@ var advertisersCommand2 = defineCommand167({
30578
31029
  });
30579
31030
 
30580
31031
  // src/commands/winning-ads/brief.ts
30581
- import { defineCommand as defineCommand168 } from "citty";
31032
+ import { defineCommand as defineCommand169 } from "citty";
30582
31033
  registerSchema({
30583
31034
  command: "winning-ads.brief",
30584
31035
  description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
@@ -30624,7 +31075,7 @@ function parseDna(raw) {
30624
31075
  }
30625
31076
  return parsed;
30626
31077
  }
30627
- var briefCommand = defineCommand168({
31078
+ var briefCommand = defineCommand169({
30628
31079
  meta: {
30629
31080
  name: "brief",
30630
31081
  description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
@@ -30660,7 +31111,7 @@ var briefCommand = defineCommand168({
30660
31111
  });
30661
31112
 
30662
31113
  // src/commands/winning-ads/content.ts
30663
- import { defineCommand as defineCommand169 } from "citty";
31114
+ import { defineCommand as defineCommand170 } from "citty";
30664
31115
  registerSchema({
30665
31116
  command: "winning-ads.content",
30666
31117
  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.",
@@ -30673,7 +31124,7 @@ registerSchema({
30673
31124
  }
30674
31125
  }
30675
31126
  });
30676
- var contentCommand = defineCommand169({
31127
+ var contentCommand = defineCommand170({
30677
31128
  meta: {
30678
31129
  name: "content",
30679
31130
  description: "Read the transcript + on-screen text + copy of one winning ad. Example: baker winning-ads content adg_123 --platform meta --full --output md"
@@ -30722,7 +31173,7 @@ var contentCommand = defineCommand169({
30722
31173
  });
30723
31174
 
30724
31175
  // src/commands/winning-ads/feed.ts
30725
- import { defineCommand as defineCommand170 } from "citty";
31176
+ import { defineCommand as defineCommand171 } from "citty";
30726
31177
  function buildFeedParams(input) {
30727
31178
  const params = {};
30728
31179
  const advertiser = splitList(input.advertiser);
@@ -30774,7 +31225,7 @@ registerSchema({
30774
31225
  format: { type: "string", description: "Comma-separated formats to include (e.g. static,video)", required: false }
30775
31226
  }
30776
31227
  });
30777
- var feedCommand = defineCommand170({
31228
+ var feedCommand = defineCommand171({
30778
31229
  meta: {
30779
31230
  name: "feed",
30780
31231
  description: "Winners across every brand you follow (browse, then trim per advertiser). Example: baker winning-ads feed --per-advertiser 5 --output md"
@@ -30859,7 +31310,7 @@ var feedCommand = defineCommand170({
30859
31310
  });
30860
31311
 
30861
31312
  // src/commands/winning-ads/follow.ts
30862
- import { defineCommand as defineCommand171 } from "citty";
31313
+ import { defineCommand as defineCommand172 } from "citty";
30863
31314
  var PLATFORMS = ["meta", "linkedin"];
30864
31315
  registerSchema({
30865
31316
  command: "winning-ads.follow",
@@ -30874,7 +31325,7 @@ registerSchema({
30874
31325
  label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
30875
31326
  }
30876
31327
  });
30877
- var followCommand = defineCommand171({
31328
+ var followCommand = defineCommand172({
30878
31329
  meta: {
30879
31330
  name: "follow",
30880
31331
  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'
@@ -30921,7 +31372,7 @@ var followCommand = defineCommand171({
30921
31372
  });
30922
31373
 
30923
31374
  // src/commands/winning-ads/follow-competitors.ts
30924
- import { defineCommand as defineCommand172 } from "citty";
31375
+ import { defineCommand as defineCommand173 } from "citty";
30925
31376
  var PLATFORMS2 = ["meta", "linkedin"];
30926
31377
  var BATCH_TIMEOUT_MS = 3e5;
30927
31378
  function buildFollowBatchBody(input) {
@@ -30954,7 +31405,7 @@ registerSchema({
30954
31405
  }
30955
31406
  }
30956
31407
  });
30957
- var followCompetitorsCommand = defineCommand172({
31408
+ var followCompetitorsCommand = defineCommand173({
30958
31409
  meta: {
30959
31410
  name: "follow-competitors",
30960
31411
  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"'
@@ -31029,7 +31480,7 @@ var followCompetitorsCommand = defineCommand172({
31029
31480
  });
31030
31481
 
31031
31482
  // src/commands/winning-ads/following.ts
31032
- import { defineCommand as defineCommand173 } from "citty";
31483
+ import { defineCommand as defineCommand174 } from "citty";
31033
31484
  registerSchema({
31034
31485
  command: "winning-ads.following",
31035
31486
  description: "List the brands you follow in your ad-dna library, with each one's status (ready vs still adding) and cached ad counts.",
@@ -31062,7 +31513,7 @@ function followingNormalizer(record, full) {
31062
31513
  platforms: Array.isArray(record.platforms) ? record.platforms : []
31063
31514
  };
31064
31515
  }
31065
- var followingCommand = defineCommand173({
31516
+ var followingCommand = defineCommand174({
31066
31517
  meta: {
31067
31518
  name: "following",
31068
31519
  description: "List brands you follow, with status (ready / adding\u2026) and cached counts. Example: baker winning-ads following --output md"
@@ -31097,7 +31548,7 @@ var followingCommand = defineCommand173({
31097
31548
  });
31098
31549
 
31099
31550
  // src/commands/winning-ads/patterns.ts
31100
- import { defineCommand as defineCommand174 } from "citty";
31551
+ import { defineCommand as defineCommand175 } from "citty";
31101
31552
  registerSchema({
31102
31553
  command: "winning-ads.patterns",
31103
31554
  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.",
@@ -31136,7 +31587,7 @@ function discriminatorRow(record) {
31136
31587
  top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
31137
31588
  };
31138
31589
  }
31139
- var patternsCommand = defineCommand174({
31590
+ var patternsCommand = defineCommand175({
31140
31591
  meta: {
31141
31592
  name: "patterns",
31142
31593
  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"
@@ -31192,7 +31643,7 @@ var patternsCommand = defineCommand174({
31192
31643
  });
31193
31644
 
31194
31645
  // src/commands/winning-ads/search.ts
31195
- import { defineCommand as defineCommand175 } from "citty";
31646
+ import { defineCommand as defineCommand176 } from "citty";
31196
31647
  registerSchema({
31197
31648
  command: "winning-ads.search",
31198
31649
  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.",
@@ -31300,7 +31751,7 @@ function buildSearchBody(args) {
31300
31751
  }
31301
31752
  return body;
31302
31753
  }
31303
- var searchCommand4 = defineCommand175({
31754
+ var searchCommand4 = defineCommand176({
31304
31755
  meta: {
31305
31756
  name: "search",
31306
31757
  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"
@@ -31415,7 +31866,7 @@ var searchCommand4 = defineCommand175({
31415
31866
  });
31416
31867
 
31417
31868
  // src/commands/winning-ads/seeds.ts
31418
- import { defineCommand as defineCommand176 } from "citty";
31869
+ import { defineCommand as defineCommand177 } from "citty";
31419
31870
  function leanRow(r) {
31420
31871
  return {
31421
31872
  key: r.key,
@@ -31443,7 +31894,7 @@ function makeSeedCommand(opts) {
31443
31894
  limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
31444
31895
  }
31445
31896
  });
31446
- return defineCommand176({
31897
+ return defineCommand177({
31447
31898
  meta: { name: opts.name, description: opts.description },
31448
31899
  args: {
31449
31900
  platform: { type: "string", description: "Single platform to segment on", required: false },
@@ -31492,7 +31943,7 @@ var formatsCommand = makeSeedCommand({
31492
31943
  });
31493
31944
 
31494
31945
  // src/commands/winning-ads/unfollow.ts
31495
- import { defineCommand as defineCommand177 } from "citty";
31946
+ import { defineCommand as defineCommand178 } from "citty";
31496
31947
  registerSchema({
31497
31948
  command: "winning-ads.unfollow",
31498
31949
  description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
@@ -31500,7 +31951,7 @@ registerSchema({
31500
31951
  advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
31501
31952
  }
31502
31953
  });
31503
- var unfollowCommand = defineCommand177({
31954
+ var unfollowCommand = defineCommand178({
31504
31955
  meta: {
31505
31956
  name: "unfollow",
31506
31957
  description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
@@ -31521,7 +31972,7 @@ var unfollowCommand = defineCommand177({
31521
31972
  });
31522
31973
 
31523
31974
  // src/commands/winning-ads/winners.ts
31524
- import { defineCommand as defineCommand178 } from "citty";
31975
+ import { defineCommand as defineCommand179 } from "citty";
31525
31976
  registerSchema({
31526
31977
  command: "winning-ads.winners",
31527
31978
  description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
@@ -31531,7 +31982,7 @@ registerSchema({
31531
31982
  platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
31532
31983
  }
31533
31984
  });
31534
- var winnersCommand = defineCommand178({
31985
+ var winnersCommand = defineCommand179({
31535
31986
  meta: {
31536
31987
  name: "winners",
31537
31988
  description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
@@ -31581,7 +32032,7 @@ var winnersCommand = defineCommand178({
31581
32032
  });
31582
32033
 
31583
32034
  // src/commands/winning-ads/index.ts
31584
- var winningAdsCommand = defineCommand179({
32035
+ var winningAdsCommand = defineCommand180({
31585
32036
  meta: {
31586
32037
  name: "winning-ads",
31587
32038
  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.
@@ -31653,7 +32104,7 @@ function getCliVersion() {
31653
32104
  }
31654
32105
 
31655
32106
  // src/cli.ts
31656
- var main = defineCommand180({
32107
+ var main = defineCommand181({
31657
32108
  meta: {
31658
32109
  name: "baker",
31659
32110
  version: getCliVersion(),
@@ -31683,6 +32134,7 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
31683
32134
  tags: tagsCommand3,
31684
32135
  chats: chatsCommand,
31685
32136
  history: historyCommand,
32137
+ hubspot: hubspotCommand,
31686
32138
  "winning-ads": winningAdsCommand,
31687
32139
  mcp: mcpCommand,
31688
32140
  schema: schemaCommand