@koda-sl/baker-cli 0.133.0-dev.42a8955b3 → 0.133.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
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ AD_FORMAT_PLATFORMS,
3
4
  BackendClient,
4
5
  BackendClient2,
5
6
  DEFAULT_VIDEO_GENERATE_MODEL,
@@ -23,6 +24,7 @@ import {
23
24
  imageProfileFor,
24
25
  isPersistedAssetRef,
25
26
  parseRefExpr,
27
+ platformFormats,
26
28
  requireCredentialsFromEnv,
27
29
  resolveConcurrency,
28
30
  sha256Hex,
@@ -31,7 +33,7 @@ import {
31
33
  toModelSafeImage,
32
34
  ulid,
33
35
  validateCanvasDeep
34
- } from "./chunk-O3TH7JW5.js";
36
+ } from "./chunk-UBFU3E7L.js";
35
37
  import {
36
38
  csvOrJson,
37
39
  daysAgoIso,
@@ -70,7 +72,7 @@ import {
70
72
  } from "./chunk-RK67WL4O.js";
71
73
 
72
74
  // src/cli.ts
73
- import { defineCommand as defineCommand172, runMain } from "citty";
75
+ import { defineCommand as defineCommand171, runMain } from "citty";
74
76
 
75
77
  // src/commands/actions/index.ts
76
78
  import { defineCommand as defineCommand18 } from "citty";
@@ -1901,29 +1903,8 @@ var linkedinDraftErrorResponseSchema = z4.object({
1901
1903
  fields: z4.array(linkedinFieldErrorSchema).optional()
1902
1904
  });
1903
1905
 
1904
- // ../api/src/analytics/wire.ts
1905
- import { z as z5 } from "zod";
1906
- var ANALYTICS_REPORTS = ["overview", "timeseries", "pages", "sources", "events"];
1907
- var analyticsReportSchema = z5.enum(ANALYTICS_REPORTS);
1908
- var ANALYTICS_PERIODS = ["today", "7d", "28d", "90d"];
1909
- var analyticsPeriodSchema = z5.enum(ANALYTICS_PERIODS);
1910
- var analyticsQueryRequestSchema = z5.object({
1911
- report: analyticsReportSchema,
1912
- period: analyticsPeriodSchema.default("28d"),
1913
- limit: z5.number().int().min(1).max(100).optional()
1914
- });
1915
- var analyticsRowSchema = z5.record(z5.string(), z5.union([z5.string(), z5.number(), z5.null()]));
1916
- var analyticsQueryResponseSchema = z5.object({
1917
- report: analyticsReportSchema,
1918
- /** Inclusive UTC start of the window, `YYYY-MM-DD HH:mm:ss`. */
1919
- from: z5.string(),
1920
- /** Exclusive UTC end of the window, `YYYY-MM-DD HH:mm:ss`. */
1921
- to: z5.string(),
1922
- rows: z5.array(analyticsRowSchema)
1923
- });
1924
-
1925
1906
  // ../api/src/flows.ts
1926
- import { z as z6 } from "zod";
1907
+ import { z as z5 } from "zod";
1927
1908
  var FLOW_SECRET_SIDE_EFFECT_TYPES = [
1928
1909
  "email",
1929
1910
  "zapier",
@@ -1934,7 +1915,7 @@ var FLOW_SECRET_SIDE_EFFECT_TYPES = [
1934
1915
  "crmble",
1935
1916
  "goHighlevelContact"
1936
1917
  ];
1937
- var flowSideEffectTypeSchema = z6.enum(FLOW_SECRET_SIDE_EFFECT_TYPES);
1918
+ var flowSideEffectTypeSchema = z5.enum(FLOW_SECRET_SIDE_EFFECT_TYPES);
1938
1919
  var FLOW_SECRET_FIELDS = {
1939
1920
  email: [],
1940
1921
  zapier: ["zapUrl"],
@@ -1962,94 +1943,94 @@ var FLOW_RESOURCE_NODE_TYPES = [
1962
1943
  "highlevel",
1963
1944
  "highlevelForm"
1964
1945
  ];
1965
- var flowResourceNodeTypeSchema = z6.enum(FLOW_RESOURCE_NODE_TYPES);
1966
- var flowInputRequestSchema = z6.discriminatedUnion("target", [
1967
- z6.object({
1946
+ var flowResourceNodeTypeSchema = z5.enum(FLOW_RESOURCE_NODE_TYPES);
1947
+ var flowInputRequestSchema = z5.discriminatedUnion("target", [
1948
+ z5.object({
1968
1949
  /** Configure a side effect's `encryptedConfig` (+ `oauthProviderId` for OAuth types). */
1969
- target: z6.literal("sideEffect"),
1970
- flowSlug: z6.string(),
1950
+ target: z5.literal("sideEffect"),
1951
+ flowSlug: z5.string(),
1971
1952
  /** `id` of the FlowNode holding the side effect. */
1972
- nodeId: z6.string(),
1953
+ nodeId: z5.string(),
1973
1954
  /** `id` of the side effect within that node's `sideEffects[]`. */
1974
- sideEffectId: z6.string(),
1955
+ sideEffectId: z5.string(),
1975
1956
  sideEffectType: flowSideEffectTypeSchema,
1976
1957
  /** Non-secret `encryptedConfig` values the agent proposes (e.g. webhook apiUrl, auth type). Secret keys are stripped at every boundary. */
1977
- prefilledConfig: z6.record(z6.string(), z6.string()).optional(),
1958
+ prefilledConfig: z5.record(z5.string(), z5.string()).optional(),
1978
1959
  /** Secret credential field names the agent asks the user to provide. */
1979
- requestedSecretFields: z6.array(z6.string()).optional(),
1980
- message: z6.string().optional()
1960
+ requestedSecretFields: z5.array(z5.string()).optional(),
1961
+ message: z5.string().optional()
1981
1962
  }),
1982
- z6.object({
1963
+ z5.object({
1983
1964
  /** Configure a widget node's third-party `form.external` (+ `providerId`). */
1984
- target: z6.literal("node"),
1985
- flowSlug: z6.string(),
1965
+ target: z5.literal("node"),
1966
+ flowSlug: z5.string(),
1986
1967
  /** `id` of the widget FlowNode. */
1987
- nodeId: z6.string(),
1968
+ nodeId: z5.string(),
1988
1969
  nodeType: flowResourceNodeTypeSchema,
1989
- message: z6.string().optional()
1970
+ message: z5.string().optional()
1990
1971
  })
1991
1972
  ]);
1992
- var flowInputToolInputSchema = z6.object({
1993
- requests: z6.array(flowInputRequestSchema).min(1).max(8)
1973
+ var flowInputToolInputSchema = z5.object({
1974
+ requests: z5.array(flowInputRequestSchema).min(1).max(8)
1994
1975
  });
1995
- var flowInputResultSchema = z6.discriminatedUnion("status", [
1996
- z6.object({
1997
- status: z6.literal("submitted"),
1976
+ var flowInputResultSchema = z5.discriminatedUnion("status", [
1977
+ z5.object({
1978
+ status: z5.literal("submitted"),
1998
1979
  /** Echoes which piece this result resolves. */
1999
- nodeId: z6.string(),
2000
- sideEffectId: z6.string().optional(),
1980
+ nodeId: z5.string(),
1981
+ sideEffectId: z5.string().optional(),
2001
1982
  /** Names of secret fields the user provided. Never values. */
2002
- secretFieldsSet: z6.array(z6.string()),
1983
+ secretFieldsSet: z5.array(z5.string()),
2003
1984
  /** Non-secret human summary of what was configured (e.g. "HubSpot form 'Contact us' — 7 fields"). */
2004
- note: z6.string().optional()
1985
+ note: z5.string().optional()
2005
1986
  }),
2006
- z6.object({
2007
- status: z6.literal("declined"),
2008
- nodeId: z6.string(),
2009
- sideEffectId: z6.string().optional(),
2010
- reason: z6.string().optional()
1987
+ z5.object({
1988
+ status: z5.literal("declined"),
1989
+ nodeId: z5.string(),
1990
+ sideEffectId: z5.string().optional(),
1991
+ reason: z5.string().optional()
2011
1992
  })
2012
1993
  ]);
2013
- var flowInputToolResultSchema = z6.object({
2014
- results: z6.array(flowInputResultSchema)
1994
+ var flowInputToolResultSchema = z5.object({
1995
+ results: z5.array(flowInputResultSchema)
2015
1996
  });
2016
- var flowsListRequestSchema = z6.object({ chatId: z6.string() });
2017
- var flowSummarySchema = z6.object({
2018
- slug: z6.string(),
2019
- name: z6.string(),
1997
+ var flowsListRequestSchema = z5.object({ chatId: z5.string() });
1998
+ var flowSummarySchema = z5.object({
1999
+ slug: z5.string(),
2000
+ name: z5.string(),
2020
2001
  /** Count of nodes with an unconfigured confidential field (secret missing / resource not picked / connection needed). */
2021
- needsConfig: z6.number()
2002
+ needsConfig: z5.number()
2022
2003
  });
2023
- var flowsListResponseSchema = z6.object({ flows: z6.array(flowSummarySchema) });
2024
- var flowsShowRequestSchema = z6.object({
2025
- chatId: z6.string(),
2026
- slug: z6.string(),
2027
- full: z6.boolean().optional()
2004
+ var flowsListResponseSchema = z5.object({ flows: z5.array(flowSummarySchema) });
2005
+ var flowsShowRequestSchema = z5.object({
2006
+ chatId: z5.string(),
2007
+ slug: z5.string(),
2008
+ full: z5.boolean().optional()
2028
2009
  });
2029
- var flowConfigStatusSchema = z6.object({
2030
- nodeId: z6.string(),
2031
- nodeName: z6.string().optional(),
2010
+ var flowConfigStatusSchema = z5.object({
2011
+ nodeId: z5.string(),
2012
+ nodeName: z5.string().optional(),
2032
2013
  /** "sideEffect" credential/connection, or "node" widget resource. */
2033
- target: z6.enum(["sideEffect", "node"]),
2034
- sideEffectId: z6.string().optional(),
2035
- kind: z6.string(),
2014
+ target: z5.enum(["sideEffect", "node"]),
2015
+ sideEffectId: z5.string().optional(),
2016
+ kind: z5.string(),
2036
2017
  /** Human status, e.g. "webhook — apiKeyValue [set], bearerToken [missing]" / "HubSpot form [not selected]" / "Pipedrive [needs connection]". */
2037
- status: z6.string(),
2018
+ status: z5.string(),
2038
2019
  /** True when a `request_flow_input` call is still needed for this piece. */
2039
- needsInput: z6.boolean()
2020
+ needsInput: z5.boolean()
2040
2021
  });
2041
- var flowsShowResponseSchema = z6.object({
2042
- slug: z6.string(),
2043
- name: z6.string(),
2022
+ var flowsShowResponseSchema = z5.object({
2023
+ slug: z5.string(),
2024
+ name: z5.string(),
2044
2025
  /** Confidential fields and whether each is configured. */
2045
- config: z6.array(flowConfigStatusSchema),
2026
+ config: z5.array(flowConfigStatusSchema),
2046
2027
  /** Present only with `--full`: the whole flow tree, secret values redacted. */
2047
- tree: z6.unknown().optional()
2028
+ tree: z5.unknown().optional()
2048
2029
  });
2049
2030
 
2050
2031
  // ../api/src/images.ts
2051
- import { z as z7 } from "zod";
2052
- var imageSourceSchema = z7.enum([
2032
+ import { z as z6 } from "zod";
2033
+ var imageSourceSchema = z6.enum([
2053
2034
  "uploaded",
2054
2035
  "website",
2055
2036
  "google_testimonial",
@@ -2065,49 +2046,49 @@ var imageSourceSchema = z7.enum([
2065
2046
  "pinterest",
2066
2047
  "ai_generated"
2067
2048
  ]);
2068
- var imageStatusSchema = z7.enum(["uploading", "processing", "ready", "error"]);
2069
- var upscaleConfigSchema = z7.object({
2070
- model: z7.literal("philz1337x/crystal-upscaler"),
2071
- input: z7.object({
2072
- scale_factor: z7.number(),
2073
- creativity: z7.number(),
2074
- output_format: z7.string()
2049
+ var imageStatusSchema = z6.enum(["uploading", "processing", "ready", "error"]);
2050
+ var upscaleConfigSchema = z6.object({
2051
+ model: z6.literal("philz1337x/crystal-upscaler"),
2052
+ input: z6.object({
2053
+ scale_factor: z6.number(),
2054
+ creativity: z6.number(),
2055
+ output_format: z6.string()
2075
2056
  }),
2076
- status: z7.enum(["pending", "completed"])
2057
+ status: z6.enum(["pending", "completed"])
2077
2058
  });
2078
- var imageDocSchema = z7.object({
2079
- _id: z7.string(),
2080
- _creationTime: z7.number(),
2081
- companyId: z7.string(),
2082
- storageKey: z7.string(),
2059
+ var imageDocSchema = z6.object({
2060
+ _id: z6.string(),
2061
+ _creationTime: z6.number(),
2062
+ companyId: z6.string(),
2063
+ storageKey: z6.string(),
2083
2064
  upscaleConfig: upscaleConfigSchema.optional(),
2084
- upscaledStorageKey: z7.string().optional(),
2085
- name: z7.string(),
2086
- description: z7.string(),
2087
- tags: z7.array(z7.string()),
2088
- source: z7.string(),
2089
- externalId: z7.string().optional(),
2090
- externalUrl: z7.string().optional(),
2091
- contentHash: z7.string().optional(),
2092
- sourceId: z7.string().optional(),
2093
- descriptionContext: z7.string().optional(),
2094
- width: z7.number().optional(),
2095
- height: z7.number().optional(),
2096
- aspectRatio: z7.number().optional(),
2097
- dominantColor: z7.string().optional(),
2098
- imagePalette: z7.array(z7.string()).optional(),
2099
- thumbhashDataUri: z7.string().optional(),
2100
- isLightImage: z7.boolean().optional(),
2101
- descriptionEmbedding: z7.array(z7.number()).optional(),
2102
- imageEmbedding: z7.array(z7.number()).optional(),
2103
- searchText: z7.string().optional(),
2065
+ upscaledStorageKey: z6.string().optional(),
2066
+ name: z6.string(),
2067
+ description: z6.string(),
2068
+ tags: z6.array(z6.string()),
2069
+ source: z6.string(),
2070
+ externalId: z6.string().optional(),
2071
+ externalUrl: z6.string().optional(),
2072
+ contentHash: z6.string().optional(),
2073
+ sourceId: z6.string().optional(),
2074
+ descriptionContext: z6.string().optional(),
2075
+ width: z6.number().optional(),
2076
+ height: z6.number().optional(),
2077
+ aspectRatio: z6.number().optional(),
2078
+ dominantColor: z6.string().optional(),
2079
+ imagePalette: z6.array(z6.string()).optional(),
2080
+ thumbhashDataUri: z6.string().optional(),
2081
+ isLightImage: z6.boolean().optional(),
2082
+ descriptionEmbedding: z6.array(z6.number()).optional(),
2083
+ imageEmbedding: z6.array(z6.number()).optional(),
2084
+ searchText: z6.string().optional(),
2104
2085
  status: imageStatusSchema,
2105
- errorMessage: z7.string().optional(),
2106
- createdAt: z7.number(),
2107
- updatedAt: z7.number(),
2108
- imageUrl: z7.string()
2086
+ errorMessage: z6.string().optional(),
2087
+ createdAt: z6.number(),
2088
+ updatedAt: z6.number(),
2089
+ imageUrl: z6.string()
2109
2090
  });
2110
- var imageHitSourceSchema = z7.enum([
2091
+ var imageHitSourceSchema = z6.enum([
2111
2092
  "library",
2112
2093
  "magnific",
2113
2094
  "google_images",
@@ -2118,242 +2099,242 @@ var imageHitSourceSchema = z7.enum([
2118
2099
  "giphy",
2119
2100
  "pinterest"
2120
2101
  ]);
2121
- var imageHitSchema = z7.object({
2102
+ var imageHitSchema = z6.object({
2122
2103
  source: imageHitSourceSchema,
2123
- url: z7.string(),
2124
- thumbnailUrl: z7.string().optional(),
2125
- width: z7.number().optional(),
2126
- height: z7.number().optional(),
2127
- aspectRatio: z7.number().optional(),
2128
- dominantColor: z7.string().optional(),
2129
- externalId: z7.string().optional(),
2130
- externalUrl: z7.string().optional(),
2131
- providerMeta: z7.record(z7.string(), z7.unknown()).optional(),
2132
- descriptionContext: z7.string().optional(),
2133
- _id: z7.string().optional(),
2134
- name: z7.string().optional(),
2135
- description: z7.string().optional(),
2136
- tags: z7.array(z7.string()).optional(),
2137
- score: z7.number().optional(),
2138
- alsoInLibrary: z7.string().optional(),
2139
- prefetchedBytes: z7.string().optional(),
2140
- prefetchedContentType: z7.string().optional()
2104
+ url: z6.string(),
2105
+ thumbnailUrl: z6.string().optional(),
2106
+ width: z6.number().optional(),
2107
+ height: z6.number().optional(),
2108
+ aspectRatio: z6.number().optional(),
2109
+ dominantColor: z6.string().optional(),
2110
+ externalId: z6.string().optional(),
2111
+ externalUrl: z6.string().optional(),
2112
+ providerMeta: z6.record(z6.string(), z6.unknown()).optional(),
2113
+ descriptionContext: z6.string().optional(),
2114
+ _id: z6.string().optional(),
2115
+ name: z6.string().optional(),
2116
+ description: z6.string().optional(),
2117
+ tags: z6.array(z6.string()).optional(),
2118
+ score: z6.number().optional(),
2119
+ alsoInLibrary: z6.string().optional(),
2120
+ prefetchedBytes: z6.string().optional(),
2121
+ prefetchedContentType: z6.string().optional()
2141
2122
  });
2142
2123
  var ingestedImageHitSchema = imageHitSchema.extend({
2143
- imageId: z7.string().optional(),
2144
- imageUrl: z7.string().optional(),
2145
- deduped: z7.boolean().optional(),
2146
- sourceUrl: z7.string().optional()
2147
- });
2148
- var autoIngestItemSchema = z7.object({
2149
- imageId: z7.string(),
2150
- deduped: z7.boolean(),
2151
- imageUrl: z7.string(),
2152
- sourceUrl: z7.string(),
2153
- externalUrl: z7.string().optional()
2124
+ imageId: z6.string().optional(),
2125
+ imageUrl: z6.string().optional(),
2126
+ deduped: z6.boolean().optional(),
2127
+ sourceUrl: z6.string().optional()
2128
+ });
2129
+ var autoIngestItemSchema = z6.object({
2130
+ imageId: z6.string(),
2131
+ deduped: z6.boolean(),
2132
+ imageUrl: z6.string(),
2133
+ sourceUrl: z6.string(),
2134
+ externalUrl: z6.string().optional()
2154
2135
  });
2155
2136
  function providerHitsResponseSchema() {
2156
- return z7.object({
2157
- hits: z7.array(ingestedImageHitSchema),
2158
- ingested: z7.array(autoIngestItemSchema)
2137
+ return z6.object({
2138
+ hits: z6.array(ingestedImageHitSchema),
2139
+ ingested: z6.array(autoIngestItemSchema)
2159
2140
  });
2160
2141
  }
2161
- var imagesGetRequestSchema = z7.object({ id: z7.string().min(1, "Missing id parameter") });
2162
- var imagesSearchRequestSchema = z7.object({
2163
- query: z7.string().min(1),
2164
- limit: z7.coerce.number().int().positive().max(100).optional(),
2165
- aspectRatio: z7.string().optional(),
2166
- tags: z7.array(z7.string()).optional(),
2167
- source: z7.string().optional(),
2168
- externalUrlHost: z7.string().optional()
2169
- });
2170
- var imageSearchResultSchema = z7.object({
2171
- _id: z7.string(),
2172
- imageUrl: z7.string(),
2173
- name: z7.string(),
2174
- description: z7.string(),
2175
- tags: z7.array(z7.string()),
2176
- width: z7.number().optional(),
2177
- height: z7.number().optional(),
2178
- aspectRatio: z7.number().optional(),
2179
- dominantColor: z7.string().optional(),
2180
- imagePalette: z7.array(z7.string()).optional(),
2181
- source: z7.string(),
2182
- externalUrl: z7.string().optional(),
2183
- score: z7.number()
2184
- });
2185
- var imagesSearchResponseSchema = z7.array(imageSearchResultSchema);
2186
- var imagesUploadRequestSchema = z7.object({
2187
- base64: z7.string().min(1),
2188
- contentType: z7.string().min(1),
2189
- source: z7.string().optional(),
2190
- descriptionContext: z7.string().optional()
2191
- });
2192
- var imagesUploadResponseSchema = z7.object({ imageId: z7.string() });
2193
- var imagesDeleteRequestSchema = z7.object({ id: z7.string().min(1, "Missing image ID") });
2194
- var imagesDeleteResponseSchema = z7.object({ ok: z7.literal(true) });
2195
- var imagesUpscaleRequestSchema = z7.object({ imageId: z7.string().min(1, "Missing image ID") });
2196
- var imagesUpscaleResponseSchema = z7.object({
2197
- imageId: z7.string(),
2198
- status: z7.literal("processing")
2142
+ var imagesGetRequestSchema = z6.object({ id: z6.string().min(1, "Missing id parameter") });
2143
+ var imagesSearchRequestSchema = z6.object({
2144
+ query: z6.string().min(1),
2145
+ limit: z6.coerce.number().int().positive().max(100).optional(),
2146
+ aspectRatio: z6.string().optional(),
2147
+ tags: z6.array(z6.string()).optional(),
2148
+ source: z6.string().optional(),
2149
+ externalUrlHost: z6.string().optional()
2150
+ });
2151
+ var imageSearchResultSchema = z6.object({
2152
+ _id: z6.string(),
2153
+ imageUrl: z6.string(),
2154
+ name: z6.string(),
2155
+ description: z6.string(),
2156
+ tags: z6.array(z6.string()),
2157
+ width: z6.number().optional(),
2158
+ height: z6.number().optional(),
2159
+ aspectRatio: z6.number().optional(),
2160
+ dominantColor: z6.string().optional(),
2161
+ imagePalette: z6.array(z6.string()).optional(),
2162
+ source: z6.string(),
2163
+ externalUrl: z6.string().optional(),
2164
+ score: z6.number()
2165
+ });
2166
+ var imagesSearchResponseSchema = z6.array(imageSearchResultSchema);
2167
+ var imagesUploadRequestSchema = z6.object({
2168
+ base64: z6.string().min(1),
2169
+ contentType: z6.string().min(1),
2170
+ source: z6.string().optional(),
2171
+ descriptionContext: z6.string().optional()
2172
+ });
2173
+ var imagesUploadResponseSchema = z6.object({ imageId: z6.string() });
2174
+ var imagesDeleteRequestSchema = z6.object({ id: z6.string().min(1, "Missing image ID") });
2175
+ var imagesDeleteResponseSchema = z6.object({ ok: z6.literal(true) });
2176
+ var imagesUpscaleRequestSchema = z6.object({ imageId: z6.string().min(1, "Missing image ID") });
2177
+ var imagesUpscaleResponseSchema = z6.object({
2178
+ imageId: z6.string(),
2179
+ status: z6.literal("processing")
2199
2180
  });
2200
2181
  var IMAGES_FIND_SOURCES = ["library", "magnific", "google", "iconify", "giphy", "pinterest"];
2201
- var imagesFindRequestSchema = z7.object({
2202
- query: z7.string().min(1),
2203
- sources: z7.array(z7.enum(IMAGES_FIND_SOURCES)).optional(),
2204
- limit: z7.coerce.number().int().positive().max(50).optional(),
2205
- fallback: z7.boolean().optional(),
2206
- threshold: z7.number().min(0).max(1).optional(),
2207
- autoIngest: z7.coerce.number().int().min(0).max(20).optional(),
2208
- descriptionContext: z7.string().optional()
2209
- });
2210
- var imagesFindResponseSchema = z7.object({
2211
- groups: z7.object({
2212
- library: z7.array(imageHitSchema),
2213
- external: z7.array(ingestedImageHitSchema)
2182
+ var imagesFindRequestSchema = z6.object({
2183
+ query: z6.string().min(1),
2184
+ sources: z6.array(z6.enum(IMAGES_FIND_SOURCES)).optional(),
2185
+ limit: z6.coerce.number().int().positive().max(50).optional(),
2186
+ fallback: z6.boolean().optional(),
2187
+ threshold: z6.number().min(0).max(1).optional(),
2188
+ autoIngest: z6.coerce.number().int().min(0).max(20).optional(),
2189
+ descriptionContext: z6.string().optional()
2190
+ });
2191
+ var imagesFindResponseSchema = z6.object({
2192
+ groups: z6.object({
2193
+ library: z6.array(imageHitSchema),
2194
+ external: z6.array(ingestedImageHitSchema)
2214
2195
  }),
2215
- meta: z7.object({
2216
- counts: z7.record(z7.string(), z7.number()),
2217
- errors: z7.array(z7.object({ source: imageHitSourceSchema, message: z7.string() }))
2196
+ meta: z6.object({
2197
+ counts: z6.record(z6.string(), z6.number()),
2198
+ errors: z6.array(z6.object({ source: imageHitSourceSchema, message: z6.string() }))
2218
2199
  }),
2219
- ingested: z7.array(autoIngestItemSchema)
2220
- });
2221
- var imagesStockRequestSchema = z7.object({
2222
- query: z7.string().min(1),
2223
- orientation: z7.enum(["landscape", "portrait", "square", "panoramic"]).optional(),
2224
- contentType: z7.enum(["photo", "vector", "psd"]).optional(),
2225
- license: z7.enum(["freemium", "premium"]).optional(),
2226
- color: z7.string().optional(),
2227
- aiGenerated: z7.enum(["exclude", "only"]).optional(),
2228
- people: z7.enum(["include", "exclude", "only"]).optional(),
2229
- order: z7.enum(["relevance", "recent"]).optional(),
2230
- limit: z7.coerce.number().int().positive().max(50).optional(),
2231
- page: z7.coerce.number().int().positive().optional(),
2232
- autoIngest: z7.coerce.number().int().min(0).max(20).optional(),
2233
- descriptionContext: z7.string().optional()
2200
+ ingested: z6.array(autoIngestItemSchema)
2201
+ });
2202
+ var imagesStockRequestSchema = z6.object({
2203
+ query: z6.string().min(1),
2204
+ orientation: z6.enum(["landscape", "portrait", "square", "panoramic"]).optional(),
2205
+ contentType: z6.enum(["photo", "vector", "psd"]).optional(),
2206
+ license: z6.enum(["freemium", "premium"]).optional(),
2207
+ color: z6.string().optional(),
2208
+ aiGenerated: z6.enum(["exclude", "only"]).optional(),
2209
+ people: z6.enum(["include", "exclude", "only"]).optional(),
2210
+ order: z6.enum(["relevance", "recent"]).optional(),
2211
+ limit: z6.coerce.number().int().positive().max(50).optional(),
2212
+ page: z6.coerce.number().int().positive().optional(),
2213
+ autoIngest: z6.coerce.number().int().min(0).max(20).optional(),
2214
+ descriptionContext: z6.string().optional()
2234
2215
  });
2235
2216
  var imagesStockResponseSchema = providerHitsResponseSchema();
2236
- var imagesGoogleRequestSchema = z7.object({
2237
- query: z7.string().min(1),
2238
- type: z7.string().optional(),
2239
- size: z7.string().optional(),
2240
- color: z7.string().optional(),
2241
- safe: z7.enum(["off", "active"]).optional(),
2242
- limit: z7.coerce.number().int().positive().max(50).optional(),
2243
- autoIngest: z7.coerce.number().int().min(0).max(20).optional(),
2244
- descriptionContext: z7.string().optional()
2217
+ var imagesGoogleRequestSchema = z6.object({
2218
+ query: z6.string().min(1),
2219
+ type: z6.string().optional(),
2220
+ size: z6.string().optional(),
2221
+ color: z6.string().optional(),
2222
+ safe: z6.enum(["off", "active"]).optional(),
2223
+ limit: z6.coerce.number().int().positive().max(50).optional(),
2224
+ autoIngest: z6.coerce.number().int().min(0).max(20).optional(),
2225
+ descriptionContext: z6.string().optional()
2245
2226
  });
2246
2227
  var imagesGoogleResponseSchema = providerHitsResponseSchema();
2247
- var imagesPinterestRequestSchema = z7.object({
2248
- query: z7.string().min(1),
2249
- limit: z7.coerce.number().int().positive().max(20).optional(),
2250
- autoIngest: z7.coerce.number().int().min(0).max(20).optional(),
2251
- descriptionContext: z7.string().optional()
2228
+ var imagesPinterestRequestSchema = z6.object({
2229
+ query: z6.string().min(1),
2230
+ limit: z6.coerce.number().int().positive().max(20).optional(),
2231
+ autoIngest: z6.coerce.number().int().min(0).max(20).optional(),
2232
+ descriptionContext: z6.string().optional()
2252
2233
  });
2253
2234
  var imagesPinterestResponseSchema = providerHitsResponseSchema();
2254
- var rgbTriple = z7.tuple([
2255
- z7.number().int().min(0).max(255),
2256
- z7.number().int().min(0).max(255),
2257
- z7.number().int().min(0).max(255)
2235
+ var rgbTriple = z6.tuple([
2236
+ z6.number().int().min(0).max(255),
2237
+ z6.number().int().min(0).max(255),
2238
+ z6.number().int().min(0).max(255)
2258
2239
  ]);
2259
- var imageGenerateModelSchema = z7.enum([
2240
+ var imageGenerateModelSchema = z6.enum([
2260
2241
  "openai/gpt-5.4-image-2",
2261
2242
  "google/gemini-3.5-flash",
2262
2243
  "google/gemini-3.1-flash-image-preview",
2263
2244
  "google/gemini-3-pro-image-preview",
2264
2245
  "recraft/recraft-v4.1-pro-vector"
2265
2246
  ]);
2266
- var imagesGenerateRequestSchema = z7.object({
2267
- prompt: z7.string().min(1),
2247
+ var imagesGenerateRequestSchema = z6.object({
2248
+ prompt: z6.string().min(1),
2268
2249
  model: imageGenerateModelSchema.optional(),
2269
2250
  // Aspect ratio + size are validated loosely as strings; the per-model enum
2270
2251
  // lives in canvas-contract and OpenRouter rejects unsupported combinations.
2271
- aspectRatio: z7.string().optional(),
2272
- imageSize: z7.string().optional(),
2252
+ aspectRatio: z6.string().optional(),
2253
+ imageSize: z6.string().optional(),
2273
2254
  // Rendering quality (auto|low|medium|high) — honored by gpt-image / Gemini, ignored elsewhere.
2274
- quality: z7.enum(["auto", "low", "medium", "high"]).optional(),
2255
+ quality: z6.enum(["auto", "low", "medium", "high"]).optional(),
2275
2256
  // Recraft v4.1 Pro Vector levers (ignored by other models).
2276
- strength: z7.coerce.number().min(0).max(1).optional(),
2277
- rgbColors: z7.array(rgbTriple).optional(),
2257
+ strength: z6.coerce.number().min(0).max(1).optional(),
2258
+ rgbColors: z6.array(rgbTriple).optional(),
2278
2259
  backgroundRgbColor: rgbTriple.optional(),
2279
2260
  // Public image URLs used as visual references (multi-reference, in order).
2280
- referenceUrls: z7.array(z7.string().url()).optional(),
2281
- descriptionContext: z7.string().optional()
2282
- });
2283
- var generatedImageSchema = z7.object({
2284
- imageId: z7.string(),
2285
- deduped: z7.boolean(),
2286
- imageUrl: z7.string(),
2287
- width: z7.number().optional(),
2288
- height: z7.number().optional()
2289
- });
2290
- var imagesGenerateResponseSchema = z7.object({
2291
- model: z7.string(),
2292
- costUsd: z7.number(),
2293
- images: z7.array(generatedImageSchema)
2294
- });
2295
- var imagesLogoRequestSchema = z7.object({
2296
- domain: z7.string().min(1),
2297
- variant: z7.enum(["icon", "logo", "symbol"]).optional(),
2298
- autoIngest: z7.coerce.number().int().min(0).max(5).optional(),
2299
- descriptionContext: z7.string().optional()
2261
+ referenceUrls: z6.array(z6.string().url()).optional(),
2262
+ descriptionContext: z6.string().optional()
2263
+ });
2264
+ var generatedImageSchema = z6.object({
2265
+ imageId: z6.string(),
2266
+ deduped: z6.boolean(),
2267
+ imageUrl: z6.string(),
2268
+ width: z6.number().optional(),
2269
+ height: z6.number().optional()
2270
+ });
2271
+ var imagesGenerateResponseSchema = z6.object({
2272
+ model: z6.string(),
2273
+ costUsd: z6.number(),
2274
+ images: z6.array(generatedImageSchema)
2275
+ });
2276
+ var imagesLogoRequestSchema = z6.object({
2277
+ domain: z6.string().min(1),
2278
+ variant: z6.enum(["icon", "logo", "symbol"]).optional(),
2279
+ autoIngest: z6.coerce.number().int().min(0).max(5).optional(),
2280
+ descriptionContext: z6.string().optional()
2300
2281
  });
2301
2282
  var imagesLogoResponseSchema = providerHitsResponseSchema();
2302
- var imagesIconRequestSchema = z7.object({
2303
- name: z7.string().min(1),
2304
- set: z7.string().optional(),
2305
- color: z7.string().optional(),
2306
- width: z7.coerce.number().int().positive().optional(),
2307
- autoIngest: z7.coerce.number().int().min(0).max(20).optional(),
2308
- descriptionContext: z7.string().optional()
2283
+ var imagesIconRequestSchema = z6.object({
2284
+ name: z6.string().min(1),
2285
+ set: z6.string().optional(),
2286
+ color: z6.string().optional(),
2287
+ width: z6.coerce.number().int().positive().optional(),
2288
+ autoIngest: z6.coerce.number().int().min(0).max(20).optional(),
2289
+ descriptionContext: z6.string().optional()
2309
2290
  });
2310
2291
  var imagesIconResponseSchema = providerHitsResponseSchema();
2311
- var imagesExtractRequestSchema = z7.object({
2312
- url: z7.string().url(),
2313
- waitFor: z7.coerce.number().int().min(0).max(3e4).optional(),
2314
- limit: z7.coerce.number().int().positive().max(50).optional(),
2315
- autoIngest: z7.coerce.number().int().min(0).max(20).optional(),
2316
- descriptionContext: z7.string().optional()
2292
+ var imagesExtractRequestSchema = z6.object({
2293
+ url: z6.string().url(),
2294
+ waitFor: z6.coerce.number().int().min(0).max(3e4).optional(),
2295
+ limit: z6.coerce.number().int().positive().max(50).optional(),
2296
+ autoIngest: z6.coerce.number().int().min(0).max(20).optional(),
2297
+ descriptionContext: z6.string().optional()
2317
2298
  });
2318
2299
  var imagesExtractResponseSchema = providerHitsResponseSchema();
2319
- var imagesScreenshotRequestSchema = z7.object({
2320
- url: z7.string().url(),
2321
- fullPage: z7.boolean().optional(),
2322
- viewportWidth: z7.coerce.number().int().positive().max(3840).optional(),
2323
- viewportHeight: z7.coerce.number().int().positive().max(2160).optional(),
2324
- format: z7.enum(["webp", "png", "jpg"]).optional(),
2325
- descriptionContext: z7.string().optional()
2300
+ var imagesScreenshotRequestSchema = z6.object({
2301
+ url: z6.string().url(),
2302
+ fullPage: z6.boolean().optional(),
2303
+ viewportWidth: z6.coerce.number().int().positive().max(3840).optional(),
2304
+ viewportHeight: z6.coerce.number().int().positive().max(2160).optional(),
2305
+ format: z6.enum(["webp", "png", "jpg"]).optional(),
2306
+ descriptionContext: z6.string().optional()
2326
2307
  });
2327
2308
  var imagesScreenshotResponseSchema = providerHitsResponseSchema();
2328
- var imagesGiphyRequestSchema = z7.object({
2329
- query: z7.string().min(1).optional(),
2330
- trending: z7.coerce.boolean().optional(),
2331
- limit: z7.coerce.number().int().positive().max(50).optional(),
2332
- rating: z7.enum(["g", "pg", "pg-13", "r"]).optional(),
2333
- lang: z7.string().optional(),
2334
- autoIngest: z7.coerce.number().int().min(0).max(20).optional(),
2335
- descriptionContext: z7.string().optional()
2309
+ var imagesGiphyRequestSchema = z6.object({
2310
+ query: z6.string().min(1).optional(),
2311
+ trending: z6.coerce.boolean().optional(),
2312
+ limit: z6.coerce.number().int().positive().max(50).optional(),
2313
+ rating: z6.enum(["g", "pg", "pg-13", "r"]).optional(),
2314
+ lang: z6.string().optional(),
2315
+ autoIngest: z6.coerce.number().int().min(0).max(20).optional(),
2316
+ descriptionContext: z6.string().optional()
2336
2317
  });
2337
2318
  var imagesGifResponseSchema = providerHitsResponseSchema();
2338
2319
  var imagesStickerResponseSchema = providerHitsResponseSchema();
2339
- var imagesIngestRequestSchema = z7.object({
2340
- url: z7.string().url(),
2320
+ var imagesIngestRequestSchema = z6.object({
2321
+ url: z6.string().url(),
2341
2322
  // Validate source at the HTTP boundary so unknown values produce the standard
2342
2323
  // `{ code: "BAD_REQUEST", message }` shape instead of a plain Error from
2343
2324
  // `assertImageSource` inside the action.
2344
2325
  source: imageSourceSchema,
2345
- externalId: z7.string().optional(),
2346
- externalUrl: z7.string().optional(),
2347
- descriptionContext: z7.string().optional()
2326
+ externalId: z6.string().optional(),
2327
+ externalUrl: z6.string().optional(),
2328
+ descriptionContext: z6.string().optional()
2348
2329
  });
2349
- var imagesIngestResponseSchema = z7.object({
2350
- imageId: z7.string(),
2351
- deduped: z7.boolean(),
2352
- contentHash: z7.string()
2330
+ var imagesIngestResponseSchema = z6.object({
2331
+ imageId: z6.string(),
2332
+ deduped: z6.boolean(),
2333
+ contentHash: z6.string()
2353
2334
  });
2354
2335
 
2355
2336
  // ../api/src/tags.ts
2356
- import { z as z8 } from "zod";
2337
+ import { z as z7 } from "zod";
2357
2338
  var TAG_TYPES = [
2358
2339
  "meta",
2359
2340
  "amplitude",
@@ -2374,7 +2355,7 @@ var TAG_TYPES = [
2374
2355
  "recaptcha",
2375
2356
  "twitterAds"
2376
2357
  ];
2377
- var tagTypeSchema = z8.enum(TAG_TYPES);
2358
+ var tagTypeSchema = z7.enum(TAG_TYPES);
2378
2359
  var TAG_IDENTIFYING_FIELD = {
2379
2360
  meta: "pixelId",
2380
2361
  googleAds: "conversionID",
@@ -2395,218 +2376,218 @@ var TAG_IDENTIFYING_FIELD = {
2395
2376
  recaptcha: "siteKey",
2396
2377
  twitterAds: "pixelId"
2397
2378
  };
2398
- var tagDraftOpKindSchema = z8.enum(["create", "update", "delete"]);
2399
- var tagDraftOpViewSchema = z8.object({
2379
+ var tagDraftOpKindSchema = z7.enum(["create", "update", "delete"]);
2380
+ var tagDraftOpViewSchema = z7.object({
2400
2381
  /** `tag_temp_*` for staged creates; the real tag id for update/delete ops. */
2401
- ref: z8.string(),
2382
+ ref: z7.string(),
2402
2383
  kind: tagDraftOpKindSchema,
2403
2384
  type: tagTypeSchema,
2404
2385
  /** Present on update/delete ops — the real tag this op targets. */
2405
- tagId: z8.string().optional(),
2386
+ tagId: z7.string().optional(),
2406
2387
  /** Non-secret config (create: full; update: the staged patch). Secrets are structurally absent. */
2407
- config: z8.record(z8.string(), z8.string()),
2388
+ config: z7.record(z7.string(), z7.string()),
2408
2389
  /** Update only — fields the op explicitly clears. */
2409
- clearFields: z8.array(z8.string()).optional(),
2390
+ clearFields: z7.array(z7.string()).optional(),
2410
2391
  /** Names of secret fields already provided via the dashboard secure form. Never values. */
2411
- secretsSet: z8.array(z8.string()),
2392
+ secretsSet: z7.array(z7.string()),
2412
2393
  /** Names of secret fields still awaiting user input. */
2413
- secretsPending: z8.array(z8.string()),
2414
- summary: z8.string(),
2415
- stagedAt: z8.number()
2394
+ secretsPending: z7.array(z7.string()),
2395
+ summary: z7.string(),
2396
+ stagedAt: z7.number()
2416
2397
  });
2417
- var tagsEffectiveEntrySchema = z8.object({
2398
+ var tagsEffectiveEntrySchema = z7.object({
2418
2399
  /** Real tag id, or `tag_temp_*` for staged creates. Use as flow side-effect `tagIds` value. */
2419
- ref: z8.string(),
2420
- tagId: z8.string().optional(),
2400
+ ref: z7.string(),
2401
+ tagId: z7.string().optional(),
2421
2402
  type: tagTypeSchema,
2422
2403
  /** Value of the type's identifying field, when set. */
2423
- identifier: z8.string().optional(),
2404
+ identifier: z7.string().optional(),
2424
2405
  /** Redacted config; for staged updates, production config with the patch merged. */
2425
- config: z8.record(z8.string(), z8.string()),
2406
+ config: z7.record(z7.string(), z7.string()),
2426
2407
  /** Absent = live production tag with no staged changes in this chat. */
2427
2408
  staged: tagDraftOpKindSchema.optional(),
2428
- secretsSet: z8.array(z8.string()),
2429
- secretsPending: z8.array(z8.string())
2409
+ secretsSet: z7.array(z7.string()),
2410
+ secretsPending: z7.array(z7.string())
2430
2411
  });
2431
- var tagsListRequestSchema = z8.object({ chatId: z8.string() });
2432
- var tagsListResponseSchema = z8.object({ tags: z8.array(tagsEffectiveEntrySchema) });
2433
- var tagsDraftListRequestSchema = z8.object({ chatId: z8.string() });
2434
- var tagsDraftListResponseSchema = z8.object({
2435
- status: z8.enum(["active", "publishing", "applied", "discarded", "none"]),
2436
- ops: z8.array(tagDraftOpViewSchema)
2412
+ var tagsListRequestSchema = z7.object({ chatId: z7.string() });
2413
+ var tagsListResponseSchema = z7.object({ tags: z7.array(tagsEffectiveEntrySchema) });
2414
+ var tagsDraftListRequestSchema = z7.object({ chatId: z7.string() });
2415
+ var tagsDraftListResponseSchema = z7.object({
2416
+ status: z7.enum(["active", "publishing", "applied", "discarded", "none"]),
2417
+ ops: z7.array(tagDraftOpViewSchema)
2437
2418
  });
2438
- var tagInputRequestSchema = z8.object({
2419
+ var tagInputRequestSchema = z7.object({
2439
2420
  // Every tag change is a tab in the approval form: create/edit show the full
2440
2421
  // body; delete shows a confirm. No tag change bypasses this approval.
2441
- mode: z8.enum(["create", "edit", "delete"]),
2422
+ mode: z7.enum(["create", "edit", "delete"]),
2442
2423
  tagType: tagTypeSchema,
2443
2424
  /** Edit/delete mode — the real tag id or `tag_temp_*` ref being changed. */
2444
- ref: z8.string().optional(),
2425
+ ref: z7.string().optional(),
2445
2426
  /** Non-secret values the agent proposes to prefill. Secret keys are stripped at every boundary. */
2446
- prefilledConfig: z8.record(z8.string(), z8.string()).optional(),
2427
+ prefilledConfig: z7.record(z7.string(), z7.string()).optional(),
2447
2428
  /** Secret field names the agent asks the user to provide. */
2448
- requestedSecretFields: z8.array(z8.string()).optional(),
2429
+ requestedSecretFields: z7.array(z7.string()).optional(),
2449
2430
  /** Short message shown above the form explaining why the input is needed. */
2450
- message: z8.string().optional()
2431
+ message: z7.string().optional()
2451
2432
  });
2452
- var tagChangeToolInputSchema = z8.object({
2453
- changes: z8.array(tagInputRequestSchema).min(1).max(8)
2433
+ var tagChangeToolInputSchema = z7.object({
2434
+ changes: z7.array(tagInputRequestSchema).min(1).max(8)
2454
2435
  });
2455
- var tagInputResultSchema = z8.discriminatedUnion("status", [
2456
- z8.object({
2457
- status: z8.literal("submitted"),
2458
- ref: z8.string(),
2436
+ var tagInputResultSchema = z7.discriminatedUnion("status", [
2437
+ z7.object({
2438
+ status: z7.literal("submitted"),
2439
+ ref: z7.string(),
2459
2440
  type: tagTypeSchema,
2460
2441
  /** Identifying field name → value (non-secret), when the type has one. */
2461
- identifier: z8.record(z8.string(), z8.string()).optional(),
2462
- secretFieldsSet: z8.array(z8.string()),
2463
- note: z8.string().optional()
2442
+ identifier: z7.record(z7.string(), z7.string()).optional(),
2443
+ secretFieldsSet: z7.array(z7.string()),
2444
+ note: z7.string().optional()
2464
2445
  }),
2465
- z8.object({
2466
- status: z8.literal("declined"),
2467
- reason: z8.string().optional()
2446
+ z7.object({
2447
+ status: z7.literal("declined"),
2448
+ reason: z7.string().optional()
2468
2449
  })
2469
2450
  ]);
2470
- var tagChangeToolResultSchema = z8.object({
2471
- results: z8.array(tagInputResultSchema)
2451
+ var tagChangeToolResultSchema = z7.object({
2452
+ results: z7.array(tagInputResultSchema)
2472
2453
  });
2473
2454
 
2474
2455
  // ../api/src/testimonials.ts
2475
- import { z as z9 } from "zod";
2476
- var testimonialSourceTypeSchema = z9.enum(["google", "trustpilot"]);
2477
- var testimonialStatusSchema = z9.enum(["pending", "processing", "ready", "error"]);
2478
- var testimonialSentimentSchema = z9.enum(["positive", "neutral", "negative"]);
2479
- var testimonialDocSchema = z9.object({
2480
- _id: z9.string(),
2481
- _creationTime: z9.number(),
2482
- companyId: z9.string(),
2483
- sourceId: z9.string(),
2456
+ import { z as z8 } from "zod";
2457
+ var testimonialSourceTypeSchema = z8.enum(["google", "trustpilot"]);
2458
+ var testimonialStatusSchema = z8.enum(["pending", "processing", "ready", "error"]);
2459
+ var testimonialSentimentSchema = z8.enum(["positive", "neutral", "negative"]);
2460
+ var testimonialDocSchema = z8.object({
2461
+ _id: z8.string(),
2462
+ _creationTime: z8.number(),
2463
+ companyId: z8.string(),
2464
+ sourceId: z8.string(),
2484
2465
  sourceType: testimonialSourceTypeSchema,
2485
- reviewText: z9.string(),
2486
- reviewTitle: z9.string().optional(),
2487
- searchText: z9.string().optional(),
2488
- reviewerName: z9.string().optional(),
2489
- reviewerImageUrl: z9.string().optional(),
2490
- reviewerImageId: z9.string().optional(),
2491
- reviewerLocation: z9.string().optional(),
2492
- rating: z9.number().optional(),
2493
- reviewDate: z9.number().optional(),
2494
- ownerAnswer: z9.string().optional(),
2495
- mediaUrls: z9.array(z9.string()).optional(),
2496
- imageIds: z9.array(z9.string()).optional(),
2497
- videoIds: z9.array(z9.string()).optional(),
2498
- sourceUrl: z9.string().optional(),
2499
- rawData: z9.unknown().optional(),
2500
- tags: z9.array(z9.string()),
2501
- highlight: z9.string().optional(),
2502
- language: z9.string().optional(),
2503
- summary: z9.string().optional(),
2466
+ reviewText: z8.string(),
2467
+ reviewTitle: z8.string().optional(),
2468
+ searchText: z8.string().optional(),
2469
+ reviewerName: z8.string().optional(),
2470
+ reviewerImageUrl: z8.string().optional(),
2471
+ reviewerImageId: z8.string().optional(),
2472
+ reviewerLocation: z8.string().optional(),
2473
+ rating: z8.number().optional(),
2474
+ reviewDate: z8.number().optional(),
2475
+ ownerAnswer: z8.string().optional(),
2476
+ mediaUrls: z8.array(z8.string()).optional(),
2477
+ imageIds: z8.array(z8.string()).optional(),
2478
+ videoIds: z8.array(z8.string()).optional(),
2479
+ sourceUrl: z8.string().optional(),
2480
+ rawData: z8.unknown().optional(),
2481
+ tags: z8.array(z8.string()),
2482
+ highlight: z8.string().optional(),
2483
+ language: z8.string().optional(),
2484
+ summary: z8.string().optional(),
2504
2485
  sentiment: testimonialSentimentSchema.optional(),
2505
- textEmbedding: z9.array(z9.number()).optional(),
2506
- externalId: z9.string().optional(),
2507
- contentHash: z9.string().optional(),
2486
+ textEmbedding: z8.array(z8.number()).optional(),
2487
+ externalId: z8.string().optional(),
2488
+ contentHash: z8.string().optional(),
2508
2489
  status: testimonialStatusSchema,
2509
- errorMessage: z9.string().optional(),
2510
- createdAt: z9.number(),
2511
- updatedAt: z9.number()
2490
+ errorMessage: z8.string().optional(),
2491
+ createdAt: z8.number(),
2492
+ updatedAt: z8.number()
2512
2493
  });
2513
- var testimonialsListRequestSchema = z9.object({
2494
+ var testimonialsListRequestSchema = z8.object({
2514
2495
  source: testimonialSourceTypeSchema.optional(),
2515
- rating_min: z9.coerce.number().int().min(1).max(5).optional(),
2516
- rating_max: z9.coerce.number().int().min(1).max(5).optional(),
2517
- tags: z9.string().transform((s) => s.split(",").filter(Boolean)).optional(),
2496
+ rating_min: z8.coerce.number().int().min(1).max(5).optional(),
2497
+ rating_max: z8.coerce.number().int().min(1).max(5).optional(),
2498
+ tags: z8.string().transform((s) => s.split(",").filter(Boolean)).optional(),
2518
2499
  status: testimonialStatusSchema.optional(),
2519
2500
  sentiment: testimonialSentimentSchema.optional(),
2520
- language: z9.string().min(2).max(5).optional(),
2521
- limit: z9.coerce.number().int().positive().max(200).optional()
2522
- });
2523
- var testimonialsListResponseSchema = z9.array(testimonialDocSchema);
2524
- var testimonialsGetRequestSchema = z9.object({ id: z9.string().min(1, "Missing id parameter") });
2525
- var testimonialsSearchRequestSchema = z9.object({
2526
- query: z9.string().min(1),
2527
- limit: z9.coerce.number().int().positive().max(100).optional(),
2501
+ language: z8.string().min(2).max(5).optional(),
2502
+ limit: z8.coerce.number().int().positive().max(200).optional()
2503
+ });
2504
+ var testimonialsListResponseSchema = z8.array(testimonialDocSchema);
2505
+ var testimonialsGetRequestSchema = z8.object({ id: z8.string().min(1, "Missing id parameter") });
2506
+ var testimonialsSearchRequestSchema = z8.object({
2507
+ query: z8.string().min(1),
2508
+ limit: z8.coerce.number().int().positive().max(100).optional(),
2528
2509
  source: testimonialSourceTypeSchema.optional(),
2529
- rating_min: z9.coerce.number().int().min(1).max(5).optional(),
2530
- rating_max: z9.coerce.number().int().min(1).max(5).optional(),
2531
- tags: z9.array(z9.string()).optional(),
2510
+ rating_min: z8.coerce.number().int().min(1).max(5).optional(),
2511
+ rating_max: z8.coerce.number().int().min(1).max(5).optional(),
2512
+ tags: z8.array(z8.string()).optional(),
2532
2513
  status: testimonialStatusSchema.optional(),
2533
2514
  sentiment: testimonialSentimentSchema.optional(),
2534
- language: z9.string().min(2).max(5).optional()
2515
+ language: z8.string().min(2).max(5).optional()
2535
2516
  }).refine(
2536
2517
  (data) => data.rating_min === void 0 || data.rating_max === void 0 || data.rating_min <= data.rating_max,
2537
2518
  { message: "rating_min must be less than or equal to rating_max" }
2538
2519
  );
2539
- var testimonialsSearchResponseSchema = z9.array(testimonialDocSchema);
2540
- var testimonialsOutscraperWebhookResponseSchema = z9.object({
2541
- ok: z9.literal(true),
2542
- note: z9.string().optional()
2520
+ var testimonialsSearchResponseSchema = z8.array(testimonialDocSchema);
2521
+ var testimonialsOutscraperWebhookResponseSchema = z8.object({
2522
+ ok: z8.literal(true),
2523
+ note: z8.string().optional()
2543
2524
  });
2544
2525
 
2545
2526
  // ../api/src/videos.ts
2546
- import { z as z10 } from "zod";
2547
- var videoStatusSchema = z10.enum(["uploading", "uploaded", "processing", "ready", "error"]);
2548
- var videoTranscriptSegmentSchema = z10.object({
2549
- text: z10.string(),
2550
- startSecond: z10.number(),
2551
- endSecond: z10.number()
2552
- });
2553
- var videoSceneSchema = z10.object({
2554
- title: z10.string(),
2555
- description: z10.string(),
2556
- startSecond: z10.number(),
2557
- endSecond: z10.number(),
2558
- thumbnailTime: z10.number()
2559
- });
2560
- var videoDocSchema = z10.object({
2561
- _id: z10.string(),
2562
- _creationTime: z10.number(),
2563
- companyId: z10.string(),
2564
- muxAssetId: z10.string(),
2565
- muxPlaybackId: z10.string(),
2566
- muxUploadId: z10.string(),
2567
- name: z10.string(),
2568
- description: z10.string(),
2569
- tags: z10.array(z10.string()),
2570
- source: z10.string(),
2571
- externalId: z10.string().optional(),
2572
- sourceId: z10.string().optional(),
2573
- width: z10.number().optional(),
2574
- height: z10.number().optional(),
2575
- aspectRatio: z10.number().optional(),
2576
- duration: z10.number().optional(),
2577
- transcript: z10.string().optional(),
2578
- transcriptSegments: z10.array(videoTranscriptSegmentSchema).optional(),
2579
- scenes: z10.array(videoSceneSchema).optional(),
2580
- descriptionEmbedding: z10.array(z10.number()).optional(),
2581
- searchText: z10.string().optional(),
2527
+ import { z as z9 } from "zod";
2528
+ var videoStatusSchema = z9.enum(["uploading", "uploaded", "processing", "ready", "error"]);
2529
+ var videoTranscriptSegmentSchema = z9.object({
2530
+ text: z9.string(),
2531
+ startSecond: z9.number(),
2532
+ endSecond: z9.number()
2533
+ });
2534
+ var videoSceneSchema = z9.object({
2535
+ title: z9.string(),
2536
+ description: z9.string(),
2537
+ startSecond: z9.number(),
2538
+ endSecond: z9.number(),
2539
+ thumbnailTime: z9.number()
2540
+ });
2541
+ var videoDocSchema = z9.object({
2542
+ _id: z9.string(),
2543
+ _creationTime: z9.number(),
2544
+ companyId: z9.string(),
2545
+ muxAssetId: z9.string(),
2546
+ muxPlaybackId: z9.string(),
2547
+ muxUploadId: z9.string(),
2548
+ name: z9.string(),
2549
+ description: z9.string(),
2550
+ tags: z9.array(z9.string()),
2551
+ source: z9.string(),
2552
+ externalId: z9.string().optional(),
2553
+ sourceId: z9.string().optional(),
2554
+ width: z9.number().optional(),
2555
+ height: z9.number().optional(),
2556
+ aspectRatio: z9.number().optional(),
2557
+ duration: z9.number().optional(),
2558
+ transcript: z9.string().optional(),
2559
+ transcriptSegments: z9.array(videoTranscriptSegmentSchema).optional(),
2560
+ scenes: z9.array(videoSceneSchema).optional(),
2561
+ descriptionEmbedding: z9.array(z9.number()).optional(),
2562
+ searchText: z9.string().optional(),
2582
2563
  status: videoStatusSchema,
2583
- errorMessage: z10.string().optional(),
2584
- createdAt: z10.number(),
2585
- updatedAt: z10.number(),
2586
- thumbnailUrl: z10.string()
2587
- });
2588
- var videosWebhookResponseSchema = z10.object({ ok: z10.literal(true) });
2589
- var videosGetRequestSchema = z10.object({ id: z10.string().min(1, "Missing id parameter") });
2590
- var videosSearchRequestSchema = z10.object({
2591
- query: z10.string().min(1),
2592
- limit: z10.coerce.number().int().positive().max(100).optional(),
2593
- tags: z10.array(z10.string()).optional()
2594
- });
2595
- var videoSearchResultSchema = z10.object({
2596
- _id: z10.string(),
2597
- thumbnailUrl: z10.string(),
2598
- name: z10.string(),
2599
- description: z10.string(),
2600
- tags: z10.array(z10.string()),
2601
- status: z10.string(),
2602
- duration: z10.number().optional(),
2603
- muxPlaybackId: z10.string(),
2604
- createdAt: z10.number()
2605
- });
2606
- var videosSearchResponseSchema = z10.array(videoSearchResultSchema);
2607
- var videosUploadResponseSchema = z10.object({ uploadUrl: z10.string(), videoId: z10.string() });
2608
- var videosDeleteRequestSchema = z10.object({ id: z10.string().min(1, "Missing video ID") });
2609
- var videosDeleteResponseSchema = z10.object({ ok: z10.literal(true) });
2564
+ errorMessage: z9.string().optional(),
2565
+ createdAt: z9.number(),
2566
+ updatedAt: z9.number(),
2567
+ thumbnailUrl: z9.string()
2568
+ });
2569
+ var videosWebhookResponseSchema = z9.object({ ok: z9.literal(true) });
2570
+ var videosGetRequestSchema = z9.object({ id: z9.string().min(1, "Missing id parameter") });
2571
+ var videosSearchRequestSchema = z9.object({
2572
+ query: z9.string().min(1),
2573
+ limit: z9.coerce.number().int().positive().max(100).optional(),
2574
+ tags: z9.array(z9.string()).optional()
2575
+ });
2576
+ var videoSearchResultSchema = z9.object({
2577
+ _id: z9.string(),
2578
+ thumbnailUrl: z9.string(),
2579
+ name: z9.string(),
2580
+ description: z9.string(),
2581
+ tags: z9.array(z9.string()),
2582
+ status: z9.string(),
2583
+ duration: z9.number().optional(),
2584
+ muxPlaybackId: z9.string(),
2585
+ createdAt: z9.number()
2586
+ });
2587
+ var videosSearchResponseSchema = z9.array(videoSearchResultSchema);
2588
+ var videosUploadResponseSchema = z9.object({ uploadUrl: z9.string(), videoId: z9.string() });
2589
+ var videosDeleteRequestSchema = z9.object({ id: z9.string().min(1, "Missing video ID") });
2590
+ var videosDeleteResponseSchema = z9.object({ ok: z9.literal(true) });
2610
2591
 
2611
2592
  // src/commands/actions/complete.ts
2612
2593
  import { defineCommand as defineCommand2 } from "citty";
@@ -4419,37 +4400,37 @@ var GEO_TARGET_CONSTANT_REGEX = /^geoTargetConstants\/\d+$/;
4419
4400
  var LANGUAGE_CONSTANT_REGEX = /^languageConstants\/\d+$/;
4420
4401
 
4421
4402
  // ../api/src/ads-google/ops.ts
4422
- import { z as z11 } from "zod";
4423
- var tempRefSchema2 = z11.string().regex(TEMP_REF_REGEX2, "expected a g_temp_* reference");
4424
- var refSchema = z11.union([
4425
- z11.string().regex(RESOURCE_NAME_REGEX, "expected a customers/\u2026/\u2026/\u2026 resource name"),
4426
- z11.string().regex(NUMERIC_ID_REGEX2, "expected a numeric id"),
4403
+ import { z as z10 } from "zod";
4404
+ var tempRefSchema2 = z10.string().regex(TEMP_REF_REGEX2, "expected a g_temp_* reference");
4405
+ var refSchema = z10.union([
4406
+ z10.string().regex(RESOURCE_NAME_REGEX, "expected a customers/\u2026/\u2026/\u2026 resource name"),
4407
+ z10.string().regex(NUMERIC_ID_REGEX2, "expected a numeric id"),
4427
4408
  tempRefSchema2
4428
4409
  ]);
4429
4410
  var targetRefSchema = refSchema;
4430
- var microsSchema = z11.number().int().positive("expected a positive micros amount");
4431
- var httpsUrlSchema2 = z11.string().url().refine((u) => u.startsWith("https://"), "final URLs must be https");
4432
- var customerIdSchema = z11.string().regex(NUMERIC_ID_REGEX2, "customerId must be the bare numeric customer id");
4433
- var stageableStatusSchema2 = z11.enum(STAGEABLE_CREATE_STATUSES2);
4434
- var matchTypeSchema = z11.enum(KEYWORD_MATCH_TYPES);
4435
- var keywordTextSchema = z11.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");
4436
- var budgetCreateSchema = z11.object({
4437
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.budget.nameMax),
4411
+ var microsSchema = z10.number().int().positive("expected a positive micros amount");
4412
+ var httpsUrlSchema2 = z10.string().url().refine((u) => u.startsWith("https://"), "final URLs must be https");
4413
+ var customerIdSchema = z10.string().regex(NUMERIC_ID_REGEX2, "customerId must be the bare numeric customer id");
4414
+ var stageableStatusSchema2 = z10.enum(STAGEABLE_CREATE_STATUSES2);
4415
+ var matchTypeSchema = z10.enum(KEYWORD_MATCH_TYPES);
4416
+ var keywordTextSchema = z10.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");
4417
+ var budgetCreateSchema = z10.object({
4418
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.budget.nameMax),
4438
4419
  amountMicros: microsSchema,
4439
- deliveryMethod: z11.enum(BUDGET_DELIVERY_METHODS).default("STANDARD"),
4440
- explicitlyShared: z11.boolean().default(false)
4420
+ deliveryMethod: z10.enum(BUDGET_DELIVERY_METHODS).default("STANDARD"),
4421
+ explicitlyShared: z10.boolean().default(false)
4441
4422
  });
4442
- var budgetUpdateSchema = z11.object({
4443
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.budget.nameMax).optional(),
4423
+ var budgetUpdateSchema = z10.object({
4424
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.budget.nameMax).optional(),
4444
4425
  amountMicros: microsSchema.optional(),
4445
- deliveryMethod: z11.enum(BUDGET_DELIVERY_METHODS).optional()
4426
+ deliveryMethod: z10.enum(BUDGET_DELIVERY_METHODS).optional()
4446
4427
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4447
- var biddingConfigSchema = z11.object({
4448
- type: z11.enum(BIDDING_STRATEGY_TYPES),
4428
+ var biddingConfigSchema = z10.object({
4429
+ type: z10.enum(BIDDING_STRATEGY_TYPES),
4449
4430
  targetCpaMicros: microsSchema.optional(),
4450
- targetRoas: z11.number().positive().optional(),
4431
+ targetRoas: z10.number().positive().optional(),
4451
4432
  cpcBidCeilingMicros: microsSchema.optional(),
4452
- enhancedCpcEnabled: z11.boolean().optional()
4433
+ enhancedCpcEnabled: z10.boolean().optional()
4453
4434
  }).superRefine((p, ctx) => {
4454
4435
  if (p.type === "TARGET_CPA" && p.targetCpaMicros === void 0) {
4455
4436
  ctx.addIssue({ code: "custom", path: ["targetCpaMicros"], message: "TARGET_CPA needs targetCpaMicros" });
@@ -4458,17 +4439,17 @@ var biddingConfigSchema = z11.object({
4458
4439
  ctx.addIssue({ code: "custom", path: ["targetRoas"], message: "TARGET_ROAS needs targetRoas" });
4459
4440
  }
4460
4441
  });
4461
- var networkSettingsSchema = z11.object({
4462
- targetGoogleSearch: z11.boolean().optional(),
4463
- targetSearchNetwork: z11.boolean().optional(),
4464
- targetContentNetwork: z11.boolean().optional(),
4465
- targetPartnerSearchNetwork: z11.boolean().optional()
4442
+ var networkSettingsSchema = z10.object({
4443
+ targetGoogleSearch: z10.boolean().optional(),
4444
+ targetSearchNetwork: z10.boolean().optional(),
4445
+ targetContentNetwork: z10.boolean().optional(),
4446
+ targetPartnerSearchNetwork: z10.boolean().optional()
4466
4447
  });
4467
- var dateSchema = z11.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected a YYYY-MM-DD date");
4468
- var campaignCreateSchema2 = z11.object({
4469
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.nameMax),
4470
- channelType: z11.enum(ADVERTISING_CHANNEL_TYPES),
4471
- channelSubType: z11.enum(ADVERTISING_CHANNEL_SUB_TYPES).optional(),
4448
+ var dateSchema = z10.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected a YYYY-MM-DD date");
4449
+ var campaignCreateSchema2 = z10.object({
4450
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.nameMax),
4451
+ channelType: z10.enum(ADVERTISING_CHANNEL_TYPES),
4452
+ channelSubType: z10.enum(ADVERTISING_CHANNEL_SUB_TYPES).optional(),
4472
4453
  budget: refSchema,
4473
4454
  /** Inline standard bidding, or a portfolio strategy ref via biddingStrategy. */
4474
4455
  bidding: biddingConfigSchema.optional(),
@@ -4477,7 +4458,7 @@ var campaignCreateSchema2 = z11.object({
4477
4458
  startDate: dateSchema.optional(),
4478
4459
  endDate: dateSchema.optional(),
4479
4460
  /** Advisory Google Ads UI objective — drives warnings, not sent to the API. */
4480
- objective: z11.enum(CAMPAIGN_OBJECTIVES).optional(),
4461
+ objective: z10.enum(CAMPAIGN_OBJECTIVES).optional(),
4481
4462
  status: stageableStatusSchema2.default("PAUSED")
4482
4463
  }).superRefine((p, ctx) => {
4483
4464
  if (!p.bidding && !p.biddingStrategy) {
@@ -4501,129 +4482,129 @@ var campaignCreateSchema2 = z11.object({
4501
4482
  ctx.addIssue({ code: "custom", path: ["endDate"], message: "endDate must be after startDate" });
4502
4483
  }
4503
4484
  });
4504
- var campaignUpdateSchema2 = z11.object({
4505
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.nameMax).optional(),
4485
+ var campaignUpdateSchema2 = z10.object({
4486
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.campaign.nameMax).optional(),
4506
4487
  budget: refSchema.optional(),
4507
4488
  bidding: biddingConfigSchema.optional(),
4508
4489
  networkSettings: networkSettingsSchema.optional(),
4509
4490
  startDate: dateSchema.optional(),
4510
4491
  endDate: dateSchema.optional(),
4511
- status: z11.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4492
+ status: z10.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4512
4493
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4513
- var adGroupCreateSchema = z11.object({
4514
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.adGroup.nameMax),
4494
+ var adGroupCreateSchema = z10.object({
4495
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.adGroup.nameMax),
4515
4496
  campaign: refSchema,
4516
- type: z11.enum(AD_GROUP_TYPES).default("SEARCH_STANDARD"),
4497
+ type: z10.enum(AD_GROUP_TYPES).default("SEARCH_STANDARD"),
4517
4498
  cpcBidMicros: microsSchema.optional(),
4518
4499
  status: stageableStatusSchema2.default("PAUSED")
4519
4500
  });
4520
- var adGroupUpdateSchema = z11.object({
4521
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.adGroup.nameMax).optional(),
4501
+ var adGroupUpdateSchema = z10.object({
4502
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.adGroup.nameMax).optional(),
4522
4503
  cpcBidMicros: microsSchema.optional(),
4523
- status: z11.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4504
+ status: z10.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4524
4505
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4525
- var keywordAddSchema = z11.object({
4506
+ var keywordAddSchema = z10.object({
4526
4507
  adGroup: refSchema,
4527
4508
  text: keywordTextSchema,
4528
4509
  matchType: matchTypeSchema,
4529
4510
  cpcBidMicros: microsSchema.optional(),
4530
- finalUrls: z11.array(httpsUrlSchema2).optional(),
4511
+ finalUrls: z10.array(httpsUrlSchema2).optional(),
4531
4512
  status: stageableStatusSchema2.default("ENABLED")
4532
4513
  });
4533
- var keywordUpdateSchema = z11.object({
4514
+ var keywordUpdateSchema = z10.object({
4534
4515
  cpcBidMicros: microsSchema.optional(),
4535
- finalUrls: z11.array(httpsUrlSchema2).optional(),
4536
- status: z11.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4516
+ finalUrls: z10.array(httpsUrlSchema2).optional(),
4517
+ status: z10.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4537
4518
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4538
- var negativeKeywordAddSchema = z11.object({
4539
- level: z11.enum(["adGroup", "campaign"]),
4519
+ var negativeKeywordAddSchema = z10.object({
4520
+ level: z10.enum(["adGroup", "campaign"]),
4540
4521
  parent: refSchema,
4541
4522
  text: keywordTextSchema,
4542
4523
  matchType: matchTypeSchema
4543
4524
  });
4544
- var sharedSetCreateSchema = z11.object({
4545
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.sharedSet.nameMax),
4546
- type: z11.enum(SHARED_SET_TYPES).default("NEGATIVE_KEYWORDS")
4525
+ var sharedSetCreateSchema = z10.object({
4526
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.sharedSet.nameMax),
4527
+ type: z10.enum(SHARED_SET_TYPES).default("NEGATIVE_KEYWORDS")
4547
4528
  });
4548
- var sharedSetMemberAddSchema = z11.object({
4529
+ var sharedSetMemberAddSchema = z10.object({
4549
4530
  sharedSet: refSchema,
4550
4531
  text: keywordTextSchema,
4551
4532
  matchType: matchTypeSchema
4552
4533
  });
4553
- var campaignSharedSetAttachSchema = z11.object({
4534
+ var campaignSharedSetAttachSchema = z10.object({
4554
4535
  campaign: refSchema,
4555
4536
  sharedSet: refSchema
4556
4537
  });
4557
- var adTextAssetSchema = z11.object({
4558
- text: z11.string().min(1),
4559
- pinnedField: z11.enum(PINNED_FIELDS).optional()
4538
+ var adTextAssetSchema = z10.object({
4539
+ text: z10.string().min(1),
4540
+ pinnedField: z10.enum(PINNED_FIELDS).optional()
4560
4541
  });
4561
- var responsiveSearchAdSchema = z11.object({
4562
- format: z11.literal("responsiveSearch"),
4563
- headlines: z11.array(
4542
+ var responsiveSearchAdSchema = z10.object({
4543
+ format: z10.literal("responsiveSearch"),
4544
+ headlines: z10.array(
4564
4545
  adTextAssetSchema.refine(
4565
4546
  (a) => a.text.length <= GOOGLE_ADS_LIMITS.responsiveSearchAd.headlineTextMax,
4566
4547
  "headline exceeds 30 chars"
4567
4548
  )
4568
4549
  ).min(GOOGLE_ADS_LIMITS.responsiveSearchAd.headlinesMin).max(GOOGLE_ADS_LIMITS.responsiveSearchAd.headlinesMax),
4569
- descriptions: z11.array(
4550
+ descriptions: z10.array(
4570
4551
  adTextAssetSchema.refine(
4571
4552
  (a) => a.text.length <= GOOGLE_ADS_LIMITS.responsiveSearchAd.descriptionTextMax,
4572
4553
  "description exceeds 90 chars"
4573
4554
  )
4574
4555
  ).min(GOOGLE_ADS_LIMITS.responsiveSearchAd.descriptionsMin).max(GOOGLE_ADS_LIMITS.responsiveSearchAd.descriptionsMax),
4575
- path1: z11.string().max(GOOGLE_ADS_LIMITS.responsiveSearchAd.pathMax).optional(),
4576
- path2: z11.string().max(GOOGLE_ADS_LIMITS.responsiveSearchAd.pathMax).optional(),
4577
- finalUrls: z11.array(httpsUrlSchema2).min(1)
4578
- });
4579
- var responsiveDisplayAdSchema = z11.object({
4580
- format: z11.literal("responsiveDisplay"),
4581
- headlines: z11.array(z11.object({ text: z11.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.headlineTextMax) })).min(1).max(5),
4582
- longHeadline: z11.object({ text: z11.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.longHeadlineTextMax) }),
4583
- descriptions: z11.array(z11.object({ text: z11.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.descriptionTextMax) })).min(1).max(5),
4584
- businessName: z11.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.businessNameMax),
4556
+ path1: z10.string().max(GOOGLE_ADS_LIMITS.responsiveSearchAd.pathMax).optional(),
4557
+ path2: z10.string().max(GOOGLE_ADS_LIMITS.responsiveSearchAd.pathMax).optional(),
4558
+ finalUrls: z10.array(httpsUrlSchema2).min(1)
4559
+ });
4560
+ var responsiveDisplayAdSchema = z10.object({
4561
+ format: z10.literal("responsiveDisplay"),
4562
+ headlines: z10.array(z10.object({ text: z10.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.headlineTextMax) })).min(1).max(5),
4563
+ longHeadline: z10.object({ text: z10.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.longHeadlineTextMax) }),
4564
+ descriptions: z10.array(z10.object({ text: z10.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.descriptionTextMax) })).min(1).max(5),
4565
+ businessName: z10.string().min(1).max(GOOGLE_ADS_LIMITS.responsiveDisplayAd.businessNameMax),
4585
4566
  // A Responsive Display Ad's images are fields on the ad's own content (never campaign-level
4586
4567
  // asset links). Google requires ≥1 landscape marketing image (1.91:1) AND ≥1 square marketing
4587
4568
  // image (1:1) to serve; the logo images are optional.
4588
- marketingImageAssets: z11.array(refSchema).optional(),
4589
- squareMarketingImageAssets: z11.array(refSchema).optional(),
4590
- logoImageAssets: z11.array(refSchema).optional(),
4591
- finalUrls: z11.array(httpsUrlSchema2).min(1)
4592
- });
4593
- var callAdSchema = z11.object({
4594
- format: z11.literal("call"),
4595
- countryCode: z11.string().length(2),
4596
- phoneNumber: z11.string().min(3),
4597
- headline1: z11.string().min(1).max(30),
4598
- headline2: z11.string().min(1).max(30),
4599
- description1: z11.string().min(1).max(90),
4600
- description2: z11.string().min(1).max(90),
4601
- businessName: z11.string().min(1).max(25),
4602
- finalUrls: z11.array(httpsUrlSchema2).min(1)
4603
- });
4604
- var appAdSchema = z11.object({
4605
- format: z11.literal("app"),
4606
- headlines: z11.array(z11.object({ text: z11.string().min(1).max(30) })).min(1),
4607
- descriptions: z11.array(z11.object({ text: z11.string().min(1).max(90) })).min(1)
4608
- });
4609
- var videoAdSchema = z11.object({
4610
- format: z11.literal("video"),
4569
+ marketingImageAssets: z10.array(refSchema).optional(),
4570
+ squareMarketingImageAssets: z10.array(refSchema).optional(),
4571
+ logoImageAssets: z10.array(refSchema).optional(),
4572
+ finalUrls: z10.array(httpsUrlSchema2).min(1)
4573
+ });
4574
+ var callAdSchema = z10.object({
4575
+ format: z10.literal("call"),
4576
+ countryCode: z10.string().length(2),
4577
+ phoneNumber: z10.string().min(3),
4578
+ headline1: z10.string().min(1).max(30),
4579
+ headline2: z10.string().min(1).max(30),
4580
+ description1: z10.string().min(1).max(90),
4581
+ description2: z10.string().min(1).max(90),
4582
+ businessName: z10.string().min(1).max(25),
4583
+ finalUrls: z10.array(httpsUrlSchema2).min(1)
4584
+ });
4585
+ var appAdSchema = z10.object({
4586
+ format: z10.literal("app"),
4587
+ headlines: z10.array(z10.object({ text: z10.string().min(1).max(30) })).min(1),
4588
+ descriptions: z10.array(z10.object({ text: z10.string().min(1).max(90) })).min(1)
4589
+ });
4590
+ var videoAdSchema = z10.object({
4591
+ format: z10.literal("video"),
4611
4592
  // A raw YouTube id is not a publishable Google Ads reference — the video must be staged as
4612
4593
  // its own `google.asset.create` (type: youtubeVideo) first, then referenced here by asset ref.
4613
- videoAssets: z11.array(refSchema).min(1),
4614
- finalUrls: z11.array(httpsUrlSchema2).min(1)
4615
- });
4616
- var demandGenAdSchema = z11.object({
4617
- format: z11.literal("demandGen"),
4618
- headlines: z11.array(z11.object({ text: z11.string().min(1).max(40) })).min(1).max(5),
4619
- descriptions: z11.array(z11.object({ text: z11.string().min(1).max(90) })).min(1).max(5),
4620
- businessName: z11.string().min(1).max(25),
4621
- finalUrls: z11.array(httpsUrlSchema2).min(1),
4622
- imageAssets: z11.array(refSchema).optional(),
4623
- squareImageAssets: z11.array(refSchema).optional(),
4624
- logoImageAssets: z11.array(refSchema).optional()
4625
- });
4626
- var adContentSchema = z11.discriminatedUnion("format", [
4594
+ videoAssets: z10.array(refSchema).min(1),
4595
+ finalUrls: z10.array(httpsUrlSchema2).min(1)
4596
+ });
4597
+ var demandGenAdSchema = z10.object({
4598
+ format: z10.literal("demandGen"),
4599
+ headlines: z10.array(z10.object({ text: z10.string().min(1).max(40) })).min(1).max(5),
4600
+ descriptions: z10.array(z10.object({ text: z10.string().min(1).max(90) })).min(1).max(5),
4601
+ businessName: z10.string().min(1).max(25),
4602
+ finalUrls: z10.array(httpsUrlSchema2).min(1),
4603
+ imageAssets: z10.array(refSchema).optional(),
4604
+ squareImageAssets: z10.array(refSchema).optional(),
4605
+ logoImageAssets: z10.array(refSchema).optional()
4606
+ });
4607
+ var adContentSchema = z10.discriminatedUnion("format", [
4627
4608
  responsiveSearchAdSchema,
4628
4609
  responsiveDisplayAdSchema,
4629
4610
  callAdSchema,
@@ -4631,45 +4612,45 @@ var adContentSchema = z11.discriminatedUnion("format", [
4631
4612
  videoAdSchema,
4632
4613
  demandGenAdSchema
4633
4614
  ]);
4634
- var adCreateSchema = z11.object({
4615
+ var adCreateSchema = z10.object({
4635
4616
  adGroup: refSchema,
4636
4617
  status: stageableStatusSchema2.default("PAUSED"),
4637
4618
  content: adContentSchema
4638
4619
  });
4639
- var adUpdateSchema = z11.object({
4640
- status: z11.enum(["ENABLED", "PAUSED", "REMOVED"]).optional(),
4620
+ var adUpdateSchema = z10.object({
4621
+ status: z10.enum(["ENABLED", "PAUSED", "REMOVED"]).optional(),
4641
4622
  /** Whole-content replacement for RSA-like formats; re-validated against adContentSchema. */
4642
- content: z11.record(z11.string(), z11.unknown()).optional()
4623
+ content: z10.record(z10.string(), z10.unknown()).optional()
4643
4624
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4644
- var textAssetSchema = z11.object({ type: z11.literal("text"), text: z11.string().min(1) });
4645
- var imageAssetSchema = z11.object({
4646
- type: z11.literal("image"),
4647
- imageId: z11.string().min(1),
4648
- name: z11.string().optional()
4649
- });
4650
- var youtubeVideoAssetSchema = z11.object({
4651
- type: z11.literal("youtubeVideo"),
4652
- youtubeVideoId: z11.string().min(1),
4653
- name: z11.string().optional()
4654
- });
4655
- var sitelinkAssetSchema = z11.object({
4656
- type: z11.literal("sitelink"),
4657
- linkText: z11.string().min(1).max(GOOGLE_ADS_LIMITS.asset.sitelinkLinkTextMax),
4658
- description1: z11.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4659
- description2: z11.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4660
- finalUrls: z11.array(httpsUrlSchema2).min(1)
4661
- });
4662
- var calloutAssetSchema = z11.object({
4663
- type: z11.literal("callout"),
4664
- calloutText: z11.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax)
4665
- });
4666
- var structuredSnippetAssetSchema = z11.object({
4667
- type: z11.literal("structuredSnippet"),
4668
- header: z11.string().min(1).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetHeaderMax),
4669
- values: z11.array(z11.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax)
4670
- });
4671
- var callToActionAssetSchema = z11.object({ type: z11.literal("callToAction"), callToAction: z11.string().min(1) });
4672
- var assetCreateSchema = z11.discriminatedUnion("type", [
4625
+ var textAssetSchema = z10.object({ type: z10.literal("text"), text: z10.string().min(1) });
4626
+ var imageAssetSchema = z10.object({
4627
+ type: z10.literal("image"),
4628
+ imageId: z10.string().min(1),
4629
+ name: z10.string().optional()
4630
+ });
4631
+ var youtubeVideoAssetSchema = z10.object({
4632
+ type: z10.literal("youtubeVideo"),
4633
+ youtubeVideoId: z10.string().min(1),
4634
+ name: z10.string().optional()
4635
+ });
4636
+ var sitelinkAssetSchema = z10.object({
4637
+ type: z10.literal("sitelink"),
4638
+ linkText: z10.string().min(1).max(GOOGLE_ADS_LIMITS.asset.sitelinkLinkTextMax),
4639
+ description1: z10.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4640
+ description2: z10.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4641
+ finalUrls: z10.array(httpsUrlSchema2).min(1)
4642
+ });
4643
+ var calloutAssetSchema = z10.object({
4644
+ type: z10.literal("callout"),
4645
+ calloutText: z10.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax)
4646
+ });
4647
+ var structuredSnippetAssetSchema = z10.object({
4648
+ type: z10.literal("structuredSnippet"),
4649
+ header: z10.string().min(1).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetHeaderMax),
4650
+ values: z10.array(z10.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax)
4651
+ });
4652
+ var callToActionAssetSchema = z10.object({ type: z10.literal("callToAction"), callToAction: z10.string().min(1) });
4653
+ var assetCreateSchema = z10.discriminatedUnion("type", [
4673
4654
  textAssetSchema,
4674
4655
  imageAssetSchema,
4675
4656
  youtubeVideoAssetSchema,
@@ -4678,136 +4659,136 @@ var assetCreateSchema = z11.discriminatedUnion("type", [
4678
4659
  structuredSnippetAssetSchema,
4679
4660
  callToActionAssetSchema
4680
4661
  ]);
4681
- var assetUpdateSchema = z11.object({
4682
- name: z11.string().min(1).optional(),
4683
- linkText: z11.string().min(1).max(GOOGLE_ADS_LIMITS.asset.sitelinkLinkTextMax).optional(),
4684
- description1: z11.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4685
- description2: z11.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4686
- finalUrls: z11.array(httpsUrlSchema2).min(1).optional(),
4687
- calloutText: z11.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax).optional(),
4688
- header: z11.string().min(1).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetHeaderMax).optional(),
4689
- values: z11.array(z11.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax).optional(),
4690
- callToAction: z11.string().min(1).optional(),
4691
- text: z11.string().min(1).optional()
4662
+ var assetUpdateSchema = z10.object({
4663
+ name: z10.string().min(1).optional(),
4664
+ linkText: z10.string().min(1).max(GOOGLE_ADS_LIMITS.asset.sitelinkLinkTextMax).optional(),
4665
+ description1: z10.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4666
+ description2: z10.string().max(GOOGLE_ADS_LIMITS.asset.sitelinkDescriptionMax).optional(),
4667
+ finalUrls: z10.array(httpsUrlSchema2).min(1).optional(),
4668
+ calloutText: z10.string().min(1).max(GOOGLE_ADS_LIMITS.asset.calloutTextMax).optional(),
4669
+ header: z10.string().min(1).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetHeaderMax).optional(),
4670
+ values: z10.array(z10.string().min(1)).min(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMin).max(GOOGLE_ADS_LIMITS.asset.structuredSnippetValuesMax).optional(),
4671
+ callToAction: z10.string().min(1).optional(),
4672
+ text: z10.string().min(1).optional()
4692
4673
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4693
- var assetLinkAttachSchema = z11.object({
4694
- level: z11.enum(["campaign", "adGroup", "customer"]),
4674
+ var assetLinkAttachSchema = z10.object({
4675
+ level: z10.enum(["campaign", "adGroup", "customer"]),
4695
4676
  parent: refSchema.optional(),
4696
4677
  asset: refSchema,
4697
- fieldType: z11.enum(ASSET_FIELD_TYPES)
4678
+ fieldType: z10.enum(ASSET_FIELD_TYPES)
4698
4679
  }).superRefine((value, ctx) => {
4699
4680
  if (value.level !== "customer" && !value.parent) {
4700
4681
  ctx.addIssue({
4701
- code: z11.ZodIssueCode.custom,
4682
+ code: z10.ZodIssueCode.custom,
4702
4683
  path: ["parent"],
4703
4684
  message: `parent is required for a ${value.level}-level asset link (--parent-ref)`
4704
4685
  });
4705
4686
  }
4706
4687
  });
4707
- var assetGroupCreateSchema = z11.object({
4688
+ var assetGroupCreateSchema = z10.object({
4708
4689
  campaign: refSchema,
4709
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.nameMax),
4710
- finalUrls: z11.array(httpsUrlSchema2).min(1),
4711
- headlines: z11.array(z11.object({ text: z11.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.headlineTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.headlinesMin).max(GOOGLE_ADS_LIMITS.assetGroup.headlinesMax),
4712
- longHeadlines: z11.array(z11.object({ text: z11.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.longHeadlineTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.longHeadlinesMin).max(GOOGLE_ADS_LIMITS.assetGroup.longHeadlinesMax),
4713
- descriptions: z11.array(z11.object({ text: z11.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.descriptionTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.descriptionsMin).max(GOOGLE_ADS_LIMITS.assetGroup.descriptionsMax),
4714
- businessName: z11.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.businessNameMax),
4715
- imageAssets: z11.array(refSchema).optional(),
4716
- squareImageAssets: z11.array(refSchema).optional(),
4717
- logoAssets: z11.array(refSchema).optional(),
4718
- status: z11.enum(["ENABLED", "PAUSED"]).default("PAUSED")
4719
- });
4720
- var assetGroupUpdateSchema = z11.object({
4721
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.nameMax).optional(),
4722
- finalUrls: z11.array(httpsUrlSchema2).min(1).optional(),
4723
- status: z11.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4690
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.nameMax),
4691
+ finalUrls: z10.array(httpsUrlSchema2).min(1),
4692
+ headlines: z10.array(z10.object({ text: z10.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.headlineTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.headlinesMin).max(GOOGLE_ADS_LIMITS.assetGroup.headlinesMax),
4693
+ longHeadlines: z10.array(z10.object({ text: z10.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.longHeadlineTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.longHeadlinesMin).max(GOOGLE_ADS_LIMITS.assetGroup.longHeadlinesMax),
4694
+ descriptions: z10.array(z10.object({ text: z10.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.descriptionTextMax) })).min(GOOGLE_ADS_LIMITS.assetGroup.descriptionsMin).max(GOOGLE_ADS_LIMITS.assetGroup.descriptionsMax),
4695
+ businessName: z10.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.businessNameMax),
4696
+ imageAssets: z10.array(refSchema).optional(),
4697
+ squareImageAssets: z10.array(refSchema).optional(),
4698
+ logoAssets: z10.array(refSchema).optional(),
4699
+ status: z10.enum(["ENABLED", "PAUSED"]).default("PAUSED")
4700
+ });
4701
+ var assetGroupUpdateSchema = z10.object({
4702
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.assetGroup.nameMax).optional(),
4703
+ finalUrls: z10.array(httpsUrlSchema2).min(1).optional(),
4704
+ status: z10.enum(["ENABLED", "PAUSED", "REMOVED"]).optional()
4724
4705
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4725
- var audienceCreateSchema2 = z11.object({
4726
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.audience.nameMax),
4727
- type: z11.enum(USER_LIST_TYPES).default("BASIC"),
4728
- description: z11.string().optional(),
4706
+ var audienceCreateSchema2 = z10.object({
4707
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.audience.nameMax),
4708
+ type: z10.enum(USER_LIST_TYPES).default("BASIC"),
4709
+ description: z10.string().optional(),
4729
4710
  /** Customer-match members (crm-based) — file-first for large lists. */
4730
- members: z11.array(z11.record(z11.string(), z11.string())).optional(),
4731
- sourceFileRef: z11.string().optional()
4711
+ members: z10.array(z10.record(z10.string(), z10.string())).optional(),
4712
+ sourceFileRef: z10.string().optional()
4732
4713
  });
4733
- var audienceCriterionAttachSchema = z11.object({
4734
- level: z11.enum(["campaign", "adGroup"]),
4714
+ var audienceCriterionAttachSchema = z10.object({
4715
+ level: z10.enum(["campaign", "adGroup"]),
4735
4716
  parent: refSchema,
4736
4717
  userList: refSchema,
4737
- negative: z11.boolean().default(false)
4718
+ negative: z10.boolean().default(false)
4738
4719
  });
4739
- var conversionActionCreateSchema = z11.object({
4740
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.conversionAction.nameMax),
4741
- type: z11.enum(CONVERSION_ACTION_TYPES).default("WEBPAGE"),
4742
- category: z11.enum(CONVERSION_ACTION_CATEGORIES).default("DEFAULT"),
4743
- countingType: z11.enum(CONVERSION_COUNTING_TYPES).default("ONE_PER_CLICK"),
4720
+ var conversionActionCreateSchema = z10.object({
4721
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.conversionAction.nameMax),
4722
+ type: z10.enum(CONVERSION_ACTION_TYPES).default("WEBPAGE"),
4723
+ category: z10.enum(CONVERSION_ACTION_CATEGORIES).default("DEFAULT"),
4724
+ countingType: z10.enum(CONVERSION_COUNTING_TYPES).default("ONE_PER_CLICK"),
4744
4725
  defaultValueMicros: microsSchema.optional(),
4745
- defaultCurrencyCode: z11.string().length(3).optional(),
4746
- clickThroughLookbackWindowDays: z11.number().int().positive().optional(),
4747
- viewThroughLookbackWindowDays: z11.number().int().positive().optional(),
4748
- status: z11.enum(["ENABLED", "PAUSED"]).default("ENABLED")
4749
- });
4750
- var conversionActionUpdateSchema = z11.object({
4751
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.conversionAction.nameMax).optional(),
4752
- category: z11.enum(CONVERSION_ACTION_CATEGORIES).optional(),
4753
- countingType: z11.enum(CONVERSION_COUNTING_TYPES).optional(),
4726
+ defaultCurrencyCode: z10.string().length(3).optional(),
4727
+ clickThroughLookbackWindowDays: z10.number().int().positive().optional(),
4728
+ viewThroughLookbackWindowDays: z10.number().int().positive().optional(),
4729
+ status: z10.enum(["ENABLED", "PAUSED"]).default("ENABLED")
4730
+ });
4731
+ var conversionActionUpdateSchema = z10.object({
4732
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.conversionAction.nameMax).optional(),
4733
+ category: z10.enum(CONVERSION_ACTION_CATEGORIES).optional(),
4734
+ countingType: z10.enum(CONVERSION_COUNTING_TYPES).optional(),
4754
4735
  defaultValueMicros: microsSchema.optional(),
4755
- defaultCurrencyCode: z11.string().length(3).optional(),
4756
- clickThroughLookbackWindowDays: z11.number().int().positive().optional(),
4757
- viewThroughLookbackWindowDays: z11.number().int().positive().optional(),
4758
- status: z11.enum(["ENABLED", "REMOVED", "HIDDEN"]).optional()
4736
+ defaultCurrencyCode: z10.string().length(3).optional(),
4737
+ clickThroughLookbackWindowDays: z10.number().int().positive().optional(),
4738
+ viewThroughLookbackWindowDays: z10.number().int().positive().optional(),
4739
+ status: z10.enum(["ENABLED", "REMOVED", "HIDDEN"]).optional()
4759
4740
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4760
- var biddingStrategyCreateSchema = z11.object({
4761
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.biddingStrategy.nameMax),
4741
+ var biddingStrategyCreateSchema = z10.object({
4742
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.biddingStrategy.nameMax),
4762
4743
  config: biddingConfigSchema
4763
4744
  }).superRefine((p, ctx) => {
4764
4745
  if (p.config.type === "MANUAL_CPC") {
4765
4746
  ctx.addIssue({ code: "custom", path: ["config", "type"], message: "portfolio strategies cannot be Manual CPC" });
4766
4747
  }
4767
4748
  });
4768
- var biddingStrategyUpdateSchema = z11.object({
4769
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.biddingStrategy.nameMax).optional(),
4749
+ var biddingStrategyUpdateSchema = z10.object({
4750
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.biddingStrategy.nameMax).optional(),
4770
4751
  config: biddingConfigSchema.optional()
4771
4752
  }).refine((p) => Object.values(p).some((v) => v !== void 0), "update needs at least one field");
4772
- var labelCreateSchema = z11.object({
4773
- name: z11.string().min(1).max(GOOGLE_ADS_LIMITS.label.nameMax),
4774
- backgroundColor: z11.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
4775
- description: z11.string().optional()
4753
+ var labelCreateSchema = z10.object({
4754
+ name: z10.string().min(1).max(GOOGLE_ADS_LIMITS.label.nameMax),
4755
+ backgroundColor: z10.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
4756
+ description: z10.string().optional()
4776
4757
  });
4777
- var labelAttachSchema = z11.object({
4778
- level: z11.enum(["campaign", "adGroup", "ad"]),
4758
+ var labelAttachSchema = z10.object({
4759
+ level: z10.enum(["campaign", "adGroup", "ad"]),
4779
4760
  parent: refSchema,
4780
4761
  label: refSchema
4781
4762
  });
4782
- var locationCriterionSchema = z11.object({
4783
- criterionType: z11.literal("location"),
4784
- geoTargetConstant: z11.union([z11.string().regex(GEO_TARGET_CONSTANT_REGEX), z11.string().regex(NUMERIC_ID_REGEX2)])
4785
- });
4786
- var languageCriterionSchema = z11.object({
4787
- criterionType: z11.literal("language"),
4788
- languageConstant: z11.union([z11.string().regex(LANGUAGE_CONSTANT_REGEX), z11.string().regex(NUMERIC_ID_REGEX2)])
4789
- });
4790
- var adScheduleCriterionSchema = z11.object({
4791
- criterionType: z11.literal("adSchedule"),
4792
- dayOfWeek: z11.enum(DAYS_OF_WEEK),
4793
- startHour: z11.number().int().min(0).max(23),
4794
- startMinute: z11.enum(["ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).default("ZERO"),
4795
- endHour: z11.number().int().min(0).max(24),
4796
- endMinute: z11.enum(["ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).default("ZERO")
4797
- });
4798
- var deviceCriterionSchema = z11.object({
4799
- criterionType: z11.literal("device"),
4800
- device: z11.enum(DEVICE_TYPES),
4763
+ var locationCriterionSchema = z10.object({
4764
+ criterionType: z10.literal("location"),
4765
+ geoTargetConstant: z10.union([z10.string().regex(GEO_TARGET_CONSTANT_REGEX), z10.string().regex(NUMERIC_ID_REGEX2)])
4766
+ });
4767
+ var languageCriterionSchema = z10.object({
4768
+ criterionType: z10.literal("language"),
4769
+ languageConstant: z10.union([z10.string().regex(LANGUAGE_CONSTANT_REGEX), z10.string().regex(NUMERIC_ID_REGEX2)])
4770
+ });
4771
+ var adScheduleCriterionSchema = z10.object({
4772
+ criterionType: z10.literal("adSchedule"),
4773
+ dayOfWeek: z10.enum(DAYS_OF_WEEK),
4774
+ startHour: z10.number().int().min(0).max(23),
4775
+ startMinute: z10.enum(["ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).default("ZERO"),
4776
+ endHour: z10.number().int().min(0).max(24),
4777
+ endMinute: z10.enum(["ZERO", "FIFTEEN", "THIRTY", "FORTY_FIVE"]).default("ZERO")
4778
+ });
4779
+ var deviceCriterionSchema = z10.object({
4780
+ criterionType: z10.literal("device"),
4781
+ device: z10.enum(DEVICE_TYPES),
4801
4782
  // Google's `CampaignCriterion.bid_modifier`: "The modifier must be in the range 0.1 - 10.0. Use 0
4802
4783
  // 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.
4803
- bidModifier: z11.number().min(0).max(10).optional().refine((v) => v === void 0 || v === 0 || v >= 0.1, {
4784
+ bidModifier: z10.number().min(0).max(10).optional().refine((v) => v === void 0 || v === 0 || v >= 0.1, {
4804
4785
  message: "bid modifier must be 0 (exclude the device) or between 0.1 and 10.0"
4805
4786
  })
4806
4787
  });
4807
- var campaignCriterionAddSchema = z11.object({
4788
+ var campaignCriterionAddSchema = z10.object({
4808
4789
  campaign: refSchema,
4809
- negative: z11.boolean().default(false),
4810
- criterion: z11.discriminatedUnion("criterionType", [
4790
+ negative: z10.boolean().default(false),
4791
+ criterion: z10.discriminatedUnion("criterionType", [
4811
4792
  locationCriterionSchema,
4812
4793
  languageCriterionSchema,
4813
4794
  adScheduleCriterionSchema,
@@ -4817,7 +4798,7 @@ var campaignCriterionAddSchema = z11.object({
4817
4798
  const c = val.criterion;
4818
4799
  if (c.criterionType === "adSchedule" && c.endHour === 24 && c.endMinute !== "ZERO") {
4819
4800
  ctx.addIssue({
4820
- code: z11.ZodIssueCode.custom,
4801
+ code: z10.ZodIssueCode.custom,
4821
4802
  message: "endHour 24 (midnight) cannot have a non-zero endMinute",
4822
4803
  path: ["criterion", "endMinute"]
4823
4804
  });
@@ -4869,17 +4850,17 @@ var GOOGLE_DRAFT_OP_KINDS = [
4869
4850
  "google.campaignCriterion.add",
4870
4851
  "google.campaignCriterion.remove"
4871
4852
  ];
4872
- var googleDraftOpKindSchema = z11.enum(GOOGLE_DRAFT_OP_KINDS);
4853
+ var googleDraftOpKindSchema = z10.enum(GOOGLE_DRAFT_OP_KINDS);
4873
4854
  function createOp2(kind, payload) {
4874
- return z11.object({ kind: z11.literal(kind), customerId: customerIdSchema, payload });
4855
+ return z10.object({ kind: z10.literal(kind), customerId: customerIdSchema, payload });
4875
4856
  }
4876
4857
  function updateOp2(kind, payload) {
4877
- return z11.object({ kind: z11.literal(kind), customerId: customerIdSchema, target: targetRefSchema, payload });
4858
+ return z10.object({ kind: z10.literal(kind), customerId: customerIdSchema, target: targetRefSchema, payload });
4878
4859
  }
4879
4860
  function targetOp(kind) {
4880
- return z11.object({ kind: z11.literal(kind), customerId: customerIdSchema, target: targetRefSchema });
4861
+ return z10.object({ kind: z10.literal(kind), customerId: customerIdSchema, target: targetRefSchema });
4881
4862
  }
4882
- var googleDraftOpInputSchema = z11.discriminatedUnion("kind", [
4863
+ var googleDraftOpInputSchema = z10.discriminatedUnion("kind", [
4883
4864
  createOp2("google.budget.create", budgetCreateSchema),
4884
4865
  updateOp2("google.budget.update", budgetUpdateSchema),
4885
4866
  createOp2("google.campaign.create", campaignCreateSchema2),
@@ -4927,132 +4908,132 @@ var googleDraftOpInputSchema = z11.discriminatedUnion("kind", [
4927
4908
  ]);
4928
4909
 
4929
4910
  // ../api/src/ads-google/wire.ts
4930
- import { z as z12 } from "zod";
4931
- var googleWriteModeSchema = z12.enum(["live", "simulated"]);
4932
- var googleDraftOpResultSchema = z12.object({
4933
- status: z12.enum(["applied", "simulated", "failed", "skipped"]),
4934
- resourceName: z12.string().optional(),
4935
- error: z12.string().optional(),
4936
- skippedBecause: z12.string().optional(),
4937
- executedAt: z12.number().optional()
4938
- });
4939
- var googleDraftStageRequestSchema = z12.object({
4940
- chatId: z12.string(),
4911
+ import { z as z11 } from "zod";
4912
+ var googleWriteModeSchema = z11.enum(["live", "simulated"]);
4913
+ var googleDraftOpResultSchema = z11.object({
4914
+ status: z11.enum(["applied", "simulated", "failed", "skipped"]),
4915
+ resourceName: z11.string().optional(),
4916
+ error: z11.string().optional(),
4917
+ skippedBecause: z11.string().optional(),
4918
+ executedAt: z11.number().optional()
4919
+ });
4920
+ var googleDraftStageRequestSchema = z11.object({
4921
+ chatId: z11.string(),
4941
4922
  op: googleDraftOpInputSchema
4942
4923
  });
4943
- var googleDraftStageResponseSchema = z12.object({
4944
- staged: z12.literal(true),
4945
- ref: z12.string(),
4924
+ var googleDraftStageResponseSchema = z11.object({
4925
+ staged: z11.literal(true),
4926
+ ref: z11.string(),
4946
4927
  kind: googleDraftOpKindSchema,
4947
4928
  mode: googleWriteModeSchema,
4948
- dependsOn: z12.array(z12.string()),
4949
- summary: z12.string(),
4950
- warnings: z12.array(z12.string()),
4929
+ dependsOn: z11.array(z11.string()),
4930
+ summary: z11.string(),
4931
+ warnings: z11.array(z11.string()),
4951
4932
  /** True when the op amended an already-staged op in place instead of appending a new one. */
4952
- amended: z12.boolean().optional()
4933
+ amended: z11.boolean().optional()
4953
4934
  });
4954
- var googleDraftAmendRequestSchema = z12.object({
4955
- chatId: z12.string(),
4956
- ref: z12.string(),
4957
- patch: z12.record(z12.string(), z12.unknown())
4935
+ var googleDraftAmendRequestSchema = z11.object({
4936
+ chatId: z11.string(),
4937
+ ref: z11.string(),
4938
+ patch: z11.record(z11.string(), z11.unknown())
4958
4939
  });
4959
- var googleDraftShowRequestSchema = z12.object({
4960
- chatId: z12.string(),
4961
- ref: z12.string()
4940
+ var googleDraftShowRequestSchema = z11.object({
4941
+ chatId: z11.string(),
4942
+ ref: z11.string()
4962
4943
  });
4963
4944
  var GOOGLE_DRAFT_BATCH_MAX = 500;
4964
- var googleDraftStageBatchRequestSchema = z12.object({
4965
- chatId: z12.string(),
4966
- ops: z12.array(googleDraftOpInputSchema).min(1).max(GOOGLE_DRAFT_BATCH_MAX)
4945
+ var googleDraftStageBatchRequestSchema = z11.object({
4946
+ chatId: z11.string(),
4947
+ ops: z11.array(googleDraftOpInputSchema).min(1).max(GOOGLE_DRAFT_BATCH_MAX)
4967
4948
  });
4968
- var googleDraftStageBatchResponseSchema = z12.object({
4969
- staged: z12.literal(true),
4949
+ var googleDraftStageBatchResponseSchema = z11.object({
4950
+ staged: z11.literal(true),
4970
4951
  mode: googleWriteModeSchema,
4971
- count: z12.number(),
4972
- ops: z12.array(
4973
- z12.object({
4974
- ref: z12.string(),
4952
+ count: z11.number(),
4953
+ ops: z11.array(
4954
+ z11.object({
4955
+ ref: z11.string(),
4975
4956
  kind: googleDraftOpKindSchema,
4976
- dependsOn: z12.array(z12.string()),
4977
- summary: z12.string(),
4978
- warnings: z12.array(z12.string())
4957
+ dependsOn: z11.array(z11.string()),
4958
+ summary: z11.string(),
4959
+ warnings: z11.array(z11.string())
4979
4960
  })
4980
4961
  )
4981
4962
  });
4982
- var googleDraftOpViewSchema = z12.object({
4983
- ref: z12.string(),
4963
+ var googleDraftOpViewSchema = z11.object({
4964
+ ref: z11.string(),
4984
4965
  kind: googleDraftOpKindSchema,
4985
- customerId: z12.string(),
4986
- target: z12.string().optional(),
4987
- dependsOn: z12.array(z12.string()),
4988
- summary: z12.string(),
4989
- stagedAt: z12.number(),
4966
+ customerId: z11.string(),
4967
+ target: z11.string().optional(),
4968
+ dependsOn: z11.array(z11.string()),
4969
+ summary: z11.string(),
4970
+ stagedAt: z11.number(),
4990
4971
  result: googleDraftOpResultSchema.optional()
4991
4972
  });
4992
- var googleDraftShowResponseSchema = z12.object({
4973
+ var googleDraftShowResponseSchema = z11.object({
4993
4974
  op: googleDraftOpViewSchema.extend({
4994
- payload: z12.unknown().optional(),
4995
- warnings: z12.array(z12.string()).optional(),
4996
- annotations: z12.unknown().optional()
4975
+ payload: z11.unknown().optional(),
4976
+ warnings: z11.array(z11.string()).optional(),
4977
+ annotations: z11.unknown().optional()
4997
4978
  })
4998
4979
  });
4999
- var googleDraftListRequestSchema = z12.object({
5000
- chatId: z12.string()
4980
+ var googleDraftListRequestSchema = z11.object({
4981
+ chatId: z11.string()
5001
4982
  });
5002
- var googleDraftAdvisorySchema = z12.object({
5003
- scope: z12.enum(["campaign", "adGroup"]),
5004
- message: z12.string()
4983
+ var googleDraftAdvisorySchema = z11.object({
4984
+ scope: z11.enum(["campaign", "adGroup"]),
4985
+ message: z11.string()
5005
4986
  });
5006
- var googleDraftStatusCollectionSchema = z12.object({
5007
- label: z12.string(),
5008
- added: z12.number(),
5009
- removed: z12.number(),
5010
- existing: z12.number()
4987
+ var googleDraftStatusCollectionSchema = z11.object({
4988
+ label: z11.string(),
4989
+ added: z11.number(),
4990
+ removed: z11.number(),
4991
+ existing: z11.number()
5011
4992
  });
5012
- var googleDraftChangeOperationSchema = z12.enum(["create", "update", "pause", "resume", "remove"]);
5013
- var googleDraftStatusNodeSchema = z12.lazy(
5014
- () => z12.object({
5015
- entity: z12.string(),
5016
- name: z12.string(),
4993
+ var googleDraftChangeOperationSchema = z11.enum(["create", "update", "pause", "resume", "remove"]);
4994
+ var googleDraftStatusNodeSchema = z11.lazy(
4995
+ () => z11.object({
4996
+ entity: z11.string(),
4997
+ name: z11.string(),
5017
4998
  operation: googleDraftChangeOperationSchema.optional(),
5018
- existing: z12.boolean(),
5019
- collections: z12.array(googleDraftStatusCollectionSchema),
5020
- children: z12.array(googleDraftStatusNodeSchema),
5021
- warnings: z12.array(z12.string()).optional()
4999
+ existing: z11.boolean(),
5000
+ collections: z11.array(googleDraftStatusCollectionSchema),
5001
+ children: z11.array(googleDraftStatusNodeSchema),
5002
+ warnings: z11.array(z11.string()).optional()
5022
5003
  })
5023
5004
  );
5024
- var googleDraftListResponseSchema = z12.object({
5025
- status: z12.enum(["active", "publishing", "applied", "discarded", "none"]),
5005
+ var googleDraftListResponseSchema = z11.object({
5006
+ status: z11.enum(["active", "publishing", "applied", "discarded", "none"]),
5026
5007
  mode: googleWriteModeSchema,
5027
- count: z12.number(),
5028
- ops: z12.array(googleDraftOpViewSchema),
5008
+ count: z11.number(),
5009
+ ops: z11.array(googleDraftOpViewSchema),
5029
5010
  /** Grouped campaign ▸ ad group ▸ ad tree for the readable CLI status view. */
5030
- tree: z12.array(googleDraftStatusNodeSchema).optional(),
5011
+ tree: z11.array(googleDraftStatusNodeSchema).optional(),
5031
5012
  /** Non-blocking completeness advisories for the whole draft. */
5032
- advisories: z12.array(googleDraftAdvisorySchema).optional()
5013
+ advisories: z11.array(googleDraftAdvisorySchema).optional()
5033
5014
  });
5034
- var googleDraftRemoveRequestSchema = z12.object({
5035
- chatId: z12.string(),
5036
- ref: z12.string()
5015
+ var googleDraftRemoveRequestSchema = z11.object({
5016
+ chatId: z11.string(),
5017
+ ref: z11.string()
5037
5018
  });
5038
- var googleDraftRemoveResponseSchema = z12.object({
5019
+ var googleDraftRemoveResponseSchema = z11.object({
5039
5020
  /** The requested ref plus any dependents removed by cascade. */
5040
- removed: z12.array(z12.string())
5021
+ removed: z11.array(z11.string())
5041
5022
  });
5042
- var googleDraftClearRequestSchema = z12.object({
5043
- chatId: z12.string()
5023
+ var googleDraftClearRequestSchema = z11.object({
5024
+ chatId: z11.string()
5044
5025
  });
5045
- var googleDraftClearResponseSchema = z12.object({
5046
- cleared: z12.number()
5026
+ var googleDraftClearResponseSchema = z11.object({
5027
+ cleared: z11.number()
5047
5028
  });
5048
- var googleFieldErrorSchema = z12.object({
5049
- path: z12.string(),
5050
- message: z12.string()
5029
+ var googleFieldErrorSchema = z11.object({
5030
+ path: z11.string(),
5031
+ message: z11.string()
5051
5032
  });
5052
- var googleDraftErrorResponseSchema = z12.object({
5053
- code: z12.string(),
5054
- error: z12.string(),
5055
- fields: z12.array(googleFieldErrorSchema).optional()
5033
+ var googleDraftErrorResponseSchema = z11.object({
5034
+ code: z11.string(),
5035
+ error: z11.string(),
5036
+ fields: z11.array(googleFieldErrorSchema).optional()
5056
5037
  });
5057
5038
 
5058
5039
  // src/commands/ads/google/draft-status.ts
@@ -11095,17 +11076,17 @@ var NUMERIC_ID_REGEX3 = /^\d+$/;
11095
11076
  var IMAGE_HASH_REGEX = /^[A-Fa-f0-9]{16,}$/;
11096
11077
 
11097
11078
  // ../api/src/ads-meta/ops.ts
11098
- import { z as z13 } from "zod";
11099
- var tempRefSchema3 = z13.string().regex(TEMP_REF_REGEX3, "expected a meta_temp_* reference");
11100
- var parentRefSchema2 = z13.union([z13.string().regex(NUMERIC_ID_REGEX3, "expected a numeric id"), tempRefSchema3]);
11101
- var moneySchema2 = z13.object({
11102
- amount: z13.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"),
11103
- currencyCode: z13.string().length(3).optional()
11104
- });
11105
- var httpsUrlSchema3 = z13.string().url().refine((u) => u.startsWith("https://"), "destination URLs must be https");
11106
- var bakerMediaIdSchema2 = z13.string().min(1);
11107
- var stageableStatusSchema3 = z13.enum(STAGEABLE_CREATE_STATUSES3);
11108
- var updateStatusSchema = z13.enum(UPDATE_STATUSES);
11079
+ import { z as z12 } from "zod";
11080
+ var tempRefSchema3 = z12.string().regex(TEMP_REF_REGEX3, "expected a meta_temp_* reference");
11081
+ var parentRefSchema2 = z12.union([z12.string().regex(NUMERIC_ID_REGEX3, "expected a numeric id"), tempRefSchema3]);
11082
+ var moneySchema2 = z12.object({
11083
+ amount: z12.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"),
11084
+ currencyCode: z12.string().length(3).optional()
11085
+ });
11086
+ var httpsUrlSchema3 = z12.string().url().refine((u) => u.startsWith("https://"), "destination URLs must be https");
11087
+ var bakerMediaIdSchema2 = z12.string().min(1);
11088
+ var stageableStatusSchema3 = z12.enum(STAGEABLE_CREATE_STATUSES3);
11089
+ var updateStatusSchema = z12.enum(UPDATE_STATUSES);
11109
11090
  function currencyMinimums2(currencyCode) {
11110
11091
  return CURRENCY_MINIMUMS2[currencyCode] ?? DEFAULT_CURRENCY_MINIMUM2;
11111
11092
  }
@@ -11117,50 +11098,50 @@ function validateDailyBudgetFloor(money, ctx, path23) {
11117
11098
  }
11118
11099
  }
11119
11100
  }
11120
- var geoLocationsSchema = z13.object({
11121
- countries: z13.array(z13.string().length(2)).optional(),
11122
- regions: z13.array(z13.object({ key: z13.string() })).optional(),
11123
- cities: z13.array(z13.object({ key: z13.string(), radius: z13.number().optional(), distance_unit: z13.string().optional() })).optional(),
11124
- zips: z13.array(z13.object({ key: z13.string() })).optional(),
11125
- location_types: z13.array(z13.string()).optional()
11126
- }).catchall(z13.unknown());
11127
- var idNameSchema = z13.object({ id: z13.string(), name: z13.string().optional() });
11128
- var metaTargetingSchema = z13.object({
11101
+ var geoLocationsSchema = z12.object({
11102
+ countries: z12.array(z12.string().length(2)).optional(),
11103
+ regions: z12.array(z12.object({ key: z12.string() })).optional(),
11104
+ cities: z12.array(z12.object({ key: z12.string(), radius: z12.number().optional(), distance_unit: z12.string().optional() })).optional(),
11105
+ zips: z12.array(z12.object({ key: z12.string() })).optional(),
11106
+ location_types: z12.array(z12.string()).optional()
11107
+ }).catchall(z12.unknown());
11108
+ var idNameSchema = z12.object({ id: z12.string(), name: z12.string().optional() });
11109
+ var metaTargetingSchema = z12.object({
11129
11110
  geo_locations: geoLocationsSchema.optional(),
11130
11111
  excluded_geo_locations: geoLocationsSchema.optional(),
11131
- age_min: z13.number().int().min(13).max(65).optional(),
11132
- age_max: z13.number().int().min(13).max(65).optional(),
11133
- genders: z13.array(z13.union([z13.literal(1), z13.literal(2)])).optional(),
11134
- locales: z13.array(z13.number().int()).optional(),
11135
- interests: z13.array(idNameSchema).optional(),
11136
- behaviors: z13.array(idNameSchema).optional(),
11137
- custom_audiences: z13.array(z13.object({ id: parentRefSchema2 })).optional(),
11138
- excluded_custom_audiences: z13.array(z13.object({ id: parentRefSchema2 })).optional(),
11139
- flexible_spec: z13.array(z13.record(z13.string(), z13.unknown())).optional(),
11140
- exclusions: z13.record(z13.string(), z13.unknown()).optional(),
11141
- publisher_platforms: z13.array(z13.string()).optional(),
11142
- facebook_positions: z13.array(z13.string()).optional(),
11143
- instagram_positions: z13.array(z13.string()).optional(),
11144
- audience_network_positions: z13.array(z13.string()).optional(),
11145
- messenger_positions: z13.array(z13.string()).optional(),
11146
- device_platforms: z13.array(z13.string()).optional(),
11147
- targeting_automation: z13.object({ advantage_audience: z13.union([z13.literal(0), z13.literal(1)]) }).partial().optional()
11148
- }).catchall(z13.unknown());
11149
- var specialAdCategoriesSchema = z13.array(z13.enum(SPECIAL_AD_CATEGORIES)).default(["NONE"]);
11150
- var campaignCreateSchema3 = z13.object({
11151
- name: z13.string().min(1).max(META_LIMITS.campaign.nameMax),
11152
- objective: z13.enum(OBJECTIVES),
11112
+ age_min: z12.number().int().min(13).max(65).optional(),
11113
+ age_max: z12.number().int().min(13).max(65).optional(),
11114
+ genders: z12.array(z12.union([z12.literal(1), z12.literal(2)])).optional(),
11115
+ locales: z12.array(z12.number().int()).optional(),
11116
+ interests: z12.array(idNameSchema).optional(),
11117
+ behaviors: z12.array(idNameSchema).optional(),
11118
+ custom_audiences: z12.array(z12.object({ id: parentRefSchema2 })).optional(),
11119
+ excluded_custom_audiences: z12.array(z12.object({ id: parentRefSchema2 })).optional(),
11120
+ flexible_spec: z12.array(z12.record(z12.string(), z12.unknown())).optional(),
11121
+ exclusions: z12.record(z12.string(), z12.unknown()).optional(),
11122
+ publisher_platforms: z12.array(z12.string()).optional(),
11123
+ facebook_positions: z12.array(z12.string()).optional(),
11124
+ instagram_positions: z12.array(z12.string()).optional(),
11125
+ audience_network_positions: z12.array(z12.string()).optional(),
11126
+ messenger_positions: z12.array(z12.string()).optional(),
11127
+ device_platforms: z12.array(z12.string()).optional(),
11128
+ targeting_automation: z12.object({ advantage_audience: z12.union([z12.literal(0), z12.literal(1)]) }).partial().optional()
11129
+ }).catchall(z12.unknown());
11130
+ var specialAdCategoriesSchema = z12.array(z12.enum(SPECIAL_AD_CATEGORIES)).default(["NONE"]);
11131
+ var campaignCreateSchema3 = z12.object({
11132
+ name: z12.string().min(1).max(META_LIMITS.campaign.nameMax),
11133
+ objective: z12.enum(OBJECTIVES),
11153
11134
  status: stageableStatusSchema3.default("PAUSED"),
11154
11135
  special_ad_categories: specialAdCategoriesSchema,
11155
- special_ad_category_country: z13.array(z13.string().length(2)).optional(),
11156
- buying_type: z13.enum(BUYING_TYPES).default("AUCTION"),
11157
- bid_strategy: z13.enum(BID_STRATEGIES).optional(),
11136
+ special_ad_category_country: z12.array(z12.string().length(2)).optional(),
11137
+ buying_type: z12.enum(BUYING_TYPES).default("AUCTION"),
11138
+ bid_strategy: z12.enum(BID_STRATEGIES).optional(),
11158
11139
  /** Campaign Budget Optimization (Advantage campaign budget) — mutually exclusive with ad-set budgets. */
11159
11140
  dailyBudget: moneySchema2.optional(),
11160
11141
  lifetimeBudget: moneySchema2.optional(),
11161
11142
  spendCap: moneySchema2.optional(),
11162
- start_time: z13.number().int().positive().optional(),
11163
- stop_time: z13.number().int().positive().optional()
11143
+ start_time: z12.number().int().positive().optional(),
11144
+ stop_time: z12.number().int().positive().optional()
11164
11145
  }).superRefine((p, ctx) => {
11165
11146
  if (p.dailyBudget && p.lifetimeBudget) {
11166
11147
  ctx.addIssue({ code: "custom", path: ["dailyBudget"], message: "set only one of dailyBudget or lifetimeBudget" });
@@ -11170,15 +11151,15 @@ var campaignCreateSchema3 = z13.object({
11170
11151
  ctx.addIssue({ code: "custom", path: ["stop_time"], message: "stop_time must be after start_time" });
11171
11152
  }
11172
11153
  });
11173
- var campaignUpdateSchema3 = z13.object({
11174
- name: z13.string().min(1).max(META_LIMITS.campaign.nameMax).optional(),
11154
+ var campaignUpdateSchema3 = z12.object({
11155
+ name: z12.string().min(1).max(META_LIMITS.campaign.nameMax).optional(),
11175
11156
  status: updateStatusSchema.optional(),
11176
- bid_strategy: z13.enum(BID_STRATEGIES).optional(),
11157
+ bid_strategy: z12.enum(BID_STRATEGIES).optional(),
11177
11158
  dailyBudget: moneySchema2.optional(),
11178
11159
  lifetimeBudget: moneySchema2.optional(),
11179
11160
  spendCap: moneySchema2.optional(),
11180
- start_time: z13.number().int().positive().optional(),
11181
- stop_time: z13.number().int().positive().optional()
11161
+ start_time: z12.number().int().positive().optional(),
11162
+ stop_time: z12.number().int().positive().optional()
11182
11163
  }).superRefine((p, ctx) => {
11183
11164
  if (!Object.values(p).some((val) => val !== void 0)) {
11184
11165
  ctx.addIssue({ code: "custom", message: "update needs at least one field" });
@@ -11188,38 +11169,38 @@ var campaignUpdateSchema3 = z13.object({
11188
11169
  }
11189
11170
  validateDailyBudgetFloor(p.dailyBudget, ctx, ["dailyBudget", "amount"]);
11190
11171
  });
11191
- var promotedObjectSchema = z13.object({
11172
+ var promotedObjectSchema = z12.object({
11192
11173
  page_id: parentRefSchema2.optional(),
11193
- pixel_id: z13.string().regex(NUMERIC_ID_REGEX3).optional(),
11194
- custom_event_type: z13.enum(CUSTOM_EVENT_TYPES).optional(),
11195
- application_id: z13.string().regex(NUMERIC_ID_REGEX3).optional(),
11196
- object_store_url: z13.string().url().optional(),
11197
- product_catalog_id: z13.string().regex(NUMERIC_ID_REGEX3).optional(),
11198
- product_set_id: z13.string().regex(NUMERIC_ID_REGEX3).optional(),
11199
- whatsapp_phone_number: z13.string().optional(),
11200
- offline_conversion_data_set_id: z13.string().regex(NUMERIC_ID_REGEX3).optional()
11174
+ pixel_id: z12.string().regex(NUMERIC_ID_REGEX3).optional(),
11175
+ custom_event_type: z12.enum(CUSTOM_EVENT_TYPES).optional(),
11176
+ application_id: z12.string().regex(NUMERIC_ID_REGEX3).optional(),
11177
+ object_store_url: z12.string().url().optional(),
11178
+ product_catalog_id: z12.string().regex(NUMERIC_ID_REGEX3).optional(),
11179
+ product_set_id: z12.string().regex(NUMERIC_ID_REGEX3).optional(),
11180
+ whatsapp_phone_number: z12.string().optional(),
11181
+ offline_conversion_data_set_id: z12.string().regex(NUMERIC_ID_REGEX3).optional()
11201
11182
  }).partial();
11202
- var attributionSpecSchema = z13.array(
11203
- z13.object({
11204
- event_type: z13.enum(ATTRIBUTION_EVENT_TYPES),
11205
- window_days: z13.union([z13.literal(1), z13.literal(7), z13.literal(28)])
11183
+ var attributionSpecSchema = z12.array(
11184
+ z12.object({
11185
+ event_type: z12.enum(ATTRIBUTION_EVENT_TYPES),
11186
+ window_days: z12.union([z12.literal(1), z12.literal(7), z12.literal(28)])
11206
11187
  })
11207
11188
  );
11208
11189
  var adSetFields = {
11209
- name: z13.string().min(1).max(META_LIMITS.adSet.nameMax),
11190
+ name: z12.string().min(1).max(META_LIMITS.adSet.nameMax),
11210
11191
  campaign_id: parentRefSchema2,
11211
11192
  status: stageableStatusSchema3.default("PAUSED"),
11212
11193
  dailyBudget: moneySchema2.optional(),
11213
11194
  lifetimeBudget: moneySchema2.optional(),
11214
11195
  bidAmount: moneySchema2.optional(),
11215
- bid_strategy: z13.enum(BID_STRATEGIES).optional(),
11216
- billing_event: z13.enum(BILLING_EVENTS),
11217
- optimization_goal: z13.enum(OPTIMIZATION_GOALS),
11218
- destination_type: z13.enum(DESTINATION_TYPES).optional(),
11196
+ bid_strategy: z12.enum(BID_STRATEGIES).optional(),
11197
+ billing_event: z12.enum(BILLING_EVENTS),
11198
+ optimization_goal: z12.enum(OPTIMIZATION_GOALS),
11199
+ destination_type: z12.enum(DESTINATION_TYPES).optional(),
11219
11200
  promoted_object: promotedObjectSchema.optional(),
11220
11201
  attribution_spec: attributionSpecSchema.optional(),
11221
- start_time: z13.number().int().positive().optional(),
11222
- end_time: z13.number().int().positive().optional(),
11202
+ start_time: z12.number().int().positive().optional(),
11203
+ end_time: z12.number().int().positive().optional(),
11223
11204
  targeting: metaTargetingSchema
11224
11205
  };
11225
11206
  function validateAdSetBudgetAndBid(p, ctx) {
@@ -11237,22 +11218,22 @@ function validateAdSetBudgetAndBid(p, ctx) {
11237
11218
  ctx.addIssue({ code: "custom", path: ["end_time"], message: "end_time must be after start_time" });
11238
11219
  }
11239
11220
  }
11240
- var adSetCreateSchema = z13.object(adSetFields).superRefine((p, ctx) => {
11221
+ var adSetCreateSchema = z12.object(adSetFields).superRefine((p, ctx) => {
11241
11222
  validateAdSetBudgetAndBid(p, ctx);
11242
11223
  });
11243
- var adSetUpdateSchema = z13.object({
11224
+ var adSetUpdateSchema = z12.object({
11244
11225
  name: adSetFields.name.optional(),
11245
11226
  status: updateStatusSchema.optional(),
11246
11227
  dailyBudget: moneySchema2.optional(),
11247
11228
  lifetimeBudget: moneySchema2.optional(),
11248
11229
  bidAmount: moneySchema2.optional(),
11249
- bid_strategy: z13.enum(BID_STRATEGIES).optional(),
11250
- optimization_goal: z13.enum(OPTIMIZATION_GOALS).optional(),
11251
- destination_type: z13.enum(DESTINATION_TYPES).optional(),
11230
+ bid_strategy: z12.enum(BID_STRATEGIES).optional(),
11231
+ optimization_goal: z12.enum(OPTIMIZATION_GOALS).optional(),
11232
+ destination_type: z12.enum(DESTINATION_TYPES).optional(),
11252
11233
  promoted_object: promotedObjectSchema.optional(),
11253
11234
  attribution_spec: attributionSpecSchema.optional(),
11254
- start_time: z13.number().int().positive().optional(),
11255
- end_time: z13.number().int().positive().optional(),
11235
+ start_time: z12.number().int().positive().optional(),
11236
+ end_time: z12.number().int().positive().optional(),
11256
11237
  targeting: metaTargetingSchema.optional()
11257
11238
  }).superRefine((p, ctx) => {
11258
11239
  if (!Object.values(p).some((val) => val !== void 0)) {
@@ -11260,38 +11241,38 @@ var adSetUpdateSchema = z13.object({
11260
11241
  }
11261
11242
  validateAdSetBudgetAndBid(p, ctx);
11262
11243
  });
11263
- var messageSchema = z13.string().min(1).max(META_LIMITS.creative.messageHardMax);
11264
- var headlineSchema2 = z13.string().min(1).max(META_LIMITS.creative.headlineMax);
11265
- var descriptionSchema = z13.string().min(1).max(META_LIMITS.creative.descriptionMax);
11266
- var callToActionSchema = z13.object({
11267
- type: z13.enum(CTA_TYPES2),
11244
+ var messageSchema = z12.string().min(1).max(META_LIMITS.creative.messageHardMax);
11245
+ var headlineSchema2 = z12.string().min(1).max(META_LIMITS.creative.headlineMax);
11246
+ var descriptionSchema = z12.string().min(1).max(META_LIMITS.creative.descriptionMax);
11247
+ var callToActionSchema = z12.object({
11248
+ type: z12.enum(CTA_TYPES2),
11268
11249
  /** Overrides the base link for the CTA button; defaults to the ad's link. */
11269
11250
  link: httpsUrlSchema3.optional()
11270
11251
  });
11271
- var creativeEnhancementsSchema = z13.object({
11272
- standardEnhancements: z13.enum(ENROLL_STATUSES).optional(),
11273
- features: z13.record(z13.string(), z13.enum(ENROLL_STATUSES)).optional()
11252
+ var creativeEnhancementsSchema = z12.object({
11253
+ standardEnhancements: z12.enum(ENROLL_STATUSES).optional(),
11254
+ features: z12.record(z12.string(), z12.enum(ENROLL_STATUSES)).optional()
11274
11255
  });
11275
11256
  var creativeSharedFields = {
11276
- name: z13.string().max(META_LIMITS.creative.nameMax).optional(),
11257
+ name: z12.string().max(META_LIMITS.creative.nameMax).optional(),
11277
11258
  /** Facebook Page id backing the ad's identity. */
11278
11259
  page_id: parentRefSchema2,
11279
11260
  /** Instagram account id for IG placements (aka instagram_actor_id on read). */
11280
- instagram_user_id: z13.string().regex(NUMERIC_ID_REGEX3).optional(),
11261
+ instagram_user_id: z12.string().regex(NUMERIC_ID_REGEX3).optional(),
11281
11262
  /** URL tracking parameters appended to the destination, e.g. "utm_source=fb&utm_campaign=x". */
11282
- url_tags: z13.string().max(1e3).optional(),
11263
+ url_tags: z12.string().max(1e3).optional(),
11283
11264
  enhancements: creativeEnhancementsSchema.optional()
11284
11265
  };
11285
11266
  var imageMediaFields = {
11286
- imageHash: z13.string().regex(IMAGE_HASH_REGEX).optional(),
11267
+ imageHash: z12.string().regex(IMAGE_HASH_REGEX).optional(),
11287
11268
  imageRef: tempRefSchema3.optional()
11288
11269
  };
11289
11270
  var videoMediaFields = {
11290
- videoId: z13.string().regex(NUMERIC_ID_REGEX3).optional(),
11271
+ videoId: z12.string().regex(NUMERIC_ID_REGEX3).optional(),
11291
11272
  videoRef: tempRefSchema3.optional(),
11292
11273
  /** Thumbnail for a video creative — image hash, ref, or public url. */
11293
- thumbnailHash: z13.string().regex(IMAGE_HASH_REGEX).optional(),
11294
- imageUrl: z13.string().url().optional()
11274
+ thumbnailHash: z12.string().regex(IMAGE_HASH_REGEX).optional(),
11275
+ imageUrl: z12.string().url().optional()
11295
11276
  };
11296
11277
  function countImageRefs(p) {
11297
11278
  return [p.imageHash, p.imageRef].filter(Boolean).length;
@@ -11299,8 +11280,8 @@ function countImageRefs(p) {
11299
11280
  function countVideoRefs(p) {
11300
11281
  return [p.videoId, p.videoRef].filter(Boolean).length;
11301
11282
  }
11302
- var singleCreativeSchema = z13.object({
11303
- creativeType: z13.literal("single"),
11283
+ var singleCreativeSchema = z12.object({
11284
+ creativeType: z12.literal("single"),
11304
11285
  ...creativeSharedFields,
11305
11286
  /** Primary text. */
11306
11287
  message: messageSchema,
@@ -11309,7 +11290,7 @@ var singleCreativeSchema = z13.object({
11309
11290
  headline: headlineSchema2.optional(),
11310
11291
  description: descriptionSchema.optional(),
11311
11292
  /** Display URL / caption shown under the headline. */
11312
- caption: z13.string().max(255).optional(),
11293
+ caption: z12.string().max(255).optional(),
11313
11294
  call_to_action: callToActionSchema.optional(),
11314
11295
  ...imageMediaFields,
11315
11296
  ...videoMediaFields
@@ -11333,10 +11314,10 @@ var singleCreativeSchema = z13.object({
11333
11314
  });
11334
11315
  }
11335
11316
  });
11336
- var carouselCardSchema = z13.object({
11317
+ var carouselCardSchema = z12.object({
11337
11318
  link: httpsUrlSchema3,
11338
- headline: z13.string().max(META_LIMITS.creative.headlineMax).optional(),
11339
- description: z13.string().max(META_LIMITS.creative.descriptionMax).optional(),
11319
+ headline: z12.string().max(META_LIMITS.creative.headlineMax).optional(),
11320
+ description: z12.string().max(META_LIMITS.creative.descriptionMax).optional(),
11340
11321
  call_to_action: callToActionSchema.optional(),
11341
11322
  ...imageMediaFields,
11342
11323
  ...videoMediaFields
@@ -11356,35 +11337,35 @@ var carouselCardSchema = z13.object({
11356
11337
  ctx.addIssue({ code: "custom", path: ["videoId"], message: "each card is an image OR a video, not both" });
11357
11338
  }
11358
11339
  });
11359
- var carouselCreativeSchema2 = z13.object({
11360
- creativeType: z13.literal("carousel"),
11340
+ var carouselCreativeSchema2 = z12.object({
11341
+ creativeType: z12.literal("carousel"),
11361
11342
  ...creativeSharedFields,
11362
11343
  message: messageSchema,
11363
11344
  /** Optional "see more" card destination applied when a card has no own link. */
11364
11345
  link: httpsUrlSchema3.optional(),
11365
11346
  call_to_action: callToActionSchema.optional(),
11366
- cards: z13.array(carouselCardSchema).min(META_LIMITS.creative.carouselCardsMin).max(META_LIMITS.creative.carouselCardsMax)
11347
+ cards: z12.array(carouselCardSchema).min(META_LIMITS.creative.carouselCardsMin).max(META_LIMITS.creative.carouselCardsMax)
11367
11348
  });
11368
- var dynamicImageSchema = z13.object({ ...imageMediaFields }).refine((p) => countImageRefs(p) === 1, "each dynamic image needs exactly one reference");
11369
- var dynamicVideoSchema = z13.object({
11349
+ var dynamicImageSchema = z12.object({ ...imageMediaFields }).refine((p) => countImageRefs(p) === 1, "each dynamic image needs exactly one reference");
11350
+ var dynamicVideoSchema = z12.object({
11370
11351
  videoId: videoMediaFields.videoId,
11371
11352
  videoRef: videoMediaFields.videoRef,
11372
11353
  thumbnailHash: videoMediaFields.thumbnailHash
11373
11354
  }).refine((p) => countVideoRefs(p) === 1, "each dynamic video needs exactly one reference");
11374
11355
  var DYN = META_LIMITS.creative;
11375
- var dynamicCreativeSchema = z13.object({
11376
- creativeType: z13.literal("dynamic"),
11356
+ var dynamicCreativeSchema = z12.object({
11357
+ creativeType: z12.literal("dynamic"),
11377
11358
  ...creativeSharedFields,
11378
- bodies: z13.array(z13.object({ text: messageSchema })).min(DYN.dynamicTextsMin).max(DYN.dynamicTextsMax),
11379
- titles: z13.array(z13.object({ text: headlineSchema2 })).min(DYN.dynamicTextsMin).max(DYN.dynamicTextsMax),
11380
- descriptions: z13.array(z13.object({ text: descriptionSchema })).max(DYN.dynamicTextsMax).optional(),
11381
- images: z13.array(dynamicImageSchema).optional(),
11382
- videos: z13.array(dynamicVideoSchema).optional(),
11383
- ad_formats: z13.array(z13.enum(AD_FORMATS2)).min(1),
11384
- call_to_action_types: z13.array(z13.enum(CTA_TYPES2)).optional(),
11385
- link_urls: z13.array(z13.object({ website_url: httpsUrlSchema3, display_url: z13.string().optional() })).min(1),
11359
+ bodies: z12.array(z12.object({ text: messageSchema })).min(DYN.dynamicTextsMin).max(DYN.dynamicTextsMax),
11360
+ titles: z12.array(z12.object({ text: headlineSchema2 })).min(DYN.dynamicTextsMin).max(DYN.dynamicTextsMax),
11361
+ descriptions: z12.array(z12.object({ text: descriptionSchema })).max(DYN.dynamicTextsMax).optional(),
11362
+ images: z12.array(dynamicImageSchema).optional(),
11363
+ videos: z12.array(dynamicVideoSchema).optional(),
11364
+ ad_formats: z12.array(z12.enum(AD_FORMATS2)).min(1),
11365
+ call_to_action_types: z12.array(z12.enum(CTA_TYPES2)).optional(),
11366
+ link_urls: z12.array(z12.object({ website_url: httpsUrlSchema3, display_url: z12.string().optional() })).min(1),
11386
11367
  /** Multi-language / placement customization — structural passthrough for v1. */
11387
- asset_customization_rules: z13.array(z13.record(z13.string(), z13.unknown())).optional()
11368
+ asset_customization_rules: z12.array(z12.record(z12.string(), z12.unknown())).optional()
11388
11369
  }).superRefine((p, ctx) => {
11389
11370
  if (!(p.images?.length || p.videos?.length)) {
11390
11371
  ctx.addIssue({
@@ -11394,57 +11375,57 @@ var dynamicCreativeSchema = z13.object({
11394
11375
  });
11395
11376
  }
11396
11377
  });
11397
- var existingPostCreativeSchema = z13.object({
11398
- creativeType: z13.literal("existing_post"),
11378
+ var existingPostCreativeSchema = z12.object({
11379
+ creativeType: z12.literal("existing_post"),
11399
11380
  name: creativeSharedFields.name,
11400
11381
  /** "<page_id>_<post_id>" object story id of the post to promote. */
11401
- object_story_id: z13.string().regex(/^\d+_\d+$/, 'expected "<page_id>_<post_id>"'),
11382
+ object_story_id: z12.string().regex(/^\d+_\d+$/, 'expected "<page_id>_<post_id>"'),
11402
11383
  instagram_user_id: creativeSharedFields.instagram_user_id,
11403
11384
  url_tags: creativeSharedFields.url_tags,
11404
11385
  enhancements: creativeSharedFields.enhancements
11405
11386
  });
11406
- var creativeContentSchema2 = z13.discriminatedUnion("creativeType", [
11387
+ var creativeContentSchema2 = z12.discriminatedUnion("creativeType", [
11407
11388
  singleCreativeSchema,
11408
11389
  carouselCreativeSchema2,
11409
11390
  dynamicCreativeSchema,
11410
11391
  existingPostCreativeSchema
11411
11392
  ]);
11412
11393
  var adCreativeCreateSchema = creativeContentSchema2;
11413
- var adCreativeUpdateSchema = z13.object({
11414
- name: z13.string().max(META_LIMITS.creative.nameMax).optional(),
11394
+ var adCreativeUpdateSchema = z12.object({
11395
+ name: z12.string().max(META_LIMITS.creative.nameMax).optional(),
11415
11396
  status: updateStatusSchema.optional(),
11416
11397
  /** Content patch — only honored when the target is a staged meta_temp_* creative. */
11417
- content: z13.record(z13.string(), z13.unknown()).optional()
11398
+ content: z12.record(z12.string(), z12.unknown()).optional()
11418
11399
  }).refine((p) => Object.values(p).some((val) => val !== void 0), "update needs at least one field");
11419
- var adCreateSchema2 = z13.object({
11420
- name: z13.string().min(1).max(META_LIMITS.ad.nameMax),
11400
+ var adCreateSchema2 = z12.object({
11401
+ name: z12.string().min(1).max(META_LIMITS.ad.nameMax),
11421
11402
  adset_id: parentRefSchema2,
11422
11403
  status: stageableStatusSchema3.default("PAUSED"),
11423
- creative: z13.object({ creative_id: parentRefSchema2 }),
11404
+ creative: z12.object({ creative_id: parentRefSchema2 }),
11424
11405
  /** Conversion pixel / offline event set / view tags — structural passthrough. */
11425
- tracking_specs: z13.array(z13.record(z13.string(), z13.unknown())).optional()
11406
+ tracking_specs: z12.array(z12.record(z12.string(), z12.unknown())).optional()
11426
11407
  });
11427
- var adUpdateSchema2 = z13.object({
11428
- name: z13.string().min(1).max(META_LIMITS.ad.nameMax).optional(),
11408
+ var adUpdateSchema2 = z12.object({
11409
+ name: z12.string().min(1).max(META_LIMITS.ad.nameMax).optional(),
11429
11410
  status: updateStatusSchema.optional(),
11430
11411
  /** Swapping the creative is the Meta way to "edit" an ad's creative. */
11431
- creative: z13.object({ creative_id: parentRefSchema2 }).optional(),
11432
- tracking_specs: z13.array(z13.record(z13.string(), z13.unknown())).optional()
11412
+ creative: z12.object({ creative_id: parentRefSchema2 }).optional(),
11413
+ tracking_specs: z12.array(z12.record(z12.string(), z12.unknown())).optional()
11433
11414
  }).refine((p) => Object.values(p).some((val) => val !== void 0), "update needs at least one field");
11434
- var lookalikeSpecSchema = z13.object({
11435
- origin: z13.array(z13.object({ id: parentRefSchema2 })).min(1),
11436
- ratio: z13.number().min(0.01).max(0.2).optional(),
11437
- country: z13.string().length(2).optional()
11438
- });
11439
- var customAudienceCreateSchema = z13.object({
11440
- name: z13.string().min(1).max(META_LIMITS.audience.nameMax),
11441
- subtype: z13.enum(CUSTOM_AUDIENCE_SUBTYPES),
11442
- description: z13.string().max(500).optional(),
11443
- customer_file_source: z13.string().optional(),
11444
- retention_days: z13.number().int().min(1).max(META_LIMITS.audience.retentionDaysMax).optional(),
11415
+ var lookalikeSpecSchema = z12.object({
11416
+ origin: z12.array(z12.object({ id: parentRefSchema2 })).min(1),
11417
+ ratio: z12.number().min(0.01).max(0.2).optional(),
11418
+ country: z12.string().length(2).optional()
11419
+ });
11420
+ var customAudienceCreateSchema = z12.object({
11421
+ name: z12.string().min(1).max(META_LIMITS.audience.nameMax),
11422
+ subtype: z12.enum(CUSTOM_AUDIENCE_SUBTYPES),
11423
+ description: z12.string().max(500).optional(),
11424
+ customer_file_source: z12.string().optional(),
11425
+ retention_days: z12.number().int().min(1).max(META_LIMITS.audience.retentionDaysMax).optional(),
11445
11426
  lookalike_spec: lookalikeSpecSchema.optional(),
11446
11427
  /** Website/engagement rule — structural passthrough validated by Meta. */
11447
- rule: z13.record(z13.string(), z13.unknown()).optional()
11428
+ rule: z12.record(z12.string(), z12.unknown()).optional()
11448
11429
  }).superRefine((p, ctx) => {
11449
11430
  if (p.subtype === "LOOKALIKE" && !p.lookalike_spec) {
11450
11431
  ctx.addIssue({ code: "custom", path: ["lookalike_spec"], message: "LOOKALIKE audiences need a lookalike_spec" });
@@ -11453,16 +11434,16 @@ var customAudienceCreateSchema = z13.object({
11453
11434
  ctx.addIssue({ code: "custom", path: ["rule"], message: `${p.subtype} audiences need a rule (use --file)` });
11454
11435
  }
11455
11436
  });
11456
- var customAudienceUpdateSchema = z13.object({
11457
- name: z13.string().min(1).max(META_LIMITS.audience.nameMax).optional(),
11458
- description: z13.string().max(500).optional()
11437
+ var customAudienceUpdateSchema = z12.object({
11438
+ name: z12.string().min(1).max(META_LIMITS.audience.nameMax).optional(),
11439
+ description: z12.string().max(500).optional()
11459
11440
  }).refine((p) => Object.values(p).some((val) => val !== void 0), "update needs at least one field");
11460
- var mediaUploadSchema = z13.object({
11461
- kind: z13.enum(MEDIA_KINDS),
11441
+ var mediaUploadSchema = z12.object({
11442
+ kind: z12.enum(MEDIA_KINDS),
11462
11443
  bakerImageId: bakerMediaIdSchema2.optional(),
11463
11444
  bakerVideoId: bakerMediaIdSchema2.optional(),
11464
11445
  /** Optional display name / filename hint. */
11465
- name: z13.string().max(255).optional()
11446
+ name: z12.string().max(255).optional()
11466
11447
  }).superRefine((p, ctx) => {
11467
11448
  if (p.kind === "image" && !p.bakerImageId) {
11468
11449
  ctx.addIssue({ code: "custom", path: ["bakerImageId"], message: "image uploads need a bakerImageId" });
@@ -11484,16 +11465,16 @@ var META_DRAFT_OP_KINDS = [
11484
11465
  "customAudience.update",
11485
11466
  "media.upload"
11486
11467
  ];
11487
- var metaDraftOpKindSchema = z13.enum(META_DRAFT_OP_KINDS);
11488
- var accountIdSchema2 = z13.string().regex(NUMERIC_ID_REGEX3, "accountId must be the bare numeric ad account id");
11489
- var updateTargetSchema2 = z13.union([z13.string().regex(NUMERIC_ID_REGEX3), tempRefSchema3]);
11468
+ var metaDraftOpKindSchema = z12.enum(META_DRAFT_OP_KINDS);
11469
+ var accountIdSchema2 = z12.string().regex(NUMERIC_ID_REGEX3, "accountId must be the bare numeric ad account id");
11470
+ var updateTargetSchema2 = z12.union([z12.string().regex(NUMERIC_ID_REGEX3), tempRefSchema3]);
11490
11471
  function createOp3(kind, payload) {
11491
- return z13.object({ kind: z13.literal(kind), accountId: accountIdSchema2, payload });
11472
+ return z12.object({ kind: z12.literal(kind), accountId: accountIdSchema2, payload });
11492
11473
  }
11493
11474
  function updateOp3(kind, payload) {
11494
- return z13.object({ kind: z13.literal(kind), accountId: accountIdSchema2, target: updateTargetSchema2, payload });
11475
+ return z12.object({ kind: z12.literal(kind), accountId: accountIdSchema2, target: updateTargetSchema2, payload });
11495
11476
  }
11496
- var metaDraftOpInputSchema = z13.discriminatedUnion("kind", [
11477
+ var metaDraftOpInputSchema = z12.discriminatedUnion("kind", [
11497
11478
  createOp3("campaign.create", campaignCreateSchema3),
11498
11479
  updateOp3("campaign.update", campaignUpdateSchema3),
11499
11480
  createOp3("adSet.create", adSetCreateSchema),
@@ -11508,89 +11489,89 @@ var metaDraftOpInputSchema = z13.discriminatedUnion("kind", [
11508
11489
  ]);
11509
11490
 
11510
11491
  // ../api/src/ads-meta/wire.ts
11511
- import { z as z14 } from "zod";
11512
- var metaWriteModeSchema = z14.enum(["live", "simulated"]);
11513
- var metaDraftOpResultSchema = z14.object({
11514
- status: z14.enum(["applied", "simulated", "failed", "skipped"]),
11492
+ import { z as z13 } from "zod";
11493
+ var metaWriteModeSchema = z13.enum(["live", "simulated"]);
11494
+ var metaDraftOpResultSchema = z13.object({
11495
+ status: z13.enum(["applied", "simulated", "failed", "skipped"]),
11515
11496
  /** The resulting Meta node id (campaign/adset/creative/ad/audience) or simulated id. */
11516
- id: z14.string().optional(),
11497
+ id: z13.string().optional(),
11517
11498
  /** For media.upload ops: the resulting image hash. */
11518
- hash: z14.string().optional(),
11519
- error: z14.string().optional(),
11520
- skippedBecause: z14.string().optional(),
11521
- executedAt: z14.number().optional()
11499
+ hash: z13.string().optional(),
11500
+ error: z13.string().optional(),
11501
+ skippedBecause: z13.string().optional(),
11502
+ executedAt: z13.number().optional()
11522
11503
  });
11523
- var metaDraftStageRequestSchema = z14.object({
11524
- chatId: z14.string(),
11504
+ var metaDraftStageRequestSchema = z13.object({
11505
+ chatId: z13.string(),
11525
11506
  op: metaDraftOpInputSchema
11526
11507
  });
11527
- var metaDraftStageResponseSchema = z14.object({
11528
- staged: z14.literal(true),
11529
- ref: z14.string(),
11508
+ var metaDraftStageResponseSchema = z13.object({
11509
+ staged: z13.literal(true),
11510
+ ref: z13.string(),
11530
11511
  kind: metaDraftOpKindSchema,
11531
11512
  mode: metaWriteModeSchema,
11532
- dependsOn: z14.array(z14.string()),
11533
- summary: z14.string(),
11534
- warnings: z14.array(z14.string()),
11513
+ dependsOn: z13.array(z13.string()),
11514
+ summary: z13.string(),
11515
+ warnings: z13.array(z13.string()),
11535
11516
  /** True when the op amended an already-staged op in place instead of appending a new one. */
11536
- amended: z14.boolean().optional()
11537
- });
11538
- var metaDraftDuplicateRequestSchema = z14.object({
11539
- chatId: z14.string(),
11540
- accountId: z14.string(),
11541
- entity: z14.enum(["campaign", "adSet", "ad"]),
11542
- sourceId: z14.string(),
11543
- overrides: z14.record(z14.string(), z14.unknown()).optional(),
11517
+ amended: z13.boolean().optional()
11518
+ });
11519
+ var metaDraftDuplicateRequestSchema = z13.object({
11520
+ chatId: z13.string(),
11521
+ accountId: z13.string(),
11522
+ entity: z13.enum(["campaign", "adSet", "ad"]),
11523
+ sourceId: z13.string(),
11524
+ overrides: z13.record(z13.string(), z13.unknown()).optional(),
11544
11525
  /** Pause the original after the copy publishes. */
11545
- replace: z14.boolean().optional()
11526
+ replace: z13.boolean().optional()
11546
11527
  });
11547
- var metaDraftOpViewSchema = z14.object({
11548
- ref: z14.string(),
11528
+ var metaDraftOpViewSchema = z13.object({
11529
+ ref: z13.string(),
11549
11530
  kind: metaDraftOpKindSchema,
11550
- accountId: z14.string(),
11551
- target: z14.string().optional(),
11552
- dependsOn: z14.array(z14.string()),
11553
- summary: z14.string(),
11554
- stagedAt: z14.number(),
11531
+ accountId: z13.string(),
11532
+ target: z13.string().optional(),
11533
+ dependsOn: z13.array(z13.string()),
11534
+ summary: z13.string(),
11535
+ stagedAt: z13.number(),
11555
11536
  result: metaDraftOpResultSchema.optional()
11556
11537
  });
11557
- var metaDraftListRequestSchema = z14.object({
11558
- chatId: z14.string()
11538
+ var metaDraftListRequestSchema = z13.object({
11539
+ chatId: z13.string()
11559
11540
  });
11560
- var metaDraftAdvisorySchema = z14.object({
11561
- ref: z14.string(),
11562
- message: z14.string()
11541
+ var metaDraftAdvisorySchema = z13.object({
11542
+ ref: z13.string(),
11543
+ message: z13.string()
11563
11544
  });
11564
- var metaDraftListResponseSchema = z14.object({
11565
- status: z14.enum(["active", "publishing", "applied", "discarded", "none"]),
11545
+ var metaDraftListResponseSchema = z13.object({
11546
+ status: z13.enum(["active", "publishing", "applied", "discarded", "none"]),
11566
11547
  mode: metaWriteModeSchema,
11567
- count: z14.number(),
11568
- ops: z14.array(metaDraftOpViewSchema),
11548
+ count: z13.number(),
11549
+ ops: z13.array(metaDraftOpViewSchema),
11569
11550
  /** Non-blocking cross-op quality advisories — "good campaign, not just valid". */
11570
- advisories: z14.array(metaDraftAdvisorySchema)
11551
+ advisories: z13.array(metaDraftAdvisorySchema)
11571
11552
  });
11572
- var metaDraftRemoveRequestSchema = z14.object({
11573
- chatId: z14.string(),
11574
- ref: z14.string()
11553
+ var metaDraftRemoveRequestSchema = z13.object({
11554
+ chatId: z13.string(),
11555
+ ref: z13.string()
11575
11556
  });
11576
- var metaDraftRemoveResponseSchema = z14.object({
11557
+ var metaDraftRemoveResponseSchema = z13.object({
11577
11558
  /** The requested ref plus any dependents removed by cascade. */
11578
- removed: z14.array(z14.string())
11559
+ removed: z13.array(z13.string())
11579
11560
  });
11580
- var metaDraftClearRequestSchema = z14.object({
11581
- chatId: z14.string()
11561
+ var metaDraftClearRequestSchema = z13.object({
11562
+ chatId: z13.string()
11582
11563
  });
11583
- var metaDraftClearResponseSchema = z14.object({
11584
- cleared: z14.number()
11564
+ var metaDraftClearResponseSchema = z13.object({
11565
+ cleared: z13.number()
11585
11566
  });
11586
- var metaFieldErrorSchema = z14.object({
11587
- path: z14.string(),
11588
- message: z14.string()
11567
+ var metaFieldErrorSchema = z13.object({
11568
+ path: z13.string(),
11569
+ message: z13.string()
11589
11570
  });
11590
- var metaDraftErrorResponseSchema = z14.object({
11591
- code: z14.string(),
11592
- error: z14.string(),
11593
- fields: z14.array(metaFieldErrorSchema).optional()
11571
+ var metaDraftErrorResponseSchema = z13.object({
11572
+ code: z13.string(),
11573
+ error: z13.string(),
11574
+ fields: z13.array(metaFieldErrorSchema).optional()
11594
11575
  });
11595
11576
 
11596
11577
  // src/commands/ads/meta/write-shared.ts
@@ -14544,168 +14525,12 @@ Examples:
14544
14525
  }
14545
14526
  });
14546
14527
 
14547
- // src/commands/analytics/index.ts
14548
- import { defineCommand as defineCommand85 } from "citty";
14549
-
14550
- // src/commands/winning-ads/shared.ts
14551
- function splitList(value) {
14552
- if (!value) {
14553
- return [];
14554
- }
14555
- return value.split(",").map((v) => v.trim()).filter(Boolean);
14556
- }
14557
- function reportError(err) {
14558
- if (err instanceof ApiError) {
14559
- writeJson({ ok: false, error: { code: err.code, message: err.message } });
14560
- process.exit(1);
14561
- }
14562
- writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
14563
- process.exit(1);
14564
- }
14565
-
14566
- // src/commands/analytics/index.ts
14567
- var PERIODS = "today|7d|28d|90d";
14568
- var NO_TRAFFIC_HINT = "No visits recorded in this window. Analytics counts real visitors on published pages only \u2014 previews, bots, and pre-consent traffic are excluded.";
14569
- function rowsEmpty(response) {
14570
- return response.rows.length === 0 || response.rows.every((row) => Object.values(row).every((v) => v === 0 || v === "" || v === null));
14571
- }
14572
- var OVERVIEW_SPEC = {
14573
- report: "overview",
14574
- description: "Headline traffic numbers: pageviews, unique visitors, sessions, form submits. Start here. Example: baker analytics overview --period 7d",
14575
- hasLimit: false,
14576
- hints: (response) => rowsEmpty(response) ? [NO_TRAFFIC_HINT] : [
14577
- "Drill down: `baker analytics pages` (top pages), `baker analytics sources` (where visitors come from), `baker analytics timeseries` (daily trend)."
14578
- ]
14579
- };
14580
- var REPORTS = [
14581
- OVERVIEW_SPEC,
14582
- {
14583
- report: "timeseries",
14584
- description: "Daily pageviews, visitors, and form submits \u2014 spot trends and campaign spikes. Example: baker analytics timeseries --period 28d --output md",
14585
- hasLimit: false,
14586
- hints: (response) => rowsEmpty(response) ? [NO_TRAFFIC_HINT] : []
14587
- },
14588
- {
14589
- report: "pages",
14590
- description: "Top pages by pageviews, with visitors and form submits per page \u2014 find what converts. Example: baker analytics pages --period 28d --limit 20",
14591
- hasLimit: true,
14592
- hints: (response) => rowsEmpty(response) ? [NO_TRAFFIC_HINT] : [
14593
- "A page with high pageviews but zero form_submits is a conversion-rate candidate \u2014 audit it with the landing skill."
14594
- ]
14595
- },
14596
- {
14597
- report: "sources",
14598
- description: "Top traffic sources (utm_source, else referrer domain, else direct) with visitors and form submits. Example: baker analytics sources --period 28d",
14599
- hasLimit: true,
14600
- hints: (response) => rowsEmpty(response) ? [NO_TRAFFIC_HINT] : []
14601
- },
14602
- {
14603
- report: "events",
14604
- description: "Non-pageview events (form_submit + custom events) with totals, sessions, and visitors. Example: baker analytics events --period 90d",
14605
- hasLimit: true,
14606
- hints: (response) => rowsEmpty(response) ? [
14607
- "No events in this window. Forms report `form_submit` automatically on published pages; custom events come from `window.__bakerAnalytics.track(name)`."
14608
- ] : []
14609
- }
14610
- ];
14611
- function parseLimit(value) {
14612
- if (!value) return void 0;
14613
- const limit = Number(value);
14614
- return Number.isInteger(limit) && limit >= 1 && limit <= 100 ? limit : "invalid";
14615
- }
14616
- function parseFields(value) {
14617
- if (!value) return void 0;
14618
- const fields = String(value).split(",").map((f) => f.trim()).filter(Boolean);
14619
- return fields.length > 0 ? fields : void 0;
14620
- }
14621
- function buildSubcommand(spec) {
14622
- registerSchema({
14623
- command: `analytics.${spec.report}`,
14624
- description: spec.description,
14625
- args: {
14626
- period: { type: "string", description: `Time window: ${PERIODS} (default 28d)`, required: false, default: "28d" },
14627
- ...spec.hasLimit ? { limit: { type: "number", description: "Max rows 1-100 (default per report)", required: false } } : {},
14628
- output: { type: "string", description: "Output format: json|files|md", required: false, default: "json" },
14629
- fields: { type: "string", description: "Comma-separated field names to include", required: false }
14630
- }
14631
- });
14632
- return defineCommand85({
14633
- meta: { name: spec.report, description: spec.description },
14634
- args: {
14635
- period: { type: "string", description: `Time window: ${PERIODS} (default 28d)`, default: "28d" },
14636
- ...spec.hasLimit ? { limit: { type: "string", description: "Max rows 1-100" } } : {},
14637
- output: { type: "string", description: "Output format: json|files|md", default: "json" },
14638
- fields: { type: "string", description: "Comma-separated field names to include" }
14639
- },
14640
- run: async ({ args }) => {
14641
- try {
14642
- const limit = parseLimit("limit" in args ? args.limit : void 0);
14643
- if (limit === "invalid") {
14644
- writeJson({ ok: false, error: { code: "VALIDATION_ERROR", message: "--limit must be an integer 1-100" } });
14645
- process.exit(1);
14646
- }
14647
- const body = { report: spec.report, period: String(args.period || "28d") };
14648
- if (limit !== void 0) body.limit = limit;
14649
- const response = await apiPost("/api/analytics/query", body);
14650
- const format = args.output || "json";
14651
- if (format === "json") {
14652
- writeJson({ ok: true, data: response, meta: { count: response.rows.length }, hints: spec.hints(response) });
14653
- return;
14654
- }
14655
- writeOutput({ ok: true, data: response.rows }, format, parseFields(args.fields), false, (record) => record);
14656
- } catch (err) {
14657
- reportError(err);
14658
- }
14659
- }
14660
- });
14661
- }
14662
- var subCommands = Object.fromEntries(REPORTS.map((spec) => [spec.report, buildSubcommand(spec)]));
14663
- var analyticsCommand2 = defineCommand85({
14664
- meta: {
14665
- name: "analytics",
14666
- description: `Read the client's landing-page analytics: first-party pageviews, visitors, sessions, and form submits collected on every published page (no setup needed \u2014 it is always on, consent-aware, and excludes previews/bots).
14667
-
14668
- Start here: baker analytics overview --period 7d
14669
-
14670
- Reports:
14671
- overview headline numbers (pageviews, visitors, sessions, form submits)
14672
- timeseries daily trend
14673
- pages top pages (find what converts)
14674
- sources where visitors come from (utm_source \u2192 referrer \u2192 direct)
14675
- events form_submit + custom events
14676
-
14677
- All reports take --period ${PERIODS} (default 28d). List-style reports take --limit. Data is read-only and scoped to this client.
14678
-
14679
- Examples:
14680
- baker analytics overview
14681
- baker analytics pages --period 7d --limit 20 --output md
14682
- baker analytics sources --period 90d`
14683
- },
14684
- subCommands,
14685
- run: async () => {
14686
- try {
14687
- const response = await apiPost("/api/analytics/query", {
14688
- report: "overview",
14689
- period: "28d"
14690
- });
14691
- writeJson({
14692
- ok: true,
14693
- data: response,
14694
- meta: { count: response.rows.length },
14695
- hints: OVERVIEW_SPEC.hints(response)
14696
- });
14697
- } catch (err) {
14698
- reportError(err);
14699
- }
14700
- }
14701
- });
14702
-
14703
14528
  // src/commands/canvas/index.ts
14704
- import { defineCommand as defineCommand96 } from "citty";
14529
+ import { defineCommand as defineCommand95 } from "citty";
14705
14530
 
14706
14531
  // src/commands/canvas/catalog.ts
14707
- import { defineCommand as defineCommand86 } from "citty";
14708
- var catalogCommand = defineCommand86({
14532
+ import { defineCommand as defineCommand85 } from "citty";
14533
+ var catalogCommand = defineCommand85({
14709
14534
  meta: {
14710
14535
  name: "catalog",
14711
14536
  description: "Print the agent-facing node catalog (JSON Schema). Includes every registered node grouped by category."
@@ -14720,7 +14545,7 @@ var catalogCommand = defineCommand86({
14720
14545
  // src/commands/canvas/critique.ts
14721
14546
  import { readFile } from "fs/promises";
14722
14547
  import path from "path";
14723
- import { defineCommand as defineCommand87 } from "citty";
14548
+ import { defineCommand as defineCommand86 } from "citty";
14724
14549
 
14725
14550
  // src/engine/scaffold/lib/critique.ts
14726
14551
  var VIBE_CUE = /\b(light|lighting|golden|moody|warm|cool|tone|grade|contrast|shadow|glow|rim|backlit|neon|soft)\b/i;
@@ -14840,7 +14665,7 @@ function critiqueCanvas(canvas) {
14840
14665
  }
14841
14666
 
14842
14667
  // src/commands/canvas/critique.ts
14843
- var critiqueCommand = defineCommand87({
14668
+ var critiqueCommand = defineCommand86({
14844
14669
  meta: {
14845
14670
  name: "critique",
14846
14671
  description: "Pre-spend creative critic (ADVISORY \u2014 never blocks). Scores a scaffolded creative BEFORE the billed render, so weak spots get fixed for free. A VIDEO creative is scored on hook strength, sound-off first-frame legibility, retention risk, and mechanism clarity; a STATIC ad on baked-text legibility risk, identity grounding, brand-type fidelity, and mechanism clarity. Ground a video hook against `baker winning-ads hooks` for a proven pattern."
@@ -14882,9 +14707,9 @@ import { execFile } from "child_process";
14882
14707
  import { readdir, readFile as readFile2, stat } from "fs/promises";
14883
14708
  import path2 from "path";
14884
14709
  import { promisify } from "util";
14885
- import { defineCommand as defineCommand88 } from "citty";
14710
+ import { defineCommand as defineCommand87 } from "citty";
14886
14711
  var execFileAsync = promisify(execFile);
14887
- var inspectCommand = defineCommand88({
14712
+ var inspectCommand = defineCommand87({
14888
14713
  meta: {
14889
14714
  name: "inspect",
14890
14715
  description: "Dump a one-page summary of a canvas run: per-node duration + cache status, list of output files in the run dir, and optionally three thumbnail frames per video output. Pass either a run_id (resolved against --outputs-dir) or an absolute run directory."
@@ -14992,12 +14817,12 @@ async function probeDuration(filePath) {
14992
14817
 
14993
14818
  // src/commands/canvas/rerun.ts
14994
14819
  import path13 from "path";
14995
- import { defineCommand as defineCommand90 } from "citty";
14820
+ import { defineCommand as defineCommand89 } from "citty";
14996
14821
 
14997
14822
  // src/commands/canvas/run.ts
14998
14823
  import { readFile as readFile9 } from "fs/promises";
14999
14824
  import path12 from "path";
15000
- import { defineCommand as defineCommand89 } from "citty";
14825
+ import { defineCommand as defineCommand88 } from "citty";
15001
14826
 
15002
14827
  // src/commands/canvas/placeholders.ts
15003
14828
  function unsuppliedPlaceholderAssets(canvas) {
@@ -15159,7 +14984,7 @@ import { toCardinal as nwKo } from "n2words/ko-KR";
15159
14984
  import { toCardinal as nwNl } from "n2words/nl-NL";
15160
14985
  import { toCardinal as nwPl } from "n2words/pl-PL";
15161
14986
  import { toCardinal as nwPt } from "n2words/pt-PT";
15162
- import { z as z15 } from "zod";
14987
+ import { z as z14 } from "zod";
15163
14988
 
15164
14989
  // src/engine/scaffold/lib/shoot-modes.ts
15165
14990
  var SHOOT_MODES = [
@@ -15495,71 +15320,71 @@ function trimArgs(durationS, offsetS = 0, dims) {
15495
15320
  "{{out.video}}"
15496
15321
  ];
15497
15322
  }
15498
- var FrameAsset = z15.object({ url: z15.string().optional() }).loose().optional();
15499
- var DialogueLine = z15.object({
15500
- speaker: z15.string().optional(),
15501
- line: z15.string().optional(),
15323
+ var FrameAsset = z14.object({ url: z14.string().optional() }).loose().optional();
15324
+ var DialogueLine = z14.object({
15325
+ speaker: z14.string().optional(),
15326
+ line: z14.string().optional(),
15502
15327
  // Absolute seconds on the source timeline (the deconstruct emits both).
15503
- start_s: z15.number().optional(),
15504
- end_s: z15.number().optional(),
15505
- delivery: z15.string().optional(),
15506
- voice_description: z15.string().optional(),
15328
+ start_s: z14.number().optional(),
15329
+ end_s: z14.number().optional(),
15330
+ delivery: z14.string().optional(),
15331
+ voice_description: z14.string().optional(),
15507
15332
  // DECON-supplied: is this speaker's FACE visibly speaking in THIS scene? Element
15508
15333
  // presence alone can't answer that — a founder pictured in a polaroid close-up is
15509
15334
  // "present" yet the line is voiceover, and treating it as on-camera produced a
15510
15335
  // native Seedance lip-sync clip of a still photograph. `false` pins the line to
15511
15336
  // the VO path; absent keeps the presence-based decision (old blueprints).
15512
- on_camera: z15.boolean().optional()
15337
+ on_camera: z14.boolean().optional()
15513
15338
  }).loose();
15514
- var Sfx = z15.object({
15515
- at_s: z15.number().optional(),
15516
- duration_s: z15.number().optional(),
15517
- sound_effect_prompt: z15.string().optional(),
15518
- description: z15.string().optional()
15339
+ var Sfx = z14.object({
15340
+ at_s: z14.number().optional(),
15341
+ duration_s: z14.number().optional(),
15342
+ sound_effect_prompt: z14.string().optional(),
15343
+ description: z14.string().optional()
15519
15344
  }).loose();
15520
- var CompositionRegion = z15.object({
15345
+ var CompositionRegion = z14.object({
15521
15346
  // full | top | bottom | left | right | inset
15522
- panel: z15.string().optional(),
15347
+ panel: z14.string().optional(),
15523
15348
  // 9-grid anchor for an `inset` presenter box.
15524
- position: z15.string().optional(),
15525
- is_presenter: z15.boolean().optional(),
15349
+ position: z14.string().optional(),
15350
+ is_presenter: z14.boolean().optional(),
15526
15351
  // The cast id shown/speaking in this region (routes lip-sync + element refs).
15527
- cast_ref: z15.string().optional(),
15352
+ cast_ref: z14.string().optional(),
15528
15353
  // What the region's content IS: camera | screen_capture | static_graphic |
15529
15354
  // generated. Authoritative for routing when present (regex-over-prose fallback
15530
15355
  // otherwise): screen_capture/static_graphic are rebuilt from REAL surfaces on the
15531
15356
  // overlay layer, never AI-generated.
15532
- kind: z15.string().optional(),
15357
+ kind: z14.string().optional(),
15533
15358
  // Opaque id naming the SPECIFIC on-screen document/note/app-state this
15534
15359
  // screen_capture region shows. Two scenes share it only when they show the SAME
15535
15360
  // recording continuing (scrolling/typing/waiting within it) — a genuinely
15536
15361
  // DIFFERENT document/note/recording (a source video splicing two screen captures)
15537
15362
  // gets a different id. Breaks a persistent-layout run into separate surface stubs
15538
15363
  // instead of asking the operator for one screenshot that can't cover both.
15539
- surface_id: z15.string().optional(),
15364
+ surface_id: z14.string().optional(),
15540
15365
  // Camera bubble(s)/inset(s) embedded INSIDE this region's surface (a Loom-style
15541
15366
  // presenter bubble inside a screen recording) — video-in-video the reproduction
15542
15367
  // must re-composite, not paint into the surface.
15543
- nested: z15.array(z15.object({}).loose()).optional(),
15544
- summary: z15.string().optional(),
15545
- frame_prompt: z15.string().optional(),
15546
- motion_prompt: z15.string().optional()
15368
+ nested: z14.array(z14.object({}).loose()).optional(),
15369
+ summary: z14.string().optional(),
15370
+ frame_prompt: z14.string().optional(),
15371
+ motion_prompt: z14.string().optional()
15547
15372
  }).loose();
15548
- var SceneComposition = z15.object({
15373
+ var SceneComposition = z14.object({
15549
15374
  // full_frame (default) | split_screen | pip | keyed_overlay
15550
- layout: z15.string().optional(),
15375
+ layout: z14.string().optional(),
15551
15376
  // split_screen only: vertical (top/bottom) | horizontal (left/right).
15552
- split_axis: z15.string().optional(),
15553
- regions: z15.array(CompositionRegion).optional()
15377
+ split_axis: z14.string().optional(),
15378
+ regions: z14.array(CompositionRegion).optional()
15554
15379
  }).loose();
15555
- var CameraMotion = z15.object({ movement: z15.string().optional(), detail: z15.string().optional() }).loose();
15556
- var TranscriptWord = z15.object({ text: z15.string().optional() }).loose();
15557
- var Scene = z15.object({
15558
- start_s: z15.number().optional(),
15559
- end_s: z15.number().optional(),
15560
- duration_s: z15.number().optional(),
15561
- summary: z15.string().optional(),
15562
- action_detail: z15.string().optional(),
15380
+ var CameraMotion = z14.object({ movement: z14.string().optional(), detail: z14.string().optional() }).loose();
15381
+ var TranscriptWord = z14.object({ text: z14.string().optional() }).loose();
15382
+ var Scene = z14.object({
15383
+ start_s: z14.number().optional(),
15384
+ end_s: z14.number().optional(),
15385
+ duration_s: z14.number().optional(),
15386
+ summary: z14.string().optional(),
15387
+ action_detail: z14.string().optional(),
15563
15388
  // The scene's spatial layout. Absent/full_frame ⇒ one uncut shot (default path).
15564
15389
  // A layered layout (split_screen/pip/keyed_overlay) with regions ⇒ the scaffold
15565
15390
  // builds one clip per region and stacks/overlays them into the scene picture.
@@ -15567,82 +15392,82 @@ var Scene = z15.object({
15567
15392
  // The capture "look" for this scene — selected from the ad-native shoot-mode
15568
15393
  // grammar (see lib/shoot-modes.ts). When absent the scaffold auto-derives a
15569
15394
  // UGC/product mode; a human can override per scene by setting this.
15570
- shoot_mode: z15.string().optional(),
15395
+ shoot_mode: z14.string().optional(),
15571
15396
  // Diegetic ambient the clip's native audio should carry (no music). When
15572
15397
  // absent the scene falls back to its shoot mode's default ambience.
15573
- ambient: z15.string().optional(),
15398
+ ambient: z14.string().optional(),
15574
15399
  camera_motion: CameraMotion.optional(),
15575
- start_frame_prompt: z15.string().optional(),
15576
- end_frame_prompt: z15.string().optional(),
15577
- motion_prompt: z15.string().optional(),
15400
+ start_frame_prompt: z14.string().optional(),
15401
+ end_frame_prompt: z14.string().optional(),
15402
+ motion_prompt: z14.string().optional(),
15578
15403
  // The scene's role in the ad's persuasion arc (DECON-supplied); drives the
15579
15404
  // script re-craft checklist. Inferred from position when absent.
15580
- narrative_role: z15.string().optional(),
15405
+ narrative_role: z14.string().optional(),
15581
15406
  // DECON-supplied on the HOOK scene: the engineered physical/emotional state that
15582
15407
  // makes the first frame stop the scroll (sweaty/breathless/urgent …). Injected
15583
15408
  // into the hook's start-frame description so the generator renders that state,
15584
15409
  // not a calm influencer (CCA-11).
15585
- hook_mechanic: z15.object({ mechanic: z15.string().optional(), why_it_stops_scroll: z15.string().optional() }).loose().optional(),
15410
+ hook_mechanic: z14.object({ mechanic: z14.string().optional(), why_it_stops_scroll: z14.string().optional() }).loose().optional(),
15586
15411
  // DECON-supplied per-scene location (so a gym hook isn't flattened to "home").
15587
- scene_setting: z15.string().optional(),
15412
+ scene_setting: z14.string().optional(),
15588
15413
  // How this scene cuts to the next (DECON-supplied). A recognized non-cut type
15589
15414
  // (fade/whip/zoom/dissolve/swipe) is reproduced as an ffmpeg xfade at the
15590
15415
  // boundary; cut/match_cut/none/other stay hard cuts. The last scene's value is
15591
15416
  // ignored (nothing follows it).
15592
- transition_out: z15.object({ type: z15.string().optional(), description: z15.string().optional() }).loose().optional(),
15593
- dialogue: z15.array(DialogueLine).optional(),
15594
- sfx: z15.array(Sfx).optional(),
15595
- overlays: z15.array(z15.unknown()).optional(),
15596
- floating_elements: z15.array(z15.unknown()).optional(),
15417
+ transition_out: z14.object({ type: z14.string().optional(), description: z14.string().optional() }).loose().optional(),
15418
+ dialogue: z14.array(DialogueLine).optional(),
15419
+ sfx: z14.array(Sfx).optional(),
15420
+ overlays: z14.array(z14.unknown()).optional(),
15421
+ floating_elements: z14.array(z14.unknown()).optional(),
15597
15422
  // DECON-supplied: how much the picture itself moves within the shot. Gates the
15598
15423
  // flash-hold optimization — a sub-2s b-roll flash with REAL subject motion
15599
15424
  // (pouring, spreading, hands working) must stay a real clip; freezing it turns
15600
15425
  // a montage into a slideshow. Absent (old blueprints) keeps the cheap still.
15601
- motion_level: z15.enum(["static", "subtle", "dynamic"]).optional(),
15602
- transcript_slice: z15.array(TranscriptWord).optional(),
15426
+ motion_level: z14.enum(["static", "subtle", "dynamic"]).optional(),
15427
+ transcript_slice: z14.array(TranscriptWord).optional(),
15603
15428
  start_frame_asset: FrameAsset,
15604
15429
  end_frame_asset: FrameAsset,
15605
15430
  // DECON-supplied: true when this scene is a length-split CONTINUATION of the
15606
15431
  // previous one (the SAME physical shot, broken up only because it exceeded the
15607
15432
  // clip ceiling). The scaffold then shares the splice keyframe — this scene's
15608
15433
  // start frame IS the previous scene's end frame — so the join is seamless.
15609
- continues_previous: z15.boolean().optional()
15434
+ continues_previous: z14.boolean().optional()
15610
15435
  }).loose();
15611
- var VideoBlueprint = z15.object({
15612
- source: z15.object({ aspect_ratio: z15.string().optional(), duration_s: z15.number().optional() }).loose().optional(),
15613
- global: z15.object({
15614
- music: z15.object({
15615
- present: z15.boolean().optional(),
15616
- music_prompt: z15.string().optional(),
15436
+ var VideoBlueprint = z14.object({
15437
+ source: z14.object({ aspect_ratio: z14.string().optional(), duration_s: z14.number().optional() }).loose().optional(),
15438
+ global: z14.object({
15439
+ music: z14.object({
15440
+ present: z14.boolean().optional(),
15441
+ music_prompt: z14.string().optional(),
15617
15442
  // Absolute second the music enters in the reference (the bed often
15618
15443
  // kicks in mid-ad, after the hook). We start the regenerated track here
15619
15444
  // instead of at 0 so the timing matches.
15620
- starts_at_s: z15.number().optional(),
15445
+ starts_at_s: z14.number().optional(),
15621
15446
  // Populated by the deconstruct when AudD (Shazam-style) recognizes the
15622
15447
  // reference track. We never reuse it — only style the regenerated bed.
15623
- identified_track: z15.object({ title: z15.string().optional(), artist: z15.string().optional() }).loose().nullish()
15448
+ identified_track: z14.object({ title: z14.string().optional(), artist: z14.string().optional() }).loose().nullish()
15624
15449
  }).loose().optional(),
15625
- cast: z15.array(
15626
- z15.object({
15627
- id: z15.string().optional(),
15628
- description: z15.string().optional(),
15450
+ cast: z14.array(
15451
+ z14.object({
15452
+ id: z14.string().optional(),
15453
+ description: z14.string().optional(),
15629
15454
  // The deconstruct's note on the target-market localization (e.g. "native
15630
15455
  // French speaker") — read to derive the spoken-track language code.
15631
- market_localization_note: z15.string().optional()
15456
+ market_localization_note: z14.string().optional()
15632
15457
  }).loose()
15633
15458
  ).optional(),
15634
- voiceover: z15.object({
15459
+ voiceover: z14.object({
15635
15460
  // on_camera | mixed → mouths are on screen (lip-sync candidates);
15636
15461
  // voiceover | none → narration over the picture (no lip-sync).
15637
- mode: z15.string().optional(),
15638
- voice_description: z15.string().optional(),
15639
- persona: z15.string().optional()
15462
+ mode: z14.string().optional(),
15463
+ voice_description: z14.string().optional(),
15464
+ persona: z14.string().optional()
15640
15465
  }).loose().optional(),
15641
15466
  // Visual palette — read only to colour a clean brand-card/CTA plate (the
15642
15467
  // first hex is the dominant brand colour); never to drive frame generation.
15643
- style: z15.object({ palette: z15.array(z15.object({ hex: z15.string().optional() }).loose()).optional() }).loose().optional()
15468
+ style: z14.object({ palette: z14.array(z14.object({ hex: z14.string().optional() }).loose()).optional() }).loose().optional()
15644
15469
  }).loose().optional(),
15645
- scenes: z15.array(Scene).min(1)
15470
+ scenes: z14.array(Scene).min(1)
15646
15471
  }).loose();
15647
15472
  function injectHookPhysicality(blueprint) {
15648
15473
  for (const scene of blueprint.scenes) {
@@ -15659,26 +15484,26 @@ function clipIntentOf(scene, sceneIndex) {
15659
15484
  if (/hero|reveal|product|payoff|transformation|result/.test(role) || scene.motion_level === "dynamic") return "hero";
15660
15485
  return "body";
15661
15486
  }
15662
- var AppearsItem = z15.union([z15.number(), z15.object({ scene: z15.number(), edge: z15.string().optional() }).loose()]);
15663
- var RecurringElement = z15.object({
15487
+ var AppearsItem = z14.union([z14.number(), z14.object({ scene: z14.number(), edge: z14.string().optional() }).loose()]);
15488
+ var RecurringElement = z14.object({
15664
15489
  // person | animal | product | logo | badge | other
15665
- type: z15.string(),
15666
- label: z15.string().optional(),
15667
- description: z15.string().optional(),
15668
- expression: z15.string().nullable().optional(),
15490
+ type: z14.string(),
15491
+ label: z14.string().optional(),
15492
+ description: z14.string().optional(),
15493
+ expression: z14.string().nullable().optional(),
15669
15494
  // When the element maps to a global cast entry, its stable id (for annotation).
15670
- cast_id: z15.string().nullable().optional(),
15495
+ cast_id: z14.string().nullable().optional(),
15671
15496
  // The label of another element that is the SAME individual as this one, shown
15672
15497
  // in a DIFFERENT wardrobe/persona/state (e.g. one creator playing skeptic in a
15673
15498
  // pink shirt and believer in a white shirt). Each look gets its own reference
15674
15499
  // slot, but the face/identity must stay identical across them.
15675
- same_as: z15.string().nullable().optional(),
15500
+ same_as: z14.string().nullable().optional(),
15676
15501
  // Scenes the element appears in. Either a bare list of scene indices (both
15677
15502
  // edges) or per-{scene,edge} entries. Both forms are accepted and merged.
15678
- scenes: z15.array(z15.number()).optional(),
15679
- appears_in: z15.array(AppearsItem).optional()
15503
+ scenes: z14.array(z14.number()).optional(),
15504
+ appears_in: z14.array(AppearsItem).optional()
15680
15505
  }).loose();
15681
- var RecurringElements = z15.array(RecurringElement);
15506
+ var RecurringElements = z14.array(RecurringElement);
15682
15507
  function sanitizeId(raw, fallback) {
15683
15508
  const id = raw.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
15684
15509
  return /^[a-z]/.test(id) ? id : `${fallback}_${id}`.replace(/_+$/g, "") || fallback;
@@ -16151,7 +15976,7 @@ function scrubFloatSentences(text, floatDescs) {
16151
15976
  return kept;
16152
15977
  }
16153
15978
  function sceneFloatDescs(scene) {
16154
- const floats = z15.array(FloatingElement).safeParse(scene.floating_elements ?? []);
15979
+ const floats = z14.array(FloatingElement).safeParse(scene.floating_elements ?? []);
16155
15980
  if (!floats.success) return [];
16156
15981
  return floats.data.map((f) => f.description?.trim() ?? "").filter(Boolean);
16157
15982
  }
@@ -17575,25 +17400,25 @@ function buildSfxMusic(blueprint, clock, nodes) {
17575
17400
  }
17576
17401
  return tracks;
17577
17402
  }
17578
- var OverlayStyle = z15.object({ color_hex: z15.string().optional(), background: z15.string().optional(), size: z15.string().optional() }).loose();
17579
- var Overlay = z15.object({
17580
- text: z15.string().optional(),
17581
- appears_at_s: z15.number().optional(),
17582
- duration_s: z15.number().optional(),
17583
- position: z15.string().optional(),
17584
- role: z15.string().optional(),
17585
- animation: z15.string().optional(),
17586
- animation_detail: z15.string().optional(),
17403
+ var OverlayStyle = z14.object({ color_hex: z14.string().optional(), background: z14.string().optional(), size: z14.string().optional() }).loose();
17404
+ var Overlay = z14.object({
17405
+ text: z14.string().optional(),
17406
+ appears_at_s: z14.number().optional(),
17407
+ duration_s: z14.number().optional(),
17408
+ position: z14.string().optional(),
17409
+ role: z14.string().optional(),
17410
+ animation: z14.string().optional(),
17411
+ animation_detail: z14.string().optional(),
17587
17412
  style: OverlayStyle.optional()
17588
17413
  }).loose();
17589
- var FloatingElement = z15.object({
17590
- kind: z15.string().optional(),
17591
- description: z15.string().optional(),
17592
- brand_name: z15.string().nullish(),
17593
- what_it_represents: z15.string().optional(),
17594
- appears_at_s: z15.number().optional(),
17595
- duration_s: z15.number().optional(),
17596
- position: z15.string().optional()
17414
+ var FloatingElement = z14.object({
17415
+ kind: z14.string().optional(),
17416
+ description: z14.string().optional(),
17417
+ brand_name: z14.string().nullish(),
17418
+ what_it_represents: z14.string().optional(),
17419
+ appears_at_s: z14.number().optional(),
17420
+ duration_s: z14.number().optional(),
17421
+ position: z14.string().optional()
17597
17422
  }).loose();
17598
17423
  function escapeHtml(s) {
17599
17424
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
@@ -17625,7 +17450,7 @@ function positionClass(position) {
17625
17450
  function collectCaptions(blueprint, clock) {
17626
17451
  return blueprint.scenes.flatMap((scene, i) => {
17627
17452
  const sceneStart = scene.start_s ?? 0;
17628
- const overlays = z15.array(Overlay).safeParse(scene.overlays ?? []);
17453
+ const overlays = z14.array(Overlay).safeParse(scene.overlays ?? []);
17629
17454
  return overlays.success ? overlays.data.filter((ov) => Boolean(ov.text?.trim())).map((ov) => {
17630
17455
  const at = clock.map(i, ov.appears_at_s ?? sceneStart);
17631
17456
  return { text: ov.text.trim(), at, end: at + (ov.duration_s ?? 2.5), ov };
@@ -17705,7 +17530,7 @@ function collectFloatWindows(blueprint, uiRouted, clock) {
17705
17530
  const windows = /* @__PURE__ */ new Map();
17706
17531
  blueprint.scenes.forEach((scene, i) => {
17707
17532
  const sceneStart = scene.start_s ?? 0;
17708
- const floats = z15.array(FloatingElement).safeParse(scene.floating_elements ?? []);
17533
+ const floats = z14.array(FloatingElement).safeParse(scene.floating_elements ?? []);
17709
17534
  if (!floats.success) return;
17710
17535
  for (const fe of floats.data) {
17711
17536
  const at = clock.map(i, fe.appears_at_s ?? sceneStart);
@@ -18153,8 +17978,8 @@ function buildMotionBoard(blueprint) {
18153
17978
  const end_s = scene.end_s ?? start_s + sceneDurationS(scene);
18154
17979
  cursor = end_s;
18155
17980
  const spoken = sceneSpokenText(scene);
18156
- const overlays = z15.array(Overlay).safeParse(scene.overlays ?? []);
18157
- const floats = z15.array(FloatingElement).safeParse(scene.floating_elements ?? []);
17981
+ const overlays = z14.array(Overlay).safeParse(scene.overlays ?? []);
17982
+ const floats = z14.array(FloatingElement).safeParse(scene.floating_elements ?? []);
18158
17983
  const graphics = [
18159
17984
  ...(overlays.success ? overlays.data : []).filter((ov) => ov.text?.trim()).map((ov) => ({
18160
17985
  kind: "text",
@@ -19120,7 +18945,7 @@ async function restoreRunSnapshot(manifest, targetDir, opts = {}) {
19120
18945
  }
19121
18946
 
19122
18947
  // src/commands/canvas/run.ts
19123
- var runCommand = defineCommand89({
18948
+ var runCommand = defineCommand88({
19124
18949
  meta: { name: "run", description: "Validate and execute a canvas JSON file." },
19125
18950
  args: {
19126
18951
  file: { type: "positional", required: true, description: "Path to canvas JSON" },
@@ -19486,7 +19311,7 @@ async function postInitialRunRecord(client, payload) {
19486
19311
 
19487
19312
  // src/commands/canvas/rerun.ts
19488
19313
  var SLUG_PATTERN = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
19489
- var rerunCommand = defineCommand90({
19314
+ var rerunCommand = defineCommand89({
19490
19315
  meta: {
19491
19316
  name: "rerun",
19492
19317
  description: "Re-run a creative's latest recorded canvas. Restores its definition files from run history first, so it works in a fresh workspace that never had the source chat's files \u2014 an interrupted run resumes (in-flight jobs re-attach), a completed one re-renders from the cache."
@@ -19583,10 +19408,10 @@ async function fetchManifest(url) {
19583
19408
  // src/commands/canvas/scaffold-static-ad.ts
19584
19409
  import { access, mkdir as mkdir5, readFile as readFile11, writeFile as writeFile6 } from "fs/promises";
19585
19410
  import path17 from "path";
19586
- import { defineCommand as defineCommand92 } from "citty";
19411
+ import { defineCommand as defineCommand91 } from "citty";
19587
19412
 
19588
19413
  // src/engine/scaffold/staticAd.ts
19589
- import { z as z16 } from "zod";
19414
+ import { z as z15 } from "zod";
19590
19415
  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"]);
19591
19416
  var DEFAULT_ASPECT_RATIO = "9:16";
19592
19417
  var SHEET_SUBJECT_TYPE2 = {
@@ -19595,24 +19420,27 @@ var SHEET_SUBJECT_TYPE2 = {
19595
19420
  };
19596
19421
  var ACTOR_SHEET_MODEL2 = "google/gemini-3-pro-image-preview";
19597
19422
  var ACTOR_SHEET_IMAGE_SIZE = "4K";
19598
- var Blueprint = z16.object({
19599
- meta: z16.object({ estimated_aspect_ratio: z16.string().optional() }).loose().optional(),
19600
- text_content: z16.array(z16.object({ text: z16.string().optional() }).loose()).optional()
19423
+ var ADAPT_MODEL = "google/gemini-3-pro-image-preview";
19424
+ var ADAPT_IMAGE_SIZE = "2K";
19425
+ 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.";
19426
+ var Blueprint = z15.object({
19427
+ meta: z15.object({ estimated_aspect_ratio: z15.string().optional() }).loose().optional(),
19428
+ text_content: z15.array(z15.object({ text: z15.string().optional() }).loose()).optional()
19601
19429
  }).loose();
19602
- var ElementLocator = z16.object({
19603
- collection: z16.enum(["subjects", "people", "brands_logos"]),
19604
- index: z16.number().int().nonnegative()
19430
+ var ElementLocator = z15.object({
19431
+ collection: z15.enum(["subjects", "people", "brands_logos"]),
19432
+ index: z15.number().int().nonnegative()
19605
19433
  }).loose();
19606
- var MainElement = z16.object({
19434
+ var MainElement = z15.object({
19607
19435
  // logo | product | person | animal | badge | other
19608
- type: z16.string(),
19609
- label: z16.string().optional(),
19610
- description: z16.string().optional(),
19611
- expression: z16.string().nullable().optional(),
19612
- reason: z16.string().optional(),
19436
+ type: z15.string(),
19437
+ label: z15.string().optional(),
19438
+ description: z15.string().optional(),
19439
+ expression: z15.string().nullable().optional(),
19440
+ reason: z15.string().optional(),
19613
19441
  locator: ElementLocator.optional()
19614
19442
  }).loose();
19615
- var MainElements = z16.array(MainElement);
19443
+ var MainElements = z15.array(MainElement);
19616
19444
  function sanitizeId2(raw, fallback) {
19617
19445
  const id = raw.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "");
19618
19446
  return /^[a-z]/.test(id) ? id : `${fallback}_${id}`.replace(/_+$/g, "") || fallback;
@@ -19675,6 +19503,16 @@ function aspectRatio(blueprint, opts) {
19675
19503
  const requested = opts.aspectRatio ?? blueprint.meta?.estimated_aspect_ratio;
19676
19504
  return requested && GEN_ASPECT_RATIOS.has(requested) ? requested : DEFAULT_ASPECT_RATIO;
19677
19505
  }
19506
+ function baseAspectRatio(blueprint, opts) {
19507
+ const requested = aspectRatio(blueprint, opts);
19508
+ if (!opts.placements) return requested;
19509
+ const formats = platformFormats(opts.placements);
19510
+ return formats.includes(requested) ? requested : formats[0] ?? requested;
19511
+ }
19512
+ function outputFormats(blueprint, opts) {
19513
+ if (!opts.placements) return [baseAspectRatio(blueprint, opts)];
19514
+ return [...platformFormats(opts.placements)];
19515
+ }
19678
19516
  function blueprintTextStrings(blueprint) {
19679
19517
  return (blueprint.text_content ?? []).map((t) => typeof t.text === "string" ? t.text.trim() : "").filter((t) => t.length > 0);
19680
19518
  }
@@ -19792,11 +19630,25 @@ function scaffoldStaticAd(input, elementsInput, opts) {
19792
19630
  inputs: { reference, target_blueprint: "$ref:prompt.asset" },
19793
19631
  params: {
19794
19632
  model: opts.genModel,
19795
- aspect_ratio: aspectRatio(blueprint, opts),
19633
+ aspect_ratio: baseAspectRatio(blueprint, opts),
19796
19634
  image_size: "2K",
19797
19635
  prompt
19798
19636
  }
19799
19637
  });
19638
+ const fanOut = opts.placements !== void 0;
19639
+ if (fanOut) {
19640
+ nodes.push({
19641
+ id: "adapt",
19642
+ type: "image_aspect_adapt",
19643
+ inputs: { source: "$ref:gen.images#0" },
19644
+ params: {
19645
+ model: ADAPT_MODEL,
19646
+ platform: opts.placements,
19647
+ guidance: ADAPT_GUIDANCE,
19648
+ image_size: ADAPT_IMAGE_SIZE
19649
+ }
19650
+ });
19651
+ }
19800
19652
  return {
19801
19653
  schema: "baker-canvas/1",
19802
19654
  metadata: {
@@ -19804,7 +19656,7 @@ function scaffoldStaticAd(input, elementsInput, opts) {
19804
19656
  description: "Scaffolded by `baker canvas scaffold-static-ad`. Edit `prompt.json` (the blueprint generated from the source image) into the ad you want, drop a real asset at each [TODO] ingest path (logo/product/subject/badge + brand font), then `baker canvas run`. The original is wired for composition only."
19805
19657
  },
19806
19658
  nodes,
19807
- output: { node: "gen", output: "images" }
19659
+ output: fanOut ? { node: "adapt", output: "images" } : { node: "gen", output: "images" }
19808
19660
  };
19809
19661
  }
19810
19662
  function staticAdReport(input, elementsInput, opts) {
@@ -19821,7 +19673,9 @@ function staticAdReport(input, elementsInput, opts) {
19821
19673
  })),
19822
19674
  includes_font: opts.includeFont !== false,
19823
19675
  actor_sheets: includeActorSheets ? assignElementLabels2(elements).filter(({ el }) => SHEET_SUBJECT_TYPE2[el.type.toLowerCase()]).map(({ label }) => label) : [],
19824
- aspect_ratio: aspectRatio(blueprint, opts)
19676
+ aspect_ratio: baseAspectRatio(blueprint, opts),
19677
+ placements: opts.placements ?? null,
19678
+ output_formats: outputFormats(blueprint, opts)
19825
19679
  };
19826
19680
  }
19827
19681
 
@@ -19841,6 +19695,12 @@ function resolveFormats(aspect) {
19841
19695
  const value = aspect?.trim();
19842
19696
  return value && FORMAT_VALUES.includes(value) ? [value] : ["4:5"];
19843
19697
  }
19698
+ function resolveFormatList(formats) {
19699
+ const valid = [...new Set(formats.map((f) => f.trim()))].filter(
19700
+ (f) => FORMAT_VALUES.includes(f)
19701
+ );
19702
+ return valid.length > 0 ? valid : ["4:5"];
19703
+ }
19844
19704
  function describeBlueprintIntent(blueprint) {
19845
19705
  const intent = blueprint?.ad_intent;
19846
19706
  if (typeof intent === "string" && intent.trim()) return intent.trim();
@@ -19889,7 +19749,7 @@ function isValidScaffoldSlug(slug) {
19889
19749
  // src/commands/canvas/sync-definition.ts
19890
19750
  import { readdir as readdir5, readFile as readFile10, stat as stat3 } from "fs/promises";
19891
19751
  import path16 from "path";
19892
- import { defineCommand as defineCommand91 } from "citty";
19752
+ import { defineCommand as defineCommand90 } from "citty";
19893
19753
 
19894
19754
  // src/commands/canvas/definition-graph.ts
19895
19755
  var MAX_NODES = 300;
@@ -20002,7 +19862,7 @@ async function resolveCanvasPath(inputPath) {
20002
19862
  const chosen = (slug ? canvases.find((name) => name === `${slug}.canvas.json`) : void 0) ?? canvases[0];
20003
19863
  return chosen ? path16.join(dir, chosen) : null;
20004
19864
  }
20005
- var syncDefinitionCommand = defineCommand91({
19865
+ var syncDefinitionCommand = defineCommand90({
20006
19866
  meta: {
20007
19867
  name: "sync-definition",
20008
19868
  description: "Push a creative's current node-graph + input thumbnails to the dashboard without rendering. Runs automatically when you edit a creative's canvas.json or prompt.json."
@@ -20141,6 +20001,25 @@ function resolveModels(args) {
20141
20001
  genModel: pick("gen-model", "image_generate", "openai/gpt-5.4-image-2")
20142
20002
  };
20143
20003
  }
20004
+ var PLATFORM_PLACEMENTS = {
20005
+ meta: "meta_feed_stories",
20006
+ google: "google_demandgen",
20007
+ linkedin: "linkedin",
20008
+ tiktok: "tiktok",
20009
+ youtube: "youtube",
20010
+ x: void 0,
20011
+ other: void 0
20012
+ };
20013
+ function resolvePlacements(placementsFlag, definitionPlatform) {
20014
+ const flag = placementsFlag?.trim();
20015
+ if (flag === void 0 || flag === "") return { ok: true, placements: PLATFORM_PLACEMENTS[definitionPlatform] };
20016
+ if (flag === "none") return { ok: true, placements: void 0 };
20017
+ if (AD_FORMAT_PLATFORMS.includes(flag)) return { ok: true, placements: flag };
20018
+ return {
20019
+ ok: false,
20020
+ message: `--placements "${flag}" is not a valid placement set. Use one of: ${AD_FORMAT_PLATFORMS.join(", ")}, or "none" for a single base ad.`
20021
+ };
20022
+ }
20144
20023
  function regionCount(layout) {
20145
20024
  const regions = layout?.regions;
20146
20025
  return Array.isArray(regions) ? regions.length : 0;
@@ -20211,10 +20090,10 @@ async function runVisionPasses(canvas) {
20211
20090
  return fail2("read_outputs", e instanceof Error ? e.message : String(e));
20212
20091
  }
20213
20092
  }
20214
- var scaffoldStaticAdCommand = defineCommand92({
20093
+ var scaffoldStaticAdCommand = defineCommand91({
20215
20094
  meta: {
20216
20095
  name: "scaffold-static-ad",
20217
- description: "Turn a source/inspiration image into a runnable static-ad canvas. Runs billed passes \u2014 image_describe (the blueprint, baked to prompt.json as the editable 'prompt'), an AI selection of the image's MAIN identity elements, and a structured global-layout pass (the column/row grid with per-region bounds and text sizes) \u2014 then scaffolds a canvas that wires one [TODO] ingest slot per element (logo/product/subject/badge + brand font) into image_generate. Edit prompt.json and drop the real assets, then `baker canvas run` it."
20096
+ description: "Turn a source/inspiration image into a runnable static-ad canvas. Runs billed passes \u2014 image_describe (the blueprint, baked to prompt.json as the editable 'prompt'), an AI selection of the image's MAIN identity elements, and a structured global-layout pass (the column/row grid with per-region bounds and text sizes) \u2014 then scaffolds a canvas that wires one [TODO] ingest slot per element (logo/product/subject/badge + brand font) into image_generate. By default it also fans the hero out to the platform's placement ratios (via image_aspect_adapt \u2014 the hero ratio is free, the rest are billed AI recompositions); pass --placements none for a single base ad, or a preset to pick the set. Edit prompt.json and drop the real assets, then `baker canvas run` it."
20218
20097
  },
20219
20098
  args: {
20220
20099
  file: { type: "positional", required: true, description: "Path or http(s) URL to the source/inspiration image" },
@@ -20227,14 +20106,18 @@ var scaffoldStaticAdCommand = defineCommand92({
20227
20106
  title: { type: "string", description: "Creative title for _definition.md (default: title-cased slug)" },
20228
20107
  platform: {
20229
20108
  type: "string",
20230
- description: "Ad platform for _definition.md (meta|google|linkedin|tiktok|youtube|x|other; default meta)"
20109
+ description: "Ad platform (meta|google|linkedin|tiktok|youtube|x|other; default meta). Sets _definition.md AND, unless --placements is given, the default placement set the hero auto-fans-out to (meta \u2192 4:5+9:16, google \u2192 1:1+4:5+16:9, linkedin \u2192 1:1, tiktok \u2192 9:16, youtube \u2192 16:9; x/other \u2192 none)."
20231
20110
  },
20232
20111
  advertiser: { type: "string", description: "Source advertiser recorded in _definition.md" },
20233
20112
  "describe-model": { type: "string", description: "Override the image_describe model id" },
20234
20113
  "select-model": { type: "string", description: "Override the text_generate model id for element selection" },
20235
20114
  "layout-model": { type: "string", description: "Override the text_generate model id for the layout pass" },
20236
20115
  "gen-model": { type: "string", description: "Override the image_generate model id" },
20237
- aspect: { type: "string", description: "Force the output aspect ratio (else inferred from the image)" },
20116
+ aspect: { type: "string", description: "Force the hero's aspect ratio (else inferred from the image)" },
20117
+ placements: {
20118
+ type: "string",
20119
+ description: "Placement set the hero auto-fans-out to (image_aspect_adapt). One of meta_feed | meta_feed_stories | meta_all | linkedin | google_demandgen | tiktok | youtube, or `none` for a single base ad. Default: derived from --platform (meta \u2192 feed + stories). Each extra ratio is a billed render; the hero ratio passes through free."
20120
+ },
20238
20121
  "skip-font": { type: "boolean", description: "Skip the brand-font \u2192 type-specimen slot" },
20239
20122
  "skip-actor-sheets": {
20240
20123
  type: "boolean",
@@ -20294,6 +20177,13 @@ var scaffoldStaticAdCommand = defineCommand92({
20294
20177
  canvasImageIsUrl = true;
20295
20178
  }
20296
20179
  }
20180
+ const definitionPlatform = resolvePlatform(args.platform ? String(args.platform) : void 0);
20181
+ const placementsResult = resolvePlacements(
20182
+ args.placements ? String(args.placements) : void 0,
20183
+ definitionPlatform
20184
+ );
20185
+ if (!placementsResult.ok) return fail2("invalid_placements", placementsResult.message);
20186
+ const placements = placementsResult.placements;
20297
20187
  const opts = {
20298
20188
  genModel,
20299
20189
  imagePath: canvasImagePath,
@@ -20301,7 +20191,8 @@ var scaffoldStaticAdCommand = defineCommand92({
20301
20191
  blueprintPath: canvasBlueprintPath,
20302
20192
  aspectRatio: args.aspect ? String(args.aspect) : void 0,
20303
20193
  includeFont: !args["skip-font"],
20304
- includeActorSheets: !args["skip-actor-sheets"]
20194
+ includeActorSheets: !args["skip-actor-sheets"],
20195
+ placements
20305
20196
  };
20306
20197
  let canvas;
20307
20198
  let report;
@@ -20327,8 +20218,8 @@ var scaffoldStaticAdCommand = defineCommand92({
20327
20218
  buildCreativeDefinition({
20328
20219
  title: args.title ? String(args.title) : titleFromSlug(slug ?? ""),
20329
20220
  kind: "static",
20330
- platform: resolvePlatform(args.platform ? String(args.platform) : void 0),
20331
- formats: resolveFormats(args.aspect ? String(args.aspect) : report.aspect_ratio),
20221
+ platform: definitionPlatform,
20222
+ formats: resolveFormatList(report.output_formats),
20332
20223
  sourceReferenceUrl: durableSourceUrl ?? (imageIsUrl ? imageSource : void 0),
20333
20224
  sourceAdvertiser: args.advertiser ? String(args.advertiser) : args.context ? String(args.context) : void 0,
20334
20225
  sourceKind: "image",
@@ -20341,8 +20232,8 @@ var scaffoldStaticAdCommand = defineCommand92({
20341
20232
  await syncCreativeDefinitionBestEffort({
20342
20233
  slug,
20343
20234
  title: args.title ? String(args.title) : titleFromSlug(slug),
20344
- platform: resolvePlatform(args.platform ? String(args.platform) : void 0),
20345
- formats: resolveFormats(args.aspect ? String(args.aspect) : report.aspect_ratio),
20235
+ platform: definitionPlatform,
20236
+ formats: resolveFormatList(report.output_formats),
20346
20237
  sourceReferenceUrl: durableSourceUrl ?? (imageIsUrl ? imageSource : void 0),
20347
20238
  canvas,
20348
20239
  sourceSha: await computeSourceSha(outPath)
@@ -20359,6 +20250,8 @@ var scaffoldStaticAdCommand = defineCommand92({
20359
20250
  output: canvas.output,
20360
20251
  models: { describe: describeModel, select: selectModel, layout: layoutModel, gen: opts.genModel },
20361
20252
  aspect_ratio: report.aspect_ratio,
20253
+ placements: report.placements,
20254
+ output_formats: report.output_formats,
20362
20255
  layout_regions: regionCount(layout),
20363
20256
  stats: {
20364
20257
  total_nodes: canvas.nodes.length,
@@ -20370,6 +20263,7 @@ var scaffoldStaticAdCommand = defineCommand92({
20370
20263
  assets_to_supply: report.elements,
20371
20264
  font_slot: report.includes_font ? "Drop a brand font at the [TODO] brandfont path (the describe pass recorded the ad's typefaces under `fonts` in prompt.json \u2014 match those). The font is wired into the render as a TYPE SPECIMEN reference so generated text takes the brand letterforms. Delete the brandfont + type_ref nodes to skip it." : "skipped (--skip-font)",
20372
20265
  actor_sheets: report.actor_sheets.length > 0 ? `Each living hero (${report.actor_sheets.join(", ")}) is fused into a generated multi-view reference sheet (image_reference_sheet) that the render grounds on \u2014 so drop ONE clean photo at that hero's ingest and the sheet builds the consistent turnaround. Pass --skip-actor-sheets to ground on the lone photo instead.` : "none (no person/animal heroes detected, or --skip-actor-sheets)",
20266
+ placements: report.placements === null ? `Single format (${report.aspect_ratio}). Pass --placements meta_feed_stories|meta_all|linkedin|\u2026 to auto-fan-out to a platform's set.` : `Auto-fans the approved hero out to ${report.placements} \u2192 ${report.output_formats.join(", ")}. The hero ratio (${report.aspect_ratio}) passes through free; each other ratio is a billed render, AI-recomposed (not cropped). Re-read the copy and confirm the brand-color treatment on EVERY ratio before publishing \u2014 adaptation re-generates and can silently mangle text or flatten a color device. Pass --placements none for a single base ad.`,
20373
20267
  note: "Populate as you go: for each [TODO] ingest slot, source its real asset and wire it into the slot right away \u2014 one at a time, not all sourced first then reconciled at the end. When every slot is filled, `baker canvas validate` then `baker canvas run`. Running generates a billed image \u2014 it is not free."
20374
20268
  }
20375
20269
  },
@@ -20385,7 +20279,7 @@ var scaffoldStaticAdCommand = defineCommand92({
20385
20279
  import { access as access2, cp, mkdir as mkdir6, readFile as readFile14, rm as rm6, writeFile as writeFile7 } from "fs/promises";
20386
20280
  import { tmpdir as tmpdir2 } from "os";
20387
20281
  import path20 from "path";
20388
- import { defineCommand as defineCommand93 } from "citty";
20282
+ import { defineCommand as defineCommand92 } from "citty";
20389
20283
 
20390
20284
  // src/engine/scaffold/lib/model-router.ts
20391
20285
  var SEEDANCE = "bytedance/seedance-2.0";
@@ -20839,7 +20733,7 @@ async function runAnalysisPasses(deconstructCanvas, selectModel) {
20839
20733
  return fail3("deconstruct", e instanceof Error ? e.message : String(e));
20840
20734
  }
20841
20735
  }
20842
- var scaffoldVideoCommand = defineCommand93({
20736
+ var scaffoldVideoCommand = defineCommand92({
20843
20737
  meta: {
20844
20738
  name: "scaffold-video",
20845
20739
  description: "Turn a reference video into a runnable reproduction canvas in one command. Runs billed passes \u2014 video_deconstruct (the full scene-by-scene blueprint + transcript, baked to a split, editable blueprint: a global prompt.json plus one small scenes/sNN.json per scene) and an AI selection of the video's RECURRING identity elements (person/animal/product/logo) \u2014 then scaffolds a pipeline where every scene boundary is a static-ad-grade frame (the blueprint as target_blueprint, a reference legend, the real frame as anchor) and each recurring element gets ONE shared [TODO] ingest slot wired into every frame it appears in. The clips feed Seedance an ultra-detailed motion brief (action, camera, dialogue, transcript). Edit a scene's scenes/sNN.json (or prompt.json for global cast/palette/brand), drop the real source images, then `baker canvas run`."
@@ -21144,7 +21038,7 @@ var scaffoldVideoCommand = defineCommand93({
21144
21038
  // src/commands/canvas/set-prompt.ts
21145
21039
  import { readFile as readFile15, writeFile as writeFile8 } from "fs/promises";
21146
21040
  import path21 from "path";
21147
- import { defineCommand as defineCommand94 } from "citty";
21041
+ import { defineCommand as defineCommand93 } from "citty";
21148
21042
  function setNodePrompt(canvas, nodeId, text) {
21149
21043
  const nodes = canvas?.nodes;
21150
21044
  if (!Array.isArray(nodes)) throw new Error("canvas has no nodes array");
@@ -21159,7 +21053,7 @@ function setNodePrompt(canvas, nodeId, text) {
21159
21053
  newNodes[idx] = newNode;
21160
21054
  return { ...canvas, nodes: newNodes };
21161
21055
  }
21162
- var setPromptCommand = defineCommand94({
21056
+ var setPromptCommand = defineCommand93({
21163
21057
  meta: {
21164
21058
  name: "set-prompt",
21165
21059
  description: "Safely set a node's params.prompt (a frame description, motion prompt, etc.) without hand-editing the JSON. Prefer --text-file for multi-line/accented copy \u2014 it preserves UTF-8 exactly, unlike shell-quoted jq."
@@ -21219,8 +21113,8 @@ var setPromptCommand = defineCommand94({
21219
21113
  // src/commands/canvas/validate.ts
21220
21114
  import { readFile as readFile16 } from "fs/promises";
21221
21115
  import path22 from "path";
21222
- import { defineCommand as defineCommand95 } from "citty";
21223
- var validateCommand = defineCommand95({
21116
+ import { defineCommand as defineCommand94 } from "citty";
21117
+ var validateCommand = defineCommand94({
21224
21118
  meta: {
21225
21119
  name: "validate",
21226
21120
  description: "Validate a canvas JSON file (no execution). Includes a per-node cost preview and runs each node's deep validators (composition meta checks for hyperframe_render/_snapshot)."
@@ -21290,7 +21184,7 @@ var validateCommand = defineCommand95({
21290
21184
  });
21291
21185
 
21292
21186
  // src/commands/canvas/index.ts
21293
- var canvasCommand = defineCommand96({
21187
+ var canvasCommand = defineCommand95({
21294
21188
  meta: {
21295
21189
  name: "canvas",
21296
21190
  description: `Run Baker creative canvas JSON files locally. Local nodes execute in-process; remote nodes POST to the Convex backend gateway.
@@ -21323,10 +21217,10 @@ Subcommands:
21323
21217
  });
21324
21218
 
21325
21219
  // src/commands/creatives/index.ts
21326
- import { defineCommand as defineCommand98 } from "citty";
21220
+ import { defineCommand as defineCommand97 } from "citty";
21327
21221
 
21328
21222
  // src/commands/creatives/publish.ts
21329
- import { defineCommand as defineCommand97 } from "citty";
21223
+ import { defineCommand as defineCommand96 } from "citty";
21330
21224
 
21331
21225
  // src/commands/images/api.ts
21332
21226
  import { readFile as readFile17 } from "fs/promises";
@@ -21470,7 +21364,7 @@ async function publishCreative(args, deps = defaultImageApiDeps) {
21470
21364
  chatId: chatIdFromEnv()
21471
21365
  });
21472
21366
  }
21473
- var publishCommand = defineCommand97({
21367
+ var publishCommand = defineCommand96({
21474
21368
  meta: {
21475
21369
  name: "publish",
21476
21370
  description: "Publish a final static creative image to Baker Creatives and print the creative reference JSON."
@@ -21528,7 +21422,7 @@ var publishCommand = defineCommand97({
21528
21422
  });
21529
21423
 
21530
21424
  // src/commands/creatives/index.ts
21531
- var creativesCommand3 = defineCommand98({
21425
+ var creativesCommand3 = defineCommand97({
21532
21426
  meta: {
21533
21427
  name: "creatives",
21534
21428
  description: `Publish static ad creatives as first-class Baker outputs.
@@ -21544,7 +21438,7 @@ Publishing uploads the image to the Company image library, applies the official
21544
21438
  });
21545
21439
 
21546
21440
  // src/commands/flows/index.ts
21547
- import { defineCommand as defineCommand99 } from "citty";
21441
+ import { defineCommand as defineCommand98 } from "citty";
21548
21442
 
21549
21443
  // src/commands/flows/shared.ts
21550
21444
  import { existsSync as existsSync4, readdirSync as readdirSync2, readFileSync as readFileSync9 } from "fs";
@@ -21699,7 +21593,7 @@ function displayName(slug) {
21699
21593
  const name = tree.displayName;
21700
21594
  return typeof name === "string" && name.trim() ? name.trim() : slug;
21701
21595
  }
21702
- var listCommand5 = defineCommand99({
21596
+ var listCommand5 = defineCommand98({
21703
21597
  meta: {
21704
21598
  name: "list",
21705
21599
  description: "List Forms in this workspace with the count of confidential fields still needing setup. Example: baker flows list"
@@ -21713,7 +21607,7 @@ var listCommand5 = defineCommand99({
21713
21607
  writeJson({ ok: true, data: { flows } });
21714
21608
  }
21715
21609
  });
21716
- var showCommand2 = defineCommand99({
21610
+ var showCommand2 = defineCommand98({
21717
21611
  meta: {
21718
21612
  name: "show",
21719
21613
  description: "Show a Form's confidential fields and their configuration status (never secret values). Example: baker flows show contact"
@@ -21734,7 +21628,7 @@ var showCommand2 = defineCommand99({
21734
21628
  writeJson({ ok: true, data: response });
21735
21629
  }
21736
21630
  });
21737
- var flowsCommand = defineCommand99({
21631
+ var flowsCommand = defineCommand98({
21738
21632
  meta: {
21739
21633
  name: "flows",
21740
21634
  description: `Read this workspace's Forms (flows) and the configuration status of their confidential fields \u2014 connection secrets, OAuth connections, and third-party field definitions (HubSpot, Calendly, HighLevel, SavvyCal).
@@ -21761,10 +21655,10 @@ Examples:
21761
21655
  });
21762
21656
 
21763
21657
  // src/commands/ga4/index.ts
21764
- import { defineCommand as defineCommand103 } from "citty";
21658
+ import { defineCommand as defineCommand102 } from "citty";
21765
21659
 
21766
21660
  // src/commands/ga4/audit.ts
21767
- import { defineCommand as defineCommand100 } from "citty";
21661
+ import { defineCommand as defineCommand99 } from "citty";
21768
21662
 
21769
21663
  // src/commands/ga4/resolve.ts
21770
21664
  async function fetchProperties(useCache = true) {
@@ -21827,7 +21721,7 @@ registerSchema({
21827
21721
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
21828
21722
  }
21829
21723
  });
21830
- var auditCommand2 = defineCommand100({
21724
+ var auditCommand2 = defineCommand99({
21831
21725
  meta: {
21832
21726
  name: "audit",
21833
21727
  description: `Run all GA4 admin health checks. Returns property config with playbook warnings.
@@ -21879,7 +21773,7 @@ Examples:
21879
21773
  });
21880
21774
 
21881
21775
  // src/commands/ga4/properties.ts
21882
- import { defineCommand as defineCommand101 } from "citty";
21776
+ import { defineCommand as defineCommand100 } from "citty";
21883
21777
  registerSchema({
21884
21778
  command: "ga4.properties",
21885
21779
  description: "List all accessible GA4 properties. Returns property IDs needed for query and audit commands. Run this first to find property IDs.",
@@ -21887,7 +21781,7 @@ registerSchema({
21887
21781
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
21888
21782
  }
21889
21783
  });
21890
- var propertiesCommand = defineCommand101({
21784
+ var propertiesCommand = defineCommand100({
21891
21785
  meta: {
21892
21786
  name: "properties",
21893
21787
  description: `List accessible GA4 properties.
@@ -21937,7 +21831,7 @@ Examples:
21937
21831
  // src/commands/ga4/query.ts
21938
21832
  import { appendFileSync as appendFileSync2, existsSync as existsSync5, readFileSync as readFileSync10, writeFileSync as writeFileSync3 } from "fs";
21939
21833
  import { resolve as resolve2 } from "path";
21940
- import { defineCommand as defineCommand102 } from "citty";
21834
+ import { defineCommand as defineCommand101 } from "citty";
21941
21835
 
21942
21836
  // src/commands/ga4/presets.ts
21943
21837
  var GA4_PRESETS = [
@@ -22069,7 +21963,7 @@ function handleError(err) {
22069
21963
  });
22070
21964
  process.exit(1);
22071
21965
  }
22072
- var queryCommand2 = defineCommand102({
21966
+ var queryCommand2 = defineCommand101({
22073
21967
  meta: {
22074
21968
  name: "query",
22075
21969
  description: `Run GA4 Data API reports. Preset-first with free-form escape hatch.
@@ -22140,7 +22034,7 @@ Free-form (escape hatch):
22140
22034
  });
22141
22035
 
22142
22036
  // src/commands/ga4/index.ts
22143
- var ga4Command = defineCommand103({
22037
+ var ga4Command = defineCommand102({
22144
22038
  meta: {
22145
22039
  name: "ga4",
22146
22040
  description: `Google Analytics 4 commands. Audit property config, run playbook-aligned reports.
@@ -22163,12 +22057,12 @@ Examples:
22163
22057
  });
22164
22058
 
22165
22059
  // src/commands/gsc/index.ts
22166
- import { defineCommand as defineCommand107 } from "citty";
22060
+ import { defineCommand as defineCommand106 } from "citty";
22167
22061
 
22168
22062
  // src/commands/gsc/query.ts
22169
22063
  import { appendFileSync as appendFileSync3, existsSync as existsSync6, readFileSync as readFileSync11, writeFileSync as writeFileSync4 } from "fs";
22170
22064
  import { resolve as resolve3 } from "path";
22171
- import { defineCommand as defineCommand104 } from "citty";
22065
+ import { defineCommand as defineCommand103 } from "citty";
22172
22066
 
22173
22067
  // src/commands/gsc/presets.ts
22174
22068
  var GSC_PRESETS = [
@@ -22356,7 +22250,7 @@ function handleError2(err) {
22356
22250
  });
22357
22251
  process.exit(1);
22358
22252
  }
22359
- var queryCommand3 = defineCommand104({
22253
+ var queryCommand3 = defineCommand103({
22360
22254
  meta: {
22361
22255
  name: "query",
22362
22256
  description: `Run GSC Search Analytics queries. Preset-first with free-form escape hatch.
@@ -22434,7 +22328,7 @@ Free-form (escape hatch):
22434
22328
  });
22435
22329
 
22436
22330
  // src/commands/gsc/sitemaps.ts
22437
- import { defineCommand as defineCommand105 } from "citty";
22331
+ import { defineCommand as defineCommand104 } from "citty";
22438
22332
  registerSchema({
22439
22333
  command: "gsc.sitemaps",
22440
22334
  description: "List sitemaps for a Search Console site. Check sitemap health and errors.",
@@ -22443,7 +22337,7 @@ registerSchema({
22443
22337
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
22444
22338
  }
22445
22339
  });
22446
- var sitemapsCommand = defineCommand105({
22340
+ var sitemapsCommand = defineCommand104({
22447
22341
  meta: {
22448
22342
  name: "sitemaps",
22449
22343
  description: `List sitemaps for a site. Check health and errors.
@@ -22493,7 +22387,7 @@ Examples:
22493
22387
  });
22494
22388
 
22495
22389
  // src/commands/gsc/sites.ts
22496
- import { defineCommand as defineCommand106 } from "citty";
22390
+ import { defineCommand as defineCommand105 } from "citty";
22497
22391
  registerSchema({
22498
22392
  command: "gsc.sites",
22499
22393
  description: "List all verified Google Search Console sites. Returns site URLs needed for query and sitemaps commands.",
@@ -22501,7 +22395,7 @@ registerSchema({
22501
22395
  "no-cache": { type: "boolean", description: "Skip cache, hit API directly", required: false }
22502
22396
  }
22503
22397
  });
22504
- var sitesCommand = defineCommand106({
22398
+ var sitesCommand = defineCommand105({
22505
22399
  meta: {
22506
22400
  name: "sites",
22507
22401
  description: `List verified Search Console sites.
@@ -22549,7 +22443,7 @@ Examples:
22549
22443
  });
22550
22444
 
22551
22445
  // src/commands/gsc/index.ts
22552
- var gscCommand = defineCommand107({
22446
+ var gscCommand = defineCommand106({
22553
22447
  meta: {
22554
22448
  name: "gsc",
22555
22449
  description: `Google Search Console commands. PPC-SEO arbitrage, brand halo analysis, negative keyword discovery.
@@ -22572,10 +22466,10 @@ Examples:
22572
22466
  });
22573
22467
 
22574
22468
  // src/commands/images/index.ts
22575
- import { defineCommand as defineCommand131 } from "citty";
22469
+ import { defineCommand as defineCommand130 } from "citty";
22576
22470
 
22577
22471
  // src/commands/images/crop.ts
22578
- import { defineCommand as defineCommand108 } from "citty";
22472
+ import { defineCommand as defineCommand107 } from "citty";
22579
22473
 
22580
22474
  // src/lib/image/crop-sprite.ts
22581
22475
  import sharp from "sharp";
@@ -22700,7 +22594,7 @@ function emitError2(err) {
22700
22594
  }
22701
22595
  process.exit(1);
22702
22596
  }
22703
- var cropCommand = defineCommand108({
22597
+ var cropCommand = defineCommand107({
22704
22598
  meta: {
22705
22599
  name: "crop",
22706
22600
  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"
@@ -22736,7 +22630,7 @@ var cropCommand = defineCommand108({
22736
22630
  });
22737
22631
 
22738
22632
  // src/commands/images/delete.ts
22739
- import { defineCommand as defineCommand109 } from "citty";
22633
+ import { defineCommand as defineCommand108 } from "citty";
22740
22634
  registerSchema({
22741
22635
  command: "images.delete",
22742
22636
  description: "Delete an image by ID",
@@ -22750,7 +22644,7 @@ registerSchema({
22750
22644
  }
22751
22645
  }
22752
22646
  });
22753
- var deleteCommand = defineCommand109({
22647
+ var deleteCommand = defineCommand108({
22754
22648
  meta: {
22755
22649
  name: "delete",
22756
22650
  description: "Delete an image by ID. Use --dry-run to preview. Example: baker images delete j571abc123 --dry-run"
@@ -22791,7 +22685,7 @@ var deleteCommand = defineCommand109({
22791
22685
  });
22792
22686
 
22793
22687
  // src/commands/images/dimensions.ts
22794
- import { defineCommand as defineCommand110 } from "citty";
22688
+ import { defineCommand as defineCommand109 } from "citty";
22795
22689
 
22796
22690
  // src/lib/image/dimensions.ts
22797
22691
  import { imageSize } from "image-size";
@@ -22814,7 +22708,7 @@ registerSchema({
22814
22708
  target: { type: "string", description: "Local file path or remote http(s) URL", required: true }
22815
22709
  }
22816
22710
  });
22817
- var dimensionsCommand = defineCommand110({
22711
+ var dimensionsCommand = defineCommand109({
22818
22712
  meta: {
22819
22713
  name: "dimensions",
22820
22714
  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"
@@ -22858,7 +22752,7 @@ var dimensionsCommand = defineCommand110({
22858
22752
  });
22859
22753
 
22860
22754
  // src/commands/images/extract.ts
22861
- import { defineCommand as defineCommand111 } from "citty";
22755
+ import { defineCommand as defineCommand110 } from "citty";
22862
22756
  registerSchema({
22863
22757
  command: "images.extract",
22864
22758
  description: "Extract images from a URL via Firecrawl (formats: images).",
@@ -22874,7 +22768,7 @@ registerSchema({
22874
22768
  }
22875
22769
  }
22876
22770
  });
22877
- var extractCommand = defineCommand111({
22771
+ var extractCommand = defineCommand110({
22878
22772
  meta: {
22879
22773
  name: "extract",
22880
22774
  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"
@@ -22912,7 +22806,7 @@ var extractCommand = defineCommand111({
22912
22806
  });
22913
22807
 
22914
22808
  // src/commands/images/find.ts
22915
- import { defineCommand as defineCommand112 } from "citty";
22809
+ import { defineCommand as defineCommand111 } from "citty";
22916
22810
  registerSchema({
22917
22811
  command: "images.find",
22918
22812
  description: "Fanout image search: library first, then opted-in external providers.",
@@ -22944,7 +22838,7 @@ registerSchema({
22944
22838
  }
22945
22839
  }
22946
22840
  });
22947
- var findCommand = defineCommand112({
22841
+ var findCommand = defineCommand111({
22948
22842
  meta: {
22949
22843
  name: "find",
22950
22844
  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"
@@ -22993,7 +22887,7 @@ var findCommand = defineCommand112({
22993
22887
 
22994
22888
  // src/commands/images/generate.ts
22995
22889
  import { readFile as readFile19 } from "fs/promises";
22996
- import { defineCommand as defineCommand113 } from "citty";
22890
+ import { defineCommand as defineCommand112 } from "citty";
22997
22891
  import sharp2 from "sharp";
22998
22892
  var GENERATE_TIMEOUT_MS = 18e4;
22999
22893
  var REFERENCE_MAX_EDGE = 1536;
@@ -23096,7 +22990,7 @@ async function resolveReferences(spec) {
23096
22990
  }
23097
22991
  return out;
23098
22992
  }
23099
- var generateCommand = defineCommand113({
22993
+ var generateCommand = defineCommand112({
23100
22994
  meta: {
23101
22995
  name: "generate",
23102
22996
  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.5-flash (fast), google/gemini-3-pro-image-preview (Nano Banana Pro \u2014 highest fidelity), openai/gpt-5.4-image-2 (photoreal, cleanest in-image text, best for ad/landing reproduction), 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-5.4-image-2 --image-size 2K\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]]'"
@@ -23148,7 +23042,7 @@ var generateCommand = defineCommand113({
23148
23042
  });
23149
23043
 
23150
23044
  // src/commands/images/get.ts
23151
- import { defineCommand as defineCommand114 } from "citty";
23045
+ import { defineCommand as defineCommand113 } from "citty";
23152
23046
  registerSchema({
23153
23047
  command: "images.get",
23154
23048
  description: "Get a single image by ID",
@@ -23156,7 +23050,7 @@ registerSchema({
23156
23050
  id: { type: "string", description: "Image ID", required: true }
23157
23051
  }
23158
23052
  });
23159
- var getCommand2 = defineCommand114({
23053
+ var getCommand2 = defineCommand113({
23160
23054
  meta: { name: "get", description: "Get a single image by ID. Example: baker images get j571abc123" },
23161
23055
  args: {
23162
23056
  id: { type: "positional", description: "Image ID", required: false },
@@ -23192,7 +23086,7 @@ var getCommand2 = defineCommand114({
23192
23086
  });
23193
23087
 
23194
23088
  // src/commands/images/gif.ts
23195
- import { defineCommand as defineCommand115 } from "citty";
23089
+ import { defineCommand as defineCommand114 } from "citty";
23196
23090
  registerSchema({
23197
23091
  command: "images.gif",
23198
23092
  description: "Search Giphy for GIFs / reaction memes (paid social creative).",
@@ -23224,7 +23118,7 @@ registerSchema({
23224
23118
  }
23225
23119
  }
23226
23120
  });
23227
- var gifCommand = defineCommand115({
23121
+ var gifCommand = defineCommand114({
23228
23122
  meta: {
23229
23123
  name: "gif",
23230
23124
  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"
@@ -23271,7 +23165,7 @@ var gifCommand = defineCommand115({
23271
23165
  });
23272
23166
 
23273
23167
  // src/commands/images/google.ts
23274
- import { defineCommand as defineCommand116 } from "citty";
23168
+ import { defineCommand as defineCommand115 } from "citty";
23275
23169
  registerSchema({
23276
23170
  command: "images.google",
23277
23171
  description: "Google Images search via the official Custom Search JSON API. Unverified source \u2014 inspect before placing.",
@@ -23307,7 +23201,7 @@ registerSchema({
23307
23201
  }
23308
23202
  }
23309
23203
  });
23310
- var googleCommand2 = defineCommand116({
23204
+ var googleCommand2 = defineCommand115({
23311
23205
  meta: {
23312
23206
  name: "google",
23313
23207
  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"
@@ -23355,7 +23249,7 @@ var googleCommand2 = defineCommand116({
23355
23249
  });
23356
23250
 
23357
23251
  // src/commands/images/icon.ts
23358
- import { defineCommand as defineCommand117 } from "citty";
23252
+ import { defineCommand as defineCommand116 } from "citty";
23359
23253
  registerSchema({
23360
23254
  command: "images.icon",
23361
23255
  description: "Icon lookup via Iconify (200+ icon sets, free CDN).",
@@ -23381,7 +23275,7 @@ registerSchema({
23381
23275
  }
23382
23276
  }
23383
23277
  });
23384
- var iconCommand = defineCommand117({
23278
+ var iconCommand = defineCommand116({
23385
23279
  meta: {
23386
23280
  name: "icon",
23387
23281
  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'"
@@ -23421,7 +23315,7 @@ var iconCommand = defineCommand117({
23421
23315
  });
23422
23316
 
23423
23317
  // src/commands/images/ingest.ts
23424
- import { defineCommand as defineCommand118 } from "citty";
23318
+ import { defineCommand as defineCommand117 } from "citty";
23425
23319
  registerSchema({
23426
23320
  command: "images.ingest",
23427
23321
  description: "Ingest a remote image URL into the library (full describe + embed).",
@@ -23433,7 +23327,7 @@ registerSchema({
23433
23327
  context: { type: "string", description: "Description context hint", required: false }
23434
23328
  }
23435
23329
  });
23436
- var ingestCommand = defineCommand118({
23330
+ var ingestCommand = defineCommand117({
23437
23331
  meta: {
23438
23332
  name: "ingest",
23439
23333
  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"
@@ -23475,7 +23369,7 @@ var ingestCommand = defineCommand118({
23475
23369
  });
23476
23370
 
23477
23371
  // src/commands/images/library.ts
23478
- import { defineCommand as defineCommand119 } from "citty";
23372
+ import { defineCommand as defineCommand118 } from "citty";
23479
23373
  registerSchema({
23480
23374
  command: "images.library",
23481
23375
  description: "Search the company image library. Returns only ready images.",
@@ -23501,7 +23395,7 @@ registerSchema({
23501
23395
  }
23502
23396
  }
23503
23397
  });
23504
- var libraryCommand = defineCommand119({
23398
+ var libraryCommand = defineCommand118({
23505
23399
  meta: {
23506
23400
  name: "library",
23507
23401
  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"
@@ -23558,7 +23452,7 @@ var libraryCommand = defineCommand119({
23558
23452
  });
23559
23453
 
23560
23454
  // src/commands/images/logo.ts
23561
- import { defineCommand as defineCommand120 } from "citty";
23455
+ import { defineCommand as defineCommand119 } from "citty";
23562
23456
  registerSchema({
23563
23457
  command: "images.logo",
23564
23458
  description: "Brand logo lookup via Brandfetch CDN (fallback/404). Auto-ingests by default.",
@@ -23583,7 +23477,7 @@ registerSchema({
23583
23477
  }
23584
23478
  }
23585
23479
  });
23586
- var logoCommand = defineCommand120({
23480
+ var logoCommand = defineCommand119({
23587
23481
  meta: {
23588
23482
  name: "logo",
23589
23483
  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"
@@ -23621,7 +23515,7 @@ var logoCommand = defineCommand120({
23621
23515
  });
23622
23516
 
23623
23517
  // src/commands/images/normalize.ts
23624
- import { defineCommand as defineCommand121 } from "citty";
23518
+ import { defineCommand as defineCommand120 } from "citty";
23625
23519
 
23626
23520
  // src/lib/image/color-changer.ts
23627
23521
  import quantize from "quantize";
@@ -24353,7 +24247,7 @@ function coerceRawArgs(args) {
24353
24247
  "dry-run": bool(args["dry-run"])
24354
24248
  };
24355
24249
  }
24356
- var normalizeCommand = defineCommand121({
24250
+ var normalizeCommand = defineCommand120({
24357
24251
  meta: {
24358
24252
  name: "normalize",
24359
24253
  description: `Normalize logos / images: declarative recolor + bg removal + trim + resize. Operates on local files; writes in-place by default.
@@ -24408,7 +24302,7 @@ Examples:
24408
24302
  });
24409
24303
 
24410
24304
  // src/commands/images/pinterest.ts
24411
- import { defineCommand as defineCommand122 } from "citty";
24305
+ import { defineCommand as defineCommand121 } from "citty";
24412
24306
  registerSchema({
24413
24307
  command: "images.pinterest",
24414
24308
  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.",
@@ -24428,7 +24322,7 @@ registerSchema({
24428
24322
  }
24429
24323
  }
24430
24324
  });
24431
- var pinterestCommand = defineCommand122({
24325
+ var pinterestCommand = defineCommand121({
24432
24326
  meta: {
24433
24327
  name: "pinterest",
24434
24328
  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'"
@@ -24468,7 +24362,7 @@ var pinterestCommand = defineCommand122({
24468
24362
  });
24469
24363
 
24470
24364
  // src/commands/images/screenshot.ts
24471
- import { defineCommand as defineCommand123 } from "citty";
24365
+ import { defineCommand as defineCommand122 } from "citty";
24472
24366
  registerSchema({
24473
24367
  command: "images.screenshot",
24474
24368
  description: "Capture a website screenshot via ScreenshotOne. Auto-ingests on success.",
@@ -24484,7 +24378,7 @@ registerSchema({
24484
24378
  }
24485
24379
  }
24486
24380
  });
24487
- var screenshotCommand = defineCommand123({
24381
+ var screenshotCommand = defineCommand122({
24488
24382
  meta: {
24489
24383
  name: "screenshot",
24490
24384
  description: "Screenshot a URL via ScreenshotOne. $0.009/capture. Auto-ingests to library.\n\nExample: baker images screenshot https://stripe.com --full-page"
@@ -24547,7 +24441,7 @@ var screenshotCommand = defineCommand123({
24547
24441
  });
24548
24442
 
24549
24443
  // src/commands/images/search.ts
24550
- import { defineCommand as defineCommand124 } from "citty";
24444
+ import { defineCommand as defineCommand123 } from "citty";
24551
24445
  registerSchema({
24552
24446
  command: "images.search",
24553
24447
  description: "Search images by text query. Only returns ready images.",
@@ -24563,7 +24457,7 @@ registerSchema({
24563
24457
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
24564
24458
  }
24565
24459
  });
24566
- var searchCommand = defineCommand124({
24460
+ var searchCommand = defineCommand123({
24567
24461
  meta: {
24568
24462
  name: "search",
24569
24463
  description: "Semantic search images by text query. Uses hybrid BM25 + vector + reranking. Example: baker images search 'hero banner' --aspect-ratio 16:9 --tags logo"
@@ -24623,7 +24517,7 @@ var searchCommand = defineCommand124({
24623
24517
  });
24624
24518
 
24625
24519
  // src/commands/images/sticker.ts
24626
- import { defineCommand as defineCommand125 } from "citty";
24520
+ import { defineCommand as defineCommand124 } from "citty";
24627
24521
  registerSchema({
24628
24522
  command: "images.sticker",
24629
24523
  description: "Search Giphy stickers \u2014 transparent-background overlays for ad creative.",
@@ -24655,7 +24549,7 @@ registerSchema({
24655
24549
  }
24656
24550
  }
24657
24551
  });
24658
- var stickerCommand = defineCommand125({
24552
+ var stickerCommand = defineCommand124({
24659
24553
  meta: {
24660
24554
  name: "sticker",
24661
24555
  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"
@@ -24702,7 +24596,7 @@ var stickerCommand = defineCommand125({
24702
24596
  });
24703
24597
 
24704
24598
  // src/commands/images/stock.ts
24705
- import { defineCommand as defineCommand126 } from "citty";
24599
+ import { defineCommand as defineCommand125 } from "citty";
24706
24600
  registerSchema({
24707
24601
  command: "images.stock",
24708
24602
  description: "Stock photo, vector illustration, icon-set, and PSD search via Magnific (Freepik's developer API).",
@@ -24760,7 +24654,7 @@ registerSchema({
24760
24654
  }
24761
24655
  }
24762
24656
  });
24763
- var stockCommand = defineCommand126({
24657
+ var stockCommand = defineCommand125({
24764
24658
  meta: {
24765
24659
  name: "stock",
24766
24660
  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"
@@ -24816,7 +24710,7 @@ var stockCommand = defineCommand126({
24816
24710
  });
24817
24711
 
24818
24712
  // src/lib/tags-command.ts
24819
- import { defineCommand as defineCommand127 } from "citty";
24713
+ import { defineCommand as defineCommand126 } from "citty";
24820
24714
  function makeTagsCommand(command, label, endpoint) {
24821
24715
  registerSchema({
24822
24716
  command: `${command}.tags`,
@@ -24825,7 +24719,7 @@ function makeTagsCommand(command, label, endpoint) {
24825
24719
  output: { type: "string", description: "Output format: md|json", required: false, default: "md" }
24826
24720
  }
24827
24721
  });
24828
- return defineCommand127({
24722
+ return defineCommand126({
24829
24723
  meta: {
24830
24724
  name: "tags",
24831
24725
  description: `List the available ${label} tag names (defaults + company custom tags). Use before filtering with --tags. Example: baker ${command} tags`
@@ -24861,7 +24755,7 @@ function makeTagsCommand(command, label, endpoint) {
24861
24755
  var tagsCommand2 = makeTagsCommand("images", "image", "/api/images/tags");
24862
24756
 
24863
24757
  // src/commands/images/upload.ts
24864
- import { defineCommand as defineCommand128 } from "citty";
24758
+ import { defineCommand as defineCommand127 } from "citty";
24865
24759
  registerSchema({
24866
24760
  command: "images.upload",
24867
24761
  description: "Upload an image to the library \u2014 local file path or remote http(s) URL.",
@@ -24899,7 +24793,7 @@ registerSchema({
24899
24793
  function isRemoteUrl2(value) {
24900
24794
  return /^https?:\/\//i.test(value);
24901
24795
  }
24902
- var uploadCommand = defineCommand128({
24796
+ var uploadCommand = defineCommand127({
24903
24797
  meta: {
24904
24798
  name: "upload",
24905
24799
  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'"
@@ -24992,7 +24886,7 @@ async function uploadLocal(target, args) {
24992
24886
  }
24993
24887
 
24994
24888
  // src/commands/images/upscale.ts
24995
- import { defineCommand as defineCommand129 } from "citty";
24889
+ import { defineCommand as defineCommand128 } from "citty";
24996
24890
  registerSchema({
24997
24891
  command: "images.upscale",
24998
24892
  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).",
@@ -25007,7 +24901,7 @@ registerSchema({
25007
24901
  }
25008
24902
  });
25009
24903
  var POLL_INTERVAL_MS3 = 1500;
25010
- var upscaleCommand = defineCommand129({
24904
+ var upscaleCommand = defineCommand128({
25011
24905
  meta: {
25012
24906
  name: "upscale",
25013
24907
  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"
@@ -25062,7 +24956,7 @@ var upscaleCommand = defineCommand129({
25062
24956
  });
25063
24957
 
25064
24958
  // src/commands/images/use.ts
25065
- import { defineCommand as defineCommand130 } from "citty";
24959
+ import { defineCommand as defineCommand129 } from "citty";
25066
24960
  registerSchema({
25067
24961
  command: "images.use",
25068
24962
  description: "Ingest a URL and wait for the library record to be ready.",
@@ -25078,7 +24972,7 @@ registerSchema({
25078
24972
  }
25079
24973
  });
25080
24974
  var POLL_INTERVAL_MS4 = 1500;
25081
- var useCommand = defineCommand130({
24975
+ var useCommand = defineCommand129({
25082
24976
  meta: {
25083
24977
  name: "use",
25084
24978
  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"
@@ -25124,7 +25018,7 @@ var useCommand = defineCommand130({
25124
25018
  });
25125
25019
 
25126
25020
  // src/commands/images/index.ts
25127
- var imagesCommand = defineCommand131({
25021
+ var imagesCommand = defineCommand130({
25128
25022
  meta: {
25129
25023
  name: "images",
25130
25024
  description: `Find, source, and normalize images. Subcommands route by provider so cost + license are explicit.
@@ -25194,7 +25088,7 @@ Paid transforms (run on the Convex backend, cost-tracked):
25194
25088
  });
25195
25089
 
25196
25090
  // src/commands/mcp/index.ts
25197
- import { defineCommand as defineCommand132 } from "citty";
25091
+ import { defineCommand as defineCommand131 } from "citty";
25198
25092
  var SCOPES = ["user", "user_org", "company", "org"];
25199
25093
  function parseScope(raw) {
25200
25094
  const scope = raw === void 0 ? "company" : String(raw);
@@ -25233,7 +25127,7 @@ registerSchema({
25233
25127
  description: "List the custom MCP servers this company's chats see (org + company + your own user scope).",
25234
25128
  args: {}
25235
25129
  });
25236
- var listCommand6 = defineCommand132({
25130
+ var listCommand6 = defineCommand131({
25237
25131
  meta: { name: "list", description: "List custom MCP servers visible to this company's chats." },
25238
25132
  run: async () => {
25239
25133
  try {
@@ -25258,7 +25152,7 @@ registerSchema({
25258
25152
  header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
25259
25153
  }
25260
25154
  });
25261
- var addCommand = defineCommand132({
25155
+ var addCommand = defineCommand131({
25262
25156
  meta: {
25263
25157
  name: "add",
25264
25158
  description: `Register a custom MCP server. Tools appear as mcp__<name>__* on the NEXT message.
@@ -25299,7 +25193,7 @@ registerSchema({
25299
25193
  description: "Remove a company custom MCP server by name.",
25300
25194
  args: { name: { type: "string", description: "Server name to remove", required: true } }
25301
25195
  });
25302
- var removeCommand4 = defineCommand132({
25196
+ var removeCommand4 = defineCommand131({
25303
25197
  meta: {
25304
25198
  name: "remove",
25305
25199
  description: `Remove a company custom MCP server by name.
@@ -25321,7 +25215,7 @@ Example:
25321
25215
  }
25322
25216
  }
25323
25217
  });
25324
- var mcpCommand = defineCommand132({
25218
+ var mcpCommand = defineCommand131({
25325
25219
  meta: {
25326
25220
  name: "mcp",
25327
25221
  description: `Custom MCP servers for this company \u2014 point the agent at any HTTPS MCP endpoint.
@@ -25345,10 +25239,10 @@ Examples:
25345
25239
  });
25346
25240
 
25347
25241
  // src/commands/research/index.ts
25348
- import { defineCommand as defineCommand143 } from "citty";
25242
+ import { defineCommand as defineCommand142 } from "citty";
25349
25243
 
25350
25244
  // src/commands/research/advertisers.ts
25351
- import { defineCommand as defineCommand133 } from "citty";
25245
+ import { defineCommand as defineCommand132 } from "citty";
25352
25246
 
25353
25247
  // src/commands/research/output.ts
25354
25248
  var RESEARCH_DATA_NOTE = "Estimates based on third-party SERP data \u2014 not exact figures. Use for directional insights, not precise measurement.";
@@ -25461,7 +25355,7 @@ var FIELDS3 = {
25461
25355
  etv: "Estimated traffic value (USD)",
25462
25356
  visibility: "SERP visibility score (0-1)"
25463
25357
  };
25464
- var advertisersCommand = defineCommand133({
25358
+ var advertisersCommand = defineCommand132({
25465
25359
  meta: {
25466
25360
  name: "advertisers",
25467
25361
  description: `Find domains competing for a keyword in Google SERPs.
@@ -25508,7 +25402,7 @@ Examples:
25508
25402
  });
25509
25403
 
25510
25404
  // src/commands/research/autocomplete.ts
25511
- import { defineCommand as defineCommand134 } from "citty";
25405
+ import { defineCommand as defineCommand133 } from "citty";
25512
25406
  registerSchema({
25513
25407
  command: "research.autocomplete",
25514
25408
  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).",
@@ -25531,7 +25425,7 @@ registerSchema({
25531
25425
  var FIELDS4 = {
25532
25426
  suggestion: "Autocomplete suggestion from Google"
25533
25427
  };
25534
- var autocompleteCommand = defineCommand134({
25428
+ var autocompleteCommand = defineCommand133({
25535
25429
  meta: {
25536
25430
  name: "autocomplete",
25537
25431
  description: `Get Google Autocomplete suggestions for keyword expansion.
@@ -25577,7 +25471,7 @@ Examples:
25577
25471
  });
25578
25472
 
25579
25473
  // src/commands/research/countries.ts
25580
- import { defineCommand as defineCommand135 } from "citty";
25474
+ import { defineCommand as defineCommand134 } from "citty";
25581
25475
  registerSchema({
25582
25476
  command: "research.countries",
25583
25477
  description: "List all supported country codes for --location flag in research commands.",
@@ -25634,7 +25528,7 @@ var FIELDS5 = {
25634
25528
  code: "Country code to pass as --location",
25635
25529
  name: "Country name"
25636
25530
  };
25637
- var countriesCommand = defineCommand135({
25531
+ var countriesCommand = defineCommand134({
25638
25532
  meta: {
25639
25533
  name: "countries",
25640
25534
  description: "List all supported country codes for --location flag."
@@ -25645,7 +25539,7 @@ var countriesCommand = defineCommand135({
25645
25539
  });
25646
25540
 
25647
25541
  // src/commands/research/intent.ts
25648
- import { defineCommand as defineCommand136 } from "citty";
25542
+ import { defineCommand as defineCommand135 } from "citty";
25649
25543
  registerSchema({
25650
25544
  command: "research.intent",
25651
25545
  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.",
@@ -25668,7 +25562,7 @@ var FIELDS6 = {
25668
25562
  intent: "Primary Google Search intent: informational, navigational, commercial, transactional",
25669
25563
  probability: "Confidence score 0.0-1.0"
25670
25564
  };
25671
- var intentCommand = defineCommand136({
25565
+ var intentCommand = defineCommand135({
25672
25566
  meta: {
25673
25567
  name: "intent",
25674
25568
  description: `Classify Google Search intent for keywords. Returns intent type and confidence.
@@ -25716,7 +25610,7 @@ Examples:
25716
25610
  });
25717
25611
 
25718
25612
  // src/commands/research/keyword-gap.ts
25719
- import { defineCommand as defineCommand137 } from "citty";
25613
+ import { defineCommand as defineCommand136 } from "citty";
25720
25614
  registerSchema({
25721
25615
  command: "research.keyword-gap",
25722
25616
  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.",
@@ -25745,7 +25639,7 @@ var FIELDS7 = {
25745
25639
  cpc: "Cost per click USD",
25746
25640
  their_position: "Competitor's ranking position"
25747
25641
  };
25748
- var keywordGapCommand = defineCommand137({
25642
+ var keywordGapCommand = defineCommand136({
25749
25643
  meta: {
25750
25644
  name: "keyword-gap",
25751
25645
  description: `Find keywords a competitor has that you don't. Supports pagination via --offset.
@@ -25819,7 +25713,7 @@ Examples:
25819
25713
  });
25820
25714
 
25821
25715
  // src/commands/research/keywords-for-site.ts
25822
- import { defineCommand as defineCommand138 } from "citty";
25716
+ import { defineCommand as defineCommand137 } from "citty";
25823
25717
  registerSchema({
25824
25718
  command: "research.keywords-for-site",
25825
25719
  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.",
@@ -25852,7 +25746,7 @@ var FIELDS8 = {
25852
25746
  competition: "LOW, MEDIUM, or HIGH",
25853
25747
  competition_index: "Competition score 0-100"
25854
25748
  };
25855
- var keywordsForSiteCommand = defineCommand138({
25749
+ var keywordsForSiteCommand = defineCommand137({
25856
25750
  meta: {
25857
25751
  name: "keywords-for-site",
25858
25752
  description: `Get keywords a competitor targets in Google. Use --type to filter paid/organic.
@@ -25905,7 +25799,7 @@ Examples:
25905
25799
  });
25906
25800
 
25907
25801
  // src/commands/research/languages.ts
25908
- import { defineCommand as defineCommand139 } from "citty";
25802
+ import { defineCommand as defineCommand138 } from "citty";
25909
25803
  registerSchema({
25910
25804
  command: "research.languages",
25911
25805
  description: "List all supported language codes for --language flag in research commands.",
@@ -25935,7 +25829,7 @@ var FIELDS9 = {
25935
25829
  code: "Language code to pass as --language",
25936
25830
  name: "Language name (also accepted by --language)"
25937
25831
  };
25938
- var languagesCommand2 = defineCommand139({
25832
+ var languagesCommand2 = defineCommand138({
25939
25833
  meta: {
25940
25834
  name: "languages",
25941
25835
  description: "List all supported language codes for --language flag."
@@ -25946,7 +25840,7 @@ var languagesCommand2 = defineCommand139({
25946
25840
  });
25947
25841
 
25948
25842
  // src/commands/research/lighthouse.ts
25949
- import { defineCommand as defineCommand140 } from "citty";
25843
+ import { defineCommand as defineCommand139 } from "citty";
25950
25844
  registerSchema({
25951
25845
  command: "research.lighthouse",
25952
25846
  description: "Landing page performance audit. Returns metrics that affect Google Ads Quality Score and CPC.",
@@ -25965,7 +25859,7 @@ var FIELDS10 = {
25965
25859
  speed_index_ms: "Speed Index in ms (good: < 3400)",
25966
25860
  interactive_ms: "Time to Interactive in ms (good: < 3800)"
25967
25861
  };
25968
- var lighthouseCommand = defineCommand140({
25862
+ var lighthouseCommand = defineCommand139({
25969
25863
  meta: {
25970
25864
  name: "lighthouse",
25971
25865
  description: `Landing page performance audit. Metrics affecting Google Ads Quality Score.
@@ -26003,7 +25897,7 @@ Examples:
26003
25897
  });
26004
25898
 
26005
25899
  // src/commands/research/relevant-pages.ts
26006
- import { defineCommand as defineCommand141 } from "citty";
25900
+ import { defineCommand as defineCommand140 } from "citty";
26007
25901
  registerSchema({
26008
25902
  command: "research.relevant-pages",
26009
25903
  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).",
@@ -26029,7 +25923,7 @@ var FIELDS11 = {
26029
25923
  keywords: "Total organic keywords the page ranks for",
26030
25924
  top_10: "Keywords in positions 1-10"
26031
25925
  };
26032
- var relevantPagesCommand = defineCommand141({
25926
+ var relevantPagesCommand = defineCommand140({
26033
25927
  meta: {
26034
25928
  name: "relevant-pages",
26035
25929
  description: `Get the top pages of a competitor domain with traffic data.
@@ -26075,7 +25969,7 @@ Examples:
26075
25969
  });
26076
25970
 
26077
25971
  // src/commands/research/web.ts
26078
- import { defineCommand as defineCommand142 } from "citty";
25972
+ import { defineCommand as defineCommand141 } from "citty";
26079
25973
  registerSchema({
26080
25974
  command: "research.web",
26081
25975
  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).",
@@ -26126,7 +26020,7 @@ async function runDeepResearch(question) {
26126
26020
  }
26127
26021
  throw new Error("Deep research timed out");
26128
26022
  }
26129
- var webCommand = defineCommand142({
26023
+ var webCommand = defineCommand141({
26130
26024
  meta: {
26131
26025
  name: "web",
26132
26026
  description: `Search the web with AI to answer any open-ended marketing question. Uses live internet data via Google Search.
@@ -26186,7 +26080,7 @@ Examples:
26186
26080
  });
26187
26081
 
26188
26082
  // src/commands/research/index.ts
26189
- var researchCommand = defineCommand143({
26083
+ var researchCommand = defineCommand142({
26190
26084
  meta: {
26191
26085
  name: "research",
26192
26086
  description: `Competitive intelligence and AI-powered research commands.
@@ -26226,10 +26120,10 @@ Examples:
26226
26120
  });
26227
26121
 
26228
26122
  // src/commands/scheduled-actions/index.ts
26229
- import { defineCommand as defineCommand150 } from "citty";
26123
+ import { defineCommand as defineCommand149 } from "citty";
26230
26124
 
26231
26125
  // src/commands/scheduled-actions/create.ts
26232
- import { defineCommand as defineCommand144 } from "citty";
26126
+ import { defineCommand as defineCommand143 } from "citty";
26233
26127
 
26234
26128
  // src/commands/scheduled-actions/shared.ts
26235
26129
  var TEMP_SCHEDULED_ACTION_PREFIX = "temp_sched_";
@@ -26344,7 +26238,7 @@ registerSchema({
26344
26238
  prompt: { type: "string", description: "Additional prompt instructions for the spawned agent", required: false }
26345
26239
  }
26346
26240
  });
26347
- var createCommand2 = defineCommand144({
26241
+ var createCommand2 = defineCommand143({
26348
26242
  meta: {
26349
26243
  name: "create",
26350
26244
  description: 'Stage a scheduled action. Example: baker scheduled-actions create --name "Weekly report" --description "..." --cron "0 9 * * MON"'
@@ -26393,7 +26287,7 @@ var createCommand2 = defineCommand144({
26393
26287
  });
26394
26288
 
26395
26289
  // src/commands/scheduled-actions/delete.ts
26396
- import { defineCommand as defineCommand145 } from "citty";
26290
+ import { defineCommand as defineCommand144 } from "citty";
26397
26291
  registerSchema({
26398
26292
  command: "scheduled-actions.delete",
26399
26293
  description: "Stage deletion of a published scheduled action or cancellation of a temp_sched_* draft creation.",
@@ -26401,7 +26295,7 @@ registerSchema({
26401
26295
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
26402
26296
  }
26403
26297
  });
26404
- var deleteCommand2 = defineCommand145({
26298
+ var deleteCommand2 = defineCommand144({
26405
26299
  meta: {
26406
26300
  name: "delete",
26407
26301
  description: "Stage scheduled action deletion. Example: baker scheduled-actions delete <id-or-temp_sched_id>"
@@ -26430,7 +26324,7 @@ var deleteCommand2 = defineCommand145({
26430
26324
  });
26431
26325
 
26432
26326
  // src/commands/scheduled-actions/get.ts
26433
- import { defineCommand as defineCommand146 } from "citty";
26327
+ import { defineCommand as defineCommand145 } from "citty";
26434
26328
  registerSchema({
26435
26329
  command: "scheduled-actions.get",
26436
26330
  description: "Get a published scheduled action or a temp_sched_* draft-created scheduled action.",
@@ -26438,7 +26332,7 @@ registerSchema({
26438
26332
  id: { type: "string", description: "Published scheduled action ID or temp_sched_* draft ID", required: true }
26439
26333
  }
26440
26334
  });
26441
- var getCommand3 = defineCommand146({
26335
+ var getCommand3 = defineCommand145({
26442
26336
  meta: {
26443
26337
  name: "get",
26444
26338
  description: "Get a scheduled action. Example: baker scheduled-actions get <id-or-temp_sched_id>"
@@ -26475,13 +26369,13 @@ var getCommand3 = defineCommand146({
26475
26369
  });
26476
26370
 
26477
26371
  // src/commands/scheduled-actions/list.ts
26478
- import { defineCommand as defineCommand147 } from "citty";
26372
+ import { defineCommand as defineCommand146 } from "citty";
26479
26373
  registerSchema({
26480
26374
  command: "scheduled-actions.list",
26481
26375
  description: "List published scheduled actions. Includes draft state when BAKER_CHAT_ID is set.",
26482
26376
  args: {}
26483
26377
  });
26484
- var listCommand7 = defineCommand147({
26378
+ var listCommand7 = defineCommand146({
26485
26379
  meta: {
26486
26380
  name: "list",
26487
26381
  description: "List scheduled actions. Includes staged draft ops when BAKER_CHAT_ID is set."
@@ -26502,7 +26396,7 @@ var listCommand7 = defineCommand147({
26502
26396
  });
26503
26397
 
26504
26398
  // src/commands/scheduled-actions/trigger.ts
26505
- import { defineCommand as defineCommand148 } from "citty";
26399
+ import { defineCommand as defineCommand147 } from "citty";
26506
26400
  registerSchema({
26507
26401
  command: "scheduled-actions.trigger",
26508
26402
  description: "Immediately trigger a published scheduled action. Does not require BAKER_CHAT_ID and rejects temp_sched_* IDs.",
@@ -26510,7 +26404,7 @@ registerSchema({
26510
26404
  id: { type: "string", description: "Published scheduled action ID", required: true }
26511
26405
  }
26512
26406
  });
26513
- var triggerCommand = defineCommand148({
26407
+ var triggerCommand = defineCommand147({
26514
26408
  meta: {
26515
26409
  name: "trigger",
26516
26410
  description: "Immediately trigger a published scheduled action. Example: baker scheduled-actions trigger <id>"
@@ -26547,7 +26441,7 @@ var triggerCommand = defineCommand148({
26547
26441
  });
26548
26442
 
26549
26443
  // src/commands/scheduled-actions/update.ts
26550
- import { defineCommand as defineCommand149 } from "citty";
26444
+ import { defineCommand as defineCommand148 } from "citty";
26551
26445
  registerSchema({
26552
26446
  command: "scheduled-actions.update",
26553
26447
  description: "Stage an update to a published scheduled action or temp_sched_* draft-created scheduled action.",
@@ -26572,7 +26466,7 @@ registerSchema({
26572
26466
  prompt: { type: "string", description: "Replacement additional spawned-agent instructions", required: false }
26573
26467
  }
26574
26468
  });
26575
- var updateCommand2 = defineCommand149({
26469
+ var updateCommand2 = defineCommand148({
26576
26470
  meta: {
26577
26471
  name: "update",
26578
26472
  description: "Stage a scheduled action update. Example: baker scheduled-actions update <id> --enabled false"
@@ -26643,7 +26537,7 @@ var updateCommand2 = defineCommand149({
26643
26537
  });
26644
26538
 
26645
26539
  // src/commands/scheduled-actions/index.ts
26646
- var scheduledActionsCommand = defineCommand150({
26540
+ var scheduledActionsCommand = defineCommand149({
26647
26541
  meta: {
26648
26542
  name: "scheduled-actions",
26649
26543
  description: `Manage Scheduled Actions. Subcommands: list, get, create, update, delete, trigger.
@@ -26669,8 +26563,8 @@ Examples:
26669
26563
  });
26670
26564
 
26671
26565
  // src/commands/schema.ts
26672
- import { defineCommand as defineCommand151 } from "citty";
26673
- var schemaCommand = defineCommand151({
26566
+ import { defineCommand as defineCommand150 } from "citty";
26567
+ var schemaCommand = defineCommand150({
26674
26568
  meta: {
26675
26569
  name: "schema",
26676
26570
  description: "Inspect command argument schemas (for AI agent introspection). Lists all commands if no argument given. Example: baker schema images.search"
@@ -26706,7 +26600,7 @@ var schemaCommand = defineCommand151({
26706
26600
  });
26707
26601
 
26708
26602
  // src/commands/tags/index.ts
26709
- import { defineCommand as defineCommand152 } from "citty";
26603
+ import { defineCommand as defineCommand151 } from "citty";
26710
26604
 
26711
26605
  // src/commands/tags/shared.ts
26712
26606
  function failApi3(err) {
@@ -26772,7 +26666,7 @@ async function listTags(json) {
26772
26666
  failApi3(err);
26773
26667
  }
26774
26668
  }
26775
- var listCommand8 = defineCommand152({
26669
+ var listCommand8 = defineCommand151({
26776
26670
  meta: {
26777
26671
  name: "list",
26778
26672
  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"
@@ -26791,7 +26685,7 @@ async function listDraft3() {
26791
26685
  failApi3(err);
26792
26686
  }
26793
26687
  }
26794
- var draftCommand3 = defineCommand152({
26688
+ var draftCommand3 = defineCommand151({
26795
26689
  meta: {
26796
26690
  name: "draft",
26797
26691
  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)."
@@ -26800,7 +26694,7 @@ var draftCommand3 = defineCommand152({
26800
26694
  await listDraft3();
26801
26695
  }
26802
26696
  });
26803
- var tagsCommand3 = defineCommand152({
26697
+ var tagsCommand3 = defineCommand151({
26804
26698
  meta: {
26805
26699
  name: "tags",
26806
26700
  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.
@@ -26825,10 +26719,10 @@ Examples:
26825
26719
  });
26826
26720
 
26827
26721
  // src/commands/testimonials/index.ts
26828
- import { defineCommand as defineCommand156 } from "citty";
26722
+ import { defineCommand as defineCommand155 } from "citty";
26829
26723
 
26830
26724
  // src/commands/testimonials/get.ts
26831
- import { defineCommand as defineCommand153 } from "citty";
26725
+ import { defineCommand as defineCommand152 } from "citty";
26832
26726
  registerSchema({
26833
26727
  command: "testimonials.get",
26834
26728
  description: "Get a single testimonial by ID",
@@ -26836,7 +26730,7 @@ registerSchema({
26836
26730
  id: { type: "string", description: "Testimonial ID", required: true }
26837
26731
  }
26838
26732
  });
26839
- var getCommand4 = defineCommand153({
26733
+ var getCommand4 = defineCommand152({
26840
26734
  meta: { name: "get", description: "Get a single testimonial by ID. Example: baker testimonials get j571abc123" },
26841
26735
  args: {
26842
26736
  id: { type: "positional", description: "Testimonial ID", required: false },
@@ -26873,7 +26767,7 @@ var getCommand4 = defineCommand153({
26873
26767
  });
26874
26768
 
26875
26769
  // src/commands/testimonials/list.ts
26876
- import { defineCommand as defineCommand154 } from "citty";
26770
+ import { defineCommand as defineCommand153 } from "citty";
26877
26771
  registerSchema({
26878
26772
  command: "testimonials.list",
26879
26773
  description: "List testimonials with optional filters.",
@@ -26903,7 +26797,7 @@ registerSchema({
26903
26797
  limit: { type: "number", description: "Max results (default 50)", required: false, default: 50 }
26904
26798
  }
26905
26799
  });
26906
- var listCommand9 = defineCommand154({
26800
+ var listCommand9 = defineCommand153({
26907
26801
  meta: {
26908
26802
  name: "list",
26909
26803
  description: "List testimonials with optional filters. Example: baker testimonials list --source google --sentiment positive"
@@ -26952,7 +26846,7 @@ var listCommand9 = defineCommand154({
26952
26846
  });
26953
26847
 
26954
26848
  // src/commands/testimonials/search.ts
26955
- import { defineCommand as defineCommand155 } from "citty";
26849
+ import { defineCommand as defineCommand154 } from "citty";
26956
26850
  registerSchema({
26957
26851
  command: "testimonials.search",
26958
26852
  description: "Search testimonials by text query. Uses hybrid BM25 + vector + reranking.",
@@ -26983,7 +26877,7 @@ registerSchema({
26983
26877
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
26984
26878
  }
26985
26879
  });
26986
- var searchCommand2 = defineCommand155({
26880
+ var searchCommand2 = defineCommand154({
26987
26881
  meta: {
26988
26882
  name: "search",
26989
26883
  description: "Semantic search testimonials by text query. Uses hybrid BM25 + vector + reranking. Example: baker testimonials search 'great service' --rating-min 4"
@@ -27057,7 +26951,7 @@ var searchCommand2 = defineCommand155({
27057
26951
  var tagsCommand4 = makeTagsCommand("testimonials", "testimonial", "/api/testimonials/tags");
27058
26952
 
27059
26953
  // src/commands/testimonials/index.ts
27060
- var testimonialsCommand = defineCommand156({
26954
+ var testimonialsCommand = defineCommand155({
27061
26955
  meta: {
27062
26956
  name: "testimonials",
27063
26957
  description: `Find and browse testimonials in Baker. Subcommands: search, get, list, tags.
@@ -27078,10 +26972,10 @@ Examples:
27078
26972
  });
27079
26973
 
27080
26974
  // src/commands/videos/index.ts
27081
- import { defineCommand as defineCommand161 } from "citty";
26975
+ import { defineCommand as defineCommand160 } from "citty";
27082
26976
 
27083
26977
  // src/commands/videos/delete.ts
27084
- import { defineCommand as defineCommand157 } from "citty";
26978
+ import { defineCommand as defineCommand156 } from "citty";
27085
26979
  registerSchema({
27086
26980
  command: "videos.delete",
27087
26981
  description: "Delete a video by ID",
@@ -27095,7 +26989,7 @@ registerSchema({
27095
26989
  }
27096
26990
  }
27097
26991
  });
27098
- var deleteCommand3 = defineCommand157({
26992
+ var deleteCommand3 = defineCommand156({
27099
26993
  meta: {
27100
26994
  name: "delete",
27101
26995
  description: "Delete a video by ID. Use --dry-run to preview. Example: baker videos delete j571abc123 --dry-run"
@@ -27136,7 +27030,7 @@ var deleteCommand3 = defineCommand157({
27136
27030
  });
27137
27031
 
27138
27032
  // src/commands/videos/get.ts
27139
- import { defineCommand as defineCommand158 } from "citty";
27033
+ import { defineCommand as defineCommand157 } from "citty";
27140
27034
  registerSchema({
27141
27035
  command: "videos.get",
27142
27036
  description: "Get a single video by ID",
@@ -27144,7 +27038,7 @@ registerSchema({
27144
27038
  id: { type: "string", description: "Video ID", required: true }
27145
27039
  }
27146
27040
  });
27147
- var getCommand5 = defineCommand158({
27041
+ var getCommand5 = defineCommand157({
27148
27042
  meta: { name: "get", description: "Get a single video by ID. Example: baker videos get j571abc123" },
27149
27043
  args: {
27150
27044
  id: { type: "positional", description: "Video ID", required: false },
@@ -27181,7 +27075,7 @@ var getCommand5 = defineCommand158({
27181
27075
  });
27182
27076
 
27183
27077
  // src/commands/videos/search.ts
27184
- import { defineCommand as defineCommand159 } from "citty";
27078
+ import { defineCommand as defineCommand158 } from "citty";
27185
27079
  registerSchema({
27186
27080
  command: "videos.search",
27187
27081
  description: "Search videos by text query. Only returns ready videos.",
@@ -27191,7 +27085,7 @@ registerSchema({
27191
27085
  tags: { type: "string", description: "Comma-separated tags to filter by", required: false }
27192
27086
  }
27193
27087
  });
27194
- var searchCommand3 = defineCommand159({
27088
+ var searchCommand3 = defineCommand158({
27195
27089
  meta: {
27196
27090
  name: "search",
27197
27091
  description: "Semantic search videos by text query. Uses hybrid BM25 + vector + reranking. Example: baker videos search 'product demo' --tags tutorial"
@@ -27243,7 +27137,7 @@ var tagsCommand5 = makeTagsCommand("videos", "video", "/api/videos/tags");
27243
27137
  // src/commands/videos/upload.ts
27244
27138
  import { readFile as readFile20, stat as stat5 } from "fs/promises";
27245
27139
  import { extname as extname3 } from "path";
27246
- import { defineCommand as defineCommand160 } from "citty";
27140
+ import { defineCommand as defineCommand159 } from "citty";
27247
27141
  var MIME_MAP = {
27248
27142
  ".mp4": "video/mp4",
27249
27143
  ".mov": "video/quicktime",
@@ -27277,7 +27171,7 @@ function detectContentType(filePath) {
27277
27171
  }
27278
27172
  return mime;
27279
27173
  }
27280
- var uploadCommand2 = defineCommand160({
27174
+ var uploadCommand2 = defineCommand159({
27281
27175
  meta: {
27282
27176
  name: "upload",
27283
27177
  description: "Upload a video file to Baker via Mux direct upload. Auto-detects content type. Example: baker videos upload ./demo.mp4"
@@ -27331,7 +27225,7 @@ var uploadCommand2 = defineCommand160({
27331
27225
  });
27332
27226
 
27333
27227
  // src/commands/videos/index.ts
27334
- var videosCommand = defineCommand161({
27228
+ var videosCommand = defineCommand160({
27335
27229
  meta: {
27336
27230
  name: "videos",
27337
27231
  description: `Find and manage videos in Baker. Subcommands: search, get, upload, delete, tags.
@@ -27354,10 +27248,28 @@ Examples:
27354
27248
  });
27355
27249
 
27356
27250
  // src/commands/winning-ads/index.ts
27357
- import { defineCommand as defineCommand171 } from "citty";
27251
+ import { defineCommand as defineCommand170 } from "citty";
27252
+
27253
+ // src/commands/winning-ads/advertisers.ts
27254
+ import { defineCommand as defineCommand161 } from "citty";
27255
+
27256
+ // src/commands/winning-ads/shared.ts
27257
+ function splitList(value) {
27258
+ if (!value) {
27259
+ return [];
27260
+ }
27261
+ return value.split(",").map((v) => v.trim()).filter(Boolean);
27262
+ }
27263
+ function reportError(err) {
27264
+ if (err instanceof ApiError) {
27265
+ writeJson({ ok: false, error: { code: err.code, message: err.message } });
27266
+ process.exit(1);
27267
+ }
27268
+ writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
27269
+ process.exit(1);
27270
+ }
27358
27271
 
27359
27272
  // src/commands/winning-ads/advertisers.ts
27360
- import { defineCommand as defineCommand162 } from "citty";
27361
27273
  registerSchema({
27362
27274
  command: "winning-ads.advertisers",
27363
27275
  description: "List brands in the shared ad-dna corpus by name or domain. Use it to find your OWN advertiser (to --exclude-advertiser on search) or a competitor (to --advertiser-id on search / winners).",
@@ -27392,7 +27304,7 @@ function advertiserNormalizer(record, full) {
27392
27304
  last_synced_at: record.last_synced_at ?? null
27393
27305
  };
27394
27306
  }
27395
- var advertisersCommand2 = defineCommand162({
27307
+ var advertisersCommand2 = defineCommand161({
27396
27308
  meta: {
27397
27309
  name: "advertisers",
27398
27310
  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'
@@ -27450,7 +27362,7 @@ var advertisersCommand2 = defineCommand162({
27450
27362
  });
27451
27363
 
27452
27364
  // src/commands/winning-ads/brief.ts
27453
- import { defineCommand as defineCommand163 } from "citty";
27365
+ import { defineCommand as defineCommand162 } from "citty";
27454
27366
  registerSchema({
27455
27367
  command: "winning-ads.brief",
27456
27368
  description: "Generate a creative brief grounded in strategically-similar winning ads. Optionally describe the target creative with --dna (JSON) and steer with --notes.",
@@ -27496,7 +27408,7 @@ function parseDna(raw) {
27496
27408
  }
27497
27409
  return parsed;
27498
27410
  }
27499
- var briefCommand = defineCommand163({
27411
+ var briefCommand = defineCommand162({
27500
27412
  meta: {
27501
27413
  name: "brief",
27502
27414
  description: `Generate a creative brief from winning references. Example: baker winning-ads brief --dna '{"angle":"cost savings"}' --notes "B2B, LinkedIn video" --k 8`
@@ -27532,7 +27444,7 @@ var briefCommand = defineCommand163({
27532
27444
  });
27533
27445
 
27534
27446
  // src/commands/winning-ads/follow.ts
27535
- import { defineCommand as defineCommand164 } from "citty";
27447
+ import { defineCommand as defineCommand163 } from "citty";
27536
27448
  var PLATFORMS = ["meta", "linkedin"];
27537
27449
  registerSchema({
27538
27450
  command: "winning-ads.follow",
@@ -27547,7 +27459,7 @@ registerSchema({
27547
27459
  label: { type: "string", description: "Optional display label (defaults to the resolved name)", required: false }
27548
27460
  }
27549
27461
  });
27550
- var followCommand = defineCommand164({
27462
+ var followCommand = defineCommand163({
27551
27463
  meta: {
27552
27464
  name: "follow",
27553
27465
  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'
@@ -27594,7 +27506,7 @@ var followCommand = defineCommand164({
27594
27506
  });
27595
27507
 
27596
27508
  // src/commands/winning-ads/following.ts
27597
- import { defineCommand as defineCommand165 } from "citty";
27509
+ import { defineCommand as defineCommand164 } from "citty";
27598
27510
  registerSchema({
27599
27511
  command: "winning-ads.following",
27600
27512
  description: "List the brands you follow in your ad-dna library, with each one's status (ready vs still adding) and cached ad counts.",
@@ -27627,7 +27539,7 @@ function followingNormalizer(record, full) {
27627
27539
  platforms: Array.isArray(record.platforms) ? record.platforms : []
27628
27540
  };
27629
27541
  }
27630
- var followingCommand = defineCommand165({
27542
+ var followingCommand = defineCommand164({
27631
27543
  meta: {
27632
27544
  name: "following",
27633
27545
  description: "List brands you follow, with status (ready / adding\u2026) and cached counts. Example: baker winning-ads following --output md"
@@ -27662,7 +27574,7 @@ var followingCommand = defineCommand165({
27662
27574
  });
27663
27575
 
27664
27576
  // src/commands/winning-ads/patterns.ts
27665
- import { defineCommand as defineCommand166 } from "citty";
27577
+ import { defineCommand as defineCommand165 } from "citty";
27666
27578
  registerSchema({
27667
27579
  command: "winning-ads.patterns",
27668
27580
  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.",
@@ -27701,7 +27613,7 @@ function discriminatorRow(record) {
27701
27613
  top_values_duds: Array.isArray(record.top_values_b) ? record.top_values_b.join(", ") : ""
27702
27614
  };
27703
27615
  }
27704
- var patternsCommand = defineCommand166({
27616
+ var patternsCommand = defineCommand165({
27705
27617
  meta: {
27706
27618
  name: "patterns",
27707
27619
  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"
@@ -27757,7 +27669,7 @@ var patternsCommand = defineCommand166({
27757
27669
  });
27758
27670
 
27759
27671
  // src/commands/winning-ads/search.ts
27760
- import { defineCommand as defineCommand167 } from "citty";
27672
+ import { defineCommand as defineCommand166 } from "citty";
27761
27673
  registerSchema({
27762
27674
  command: "winning-ads.search",
27763
27675
  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.",
@@ -27865,7 +27777,7 @@ function buildSearchBody(args) {
27865
27777
  }
27866
27778
  return body;
27867
27779
  }
27868
- var searchCommand4 = defineCommand167({
27780
+ var searchCommand4 = defineCommand166({
27869
27781
  meta: {
27870
27782
  name: "search",
27871
27783
  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"
@@ -27980,7 +27892,7 @@ var searchCommand4 = defineCommand167({
27980
27892
  });
27981
27893
 
27982
27894
  // src/commands/winning-ads/seeds.ts
27983
- import { defineCommand as defineCommand168 } from "citty";
27895
+ import { defineCommand as defineCommand167 } from "citty";
27984
27896
  function leanRow(r) {
27985
27897
  return {
27986
27898
  key: r.key,
@@ -28008,7 +27920,7 @@ function makeSeedCommand(opts) {
28008
27920
  limit: { type: "number", description: "Max keys 1-100 (default 20)", required: false, default: 20 }
28009
27921
  }
28010
27922
  });
28011
- return defineCommand168({
27923
+ return defineCommand167({
28012
27924
  meta: { name: opts.name, description: opts.description },
28013
27925
  args: {
28014
27926
  platform: { type: "string", description: "Single platform to segment on", required: false },
@@ -28057,7 +27969,7 @@ var formatsCommand = makeSeedCommand({
28057
27969
  });
28058
27970
 
28059
27971
  // src/commands/winning-ads/unfollow.ts
28060
- import { defineCommand as defineCommand169 } from "citty";
27972
+ import { defineCommand as defineCommand168 } from "citty";
28061
27973
  registerSchema({
28062
27974
  command: "winning-ads.unfollow",
28063
27975
  description: "Stop following a brand \u2014 removes it from your ad-dna library by advertiser id.",
@@ -28065,7 +27977,7 @@ registerSchema({
28065
27977
  advertiser: { type: "string", description: "Advertiser id to unfollow", required: true }
28066
27978
  }
28067
27979
  });
28068
- var unfollowCommand = defineCommand169({
27980
+ var unfollowCommand = defineCommand168({
28069
27981
  meta: {
28070
27982
  name: "unfollow",
28071
27983
  description: "Stop following a brand by advertiser id. Example: baker winning-ads unfollow adv_123"
@@ -28086,7 +27998,7 @@ var unfollowCommand = defineCommand169({
28086
27998
  });
28087
27999
 
28088
28000
  // src/commands/winning-ads/winners.ts
28089
- import { defineCommand as defineCommand170 } from "citty";
28001
+ import { defineCommand as defineCommand169 } from "citty";
28090
28002
  registerSchema({
28091
28003
  command: "winning-ads.winners",
28092
28004
  description: "Top winning ads for one advertiser id (from `advertisers` or `following`). Returns lean winner cards; add --full for DNA + longevity.",
@@ -28096,7 +28008,7 @@ registerSchema({
28096
28008
  platform: { type: "string", description: "Filter to a single platform: meta|linkedin", required: false }
28097
28009
  }
28098
28010
  });
28099
- var winnersCommand = defineCommand170({
28011
+ var winnersCommand = defineCommand169({
28100
28012
  meta: {
28101
28013
  name: "winners",
28102
28014
  description: "Top winning ads for a specific advertiser id. Example: baker winning-ads winners adv_123 --top 15 --output md"
@@ -28146,7 +28058,7 @@ var winnersCommand = defineCommand170({
28146
28058
  });
28147
28059
 
28148
28060
  // src/commands/winning-ads/index.ts
28149
- var winningAdsCommand = defineCommand171({
28061
+ var winningAdsCommand = defineCommand170({
28150
28062
  meta: {
28151
28063
  name: "winning-ads",
28152
28064
  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.
@@ -28207,7 +28119,7 @@ function getCliVersion() {
28207
28119
  }
28208
28120
 
28209
28121
  // src/cli.ts
28210
- var main = defineCommand172({
28122
+ var main = defineCommand171({
28211
28123
  meta: {
28212
28124
  name: "baker",
28213
28125
  version: getCliVersion(),
@@ -28223,7 +28135,6 @@ Introspection: Run 'baker schema <command>' to inspect argument schemas.`
28223
28135
  actions: actionsCommand,
28224
28136
  "scheduled-actions": scheduledActionsCommand,
28225
28137
  ads: adsCommand2,
28226
- analytics: analyticsCommand2,
28227
28138
  ga4: ga4Command,
28228
28139
  gsc: gscCommand,
28229
28140
  research: researchCommand,