@productmaker/mcp 12.21.2 → 12.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +1 -0
  2. package/dist/http.js +1357 -1131
  3. package/dist/stdio.js +1346 -1120
  4. package/package.json +3 -3
package/dist/http.js CHANGED
@@ -170,8 +170,31 @@ __name(canonicalizeProductContext, "canonicalizeProductContext");
170
170
  import { z as z5 } from "zod";
171
171
 
172
172
  // ../../packages/types/src/pricing-gemini-omni.ts
173
- var GEMINI_OMNI_FLAT_OUR_COST_CENTS = 84;
174
- var GEMINI_OMNI_FLAT_USER_PRICE_CENTS = 168;
173
+ var GEMINI_OMNI_RATE_CENTS_PER_SEC = {
174
+ "720p": {
175
+ ourCostCents: 4.5,
176
+ userPriceCents: 9
177
+ },
178
+ "1080p": {
179
+ ourCostCents: 5,
180
+ userPriceCents: 10
181
+ }
182
+ };
183
+ function geminiOmniBilledSeconds(clipDurationSec) {
184
+ if (!Number.isFinite(clipDurationSec) || clipDurationSec <= 0) return 1;
185
+ return Math.max(1, Math.round(clipDurationSec));
186
+ }
187
+ __name(geminiOmniBilledSeconds, "geminiOmniBilledSeconds");
188
+ function priceGeminiOmniVideo(tier, clipDurationSec) {
189
+ const rate = GEMINI_OMNI_RATE_CENTS_PER_SEC[tier];
190
+ const seconds = geminiOmniBilledSeconds(clipDurationSec);
191
+ return {
192
+ ourCostCents: rate.ourCostCents * seconds,
193
+ userPriceCents: rate.userPriceCents * seconds
194
+ };
195
+ }
196
+ __name(priceGeminiOmniVideo, "priceGeminiOmniVideo");
197
+ var GEMINI_OMNI_REFERENCE_BLOCK_PRICE = priceGeminiOmniVideo("1080p", 10);
175
198
 
176
199
  // ../../packages/types/src/image-models.ts
177
200
  var IMAGE_RESOLUTIONS = [
@@ -1430,25 +1453,14 @@ var DEFAULT_PRICING = {
1430
1453
  ourCostCents: 120,
1431
1454
  userPriceCents: 240
1432
1455
  },
1433
- // Gemini Omni Video — Mix primary generator since 2026-08-18. FLAT per
1434
- // generation: 168 KIE credits = $0.84, identical at 720p and 1080p and
1435
- // independent of the 3.5-10s trim window.
1436
- //
1437
- // The wire model became `google/gemini-omni-flash-1-1` on 2026-09-01; this
1438
- // KEY stayed `kie:gemini-omni-video` on purpose, because 1.1 charges the
1439
- // same flat rate and renaming it would orphan every historical
1440
- // BillingRecord for nothing.
1456
+ // Gemini Omni Video — Mix primary generator since 2026-08-18. The KEY stays
1457
+ // `kie:gemini-omni-video` across wire upgrades (1.1 on 2026-09-01, 1.2 on
1458
+ // 2026-11-17) so historical BillingRecords keep resolving.
1441
1459
  //
1442
- // Do NOT add per-second overrides for this key — resolveSuccessBilling bills
1443
- // it flat.
1444
- //
1445
- // Shares the constants with the pre-submit ESTIMATOR (mix-cost.ts) rather
1446
- // than repeating the numbers: a literal here that drifted from the estimator
1447
- // would quote one price and charge another on every mix.
1448
- "kie:gemini-omni-video": {
1449
- ourCostCents: GEMINI_OMNI_FLAT_OUR_COST_CENTS,
1450
- userPriceCents: GEMINI_OMNI_FLAT_USER_PRICE_CENTS
1451
- },
1460
+ // 1.2 bills PER SECOND of the input clip by resolution: the mix webhook
1461
+ // passes priceGeminiOmniVideo() overrides (see pricing-gemini-omni.ts). This
1462
+ // static entry is the reference for one 10s block at 1080p, for audits.
1463
+ "kie:gemini-omni-video": GEMINI_OMNI_REFERENCE_BLOCK_PRICE,
1452
1464
  "kie:video-lipsync-generation": {
1453
1465
  ourCostCents: 45,
1454
1466
  userPriceCents: 90
@@ -1587,6 +1599,13 @@ var DEFAULT_PRICING = {
1587
1599
  ourCostCents: 3,
1588
1600
  userPriceCents: 6
1589
1601
  },
1602
+ // Landing policy rung since 2026-11-14 (KIE_LANDING_POLICY_IMAGE_MODEL).
1603
+ // KIE: 6.3 credits at 2K + 1.44 per input image ($0.005/credit) — ~$0.039 with
1604
+ // one reference, ~$0.053 with three; 6¢ covers the usual 1–3 product refs.
1605
+ "kie:image-generation:seedream-5-5-image-to-image": {
1606
+ ourCostCents: 6,
1607
+ userPriceCents: 12
1608
+ },
1590
1609
  // flux-3/klein-edit-image — KIE's edit-only Jobs model (image_urls required).
1591
1610
  // Flat key: the billing row carries no resolution tier for it. KIE charges
1592
1611
  // ~$0.008@1K / ~$0.0125@2K / ~$0.0325@4K — 2¢ ourCost covers the common
@@ -8600,6 +8619,22 @@ var MoveAnchorOperationSchema = z24.object({
8600
8619
  beforeAnchorId: CodeLandingIdSchema.optional(),
8601
8620
  afterAnchorId: CodeLandingIdSchema.optional()
8602
8621
  });
8622
+ var ReplaceTextOperationSchema = z24.object({
8623
+ requirementIds: LandingPatchRequirementIdsSchema,
8624
+ kind: z24.literal("replace_text"),
8625
+ anchorId: CodeLandingIdSchema,
8626
+ pmId: z24.string().min(1).max(80).optional(),
8627
+ currentText: z24.string().min(1).max(2e3).optional(),
8628
+ text: z24.string().min(1).max(4e3)
8629
+ });
8630
+ var ReplaceImageOperationSchema = z24.object({
8631
+ requirementIds: LandingPatchRequirementIdsSchema,
8632
+ kind: z24.literal("replace_image"),
8633
+ anchorId: CodeLandingIdSchema,
8634
+ assetId: CodeLandingIdSchema,
8635
+ replacementAssetId: CodeLandingIdSchema,
8636
+ alt: z24.string().min(1).max(300).optional()
8637
+ });
8603
8638
  var LandingPatchOperationSchema = z24.discriminatedUnion("kind", [
8604
8639
  z24.object({
8605
8640
  requirementIds: LandingPatchRequirementIdsSchema,
@@ -8607,6 +8642,8 @@ var LandingPatchOperationSchema = z24.discriminatedUnion("kind", [
8607
8642
  anchorId: CodeLandingIdSchema,
8608
8643
  html: z24.string().min(1).max(22e4)
8609
8644
  }),
8645
+ ReplaceTextOperationSchema,
8646
+ ReplaceImageOperationSchema,
8610
8647
  z24.object({
8611
8648
  requirementIds: LandingPatchRequirementIdsSchema,
8612
8649
  kind: z24.literal("replace_css"),
@@ -8667,6 +8704,17 @@ var LandingPatchSchema = z24.object({
8667
8704
  operations: z24.array(LandingPatchOperationSchema).min(1).max(32)
8668
8705
  }).superRefine((value, ctx) => {
8669
8706
  value.operations.forEach((operation, index) => {
8707
+ if (operation.kind === "replace_text" && operation.pmId == null === (operation.currentText == null)) {
8708
+ ctx.addIssue({
8709
+ code: z24.ZodIssueCode.custom,
8710
+ message: "replace_text requires exactly one of pmId or currentText",
8711
+ path: [
8712
+ "operations",
8713
+ index
8714
+ ]
8715
+ });
8716
+ return;
8717
+ }
8670
8718
  if (operation.kind !== "move_anchor") return;
8671
8719
  if (operation.beforeAnchorId == null === (operation.afterAnchorId == null)) {
8672
8720
  ctx.addIssue({
@@ -11436,6 +11484,14 @@ var CreativeEngineRecipeSchema = z39.object({
11436
11484
  * speaker-based rules exactly.
11437
11485
  */
11438
11486
  personFramingPolicy: z39.literal("scene_person_framing_v1").optional(),
11487
+ /**
11488
+ * New executable recipes keep multi-scene cuts tight: at most 0.4 s
11489
+ * of silence across a seam, a 0.15 s minimum tail after each master
11490
+ * and a fitted total down to 90% of the request (same price) instead
11491
+ * of silent padding. Absent — every historical recipe — keeps the
11492
+ * 1.0 s cap, 0.35 s tail and 100% floor exactly. Single take ignores it.
11493
+ */
11494
+ seamSilencePolicy: z39.literal("tight_seams_v1").optional(),
11439
11495
  /**
11440
11496
  * New recipes give the director's corrective turn every plan error at
11441
11497
  * once, fit durations even when another rule also fails (reporting
@@ -11769,6 +11825,24 @@ var CreativeEngineSpeakerPixelRegionSchema = z39.object({
11769
11825
  width: z39.number().int().positive(),
11770
11826
  height: z39.number().int().positive()
11771
11827
  }).strict().refine((region) => Object.values(region).every((value) => value % 2 === 0), "Speaker region must align to chroma pixels");
11828
+ var CreativeEngineFaceBoxSchema = z39.object({
11829
+ x: z39.number().finite().min(0).max(1),
11830
+ y: z39.number().finite().min(0).max(1),
11831
+ width: z39.number().finite().positive().max(1),
11832
+ height: z39.number().finite().positive().max(1)
11833
+ }).strict();
11834
+ var CreativeEngineFaceFrameSchema = z39.object({
11835
+ timestampSec: z39.number().finite().nonnegative(),
11836
+ faces: z39.array(CreativeEngineFaceBoxSchema.extend({
11837
+ score: z39.number().finite().min(0).max(1)
11838
+ }).strict())
11839
+ }).strict();
11840
+ var CreativeEngineFaceTrackSchema = z39.object({
11841
+ id: z39.string().regex(/^face_[1-9][0-9]*$/),
11842
+ boxes: z39.array(CreativeEngineFaceBoxSchema.extend({
11843
+ timestampSec: z39.number().finite().nonnegative()
11844
+ }).strict())
11845
+ }).strict();
11772
11846
  var CreativeEngineSpeechObservationSchema = z39.object({
11773
11847
  startSec: z39.number().finite().nonnegative(),
11774
11848
  endSec: z39.number().finite().positive(),
@@ -11780,7 +11854,9 @@ var CreativeEngineSpeechObservationSchema = z39.object({
11780
11854
  ]),
11781
11855
  speakerRegion: CreativeEngineSpeakerRegionSchema.optional(),
11782
11856
  /** Includes silent background humans and anthropomorphic mouths. */
11783
- multipleVisibleSpeakers: z39.boolean().optional()
11857
+ multipleVisibleSpeakers: z39.boolean().optional(),
11858
+ /** Detected face tracks that are the speaker's own face; empty when undetected. */
11859
+ speakerFaceIds: z39.array(z39.string().regex(/^face_[1-9][0-9]*$/)).max(8).optional()
11784
11860
  }).strict().refine((value) => value.endSec > value.startSec && (!value.multipleVisibleSpeakers || !!value.speakerRegion), "Empty or unisolated speech window");
11785
11861
  var reviewUnavailabilityReason = z39.enum([
11786
11862
  "rate_limited",
@@ -12160,6 +12236,13 @@ var CreativeEngineReplanAuthorContractRetrySchema = z39.object({
12160
12236
  requestedAtMs: z39.number().int().nonnegative(),
12161
12237
  token: id2
12162
12238
  }).strict();
12239
+ var CreativeEngineDirectorTransportRetrySchema = z39.object({
12240
+ failedOperationId: id2,
12241
+ reason: z39.literal("provider_unavailable"),
12242
+ context: CreativeEngineContextBindingSchema,
12243
+ requestedAtMs: z39.number().int().nonnegative(),
12244
+ token: id2
12245
+ }).strict();
12163
12246
  var CreativeEngineCompositionRepairSchema = z39.object({
12164
12247
  reviewId: id2,
12165
12248
  outputHash: hash,
@@ -12302,6 +12385,7 @@ var CreativeEngineStateSchema = z39.object({
12302
12385
  }).strict().optional(),
12303
12386
  repairAuthorContractRetry: CreativeEngineRepairAuthorContractRetrySchema.optional(),
12304
12387
  replanAuthorContractRetry: CreativeEngineReplanAuthorContractRetrySchema.optional(),
12388
+ directorTransportRetry: CreativeEngineDirectorTransportRetrySchema.optional(),
12305
12389
  final: CreativeEngineFinalSchema.optional()
12306
12390
  }).strict().superRefine((state, ctx) => {
12307
12391
  const repairAuthorContractRetry = state.repairAuthorContractRetry;
@@ -12467,6 +12551,12 @@ var CreativeEngineEventSchema = z39.discriminatedUnion("type", [
12467
12551
  context: CreativeEngineContextBindingSchema,
12468
12552
  token: id2
12469
12553
  }).strict(),
12554
+ z39.object({
12555
+ type: z39.literal("director_transport_retry_requested"),
12556
+ failedOperationId: id2,
12557
+ context: CreativeEngineContextBindingSchema,
12558
+ token: id2
12559
+ }).strict(),
12470
12560
  z39.object({
12471
12561
  type: z39.literal("repair_author_contract_retry_requested"),
12472
12562
  failedOperationId: id2,
@@ -15792,8 +15882,23 @@ var CodeLandingEffectiveReceiptSchema = z53.object({
15792
15882
  /** Paid routed editor response cost; outer COGS remains zero, usage pricing remains actual. */
15793
15883
  routedUsageCostUsd: z53.number().finite().nonnegative().optional(),
15794
15884
  ourCostCents: z53.number().finite().nonnegative().optional(),
15795
- userPriceCents: z53.number().finite().nonnegative().optional()
15885
+ userPriceCents: z53.number().finite().nonnegative().optional(),
15886
+ /**
15887
+ * A KIE image the quoted node's model did not serve (the landing policy
15888
+ * rung): what KIE actually charged. The identity stays the node's; only
15889
+ * the recorded provider COGS follows the render that really ran.
15890
+ */
15891
+ servedProviderCostCents: z53.number().finite().nonnegative().optional()
15796
15892
  }).strict().superRefine((receipt, ctx) => {
15893
+ if (receipt.servedProviderCostCents !== void 0 && (receipt.transport !== "kie" || receipt.internalAccountingMode !== void 0)) {
15894
+ ctx.addIssue({
15895
+ code: z53.ZodIssueCode.custom,
15896
+ path: [
15897
+ "servedProviderCostCents"
15898
+ ],
15899
+ message: "a served provider cost belongs to a plain KIE receipt"
15900
+ });
15901
+ }
15797
15902
  if (!BillingProvider.safeParse(receipt.provider).success) {
15798
15903
  ctx.addIssue({
15799
15904
  code: z53.ZodIssueCode.custom,
@@ -16206,6 +16311,12 @@ var CodeLandingCostEnvelopeSchema = z53.object({
16206
16311
  kind: CodeLandingOperationKindSchema,
16207
16312
  currency: z53.literal("USD"),
16208
16313
  editPlan: LandingEditPlanSchema.optional(),
16314
+ /**
16315
+ * The admission router marked this unplanned patch a change of the whole
16316
+ * page's audience or body zone: the quote funds every still on the page
16317
+ * and the worker, not the author, decides which pictures are redone.
16318
+ */
16319
+ pageWideFocus: z53.literal(true).optional(),
16209
16320
  minimumUserCents: z53.number().finite().nonnegative(),
16210
16321
  maximumUserCents: z53.number().finite().nonnegative(),
16211
16322
  limits: z53.object({
@@ -16258,7 +16369,7 @@ var CodeLandingCostEnvelopeSchema = z53.object({
16258
16369
  const action = requirements.get(binding.requirementId)?.action;
16259
16370
  return action === "generate_image" || action === "generate_clip";
16260
16371
  });
16261
- const primary = envelope.nodes.filter((node) => node.phase === "asset" && node.round === 0);
16372
+ const primary = envelope.nodes.filter((node) => node.phase === "asset" && node.round === 0 && !node.assetId?.startsWith("asset-image-qa-"));
16262
16373
  if (envelope.kind !== "edit_patch" && envelope.kind !== "edit_full" || primary.length !== generated.length || generated.some((binding) => !primary.some((node) => node.assetId === binding.assetId))) {
16263
16374
  ctx.addIssue({
16264
16375
  code: z53.ZodIssueCode.custom,
@@ -19242,6 +19353,10 @@ var ClassicLandingImageEditQuoteEnvelopeSchema = ClassicLandingImageEditInventor
19242
19353
  var ClassicLandingImageEditBatchSnapshotSchema = ClassicLandingImageEditQuoteEnvelopeSchema.extend({
19243
19354
  quoteId: z77.string().uuid()
19244
19355
  }).strict();
19356
+ var ClassicLandingImageEditInstructionPlanStatusSchema = z77.enum([
19357
+ "planned",
19358
+ "unavailable"
19359
+ ]);
19245
19360
  var ClassicLandingImageEditBatchCheckpointItemSchema = z77.object({
19246
19361
  ownerTaskId: z77.string().uuid(),
19247
19362
  sourceIndex: z77.number().int().positive(),
@@ -19250,7 +19365,16 @@ var ClassicLandingImageEditBatchCheckpointItemSchema = z77.object({
19250
19365
  status: ClassicLandingImageEditItemStatusSchema,
19251
19366
  operationId: z77.string().min(1).nullable(),
19252
19367
  failureCode: z77.string().min(1).nullable(),
19253
- refunded: z77.boolean()
19368
+ refunded: z77.boolean(),
19369
+ /** Worker-only per-image instruction written by the batch planning step;
19370
+ * absent means the child edits with the seller's original message. */
19371
+ plannedInstruction: ClassicLandingImageEditMessageSchema.optional(),
19372
+ /** Whether the planned instruction changes the whole image or one area;
19373
+ * absent with a planned instruction means `localized`. */
19374
+ plannedEditScope: z77.enum([
19375
+ "whole_image",
19376
+ "localized"
19377
+ ]).optional()
19254
19378
  }).strict();
19255
19379
  var ClassicLandingImageEditBatchCheckpointSchema = z77.object({
19256
19380
  version: z77.literal(1),
@@ -19260,6 +19384,10 @@ var ClassicLandingImageEditBatchCheckpointSchema = z77.object({
19260
19384
  completed: z77.number().int().nonnegative(),
19261
19385
  failed: z77.number().int().nonnegative(),
19262
19386
  updatedAt: z77.string().datetime(),
19387
+ /** Set once, before the first child is admitted: `planned` when at least
19388
+ * one slot received a per-image instruction, `unavailable` when planning
19389
+ * failed and every slot keeps the original message. */
19390
+ instructionPlan: ClassicLandingImageEditInstructionPlanStatusSchema.optional(),
19263
19391
  items: z77.array(ClassicLandingImageEditBatchCheckpointItemSchema).max(CLASSIC_LANDING_IMAGE_EDIT_MAX_IMAGES)
19264
19392
  }).strict();
19265
19393
 
@@ -23489,6 +23617,21 @@ var CAPABILITY_MODEL_GUIDANCE = {
23489
23617
  "solo lectura; no conecta ni desconecta cuentas"
23490
23618
  ]
23491
23619
  },
23620
+ cancel_dropi_order: {
23621
+ summary: "Cancela en Dropi un pedido sin gu\xEDa para que no salga.",
23622
+ useWhen: [
23623
+ "el comprador cancel\xF3 el pedido"
23624
+ ],
23625
+ avoidWhen: [
23626
+ "ya tiene gu\xEDa: va por novedad"
23627
+ ],
23628
+ defaults: [
23629
+ "pa\xEDs CO"
23630
+ ],
23631
+ disclosures: [
23632
+ "autoridad expl\xEDcita del comprador o vendedor; no se deshace"
23633
+ ]
23634
+ },
23492
23635
  sync_dropi_orders: {
23493
23636
  summary: "Trae los pedidos reales de su cuenta Dropi al libro de cuentas.",
23494
23637
  useWhen: [
@@ -26932,6 +27075,37 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
26932
27075
  ],
26933
27076
  MCP_ONLY_CHANNEL_EXPOSURE
26934
27077
  ),
27078
+ defineCapability(
27079
+ "cancel_dropi_order",
27080
+ // Filled by the MCP schema fingerprint test.
27081
+ "ad519ce693e2552a9dd66b1ad385c952048879f8c7d1633592cedf7f872c18ff",
27082
+ "external_mutation",
27083
+ "business",
27084
+ [
27085
+ "external_mutation"
27086
+ ],
27087
+ [
27088
+ slot("dropi_order", true, [
27089
+ "dropiOrderId"
27090
+ ]),
27091
+ slot("cancel_reason", true, [
27092
+ "reason"
27093
+ ]),
27094
+ slot("country", false, [
27095
+ "countryCode"
27096
+ ]),
27097
+ slot("dropi_connection", false, [
27098
+ "connectionId"
27099
+ ])
27100
+ ],
27101
+ [
27102
+ "dropi_connection"
27103
+ ],
27104
+ [
27105
+ "dropi_order_cancellation"
27106
+ ],
27107
+ MCP_ONLY_CHANNEL_EXPOSURE
27108
+ ),
26935
27109
  defineCapability(
26936
27110
  "create_manual_product",
26937
27111
  // Filled by the MCP schema fingerprint test.
@@ -29445,9 +29619,15 @@ var provenance = {
29445
29619
  * knowing the extract job's inputs (plan Global Constraint "Invalidez"). */
29446
29620
  sourceImageKeys: z118.array(z118.string().min(1)).max(20).optional()
29447
29621
  };
29622
+ var ProductTruthAngleRefocusSchema = z118.object({
29623
+ angleHash: z118.string().min(1).max(64),
29624
+ modelId: z118.string().min(1).max(200),
29625
+ refocusedAt: z118.string().min(1)
29626
+ });
29448
29627
  var ProductTruthKnownSchema = ProductTruthBody.extend({
29449
29628
  ...provenance,
29450
- known: z118.literal(true)
29629
+ known: z118.literal(true),
29630
+ angleRefocus: ProductTruthAngleRefocusSchema.optional().catch(void 0)
29451
29631
  }).transform(resolveStateRefs);
29452
29632
  var ProductTruthUnknownSchema = z118.object({
29453
29633
  schemaVersion: z118.literal(PRODUCT_TRUTH_SCHEMA_VERSION),
@@ -31635,24 +31815,37 @@ var DropiFinancialSyncResultSchema = z135.object({
31635
31815
  }))
31636
31816
  });
31637
31817
 
31638
- // ../../packages/types/src/service-image.ts
31818
+ // ../../packages/types/src/dropi-order-cancel.ts
31639
31819
  import { z as z136 } from "zod";
31640
- var ServiceImageIntentSchema = z136.enum([
31820
+ var DropiOrderCancelReasonSchema = z136.enum([
31821
+ "buyer_requested",
31822
+ "seller_requested"
31823
+ ]);
31824
+ var CancelDropiOrderSchema = z136.object({
31825
+ countryCode: DropiCountrySchema.default("CO"),
31826
+ connectionId: z136.string().guid().optional(),
31827
+ reason: DropiOrderCancelReasonSchema
31828
+ }).strict();
31829
+ var DropiOrderIdSchema = z136.string().regex(/^\d{1,12}$/);
31830
+
31831
+ // ../../packages/types/src/service-image.ts
31832
+ import { z as z137 } from "zod";
31833
+ var ServiceImageIntentSchema = z137.enum([
31641
31834
  "user_brief",
31642
31835
  "delegate_to_ai"
31643
31836
  ]);
31644
- var ServiceImageReferenceRoleSchema = z136.enum([
31837
+ var ServiceImageReferenceRoleSchema = z137.enum([
31645
31838
  "upload",
31646
31839
  "logo",
31647
31840
  "hero",
31648
31841
  "brand_reference"
31649
31842
  ]);
31650
- var ServiceImageReferenceSchema = z136.object({
31651
- key: z136.string().max(600),
31843
+ var ServiceImageReferenceSchema = z137.object({
31844
+ key: z137.string().max(600),
31652
31845
  role: ServiceImageReferenceRoleSchema
31653
31846
  }).strict();
31654
- var ServiceImageInputSchema = z136.object({
31655
- instruction: z136.string().trim().max(4e3).default(""),
31847
+ var ServiceImageInputSchema = z137.object({
31848
+ instruction: z137.string().trim().max(4e3).default(""),
31656
31849
  intent: ServiceImageIntentSchema.default("user_brief")
31657
31850
  }).strict().refine((value) => value.intent === "delegate_to_ai" || value.instruction.length > 0, {
31658
31851
  message: "Cu\xE9ntanos qu\xE9 servicio quieres promocionar.",
@@ -31660,69 +31853,69 @@ var ServiceImageInputSchema = z136.object({
31660
31853
  "instruction"
31661
31854
  ]
31662
31855
  });
31663
- var ServiceImageBrandVisualSchema = z136.object({
31664
- designDirection: z136.string().max(60).optional(),
31665
- photographyStyle: z136.string().max(60).optional(),
31666
- buttonStyle: z136.string().max(40).optional(),
31667
- radiusScale: z136.string().max(40).optional(),
31668
- fonts: z136.object({
31669
- display: z136.string().max(120).optional(),
31670
- body: z136.string().max(120).optional()
31856
+ var ServiceImageBrandVisualSchema = z137.object({
31857
+ designDirection: z137.string().max(60).optional(),
31858
+ photographyStyle: z137.string().max(60).optional(),
31859
+ buttonStyle: z137.string().max(40).optional(),
31860
+ radiusScale: z137.string().max(40).optional(),
31861
+ fonts: z137.object({
31862
+ display: z137.string().max(120).optional(),
31863
+ body: z137.string().max(120).optional()
31671
31864
  }).strict().optional(),
31672
- categoryLayer: z136.string().max(60).optional(),
31673
- visualAesthetics: z136.array(z136.string().max(80)).max(20).optional(),
31674
- toneAdjectives: z136.array(z136.string().max(80)).max(20).optional(),
31675
- coreValues: z136.array(z136.string().max(120)).max(20).optional(),
31676
- paletteRoles: z136.object({
31677
- primary: z136.string().max(20).optional(),
31678
- secondary: z136.string().max(20).optional(),
31679
- tertiary: z136.string().max(20).optional(),
31680
- neutral: z136.string().max(20).optional(),
31681
- accents: z136.array(z136.string().max(20)).max(8).optional()
31865
+ categoryLayer: z137.string().max(60).optional(),
31866
+ visualAesthetics: z137.array(z137.string().max(80)).max(20).optional(),
31867
+ toneAdjectives: z137.array(z137.string().max(80)).max(20).optional(),
31868
+ coreValues: z137.array(z137.string().max(120)).max(20).optional(),
31869
+ paletteRoles: z137.object({
31870
+ primary: z137.string().max(20).optional(),
31871
+ secondary: z137.string().max(20).optional(),
31872
+ tertiary: z137.string().max(20).optional(),
31873
+ neutral: z137.string().max(20).optional(),
31874
+ accents: z137.array(z137.string().max(20)).max(8).optional()
31682
31875
  }).strict().optional(),
31683
- positioning: z136.object({
31684
- market: z136.string().max(200).optional(),
31685
- innovation: z136.string().max(200).optional(),
31686
- trust: z136.string().max(200).optional(),
31687
- design: z136.string().max(200).optional()
31876
+ positioning: z137.object({
31877
+ market: z137.string().max(200).optional(),
31878
+ innovation: z137.string().max(200).optional(),
31879
+ trust: z137.string().max(200).optional(),
31880
+ design: z137.string().max(200).optional()
31688
31881
  }).strict().optional()
31689
31882
  }).strict();
31690
- var ServiceImagePersonaSchema = z136.object({
31691
- name: z136.string().max(200),
31692
- demographics: z136.string().max(2e3).optional(),
31693
- painPoints: z136.array(z136.string().max(2e3)).max(10).optional(),
31694
- motivations: z136.string().max(2e3).optional(),
31695
- objections: z136.string().max(2e3).optional(),
31696
- gender: z136.string().max(60).optional()
31697
- }).strict();
31698
- var ServiceImageBusinessSchema = z136.object({
31699
- painPoints: z136.string().max(2e3).optional(),
31700
- benefits: z136.string().max(2e3).optional(),
31701
- whatsappNumber: z136.string().max(40).optional(),
31702
- whatsappMessage: z136.string().max(500).optional(),
31883
+ var ServiceImagePersonaSchema = z137.object({
31884
+ name: z137.string().max(200),
31885
+ demographics: z137.string().max(2e3).optional(),
31886
+ painPoints: z137.array(z137.string().max(2e3)).max(10).optional(),
31887
+ motivations: z137.string().max(2e3).optional(),
31888
+ objections: z137.string().max(2e3).optional(),
31889
+ gender: z137.string().max(60).optional()
31890
+ }).strict();
31891
+ var ServiceImageBusinessSchema = z137.object({
31892
+ painPoints: z137.string().max(2e3).optional(),
31893
+ benefits: z137.string().max(2e3).optional(),
31894
+ whatsappNumber: z137.string().max(40).optional(),
31895
+ whatsappMessage: z137.string().max(500).optional(),
31703
31896
  facts: ServicePageFactsSchema.optional()
31704
31897
  }).strict();
31705
- var ServiceImageContextSchema = z136.object({
31706
- kind: z136.literal("service_image"),
31707
- version: z136.literal(1),
31708
- instruction: z136.string().max(4e3),
31898
+ var ServiceImageContextSchema = z137.object({
31899
+ kind: z137.literal("service_image"),
31900
+ version: z137.literal(1),
31901
+ instruction: z137.string().max(4e3),
31709
31902
  intent: ServiceImageIntentSchema,
31710
- businessName: z136.string().max(300),
31711
- description: z136.string().max(2e4),
31712
- brandCard: z136.string().max(2e4),
31713
- palette: z136.array(z136.string()).max(20),
31714
- referenceKeys: z136.array(z136.string()).max(10),
31715
- references: z136.array(ServiceImageReferenceSchema).max(10).optional(),
31903
+ businessName: z137.string().max(300),
31904
+ description: z137.string().max(2e4),
31905
+ brandCard: z137.string().max(2e4),
31906
+ palette: z137.array(z137.string()).max(20),
31907
+ referenceKeys: z137.array(z137.string()).max(10),
31908
+ references: z137.array(ServiceImageReferenceSchema).max(10).optional(),
31716
31909
  brandVisual: ServiceImageBrandVisualSchema.optional(),
31717
31910
  persona: ServiceImagePersonaSchema.optional(),
31718
31911
  business: ServiceImageBusinessSchema.optional()
31719
31912
  }).strict();
31720
31913
 
31721
31914
  // ../../packages/types/src/brand-creation.ts
31722
- import { z as z137 } from "zod";
31723
- var BrandCreationReceiptSchema = z137.object({
31724
- brandId: z137.string().guid(),
31725
- status: z137.enum([
31915
+ import { z as z138 } from "zod";
31916
+ var BrandCreationReceiptSchema = z138.object({
31917
+ brandId: z138.string().guid(),
31918
+ status: z138.enum([
31726
31919
  "extracting",
31727
31920
  "ready",
31728
31921
  "failed"
@@ -31741,7 +31934,7 @@ function isRetryableBrandCreationFailure(error) {
31741
31934
  __name(isRetryableBrandCreationFailure, "isRetryableBrandCreationFailure");
31742
31935
 
31743
31936
  // ../../packages/types/src/task-ad-defaults.ts
31744
- import { z as z138 } from "zod";
31937
+ import { z as z139 } from "zod";
31745
31938
 
31746
31939
  // ../../packages/types/src/service-page-hosting.ts
31747
31940
  var SERVICE_PAGE_RESERVED_SLUGS = /* @__PURE__ */ new Set([
@@ -31787,25 +31980,25 @@ __name(suggestServicePageSlug, "suggestServicePageSlug");
31787
31980
 
31788
31981
  // ../../packages/types/src/task-ad-defaults.ts
31789
31982
  var AD_HEADLINE_MAX_CHARS = 255;
31790
- var TaskAdDefaultsSchema = z138.object({
31791
- subjectKind: z138.enum([
31983
+ var TaskAdDefaultsSchema = z139.object({
31984
+ subjectKind: z139.enum([
31792
31985
  "product",
31793
31986
  "service"
31794
31987
  ]),
31795
- landingUrl: z138.string().url().nullable(),
31796
- landingSource: z138.enum([
31988
+ landingUrl: z139.string().url().nullable(),
31989
+ landingSource: z139.enum([
31797
31990
  "shopify",
31798
31991
  "service_page"
31799
31992
  ]).nullable(),
31800
- headline: z138.string().min(1).max(AD_HEADLINE_MAX_CHARS).nullable(),
31993
+ headline: z139.string().min(1).max(AD_HEADLINE_MAX_CHARS).nullable(),
31801
31994
  /** ISO 3166-1 alpha-2 when known. */
31802
- country: z138.string().min(2).nullable(),
31995
+ country: z139.string().min(2).nullable(),
31803
31996
  /** The task Brand's contact; optional for older API responses. */
31804
31997
  whatsappNumber: WhatsAppE164Schema.nullable().optional()
31805
31998
  });
31806
31999
 
31807
32000
  // ../../packages/types/src/service-website-capture.ts
31808
- import { z as z139 } from "zod";
32001
+ import { z as z140 } from "zod";
31809
32002
  var captureQueueMs = 5 * 6e4;
31810
32003
  var captureExecutionMs = 6 * 6e4;
31811
32004
  var captureProcessMs = captureExecutionMs + 6e4;
@@ -31831,13 +32024,13 @@ var WEBSITE_CAPTURE_MAX_FILES = 100;
31831
32024
  var WEBSITE_CAPTURE_MAX_FILE_BYTES = 8 * 1024 * 1024;
31832
32025
  var WEBSITE_CAPTURE_MAX_BUNDLE_BYTES = 30 * 1024 * 1024;
31833
32026
  var WEBSITE_CAPTURE_MAX_SOURCE_HTML_BYTES = 2 * 1024 * 1024;
31834
- var WebsiteCaptureCauseSchema = z139.enum([
32027
+ var WebsiteCaptureCauseSchema = z140.enum([
31835
32028
  "site_blocked",
31836
32029
  "site_unreachable",
31837
32030
  "not_enough_content",
31838
32031
  "internal"
31839
32032
  ]);
31840
- var WebsiteCaptureStatusSchema = z139.enum([
32033
+ var WebsiteCaptureStatusSchema = z140.enum([
31841
32034
  "queued",
31842
32035
  "capturing",
31843
32036
  "ready",
@@ -31859,36 +32052,36 @@ function normalizeWebsiteCaptureUrl(value) {
31859
32052
  }
31860
32053
  }
31861
32054
  __name(normalizeWebsiteCaptureUrl, "normalizeWebsiteCaptureUrl");
31862
- var WebsiteCaptureRequestSchema = z139.object({
31863
- url: z139.string().trim().max(2048).url().refine((value) => normalizeWebsiteCaptureUrl(value) !== null, "Use an HTTP(S) URL without credentials").transform((value) => normalizeWebsiteCaptureUrl(value)),
32055
+ var WebsiteCaptureRequestSchema = z140.object({
32056
+ url: z140.string().trim().max(2048).url().refine((value) => normalizeWebsiteCaptureUrl(value) !== null, "Use an HTTP(S) URL without credentials").transform((value) => normalizeWebsiteCaptureUrl(value)),
31864
32057
  language: MotionGraphicsLanguageSchema
31865
32058
  }).strict();
31866
- var WebsiteCaptureResponseSchema = z139.object({
31867
- captureId: z139.string().guid(),
32059
+ var WebsiteCaptureResponseSchema = z140.object({
32060
+ captureId: z140.string().guid(),
31868
32061
  status: WebsiteCaptureStatusSchema,
31869
- expiresAt: z139.string().datetime(),
31870
- previewUrl: z139.string().url().optional(),
32062
+ expiresAt: z140.string().datetime(),
32063
+ previewUrl: z140.string().url().optional(),
31871
32064
  /** Final customer amount for accepted Instagram acquisition still pending payment. */
31872
- socialAcquisitionPriceCents: z139.number().finite().nonnegative().optional(),
32065
+ socialAcquisitionPriceCents: z140.number().finite().nonnegative().optional(),
31873
32066
  cause: WebsiteCaptureCauseSchema.optional()
31874
32067
  });
31875
32068
  var WebsiteCaptureJobSchema = WebsiteCaptureRequestSchema.extend({
31876
- captureId: z139.string().guid(),
31877
- attempt: z139.number().int().positive(),
31878
- leaseUntil: z139.string().datetime(),
32069
+ captureId: z140.string().guid(),
32070
+ attempt: z140.number().int().positive(),
32071
+ leaseUntil: z140.string().datetime(),
31879
32072
  /** Public profile document prepared by the API; never contains a provider credential. */
31880
- socialProfileHtml: z139.string().max(2e5).optional(),
32073
+ socialProfileHtml: z140.string().max(2e5).optional(),
31881
32074
  /** Present only after explicit capability negotiation; legacy agents retain the old wire. */
31882
- websiteFallback: z139.literal("v1").optional()
32075
+ websiteFallback: z140.literal("v1").optional()
31883
32076
  });
31884
- var WebsiteCaptureClaimResponseSchema = z139.object({
32077
+ var WebsiteCaptureClaimResponseSchema = z140.object({
31885
32078
  capture: WebsiteCaptureJobSchema.nullable()
31886
32079
  });
31887
32080
  var attempt2 = {
31888
- attempt: z139.number().int().positive()
32081
+ attempt: z140.number().int().positive()
31889
32082
  };
31890
- var digest2 = z139.string().regex(/^[a-f0-9]{64}$/);
31891
- var WebsiteCaptureFallbackReasonSchema = z139.enum([
32083
+ var digest2 = z140.string().regex(/^[a-f0-9]{64}$/);
32084
+ var WebsiteCaptureFallbackReasonSchema = z140.enum([
31892
32085
  "http_403",
31893
32086
  "http_408",
31894
32087
  "http_429",
@@ -31897,207 +32090,207 @@ var WebsiteCaptureFallbackReasonSchema = z139.enum([
31897
32090
  "render_timeout",
31898
32091
  "anti_bot"
31899
32092
  ]);
31900
- var WebsiteCaptureFallbackRequestSchema = z139.object({
32093
+ var WebsiteCaptureFallbackRequestSchema = z140.object({
31901
32094
  ...attempt2,
31902
- leaseUntil: z139.string().datetime(),
31903
- deadlineAt: z139.string().datetime(),
32095
+ leaseUntil: z140.string().datetime(),
32096
+ deadlineAt: z140.string().datetime(),
31904
32097
  reason: WebsiteCaptureFallbackReasonSchema,
31905
- browserClosed: z139.literal(true)
32098
+ browserClosed: z140.literal(true)
31906
32099
  }).strict();
31907
- var sourceArtifactUrl = z139.string().url().max(8192).refine((value) => {
32100
+ var sourceArtifactUrl = z140.string().url().max(8192).refine((value) => {
31908
32101
  const url3 = new URL(value);
31909
32102
  return url3.protocol === "https:" && !url3.username && !url3.password;
31910
32103
  });
31911
- var WebsiteCaptureExternalSourceSchema = z139.object({
31912
- kind: z139.literal("firecrawl"),
31913
- finalUrl: z139.string().url().max(2048).refine((value) => normalizeWebsiteCaptureUrl(value) !== null),
32104
+ var WebsiteCaptureExternalSourceSchema = z140.object({
32105
+ kind: z140.literal("firecrawl"),
32106
+ finalUrl: z140.string().url().max(2048).refine((value) => normalizeWebsiteCaptureUrl(value) !== null),
31914
32107
  htmlUrl: sourceArtifactUrl,
31915
32108
  htmlSha256: digest2,
31916
32109
  screenshotUrl: sourceArtifactUrl,
31917
32110
  screenshotSha256: digest2
31918
32111
  }).strict();
31919
- var WebsiteCaptureUploadRequestSchema = z139.object({
32112
+ var WebsiteCaptureUploadRequestSchema = z140.object({
31920
32113
  ...attempt2,
31921
- contentLength: z139.number().int().positive().max(WEBSITE_CAPTURE_MAX_BUNDLE_BYTES),
32114
+ contentLength: z140.number().int().positive().max(WEBSITE_CAPTURE_MAX_BUNDLE_BYTES),
31922
32115
  sha256: digest2
31923
32116
  }).strict();
31924
- var WebsiteCaptureDoneRequestSchema = z139.object({
32117
+ var WebsiteCaptureDoneRequestSchema = z140.object({
31925
32118
  ...attempt2,
31926
32119
  sha256: digest2
31927
32120
  }).strict();
31928
- var WebsiteCaptureFailedRequestSchema = z139.object({
32121
+ var WebsiteCaptureFailedRequestSchema = z140.object({
31929
32122
  ...attempt2,
31930
32123
  cause: WebsiteCaptureCauseSchema
31931
32124
  }).strict();
31932
- var WebsiteCaptureBundleSchema = z139.object({
31933
- version: z139.literal(1),
31934
- files: z139.array(z139.object({
31935
- path: z139.string().max(140).regex(/^research\/(?:page\.json|(?:desktop|mobile)-[1-9]\d*\.jpg|logo\.(?:png|svg)|image-[1-9]\d*\.(?:png|jpg|jpeg|webp|svg|avif)|font-[1-9]\d*\.(?:woff2?|ttf|otf))$/),
31936
- base64: z139.string().max(Math.ceil(WEBSITE_CAPTURE_MAX_FILE_BYTES / 3) * 4).regex(/^[A-Za-z0-9+/]*={0,2}$/).refine((value) => value.length % 4 === 0),
32125
+ var WebsiteCaptureBundleSchema = z140.object({
32126
+ version: z140.literal(1),
32127
+ files: z140.array(z140.object({
32128
+ path: z140.string().max(140).regex(/^research\/(?:page\.json|(?:desktop|mobile)-[1-9]\d*\.jpg|logo\.(?:png|svg)|image-[1-9]\d*\.(?:png|jpg|jpeg|webp|svg|avif)|font-[1-9]\d*\.(?:woff2?|ttf|otf))$/),
32129
+ base64: z140.string().max(Math.ceil(WEBSITE_CAPTURE_MAX_FILE_BYTES / 3) * 4).regex(/^[A-Za-z0-9+/]*={0,2}$/).refine((value) => value.length % 4 === 0),
31937
32130
  sha256: digest2
31938
32131
  }).strict()).min(1).max(WEBSITE_CAPTURE_MAX_FILES)
31939
32132
  }).strict().refine((bundle) => new Set(bundle.files.map((file) => file.path)).size === bundle.files.length, "Duplicate capture file");
31940
- var WebsiteCaptureScreenshotSchema = z139.object({
31941
- file: z139.string(),
31942
- scrollTop: z139.number()
31943
- });
31944
- var WebsiteCaptureAccessSchema = z139.object({
31945
- publicContentText: z139.string().max(8e3),
31946
- passwordGate: z139.boolean(),
31947
- challengeGate: z139.boolean(),
31948
- blockingOverlay: z139.boolean(),
32133
+ var WebsiteCaptureScreenshotSchema = z140.object({
32134
+ file: z140.string(),
32135
+ scrollTop: z140.number()
32136
+ });
32137
+ var WebsiteCaptureAccessSchema = z140.object({
32138
+ publicContentText: z140.string().max(8e3),
32139
+ passwordGate: z140.boolean(),
32140
+ challengeGate: z140.boolean(),
32141
+ blockingOverlay: z140.boolean(),
31949
32142
  // Decoded, substantial images visible outside access walls and page chrome.
31950
32143
  // Optional for compatibility with already captured text-led research.
31951
- publicImageUrls: z139.array(z139.string().url().max(8192)).max(20).optional()
31952
- });
31953
- var WebsiteCaptureResearchSchema = z139.object({
31954
- requestedUrl: z139.string().url(),
31955
- capturedAt: z139.string().datetime(),
31956
- locale: z139.string(),
31957
- bodyTextTruncated: z139.boolean(),
31958
- finalUrl: z139.string().url(),
31959
- lang: z139.string().nullable(),
31960
- title: z139.string(),
31961
- description: z139.string(),
31962
- openGraph: z139.object({
31963
- title: z139.string(),
31964
- description: z139.string(),
31965
- image: z139.string(),
31966
- siteName: z139.string()
32144
+ publicImageUrls: z140.array(z140.string().url().max(8192)).max(20).optional()
32145
+ });
32146
+ var WebsiteCaptureResearchSchema = z140.object({
32147
+ requestedUrl: z140.string().url(),
32148
+ capturedAt: z140.string().datetime(),
32149
+ locale: z140.string(),
32150
+ bodyTextTruncated: z140.boolean(),
32151
+ finalUrl: z140.string().url(),
32152
+ lang: z140.string().nullable(),
32153
+ title: z140.string(),
32154
+ description: z140.string(),
32155
+ openGraph: z140.object({
32156
+ title: z140.string(),
32157
+ description: z140.string(),
32158
+ image: z140.string(),
32159
+ siteName: z140.string()
31967
32160
  }),
31968
- themeColor: z139.string(),
31969
- headings: z139.object({
31970
- h1: z139.array(z139.string()),
31971
- h2: z139.array(z139.string()),
31972
- h3: z139.array(z139.string())
32161
+ themeColor: z140.string(),
32162
+ headings: z140.object({
32163
+ h1: z140.array(z140.string()),
32164
+ h2: z140.array(z140.string()),
32165
+ h3: z140.array(z140.string())
31973
32166
  }),
31974
- callsToAction: z139.array(z139.string()),
31975
- listItems: z139.array(z139.string()),
31976
- bodyText: z139.string(),
32167
+ callsToAction: z140.array(z140.string()),
32168
+ listItems: z140.array(z140.string()),
32169
+ bodyText: z140.string(),
31977
32170
  access: WebsiteCaptureAccessSchema.optional(),
31978
- consent: z139.object({
31979
- pressed: z139.string().nullable(),
31980
- removed: z139.number().nonnegative()
32171
+ consent: z140.object({
32172
+ pressed: z140.string().nullable(),
32173
+ removed: z140.number().nonnegative()
31981
32174
  }).optional(),
31982
- overlaysDismissed: z139.number().int().nonnegative().optional(),
31983
- style: z139.object({
31984
- bodyBackground: z139.string(),
31985
- bodyColor: z139.string(),
31986
- bodyFont: z139.string(),
31987
- headingFont: z139.string().nullable(),
31988
- headingColor: z139.string().nullable(),
31989
- actionColors: z139.array(z139.object({
31990
- color: z139.string(),
31991
- uses: z139.number()
32175
+ overlaysDismissed: z140.number().int().nonnegative().optional(),
32176
+ style: z140.object({
32177
+ bodyBackground: z140.string(),
32178
+ bodyColor: z140.string(),
32179
+ bodyFont: z140.string(),
32180
+ headingFont: z140.string().nullable(),
32181
+ headingColor: z140.string().nullable(),
32182
+ actionColors: z140.array(z140.object({
32183
+ color: z140.string(),
32184
+ uses: z140.number()
31992
32185
  }))
31993
32186
  }),
31994
- images: z139.array(z139.object({
31995
- file: z139.string(),
31996
- src: z139.string(),
31997
- alt: z139.string(),
31998
- width: z139.number().nullable(),
31999
- height: z139.number().nullable(),
32000
- isOpenGraph: z139.boolean()
32187
+ images: z140.array(z140.object({
32188
+ file: z140.string(),
32189
+ src: z140.string(),
32190
+ alt: z140.string(),
32191
+ width: z140.number().nullable(),
32192
+ height: z140.number().nullable(),
32193
+ isOpenGraph: z140.boolean()
32001
32194
  })),
32002
- logo: z139.object({
32003
- file: z139.literal("logo.png"),
32004
- svg: z139.literal("logo.svg").optional(),
32005
- width: z139.number(),
32006
- height: z139.number()
32195
+ logo: z140.object({
32196
+ file: z140.literal("logo.png"),
32197
+ svg: z140.literal("logo.svg").optional(),
32198
+ width: z140.number(),
32199
+ height: z140.number()
32007
32200
  }).nullable(),
32008
- fonts: z139.array(z139.object({
32009
- family: z139.string(),
32010
- weight: z139.string(),
32011
- style: z139.string(),
32012
- unicodeRange: z139.string().nullable(),
32013
- file: z139.string().optional()
32201
+ fonts: z140.array(z140.object({
32202
+ family: z140.string(),
32203
+ weight: z140.string(),
32204
+ style: z140.string(),
32205
+ unicodeRange: z140.string().nullable(),
32206
+ file: z140.string().optional()
32014
32207
  }).transform((font) => ({
32015
32208
  ...font,
32016
32209
  file: font.file
32017
32210
  }))),
32018
- screenshots: z139.object({
32019
- desktop: z139.array(WebsiteCaptureScreenshotSchema),
32020
- mobile: z139.array(WebsiteCaptureScreenshotSchema)
32211
+ screenshots: z140.object({
32212
+ desktop: z140.array(WebsiteCaptureScreenshotSchema),
32213
+ mobile: z140.array(WebsiteCaptureScreenshotSchema)
32021
32214
  })
32022
32215
  });
32023
32216
 
32024
32217
  // ../../packages/types/src/demo-mode.ts
32025
- import { z as z142 } from "zod";
32218
+ import { z as z143 } from "zod";
32026
32219
 
32027
32220
  // ../../packages/types/src/demo-mode-product.ts
32028
- import { z as z140 } from "zod";
32029
- var text3 = z140.string().trim().min(1).max(2e5);
32030
- var nullableText = z140.string().max(2e5).nullable();
32031
- var image = z140.object({
32221
+ import { z as z141 } from "zod";
32222
+ var text3 = z141.string().trim().min(1).max(2e5);
32223
+ var nullableText = z141.string().max(2e5).nullable();
32224
+ var image = z141.object({
32032
32225
  provider: text3,
32033
32226
  model: text3,
32034
- prompt: z140.string().max(2e5),
32227
+ prompt: z141.string().max(2e5),
32035
32228
  imageUrl: text3,
32036
- width: z140.number().int().positive(),
32037
- height: z140.number().int().positive(),
32229
+ width: z141.number().int().positive(),
32230
+ height: z141.number().int().positive(),
32038
32231
  adCopy: nullableText,
32039
- rawResponse: z140.unknown().optional()
32232
+ rawResponse: z141.unknown().optional()
32040
32233
  });
32041
- var ProductDemoSnapshotSchema = z140.object({
32234
+ var ProductDemoSnapshotSchema = z141.object({
32042
32235
  /** Optional only for packs frozen before seller review drafts were captured. */
32043
32236
  customAngleOverride: nullableText.optional(),
32044
32237
  painPoints: nullableText.optional(),
32045
32238
  benefits: nullableText.optional(),
32046
- product: z140.object({
32239
+ product: z141.object({
32047
32240
  title: text3,
32048
32241
  price: nullableText,
32049
32242
  country: nullableText,
32050
- features: z140.array(text3).max(100),
32243
+ features: z141.array(text3).max(100),
32051
32244
  form: nullableText,
32052
- details: z140.unknown().optional(),
32053
- isCombo: z140.boolean(),
32054
- comboItems: z140.unknown().optional(),
32055
- images: z140.array(text3).min(1).max(50),
32056
- cleanImages: z140.array(text3).max(50),
32057
- cleanImagesMeta: z140.unknown().optional()
32245
+ details: z141.unknown().optional(),
32246
+ isCombo: z141.boolean(),
32247
+ comboItems: z141.unknown().optional(),
32248
+ images: z141.array(text3).min(1).max(50),
32249
+ cleanImages: z141.array(text3).max(50),
32250
+ cleanImagesMeta: z141.unknown().optional()
32058
32251
  }),
32059
- angles: z140.array(z140.object({
32252
+ angles: z141.array(z141.object({
32060
32253
  content: text3,
32061
32254
  buyerPersona: nullableText,
32062
32255
  actor: nullableText,
32063
32256
  scriptNotes: nullableText
32064
32257
  })).min(1).max(10),
32065
- videos: z140.array(z140.object({
32258
+ videos: z141.array(z141.object({
32066
32259
  /** Present only for explicit multi-template packs; legacy arrays keep selection-order playback. */
32067
- reviewAngleIndex: z140.number().int().min(0).max(9).optional(),
32260
+ reviewAngleIndex: z141.number().int().min(0).max(9).optional(),
32068
32261
  provider: text3,
32069
32262
  model: text3,
32070
32263
  script: text3,
32071
- prompt: z140.string().max(2e5),
32264
+ prompt: z141.string().max(2e5),
32072
32265
  imageUrl: text3,
32073
- durationSeconds: z140.number().int().positive().nullable(),
32266
+ durationSeconds: z141.number().int().positive().nullable(),
32074
32267
  format: VideoFormat,
32075
- resultUrls: z140.array(text3).min(1).max(10),
32076
- rawResponse: z140.unknown().optional(),
32268
+ resultUrls: z141.array(text3).min(1).max(10),
32269
+ rawResponse: z141.unknown().optional(),
32077
32270
  adCopy: nullableText
32078
32271
  })).min(1).max(10),
32079
- landingImages: z140.array(z140.object({
32272
+ landingImages: z141.array(z141.object({
32080
32273
  role: LandingRole,
32081
- indexNum: z140.number().int().min(1),
32274
+ indexNum: z141.number().int().min(1),
32082
32275
  url: text3,
32083
- width: z140.number().int().positive(),
32084
- height: z140.number().int().positive(),
32276
+ width: z141.number().int().positive(),
32277
+ height: z141.number().int().positive(),
32085
32278
  notes: nullableText
32086
32279
  })).max(20),
32087
- landingConfig: z140.unknown().optional(),
32280
+ landingConfig: z141.unknown().optional(),
32088
32281
  image,
32089
- productUseSheet: z140.unknown().optional(),
32090
- productTruth: z140.unknown().optional(),
32091
- productReference: z140.object({
32092
- referenceEvidenceVersion: z140.number().int().nonnegative(),
32093
- planVersion: z140.number().int().positive(),
32282
+ productUseSheet: z141.unknown().optional(),
32283
+ productTruth: z141.unknown().optional(),
32284
+ productReference: z141.object({
32285
+ referenceEvidenceVersion: z141.number().int().nonnegative(),
32286
+ planVersion: z141.number().int().positive(),
32094
32287
  baseReferenceSetHash: text3,
32095
- referenceSet: z140.unknown().optional(),
32096
- preparationPlan: z140.unknown().optional(),
32097
- canonicalIdentityAnchors: z140.unknown().optional()
32288
+ referenceSet: z141.unknown().optional(),
32289
+ preparationPlan: z141.unknown().optional(),
32290
+ canonicalIdentityAnchors: z141.unknown().optional()
32098
32291
  })
32099
32292
  });
32100
- var ProductDemoPhaseSchema = z140.enum([
32293
+ var ProductDemoPhaseSchema = z141.enum([
32101
32294
  "preparing",
32102
32295
  "angles",
32103
32296
  "preparing_scripts",
@@ -32105,39 +32298,39 @@ var ProductDemoPhaseSchema = z140.enum([
32105
32298
  "generating",
32106
32299
  "done"
32107
32300
  ]);
32108
- var ProductDemoJobPhaseSchema = z140.enum([
32301
+ var ProductDemoJobPhaseSchema = z141.enum([
32109
32302
  "preparing",
32110
32303
  "scripts",
32111
32304
  "generating"
32112
32305
  ]);
32113
- var ProductDemoTaskStateSchema = z140.object({
32114
- admitted: z140.boolean().default(false),
32306
+ var ProductDemoTaskStateSchema = z141.object({
32307
+ admitted: z141.boolean().default(false),
32115
32308
  phase: ProductDemoPhaseSchema,
32116
- waitMs: z140.number().int().positive(),
32309
+ waitMs: z141.number().int().positive(),
32117
32310
  snapshot: ProductDemoSnapshotSchema,
32118
- selectedAngleIndices: z140.array(z140.number().int().min(0).max(9)).max(10),
32119
- chargeCents: z140.number().int().min(0).max(1e5),
32120
- maxCents: z140.number().int().min(0).optional()
32311
+ selectedAngleIndices: z141.array(z141.number().int().min(0).max(9)).max(10),
32312
+ chargeCents: z141.number().int().min(0).max(1e5),
32313
+ maxCents: z141.number().int().min(0).optional()
32121
32314
  });
32122
32315
 
32123
32316
  // ../../packages/types/src/demo-mode-service-page-assets.ts
32124
- import { z as z141 } from "zod";
32125
- var DemoServicePageAssetSourceSchema = z141.object({
32126
- pageId: z141.string().guid(),
32127
- ownerId: z141.string().min(1),
32128
- assets: z141.array(z141.object({
32129
- id: z141.string().guid(),
32130
- storageKey: z141.string().min(1).max(1024),
32131
- mediaType: z141.enum([
32317
+ import { z as z142 } from "zod";
32318
+ var DemoServicePageAssetSourceSchema = z142.object({
32319
+ pageId: z142.string().guid(),
32320
+ ownerId: z142.string().min(1),
32321
+ assets: z142.array(z142.object({
32322
+ id: z142.string().guid(),
32323
+ storageKey: z142.string().min(1).max(1024),
32324
+ mediaType: z142.enum([
32132
32325
  "image/webp",
32133
32326
  "video/mp4"
32134
32327
  ]),
32135
- byteSize: z141.number().int().positive().max(32 * 1024 * 1024),
32136
- width: z141.number().int().positive().max(1920),
32137
- height: z141.number().int().positive().max(1920),
32138
- contentHash: z141.string().regex(/^[a-f0-9]{64}$/i),
32328
+ byteSize: z142.number().int().positive().max(32 * 1024 * 1024),
32329
+ width: z142.number().int().positive().max(1920),
32330
+ height: z142.number().int().positive().max(1920),
32331
+ contentHash: z142.string().regex(/^[a-f0-9]{64}$/i),
32139
32332
  sourceKind: ServicePageSourceKindSchema,
32140
- approvedAt: z141.string().datetime()
32333
+ approvedAt: z142.string().datetime()
32141
32334
  }).strict()).max(24)
32142
32335
  }).strict();
32143
32336
 
@@ -32149,7 +32342,7 @@ var DEMO_MODE_FLOWS = [
32149
32342
  "image",
32150
32343
  "product"
32151
32344
  ];
32152
- var DemoModeFlowSchema = z142.enum(DEMO_MODE_FLOWS);
32345
+ var DemoModeFlowSchema = z143.enum(DEMO_MODE_FLOWS);
32153
32346
  var DEMO_MODE_STEPS = [
32154
32347
  "running",
32155
32348
  "research",
@@ -32162,7 +32355,7 @@ var DEMO_MODE_STEPS = [
32162
32355
  "final",
32163
32356
  "watchdog"
32164
32357
  ];
32165
- var DemoModeStepSchema = z142.enum(DEMO_MODE_STEPS);
32358
+ var DemoModeStepSchema = z143.enum(DEMO_MODE_STEPS);
32166
32359
  var DEMO_MODE_WAIT_SECONDS = {
32167
32360
  min: 30,
32168
32361
  max: 450,
@@ -32175,8 +32368,8 @@ var DEMO_MODE_DEFAULT_CHARGE_CENTS = {
32175
32368
  image: 200,
32176
32369
  product: 1500
32177
32370
  };
32178
- var centsSchema = z142.number().int().min(0).max(1e5);
32179
- var emailSchema = z142.string().trim().toLowerCase().email();
32371
+ var centsSchema = z143.number().int().min(0).max(1e5);
32372
+ var emailSchema = z143.string().trim().toLowerCase().email();
32180
32373
  var DEMO_MODE_OPTIONAL_MOTION_TEMPLATE_KEYS = [
32181
32374
  "motionVariantTaskId",
32182
32375
  "motionThirdTaskId"
@@ -32202,28 +32395,28 @@ var DEMO_MODE_OPTIONAL_TEMPLATE_KEYS = [
32202
32395
  ...DEMO_MODE_OPTIONAL_MOTION_TEMPLATE_KEYS,
32203
32396
  ...DEMO_MODE_PRODUCT_ALL_TEMPLATE_KEYS
32204
32397
  ];
32205
- var optionalTemplateId = z142.preprocess((value) => value === "" ? void 0 : value, z142.string().guid().optional());
32206
- var DemoModeTemplatesSchema = z142.object({
32207
- brandId: z142.string().guid(),
32208
- servicePageId: z142.string().guid(),
32209
- motionTaskId: z142.string().guid(),
32398
+ var optionalTemplateId = z143.preprocess((value) => value === "" ? void 0 : value, z143.string().guid().optional());
32399
+ var DemoModeTemplatesSchema = z143.object({
32400
+ brandId: z143.string().guid(),
32401
+ servicePageId: z143.string().guid(),
32402
+ motionTaskId: z143.string().guid(),
32210
32403
  motionVariantTaskId: optionalTemplateId,
32211
32404
  motionThirdTaskId: optionalTemplateId,
32212
- imageTaskId: z142.string().guid(),
32405
+ imageTaskId: z143.string().guid(),
32213
32406
  productLandingTaskId: optionalTemplateId,
32214
32407
  productVideoTaskId: optionalTemplateId,
32215
32408
  productVideoVariantTaskId: optionalTemplateId,
32216
32409
  productVideoThirdTaskId: optionalTemplateId,
32217
32410
  productImageTaskId: optionalTemplateId
32218
32411
  });
32219
- var DemoModeEditableObjectSchema = z142.object({
32220
- productsEnabled: z142.boolean().default(false),
32221
- enabled: z142.boolean(),
32222
- emails: z142.array(emailSchema).max(50).transform((list) => [
32412
+ var DemoModeEditableObjectSchema = z143.object({
32413
+ productsEnabled: z143.boolean().default(false),
32414
+ enabled: z143.boolean(),
32415
+ emails: z143.array(emailSchema).max(50).transform((list) => [
32223
32416
  ...new Set(list)
32224
32417
  ]),
32225
- waitSeconds: z142.number().int().min(DEMO_MODE_WAIT_SECONDS.min).max(DEMO_MODE_WAIT_SECONDS.max),
32226
- chargeCents: z142.object({
32418
+ waitSeconds: z143.number().int().min(DEMO_MODE_WAIT_SECONDS.min).max(DEMO_MODE_WAIT_SECONDS.max),
32419
+ chargeCents: z143.object({
32227
32420
  brand: centsSchema,
32228
32421
  servicePage: centsSchema,
32229
32422
  motion: centsSchema,
@@ -32236,7 +32429,7 @@ var DemoModeEditableSchema = DemoModeEditableObjectSchema.superRefine((value, ct
32236
32429
  if (!value.productsEnabled) return;
32237
32430
  for (const key2 of DEMO_MODE_PRODUCT_TEMPLATE_KEYS) {
32238
32431
  if (!value.templates[key2]) ctx.addIssue({
32239
- code: z142.ZodIssueCode.custom,
32432
+ code: z143.ZodIssueCode.custom,
32240
32433
  path: [
32241
32434
  "templates",
32242
32435
  key2
@@ -32245,83 +32438,83 @@ var DemoModeEditableSchema = DemoModeEditableObjectSchema.superRefine((value, ct
32245
32438
  });
32246
32439
  }
32247
32440
  });
32248
- var nullableString = z142.string().nullable();
32249
- var DemoModeSnapshotSchema = z142.object({
32441
+ var nullableString = z143.string().nullable();
32442
+ var DemoModeSnapshotSchema = z143.object({
32250
32443
  product: ProductDemoSnapshotSchema.optional(),
32251
- brand: z142.object({
32444
+ brand: z143.object({
32252
32445
  /** Columnas de identidad de `Brand` listas para un `update` (sin id/userId/slug/estado/fechas). */
32253
- identity: z142.record(z142.string(), z142.unknown()),
32254
- productSamples: z142.array(z142.object({
32255
- name: z142.string(),
32256
- priceCents: z142.number().int().nullable(),
32446
+ identity: z143.record(z143.string(), z143.unknown()),
32447
+ productSamples: z143.array(z143.object({
32448
+ name: z143.string(),
32449
+ priceCents: z143.number().int().nullable(),
32257
32450
  currency: nullableString,
32258
- imageKey: z142.string(),
32451
+ imageKey: z143.string(),
32259
32452
  productUrl: nullableString,
32260
- position: z142.number().int()
32453
+ position: z143.number().int()
32261
32454
  })),
32262
- personas: z142.array(z142.object({
32263
- name: z142.string(),
32455
+ personas: z143.array(z143.object({
32456
+ name: z143.string(),
32264
32457
  demographics: nullableString,
32265
32458
  painPoints: nullableString,
32266
32459
  motivations: nullableString,
32267
32460
  objections: nullableString,
32268
32461
  gender: nullableString,
32269
- isDefault: z142.boolean()
32462
+ isDefault: z143.boolean()
32270
32463
  }))
32271
32464
  }),
32272
- servicePage: z142.object({
32273
- facts: z142.unknown().optional(),
32274
- review: z142.unknown().optional(),
32275
- artifact: z142.unknown().optional(),
32465
+ servicePage: z143.object({
32466
+ facts: z143.unknown().optional(),
32467
+ review: z143.unknown().optional(),
32468
+ artifact: z143.unknown().optional(),
32276
32469
  /** Optional only for snapshots saved before page-owned demo media. */
32277
32470
  assetSource: DemoServicePageAssetSourceSchema.optional()
32278
32471
  }),
32279
- motion: z142.object({
32472
+ motion: z143.object({
32280
32473
  outputs: MotionGraphicsOutputsSchema,
32281
32474
  /**
32282
32475
  * La captura REAL de la web de la plantilla (nunca una fabricada por la
32283
32476
  * demo). Null cuando la plantilla no tiene ninguna: la captura demo nunca
32284
32477
  * va live, así que el servicio usa `DEMO_MODE_PLACEHOLDER_CAPTURE`.
32285
32478
  */
32286
- capture: z142.object({
32287
- bundleKey: z142.string(),
32288
- sha256: z142.string(),
32289
- uploadBytes: z142.number().int().nullable(),
32479
+ capture: z143.object({
32480
+ bundleKey: z143.string(),
32481
+ sha256: z143.string(),
32482
+ uploadBytes: z143.number().int().nullable(),
32290
32483
  previewKey: nullableString
32291
32484
  }).nullable()
32292
32485
  }),
32293
- image: z142.object({
32294
- provider: z142.string(),
32295
- model: z142.string(),
32296
- prompt: z142.string(),
32297
- imageUrl: z142.string(),
32298
- width: z142.number().int(),
32299
- height: z142.number().int(),
32486
+ image: z143.object({
32487
+ provider: z143.string(),
32488
+ model: z143.string(),
32489
+ prompt: z143.string(),
32490
+ imageUrl: z143.string(),
32491
+ width: z143.number().int(),
32492
+ height: z143.number().int(),
32300
32493
  adCopy: nullableString,
32301
- rawResponse: z142.unknown().optional()
32494
+ rawResponse: z143.unknown().optional()
32302
32495
  })
32303
32496
  });
32304
32497
  var DemoModeConfigSchema = DemoModeEditableObjectSchema.extend({
32305
32498
  snapshot: DemoModeSnapshotSchema.nullable(),
32306
- snapshotAt: z142.string().datetime().nullable()
32499
+ snapshotAt: z143.string().datetime().nullable()
32307
32500
  });
32308
32501
  var DemoModeAdminViewSchema = DemoModeEditableObjectSchema.extend({
32309
32502
  // Sin configurar, la API devuelve ids vacíos ("" no es uuid): la vista los
32310
32503
  // admite; el PUT sí exige uuid (`DemoModeEditableSchema`).
32311
- templates: z142.object({
32312
- brandId: z142.string(),
32313
- servicePageId: z142.string(),
32314
- motionTaskId: z142.string(),
32315
- motionVariantTaskId: z142.string().optional(),
32316
- motionThirdTaskId: z142.string().optional(),
32317
- imageTaskId: z142.string(),
32318
- productLandingTaskId: z142.string().optional(),
32319
- productVideoTaskId: z142.string().optional(),
32320
- productVideoVariantTaskId: z142.string().optional(),
32321
- productVideoThirdTaskId: z142.string().optional(),
32322
- productImageTaskId: z142.string().optional()
32504
+ templates: z143.object({
32505
+ brandId: z143.string(),
32506
+ servicePageId: z143.string(),
32507
+ motionTaskId: z143.string(),
32508
+ motionVariantTaskId: z143.string().optional(),
32509
+ motionThirdTaskId: z143.string().optional(),
32510
+ imageTaskId: z143.string(),
32511
+ productLandingTaskId: z143.string().optional(),
32512
+ productVideoTaskId: z143.string().optional(),
32513
+ productVideoVariantTaskId: z143.string().optional(),
32514
+ productVideoThirdTaskId: z143.string().optional(),
32515
+ productImageTaskId: z143.string().optional()
32323
32516
  }),
32324
- snapshotAt: z142.string().nullable()
32517
+ snapshotAt: z143.string().nullable()
32325
32518
  });
32326
32519
  var DEMO_MODE_TEMPLATE_PROBLEMS = [
32327
32520
  "not_found",
@@ -32336,16 +32529,16 @@ var DEMO_MODE_TEMPLATE_PROBLEMS = [
32336
32529
  "no_angles",
32337
32530
  "no_landing"
32338
32531
  ];
32339
- var DemoModeTemplateVerdictSchema = z142.discriminatedUnion("ok", [
32340
- z142.object({
32341
- ok: z142.literal(true)
32532
+ var DemoModeTemplateVerdictSchema = z143.discriminatedUnion("ok", [
32533
+ z143.object({
32534
+ ok: z143.literal(true)
32342
32535
  }),
32343
- z142.object({
32344
- ok: z142.literal(false),
32345
- problem: z142.enum(DEMO_MODE_TEMPLATE_PROBLEMS)
32536
+ z143.object({
32537
+ ok: z143.literal(false),
32538
+ problem: z143.enum(DEMO_MODE_TEMPLATE_PROBLEMS)
32346
32539
  })
32347
32540
  ]);
32348
- var DemoModeValidationSchema = z142.object({
32541
+ var DemoModeValidationSchema = z143.object({
32349
32542
  brandId: DemoModeTemplateVerdictSchema,
32350
32543
  servicePageId: DemoModeTemplateVerdictSchema,
32351
32544
  motionTaskId: DemoModeTemplateVerdictSchema,
@@ -32358,48 +32551,48 @@ var DemoModeValidationSchema = z142.object({
32358
32551
  productVideoThirdTaskId: DemoModeTemplateVerdictSchema.optional(),
32359
32552
  productImageTaskId: DemoModeTemplateVerdictSchema.optional()
32360
32553
  });
32361
- var DemoModeJobSchema = z142.object({
32554
+ var DemoModeJobSchema = z143.object({
32362
32555
  flow: DemoModeFlowSchema,
32363
32556
  productPhase: ProductDemoJobPhaseSchema.optional(),
32364
32557
  step: DemoModeStepSchema,
32365
32558
  /** brandId | servicePageOperationId | taskId según el flujo. */
32366
- targetId: z142.string().guid(),
32367
- userId: z142.string().min(1),
32559
+ targetId: z143.string().guid(),
32560
+ userId: z143.string().min(1),
32368
32561
  /** Solo marca: la generación de extracción que el guion completa. */
32369
- generation: z142.number().int().positive().optional(),
32562
+ generation: z143.number().int().positive().optional(),
32370
32563
  /** Solo `final`/`watchdog`: la parte del snapshot de ESTE flujo, congelada al empezar. */
32371
- result: z142.unknown().optional()
32564
+ result: z143.unknown().optional()
32372
32565
  });
32373
32566
 
32374
32567
  // ../../packages/types/src/landing-optional-review.ts
32375
- import { z as z143 } from "zod";
32568
+ import { z as z144 } from "zod";
32376
32569
  var deliveryEvidence = {
32377
- contract: z143.literal("landing-optional-review-delivery-v1"),
32378
- artifactHash: z143.string().regex(/^[a-f0-9]{64}$/),
32379
- revision: z143.number().int().positive(),
32380
- providerEpoch: z143.number().int().nonnegative(),
32381
- review: z143.literal("unassessed")
32570
+ contract: z144.literal("landing-optional-review-delivery-v1"),
32571
+ artifactHash: z144.string().regex(/^[a-f0-9]{64}$/),
32572
+ revision: z144.number().int().positive(),
32573
+ providerEpoch: z144.number().int().nonnegative(),
32574
+ review: z144.literal("unassessed")
32382
32575
  };
32383
- var LandingOptionalReviewDeliveryReceiptSchema = z143.discriminatedUnion("auditOwner", [
32384
- z143.object({
32576
+ var LandingOptionalReviewDeliveryReceiptSchema = z144.discriminatedUnion("auditOwner", [
32577
+ z144.object({
32385
32578
  ...deliveryEvidence,
32386
- auditOwner: z143.literal("checkpoint"),
32387
- checkpointId: z143.string().min(1).max(256),
32388
- snapshotFingerprint: z143.string().regex(/^[a-f0-9]{64}$/),
32389
- accounting: z143.enum([
32579
+ auditOwner: z144.literal("checkpoint"),
32580
+ checkpointId: z144.string().min(1).max(256),
32581
+ snapshotFingerprint: z144.string().regex(/^[a-f0-9]{64}$/),
32582
+ accounting: z144.enum([
32390
32583
  "known",
32391
32584
  "pending"
32392
32585
  ])
32393
32586
  }).strict(),
32394
- z143.object({
32587
+ z144.object({
32395
32588
  ...deliveryEvidence,
32396
- auditOwner: z143.literal("native_step"),
32397
- operationId: z143.string().min(1).max(256),
32398
- stepId: z143.string().min(1).max(256),
32399
- stepKey: z143.string().min(1).max(512),
32400
- quoteFingerprint: z143.string().regex(/^[a-f0-9]{64}$/),
32589
+ auditOwner: z144.literal("native_step"),
32590
+ operationId: z144.string().min(1).max(256),
32591
+ stepId: z144.string().min(1).max(256),
32592
+ stepKey: z144.string().min(1).max(512),
32593
+ quoteFingerprint: z144.string().regex(/^[a-f0-9]{64}$/),
32401
32594
  // A persisted start/epoch is real custody, not proof of a known bill.
32402
- accounting: z143.literal("pending")
32595
+ accounting: z144.literal("pending")
32403
32596
  }).strict()
32404
32597
  ]);
32405
32598
 
@@ -32912,23 +33105,23 @@ import { InsufficientScopeError, InvalidTokenError } from "@modelcontextprotocol
32912
33105
  import { createRemoteJWKSet as createRemoteJWKSet2, jwtVerify as jwtVerify2 } from "jose";
32913
33106
 
32914
33107
  // src/auth/oauth-config.ts
32915
- import { z as z144 } from "zod";
33108
+ import { z as z145 } from "zod";
32916
33109
  var MCP_RESOURCE = new URL("https://mcp.productmaker.app/mcp");
32917
33110
  var MCP_SCOPE = "mcp:access";
32918
33111
  var REFRESH_SCOPE = "offline_access";
32919
33112
  var STATIC_CLIENT_ISSUER = new URL(MCP_RESOURCE.origin);
32920
- var oauthEnvSchema = z144.object({
32921
- MCP_REMOTE_AUTH_MODE: z144.literal("oauth"),
32922
- MCP_AUTH0_ISSUER: z144.string().trim().min(1),
32923
- MCP_AUTH0_AUDIENCE: z144.string().trim().refine((value) => value === MCP_RESOURCE.href, {
33113
+ var oauthEnvSchema = z145.object({
33114
+ MCP_REMOTE_AUTH_MODE: z145.literal("oauth"),
33115
+ MCP_AUTH0_ISSUER: z145.string().trim().min(1),
33116
+ MCP_AUTH0_AUDIENCE: z145.string().trim().refine((value) => value === MCP_RESOURCE.href, {
32924
33117
  message: `must equal ${MCP_RESOURCE.href}`
32925
33118
  }),
32926
- MCP_AUTH0_CLIENT_ID: z144.string().trim().min(1),
32927
- MCP_AUTH0_CLIENT_SECRET: z144.string().trim().min(1),
32928
- PM_API_AUDIENCE: z144.string().trim().min(1),
32929
- AUTH0_AUDIENCE: z144.string().trim().min(1),
32930
- MCP_STATIC_CLIENT_ID: z144.string().trim().min(1).optional(),
32931
- MCP_STATIC_CLIENT_SECRET: z144.string().trim().min(1).optional()
33119
+ MCP_AUTH0_CLIENT_ID: z145.string().trim().min(1),
33120
+ MCP_AUTH0_CLIENT_SECRET: z145.string().trim().min(1),
33121
+ PM_API_AUDIENCE: z145.string().trim().min(1),
33122
+ AUTH0_AUDIENCE: z145.string().trim().min(1),
33123
+ MCP_STATIC_CLIENT_ID: z145.string().trim().min(1).optional(),
33124
+ MCP_STATIC_CLIENT_SECRET: z145.string().trim().min(1).optional()
32932
33125
  });
32933
33126
  function formatZodIssues(error) {
32934
33127
  return error.issues.map((issue) => `${issue.path.join(".")}: ${issue.message}`).join("; ");
@@ -34317,11 +34510,11 @@ var ApiClient = class {
34317
34510
  };
34318
34511
 
34319
34512
  // src/index.ts
34320
- var MCP_VERSION = "12.21.2";
34513
+ var MCP_VERSION = "12.22.0";
34321
34514
 
34322
34515
  // src/meta-upload-app.ts
34323
34516
  import { readFileSync } from "fs";
34324
- import { z as z145 } from "zod";
34517
+ import { z as z146 } from "zod";
34325
34518
  import { registerAppResource, RESOURCE_MIME_TYPE } from "@modelcontextprotocol/ext-apps/server";
34326
34519
 
34327
34520
  // src/public-https.ts
@@ -34805,7 +34998,7 @@ var MEDIA_UPLOAD_CONNECT_DOMAINS = [
34805
34998
  var STORAGE_ORIGINS_ERROR = "PM_MEDIA_UPLOAD_STORAGE_ORIGINS must be a JSON array of exact public HTTPS origins";
34806
34999
  function normalizeStorageOrigins(value) {
34807
35000
  try {
34808
- const origins = z145.array(z145.string().trim().min(1)).max(16).parse(value);
35001
+ const origins = z146.array(z146.string().trim().min(1)).max(16).parse(value);
34809
35002
  return [
34810
35003
  ...new Set(origins.map((origin) => {
34811
35004
  assertSafePublicBaseUrl("PM_MEDIA_UPLOAD_STORAGE_ORIGINS", origin);
@@ -35016,7 +35209,7 @@ function registerTaskResultsAppResource(server, proxyBaseUrl) {
35016
35209
  __name(registerTaskResultsAppResource, "registerTaskResultsAppResource");
35017
35210
 
35018
35211
  // src/tools/tasks.ts
35019
- import { z as z151 } from "zod";
35212
+ import { z as z152 } from "zod";
35020
35213
 
35021
35214
  // src/status-poller.ts
35022
35215
  var TERMINAL = /* @__PURE__ */ new Set([
@@ -35312,9 +35505,9 @@ async function resolveMediaRef(ref, opts) {
35312
35505
  __name(resolveMediaRef, "resolveMediaRef");
35313
35506
 
35314
35507
  // src/tools/shared.ts
35315
- import { z as z146 } from "zod";
35316
- var Lang = z146.string().regex(/^[a-z]{2}(?:[-_][a-zA-Z]{2})?$/, "Usa un c\xF3digo de idioma BCP-47, por ejemplo es, en-US o pt-BR").max(10);
35317
- var Country = z146.string().min(2).max(3);
35508
+ import { z as z147 } from "zod";
35509
+ var Lang = z147.string().regex(/^[a-z]{2}(?:[-_][a-zA-Z]{2})?$/, "Usa un c\xF3digo de idioma BCP-47, por ejemplo es, en-US o pt-BR").max(10);
35510
+ var Country = z147.string().min(2).max(3);
35318
35511
  var LandingStrategyEnum = SelectableLandingStrategySchema;
35319
35512
  var LandingImageFormatEnum = LandingImageFormatSchema;
35320
35513
  var VideoPresetEnum = VideoPreset.extract([
@@ -35423,7 +35616,7 @@ function animationStyleApplies(videoPreset, angleNarratives) {
35423
35616
  return ANIMATED_VIDEO_PRESETS.has(videoPreset ?? "") || (angleNarratives ?? []).some((n) => ANIMATED_NARRATIVE_STYLES.has(n));
35424
35617
  }
35425
35618
  __name(animationStyleApplies, "animationStyleApplies");
35426
- var VideoTierEnum = z146.enum([
35619
+ var VideoTierEnum = z147.enum([
35427
35620
  "basic"
35428
35621
  ]);
35429
35622
  function resolveVideoTier(_tier) {
@@ -35481,10 +35674,10 @@ var ImageCreativeStyleEnum = ImageCreativeStyle;
35481
35674
  var ImageCreativeArchetypeEnum = ImageCreativeArchetype;
35482
35675
  var ImageCreativeVisualTreatmentEnum = ImageCreativeVisualTreatment;
35483
35676
  var ImageCreativeAspectRatioEnum = ImageCreativeAspectRatio;
35484
- var ImageRefSchema = z146.object({
35485
- url: z146.string().url().optional().describe('URL p\xFAblica HTTPS de la foto. Ej: una URL de Shopify CDN, Cloudinary, Imgur. \xDAsala cuando el usuario te diga "est\xE1 en X.com/foto.jpg" o cuando la foto ya est\xE9 hospedada.'),
35486
- path: z146.string().min(1).optional().describe('Ruta del archivo en el computador del usuario. Ej: "/Users/maria/Desktop/foto.jpg", "~/Pictures/camiseta.png", "C:\\Users\\Maria\\Desktop\\foto.jpg". El MCP local la lee del disco y la sube. SOLO funciona cuando el MCP corre local (stdio). NO funciona en mcp.productmaker.app (HTTP) \u2014 ah\xED usa `url`.'),
35487
- assetId: z146.string().guid().optional().describe("ID opaco devuelto por check_media_upload. \xDAsalo para una imagen subida desde el MCP App; ProductMaker adopta el archivo directamente y el MCP nunca descarga sus bytes.")
35677
+ var ImageRefSchema = z147.object({
35678
+ url: z147.string().url().optional().describe('URL p\xFAblica HTTPS de la foto. Ej: una URL de Shopify CDN, Cloudinary, Imgur. \xDAsala cuando el usuario te diga "est\xE1 en X.com/foto.jpg" o cuando la foto ya est\xE9 hospedada.'),
35679
+ path: z147.string().min(1).optional().describe('Ruta del archivo en el computador del usuario. Ej: "/Users/maria/Desktop/foto.jpg", "~/Pictures/camiseta.png", "C:\\Users\\Maria\\Desktop\\foto.jpg". El MCP local la lee del disco y la sube. SOLO funciona cuando el MCP corre local (stdio). NO funciona en mcp.productmaker.app (HTTP) \u2014 ah\xED usa `url`.'),
35680
+ assetId: z147.string().guid().optional().describe("ID opaco devuelto por check_media_upload. \xDAsalo para una imagen subida desde el MCP App; ProductMaker adopta el archivo directamente y el MCP nunca descarga sus bytes.")
35488
35681
  }).refine((v) => [
35489
35682
  v.url,
35490
35683
  v.path,
@@ -35492,11 +35685,11 @@ var ImageRefSchema = z146.object({
35492
35685
  ].filter(Boolean).length === 1, {
35493
35686
  message: "each image entry must have exactly one of `url`, `path`, or `assetId`"
35494
35687
  });
35495
- var ImagesInput = z146.array(ImageRefSchema).min(1).max(5).superRefine((images, ctx) => {
35688
+ var ImagesInput = z147.array(ImageRefSchema).min(1).max(5).superRefine((images, ctx) => {
35496
35689
  const assetCount = images.filter((image2) => Boolean(image2.assetId)).length;
35497
35690
  if (assetCount > 0 && assetCount !== images.length) {
35498
35691
  ctx.addIssue({
35499
- code: z146.ZodIssueCode.custom,
35692
+ code: z147.ZodIssueCode.custom,
35500
35693
  message: "all image entries must use assetId, or all must use URL/path sources"
35501
35694
  });
35502
35695
  }
@@ -35577,14 +35770,14 @@ async function submitCreative(api, opts) {
35577
35770
  });
35578
35771
  }
35579
35772
  __name(submitCreative, "submitCreative");
35580
- var ResearchTargetCountryEnum = z146.enum([
35773
+ var ResearchTargetCountryEnum = z147.enum([
35581
35774
  "CO",
35582
35775
  "MX",
35583
35776
  "PE",
35584
35777
  "EC",
35585
35778
  "CL"
35586
35779
  ]);
35587
- var ResearchCategoryEnum = z146.enum([
35780
+ var ResearchCategoryEnum = z147.enum([
35588
35781
  "auto",
35589
35782
  "automotive",
35590
35783
  "kitchen",
@@ -35753,6 +35946,11 @@ var McpErrorCode = {
35753
35946
  CAMPAIGN_NO_CREATIVES: "CAMPAIGN_NO_CREATIVES",
35754
35947
  CAMPAIGN_MISSING_THUMBNAILS: "CAMPAIGN_MISSING_THUMBNAILS",
35755
35948
  CAMPAIGN_RECONCILIATION_REQUIRED: "CAMPAIGN_RECONCILIATION_REQUIRED",
35949
+ // Dropi order actions (cancel_dropi_order)
35950
+ DROPI_CANCEL_UNCERTAIN: "DROPI_CANCEL_UNCERTAIN",
35951
+ DROPI_CANCEL_INVALID_RESPONSE: "DROPI_CANCEL_INVALID_RESPONSE",
35952
+ DROPI_CANCEL_REJECTED: "DROPI_CANCEL_REJECTED",
35953
+ DROPI_RECONNECT_REQUIRED: "DROPI_RECONNECT_REQUIRED",
35756
35954
  // Shopify
35757
35955
  SHOPIFY_NOT_CONNECTED: "SHOPIFY_NOT_CONNECTED",
35758
35956
  SHOPIFY_TOKEN_EXPIRED: "SHOPIFY_TOKEN_EXPIRED",
@@ -35860,6 +36058,11 @@ var CODE_MESSAGES = {
35860
36058
  SERVICE_VIDEO_ADMISSION_BUSY: "Video input validation is busy. Try again shortly with the same request. No task was created and no credits were charged.",
35861
36059
  SERVICE_VIDEO_ADMISSION_TIMEOUT: "Video input validation took too long. Try again shortly with the same request. No task was created and no credits were charged.",
35862
36060
  SERVICE_VIDEO_SNAPSHOT_UNAVAILABLE: "The video could not be prepared. Try again shortly with the same request. No task was created and no credits were charged.",
36061
+ // Dropi order actions
36062
+ DROPI_CANCEL_UNCERTAIN: "Dropi did not confirm the cancellation. Call cancel_dropi_order again: it reads the order first, so repeating is safe.",
36063
+ DROPI_CANCEL_INVALID_RESPONSE: "Dropi answered with an unreadable response. Check the order in Dropi before trying again.",
36064
+ DROPI_CANCEL_REJECTED: "Dropi refused to cancel this order. Tell the seller the reason in providerMessage; do not retry.",
36065
+ DROPI_RECONNECT_REQUIRED: "The Dropi connection was rejected. The seller must reconnect Dropi at https://productmaker.app/integrations.",
35863
36066
  // Shopify
35864
36067
  SHOPIFY_NOT_CONNECTED: "No Shopify store is connected. Connect one at https://productmaker.app/integrations before publishing.",
35865
36068
  SHOPIFY_TOKEN_EXPIRED: "The Shopify session expired. Reconnect the store at https://productmaker.app/integrations.",
@@ -36168,6 +36371,7 @@ var INVALID_PARAM_CODES = /* @__PURE__ */ new Set([
36168
36371
  McpErrorCode.SHOPIFY_TOKEN_EXPIRED,
36169
36372
  McpErrorCode.SHOPIFY_SCOPE_UPGRADE_REQUIRED,
36170
36373
  McpErrorCode.SHOPIFY_NOT_CONNECTED,
36374
+ McpErrorCode.DROPI_RECONNECT_REQUIRED,
36171
36375
  McpErrorCode.SHOPIFY_NO_PUBLISHED_THEME,
36172
36376
  McpErrorCode.SHOPIFY_SHOP_UNAVAILABLE,
36173
36377
  McpErrorCode.SHOPIFY_THEME_STRUCTURE_UNSUPPORTED,
@@ -36220,6 +36424,11 @@ var PASSTHROUGH_CODES = /* @__PURE__ */ new Set([
36220
36424
  McpErrorCode.SHOPIFY_PUBLISH_CORRECTION_NOT_CONVERGED,
36221
36425
  McpErrorCode.SHOPIFY_PUBLISH_VERIFICATION_FAILED,
36222
36426
  McpErrorCode.SHOPIFY_PUBLISH_TARGET_INCOMPATIBLE,
36427
+ // Dropi order actions
36428
+ McpErrorCode.DROPI_CANCEL_UNCERTAIN,
36429
+ McpErrorCode.DROPI_CANCEL_INVALID_RESPONSE,
36430
+ McpErrorCode.DROPI_CANCEL_REJECTED,
36431
+ McpErrorCode.DROPI_RECONNECT_REQUIRED,
36223
36432
  McpErrorCode.SHOPIFY_NOT_CONNECTED,
36224
36433
  McpErrorCode.SHOPIFY_TOKEN_EXPIRED,
36225
36434
  McpErrorCode.SHOPIFY_SCOPE_UPGRADE_REQUIRED,
@@ -36368,7 +36577,8 @@ function passthroughExtra(body) {
36368
36577
  }
36369
36578
  for (const key2 of [
36370
36579
  "dimension",
36371
- "retryAt"
36580
+ "retryAt",
36581
+ "providerMessage"
36372
36582
  ]) {
36373
36583
  if (typeof body[key2] === "string") extra[key2] = body[key2];
36374
36584
  }
@@ -36497,7 +36707,7 @@ function approveRefusalMessage(reason) {
36497
36707
  __name(approveRefusalMessage, "approveRefusalMessage");
36498
36708
 
36499
36709
  // src/tools/task-outputs.ts
36500
- import { z as z147 } from "zod";
36710
+ import { z as z148 } from "zod";
36501
36711
 
36502
36712
  // src/tools/conversational-review-format.ts
36503
36713
  function escapeMarkdownText(value) {
@@ -36628,12 +36838,12 @@ function serviceVideoResultMedia(result) {
36628
36838
  };
36629
36839
  }
36630
36840
  __name(serviceVideoResultMedia, "serviceVideoResultMedia");
36631
- var CreativeVariantIdentity = z147.object({
36632
- variantTaskId: z147.string().guid(),
36633
- sourceTaskId: z147.string().guid(),
36841
+ var CreativeVariantIdentity = z148.object({
36842
+ variantTaskId: z148.string().guid(),
36843
+ sourceTaskId: z148.string().guid(),
36634
36844
  kind: TaskCreativeVariantKind,
36635
36845
  status: TaskStatusSchema,
36636
- error: z147.string().optional()
36846
+ error: z148.string().optional()
36637
36847
  });
36638
36848
  function proxifyOutputs(outputs, proxyBaseUrl) {
36639
36849
  if (!proxyBaseUrl || !isProxyEnabled()) return outputs;
@@ -37237,29 +37447,29 @@ ${parsed.data.error ? `${escapeMarkdownText(parsed.data.error)}
37237
37447
  __name(renderVideoScriptMarkdown, "renderVideoScriptMarkdown");
37238
37448
 
37239
37449
  // src/tools/media-presentation.ts
37240
- import { z as z148 } from "zod";
37241
- var HttpsPresentationUrlSchema = z148.string().url().max(2048).refine((value) => new URL(value).protocol === "https:");
37450
+ import { z as z149 } from "zod";
37451
+ var HttpsPresentationUrlSchema = z149.string().url().max(2048).refine((value) => new URL(value).protocol === "https:");
37242
37452
  var ProductMakerPreviewUrlSchema = HttpsPresentationUrlSchema.refine((value) => {
37243
37453
  const hostname = new URL(value).hostname.toLowerCase();
37244
37454
  return hostname === "productmaker.app" || hostname.endsWith(".productmaker.app");
37245
37455
  }, "preview URL must be owned by ProductMaker");
37246
- var positiveIntAtMost = /* @__PURE__ */ __name((maximum2) => z148.number().int().positive().max(maximum2), "positiveIntAtMost");
37247
- var PresentationImageSchema = z148.object({
37248
- kind: z148.literal("image"),
37456
+ var positiveIntAtMost = /* @__PURE__ */ __name((maximum2) => z149.number().int().positive().max(maximum2), "positiveIntAtMost");
37457
+ var PresentationImageSchema = z149.object({
37458
+ kind: z149.literal("image"),
37249
37459
  url: HttpsPresentationUrlSchema,
37250
- mimeType: z148.enum([
37460
+ mimeType: z149.enum([
37251
37461
  "image/jpeg",
37252
37462
  "image/png"
37253
37463
  ]),
37254
37464
  byteSize: positiveIntAtMost(5 * 1024 * 1024),
37255
37465
  width: positiveIntAtMost(16384),
37256
37466
  height: positiveIntAtMost(16384),
37257
- alt: z148.string().trim().min(1).max(240)
37467
+ alt: z149.string().trim().min(1).max(240)
37258
37468
  }).strict();
37259
37469
  var McpMediaPresentationSchema = PresentationImageSchema;
37260
- var GalleryImageSchema = z148.object({
37470
+ var GalleryImageSchema = z149.object({
37261
37471
  url: ProductMakerPreviewUrlSchema,
37262
- alt: z148.string().trim().min(1).max(240)
37472
+ alt: z149.string().trim().min(1).max(240)
37263
37473
  });
37264
37474
  var MCP_GALLERY_IMAGE_MAX_BYTES = 10 * 1024 * 1024;
37265
37475
  async function imageBlocks(image2, transport) {
@@ -37316,12 +37526,12 @@ async function buildMcpMediaPresentationContent(rawPresentation, transport = "ht
37316
37526
  ];
37317
37527
  }
37318
37528
  __name(buildMcpMediaPresentationContent, "buildMcpMediaPresentationContent");
37319
- var OwnedImagePreviewSchema = z148.object({
37529
+ var OwnedImagePreviewSchema = z149.object({
37320
37530
  url: HttpsPresentationUrlSchema.refine((value) => {
37321
37531
  const url3 = new URL(value);
37322
37532
  return !url3.username && !url3.password && !isPrivateHost(url3.hostname);
37323
37533
  }, "Preview URL must be public HTTPS without credentials"),
37324
- alt: z148.string().trim().min(1).max(240)
37534
+ alt: z149.string().trim().min(1).max(240)
37325
37535
  });
37326
37536
  async function buildMcpImagePreviewContent(rawPreview, transport = "http") {
37327
37537
  const preview2 = OwnedImagePreviewSchema.safeParse(rawPreview);
@@ -37516,7 +37726,7 @@ async function observeMcpMediaDelivery(fingerprint, work) {
37516
37726
  __name(observeMcpMediaDelivery, "observeMcpMediaDelivery");
37517
37727
 
37518
37728
  // src/tools/animated-video.ts
37519
- import { z as z149 } from "zod";
37729
+ import { z as z150 } from "zod";
37520
37730
 
37521
37731
  // src/tools/paid-confirmation.ts
37522
37732
  function describeMarketStudyChoice(enabled) {
@@ -37765,30 +37975,30 @@ function hookVariantsLabel(count) {
37765
37975
  return count === 1 ? "1 versi\xF3n del gancho" : `${count} versiones del gancho`;
37766
37976
  }
37767
37977
  __name(hookVariantsLabel, "hookVariantsLabel");
37768
- var DurationInput = z149.union(MOTION_GRAPHICS_DURATIONS.map((d) => z149.literal(d)));
37769
- var CreateAnimatedVideoInput = z149.object({
37770
- action: z149.enum([
37978
+ var DurationInput = z150.union(MOTION_GRAPHICS_DURATIONS.map((d) => z150.literal(d)));
37979
+ var CreateAnimatedVideoInput = z150.object({
37980
+ action: z150.enum([
37771
37981
  "prepare",
37772
37982
  "status",
37773
37983
  "cancel",
37774
37984
  "generate"
37775
37985
  ]).default("prepare").describe("prepare inicia una captura gratuita; status consulta websiteCaptureId; cancel la cancela; generate requiere captura ready y confirmaci\xF3n expl\xEDcita del usuario despu\xE9s de mostrar vista previa y precio."),
37776
- brandId: z149.string().guid().optional().describe("ID de un servicio propio y listo (de create_brand). Obligatorio al preparar y crear videos nuevos. Conserva el mismo brandId en reintentos; si recuperas una generaci\xF3n hist\xF3rica aceptada sin este campo, om\xEDtelo como en la petici\xF3n original. status/cancel no lo necesitan."),
37777
- websiteCaptureId: z149.string().guid().optional().describe("ID de la captura preparada. Obligatorio para status/cancel/generate; no inventarlo."),
37778
- generationRequestId: z149.string().guid().optional().describe("Identidad opcional de una generaci\xF3n confirmada. Repite el mismo UUID al recuperar una respuesta perdida; usa otro \xFAnicamente cuando el usuario pida y confirme otro video, nunca por un error de transporte."),
37779
- confirmed: z149.boolean().optional().describe("Solo true despu\xE9s de que el usuario confirme esta captura, formato, duraci\xF3n, idioma y precio. Obligatorio para generate; preparar no genera ni cobra."),
37986
+ brandId: z150.string().guid().optional().describe("ID de un servicio propio y listo (de create_brand). Obligatorio al preparar y crear videos nuevos. Conserva el mismo brandId en reintentos; si recuperas una generaci\xF3n hist\xF3rica aceptada sin este campo, om\xEDtelo como en la petici\xF3n original. status/cancel no lo necesitan."),
37987
+ websiteCaptureId: z150.string().guid().optional().describe("ID de la captura preparada. Obligatorio para status/cancel/generate; no inventarlo."),
37988
+ generationRequestId: z150.string().guid().optional().describe("Identidad opcional de una generaci\xF3n confirmada. Repite el mismo UUID al recuperar una respuesta perdida; usa otro \xFAnicamente cuando el usuario pida y confirme otro video, nunca por un error de transporte."),
37989
+ confirmed: z150.boolean().optional().describe("Solo true despu\xE9s de que el usuario confirme esta captura, formato, duraci\xF3n, idioma y precio. Obligatorio para generate; preparar no genera ni cobra."),
37780
37990
  // Plain text, not `.url()`: users type «cal.com», and the web accepts it.
37781
37991
  // normalizeWebAddress (shared with the web) adds https:// and refuses
37782
37992
  // anything that is not a public http(s) address.
37783
- landingUrl: z149.string().trim().min(1).optional().describe("Enlace p\xFAblico de la p\xE1gina del servicio, como lo dio el usuario (\xABcal.com\xBB o \xABhttps://cal.com\xBB). El video sale de lo que muestra esa p\xE1gina: su marca, colores y mensajes."),
37993
+ landingUrl: z150.string().trim().min(1).optional().describe("Enlace p\xFAblico de la p\xE1gina del servicio, como lo dio el usuario (\xABcal.com\xBB o \xABhttps://cal.com\xBB). El video sale de lo que muestra esa p\xE1gina: su marca, colores y mensajes."),
37784
37994
  format: MotionGraphicsFormatSchema.optional().describe('Formato: "vertical" (9:16, Reels/TikTok), "square" (1:1, feed) u "horizontal" (16:9, YouTube/web). Si el usuario no lo dijo, PREG\xDANTALE.'),
37785
37995
  durationSec: DurationInput.optional().describe(`Duraci\xF3n en segundos: ${MOTION_GRAPHICS_DURATIONS.join(", ")}. Fija el precio (ver la descripci\xF3n de la herramienta). Si el usuario no la dijo, PREG\xDANTALE.`),
37786
37996
  language: MotionGraphicsLanguageSchema.optional().describe('Idioma de los textos del video: "es", "en" o "pt".'),
37787
37997
  videoQuality: MotionGraphicsVideoQualitySchema.default(DEFAULT_MOTION_GRAPHICS_VIDEO_QUALITY).describe('Calidad IA: "economy" (econ\xF3mica) o "pro" (alta, por defecto). Afecta el precio de los clips IA.'),
37788
37998
  videoResolution: MotionGraphicsVideoResolutionSchema.default(DEFAULT_MOTION_GRAPHICS_VIDEO_RESOLUTION).describe('Resoluci\xF3n: "480p" (por defecto), "720p" o "1080p". 1080p solo est\xE1 disponible con videoQuality="pro".'),
37789
- notes: z149.string().trim().max(MOTION_GRAPHICS_NOTES_MAX_CHARS).optional().describe("Opcional. Idea creativa, escenarios, acciones, di\xE1logo, voz o m\xFAsica en lenguaje natural. El director puede hacer solo motion graphics, escenas reales o escenas imposibles seg\xFAn la idea; las frases gu\xEDan el guion sin garantizar reproducci\xF3n exacta."),
37999
+ notes: z150.string().trim().max(MOTION_GRAPHICS_NOTES_MAX_CHARS).optional().describe("Opcional. Idea creativa, escenarios, acciones, di\xE1logo, voz o m\xFAsica en lenguaje natural. El director puede hacer solo motion graphics, escenas reales o escenas imposibles seg\xFAn la idea; las frases gu\xEDan el guion sin garantizar reproducci\xF3n exacta."),
37790
38000
  hookVariants: MotionGraphicsHookVariantsSchema.optional().describe(`Opcional. Cantidad de videos independientes, de 1 a ${MOTION_GRAPHICS_HOOK_VARIANTS_MAX} (por defecto 1). Cada uno tiene su propio \xE1ngulo, guion y estilo visual, respetando notes, y reserva el precio completo de un video (ver la descripci\xF3n); \xFAsalo solo si el usuario lo pide.`),
37791
- music: z149.boolean().optional().describe("Opcional. M\xFAsica y efectos dirigidos seg\xFAn el negocio y el video (por defecto true), con una copia adicional solo con voces. false entrega solo voces, sin m\xFAsica ni efectos a\xF1adidos ni el cargo de m\xFAsica. \xDAsalo solo si el usuario lo pide.")
38001
+ music: z150.boolean().optional().describe("Opcional. M\xFAsica y efectos dirigidos seg\xFAn el negocio y el video (por defecto true), con una copia adicional solo con voces. false entrega solo voces, sin m\xFAsica ni efectos a\xF1adidos ni el cargo de m\xFAsica. \xDAsalo solo si el usuario lo pide.")
37792
38002
  }).strict();
37793
38003
  function captureNextAction(capture) {
37794
38004
  if (capture.status === "ready") return "Muestra la vista previa al usuario y confirma formato, duraci\xF3n, idioma, calidad IA, resoluci\xF3n y precio. Solo despu\xE9s llama create_animated_video con action=generate, este websiteCaptureId y confirmed=true.";
@@ -37841,33 +38051,33 @@ var FORMAT_LABELS = {
37841
38051
  square: "cuadrado 1:1",
37842
38052
  horizontal: "horizontal 16:9"
37843
38053
  };
37844
- var AnimatedVideoResultSchema = z149.object({
37845
- status: z149.enum([
38054
+ var AnimatedVideoResultSchema = z150.object({
38055
+ status: z150.enum([
37846
38056
  "pending",
37847
38057
  "done",
37848
38058
  "error"
37849
38059
  ]),
37850
- serviceMode: z149.literal("motion_graphics"),
37851
- finalMp4Url: z149.string().optional(),
37852
- adCopy: z149.string().optional(),
37853
- adCopies: z149.array(z149.string()).optional(),
37854
- error: z149.string().optional(),
37855
- motionGraphics: z149.object({
38060
+ serviceMode: z150.literal("motion_graphics"),
38061
+ finalMp4Url: z150.string().optional(),
38062
+ adCopy: z150.string().optional(),
38063
+ adCopies: z150.array(z150.string()).optional(),
38064
+ error: z150.string().optional(),
38065
+ motionGraphics: z150.object({
37856
38066
  stage: MotionGraphicsStageSchema,
37857
38067
  format: MotionGraphicsFormatSchema,
37858
- durationSec: z149.number(),
37859
- width: z149.number().optional(),
37860
- height: z149.number().optional(),
38068
+ durationSec: z150.number(),
38069
+ width: z150.number().optional(),
38070
+ height: z150.number().optional(),
37861
38071
  language: MotionGraphicsLanguageSchema.optional(),
37862
38072
  videoQuality: MotionGraphicsVideoQualitySchema.optional().catch(void 0),
37863
38073
  videoResolution: MotionGraphicsVideoResolutionSchema.optional().catch(void 0),
37864
- creativeBatch: z149.object({
38074
+ creativeBatch: z150.object({
37865
38075
  index: MotionGraphicsHookVariantsSchema,
37866
38076
  count: MotionGraphicsHookVariantsSchema,
37867
- tasks: z149.array(z149.object({
37868
- taskId: z149.string().guid(),
38077
+ tasks: z150.array(z150.object({
38078
+ taskId: z150.string().guid(),
37869
38079
  index: MotionGraphicsHookVariantsSchema,
37870
- status: z149.enum([
38080
+ status: z150.enum([
37871
38081
  "queued",
37872
38082
  "processing",
37873
38083
  "done",
@@ -37875,29 +38085,29 @@ var AnimatedVideoResultSchema = z149.object({
37875
38085
  ])
37876
38086
  })).max(MOTION_GRAPHICS_HOOK_VARIANTS_MAX)
37877
38087
  }).optional().catch(void 0),
37878
- queuedAt: z149.string().optional(),
37879
- jobsAhead: z149.number().int().nonnegative().optional(),
37880
- stageStartedAt: z149.string().optional(),
37881
- renderProgress: z149.number().optional(),
38088
+ queuedAt: z150.string().optional(),
38089
+ jobsAhead: z150.number().int().nonnegative().optional(),
38090
+ stageStartedAt: z150.string().optional(),
38091
+ renderProgress: z150.number().optional(),
37882
38092
  // AI clip fields (absent on a video paid before clips, or from an API
37883
38093
  // that predates them). Lenient: an unreadable value is dropped
37884
38094
  // instead of hiding the status.
37885
- clipCount: z149.number().int().nonnegative().optional().catch(void 0),
37886
- clipsUsed: z149.number().int().nonnegative().optional().catch(void 0),
37887
- clipPriceCents: z149.number().finite().nonnegative().optional().catch(void 0),
37888
- clipsRefunded: z149.number().int().nonnegative().optional().catch(void 0),
38095
+ clipCount: z150.number().int().nonnegative().optional().catch(void 0),
38096
+ clipsUsed: z150.number().int().nonnegative().optional().catch(void 0),
38097
+ clipPriceCents: z150.number().finite().nonnegative().optional().catch(void 0),
38098
+ clipsRefunded: z150.number().int().nonnegative().optional().catch(void 0),
37889
38099
  // Hook versions (absent from an API or a video before them): the
37890
38100
  // count ordered and, once done, the signed URLs of the EXTRA versions
37891
38101
  // (hook 2, hook 3); `finalMp4Url` is hook 1.
37892
- hookVariants: z149.number().int().min(1).max(MOTION_GRAPHICS_HOOK_VARIANTS_MAX).optional().catch(void 0),
37893
- cleanVideoUrl: z149.string().url().optional().catch(void 0),
37894
- cleanVariantUrls: z149.array(z149.string().url()).max(MOTION_GRAPHICS_HOOK_VARIANTS_MAX - 1).optional().catch(void 0),
37895
- variantUrls: z149.array(z149.string().min(1)).max(MOTION_GRAPHICS_HOOK_VARIANTS_MAX - 1).optional().catch(void 0),
38102
+ hookVariants: z150.number().int().min(1).max(MOTION_GRAPHICS_HOOK_VARIANTS_MAX).optional().catch(void 0),
38103
+ cleanVideoUrl: z150.string().url().optional().catch(void 0),
38104
+ cleanVariantUrls: z150.array(z150.string().url()).max(MOTION_GRAPHICS_HOOK_VARIANTS_MAX - 1).optional().catch(void 0),
38105
+ variantUrls: z150.array(z150.string().min(1)).max(MOTION_GRAPHICS_HOOK_VARIANTS_MAX - 1).optional().catch(void 0),
37896
38106
  // Extra hook versions given back, as the task recorded it once the
37897
38107
  // refunds landed (absent until then, and from an API before it).
37898
- variantsRefunded: z149.number().int().nonnegative().optional().catch(void 0),
37899
- activity: z149.array(MotionGraphicsActivitySchema).optional().catch(void 0),
37900
- previewUrl: z149.string().optional()
38108
+ variantsRefunded: z150.number().int().nonnegative().optional().catch(void 0),
38109
+ activity: z150.array(MotionGraphicsActivitySchema).optional().catch(void 0),
38110
+ previewUrl: z150.string().optional()
37901
38111
  }).passthrough()
37902
38112
  }).passthrough();
37903
38113
  function parseAnimatedVideoResult(value) {
@@ -38176,7 +38386,7 @@ function registerAnimatedVideoTools(server, api) {
38176
38386
  nowMs: 0
38177
38387
  })
38178
38388
  });
38179
- const parsedTaskIds = z149.array(z149.string().guid()).min(1).max(MOTION_GRAPHICS_HOOK_VARIANTS_MAX).safeParse(created.taskIds);
38389
+ const parsedTaskIds = z150.array(z150.string().guid()).min(1).max(MOTION_GRAPHICS_HOOK_VARIANTS_MAX).safeParse(created.taskIds);
38180
38390
  const taskIds = parsedTaskIds.success && parsedTaskIds.data[0] === created.taskId ? parsedTaskIds.data : void 0;
38181
38391
  const receipt = {
38182
38392
  taskId: created.taskId,
@@ -38218,10 +38428,10 @@ function registerAnimatedVideoTools(server, api) {
38218
38428
  __name(registerAnimatedVideoTools, "registerAnimatedVideoTools");
38219
38429
 
38220
38430
  // src/tools/winning-product-image.ts
38221
- import { z as z150 } from "zod";
38222
- var WinnerReferenceInput = z150.object({
38223
- runId: z150.string().guid(),
38224
- candidateSourceId: z150.string().trim().min(1).max(160)
38431
+ import { z as z151 } from "zod";
38432
+ var WinnerReferenceInput = z151.object({
38433
+ runId: z151.string().guid(),
38434
+ candidateSourceId: z151.string().trim().min(1).max(160)
38225
38435
  }).strict().describe("Referencia opaca de un producto devuelto por find_winning_products/get_product_research_run.");
38226
38436
  async function resolveWinnerImages(api, winnerReference, images) {
38227
38437
  if (!winnerReference) return images;
@@ -38258,63 +38468,63 @@ var createProductTaskSingleOutputDescription = renderCreateProductTaskAvoidWhenF
38258
38468
  var CREATE_SERVICE_VIDEO_ON_MCP = PRODUCTMAKER_MCP_CAPABILITY_NAMES.includes("create_service_video");
38259
38469
  var listTasksGuidance = getProductMakerCapabilityModelGuidance("list_tasks");
38260
38470
  var editTaskDraftGuidance = getProductMakerCapabilityModelGuidance("edit_task_draft");
38261
- var CreateProductTaskInput = z151.object({
38471
+ var CreateProductTaskInput = z152.object({
38262
38472
  images: ImagesInput.optional().describe("1\u20135 fotos del mismo producto. Omitir \xFAnicamente cuando projectId apunta a un proyecto propio con imagen guardada."),
38263
38473
  winnerReference: WinnerReferenceInput.optional().describe(WINNER_IMAGE_CHOICE_GUIDANCE),
38264
- projectId: z151.string().guid().optional().describe("Opcional. Proyecto guiado propio. Permite continuar sin volver a subir la imagen guardada; nunca evita cr\xE9ditos, cuotas ni confirmaciones."),
38265
- productUrl: z151.string().url().optional().describe("Opcional. URL de la p\xE1gina del producto (Shopify, AliExpress, Amazon, etc.) para enriquecer el contexto. Si se omite, la IA infiere todo desde la imagen."),
38474
+ projectId: z152.string().guid().optional().describe("Opcional. Proyecto guiado propio. Permite continuar sin volver a subir la imagen guardada; nunca evita cr\xE9ditos, cuotas ni confirmaciones."),
38475
+ productUrl: z152.string().url().optional().describe("Opcional. URL de la p\xE1gina del producto (Shopify, AliExpress, Amazon, etc.) para enriquecer el contexto. Si se omite, la IA infiere todo desde la imagen."),
38266
38476
  language: Lang.describe('C\xF3digo de idioma para el contenido generado. Ejemplos: "es", "en", "pt". REQUERIDO \u2014 si el usuario no lo especific\xF3, PREG\xDANTALE antes de invocar. NUNCA infieras desde el contexto del chat ni asumas "es" por default.'),
38267
38477
  country: Country.describe('C\xF3digo ISO del pa\xEDs objetivo. Ejemplos: "CO", "MX", "US", "AR". Define moneda, m\xE9todos de pago locales y tono. REQUERIDO \u2014 si el usuario no lo especific\xF3, PREG\xDANTALE antes de invocar. NUNCA infieras desde el contexto del chat.'),
38268
- price: z151.string().min(1).max(120).optional().describe('Precio que se mostrar\xE1 en la landing y video. Formato libre \u2014 ej. "$89.900", "USD 29.99", "MXN 599". Opcional pero MUY IMPACTANTE: si el usuario no lo mencion\xF3, PREG\xDANTALE antes de invocar. Si te dice "t\xFA elige", om\xEDtelo y el backend sugiere uno.'),
38269
- compareAtPrice: z151.string().min(1).max(120).optional().describe('Opcional. Precio anterior para comunicar un descuento real en landing e im\xE1genes. Ej. "$129.000" cuando price="$89.900".'),
38270
- offer: z151.string().min(1).max(240).optional().describe('Oferta o promoci\xF3n a destacar. Ej. "2x1", "Env\xEDo gratis hoy", "50% OFF". Opcional pero MUY IMPACTANTE: si el usuario no lo mencion\xF3, PREG\xDANTALE antes de invocar (es v\xE1lido que diga "sin oferta"). Si te dice "t\xFA elige", om\xEDtelo.'),
38271
- paymentMethods: z151.string().min(1).max(240).optional().describe('Opcional. M\xE9todos de pago que puede mostrar la landing. Ej. "Tarjeta, PSE, Nequi, Contraentrega". Si se omite, la landing no muestra m\xE9todos de pago.'),
38272
- productContext: z151.string().max(PRODUCT_CONTEXT_MAX_CHARS).optional().describe("Opcional. Informacion adicional del producto que la IA debe usar como contexto prioritario: uso real, comprador, restricciones, diferenciadores o direccion creativa. No reemplaza la investigacion de competencia; si hay competencia, guia el primer angulo y los outputs no deben contradecirlo."),
38273
- productLabel: z151.string().trim().max(80).optional().describe('Opcional. Qu\xE9 es el producto, en pocas palabras (ej. "quita pelusas para ropa"). Es AUTORITATIVO: si lo env\xEDas, la IA usa esta identidad y no la reemplaza por otra categor\xEDa. Si lo omites, la IA detecta el producto desde la imagen.'),
38478
+ price: z152.string().min(1).max(120).optional().describe('Precio que se mostrar\xE1 en la landing y video. Formato libre \u2014 ej. "$89.900", "USD 29.99", "MXN 599". Opcional pero MUY IMPACTANTE: si el usuario no lo mencion\xF3, PREG\xDANTALE antes de invocar. Si te dice "t\xFA elige", om\xEDtelo y el backend sugiere uno.'),
38479
+ compareAtPrice: z152.string().min(1).max(120).optional().describe('Opcional. Precio anterior para comunicar un descuento real en landing e im\xE1genes. Ej. "$129.000" cuando price="$89.900".'),
38480
+ offer: z152.string().min(1).max(240).optional().describe('Oferta o promoci\xF3n a destacar. Ej. "2x1", "Env\xEDo gratis hoy", "50% OFF". Opcional pero MUY IMPACTANTE: si el usuario no lo mencion\xF3, PREG\xDANTALE antes de invocar (es v\xE1lido que diga "sin oferta"). Si te dice "t\xFA elige", om\xEDtelo.'),
38481
+ paymentMethods: z152.string().min(1).max(240).optional().describe('Opcional. M\xE9todos de pago que puede mostrar la landing. Ej. "Tarjeta, PSE, Nequi, Contraentrega". Si se omite, la landing no muestra m\xE9todos de pago.'),
38482
+ productContext: z152.string().max(PRODUCT_CONTEXT_MAX_CHARS).optional().describe("Opcional. Informacion adicional del producto que la IA debe usar como contexto prioritario: uso real, comprador, restricciones, diferenciadores o direccion creativa. No reemplaza la investigacion de competencia; si hay competencia, guia el primer angulo y los outputs no deben contradecirlo."),
38483
+ productLabel: z152.string().trim().max(80).optional().describe('Opcional. Qu\xE9 es el producto, en pocas palabras (ej. "quita pelusas para ropa"). Es AUTORITATIVO: si lo env\xEDas, la IA usa esta identidad y no la reemplaza por otra categor\xEDa. Si lo omites, la IA detecta el producto desde la imagen.'),
38274
38484
  videoPreset: VideoPresetEnum.default("auto").describe('Opcional. Tipo/narrativa del video \u2014 \xFAnico campo de "estilo" que el usuario controla. Default "auto" (la IA escoge tras analizar el producto). Todos los presets funcionan a 15s (single_call) y 30s (Multiescena), salvo "viral", que solo existe a 15 s (Un solo clip o Multiescena); "problem_solution" en single_call abre sin el producto y el producto entra por referencia en su beat de soluci\xF3n. Opciones: "auto", "ugc_dynamic" (review con experiencia y prueba), "ugc_how_to" (tutorial con pasos y resultado visible), "ugc_unboxing_chaos" (apertura y primera prueba), "problem_solution" (problema concreto, producto como soluci\xF3n y CTA), "product_showcase" (producto ejecutando una funci\xF3n real), "wearable_showcase" (prenda o accesorio modelado), "cinematic" (TV spot con receta cinematogr\xE1fica), "wild_card" (idea imposible: un truco visual que en la vida real no podr\xEDa pasar, y al cierre la invitaci\xF3n a comprar), "pixar_problem" (problema animado 3D), "pixar_sassy" (producto que habla), "viral" (video sin voz con r\xF3tulos en pantalla; antes/despu\xE9s solo en Multiescena; solo 15 s, Un solo clip o Multiescena, y solo para cuentas habilitadas; la API rechaza otras duraciones). Si el usuario pide algo fuera de esta lista, p\xEDdele una opci\xF3n v\xE1lida.'),
38275
38485
  animationStyle: AnimationStyleEnum.optional().describe('Opcional. Estilo visual SOLO para presets animados ("pixar_problem" o "pixar_sassy") \u2014 la API lo rechaza con cualquier otro preset. Opciones: "pixar_3d" (default, look 3D de pel\xEDcula animada), "claymation" (plastilina stop-motion artesanal), "wes_anderson" (tableau sim\xE9trico pastel), "sci_fi" (futurista con HUDs y ne\xF3n), "realista" (fotorrealista, fiel al producto). Si el usuario pide un look animado sin nombrar el estilo, omite el campo.'),
38276
- durationSeconds: z151.union([
38277
- z151.literal(15),
38278
- z151.literal(30)
38486
+ durationSeconds: z152.union([
38487
+ z152.literal(15),
38488
+ z152.literal(30)
38279
38489
  ]).default(15).describe("Opcional. Duraci\xF3n objetivo del video: 15s (single_call, default) o 30s (Multiescena, aproximadamente 30s y facturado por escena)."),
38280
- pauseForAngleReview: z151.boolean().optional().describe("Compatibilidad heredada. MCP deriva esta pausa de aiDecidesAll: manual siempre pausa y autom\xE1tico siempre la omite. No uses este campo para saltar reviews."),
38281
- aiDecidesAll: z151.boolean().optional().describe("Mapea el toggle web \u201CDejar que la IA decida todo\u201D. Si true, ProductMaker omite reviews. Act\xEDvalo \xFAnicamente cuando el usuario lo pida expl\xEDcitamente. Omitido/false = reviews conversacionales."),
38490
+ pauseForAngleReview: z152.boolean().optional().describe("Compatibilidad heredada. MCP deriva esta pausa de aiDecidesAll: manual siempre pausa y autom\xE1tico siempre la omite. No uses este campo para saltar reviews."),
38491
+ aiDecidesAll: z152.boolean().optional().describe("Mapea el toggle web \u201CDejar que la IA decida todo\u201D. Si true, ProductMaker omite reviews. Act\xEDvalo \xFAnicamente cuando el usuario lo pida expl\xEDcitamente. Omitido/false = reviews conversacionales."),
38282
38492
  videoTier: VideoTierEnum.optional().describe('Opcional. Estilo del video. "basic" = "Realista" para 15s; al pedir durationSeconds=30 el sistema selecciona internamente Multiescena. No se expone el tier interno directamente.'),
38283
38493
  videoStructure: VideoStructureEnum.default("single_take").describe('Opcional. Formato: "single_take" = Un solo clip (generado completo; puede incluir cambios de plano) o "multi_scene" = Multiescena. Default: single_take.'),
38284
38494
  videoQuality: VideoQualityEnum.default("economy").describe('Opcional. Calidad: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro. El proveedor se elige internamente. Default: economy.'),
38285
38495
  videoResolution: VideoResolutionEnum.optional().describe('Opcional. Resoluci\xF3n del render. En la web se pregunta "\xBFResoluci\xF3n del video?". "480p" = excelente calidad y m\xE1s econ\xF3mico (RECOMENDADO, default si se omite); "720p" = m\xE1xima nitidez, entre 3% y 15% m\xE1s caro seg\xFAn formato y tier. Si el usuario no menciona resoluci\xF3n, OMITE este campo (el backend usa 480p).'),
38286
- videoAngleCount: z151.number().int().min(1).max(3).optional().describe("Cantidad de videos a renderizar: 1, 2 o 3. REQUERIDO cuando outputs incluye video (o se omite outputs, cuyo default incluye video); om\xEDtelo s\xF3lo cuando no se generar\xE1 video. Preg\xFAntalo incluso con aiDecidesAll=true porque cambia el costo."),
38496
+ videoAngleCount: z152.number().int().min(1).max(3).optional().describe("Cantidad de videos a renderizar: 1, 2 o 3. REQUERIDO cuando outputs incluye video (o se omite outputs, cuyo default incluye video); om\xEDtelo s\xF3lo cuando no se generar\xE1 video. Preg\xFAntalo incluso con aiDecidesAll=true porque cambia el costo."),
38287
38497
  angleNarratives: PublicNarrativeStyleEnum.array().max(3).optional().describe('Opcional. Narrativa POR \xC1NGULO (posicional). Valores actuales: "review", "ugc_how_to", "ugc_unboxing_chaos", "problem_product_cta" (problema concreto, producto como soluci\xF3n y CTA), "product_showcase", "wearable_showcase", "cinematic", "wild_card", "animated_problem_pixar", "sassy_product_pixar", "viral" (video sin voz: r\xF3tulos en pantalla; antes/despu\xE9s solo en Multiescena; solo 15 s, Un solo clip o Multiescena, y solo para cuentas habilitadas; la API rechaza otras duraciones), "market" (narrativa an\xE1lisis de mercado: adapta el video a los patrones ganadores estudiados de la competencia; requiere competitorScanEnabled: true). angleNarratives[i] fuerza la narrativa del \xE1ngulo i; las posiciones restantes las elige la IA. La lista no puede superar videoAngleCount.'),
38288
- outputs: z151.array(z151.enum([
38498
+ outputs: z152.array(z152.enum([
38289
38499
  "landing",
38290
38500
  "video",
38291
38501
  "image"
38292
38502
  ])).min(1).max(3).optional().describe(`Opcional. Qu\xE9 outputs generar. Default: todos ["landing","video","image"]. Para 2 outputs: ["landing","image"] (sin video), ["video","image"] (sin landing), ["landing","video"] (sin imagen). ${createProductTaskSingleOutputDescription}`),
38293
- includeInitialLandingGif: z151.boolean().optional().describe("Opcional. En nuevas landings cl\xE1sicas habilitadas, omitirlo incluye el primer GIF del producto y su coste en el total. Env\xEDa false si el usuario lo excluye: no se genera ni se reserva su coste. Conserva la elecci\xF3n al confirmar y al reintentar."),
38294
- competitorScanEnabled: z151.boolean().optional().describe("Opcional. Default false: omitirlo significa SIN estudio de mercado. Antes de crear, llama estimate_market_study_cost con kind=product_task, muestra al usuario el costo con y sin estudio y preg\xFAntale si lo quiere; env\xEDa true solo si lo acepta (o si solicita la narrativa an\xE1lisis de mercado). Si la tarea incluye video, true analiza anuncios de la competencia y desbloquea la narrativa an\xE1lisis de mercado; si el estudio no encuentra datos suficientes, degrada al planner cl\xE1sico."),
38503
+ includeInitialLandingGif: z152.boolean().optional().describe("Opcional. En nuevas landings cl\xE1sicas habilitadas, omitirlo incluye el primer GIF del producto y su coste en el total. Env\xEDa false si el usuario lo excluye: no se genera ni se reserva su coste. Conserva la elecci\xF3n al confirmar y al reintentar."),
38504
+ competitorScanEnabled: z152.boolean().optional().describe("Opcional. Default false: omitirlo significa SIN estudio de mercado. Antes de crear, llama estimate_market_study_cost con kind=product_task, muestra al usuario el costo con y sin estudio y preg\xFAntale si lo quiere; env\xEDa true solo si lo acepta (o si solicita la narrativa an\xE1lisis de mercado). Si la tarea incluye video, true analiza anuncios de la competencia y desbloquea la narrativa an\xE1lisis de mercado; si el estudio no encuentra datos suficientes, degrada al planner cl\xE1sico."),
38295
38505
  generateAiEdit: AiEditRequestSchema.optional().describe('Opcional. Pide la Edici\xF3n con IA: una pasada que a\xF1ade texto, efectos y m\xFAsica sobre cada video entregado (variante with_ai_edit; se cobra al entregar, por video). Nivel: "economy" (Econ\xF3mica, Sonnet 5.5, m\xE1s barata) o "pro" (Opus 5.5, mejor calidad, ~10 min). true equivale a "pro"; false/omitido = sin edici\xF3n.'),
38296
- replicateWinnerWhenFound: z151.boolean().optional().describe("Conserva la preferencia de copiar un ganador si existe. false estudia el mercado sin reemplazar un \xE1ngulo por el anuncio ganador. No a\xF1ade una pregunta obligatoria."),
38297
- brandId: z151.string().guid().optional().describe("Opcional. ID de una marca del usuario; si se env\xEDa, el sistema usa su voz, colores y persona para enriquecer los outputs generados."),
38298
- actorId: z151.string().trim().min(1).max(120).optional().describe("Opcional. ID de un personaje guardado (usa list_actors para verlos). Si lo env\xEDas, su foto y su voz mandan sobre la descripci\xF3n de texto."),
38506
+ replicateWinnerWhenFound: z152.boolean().optional().describe("Conserva la preferencia de copiar un ganador si existe. false estudia el mercado sin reemplazar un \xE1ngulo por el anuncio ganador. No a\xF1ade una pregunta obligatoria."),
38507
+ brandId: z152.string().guid().optional().describe("Opcional. ID de una marca del usuario; si se env\xEDa, el sistema usa su voz, colores y persona para enriquecer los outputs generados."),
38508
+ actorId: z152.string().trim().min(1).max(120).optional().describe("Opcional. ID de un personaje guardado (usa list_actors para verlos). Si lo env\xEDas, su foto y su voz mandan sobre la descripci\xF3n de texto."),
38299
38509
  creativeGender: CreativeGenderEnum.optional().describe('Opcional. QUI\xC9N APARECE EN PANTALLA en todos los creativos de la task: el presentador del video, las personas fotografiadas en la landing y la persona del anuncio. NO es la voz. M\xE1ndalo en cuanto el usuario lo diga en cualquier momento de la conversaci\xF3n y con cualquier redacci\xF3n ("quiero una mujer", "que salga un hombre", "esto es para hombres"): si no lo mandas, el g\xE9nero lo inventa la IA y el usuario recibe lo contrario de lo que pidi\xF3 sin ning\xFAn aviso. "mixed" solo cuando pida expl\xEDcitamente ambos. Si adem\xE1s mandas actorId, el personaje guardado manda sobre este campo.'),
38300
- creativeDirection: z151.string().max(500).optional().describe('Opcional. Direcci\xF3n creativa en texto libre (colores, mood, estilo) que aplica a los outputs de IMAGEN y LANDING (no al video \u2014 el estilo/ambiente del video se dirige con scriptNotes). M\xC1XIMA PRIORIDAD: anula marca, colores y estilo por defecto. Ej. "amarillo y azul, minimalista". M\xE1x 500 caracteres.'),
38301
- headline: z151.string().max(120).optional().describe("Opcional. Titular EXACTO a renderizar. Se imprime tal cual: la IA no lo reescribe, no lo acorta y no lo traduce. Se aplica a las IM\xC1GENES y a la portada de la landing de esta task (el video no lo usa; para el video usa scriptNotes). \xDAsalo cuando el copy es de marca y no es negociable. M\xE1x 120 caracteres. Si lo omites, la IA escribe el titular."),
38302
- subheadline: z151.string().max(160).optional().describe("Opcional. Subt\xEDtulo EXACTO a renderizar, misma regla que headline. Independiente: puedes fijar solo el subt\xEDtulo. M\xE1x 160 caracteres."),
38510
+ creativeDirection: z152.string().max(500).optional().describe('Opcional. Direcci\xF3n creativa en texto libre (colores, mood, estilo) que aplica a los outputs de IMAGEN y LANDING (no al video \u2014 el estilo/ambiente del video se dirige con scriptNotes). M\xC1XIMA PRIORIDAD: anula marca, colores y estilo por defecto. Ej. "amarillo y azul, minimalista". M\xE1x 500 caracteres.'),
38511
+ headline: z152.string().max(120).optional().describe("Opcional. Titular EXACTO a renderizar. Se imprime tal cual: la IA no lo reescribe, no lo acorta y no lo traduce. Se aplica a las IM\xC1GENES y a la portada de la landing de esta task (el video no lo usa; para el video usa scriptNotes). \xDAsalo cuando el copy es de marca y no es negociable. M\xE1x 120 caracteres. Si lo omites, la IA escribe el titular."),
38512
+ subheadline: z152.string().max(160).optional().describe("Opcional. Subt\xEDtulo EXACTO a renderizar, misma regla que headline. Independiente: puedes fijar solo el subt\xEDtulo. M\xE1x 160 caracteres."),
38303
38513
  landingStrategy: LandingStrategyEnum.optional().describe('Opcional. Estructura de la landing cl\xE1sica cuando landing est\xE1 entre outputs: "classic" (Landing cl\xE1sica de ProductMaker: estructura original probada y recomendada) , "social_proof" (Landing Viral: UGC, WhatsApp, Instagram y evidencia social) o "pain_solution" (Problema y soluci\xF3n: dolor reconocible, demostraci\xF3n y transformaci\xF3n). Default "classic".'),
38304
38514
  landingImageFormat: LandingImageFormatEnum.default("9:16").describe('Opcional. Formato/relaci\xF3n de aspecto de las im\xE1genes de la landing cl\xE1sica cuando landing est\xE1 entre outputs: "9:16" (vertical, por defecto), "4:5" (vertical compacto para feed) o "1:1" (cuadrado). Default "9:16".'),
38305
38515
  landingMode: LandingModeSchema.optional().describe('Opcional. Tipo de landing cuando landing est\xE1 entre outputs: "classic" (cl\xE1sica de im\xE1genes, por defecto) o "code" (landing de c\xF3digo editable por chat; se edita luego con quote_code_landing_edit / edit_code_landing). Con "code", landingStrategy y landingImageFormat no aplican y no se env\xEDan.')
38306
38516
  }).strict();
38307
- var CreateServiceVideoInput = z151.object({
38308
- landingUrl: z151.string().url().describe("URL p\xFAblica de la landing del servicio. Es suficiente para generar el video; los medios son opcionales en la web."),
38309
- additionalContext: z151.string().max(3e3).optional().describe('Instrucci\xF3n natural prioritaria. Ej.: "adapta el ritmo de estos competidores", "enfatiza reservas de demos" o restricciones de claims.'),
38517
+ var CreateServiceVideoInput = z152.object({
38518
+ landingUrl: z152.string().url().describe("URL p\xFAblica de la landing del servicio. Es suficiente para generar el video; los medios son opcionales en la web."),
38519
+ additionalContext: z152.string().max(3e3).optional().describe('Instrucci\xF3n natural prioritaria. Ej.: "adapta el ritmo de estos competidores", "enfatiza reservas de demos" o restricciones de claims.'),
38310
38520
  language: Lang.describe("Idioma del video: es, en o pt."),
38311
- voiceId: z151.string().trim().min(1).pipe(VoiceId).optional().describe('Opcional. Voz para toda la narraci\xF3n. Usa "auto" para que la IA la alinee con el presentador. Las voces del banco compartido fueron retiradas.'),
38312
- brandId: z151.string().guid().optional().describe("Marca guardada del usuario. Aplica voz, mensajes, paleta y persona predeterminada."),
38313
- reviewMode: z151.enum([
38521
+ voiceId: z152.string().trim().min(1).pipe(VoiceId).optional().describe('Opcional. Voz para toda la narraci\xF3n. Usa "auto" para que la IA la alinee con el presentador. Las voces del banco compartido fueron retiradas.'),
38522
+ brandId: z152.string().guid().optional().describe("Marca guardada del usuario. Aplica voz, mensajes, paleta y persona predeterminada."),
38523
+ reviewMode: z152.enum([
38314
38524
  "automatic",
38315
38525
  "guided"
38316
38526
  ]).default("automatic").describe("automatic = la IA elige concepto y guion sin pausas; guided = el usuario aprueba concepto y storyboard."),
38317
- videoPreset: z151.enum([
38527
+ videoPreset: z152.enum([
38318
38528
  "auto",
38319
38529
  "ugc_dynamic",
38320
38530
  "ugc_how_to",
@@ -38324,128 +38534,128 @@ var CreateServiceVideoInput = z151.object({
38324
38534
  videoQuality: VideoQualityEnum.default("economy").describe('Opcional. Calidad: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro. El proveedor se elige internamente. Default: economy.'),
38325
38535
  videoResolution: VideoResolutionEnum.default("480p").describe('Opcional. Resoluci\xF3n: "480p" o "720p". 720p cuesta m\xE1s por segundo y solo est\xE1 disponible en "economy" y "pro" (Medio = 768P). Default: 480p.')
38326
38536
  }).strict();
38327
- var GetTaskStatusInput = z151.object({
38328
- taskId: z151.string().min(1),
38329
- waitSeconds: z151.number().int().min(0).max(120).optional()
38537
+ var GetTaskStatusInput = z152.object({
38538
+ taskId: z152.string().min(1),
38539
+ waitSeconds: z152.number().int().min(0).max(120).optional()
38330
38540
  });
38331
- var ListTasksInput = z151.object({
38332
- limit: z151.number().int().min(1).max(50).optional(),
38333
- offset: z151.number().int().min(0).optional(),
38334
- search: z151.string().optional()
38541
+ var ListTasksInput = z152.object({
38542
+ limit: z152.number().int().min(1).max(50).optional(),
38543
+ offset: z152.number().int().min(0).optional(),
38544
+ search: z152.string().optional()
38335
38545
  });
38336
38546
  var MCP_REVIEW_LIST_FIELD_MAX = IMAGE_WIZARD_LIST_FIELD_MAX;
38337
38547
  var MCP_REVIEW_FEATURE_ITEM_MAX = IMAGE_FEATURE_ITEM_MAX;
38338
- var EditTaskDraftInput = z151.object({
38339
- taskId: z151.string().min(1),
38340
- angleIndex: z151.number().int().min(0),
38341
- angle: z151.object({
38342
- angle: z151.string().min(1).max(480),
38343
- buyerPersona: z151.string().min(1).max(360),
38344
- actor: z151.string().min(1).max(360).optional(),
38345
- actorId: z151.string().trim().min(1).optional().describe("Opcional. ID de un personaje guardado (usa list_actors para verlos). Si lo env\xEDas, su foto y su voz mandan sobre la descripci\xF3n de texto."),
38346
- gender: z151.enum([
38548
+ var EditTaskDraftInput = z152.object({
38549
+ taskId: z152.string().min(1),
38550
+ angleIndex: z152.number().int().min(0),
38551
+ angle: z152.object({
38552
+ angle: z152.string().min(1).max(480),
38553
+ buyerPersona: z152.string().min(1).max(360),
38554
+ actor: z152.string().min(1).max(360).optional(),
38555
+ actorId: z152.string().trim().min(1).optional().describe("Opcional. ID de un personaje guardado (usa list_actors para verlos). Si lo env\xEDas, su foto y su voz mandan sobre la descripci\xF3n de texto."),
38556
+ gender: z152.enum([
38347
38557
  "female",
38348
38558
  "male"
38349
38559
  ]).optional(),
38350
- scriptNotes: z151.string().max(2e3).optional()
38560
+ scriptNotes: z152.string().max(2e3).optional()
38351
38561
  })
38352
38562
  });
38353
- var PendingActionPayload = z151.discriminatedUnion("kind", [
38354
- z151.object({
38355
- kind: z151.literal("product_reference_set_approval"),
38563
+ var PendingActionPayload = z152.discriminatedUnion("kind", [
38564
+ z152.object({
38565
+ kind: z152.literal("product_reference_set_approval"),
38356
38566
  scope: ProductReferenceScopeEnum.optional(),
38357
- scopeKey: z151.string().min(1).max(120).optional(),
38358
- scopeSnapshotId: z151.string().guid().optional(),
38359
- expectedScopeHash: z151.string().min(1).max(128).optional(),
38567
+ scopeKey: z152.string().min(1).max(120).optional(),
38568
+ scopeSnapshotId: z152.string().guid().optional(),
38569
+ expectedScopeHash: z152.string().min(1).max(128).optional(),
38360
38570
  decision: ProductReferenceResolutionDecisionEnum,
38361
38571
  reason: ProductReferenceRejectionReasonEnum.optional(),
38362
- affectedRefKeys: z151.array(z151.string().min(1).max(200)).min(1).optional(),
38363
- affectedPhotoNumbers: z151.array(z151.number().int().positive()).min(1).optional(),
38364
- recoveryAction: z151.enum([
38572
+ affectedRefKeys: z152.array(z152.string().min(1).max(200)).min(1).optional(),
38573
+ affectedPhotoNumbers: z152.array(z152.number().int().positive()).min(1).optional(),
38574
+ recoveryAction: z152.enum([
38365
38575
  "remove",
38366
38576
  "replace",
38367
38577
  "upload",
38368
38578
  "return_to_selection"
38369
38579
  ]).optional()
38370
38580
  }),
38371
- z151.object({
38372
- kind: z151.literal("product_reference_confirmation"),
38373
- selectedPhotoNumbers: z151.array(z151.number().int().positive().max(5)).min(1).max(5).optional().describe("Opcional. N\xFAmeros visibles de las fotos que el usuario quiere conservar; las dem\xE1s se deseleccionan. Debe quedar al menos una."),
38581
+ z152.object({
38582
+ kind: z152.literal("product_reference_confirmation"),
38583
+ selectedPhotoNumbers: z152.array(z152.number().int().positive().max(5)).min(1).max(5).optional().describe("Opcional. N\xFAmeros visibles de las fotos que el usuario quiere conservar; las dem\xE1s se deseleccionan. Debe quedar al menos una."),
38374
38584
  userChoice: ProductReferenceUserChoiceEnum.optional(),
38375
- confirmedProductNames: z151.array(z151.string().min(1).max(120)).min(2).max(8).optional(),
38585
+ confirmedProductNames: z152.array(z152.string().min(1).max(120)).min(2).max(8).optional(),
38376
38586
  videoStructure: VideoStructureEnum.optional().describe("Opcional. Formato para reanudar el video: single_take (Un solo clip, generado completo; puede incluir cambios de plano) o multi_scene (Multiescena). El backend vuelve a validar que sea compatible con el agrupamiento confirmado."),
38377
38587
  videoQuality: VideoQualityEnum.optional().describe("Opcional. Calidad para reanudar el video: economy (Econ\xF3mico), medium (Medio) o pro. El proveedor se elige internamente y el backend vuelve a cotizar la ruta."),
38378
- useMultiSceneShowcase: z151.boolean().optional().describe("Compatibilidad con confirmaciones antiguas: si es true junto con userChoice=variants, conserva el showcase multiescena.")
38588
+ useMultiSceneShowcase: z152.boolean().optional().describe("Compatibilidad con confirmaciones antiguas: si es true junto con userChoice=variants, conserva el showcase multiescena.")
38379
38589
  }),
38380
- z151.object({
38381
- kind: z151.literal("angle_review_approval"),
38590
+ z152.object({
38591
+ kind: z152.literal("angle_review_approval"),
38382
38592
  // All edits are optional — empty action body just approves the
38383
38593
  // backend-generated draft as-is. Field shapes mirror the angle-review
38384
38594
  // request contracts in @packages/types/wizard.ts; the handler routes to
38385
38595
  // the dedicated video/image/autopilot endpoint based on StatusResponse.kind.
38386
- customAngle: z151.string().min(1).max(480).optional(),
38596
+ customAngle: z152.string().min(1).max(480).optional(),
38387
38597
  // Keep the shared MCP action within the strictest downstream contract:
38388
38598
  // autopilot/image resume endpoints cap these fields at 1500 characters.
38389
- painPoints: z151.string().max(MCP_REVIEW_LIST_FIELD_MAX).optional(),
38390
- benefits: z151.string().max(MCP_REVIEW_LIST_FIELD_MAX).optional(),
38599
+ painPoints: z152.string().max(MCP_REVIEW_LIST_FIELD_MAX).optional(),
38600
+ benefits: z152.string().max(MCP_REVIEW_LIST_FIELD_MAX).optional(),
38391
38601
  // Same policy as the two fields above: the strictest downstream contract
38392
38602
  // wins. The image endpoint caps each feature at 240 while landing/video
38393
38603
  // accept 300, and this single action routes to whichever the task is — so
38394
38604
  // accepting 300 here turns a 250-character feature on an image task into
38395
38605
  // an opaque HTTP 400 after the model already believed it had been saved.
38396
- features: z151.array(z151.string().min(1).max(MCP_REVIEW_FEATURE_ITEM_MAX)).max(10).optional(),
38397
- buyerPersona: z151.string().min(1).max(360).optional(),
38606
+ features: z152.array(z152.string().min(1).max(MCP_REVIEW_FEATURE_ITEM_MAX)).max(10).optional(),
38607
+ buyerPersona: z152.string().min(1).max(360).optional(),
38398
38608
  narrativeStyle: PublicNarrativeStyleEnum.optional().describe('Narrativa del video. "problem_product_cta" (Problema y Soluci\xF3n) funciona en ambos formatos \u2014 en Un solo clip abre sin producto y el producto entra por referencia en su beat. La familia storyteller ("animated_storyteller", "animated_inner_journey", "animated_object_soul", "animated_timeline") no est\xE1 disponible por ahora. "viral" (sin voz, r\xF3tulos; antes/despu\xE9s solo en Multiescena; solo 15 s, Un solo clip o Multiescena) solo est\xE1 disponible para cuentas habilitadas y tareas del motor nuevo.'),
38399
- actor: z151.string().min(1).max(360).optional().describe("Nueva descripci\xF3n del presentador. Al enviarla sin actorId, se elimina autom\xE1ticamente cualquier actor guardado previo de esos \xE1ngulos."),
38400
- actorId: z151.string().max(120).nullable().optional(),
38401
- creativeDirection: z151.string().max(2e3).optional(),
38402
- selectedAngleNumbers: z151.array(z151.number().int().positive()).min(1).max(3).optional().describe("N\xFAmeros visibles (1-based) de los \xE1ngulos que el usuario quiere renderizar. Deben ser \xFAnicos, existir en la review y no superar el videoAngleCount autorizado."),
38403
- angleEdits: z151.array(z151.object({
38404
- angleNumber: z151.number().int().positive(),
38405
- narrativeSelection: z151.enum([
38609
+ actor: z152.string().min(1).max(360).optional().describe("Nueva descripci\xF3n del presentador. Al enviarla sin actorId, se elimina autom\xE1ticamente cualquier actor guardado previo de esos \xE1ngulos."),
38610
+ actorId: z152.string().max(120).nullable().optional(),
38611
+ creativeDirection: z152.string().max(2e3).optional(),
38612
+ selectedAngleNumbers: z152.array(z152.number().int().positive()).min(1).max(3).optional().describe("N\xFAmeros visibles (1-based) de los \xE1ngulos que el usuario quiere renderizar. Deben ser \xFAnicos, existir en la review y no superar el videoAngleCount autorizado."),
38613
+ angleEdits: z152.array(z152.object({
38614
+ angleNumber: z152.number().int().positive(),
38615
+ narrativeSelection: z152.enum([
38406
38616
  "market",
38407
38617
  "guided"
38408
38618
  ]).optional().describe("Elecci\xF3n expl\xEDcita: market usa el estudio disponible; guided usa la narrativa elegida para este \xE1ngulo. Si la omites y la tarea tiene un estudio de mercado listo, el \xE1ngulo sale en market; repetir la narrativeStyle que propuso la IA no cuenta como elecci\xF3n."),
38409
- angle: z151.string().min(1).max(480).optional(),
38410
- buyerPersona: z151.string().min(1).max(360).optional(),
38619
+ angle: z152.string().min(1).max(480).optional(),
38620
+ buyerPersona: z152.string().min(1).max(360).optional(),
38411
38621
  narrativeStyle: PublicNarrativeStyleEnum.optional().describe('Narrativa del video. "problem_product_cta" (Problema y Soluci\xF3n) funciona en ambos formatos \u2014 en Un solo clip abre sin producto y el producto entra por referencia en su beat. La familia storyteller ("animated_storyteller", "animated_inner_journey", "animated_object_soul", "animated_timeline") no est\xE1 disponible por ahora. "viral" (sin voz, r\xF3tulos; antes/despu\xE9s solo en Multiescena; solo 15 s, Un solo clip o Multiescena) solo est\xE1 disponible para cuentas habilitadas y tareas del motor nuevo.'),
38412
- actor: z151.string().min(1).max(360).optional(),
38413
- actorId: z151.string().max(120).nullable().optional(),
38414
- creativeDirection: z151.string().max(2e3).optional()
38622
+ actor: z152.string().min(1).max(360).optional(),
38623
+ actorId: z152.string().max(120).nullable().optional(),
38624
+ creativeDirection: z152.string().max(2e3).optional()
38415
38625
  }).strict()).max(3).optional().describe("Ediciones independientes por n\xFAmero visible de \xE1ngulo. S\xF3lo se aceptan para \xE1ngulos incluidos en selectedAngleNumbers (o en la selecci\xF3n por defecto)."),
38416
- gapDurationSeconds: z151.union([
38417
- z151.literal(15),
38418
- z151.literal(30)
38626
+ gapDurationSeconds: z152.union([
38627
+ z152.literal(15),
38628
+ z152.literal(30)
38419
38629
  ]).optional().describe("Opcional. Solo para aceptar expl\xEDcitamente la recomendaci\xF3n gapDurationChoice del status. 30 env\xEDa el override double_30s para el \xE1ngulo recomendado; 15 u omitido conserva la duraci\xF3n cotizada.")
38420
38630
  }),
38421
- z151.object({
38422
- kind: z151.literal("service_angle_approval"),
38423
- angleId: z151.string().guid().optional(),
38424
- angleNumber: z151.number().int().positive().optional(),
38425
- content: z151.string().min(1).max(480).optional(),
38426
- creativeDirection: z151.string().min(1).max(1500).optional(),
38427
- actor: z151.string().min(1).max(360).optional()
38631
+ z152.object({
38632
+ kind: z152.literal("service_angle_approval"),
38633
+ angleId: z152.string().guid().optional(),
38634
+ angleNumber: z152.number().int().positive().optional(),
38635
+ content: z152.string().min(1).max(480).optional(),
38636
+ creativeDirection: z152.string().min(1).max(1500).optional(),
38637
+ actor: z152.string().min(1).max(360).optional()
38428
38638
  }),
38429
- z151.object({
38430
- kind: z151.literal("service_script_approval"),
38431
- voiceovers: z151.record(z151.string(), z151.string().min(1).max(600)).optional(),
38432
- visualDirections: z151.record(z151.string(), z151.string().min(1).max(1200)).optional(),
38433
- voiceoversByScene: z151.record(z151.string(), z151.string().min(1).max(600)).optional(),
38434
- visualDirectionsByScene: z151.record(z151.string(), z151.string().min(1).max(1200)).optional()
38639
+ z152.object({
38640
+ kind: z152.literal("service_script_approval"),
38641
+ voiceovers: z152.record(z152.string(), z152.string().min(1).max(600)).optional(),
38642
+ visualDirections: z152.record(z152.string(), z152.string().min(1).max(1200)).optional(),
38643
+ voiceoversByScene: z152.record(z152.string(), z152.string().min(1).max(600)).optional(),
38644
+ visualDirectionsByScene: z152.record(z152.string(), z152.string().min(1).max(1200)).optional()
38435
38645
  })
38436
38646
  ]);
38437
- var ResolvePendingActionInput = z151.object({
38438
- taskId: z151.string().min(1),
38647
+ var ResolvePendingActionInput = z152.object({
38648
+ taskId: z152.string().min(1),
38439
38649
  action: PendingActionPayload
38440
38650
  }).strict();
38441
38651
  function resolveVariantConfirmVideoTier(action) {
38442
38652
  return action.useMultiSceneShowcase && action.userChoice === "variants" ? "standard" : void 0;
38443
38653
  }
38444
38654
  __name(resolveVariantConfirmVideoTier, "resolveVariantConfirmVideoTier");
38445
- var StatusForResolveSchema = z151.object({
38655
+ var StatusForResolveSchema = z152.object({
38446
38656
  // Metadata used to select the backend resume contract. Older API responses
38447
38657
  // may omit these fields, so the resolver keeps the generic fallback.
38448
- kind: z151.enum([
38658
+ kind: z152.enum([
38449
38659
  "autopilot",
38450
38660
  "video",
38451
38661
  "image",
@@ -38453,18 +38663,18 @@ var StatusForResolveSchema = z151.object({
38453
38663
  "mix",
38454
38664
  "service"
38455
38665
  ]).optional(),
38456
- selectedOutputs: z151.array(z151.enum([
38666
+ selectedOutputs: z152.array(z152.enum([
38457
38667
  "landing",
38458
38668
  "video",
38459
38669
  "image"
38460
38670
  ])).optional(),
38461
- videoAngleCount: z151.number().int().min(1).max(3).optional(),
38462
- ugcFormat: z151.enum([
38671
+ videoAngleCount: z152.number().int().min(1).max(3).optional(),
38672
+ ugcFormat: z152.enum([
38463
38673
  "single_8s",
38464
38674
  "single_15s",
38465
38675
  "double_30s"
38466
38676
  ]).optional(),
38467
- videoStyle: z151.enum([
38677
+ videoStyle: z152.enum([
38468
38678
  "ugc",
38469
38679
  "cartoon_3d",
38470
38680
  "product_only",
@@ -38474,13 +38684,13 @@ var StatusForResolveSchema = z151.object({
38474
38684
  videoQuality: VideoQualityEnum.optional(),
38475
38685
  videoRouteId: VideoRouteIdEnum.optional(),
38476
38686
  videoModel: TaskVideoModelEnum.optional(),
38477
- videoTier: z151.enum([
38687
+ videoTier: z152.enum([
38478
38688
  "legacy",
38479
38689
  "standard",
38480
38690
  "pro",
38481
38691
  "single_call"
38482
38692
  ]).optional(),
38483
- videoResolution: z151.enum([
38693
+ videoResolution: z152.enum([
38484
38694
  "480p",
38485
38695
  "720p"
38486
38696
  ]).optional(),
@@ -38488,60 +38698,60 @@ var StatusForResolveSchema = z151.object({
38488
38698
  // A task created before a narrative was blocked/hidden must still parse,
38489
38699
  // or resolve_pending_action could never approve it.
38490
38700
  narrativeStyle: NarrativeStyle.optional(),
38491
- pauseForVideoScriptReview: z151.boolean().optional(),
38492
- pendingUserAction: z151.object({
38493
- kind: z151.string(),
38494
- candidateGrouping: z151.string().optional(),
38495
- selectedImageUrls: z151.array(z151.string()).optional(),
38496
- proposedProductNames: z151.array(z151.string()).optional(),
38701
+ pauseForVideoScriptReview: z152.boolean().optional(),
38702
+ pendingUserAction: z152.object({
38703
+ kind: z152.string(),
38704
+ candidateGrouping: z152.string().optional(),
38705
+ selectedImageUrls: z152.array(z152.string()).optional(),
38706
+ proposedProductNames: z152.array(z152.string()).optional(),
38497
38707
  // Adaptive reference questions are server-owned. Echo only the evidence
38498
38708
  // identity and the choices shown by the current snapshot; never accept a
38499
38709
  // client-supplied reference set as authorization.
38500
- options: z151.array(ProductReferenceUserChoiceEnum).max(4).optional(),
38501
- mode: z151.enum([
38710
+ options: z152.array(ProductReferenceUserChoiceEnum).max(4).optional(),
38711
+ mode: z152.enum([
38502
38712
  "question",
38503
38713
  "visual_recovery"
38504
38714
  ]).optional(),
38505
38715
  /** Hand-mirrored from packages/types result.ts — see CLAUDE.md § MCP Server Sync. */
38506
- canKeepSelection: z151.boolean().optional(),
38507
- decisionKey: z151.string().optional(),
38508
- questionOrdinal: z151.number().int().min(1).max(5).optional(),
38509
- questionCeiling: z151.union([
38510
- z151.literal(3),
38511
- z151.literal(5)
38716
+ canKeepSelection: z152.boolean().optional(),
38717
+ decisionKey: z152.string().optional(),
38718
+ questionOrdinal: z152.number().int().min(1).max(5).optional(),
38719
+ questionCeiling: z152.union([
38720
+ z152.literal(3),
38721
+ z152.literal(5)
38512
38722
  ]).optional(),
38513
- referenceEvidenceVersion: z151.number().int().positive().optional(),
38514
- expectedEvidenceHash: z151.string().optional(),
38515
- question: z151.object({
38516
- prompt: z151.string().min(1).max(240),
38517
- helpText: z151.string().min(1).max(300).optional(),
38518
- options: z151.array(z151.object({
38723
+ referenceEvidenceVersion: z152.number().int().positive().optional(),
38724
+ expectedEvidenceHash: z152.string().optional(),
38725
+ question: z152.object({
38726
+ prompt: z152.string().min(1).max(240),
38727
+ helpText: z152.string().min(1).max(300).optional(),
38728
+ options: z152.array(z152.object({
38519
38729
  value: ProductReferenceUserChoiceEnum,
38520
- label: z151.string().min(1).max(120),
38521
- description: z151.string().min(1).max(240).optional()
38730
+ label: z152.string().min(1).max(120),
38731
+ description: z152.string().min(1).max(240).optional()
38522
38732
  })).min(2).max(4)
38523
38733
  }).optional(),
38524
38734
  scope: ProductReferenceScopeEnum.optional(),
38525
- scopeKey: z151.string().optional(),
38526
- scopeSnapshotId: z151.string().guid().optional(),
38527
- scopeHash: z151.string().optional(),
38528
- baseReferenceSetHash: z151.string().optional(),
38529
- phase: z151.enum([
38735
+ scopeKey: z152.string().optional(),
38736
+ scopeSnapshotId: z152.string().guid().optional(),
38737
+ scopeHash: z152.string().optional(),
38738
+ baseReferenceSetHash: z152.string().optional(),
38739
+ phase: z152.enum([
38530
38740
  "preparation",
38531
38741
  "final"
38532
38742
  ]).optional(),
38533
- selectedRefKeys: z151.array(z151.string().min(1).max(200)).optional(),
38534
- allowedDecisions: z151.array(ProductReferenceResolutionDecisionEnum).optional(),
38535
- previews: z151.array(z151.object({
38536
- refKey: z151.string().min(1).max(200)
38743
+ selectedRefKeys: z152.array(z152.string().min(1).max(200)).optional(),
38744
+ allowedDecisions: z152.array(ProductReferenceResolutionDecisionEnum).optional(),
38745
+ previews: z152.array(z152.object({
38746
+ refKey: z152.string().min(1).max(200)
38537
38747
  }).passthrough()).optional(),
38538
- customAngleDraft: z151.string().optional(),
38539
- painPointsDraft: z151.string().optional(),
38540
- benefitsDraft: z151.string().optional(),
38541
- featuresDraft: z151.array(z151.string()).optional(),
38542
- angleOptions: z151.array(z151.object({
38543
- index: z151.number().int().nonnegative(),
38544
- angle: z151.string().min(1)
38748
+ customAngleDraft: z152.string().optional(),
38749
+ painPointsDraft: z152.string().optional(),
38750
+ benefitsDraft: z152.string().optional(),
38751
+ featuresDraft: z152.array(z152.string()).optional(),
38752
+ angleOptions: z152.array(z152.object({
38753
+ index: z152.number().int().nonnegative(),
38754
+ angle: z152.string().min(1)
38545
38755
  }).passthrough()).min(1).max(5).optional(),
38546
38756
  // Recommendation consumed only when the caller explicitly sends
38547
38757
  // gapDurationSeconds: 30 in the angle approval action.
@@ -38551,17 +38761,17 @@ var StatusForResolveSchema = z151.object({
38551
38761
  // keys. `actorId` (the saved custom actor the picker stored) was silently
38552
38762
  // dropped here, so the approval handler below could not echo it back on the
38553
38763
  // PATCH — the selection looked accepted and reached no render.
38554
- angles: z151.array(z151.object({
38555
- id: z151.string().guid(),
38556
- content: z151.string(),
38557
- creativeDirection: z151.string(),
38558
- actor: z151.string(),
38559
- actorId: z151.string().nullable().optional()
38764
+ angles: z152.array(z152.object({
38765
+ id: z152.string().guid(),
38766
+ content: z152.string(),
38767
+ creativeDirection: z152.string(),
38768
+ actor: z152.string(),
38769
+ actorId: z152.string().nullable().optional()
38560
38770
  }).passthrough()).optional(),
38561
- panels: z151.array(z151.object({
38562
- beatId: z151.string(),
38563
- voiceover: z151.string(),
38564
- visualDirection: z151.string()
38771
+ panels: z152.array(z152.object({
38772
+ beatId: z152.string(),
38773
+ voiceover: z152.string(),
38774
+ visualDirection: z152.string()
38565
38775
  }).passthrough()).optional()
38566
38776
  }).optional()
38567
38777
  }).passthrough();
@@ -38918,8 +39128,8 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
38918
39128
  server.registerTool("verify_landing_commerce", {
38919
39129
  description: getProductMakerCapabilityModelGuidance("verify_landing_commerce").summary + " Verifica una correcci\xF3n manual de precios, tachados o packs de una landing editable existente. Solo relee Shopify y los recibos externos; no cambia precios, inventario, SKU ni compra una edici\xF3n. Pasa taskId y editId de la edici\xF3n ya conocida; nunca inventes IDs ni pidas repetir el cambio. Devuelve el estado can\xF3nico por proveedor: conserva el aviso pendiente hasta confirmar los valores reales. Solo despu\xE9s de confirmar todos los valores, el servidor puede volver a habilitar la compra. Web guardada no demuestra publicaci\xF3n p\xFAblica ni checkout; muestra las correcciones y enlaces pendientes sin c\xF3digos t\xE9cnicos. La disponibilidad del editor conserva sus permisos actuales.",
38920
39130
  inputSchema: {
38921
- taskId: z151.string().guid(),
38922
- editId: z151.string().guid()
39131
+ taskId: z152.string().guid(),
39132
+ editId: z152.string().guid()
38923
39133
  },
38924
39134
  annotations: OVERWRITES_EXTERNAL
38925
39135
  }, async (input) => {
@@ -39190,16 +39400,16 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
39190
39400
  if (input.search) qs.set("search", input.search);
39191
39401
  const path3 = `/v1/tasks${qs.toString() ? "?" + qs.toString() : ""}`;
39192
39402
  const r = await api.getJson(path3);
39193
- const page = z151.object({
39194
- items: z151.array(z151.unknown())
39403
+ const page = z152.object({
39404
+ items: z152.array(z152.unknown())
39195
39405
  }).passthrough().safeParse(r);
39196
39406
  if (!page.success) return asText(r);
39197
39407
  return asText({
39198
39408
  ...page.data,
39199
39409
  items: page.data.items.map((item) => {
39200
- const servicePage = z151.object({
39201
- taskId: z151.string().guid(),
39202
- resourceType: z151.literal("service_page")
39410
+ const servicePage = z152.object({
39411
+ taskId: z152.string().guid(),
39412
+ resourceType: z152.literal("service_page")
39203
39413
  }).passthrough().safeParse(item);
39204
39414
  if (!servicePage.success) return item;
39205
39415
  return {
@@ -39689,28 +39899,28 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
39689
39899
  __name(registerTaskTools, "registerTaskTools");
39690
39900
 
39691
39901
  // src/tools/brands.ts
39692
- import { z as z152 } from "zod";
39902
+ import { z as z153 } from "zod";
39693
39903
  var guidance2 = getProductMakerCapabilityModelGuidance("create_brand");
39694
39904
  var BRAND_START_REPLAY_WINDOW_MS = 15 * 60 * 1e3;
39695
39905
  var BRAND_NOTES_MAX_CHARS = 2e4;
39696
39906
  var BRAND_AMBIGUOUS_REQUEST_RETENTION_MS = 24 * 60 * 60 * 1e3;
39697
39907
  var BRAND_CREATION_REQUEST_LIMIT = 500;
39698
39908
  var brandCreationRequests = /* @__PURE__ */ new Map();
39699
- var CreateBrandInput = z152.object({
39700
- action: z152.enum([
39909
+ var CreateBrandInput = z153.object({
39910
+ action: z153.enum([
39701
39911
  "start",
39702
39912
  "status",
39703
39913
  "list"
39704
39914
  ]).default("start").describe("start cotiza (sin confirmed) o inicia (confirmed=true) el an\xE1lisis; status consulta brandId hasta ready o failed; list muestra las marcas que el usuario ya tiene."),
39705
- sourceUrl: z152.string().trim().min(1).max(BRAND_SOURCE_URL_MAX_LENGTH).optional().describe("Instagram, Facebook, TikTok o web p\xFAblica del negocio, como la dio el usuario (\xAB@sanlucasbarberia\xBB, \xABinstagram.com/sanlucasbarberia\xBB, \xABmibarberia.com\xBB). Obligatorio para start."),
39706
- businessNotes: z152.string().trim().max(BRAND_NOTES_MAX_CHARS).optional().describe("Opcional. Lo que el usuario cuente de su negocio en el chat (servicios y precios, WhatsApp, ciudad o zona, horarios). Se guarda como documento del negocio y llega tal cual a la marca y a su landing. Copia sus palabras; no inventes datos."),
39707
- language: z152.enum([
39915
+ sourceUrl: z153.string().trim().min(1).max(BRAND_SOURCE_URL_MAX_LENGTH).optional().describe("Instagram, Facebook, TikTok o web p\xFAblica del negocio, como la dio el usuario (\xAB@sanlucasbarberia\xBB, \xABinstagram.com/sanlucasbarberia\xBB, \xABmibarberia.com\xBB). Obligatorio para start."),
39916
+ businessNotes: z153.string().trim().max(BRAND_NOTES_MAX_CHARS).optional().describe("Opcional. Lo que el usuario cuente de su negocio en el chat (servicios y precios, WhatsApp, ciudad o zona, horarios). Se guarda como documento del negocio y llega tal cual a la marca y a su landing. Copia sus palabras; no inventes datos."),
39917
+ language: z153.enum([
39708
39918
  "es",
39709
39919
  "en",
39710
39920
  "pt"
39711
39921
  ]).optional().describe("Idioma de la conversaci\xF3n. Solo se usa si la p\xE1gina del negocio no deja claro su idioma."),
39712
- confirmed: z152.boolean().optional().describe("Solo true despu\xE9s de mostrar el precio y que el usuario acepte. Sin confirmed, start solo cotiza y no cobra."),
39713
- brandId: z152.string().guid().optional().describe("ID de la marca. Obligatorio para status; no lo inventes.")
39922
+ confirmed: z153.boolean().optional().describe("Solo true despu\xE9s de mostrar el precio y que el usuario acepte. Sin confirmed, start solo cotiza y no cobra."),
39923
+ brandId: z153.string().guid().optional().describe("ID de la marca. Obligatorio para status; no lo inventes.")
39714
39924
  }).strict();
39715
39925
  function normalizeBrandSourceUrl(raw) {
39716
39926
  const value = raw.trim();
@@ -39994,24 +40204,24 @@ __name(registerBrandTools, "registerBrandTools");
39994
40204
 
39995
40205
  // src/tools/service-landing.ts
39996
40206
  import { createHash as createHash4, randomUUID } from "crypto";
39997
- import { z as z153 } from "zod";
40207
+ import { z as z154 } from "zod";
39998
40208
  var guidance3 = getProductMakerCapabilityModelGuidance("create_service_landing");
39999
40209
  var SERVICE_LANDING_KEY_NAMESPACE = "6f1d8c2a-3b4e-5f60-8a7b-9c0d1e2f3a4b";
40000
40210
  var SERVICE_LANDING_INFO_MAX_CHARS = 2e4;
40001
- var CreateServiceLandingInput = z153.object({
40002
- action: z153.enum([
40211
+ var CreateServiceLandingInput = z154.object({
40212
+ action: z154.enum([
40003
40213
  "prepare",
40004
40214
  "build",
40005
40215
  "status",
40006
40216
  "publish"
40007
40217
  ]).default("prepare").describe("prepare (gratis) crea o retoma la landing de la marca y da el precio; build (pagado, confirmed=true) genera la p\xE1gina directamente con la marca y los datos guardados; status sigue el avance; publish la publica y devuelve su enlace."),
40008
- brandId: z153.string().guid().optional().describe("ID de la marca (de create_brand). Obligatorio para prepare. Nunca un taskId de producto."),
40009
- servicePageId: z153.string().guid().optional().describe("ID de la landing que devolvi\xF3 prepare. Obligatorio para build, status y publish."),
40010
- businessInfo: z153.string().trim().max(SERVICE_LANDING_INFO_MAX_CHARS).optional().describe("Opcional. Lo que el usuario cont\xF3 del negocio y no estaba en su marca: servicios y precios, WhatsApp o tel\xE9fono, ciudad o zona, horarios. Copia sus palabras; no inventes datos."),
40011
- confirmed: z153.boolean().optional().describe("Solo true despu\xE9s de mostrar el precio total y que el usuario acepte. Obligatorio para build."),
40012
- maxCredits: z153.number().int().positive().optional().describe("El total en cr\xE9ditos que el usuario acept\xF3 (el que devolvi\xF3 prepare). Obligatorio para build: ninguna etapa se inicia si su precio supera este total."),
40013
- operationId: z153.string().guid().optional().describe("Opcional en status: la operaci\xF3n que devolvi\xF3 build."),
40014
- slug: z153.string().trim().toLowerCase().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).max(64).optional().describe("Opcional en publish: la direcci\xF3n corta de la p\xE1gina (ej. sanlucas-barberia). Si falta se usa la sugerida desde el nombre del negocio.")
40218
+ brandId: z154.string().guid().optional().describe("ID de la marca (de create_brand). Obligatorio para prepare. Nunca un taskId de producto."),
40219
+ servicePageId: z154.string().guid().optional().describe("ID de la landing que devolvi\xF3 prepare. Obligatorio para build, status y publish."),
40220
+ businessInfo: z154.string().trim().max(SERVICE_LANDING_INFO_MAX_CHARS).optional().describe("Opcional. Lo que el usuario cont\xF3 del negocio y no estaba en su marca: servicios y precios, WhatsApp o tel\xE9fono, ciudad o zona, horarios. Copia sus palabras; no inventes datos."),
40221
+ confirmed: z154.boolean().optional().describe("Solo true despu\xE9s de mostrar el precio total y que el usuario acepte. Obligatorio para build."),
40222
+ maxCredits: z154.number().int().positive().optional().describe("El total en cr\xE9ditos que el usuario acept\xF3 (el que devolvi\xF3 prepare). Obligatorio para build: ninguna etapa se inicia si su precio supera este total."),
40223
+ operationId: z154.string().guid().optional().describe("Opcional en status: la operaci\xF3n que devolvi\xF3 build."),
40224
+ slug: z154.string().trim().toLowerCase().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).max(64).optional().describe("Opcional en publish: la direcci\xF3n corta de la p\xE1gina (ej. sanlucas-barberia). Si falta se usa la sugerida desde el nombre del negocio.")
40015
40225
  }).strict();
40016
40226
  function serviceKey(...parts) {
40017
40227
  return deriveUuidV5(parts.join(":"), SERVICE_LANDING_KEY_NAMESPACE);
@@ -40390,7 +40600,7 @@ function registerServiceLandingTools(server, api) {
40390
40600
  __name(registerServiceLandingTools, "registerServiceLandingTools");
40391
40601
 
40392
40602
  // src/tools/service-images.ts
40393
- import { z as z154 } from "zod";
40603
+ import { z as z155 } from "zod";
40394
40604
  var guidance4 = getProductMakerCapabilityModelGuidance("create_service_images");
40395
40605
  var SERVICE_IMAGE_FORMATS = [
40396
40606
  "4:5",
@@ -40403,19 +40613,19 @@ var LANGUAGE_TAGS = {
40403
40613
  en: "en-US",
40404
40614
  pt: "pt-BR"
40405
40615
  };
40406
- var CreateServiceImagesInput = z154.object({
40407
- brandId: z154.string().guid().optional().describe("ID de un servicio propio y listo (de create_brand), obligatorio para cotizar y crear im\xE1genes nuevas. En un retry hist\xF3rico ya confirmado que originalmente no ten\xEDa este campo, conserva la petici\xF3n original. Nunca un taskId de producto."),
40408
- instruction: z154.string().trim().max(4e3).optional().describe("Opcional. Qu\xE9 servicio o promoci\xF3n mostrar, con las palabras del usuario (ej. \xABcorte + barba a $35.000 los martes\xBB). Si se omite, la IA propone la imagen usando la informaci\xF3n del servicio."),
40409
- delegateToAi: z154.boolean().optional().describe("true si el usuario prefiere que la IA elija qu\xE9 mostrar a partir de su servicio. Tambi\xE9n se delega cuando instruction est\xE1 vac\xEDo."),
40410
- format: z154.enum(SERVICE_IMAGE_FORMATS).optional().describe('Formato: "4:5" (feed, por defecto), "9:16" (historias/reels) o "1:1" (cuadrado).'),
40411
- count: z154.number().int().min(1).max(SERVICE_IMAGE_MAX_COUNT).optional().describe("Cu\xE1ntas im\xE1genes, de 1 a 3 (por defecto 1)."),
40412
- language: z154.enum([
40616
+ var CreateServiceImagesInput = z155.object({
40617
+ brandId: z155.string().guid().optional().describe("ID de un servicio propio y listo (de create_brand), obligatorio para cotizar y crear im\xE1genes nuevas. En un retry hist\xF3rico ya confirmado que originalmente no ten\xEDa este campo, conserva la petici\xF3n original. Nunca un taskId de producto."),
40618
+ instruction: z155.string().trim().max(4e3).optional().describe("Opcional. Qu\xE9 servicio o promoci\xF3n mostrar, con las palabras del usuario (ej. \xABcorte + barba a $35.000 los martes\xBB). Si se omite, la IA propone la imagen usando la informaci\xF3n del servicio."),
40619
+ delegateToAi: z155.boolean().optional().describe("true si el usuario prefiere que la IA elija qu\xE9 mostrar a partir de su servicio. Tambi\xE9n se delega cuando instruction est\xE1 vac\xEDo."),
40620
+ format: z155.enum(SERVICE_IMAGE_FORMATS).optional().describe('Formato: "4:5" (feed, por defecto), "9:16" (historias/reels) o "1:1" (cuadrado).'),
40621
+ count: z155.number().int().min(1).max(SERVICE_IMAGE_MAX_COUNT).optional().describe("Cu\xE1ntas im\xE1genes, de 1 a 3 (por defecto 1)."),
40622
+ language: z155.enum([
40413
40623
  "es",
40414
40624
  "en",
40415
40625
  "pt"
40416
40626
  ]).optional().describe("Idioma de los textos de la imagen (por defecto es)."),
40417
- adCopy: z154.boolean().optional().describe("Compatibilidad con clientes anteriores: el copy para publicar siempre est\xE1 incluido en cada imagen de servicios."),
40418
- confirmed: z154.boolean().optional().describe("Solo true despu\xE9s de mostrar el precio y que el usuario acepte. Sin confirmed, solo cotiza y no cobra.")
40627
+ adCopy: z155.boolean().optional().describe("Compatibilidad con clientes anteriores: el copy para publicar siempre est\xE1 incluido en cada imagen de servicios."),
40628
+ confirmed: z155.boolean().optional().describe("Solo true despu\xE9s de mostrar el precio y que el usuario acepte. Sin confirmed, solo cotiza y no cobra.")
40419
40629
  }).strict();
40420
40630
  function registerServiceImageTools(server, api, options = {}) {
40421
40631
  const now = options.now ?? Date.now;
@@ -40524,7 +40734,7 @@ function registerServiceImageTools(server, api, options = {}) {
40524
40734
  nextAction: "Dile al usuario que est\xE1s creando sus im\xE1genes. Llama get_task_status con este taskId (waitSeconds=45) hasta done (trae las im\xE1genes reales de ProductMaker) o error. Muestra los recursos de imagen devueltos directamente en el chat. Nunca generes ni recrees una imagen sustituta con otra herramienta. Si la vista previa falla, explica el fallo y conserva los enlaces protegidos devueltos."
40525
40735
  });
40526
40736
  } catch (error) {
40527
- if (error instanceof z154.ZodError) throw invalidInputFromZod(error);
40737
+ if (error instanceof z155.ZodError) throw invalidInputFromZod(error);
40528
40738
  throw translateError(error);
40529
40739
  }
40530
40740
  });
@@ -40532,7 +40742,7 @@ function registerServiceImageTools(server, api, options = {}) {
40532
40742
  __name(registerServiceImageTools, "registerServiceImageTools");
40533
40743
 
40534
40744
  // src/tools/creatives.ts
40535
- import { z as z155 } from "zod";
40745
+ import { z as z156 } from "zod";
40536
40746
  var generateFreeVideoGuidance = getProductMakerCapabilityModelGuidance("generate_free_video");
40537
40747
  var generateVideoCreativeGuidance = getProductMakerCapabilityModelGuidance("generate_video_creative");
40538
40748
  var generateImageCreativesGuidance = getProductMakerCapabilityModelGuidance("generate_image_creatives");
@@ -40543,72 +40753,72 @@ var CreativeRefs = {
40543
40753
  images: ImagesInput,
40544
40754
  language: Lang.describe('Idioma del contenido. Ej. "es", "en", "pt". REQUERIDO \u2014 si el usuario no lo dijo, PREG\xDANTALE antes de invocar. NUNCA infieras desde el contexto del chat ni asumas un default.'),
40545
40755
  country: Country.describe('Pa\xEDs objetivo ISO. Ej. "CO", "MX", "US", "AR". Define moneda, m\xE9todos de pago y tono. REQUERIDO \u2014 si el usuario no lo dijo, PREG\xDANTALE antes de invocar. NUNCA infieras desde el contexto del chat ni asumas un default.'),
40546
- price: z155.string().min(1).max(120).optional().describe('Precio en formato libre \u2014 ej. "$89.900", "USD 29.99". Opcional pero MUY IMPACTANTE para conversi\xF3n: si el usuario no lo mencion\xF3, PREG\xDANTALE antes de invocar. Si el usuario te dice "t\xFA elige", omite el campo y la IA del backend sugiere uno.'),
40547
- offer: z155.string().min(1).max(240).optional().describe('Oferta a destacar \u2014 ej. "2x1", "Env\xEDo gratis", "50% OFF". Opcional pero MUY IMPACTANTE: si el usuario no lo mencion\xF3, PREG\xDANTALE antes de invocar (es v\xE1lido que diga "sin oferta"). Si el usuario te dice "t\xFA elige", omite el campo.'),
40548
- compareAtPrice: z155.string().min(1).max(120).optional().describe('Opcional. Precio anterior o de referencia para mostrar descuento. Ej. "$129.000" cuando price="$89.900".'),
40549
- productContext: z155.string().max(3e3).optional().describe("Opcional. Informacion adicional del producto que la IA debe usar como contexto prioritario: uso real, comprador, restricciones, diferenciadores o direccion creativa. No reemplaza la investigacion de competencia; si hay competencia, guia el primer angulo y los outputs no deben contradecirlo."),
40550
- productLabel: z155.string().trim().max(80).optional().describe('Opcional. Nombre o tipo del producto en pocas palabras (ej. "collar de oro", "quita pelusas para ropa"). Es AUTORITATIVO: la IA usa esta identidad y no la reemplaza por otra categor\xEDa. Si lo omites, la IA lo detecta desde la imagen. NO salta la extracci\xF3n.'),
40551
- buyerPersona: z155.string().optional().describe('Opcional. Descripci\xF3n del comprador objetivo. Ej. "Mujeres 35-50, profesionales urbanas". Si se omite, la IA infiere desde el \xE1ngulo y producto.'),
40552
- isCombo: z155.boolean().optional().describe("Opcional. Si true, el creativo presenta el producto como combo/pack. Default false."),
40553
- competitorScanEnabled: z155.boolean().optional().describe("Opcional. Default false: omitirlo significa SIN estudio de mercado. Antes de crear, llama estimate_market_study_cost, muestra al usuario el costo con y sin estudio y preg\xFAntale si lo quiere; env\xEDa true solo si lo acepta (o si solicita la narrativa an\xE1lisis de mercado). En video, true analiza anuncios de la competencia y desbloquea la narrativa an\xE1lisis de mercado; si el estudio no encuentra datos suficientes, degrada al planner cl\xE1sico."),
40554
- brandId: z155.string().guid().optional().describe("Opcional. ID de una marca del usuario; si se env\xEDa, el sistema usa su voz, colores y persona para enriquecer el creativo.")
40756
+ price: z156.string().min(1).max(120).optional().describe('Precio en formato libre \u2014 ej. "$89.900", "USD 29.99". Opcional pero MUY IMPACTANTE para conversi\xF3n: si el usuario no lo mencion\xF3, PREG\xDANTALE antes de invocar. Si el usuario te dice "t\xFA elige", omite el campo y la IA del backend sugiere uno.'),
40757
+ offer: z156.string().min(1).max(240).optional().describe('Oferta a destacar \u2014 ej. "2x1", "Env\xEDo gratis", "50% OFF". Opcional pero MUY IMPACTANTE: si el usuario no lo mencion\xF3, PREG\xDANTALE antes de invocar (es v\xE1lido que diga "sin oferta"). Si el usuario te dice "t\xFA elige", omite el campo.'),
40758
+ compareAtPrice: z156.string().min(1).max(120).optional().describe('Opcional. Precio anterior o de referencia para mostrar descuento. Ej. "$129.000" cuando price="$89.900".'),
40759
+ productContext: z156.string().max(3e3).optional().describe("Opcional. Informacion adicional del producto que la IA debe usar como contexto prioritario: uso real, comprador, restricciones, diferenciadores o direccion creativa. No reemplaza la investigacion de competencia; si hay competencia, guia el primer angulo y los outputs no deben contradecirlo."),
40760
+ productLabel: z156.string().trim().max(80).optional().describe('Opcional. Nombre o tipo del producto en pocas palabras (ej. "collar de oro", "quita pelusas para ropa"). Es AUTORITATIVO: la IA usa esta identidad y no la reemplaza por otra categor\xEDa. Si lo omites, la IA lo detecta desde la imagen. NO salta la extracci\xF3n.'),
40761
+ buyerPersona: z156.string().optional().describe('Opcional. Descripci\xF3n del comprador objetivo. Ej. "Mujeres 35-50, profesionales urbanas". Si se omite, la IA infiere desde el \xE1ngulo y producto.'),
40762
+ isCombo: z156.boolean().optional().describe("Opcional. Si true, el creativo presenta el producto como combo/pack. Default false."),
40763
+ competitorScanEnabled: z156.boolean().optional().describe("Opcional. Default false: omitirlo significa SIN estudio de mercado. Antes de crear, llama estimate_market_study_cost, muestra al usuario el costo con y sin estudio y preg\xFAntale si lo quiere; env\xEDa true solo si lo acepta (o si solicita la narrativa an\xE1lisis de mercado). En video, true analiza anuncios de la competencia y desbloquea la narrativa an\xE1lisis de mercado; si el estudio no encuentra datos suficientes, degrada al planner cl\xE1sico."),
40764
+ brandId: z156.string().guid().optional().describe("Opcional. ID de una marca del usuario; si se env\xEDa, el sistema usa su voz, colores y persona para enriquecer el creativo.")
40555
40765
  };
40556
- var VideoPresenter = z155.discriminatedUnion("mode", [
40557
- z155.object({
40558
- mode: z155.literal("none")
40766
+ var VideoPresenter = z156.discriminatedUnion("mode", [
40767
+ z156.object({
40768
+ mode: z156.literal("none")
40559
40769
  }).strict(),
40560
- z155.object({
40561
- mode: z155.literal("saved_actor"),
40562
- actorId: z155.string().trim().min(1).max(120).describe("ID devuelto por list_actors para un actor guardado del usuario.")
40770
+ z156.object({
40771
+ mode: z156.literal("saved_actor"),
40772
+ actorId: z156.string().trim().min(1).max(120).describe("ID devuelto por list_actors para un actor guardado del usuario.")
40563
40773
  }).strict(),
40564
- z155.object({
40565
- mode: z155.literal("described"),
40566
- description: z155.string().trim().min(1).max(500).describe("Descripci\xF3n concreta de la persona que presenta el producto.")
40774
+ z156.object({
40775
+ mode: z156.literal("described"),
40776
+ description: z156.string().trim().min(1).max(500).describe("Descripci\xF3n concreta de la persona que presenta el producto.")
40567
40777
  }).strict()
40568
40778
  ]);
40569
- var VideoCreativeSetup = z155.discriminatedUnion("mode", [
40570
- z155.object({
40571
- mode: z155.literal("automatic").describe('S\xF3lo cuando el usuario pidi\xF3 expl\xEDcitamente "decide todo".')
40779
+ var VideoCreativeSetup = z156.discriminatedUnion("mode", [
40780
+ z156.object({
40781
+ mode: z156.literal("automatic").describe('S\xF3lo cuando el usuario pidi\xF3 expl\xEDcitamente "decide todo".')
40572
40782
  }).strict(),
40573
- z155.object({
40574
- mode: z155.literal("guided"),
40783
+ z156.object({
40784
+ mode: z156.literal("guided"),
40575
40785
  videoPreset: VideoPresetEnum.default("auto").describe('Narrativa opcional. Con estudio de mercado no la preguntes: se usa "auto" y el estudio define la estructura. Sin estudio conserva la elecci\xF3n del usuario. Todas las narrativas funcionan en Un solo clip y Multiescena. "viral" es un video sin voz (r\xF3tulos en pantalla; antes/despu\xE9s solo en Multiescena), solo de 15 s y solo para cuentas habilitadas; la API rechaza otras duraciones.'),
40576
- buyerPersona: z155.string().trim().min(1).max(360),
40786
+ buyerPersona: z156.string().trim().min(1).max(360),
40577
40787
  animationStyle: AnimationStyleEnum.optional().describe('Opcional. Estilo visual SOLO para presets animados ("pixar_problem" o "pixar_sassy") \u2014 la API lo rechaza con cualquier otro preset. Opciones: "pixar_3d" (default, look 3D de pel\xEDcula animada), "claymation" (plastilina stop-motion artesanal), "wes_anderson" (tableau sim\xE9trico pastel), "sci_fi" (futurista con HUDs y ne\xF3n), "realista" (fotorrealista, fiel al producto). Si el usuario pide un look animado sin nombrar el estilo, omite el campo.'),
40578
40788
  presenter: VideoPresenter,
40579
- creativeDirection: z155.string().trim().min(1).max(500).nullable().describe("Direcci\xF3n visual elegida. null significa que el usuario deleg\xF3 expl\xEDcitamente esta decisi\xF3n.")
40789
+ creativeDirection: z156.string().trim().min(1).max(500).nullable().describe("Direcci\xF3n visual elegida. null significa que el usuario deleg\xF3 expl\xEDcitamente esta decisi\xF3n.")
40580
40790
  }).strict()
40581
40791
  ]);
40582
- var VideoInput = z155.object({
40792
+ var VideoInput = z156.object({
40583
40793
  images: CreativeRefs.images.optional(),
40584
40794
  winnerReference: WinnerReferenceInput.optional().describe(WINNER_IMAGE_CHOICE_GUIDANCE),
40585
- title: z155.string().min(1).describe('T\xEDtulo corto del producto. Aparece en la primera vista del video. Ej. "Crema Anti-Edad Premium".'),
40586
- primaryAngle: z155.string().min(1).describe('\xC1ngulo de venta principal (frase del beneficio). Ej. "Reduce arrugas en 14 d\xEDas" o "Para quienes odian las cremas grasosas".'),
40795
+ title: z156.string().min(1).describe('T\xEDtulo corto del producto. Aparece en la primera vista del video. Ej. "Crema Anti-Edad Premium".'),
40796
+ primaryAngle: z156.string().min(1).describe('\xC1ngulo de venta principal (frase del beneficio). Ej. "Reduce arrugas en 14 d\xEDas" o "Para quienes odian las cremas grasosas".'),
40587
40797
  language: CreativeRefs.language,
40588
40798
  country: CreativeRefs.country,
40589
- aspectRatio: z155.enum([
40799
+ aspectRatio: z156.enum([
40590
40800
  "9:16",
40591
40801
  "16:9",
40592
40802
  "Auto"
40593
40803
  ]).describe('Relaci\xF3n de aspecto. "9:16" = vertical (TikTok/Reels \u2014 default recomendado para ads). "16:9" = horizontal (YouTube). "Auto" = decide la IA.'),
40594
40804
  generateAiEdit: AiEditRequestSchema.optional().describe('Opcional. Pide la Edici\xF3n con IA: una pasada que a\xF1ade texto, efectos y m\xFAsica sobre cada video entregado (variante with_ai_edit; se cobra al entregar, por video). Nivel: "economy" (Econ\xF3mica, Sonnet 5.5, m\xE1s barata) o "pro" (Opus 5.5, mejor calidad, ~10 min). true equivale a "pro"; false/omitido = sin edici\xF3n.'),
40595
- durationSeconds: z155.number().int().min(4).max(30).default(15).describe("Opcional. Duraci\xF3n objetivo: Un solo clip Econ\xF3mico o Medio usa 15s; Un solo clip Pro usa 15s o 30s; Multiescena usa 15s o 30s totales. La combinaci\xF3n de formato y calidad determina la ruta y el costo."),
40596
- videoAngleCount: z155.number().int().min(1).max(3).describe("Cantidad de videos a renderizar: 1, 2 o 3. Es una decisi\xF3n de costo obligatoria: preg\xFAntala incluso cuando creativeSetup.mode=automatic."),
40805
+ durationSeconds: z156.number().int().min(4).max(30).default(15).describe("Opcional. Duraci\xF3n objetivo: Un solo clip Econ\xF3mico o Medio usa 15s; Un solo clip Pro usa 15s o 30s; Multiescena usa 15s o 30s totales. La combinaci\xF3n de formato y calidad determina la ruta y el costo."),
40806
+ videoAngleCount: z156.number().int().min(1).max(3).describe("Cantidad de videos a renderizar: 1, 2 o 3. Es una decisi\xF3n de costo obligatoria: preg\xFAntala incluso cuando creativeSetup.mode=automatic."),
40597
40807
  angleNarratives: PublicNarrativeStyleEnum.array().max(3).optional().describe('Opcional. Narrativa POR \xC1NGULO (posicional). Valores actuales: "review", "ugc_how_to", "ugc_unboxing_chaos", "problem_product_cta" (problema concreto, producto como soluci\xF3n y CTA), "product_showcase", "wearable_showcase", "cinematic", "wild_card", "animated_problem_pixar", "sassy_product_pixar", "viral" (video sin voz: r\xF3tulos en pantalla; antes/despu\xE9s solo en Multiescena; solo 15 s, Un solo clip o Multiescena, y solo para cuentas habilitadas; la API rechaza otras duraciones), "market" (narrativa an\xE1lisis de mercado: adapta el video a los patrones ganadores estudiados de la competencia; requiere competitorScanEnabled: true). angleNarratives[i] fuerza la narrativa del \xE1ngulo i; las posiciones restantes las elige la IA. La lista no puede superar videoAngleCount.'),
40598
40808
  creativeSetup: VideoCreativeSetup.describe("Configuraci\xF3n creativa obligatoria. En guided pregunta narrativa, p\xFAblico, presentador y direcci\xF3n antes de confirmar. Usa automatic s\xF3lo si el usuario deleg\xF3 todo expl\xEDcitamente."),
40599
40809
  videoStructure: VideoStructureEnum.default("single_take").describe('Opcional. Formato: "single_take" = Un solo clip (generado completo; puede incluir cambios de plano) o "multi_scene" = Multiescena (varias tomas concatenadas). Default: single_take.'),
40600
40810
  videoQuality: VideoQualityEnum.default("economy").describe('Opcional. Calidad: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro. El sistema elige el proveedor internamente. Default: economy.'),
40601
40811
  videoResolution: VideoResolutionEnum.optional().describe('Opcional. Resoluci\xF3n del render: "480p" o "720p". Si se omite, se usa 480p; elige 720p expl\xEDcitamente si necesitas m\xE1s nitidez.'),
40602
- features: z155.array(z155.string()).optional().describe('Opcional. Lista de features/beneficios clave a mencionar. Ej. ["resistente al agua", "bater\xEDa 24h", "carga inal\xE1mbrica"].'),
40812
+ features: z156.array(z156.string()).optional().describe('Opcional. Lista de features/beneficios clave a mencionar. Ej. ["resistente al agua", "bater\xEDa 24h", "carga inal\xE1mbrica"].'),
40603
40813
  price: CreativeRefs.price,
40604
40814
  offer: CreativeRefs.offer,
40605
40815
  productContext: CreativeRefs.productContext,
40606
40816
  productLabel: CreativeRefs.productLabel,
40607
- cta: z155.string().optional().describe('Opcional. Call-to-action final del video. Ej. "Compra ahora", "Pide el tuyo hoy", "Link en bio". Si se omite, la IA escribe uno.'),
40608
- scriptNotes: z155.string().optional().describe('Opcional. Notas/restricciones para el guion (la IA las usa al redactar). Ej. "No mencionar la marca X", "Tono divertido, no cl\xEDnico", "Mencionar 2x1". NO es el guion literal: creativeSetup.mode=guided activa siempre la revisi\xF3n palabra-por-palabra con get_video_script / approve_video_script.'),
40817
+ cta: z156.string().optional().describe('Opcional. Call-to-action final del video. Ej. "Compra ahora", "Pide el tuyo hoy", "Link en bio". Si se omite, la IA escribe uno.'),
40818
+ scriptNotes: z156.string().optional().describe('Opcional. Notas/restricciones para el guion (la IA las usa al redactar). Ej. "No mencionar la marca X", "Tono divertido, no cl\xEDnico", "Mencionar 2x1". NO es el guion literal: creativeSetup.mode=guided activa siempre la revisi\xF3n palabra-por-palabra con get_video_script / approve_video_script.'),
40609
40819
  creativeGender: CreativeGenderEnum.optional().describe('Opcional. QUI\xC9N APARECE EN PANTALLA en el video: mujer ("female"), hombre ("male") o ambos ("mixed"). NO es la voz; cuando se fija, la voz se alinea sola con el personaje. M\xE1ndalo en cuanto el usuario diga qui\xE9n debe SALIR en el video, con cualquier redacci\xF3n ("quiero una mujer", "que salga un hombre", "protagonista femenina"): si no lo mandas, el g\xE9nero lo inventa la IA y el usuario puede recibir lo contrario de lo que pidi\xF3 sin ning\xFAn aviso. NO lo mandes cuando hable del P\xDABLICO COMPRADOR ("esto es para hombres", "mi p\xFAblico son mujeres", "va dirigido a mam\xE1s"): eso es a qui\xE9n se le vende, no qui\xE9n act\xFAa, y fijarlo ah\xED pinea un protagonista que nadie pidi\xF3. "mixed" solo cuando pida expl\xEDcitamente ambos, y ten en cuenta que no garantiza una mezcla: no fija ning\xFAn g\xE9nero y cada creativo elige su protagonista. No lo preguntes como paso obligatorio. Si creativeSetup.presenter.mode="saved_actor", el personaje guardado manda sobre este campo.'),
40610
40820
  competitorScanEnabled: CreativeRefs.competitorScanEnabled,
40611
- replicateWinnerWhenFound: z155.boolean().optional().describe("Conserva la preferencia de copiar un ganador si existe. false permite estudiar el mercado sin reemplazar un \xE1ngulo por el anuncio ganador. No a\xF1adas una pregunta obligatoria para este campo."),
40821
+ replicateWinnerWhenFound: z156.boolean().optional().describe("Conserva la preferencia de copiar un ganador si existe. false permite estudiar el mercado sin reemplazar un \xE1ngulo por el anuncio ganador. No a\xF1adas una pregunta obligatoria para este campo."),
40612
40822
  brandId: CreativeRefs.brandId
40613
40823
  }).strict();
40614
40824
  var FreeVideoQualityEnum = VideoQualityEnum;
@@ -40626,7 +40836,7 @@ var FREE_VIDEO_DURATIONS_BY_QUALITY = {
40626
40836
  length: 29
40627
40837
  }, (_, index) => index + 2)
40628
40838
  };
40629
- var FreeVideoModelIdEnum = z155.enum([
40839
+ var FreeVideoModelIdEnum = z156.enum([
40630
40840
  "grok-imagine-video-1-5-preview",
40631
40841
  "minimax-h3/reference-to-video",
40632
40842
  "wan/3-0-video",
@@ -40637,26 +40847,26 @@ var FREE_SELECTABLE_MODEL_IDS = [
40637
40847
  "minimax-h3/reference-to-video",
40638
40848
  "wan/3-0-video"
40639
40849
  ];
40640
- var FreeVideoInput = z155.object({
40850
+ var FreeVideoInput = z156.object({
40641
40851
  images: ImagesInput.optional().describe("Opcional. 1-5 fotos del producto. Om\xEDtelo para generar desde texto puro."),
40642
- rawPrompt: z155.string().trim().min(1).max(2e3).describe("Prompt o guion exacto del video. Si activas subt\xEDtulos, este mismo texto se usa como guion de subt\xEDtulos."),
40852
+ rawPrompt: z156.string().trim().min(1).max(2e3).describe("Prompt o guion exacto del video. Si activas subt\xEDtulos, este mismo texto se usa como guion de subt\xEDtulos."),
40643
40853
  language: CreativeRefs.language,
40644
40854
  quality: FreeVideoQualityEnum.describe('Calidad del video: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro (Wan).'),
40645
40855
  // Retired in MCP 7.0.0 (Task 11): kept in the schema, accepted, and
40646
40856
  // parsed ONLY so the handler can reject it with a message naming its
40647
40857
  // replacement — dropping it silently would turn a caller's explicit
40648
40858
  // Pro++ pick into a quiet fallback to Wan.
40649
- freeProModel: z155.enum([
40859
+ freeProModel: z156.enum([
40650
40860
  "wan",
40651
40861
  "seedance"
40652
40862
  ]).optional().describe("ELIMINADO en MCP 7.0.0 \u2014 usa `modelId`. Enviar este campo produce un error."),
40653
40863
  modelId: FreeVideoModelIdEnum.optional().describe('Opcional. Elige expl\xEDcitamente el modelo del registro en vez del default de la calidad: "grok-imagine-video-1-5-preview" (Grok 1.5), "minimax-h3/reference-to-video" (H3 Max) o "wan/3-0-video" (Wan 3.0). Om\xEDtelo para usar el modelo por defecto de la calidad elegida. El modelo determina la duraci\xF3n permitida (Grok 6/8/10/15s, H3 Max 4-15s, Wan 2-30s) y el precio. "bytedance/seedance-2-5" est\xE1 inactivo y se rechaza con un error claro, nunca un 500.'),
40654
- durationSeconds: z155.number().int().min(2).max(30).describe("Duraci\xF3n exacta. Econ\xF3mico: 6, 8, 10 o 15s; Medio: enteros de 4 a 15s; Pro Wan: 2 a 30s; Pro++ Seedance: 4 a 30s."),
40864
+ durationSeconds: z156.number().int().min(2).max(30).describe("Duraci\xF3n exacta. Econ\xF3mico: 6, 8, 10 o 15s; Medio: enteros de 4 a 15s; Pro Wan: 2 a 30s; Pro++ Seedance: 4 a 30s."),
40655
40865
  videoResolution: VideoResolutionEnum.describe("Resoluci\xF3n del video: 480p o 720p."),
40656
- generateAiMusic: z155.boolean().default(false).describe('Opcional. Agrega m\xFAsica instrumental IA debajo del audio nativo. Default false. Equivale a generateAiEdit (nivel "pro"): la Edici\xF3n con IA trae su propia m\xFAsica.'),
40866
+ generateAiMusic: z156.boolean().default(false).describe('Opcional. Agrega m\xFAsica instrumental IA debajo del audio nativo. Default false. Equivale a generateAiEdit (nivel "pro"): la Edici\xF3n con IA trae su propia m\xFAsica.'),
40657
40867
  generateAiEdit: AiEditRequestSchema.optional().describe('Opcional. Pide la Edici\xF3n con IA: una pasada que a\xF1ade texto, gr\xE1ficos y m\xFAsica sobre el video ya entregado (variante with_ai_edit; se cobra al entregar). Nivel: "economy" (Econ\xF3mica, Sonnet 5.5, m\xE1s barata) o "pro" (Opus 5.5, mejor calidad, ~10 min). true equivale a "pro". Default sin edici\xF3n.'),
40658
- addSubtitles: z155.boolean().default(false).describe("Opcional. Quema subt\xEDtulos usando el rawPrompt exacto. Default false."),
40659
- idempotencyKey: z155.string().guid().optional().describe("Opcional. Se acepta por compatibilidad pero se ignora: la identidad del reintento se deriva autom\xE1ticamente de los argumentos sem\xE1nticos, as\xED que un retry con los mismos argumentos ya es idempotente sin este campo.")
40868
+ addSubtitles: z156.boolean().default(false).describe("Opcional. Quema subt\xEDtulos usando el rawPrompt exacto. Default false."),
40869
+ idempotencyKey: z156.string().guid().optional().describe("Opcional. Se acepta por compatibilidad pero se ignora: la identidad del reintento se deriva autom\xE1ticamente de los argumentos sem\xE1nticos, as\xED que un retry con los mismos argumentos ya es idempotente sin este campo.")
40660
40870
  }).strict();
40661
40871
  var imageStyleList = ImageCreativeStyleEnum.options.join(" | ");
40662
40872
  var dropRetiredImageQuality = /* @__PURE__ */ __name((value) => {
@@ -40664,43 +40874,43 @@ var dropRetiredImageQuality = /* @__PURE__ */ __name((value) => {
40664
40874
  const { imageModel: _retired, ...rest } = value;
40665
40875
  return rest;
40666
40876
  }, "dropRetiredImageQuality");
40667
- var ImageCreativeSetupShape = z155.discriminatedUnion("mode", [
40668
- z155.object({
40669
- mode: z155.literal("automatic")
40877
+ var ImageCreativeSetupShape = z156.discriminatedUnion("mode", [
40878
+ z156.object({
40879
+ mode: z156.literal("automatic")
40670
40880
  }).strict(),
40671
- z155.object({
40672
- mode: z155.literal("guided"),
40673
- creativeArchetype: z155.union([
40881
+ z156.object({
40882
+ mode: z156.literal("guided"),
40883
+ creativeArchetype: z156.union([
40674
40884
  ImageCreativeArchetypeEnum,
40675
- z155.literal("ai_decides")
40885
+ z156.literal("ai_decides")
40676
40886
  ]),
40677
- visualTreatment: z155.union([
40887
+ visualTreatment: z156.union([
40678
40888
  ImageCreativeVisualTreatmentEnum,
40679
- z155.literal("ai_decides")
40889
+ z156.literal("ai_decides")
40680
40890
  ]),
40681
40891
  aspectRatio: ImageCreativeAspectRatioEnum,
40682
- nVariants: z155.union([
40683
- z155.literal(1),
40684
- z155.literal(2),
40685
- z155.literal(3),
40686
- z155.literal(4),
40687
- z155.literal(6)
40892
+ nVariants: z156.union([
40893
+ z156.literal(1),
40894
+ z156.literal(2),
40895
+ z156.literal(3),
40896
+ z156.literal(4),
40897
+ z156.literal(6)
40688
40898
  ]),
40689
- styleMix: z155.boolean().nullable().describe("Decisi\xF3n s\xF3lo para 2\u20134 variantes. Usa null para 1 o 6, cuando la UI no hace esta pregunta."),
40690
- generateAdCopy: z155.boolean(),
40691
- competitorScanEnabled: z155.boolean(),
40692
- productContext: z155.string().trim().min(1).max(3e3).nullable(),
40693
- creativeDirection: z155.string().trim().min(1).max(500).nullable(),
40694
- brandColors: z155.string().trim().min(1).max(240).nullable().describe('Colores en lenguaje natural, igual que en el chat web. Ej. "Azul y Dorado". null significa sin colores espec\xEDficos.'),
40695
- headline: z155.string().trim().min(1).max(120).nullable(),
40696
- subheadline: z155.string().trim().min(1).max(160).nullable()
40899
+ styleMix: z156.boolean().nullable().describe("Decisi\xF3n s\xF3lo para 2\u20134 variantes. Usa null para 1 o 6, cuando la UI no hace esta pregunta."),
40900
+ generateAdCopy: z156.boolean(),
40901
+ competitorScanEnabled: z156.boolean(),
40902
+ productContext: z156.string().trim().min(1).max(3e3).nullable(),
40903
+ creativeDirection: z156.string().trim().min(1).max(500).nullable(),
40904
+ brandColors: z156.string().trim().min(1).max(240).nullable().describe('Colores en lenguaje natural, igual que en el chat web. Ej. "Azul y Dorado". null significa sin colores espec\xEDficos.'),
40905
+ headline: z156.string().trim().min(1).max(120).nullable(),
40906
+ subheadline: z156.string().trim().min(1).max(160).nullable()
40697
40907
  }).strict()
40698
40908
  ]).superRefine((setup, context) => {
40699
40909
  if (setup.mode !== "guided") return;
40700
40910
  const needsStyleMix = setup.nVariants >= 2 && setup.nVariants <= 4;
40701
40911
  if (needsStyleMix && setup.styleMix === null) {
40702
40912
  context.addIssue({
40703
- code: z155.ZodIssueCode.custom,
40913
+ code: z156.ZodIssueCode.custom,
40704
40914
  path: [
40705
40915
  "styleMix"
40706
40916
  ],
@@ -40709,7 +40919,7 @@ var ImageCreativeSetupShape = z155.discriminatedUnion("mode", [
40709
40919
  }
40710
40920
  if (!needsStyleMix && setup.styleMix !== null) {
40711
40921
  context.addIssue({
40712
- code: z155.ZodIssueCode.custom,
40922
+ code: z156.ZodIssueCode.custom,
40713
40923
  path: [
40714
40924
  "styleMix"
40715
40925
  ],
@@ -40717,57 +40927,57 @@ var ImageCreativeSetupShape = z155.discriminatedUnion("mode", [
40717
40927
  });
40718
40928
  }
40719
40929
  });
40720
- var ImageCreativeSetup = z155.preprocess(dropRetiredImageQuality, ImageCreativeSetupShape);
40721
- var LandingCreativeSetup = z155.discriminatedUnion("mode", [
40722
- z155.object({
40723
- mode: z155.literal("automatic")
40930
+ var ImageCreativeSetup = z156.preprocess(dropRetiredImageQuality, ImageCreativeSetupShape);
40931
+ var LandingCreativeSetup = z156.discriminatedUnion("mode", [
40932
+ z156.object({
40933
+ mode: z156.literal("automatic")
40724
40934
  }).strict(),
40725
- z155.object({
40726
- mode: z155.literal("guided"),
40935
+ z156.object({
40936
+ mode: z156.literal("guided"),
40727
40937
  landingStrategy: LandingStrategyEnum,
40728
40938
  landingImageFormat: LandingImageFormatEnum,
40729
- competitorScanEnabled: z155.boolean(),
40730
- paymentMethods: z155.string().trim().min(1).max(240).nullable(),
40731
- productContext: z155.string().trim().min(1).max(3e3).nullable(),
40732
- creativeDirection: z155.string().trim().min(1).max(500).nullable(),
40733
- headline: z155.string().trim().min(1).max(120).nullable(),
40734
- subheadline: z155.string().trim().min(1).max(160).nullable()
40939
+ competitorScanEnabled: z156.boolean(),
40940
+ paymentMethods: z156.string().trim().min(1).max(240).nullable(),
40941
+ productContext: z156.string().trim().min(1).max(3e3).nullable(),
40942
+ creativeDirection: z156.string().trim().min(1).max(500).nullable(),
40943
+ headline: z156.string().trim().min(1).max(120).nullable(),
40944
+ subheadline: z156.string().trim().min(1).max(160).nullable()
40735
40945
  }).strict()
40736
40946
  ]);
40737
- var ImageInput = z155.object({
40947
+ var ImageInput = z156.object({
40738
40948
  images: CreativeRefs.images.optional(),
40739
40949
  winnerReference: WinnerReferenceInput.optional().describe(WINNER_IMAGE_CHOICE_GUIDANCE),
40740
- productTitle: z155.string().min(1).describe('Nombre del producto. Ej. "Crema Anti-Edad Premium".'),
40741
- primaryAngle: z155.string().min(1).optional().describe('Opcional. \xC1ngulo de venta principal. Si se omite, ProductMaker lo genera y creativeSetup.mode="guided" lo muestra para revisi\xF3n antes de crear las im\xE1genes.'),
40950
+ productTitle: z156.string().min(1).describe('Nombre del producto. Ej. "Crema Anti-Edad Premium".'),
40951
+ primaryAngle: z156.string().min(1).optional().describe('Opcional. \xC1ngulo de venta principal. Si se omite, ProductMaker lo genera y creativeSetup.mode="guided" lo muestra para revisi\xF3n antes de crear las im\xE1genes.'),
40742
40952
  buyerPersona: CreativeRefs.buyerPersona,
40743
40953
  language: CreativeRefs.language,
40744
40954
  country: CreativeRefs.country,
40745
40955
  creativeSetup: ImageCreativeSetup.describe("Configuraci\xF3n obligatoria equivalente al wizard web. Usa guided salvo que el usuario delegue expl\xEDcitamente todo; presenta las decisiones guiadas en un \xFAnico checklist compacto."),
40746
40956
  imageStyle: ImageCreativeStyleEnum.optional().describe(`Opcional. Estilo del shot del producto. Valores: ${imageStyleList}. Si se omite, la IA escoge seg\xFAn el archetype.`),
40747
- features: z155.array(z155.string()).optional().describe('Opcional. Features/beneficios a destacar visualmente. Ej. ["resistente al agua", "ultra liviano"].'),
40957
+ features: z156.array(z156.string()).optional().describe('Opcional. Features/beneficios a destacar visualmente. Ej. ["resistente al agua", "ultra liviano"].'),
40748
40958
  price: CreativeRefs.price,
40749
- omitPrice: z155.boolean().optional().describe("Pon true \xFAnicamente cuando el usuario pida expl\xEDcitamente una imagen sin precio. Evita que el backend reutilice un precio extra\xEDdo del producto. No lo combines con price ni compareAtPrice."),
40959
+ omitPrice: z156.boolean().optional().describe("Pon true \xFAnicamente cuando el usuario pida expl\xEDcitamente una imagen sin precio. Evita que el backend reutilice un precio extra\xEDdo del producto. No lo combines con price ni compareAtPrice."),
40750
40960
  compareAtPrice: CreativeRefs.compareAtPrice,
40751
40961
  offer: CreativeRefs.offer,
40752
40962
  productLabel: CreativeRefs.productLabel,
40753
40963
  isCombo: CreativeRefs.isCombo,
40754
40964
  brandId: CreativeRefs.brandId
40755
40965
  });
40756
- var EditImageCreativeInput = z155.object({
40757
- taskId: z155.string().guid().describe("ID de la tarea de imagen ya finalizada."),
40758
- variantIndex: z155.number().int().min(0).max(10).describe("\xCDndice de la variante a corregir (0 = primera imagen)."),
40759
- clientRequestId: z155.string().min(1).max(160).optional().describe("Identidad estable de esta correcci\xF3n; reutil\xEDzala al reconciliar una respuesta perdida, no para otra instrucci\xF3n."),
40760
- instruction: z155.string().min(1).max(1e3).describe('Qu\xE9 cambiar en esa imagen. Ej. "quita el badge de env\xEDo gratis", "cambia el fondo a blanco".')
40966
+ var EditImageCreativeInput = z156.object({
40967
+ taskId: z156.string().guid().describe("ID de la tarea de imagen ya finalizada."),
40968
+ variantIndex: z156.number().int().min(0).max(10).describe("\xCDndice de la variante a corregir (0 = primera imagen)."),
40969
+ clientRequestId: z156.string().min(1).max(160).optional().describe("Identidad estable de esta correcci\xF3n; reutil\xEDzala al reconciliar una respuesta perdida, no para otra instrucci\xF3n."),
40970
+ instruction: z156.string().min(1).max(1e3).describe('Qu\xE9 cambiar en esa imagen. Ej. "quita el badge de env\xEDo gratis", "cambia el fondo a blanco".')
40761
40971
  });
40762
- var LandingInput = z155.object({
40763
- includeInitialLandingGif: z155.boolean().optional().describe("Opcional. En nuevas landings cl\xE1sicas habilitadas, omitirlo incluye el primer GIF del producto y su coste en el total. Env\xEDa false si el usuario lo excluye: no se genera ni se reserva su coste. Conserva la elecci\xF3n al confirmar y al reintentar."),
40972
+ var LandingInput = z156.object({
40973
+ includeInitialLandingGif: z156.boolean().optional().describe("Opcional. En nuevas landings cl\xE1sicas habilitadas, omitirlo incluye el primer GIF del producto y su coste en el total. Env\xEDa false si el usuario lo excluye: no se genera ni se reserva su coste. Conserva la elecci\xF3n al confirmar y al reintentar."),
40764
40974
  images: CreativeRefs.images.optional(),
40765
40975
  winnerReference: WinnerReferenceInput.optional().describe(WINNER_IMAGE_CHOICE_GUIDANCE),
40766
40976
  language: CreativeRefs.language,
40767
40977
  country: CreativeRefs.country,
40768
40978
  landingMode: LandingModeSchema.default("classic").describe('Opcional. Tipo de landing: "classic" (landing cl\xE1sica de im\xE1genes, por defecto) o "code" (landing de c\xF3digo editable: HTML real con el editor por chat, se edita luego con quote_code_landing_edit / edit_code_landing). Preg\xFAntalo en el checklist si el usuario no lo dijo. Con "code", landingStrategy y landingImageFormat no aplican y se ignoran.'),
40769
40979
  creativeSetup: LandingCreativeSetup.describe('Configuraci\xF3n obligatoria equivalente al wizard web. Con landingMode="code" env\xEDa igualmente los campos de guided; estrategia y formato se ignoran.'),
40770
- salesAngle: z155.string().optional().describe('Opcional. \xC1ngulo de venta principal. Ej. "Reduce arrugas en 14 d\xEDas". Si se omite, la IA lo deduce de la imagen.'),
40980
+ salesAngle: z156.string().optional().describe('Opcional. \xC1ngulo de venta principal. Ej. "Reduce arrugas en 14 d\xEDas". Si se omite, la IA lo deduce de la imagen.'),
40771
40981
  buyerPersona: CreativeRefs.buyerPersona,
40772
40982
  price: CreativeRefs.price,
40773
40983
  compareAtPrice: CreativeRefs.compareAtPrice,
@@ -41052,8 +41262,8 @@ function registerCreativeTools(server, api, { transport = "http", proxyBaseUrl =
41052
41262
  server.registerTool("get_image_edit_status", {
41053
41263
  description: imageEditStatusGuidance.summary,
41054
41264
  inputSchema: {
41055
- taskId: z155.string().guid(),
41056
- operationId: z155.string().guid()
41265
+ taskId: z156.string().guid(),
41266
+ operationId: z156.string().guid()
41057
41267
  },
41058
41268
  annotations: READS_INTERNAL,
41059
41269
  _meta: taskResultsToolMeta()
@@ -41153,10 +41363,10 @@ function registerCreativeTools(server, api, { transport = "http", proxyBaseUrl =
41153
41363
  __name(registerCreativeTools, "registerCreativeTools");
41154
41364
 
41155
41365
  // src/tools/creative-variants.ts
41156
- import { z as z156 } from "zod";
41366
+ import { z as z157 } from "zod";
41157
41367
  var estimateCreativeVariantGuidance = getProductMakerCapabilityModelGuidance("estimate_creative_variant");
41158
41368
  var createCreativeVariantGuidance = getProductMakerCapabilityModelGuidance("create_creative_variant");
41159
- var LandingSectionKeyEnum = z156.enum([
41369
+ var LandingSectionKeyEnum = z157.enum([
41160
41370
  "problem_hook",
41161
41371
  "problem_cost",
41162
41372
  "solution_mechanism",
@@ -41196,24 +41406,24 @@ var LandingSectionKeyEnum = z156.enum([
41196
41406
  "lifestyle_fit",
41197
41407
  "join_lifestyle"
41198
41408
  ]);
41199
- var CreativeVariantKindEnum = z156.enum([
41409
+ var CreativeVariantKindEnum = z157.enum([
41200
41410
  "video",
41201
41411
  "image",
41202
41412
  "landing"
41203
41413
  ]);
41204
- var EstimateCreativeVariantInputBase = z156.object({
41205
- sourceTaskId: z156.string().guid().describe("ID de la tarea original completada."),
41414
+ var EstimateCreativeVariantInputBase = z157.object({
41415
+ sourceTaskId: z157.string().guid().describe("ID de la tarea original completada."),
41206
41416
  kind: CreativeVariantKindEnum,
41207
41417
  videoPreset: TaskCreativeVariantVideoPresetEnum.optional().describe("Opcional para video. Solo cambia el preset p\xFAblico; el servidor conserva el modelo/tier del task origen."),
41208
41418
  videoResolution: VideoResolutionEnum.optional().describe("Opcional para video. Resoluci\xF3n del nuevo render."),
41209
- nVariants: z156.number().int().min(1).max(3).optional().describe("Opcional para imagen. N\xFAmero de im\xE1genes adicionales (1-3)."),
41419
+ nVariants: z157.number().int().min(1).max(3).optional().describe("Opcional para imagen. N\xFAmero de im\xE1genes adicionales (1-3)."),
41210
41420
  sectionKey: LandingSectionKeyEnum.optional().describe("Opcional para landing. Si ya conoces la secci\xF3n, evita cotizar la clasificaci\xF3n con IA."),
41211
- instructions: z156.string().trim().min(1).max(2e3).optional().describe("Opcional para landing. Si se env\xEDa sin sectionKey, el estimado suma la clasificaci\xF3n pagada con IA.")
41421
+ instructions: z157.string().trim().min(1).max(2e3).optional().describe("Opcional para landing. Si se env\xEDa sin sectionKey, el estimado suma la clasificaci\xF3n pagada con IA.")
41212
41422
  }).strict();
41213
41423
  var EstimateCreativeVariantInput = EstimateCreativeVariantInputBase.superRefine((input, ctx) => {
41214
41424
  if (input.kind === "video" && input.nVariants !== void 0) {
41215
41425
  ctx.addIssue({
41216
- code: z156.ZodIssueCode.custom,
41426
+ code: z157.ZodIssueCode.custom,
41217
41427
  path: [
41218
41428
  "nVariants"
41219
41429
  ],
@@ -41223,7 +41433,7 @@ var EstimateCreativeVariantInput = EstimateCreativeVariantInputBase.superRefine(
41223
41433
  if (input.kind !== "video") {
41224
41434
  if (input.videoPreset !== void 0) {
41225
41435
  ctx.addIssue({
41226
- code: z156.ZodIssueCode.custom,
41436
+ code: z157.ZodIssueCode.custom,
41227
41437
  path: [
41228
41438
  "videoPreset"
41229
41439
  ],
@@ -41232,7 +41442,7 @@ var EstimateCreativeVariantInput = EstimateCreativeVariantInputBase.superRefine(
41232
41442
  }
41233
41443
  if (input.videoResolution !== void 0) {
41234
41444
  ctx.addIssue({
41235
- code: z156.ZodIssueCode.custom,
41445
+ code: z157.ZodIssueCode.custom,
41236
41446
  path: [
41237
41447
  "videoResolution"
41238
41448
  ],
@@ -41242,7 +41452,7 @@ var EstimateCreativeVariantInput = EstimateCreativeVariantInputBase.superRefine(
41242
41452
  }
41243
41453
  if (input.kind !== "image" && input.nVariants !== void 0) {
41244
41454
  ctx.addIssue({
41245
- code: z156.ZodIssueCode.custom,
41455
+ code: z157.ZodIssueCode.custom,
41246
41456
  path: [
41247
41457
  "nVariants"
41248
41458
  ],
@@ -41252,7 +41462,7 @@ var EstimateCreativeVariantInput = EstimateCreativeVariantInputBase.superRefine(
41252
41462
  if (input.kind !== "landing") {
41253
41463
  if (input.sectionKey !== void 0) {
41254
41464
  ctx.addIssue({
41255
- code: z156.ZodIssueCode.custom,
41465
+ code: z157.ZodIssueCode.custom,
41256
41466
  path: [
41257
41467
  "sectionKey"
41258
41468
  ],
@@ -41261,7 +41471,7 @@ var EstimateCreativeVariantInput = EstimateCreativeVariantInputBase.superRefine(
41261
41471
  }
41262
41472
  if (input.instructions !== void 0) {
41263
41473
  ctx.addIssue({
41264
- code: z156.ZodIssueCode.custom,
41474
+ code: z157.ZodIssueCode.custom,
41265
41475
  path: [
41266
41476
  "instructions"
41267
41477
  ],
@@ -41270,31 +41480,31 @@ var EstimateCreativeVariantInput = EstimateCreativeVariantInputBase.superRefine(
41270
41480
  }
41271
41481
  }
41272
41482
  });
41273
- var CreateCreativeVariantInputBase = z156.object({
41274
- sourceTaskId: z156.string().guid().describe("ID de la tarea original completada."),
41483
+ var CreateCreativeVariantInputBase = z157.object({
41484
+ sourceTaskId: z157.string().guid().describe("ID de la tarea original completada."),
41275
41485
  kind: CreativeVariantKindEnum,
41276
- confirm: z156.literal(true).describe("Confirmaci\xF3n expl\xEDcita del usuario despu\xE9s de mostrarle el estimado de cr\xE9ditos."),
41277
- clientRequestId: z156.string().guid().describe("UUID estable para esta intenci\xF3n (obligatorio por compatibilidad de contrato; el servidor deriva la identidad real del request desde los argumentos sem\xE1nticos, as\xED que un UUID nuevo en un retry NO crea una variante duplicada). Si la API devuelve status=error, una nueva generaci\xF3n exige otra confirmaci\xF3n."),
41278
- angle: z156.string().trim().min(1).max(500).optional().describe("\xC1ngulo nuevo para video o imagen."),
41279
- buyerPersona: z156.string().trim().min(1).max(360).optional().describe("Buyer persona coherente con el \xE1ngulo."),
41280
- scriptNotes: z156.string().trim().min(1).max(2e3).optional().describe("Direcci\xF3n breve del guion para una variante de video."),
41281
- creativeDirection: z156.string().trim().min(1).max(2e3).optional().describe("Direcci\xF3n creativa para una variante de imagen."),
41486
+ confirm: z157.literal(true).describe("Confirmaci\xF3n expl\xEDcita del usuario despu\xE9s de mostrarle el estimado de cr\xE9ditos."),
41487
+ clientRequestId: z157.string().guid().describe("UUID estable para esta intenci\xF3n (obligatorio por compatibilidad de contrato; el servidor deriva la identidad real del request desde los argumentos sem\xE1nticos, as\xED que un UUID nuevo en un retry NO crea una variante duplicada). Si la API devuelve status=error, una nueva generaci\xF3n exige otra confirmaci\xF3n."),
41488
+ angle: z157.string().trim().min(1).max(500).optional().describe("\xC1ngulo nuevo para video o imagen."),
41489
+ buyerPersona: z157.string().trim().min(1).max(360).optional().describe("Buyer persona coherente con el \xE1ngulo."),
41490
+ scriptNotes: z157.string().trim().min(1).max(2e3).optional().describe("Direcci\xF3n breve del guion para una variante de video."),
41491
+ creativeDirection: z157.string().trim().min(1).max(2e3).optional().describe("Direcci\xF3n creativa para una variante de imagen."),
41282
41492
  videoPreset: TaskCreativeVariantVideoPresetEnum.optional().describe("Opcional para video. Preset p\xFAblico; el servidor resuelve modelo/tier desde el task origen."),
41283
41493
  videoResolution: VideoResolutionEnum.optional().describe("Opcional para video."),
41284
- generateAiMusic: z156.boolean().optional().describe("Opcional para video."),
41285
- nVariants: z156.number().int().min(1).max(3).optional().describe("Opcional para imagen. N\xFAmero de im\xE1genes adicionales (1-3)."),
41494
+ generateAiMusic: z157.boolean().optional().describe("Opcional para video."),
41495
+ nVariants: z157.number().int().min(1).max(3).optional().describe("Opcional para imagen. N\xFAmero de im\xE1genes adicionales (1-3)."),
41286
41496
  imageStyle: ImageCreativeStyleEnum.optional().describe("Opcional para imagen."),
41287
41497
  creativeArchetype: ImageCreativeArchetypeEnum.optional().describe("Opcional para imagen."),
41288
41498
  visualTreatment: ImageCreativeVisualTreatmentEnum.optional().describe("Opcional para imagen."),
41289
41499
  aspectRatio: ImageCreativeAspectRatioEnum.optional().describe("Opcional para imagen."),
41290
- styleMix: z156.boolean().optional().describe("Opcional para imagen."),
41500
+ styleMix: z157.boolean().optional().describe("Opcional para imagen."),
41291
41501
  sectionKey: LandingSectionKeyEnum.optional().describe("Opcional para landing. Si se omite, se clasifica con IA a partir de instructions."),
41292
- instructions: z156.string().trim().min(1).max(2e3).optional().describe("Solicitud libre para una nueva secci\xF3n de landing. La IA la clasifica si no env\xEDas sectionKey.")
41502
+ instructions: z157.string().trim().min(1).max(2e3).optional().describe("Solicitud libre para una nueva secci\xF3n de landing. La IA la clasifica si no env\xEDas sectionKey.")
41293
41503
  }).strict();
41294
41504
  var CreateCreativeVariantInput = CreateCreativeVariantInputBase.superRefine((input, ctx) => {
41295
41505
  if ((input.kind === "video" || input.kind === "image") && !input.angle) {
41296
41506
  ctx.addIssue({
41297
- code: z156.ZodIssueCode.custom,
41507
+ code: z157.ZodIssueCode.custom,
41298
41508
  path: [
41299
41509
  "angle"
41300
41510
  ],
@@ -41303,7 +41513,7 @@ var CreateCreativeVariantInput = CreateCreativeVariantInputBase.superRefine((inp
41303
41513
  }
41304
41514
  if (input.kind === "landing" && !input.sectionKey && !input.instructions) {
41305
41515
  ctx.addIssue({
41306
- code: z156.ZodIssueCode.custom,
41516
+ code: z157.ZodIssueCode.custom,
41307
41517
  path: [
41308
41518
  "instructions"
41309
41519
  ],
@@ -41349,7 +41559,7 @@ var CreateCreativeVariantInput = CreateCreativeVariantInputBase.superRefine((inp
41349
41559
  for (const field of fieldsByKind[input.kind]) {
41350
41560
  if (input[field] !== void 0) {
41351
41561
  ctx.addIssue({
41352
- code: z156.ZodIssueCode.custom,
41562
+ code: z157.ZodIssueCode.custom,
41353
41563
  path: [
41354
41564
  field
41355
41565
  ],
@@ -41576,38 +41786,38 @@ Costo m\xE1ximo: ${maximumCredits} cr\xE9ditos.`);
41576
41786
  __name(registerLandingImageEditTools, "registerLandingImageEditTools");
41577
41787
 
41578
41788
  // src/tools/code-landing-edits.ts
41579
- import { z as z157 } from "zod";
41789
+ import { z as z158 } from "zod";
41580
41790
  var quoteGuidance2 = getProductMakerCapabilityModelGuidance("quote_code_landing_edit");
41581
41791
  var editGuidance2 = getProductMakerCapabilityModelGuidance("edit_code_landing");
41582
41792
  var statusGuidance2 = getProductMakerCapabilityModelGuidance("get_code_landing_edit_status");
41583
41793
  var undoGuidance = getProductMakerCapabilityModelGuidance("undo_code_landing_edit");
41584
41794
  var EDIT_SCOPE = "patch";
41585
41795
  var CODE_LANDING_EDIT_KEY_NAMESPACE = "6f0c5a2e-3b1d-5c7e-9a4f-2d8b1e6c0a93";
41586
- var TaskId = z157.string().guid().describe("ID de la tarea due\xF1a de la landing de c\xF3digo.");
41587
- var EditMessage = z157.string().trim().min(3).max(2e3).describe('Instrucci\xF3n literal de la persona, sin agregar condiciones. Ej. "cambia el t\xEDtulo por Env\xEDo gratis hoy".');
41588
- var QuoteCodeLandingEditInput = z157.object({
41796
+ var TaskId = z158.string().guid().describe("ID de la tarea due\xF1a de la landing de c\xF3digo.");
41797
+ var EditMessage = z158.string().trim().min(3).max(2e3).describe('Instrucci\xF3n literal de la persona, sin agregar condiciones. Ej. "cambia el t\xEDtulo por Env\xEDo gratis hoy".');
41798
+ var QuoteCodeLandingEditInput = z158.object({
41589
41799
  taskId: TaskId,
41590
41800
  message: EditMessage
41591
41801
  }).strict();
41592
- var EditCodeLandingInput = z157.object({
41802
+ var EditCodeLandingInput = z158.object({
41593
41803
  taskId: TaskId,
41594
41804
  message: EditMessage.describe("El MISMO texto cotizado en quote_code_landing_edit, sin cambios: la cotizaci\xF3n est\xE1 atada a ese texto."),
41595
- quoteId: z157.string().guid().describe("quoteId devuelto por quote_code_landing_edit y aceptado."),
41596
- expectedRevision: z157.number().int().nonnegative().describe("expectedRevision devuelto por la misma cotizaci\xF3n. Nunca lo inventes.")
41805
+ quoteId: z158.string().guid().describe("quoteId devuelto por quote_code_landing_edit y aceptado."),
41806
+ expectedRevision: z158.number().int().nonnegative().describe("expectedRevision devuelto por la misma cotizaci\xF3n. Nunca lo inventes.")
41597
41807
  }).strict();
41598
- var GetCodeLandingEditStatusInput = z157.object({
41808
+ var GetCodeLandingEditStatusInput = z158.object({
41599
41809
  taskId: TaskId,
41600
- editId: z157.string().guid().optional().describe("Opcional. editId devuelto por edit_code_landing. Si se omite, devuelve la edici\xF3n m\xE1s reciente.")
41810
+ editId: z158.string().guid().optional().describe("Opcional. editId devuelto por edit_code_landing. Si se omite, devuelve la edici\xF3n m\xE1s reciente.")
41601
41811
  }).strict();
41602
- var UndoCodeLandingEditInput = z157.object({
41812
+ var UndoCodeLandingEditInput = z158.object({
41603
41813
  taskId: TaskId
41604
41814
  }).strict();
41605
- var RevisionFence = z157.object({
41606
- activeRevision: z157.number().int().nonnegative(),
41607
- undoRevision: z157.number().int().positive().nullable(),
41608
- redoRevision: z157.number().int().positive().nullable(),
41609
- current: z157.object({
41610
- activeRevision: z157.number().int().positive()
41815
+ var RevisionFence = z158.object({
41816
+ activeRevision: z158.number().int().nonnegative(),
41817
+ undoRevision: z158.number().int().positive().nullable(),
41818
+ redoRevision: z158.number().int().positive().nullable(),
41819
+ current: z158.object({
41820
+ activeRevision: z158.number().int().positive()
41611
41821
  }).nullable()
41612
41822
  });
41613
41823
  function centsToCredits3(cents) {
@@ -41786,13 +41996,13 @@ Costo: el de la cotizaci\xF3n aceptada (se cobra lo usado, nunca m\xE1s del m\xE
41786
41996
  __name(registerCodeLandingEditTools, "registerCodeLandingEditTools");
41787
41997
 
41788
41998
  // src/tools/script-review.ts
41789
- import { z as z158 } from "zod";
41999
+ import { z as z159 } from "zod";
41790
42000
  var getVideoScriptGuidance = getProductMakerCapabilityModelGuidance("get_video_script");
41791
42001
  var regenerateVideoScriptGuidance = getProductMakerCapabilityModelGuidance("regenerate_video_script");
41792
42002
  var approveVideoScriptGuidance = getProductMakerCapabilityModelGuidance("approve_video_script");
41793
- var GetVideoScriptInput = z158.object({
41794
- taskId: z158.string().min(1).describe("ID de la tarea (la misma que devolvi\xF3 create_product_task / generate_video_creative)."),
41795
- angleKey: z158.string().min(1).optional().describe('Clave persistida del \xE1ngulo cuyo guion se quiere leer (formato "angle_0", "angle_1", ...). Usa exactamente el angleKey recibido en reviewNextAction.calls al aprobar \xE1ngulos, incluso si s\xF3lo elegiste uno. Si se omite, el backend resuelve a "angle_0" literal; elegir el segundo candidato no crea angle_0. No derives esta clave del n\xFAmero visible del candidato.')
42003
+ var GetVideoScriptInput = z159.object({
42004
+ taskId: z159.string().min(1).describe("ID de la tarea (la misma que devolvi\xF3 create_product_task / generate_video_creative)."),
42005
+ angleKey: z159.string().min(1).optional().describe('Clave persistida del \xE1ngulo cuyo guion se quiere leer (formato "angle_0", "angle_1", ...). Usa exactamente el angleKey recibido en reviewNextAction.calls al aprobar \xE1ngulos, incluso si s\xF3lo elegiste uno. Si se omite, el backend resuelve a "angle_0" literal; elegir el segundo candidato no crea angle_0. No derives esta clave del n\xFAmero visible del candidato.')
41796
42006
  }).strict();
41797
42007
  var ApproveVideoScriptInput = ApproveVideoScriptCapabilityRequest;
41798
42008
  var RegenerateVideoScriptInput = RegenerateVideoScriptCapabilityRequest.extend({
@@ -41898,7 +42108,7 @@ Consulta get_task_status con esta tarea antes de reintentar. Si la tarea termin\
41898
42108
  __name(registerScriptReviewTools, "registerScriptReviewTools");
41899
42109
 
41900
42110
  // src/tools/connections.ts
41901
- import { z as z159 } from "zod";
42111
+ import { z as z160 } from "zod";
41902
42112
  var listShopifyShopsGuidance = getProductMakerCapabilityModelGuidance("list_shopify_shops");
41903
42113
  var listShopifyProductsGuidance = getProductMakerCapabilityModelGuidance("list_shopify_products");
41904
42114
  var listShopifyLandingPixelsGuidance = getProductMakerCapabilityModelGuidance("list_shopify_landing_pixels");
@@ -41909,7 +42119,7 @@ var listStoreOrdersGuidance = getProductMakerCapabilityModelGuidance("list_store
41909
42119
  function registerConnectionTools(server, api) {
41910
42120
  server.registerTool("list_shopify_shops", {
41911
42121
  description: listShopifyShopsGuidance.summary + " Si la lista est\xE1 vac\xEDa, dile al usuario que conecte una tienda en productmaker.app/integrations antes de intentar publicar.",
41912
- inputSchema: z159.object({}).shape,
42122
+ inputSchema: z160.object({}).shape,
41913
42123
  annotations: READS_INTERNAL
41914
42124
  }, async () => {
41915
42125
  try {
@@ -41921,12 +42131,12 @@ function registerConnectionTools(server, api) {
41921
42131
  });
41922
42132
  server.registerTool("list_shopify_products", {
41923
42133
  description: listShopifyProductsGuidance.summary + ' Usa el `id` devuelto junto con `publicationMode="existing"` en `publish_to_shopify`. Con `taskId` puedes ver el producto publicado actualmente. Antes de pedir confirmaci\xF3n para publicar, vuelve a llamar con `taskId` y el `publicationMode` elegido (`auto`, `new` o `existing` con `targetProductId`). Si tambi\xE9n pasas `query`, devuelve el cat\xE1logo junto al chequeo. Si devuelve `warning`, muestra su `message` y `settingsUrl`; el aviso permite continuar. No modifica Shopify.',
41924
- inputSchema: z159.object({
41925
- shopDomain: z159.string().min(3).max(120),
41926
- query: z159.string().trim().max(120).optional(),
41927
- taskId: z159.string().guid().optional(),
42134
+ inputSchema: z160.object({
42135
+ shopDomain: z160.string().min(3).max(120),
42136
+ query: z160.string().trim().max(120).optional(),
42137
+ taskId: z160.string().guid().optional(),
41928
42138
  publicationMode: ShopifyPublicationMode.optional(),
41929
- targetProductId: z159.string().min(1).max(300).optional()
42139
+ targetProductId: z160.string().min(1).max(300).optional()
41930
42140
  }).shape,
41931
42141
  annotations: READS_EXTERNAL
41932
42142
  }, async ({ shopDomain, query, taskId, publicationMode, targetProductId }) => {
@@ -41969,8 +42179,8 @@ function registerConnectionTools(server, api) {
41969
42179
  });
41970
42180
  server.registerTool("list_shopify_landing_pixels", {
41971
42181
  description: listShopifyLandingPixelsGuidance.summary + ' Cada pixel trae `key`, `provider`, `pixelId`, `source` ("theme" = est\xE1 en el tema, "landing" = solo en la landing, "manual" = lo agreg\xF3 la persona) y `selected` (si quedar\xE1 en la landing). Mu\xE9straselos en lenguaje simple antes de `publish_to_shopify` y pregunta cu\xE1les quitar o si agrega uno nuevo; luego pasa la elecci\xF3n en `landingPixels`. `appPixels` son los p\xEDxeles que una app de Shopify carga en toda la tienda (`provider`, `pixelId`, `appName`): mu\xE9stralos como "viene de la app <appName>", sin ofrecer quitarlos (solo se quitan desde esa app) y nunca los pongas en `landingPixels`. Si `unrecognizedCodeDetected` es true, avisa que hay c\xF3digo de seguimiento que no se pudo leer y no se copia. No modifica Shopify.',
41972
- inputSchema: z159.object({
41973
- shopDomain: z159.string().min(3).max(120)
42182
+ inputSchema: z160.object({
42183
+ shopDomain: z160.string().min(3).max(120)
41974
42184
  }).shape,
41975
42185
  annotations: READS_EXTERNAL
41976
42186
  }, async ({ shopDomain }) => {
@@ -41986,7 +42196,7 @@ function registerConnectionTools(server, api) {
41986
42196
  });
41987
42197
  server.registerTool("list_meta_ad_accounts", {
41988
42198
  description: listMetaAdAccountsGuidance.summary + " Para publicar, prefiere `list_meta_destinations`, que tambi\xE9n devuelve el portfolio y las p\xE1ginas disponibles. Si est\xE1 vac\xEDa, ind\xEDcale al usuario conectar Meta en productmaker.app/integrations.",
41989
- inputSchema: z159.object({}).shape,
42199
+ inputSchema: z160.object({}).shape,
41990
42200
  annotations: READS_EXTERNAL
41991
42201
  }, async () => {
41992
42202
  try {
@@ -41998,7 +42208,7 @@ function registerConnectionTools(server, api) {
41998
42208
  });
41999
42209
  server.registerTool("list_meta_destinations", {
42000
42210
  description: listMetaDestinationsGuidance.summary + " Es obligatorio llamar esta herramienta antes de publicar, mostrar las opciones y enviar al publicador el `portfolioId`, `adAccountId` y `pageId` elegidos; nunca elijas silenciosamente la primera p\xE1gina o cuenta. No modifica Meta.",
42001
- inputSchema: z159.object({}).shape,
42211
+ inputSchema: z160.object({}).shape,
42002
42212
  annotations: READS_EXTERNAL,
42003
42213
  _meta: {
42004
42214
  "openai/widgetAccessible": true
@@ -42013,7 +42223,7 @@ function registerConnectionTools(server, api) {
42013
42223
  });
42014
42224
  server.registerTool("list_tiktok_advertisers", {
42015
42225
  description: listTikTokAdvertisersGuidance.summary + " Si est\xE1 vac\xEDa, ind\xEDcale al usuario conectar TikTok en productmaker.app/integrations.",
42016
- inputSchema: z159.object({}).shape,
42226
+ inputSchema: z160.object({}).shape,
42017
42227
  annotations: READS_EXTERNAL
42018
42228
  }, async () => {
42019
42229
  try {
@@ -42043,7 +42253,7 @@ function registerConnectionTools(server, api) {
42043
42253
  __name(registerConnectionTools, "registerConnectionTools");
42044
42254
 
42045
42255
  // src/tools/actors.ts
42046
- import { z as z160 } from "zod";
42256
+ import { z as z161 } from "zod";
42047
42257
  var listActorsGuidance = getProductMakerCapabilityModelGuidance("list_actors");
42048
42258
  var actorVoiceGuidance = {
42049
42259
  capabilities: getProductMakerCapabilityModelGuidance("get_actor_voice_capabilities"),
@@ -42083,7 +42293,7 @@ function sanitizeVoiceResult(value) {
42083
42293
  __name(sanitizeVoiceResult, "sanitizeVoiceResult");
42084
42294
  function registerActorTools(server, api) {
42085
42295
  const actor = {
42086
- actorId: z160.string().min(1).max(64)
42296
+ actorId: z161.string().min(1).max(64)
42087
42297
  };
42088
42298
  const safe = /* @__PURE__ */ __name(async (request) => {
42089
42299
  try {
@@ -42112,8 +42322,8 @@ function registerActorTools(server, api) {
42112
42322
  inputSchema: {
42113
42323
  ...actor,
42114
42324
  draft: ActorVoiceDraftSchema,
42115
- requestKey: z160.string().trim().min(1).max(128),
42116
- acceptedQuoteId: z160.string().trim().min(1).max(128)
42325
+ requestKey: z161.string().trim().min(1).max(128),
42326
+ acceptedQuoteId: z161.string().trim().min(1).max(128)
42117
42327
  },
42118
42328
  annotations: CREATES_PAID
42119
42329
  }, async ({ actorId, ...body }) => safe(api.postJson(`/v1/actors/${encodeURIComponent(actorId)}/voice/previews`, body)));
@@ -42121,7 +42331,7 @@ function registerActorTools(server, api) {
42121
42331
  description: actorVoiceGuidance.get.summary,
42122
42332
  inputSchema: {
42123
42333
  ...actor,
42124
- candidateId: z160.string().min(1).max(64)
42334
+ candidateId: z161.string().min(1).max(64)
42125
42335
  },
42126
42336
  // Polling can resume the first paid submission of an accepted quote.
42127
42337
  // The immutable candidate/operation key keeps recovery idempotent.
@@ -42134,16 +42344,16 @@ function registerActorTools(server, api) {
42134
42344
  description: actorVoiceGuidance.approve.summary,
42135
42345
  inputSchema: {
42136
42346
  ...actor,
42137
- candidateId: z160.string().min(1).max(64),
42138
- expectedRevision: z160.number().int().positive(),
42139
- expectedApprovedRevision: z160.number().int().positive().nullable().optional()
42347
+ candidateId: z161.string().min(1).max(64),
42348
+ expectedRevision: z161.number().int().positive(),
42349
+ expectedApprovedRevision: z161.number().int().positive().nullable().optional()
42140
42350
  },
42141
42351
  // Replaces the selected voice and withdraws the old catalog grants.
42142
42352
  annotations: OVERWRITES_INTERNAL
42143
42353
  }, async ({ actorId, ...body }) => safe(api.postJson(`/v1/actors/${encodeURIComponent(actorId)}/voice/approve`, body)));
42144
42354
  server.registerTool("list_actors", {
42145
42355
  description: listActorsGuidance.summary + " Devuelve id, nombre, descripci\xF3n, g\xE9nero y voz privada del personaje. Cuando el personaje tiene una voz personalizada, `voice.identityId` y `voice.revision` identifican la versi\xF3n aprobada \u2014 conserva la revisi\xF3n al llamar `approve_actor_voice` (expectedApprovedRevision) para reemplazarla. Los IDs de proveedor nunca se exponen por MCP. Usa el `id` como `actorId` al crear o editar una tarea. Solo aparecen los personajes listos para usar; si la lista est\xE1 vac\xEDa, dile al usuario que cree uno en productmaker.app antes de intentar asignarlo. No modifica nada.",
42146
- inputSchema: z160.object({}).shape,
42356
+ inputSchema: z161.object({}).shape,
42147
42357
  annotations: READS_INTERNAL
42148
42358
  }, async () => {
42149
42359
  try {
@@ -42176,7 +42386,7 @@ function registerActorTools(server, api) {
42176
42386
  __name(registerActorTools, "registerActorTools");
42177
42387
 
42178
42388
  // src/tools/publish.ts
42179
- import { z as z161 } from "zod";
42389
+ import { z as z162 } from "zod";
42180
42390
 
42181
42391
  // src/tools/meta-publish-attempt-id.ts
42182
42392
  var META_PUBLISH_NAMESPACE = "7b19c9ac-b4eb-4db1-970e-c2f24ce30b98";
@@ -42215,47 +42425,47 @@ var publishToShopifyGuidance = getProductMakerCapabilityModelGuidance("publish_t
42215
42425
  var publishToMetaGuidance = getProductMakerCapabilityModelGuidance("publish_to_meta");
42216
42426
  var publishCreativesToMetaGuidance = getProductMakerCapabilityModelGuidance("publish_creatives_to_meta");
42217
42427
  var publishToTikTokGuidance = getProductMakerCapabilityModelGuidance("publish_to_tiktok");
42218
- var ShopifyInput = z161.object({
42219
- taskId: z161.string().min(1),
42220
- shopDomain: z161.string().min(1),
42428
+ var ShopifyInput = z162.object({
42429
+ taskId: z162.string().min(1),
42430
+ shopDomain: z162.string().min(1),
42221
42431
  /** Override: number of landing images to include. Default = ALL images the
42222
42432
  * task generated (the MCP fetches /v1/results first to count). Bounded
42223
42433
  * generously here; the backend validates each index against
42224
42434
  * landing.images.length and rejects out-of-range. */
42225
- numLandingImages: z161.number().int().min(1).max(20).optional(),
42226
- variantIndex: z161.number().int().min(0).optional(),
42435
+ numLandingImages: z162.number().int().min(1).max(20).optional(),
42436
+ variantIndex: z162.number().int().min(0).optional(),
42227
42437
  /** ASK THE USER before setting: "¿Tu producto tiene variantes (talla, color, etc.)?".
42228
42438
  * When true, the landing renders variant-picker pills; when false, it ships
42229
42439
  * a single-option product page. Defaults to false. */
42230
- showVariantPicker: z161.boolean().optional(),
42440
+ showVariantPicker: z162.boolean().optional(),
42231
42441
  /** Default `auto` updates the product previously published for this task and
42232
42442
  * shop. Use `existing` with targetProductId to choose another product, or
42233
42443
  * `new` only when the user explicitly wants a duplicate/new listing. */
42234
- publicationMode: z161.enum([
42444
+ publicationMode: z162.enum([
42235
42445
  "auto",
42236
42446
  "existing",
42237
42447
  "new"
42238
42448
  ]).optional(),
42239
42449
  /** Shopify product GID, numeric id, or admin product URL. Required when
42240
42450
  * publicationMode is `existing`. */
42241
- targetProductId: z161.string().trim().min(1).max(300).optional(),
42451
+ targetProductId: z162.string().trim().min(1).max(300).optional(),
42242
42452
  /** Add an announcement bar text above add-to-cart (optional). */
42243
- announcementBarEnabled: z161.boolean().optional(),
42244
- announcementBarText: z161.string().trim().min(1).max(SHOPIFY_ANNOUNCEMENT_BAR_MAX_LENGTH).optional(),
42453
+ announcementBarEnabled: z162.boolean().optional(),
42454
+ announcementBarText: z162.string().trim().min(1).max(SHOPIFY_ANNOUNCEMENT_BAR_MAX_LENGTH).optional(),
42245
42455
  /** Default true: publish the task's QA-passed landing GIF, as the web
42246
42456
  * editor does when the seller keeps it selected. false omits it. */
42247
- includeLandingGif: z161.boolean().optional(),
42457
+ includeLandingGif: z162.boolean().optional(),
42248
42458
  /** Classic landings only: the seller's pixel choice from
42249
42459
  * `list_shopify_landing_pixels`. Omit to keep the store's remembered
42250
42460
  * choice (theme pixels checked). */
42251
42461
  landingPixels: LandingPixelSelection.optional().describe("P\xEDxeles de la landing cl\xE1sica: deselectedKeys = keys que la persona desmarc\xF3, selectedKeys = keys que quiere dejar, manual = TODOS los p\xEDxeles escritos a mano que deben seguir guardados ({provider: meta|tiktok, pixelId}): copia los de source=manual de list_shopify_landing_pixels y suma los nuevos; uno desmarcado sigue en manual y su key va en deselectedKeys; omite manual para no tocar los guardados. Solo con lo que la persona eligi\xF3 tras ver list_shopify_landing_pixels; omite landingPixels para mantener lo guardado."),
42252
42462
  commerceCorrection: PublishCommerceCorrectionSchema.optional().describe("Complete seller-confirmed commerce values, with the revision and fingerprint returned in recovery. Never invent missing prices or convert currency."),
42253
- confirmed: z161.boolean().optional().describe("Required as true only when submitting commerceCorrection, after showing its values and obtaining explicit seller confirmation.")
42463
+ confirmed: z162.boolean().optional().describe("Required as true only when submitting commerceCorrection, after showing its values and obtaining explicit seller confirmation.")
42254
42464
  });
42255
42465
  var ShopifyInputWithAnnouncementBarValidation = ShopifyInput.superRefine((value, ctx) => {
42256
42466
  if (value.commerceCorrection && value.confirmed !== true) {
42257
42467
  ctx.addIssue({
42258
- code: z161.ZodIssueCode.custom,
42468
+ code: z162.ZodIssueCode.custom,
42259
42469
  path: [
42260
42470
  "confirmed"
42261
42471
  ],
@@ -42264,7 +42474,7 @@ var ShopifyInputWithAnnouncementBarValidation = ShopifyInput.superRefine((value,
42264
42474
  }
42265
42475
  if (value.announcementBarEnabled && !value.announcementBarText) {
42266
42476
  ctx.addIssue({
42267
- code: z161.ZodIssueCode.custom,
42477
+ code: z162.ZodIssueCode.custom,
42268
42478
  path: [
42269
42479
  "announcementBarText"
42270
42480
  ],
@@ -42273,7 +42483,7 @@ var ShopifyInputWithAnnouncementBarValidation = ShopifyInput.superRefine((value,
42273
42483
  }
42274
42484
  if (!value.announcementBarEnabled && value.announcementBarText) {
42275
42485
  ctx.addIssue({
42276
- code: z161.ZodIssueCode.custom,
42486
+ code: z162.ZodIssueCode.custom,
42277
42487
  path: [
42278
42488
  "announcementBarText"
42279
42489
  ],
@@ -42287,90 +42497,90 @@ function parseShopifyInput(rawInput) {
42287
42497
  return parsed.data;
42288
42498
  }
42289
42499
  __name(parseShopifyInput, "parseShopifyInput");
42290
- var McpCampaignConfig = z161.object({
42500
+ var McpCampaignConfig = z162.object({
42291
42501
  /** Legacy USD amount. Meta retains its existing conversion; the TikTok
42292
42502
  * schema below restricts this input to USD advertiser accounts. */
42293
- dailyBudgetUsd: z161.number().positive().optional(),
42503
+ dailyBudgetUsd: z162.number().positive().optional(),
42294
42504
  /** ISO-3166-1 alpha-2 country codes or resolvable names (CountryIso2Schema
42295
42505
  * normalizes at validation). Meta accepts max 1 (single-country ad set).
42296
42506
  * TikTok takes only the first entry. */
42297
- targetCountries: z161.array(CountryIso2Schema).max(1).optional(),
42298
- campaignName: z161.string().trim().min(1).max(100).optional()
42507
+ targetCountries: z162.array(CountryIso2Schema).max(1).optional(),
42508
+ campaignName: z162.string().trim().min(1).max(100).optional()
42299
42509
  });
42300
42510
  var McpAdAccountId = MetaAdAccountId.describe('Meta ad account id. Accepts "act_1234567890" or the bare numeric id "1234567890".');
42301
- var MetaInput = z161.object({
42302
- taskId: z161.string().min(1),
42511
+ var MetaInput = z162.object({
42512
+ taskId: z162.string().min(1),
42303
42513
  /** Exact Meta Business portfolio selected from `list_meta_destinations`. */
42304
- portfolioId: z161.string().trim().min(1),
42514
+ portfolioId: z162.string().trim().min(1),
42305
42515
  /** Exact Facebook Page selected from `list_meta_destinations`. */
42306
- pageId: z161.string().trim().min(1),
42516
+ pageId: z162.string().trim().min(1),
42307
42517
  adAccountId: McpAdAccountId,
42308
- pixelId: z161.string().min(1).optional(),
42309
- landingUrl: z161.string().url().optional(),
42518
+ pixelId: z162.string().min(1).optional(),
42519
+ landingUrl: z162.string().url().optional(),
42310
42520
  /** Select which angles to publish by 0-based index. Omit to publish all
42311
42521
  * successful angles. Example: a task with 3 angles → `[0,2]` publishes #0 + #2. */
42312
- angleIndexes: z161.array(z161.number().int().nonnegative()).optional(),
42522
+ angleIndexes: z162.array(z162.number().int().nonnegative()).optional(),
42313
42523
  campaignConfig: McpCampaignConfig.optional(),
42314
42524
  /** Override the ad's primary text (body copy). If omitted, ProductMaker
42315
42525
  * uses the auto-generated copy attached to the task. Capped at 500 chars
42316
42526
  * (Meta's primary-text limit). */
42317
- primaryText: z161.string().trim().min(1).max(500).optional(),
42527
+ primaryText: z162.string().trim().min(1).max(500).optional(),
42318
42528
  /** Optional WhatsApp number. When set, the ad button opens a WhatsApp chat
42319
42529
  * (wa.me) instead of a landing page. */
42320
- phoneNumber: z161.string().min(8).max(32).optional()
42530
+ phoneNumber: z162.string().min(8).max(32).optional()
42321
42531
  });
42322
- var GroupedTaskSource = z161.object({
42323
- type: z161.literal("task"),
42324
- taskId: z161.string().min(1),
42325
- angleIndex: z161.number().int().min(0).optional(),
42326
- videoVariant: z161.enum([
42532
+ var GroupedTaskSource = z162.object({
42533
+ type: z162.literal("task"),
42534
+ taskId: z162.string().min(1),
42535
+ angleIndex: z162.number().int().min(0).optional(),
42536
+ videoVariant: z162.enum([
42327
42537
  "with_subtitles",
42328
42538
  "without_subtitles"
42329
42539
  ]).optional(),
42330
- imageVariantIndex: z161.number().int().min(0).optional()
42331
- });
42332
- var GroupedMediaSource = z161.object({
42333
- type: z161.literal("media"),
42334
- url: z161.string().url().optional().describe("Public HTTPS media URL. For a file on the user laptop, use request_media_upload on the hosted MCP instead."),
42335
- path: z161.string().min(1).optional().describe('Local file path only when this MCP runs over stdio. On the hosted MCP, call request_media_upload and then use source.type="asset".'),
42336
- thumbnailUrl: z161.string().url().optional(),
42337
- thumbnailPath: z161.string().min(1).optional()
42540
+ imageVariantIndex: z162.number().int().min(0).optional()
42541
+ });
42542
+ var GroupedMediaSource = z162.object({
42543
+ type: z162.literal("media"),
42544
+ url: z162.string().url().optional().describe("Public HTTPS media URL. For a file on the user laptop, use request_media_upload on the hosted MCP instead."),
42545
+ path: z162.string().min(1).optional().describe('Local file path only when this MCP runs over stdio. On the hosted MCP, call request_media_upload and then use source.type="asset".'),
42546
+ thumbnailUrl: z162.string().url().optional(),
42547
+ thumbnailPath: z162.string().min(1).optional()
42338
42548
  }).refine((value) => Boolean(value.url) !== Boolean(value.path), {
42339
42549
  message: "media source needs exactly one of `url` or `path`"
42340
42550
  }).refine((value) => !(value.thumbnailUrl && value.thumbnailPath), {
42341
42551
  message: "media source needs at most one of `thumbnailUrl` or `thumbnailPath`"
42342
42552
  });
42343
- var GroupedUploadedAssetSource = z161.object({
42344
- type: z161.literal("asset"),
42553
+ var GroupedUploadedAssetSource = z162.object({
42554
+ type: z162.literal("asset"),
42345
42555
  /** Returned by check_media_upload. ProductMaker resolves ownership server-side. */
42346
- assetId: z161.string().guid(),
42347
- thumbnailAssetId: z161.string().guid().optional()
42556
+ assetId: z162.string().guid(),
42557
+ thumbnailAssetId: z162.string().guid().optional()
42348
42558
  });
42349
- var GroupedCreative = z161.object({
42350
- type: z161.enum([
42559
+ var GroupedCreative = z162.object({
42560
+ type: z162.enum([
42351
42561
  "image",
42352
42562
  "video"
42353
42563
  ]),
42354
- source: z161.union([
42564
+ source: z162.union([
42355
42565
  GroupedTaskSource,
42356
42566
  GroupedMediaSource,
42357
42567
  GroupedUploadedAssetSource
42358
42568
  ]),
42359
- title: z161.string().max(120).optional(),
42360
- description: z161.string().max(500).optional(),
42569
+ title: z162.string().max(120).optional(),
42570
+ description: z162.string().max(500).optional(),
42361
42571
  cta: MetaCtaType.optional(),
42362
- creativeId: z161.string().min(1).optional()
42572
+ creativeId: z162.string().min(1).optional()
42363
42573
  });
42364
- var GroupedCampaignConfigBase = z161.object({
42574
+ var GroupedCampaignConfigBase = z162.object({
42365
42575
  campaignType: MetaCampaignType.default("sales"),
42366
42576
  optimizationMode: MetaOptimizationMode.default("advantage_plus"),
42367
42577
  budgetMode: MetaBudgetMode.optional(),
42368
- campaignDailyBudget: z161.number().int().positive().optional(),
42369
- adSets: z161.array(z161.object({
42370
- tempId: z161.string().min(1).max(80),
42371
- name: z161.string().min(1).max(100),
42372
- dailyBudget: z161.number().int().positive().optional(),
42373
- creativeIds: z161.array(z161.string().min(1)).min(1)
42578
+ campaignDailyBudget: z162.number().int().positive().optional(),
42579
+ adSets: z162.array(z162.object({
42580
+ tempId: z162.string().min(1).max(80),
42581
+ name: z162.string().min(1).max(100),
42582
+ dailyBudget: z162.number().int().positive().optional(),
42583
+ creativeIds: z162.array(z162.string().min(1)).min(1)
42374
42584
  })).min(1).max(CAMPAIGN_LIMITS.MAX_AD_SETS),
42375
42585
  /**
42376
42586
  * Valid values are 'landing' and 'whatsapp' — there is no 'website'. This
@@ -42378,17 +42588,17 @@ var GroupedCampaignConfigBase = z161.object({
42378
42588
  * opaque `invalid_literal` and made the WhatsApp destination — supported by
42379
42589
  * the API since #849 — unreachable from this tool.
42380
42590
  */
42381
- destination: z161.discriminatedUnion("type", [
42382
- z161.object({
42383
- type: z161.literal("landing"),
42384
- landingUrl: z161.string().url()
42591
+ destination: z162.discriminatedUnion("type", [
42592
+ z162.object({
42593
+ type: z162.literal("landing"),
42594
+ landingUrl: z162.string().url()
42385
42595
  }),
42386
- z161.object({
42387
- type: z161.literal("whatsapp"),
42388
- phoneNumber: z161.string().min(8).max(32)
42596
+ z162.object({
42597
+ type: z162.literal("whatsapp"),
42598
+ phoneNumber: z162.string().min(8).max(32)
42389
42599
  })
42390
42600
  ]),
42391
- saveAsDefault: z161.boolean().default(false),
42601
+ saveAsDefault: z162.boolean().default(false),
42392
42602
  budgetPolicy: MetaBudgetPolicy.optional()
42393
42603
  });
42394
42604
  function resolveBudgetMode(value) {
@@ -42402,7 +42612,7 @@ var GroupedCampaignConfig = GroupedCampaignConfigBase.superRefine((value, ctx) =
42402
42612
  const budgetMode = resolveBudgetMode(value);
42403
42613
  if (budgetMode === "campaign" && value.campaignDailyBudget === void 0) {
42404
42614
  ctx.addIssue({
42405
- code: z161.ZodIssueCode.custom,
42615
+ code: z162.ZodIssueCode.custom,
42406
42616
  path: [
42407
42617
  "campaignDailyBudget"
42408
42618
  ],
@@ -42413,7 +42623,7 @@ var GroupedCampaignConfig = GroupedCampaignConfigBase.superRefine((value, ctx) =
42413
42623
  value.adSets.forEach((adSet, index) => {
42414
42624
  if (adSet.dailyBudget === void 0) {
42415
42625
  ctx.addIssue({
42416
- code: z161.ZodIssueCode.custom,
42626
+ code: z162.ZodIssueCode.custom,
42417
42627
  path: [
42418
42628
  "adSets",
42419
42629
  index,
@@ -42428,25 +42638,25 @@ var GroupedCampaignConfig = GroupedCampaignConfigBase.superRefine((value, ctx) =
42428
42638
  ...value,
42429
42639
  budgetMode: resolveBudgetMode(value)
42430
42640
  }));
42431
- var PublishCreativesToMetaInputBase = z161.object({
42432
- creatives: z161.array(GroupedCreative).min(1).max(CAMPAIGN_LIMITS.MAX_CREATIVES),
42641
+ var PublishCreativesToMetaInputBase = z162.object({
42642
+ creatives: z162.array(GroupedCreative).min(1).max(CAMPAIGN_LIMITS.MAX_CREATIVES),
42433
42643
  /** Exact Meta Business portfolio selected from `list_meta_destinations`. */
42434
- portfolioId: z161.string().trim().min(1),
42644
+ portfolioId: z162.string().trim().min(1),
42435
42645
  /** Exact Facebook Page selected from `list_meta_destinations`. */
42436
- pageId: z161.string().trim().min(1),
42646
+ pageId: z162.string().trim().min(1),
42437
42647
  adAccountId: McpAdAccountId,
42438
- pixelId: z161.string().min(1).optional(),
42648
+ pixelId: z162.string().min(1).optional(),
42439
42649
  /** Required unless `campaignConfig.destination` is whatsapp or a creative
42440
42650
  * comes from a task (the API then lands on the published service landing
42441
42651
  * of its service tasks) — see the superRefine below. Mirrors the API's
42442
42652
  * `FacebookCreateCampaignFromTasksBodySchema`. */
42443
- landingUrl: z161.string().url().optional(),
42653
+ landingUrl: z162.string().url().optional(),
42444
42654
  /** ISO-2 code or resolvable country name — mirrors the API contract
42445
42655
  * (CountryIso2Schema), which normalizes names to alpha-2 at validation.
42446
42656
  * Omitted: the brand country of its service tasks (the API answers
42447
42657
  * META_NO_TARGET_COUNTRY when it has none); "US" for products. */
42448
42658
  targetCountry: CountryIso2Schema.optional(),
42449
- campaignName: z161.string().trim().min(1).max(100),
42659
+ campaignName: z162.string().trim().min(1).max(100),
42450
42660
  campaignConfig: GroupedCampaignConfig.optional()
42451
42661
  });
42452
42662
  var PublishCreativesToMetaInput = PublishCreativesToMetaInputBase.superRefine((value, ctx) => {
@@ -42454,7 +42664,7 @@ var PublishCreativesToMetaInput = PublishCreativesToMetaInputBase.superRefine((v
42454
42664
  const hasTaskCreative = value.creatives.some((creative) => creative.source.type === "task");
42455
42665
  if (destination?.type !== "whatsapp" && destination?.type !== "landing" && !value.landingUrl && !hasTaskCreative) {
42456
42666
  ctx.addIssue({
42457
- code: z161.ZodIssueCode.custom,
42667
+ code: z162.ZodIssueCode.custom,
42458
42668
  path: [
42459
42669
  "landingUrl"
42460
42670
  ],
@@ -42463,7 +42673,7 @@ var PublishCreativesToMetaInput = PublishCreativesToMetaInputBase.superRefine((v
42463
42673
  }
42464
42674
  if (destination?.type === "landing" && value.landingUrl && destination.landingUrl !== value.landingUrl) {
42465
42675
  ctx.addIssue({
42466
- code: z161.ZodIssueCode.custom,
42676
+ code: z162.ZodIssueCode.custom,
42467
42677
  path: [
42468
42678
  "campaignConfig",
42469
42679
  "destination",
@@ -42482,16 +42692,16 @@ var PublishCreativesToMetaInput = PublishCreativesToMetaInputBase.superRefine((v
42482
42692
  }
42483
42693
  return value;
42484
42694
  });
42485
- var PresignUploadResponseSchema = z161.object({
42486
- uploadUrl: z161.string().url().refine((value) => {
42695
+ var PresignUploadResponseSchema = z162.object({
42696
+ uploadUrl: z162.string().url().refine((value) => {
42487
42697
  const url3 = new URL(value);
42488
42698
  return !url3.username && !url3.password && url3.protocol === "https:";
42489
42699
  }, "presigned upload URL must be HTTPS without embedded credentials"),
42490
- publicUrl: z161.string().url().refine((value) => {
42700
+ publicUrl: z162.string().url().refine((value) => {
42491
42701
  const url3 = new URL(value);
42492
42702
  return !url3.username && !url3.password;
42493
42703
  }, "public media URL must not contain embedded credentials"),
42494
- stagingAssetId: z161.string().guid()
42704
+ stagingAssetId: z162.string().guid()
42495
42705
  });
42496
42706
  async function uploadResolvedMedia(api, media, assetRole) {
42497
42707
  if (!media.buffer) throw new ResolveMediaError("INVALID_INPUT", "resolved media has no bytes");
@@ -42517,14 +42727,14 @@ async function resolveAndUploadMedia(api, ref, expectedKind, assetRole, transpor
42517
42727
  }
42518
42728
  __name(resolveAndUploadMedia, "resolveAndUploadMedia");
42519
42729
  var TikTokMcpCampaignConfig = McpCampaignConfig.extend({
42520
- dailyBudgetUsd: z161.number().finite().positive().optional().describe("Legacy USD amount, supported only for USD advertiser accounts. No FX conversion."),
42521
- dailyBudget: z161.number().finite().positive().optional().describe("Daily budget in the selected advertiser currency major units; pass budgetCurrency together."),
42730
+ dailyBudgetUsd: z162.number().finite().positive().optional().describe("Legacy USD amount, supported only for USD advertiser accounts. No FX conversion."),
42731
+ dailyBudget: z162.number().finite().positive().optional().describe("Daily budget in the selected advertiser currency major units; pass budgetCurrency together."),
42522
42732
  budgetCurrency: TikTokBudgetCurrencySchema.optional(),
42523
42733
  destination: TikTokCampaignDestinationSchema.optional()
42524
42734
  }).superRefine((value, ctx) => {
42525
42735
  if (value.dailyBudgetUsd !== void 0 && (value.dailyBudget !== void 0 || value.budgetCurrency !== void 0)) {
42526
42736
  ctx.addIssue({
42527
- code: z161.ZodIssueCode.custom,
42737
+ code: z162.ZodIssueCode.custom,
42528
42738
  path: [
42529
42739
  "dailyBudgetUsd"
42530
42740
  ],
@@ -42533,7 +42743,7 @@ var TikTokMcpCampaignConfig = McpCampaignConfig.extend({
42533
42743
  }
42534
42744
  if (value.dailyBudget !== void 0 !== (value.budgetCurrency !== void 0)) {
42535
42745
  ctx.addIssue({
42536
- code: z161.ZodIssueCode.custom,
42746
+ code: z162.ZodIssueCode.custom,
42537
42747
  path: [
42538
42748
  "budgetCurrency"
42539
42749
  ],
@@ -42541,16 +42751,16 @@ var TikTokMcpCampaignConfig = McpCampaignConfig.extend({
42541
42751
  });
42542
42752
  }
42543
42753
  });
42544
- var TikTokInput = z161.object({
42545
- taskId: z161.string().min(1),
42546
- advertiserId: z161.string().min(1),
42547
- pixelId: z161.string().min(1).optional(),
42548
- landingUrl: z161.string().url().optional(),
42549
- angleIndexes: z161.array(z161.number().int().nonnegative()).optional(),
42754
+ var TikTokInput = z162.object({
42755
+ taskId: z162.string().min(1),
42756
+ advertiserId: z162.string().min(1),
42757
+ pixelId: z162.string().min(1).optional(),
42758
+ landingUrl: z162.string().url().optional(),
42759
+ angleIndexes: z162.array(z162.number().int().nonnegative()).optional(),
42550
42760
  campaignConfig: TikTokMcpCampaignConfig.optional(),
42551
42761
  /** Override the ad's description (TikTok's body copy). If omitted,
42552
42762
  * ProductMaker uses the auto-generated copy attached to the task. */
42553
- primaryText: z161.string().trim().min(1).max(500).optional()
42763
+ primaryText: z162.string().trim().min(1).max(500).optional()
42554
42764
  });
42555
42765
  function registerPublishTools(server, api, opts = {}) {
42556
42766
  const transport = opts.transport ?? "http";
@@ -43001,40 +43211,40 @@ __name(toTikTokCampaignConfig, "toTikTokCampaignConfig");
43001
43211
 
43002
43212
  // src/tools/meta-upload.ts
43003
43213
  import { registerAppTool } from "@modelcontextprotocol/ext-apps/server";
43004
- import { z as z162 } from "zod";
43214
+ import { z as z163 } from "zod";
43005
43215
  var requestMediaUploadGuidance = getProductMakerCapabilityModelGuidance("request_media_upload");
43006
43216
  var checkMediaUploadGuidance = getProductMakerCapabilityModelGuidance("check_media_upload");
43007
- var UploadSessionInputBase = z162.object({
43008
- mediaKind: z162.enum([
43217
+ var UploadSessionInputBase = z163.object({
43218
+ mediaKind: z163.enum([
43009
43219
  "image",
43010
43220
  "video",
43011
43221
  "mixed"
43012
43222
  ]).default("mixed").describe("The kind of file the user will select. Use image for product references and landing pages, video for a single video, and mixed only when the consumer supports both."),
43013
- assetRole: z162.enum([
43223
+ assetRole: z163.enum([
43014
43224
  "media",
43015
43225
  "thumbnail"
43016
43226
  ]).default("media").describe("Use media for the creative itself; thumbnail only for an image thumbnail."),
43017
- uploadPurpose: z162.enum([
43227
+ uploadPurpose: z163.enum([
43018
43228
  "product_reference",
43019
43229
  "creative",
43020
43230
  "generic"
43021
43231
  ]).default("generic").describe("The user's purpose for these files. Use product_reference for a product photo used by tasks or landings, creative for media that will become an ad or creative, and generic only when neither applies."),
43022
- maxFiles: z162.number().int().min(1).max(10).optional().describe("Optional batch limit: image accepts 1-5, video exactly 1, and mixed 1-10.")
43232
+ maxFiles: z163.number().int().min(1).max(10).optional().describe("Optional batch limit: image accepts 1-5, video exactly 1, and mixed 1-10.")
43023
43233
  });
43024
- var OpenAiFileReference = z162.object({
43025
- download_url: z162.string().url().describe("Required by ChatGPT's openai/fileParams schema. The App prefers getFileDownloadUrl(file_id) for a fresh URL, and the server never fetches this value."),
43026
- file_id: z162.string().min(1),
43027
- mime_type: z162.string().min(1).optional(),
43028
- file_name: z162.string().min(1).optional()
43234
+ var OpenAiFileReference = z163.object({
43235
+ download_url: z163.string().url().describe("Required by ChatGPT's openai/fileParams schema. The App prefers getFileDownloadUrl(file_id) for a fresh URL, and the server never fetches this value."),
43236
+ file_id: z163.string().min(1),
43237
+ mime_type: z163.string().min(1).optional(),
43238
+ file_name: z163.string().min(1).optional()
43029
43239
  });
43030
43240
  var UploadSessionToolInputShape = {
43031
43241
  ...UploadSessionInputBase.shape,
43032
- files: z162.array(OpenAiFileReference).max(10).optional().describe("Optional OpenAI-hosted file references provided by ChatGPT. They are only metadata for the UI bridge and are never forwarded to ProductMaker.")
43242
+ files: z163.array(OpenAiFileReference).max(10).optional().describe("Optional OpenAI-hosted file references provided by ChatGPT. They are only metadata for the UI bridge and are never forwarded to ProductMaker.")
43033
43243
  };
43034
- var UploadSessionToolInput = z162.object(UploadSessionToolInputShape).superRefine((value, ctx) => {
43244
+ var UploadSessionToolInput = z163.object(UploadSessionToolInputShape).superRefine((value, ctx) => {
43035
43245
  if (value.assetRole === "thumbnail" && value.mediaKind !== "image") {
43036
43246
  ctx.addIssue({
43037
- code: z162.ZodIssueCode.custom,
43247
+ code: z163.ZodIssueCode.custom,
43038
43248
  path: [
43039
43249
  "mediaKind"
43040
43250
  ],
@@ -43043,7 +43253,7 @@ var UploadSessionToolInput = z162.object(UploadSessionToolInputShape).superRefin
43043
43253
  }
43044
43254
  if (value.mediaKind === "video" && value.maxFiles !== void 0 && value.maxFiles !== 1) {
43045
43255
  ctx.addIssue({
43046
- code: z162.ZodIssueCode.custom,
43256
+ code: z163.ZodIssueCode.custom,
43047
43257
  path: [
43048
43258
  "maxFiles"
43049
43259
  ],
@@ -43052,7 +43262,7 @@ var UploadSessionToolInput = z162.object(UploadSessionToolInputShape).superRefin
43052
43262
  }
43053
43263
  if (value.mediaKind === "image" && (value.maxFiles ?? 1) > 5) {
43054
43264
  ctx.addIssue({
43055
- code: z162.ZodIssueCode.custom,
43265
+ code: z163.ZodIssueCode.custom,
43056
43266
  path: [
43057
43267
  "maxFiles"
43058
43268
  ],
@@ -43060,38 +43270,38 @@ var UploadSessionToolInput = z162.object(UploadSessionToolInputShape).superRefin
43060
43270
  });
43061
43271
  }
43062
43272
  });
43063
- var UploadSessionResponse = z162.object({
43064
- sessionId: z162.string().guid(),
43065
- uploadPageUrl: z162.string().url(),
43066
- mediaKind: z162.enum([
43273
+ var UploadSessionResponse = z163.object({
43274
+ sessionId: z163.string().guid(),
43275
+ uploadPageUrl: z163.string().url(),
43276
+ mediaKind: z163.enum([
43067
43277
  "image",
43068
43278
  "video",
43069
43279
  "mixed"
43070
43280
  ]),
43071
- assetRole: z162.enum([
43281
+ assetRole: z163.enum([
43072
43282
  "media",
43073
43283
  "thumbnail"
43074
43284
  ]),
43075
- maxFiles: z162.number().int().positive(),
43076
- expiresAt: z162.string().datetime()
43285
+ maxFiles: z163.number().int().positive(),
43286
+ expiresAt: z163.string().datetime()
43077
43287
  });
43078
- var UploadStatusInput = z162.object({
43079
- sessionId: z162.string().guid().describe("The sessionId returned by request_media_upload.")
43288
+ var UploadStatusInput = z163.object({
43289
+ sessionId: z163.string().guid().describe("The sessionId returned by request_media_upload.")
43080
43290
  });
43081
- var UniversalUploadStatusResponse = z162.discriminatedUnion("status", [
43082
- z162.object({
43083
- status: z162.literal("pending"),
43084
- assets: z162.array(z162.never()).length(0)
43291
+ var UniversalUploadStatusResponse = z163.discriminatedUnion("status", [
43292
+ z163.object({
43293
+ status: z163.literal("pending"),
43294
+ assets: z163.array(z163.never()).length(0)
43085
43295
  }),
43086
- z162.object({
43087
- status: z162.literal("uploaded"),
43088
- assets: z162.array(z162.object({
43089
- assetId: z162.string().guid(),
43090
- mediaKind: z162.enum([
43296
+ z163.object({
43297
+ status: z163.literal("uploaded"),
43298
+ assets: z163.array(z163.object({
43299
+ assetId: z163.string().guid(),
43300
+ mediaKind: z163.enum([
43091
43301
  "image",
43092
43302
  "video"
43093
43303
  ]),
43094
- assetRole: z162.enum([
43304
+ assetRole: z163.enum([
43095
43305
  "media",
43096
43306
  "thumbnail"
43097
43307
  ])
@@ -43099,13 +43309,13 @@ var UniversalUploadStatusResponse = z162.discriminatedUnion("status", [
43099
43309
  })
43100
43310
  ]);
43101
43311
  var UniversalUploadStructuredResponse = UploadSessionResponse.extend({
43102
- uploadPurpose: z162.enum([
43312
+ uploadPurpose: z163.enum([
43103
43313
  "product_reference",
43104
43314
  "creative",
43105
43315
  "generic"
43106
43316
  ]),
43107
- checkToolName: z162.literal("check_media_upload"),
43108
- resolveEndpoint: z162.string().url()
43317
+ checkToolName: z163.literal("check_media_upload"),
43318
+ resolveEndpoint: z163.string().url()
43109
43319
  });
43110
43320
  function contextualizeUploadPageUrl(uploadPageUrl, uploadPurpose) {
43111
43321
  const url3 = new URL(uploadPageUrl);
@@ -43196,15 +43406,15 @@ function registerMediaUploadTools(server, api) {
43196
43406
  __name(registerMediaUploadTools, "registerMediaUploadTools");
43197
43407
 
43198
43408
  // src/tools/campaigns.ts
43199
- import { z as z163 } from "zod";
43409
+ import { z as z164 } from "zod";
43200
43410
  var getMetaCampaignStatusGuidance = getProductMakerCapabilityModelGuidance("get_meta_campaign_status");
43201
43411
  var getTikTokCampaignStatusGuidance = getProductMakerCapabilityModelGuidance("get_tiktok_campaign_status");
43202
- var MetaStatusInput = z163.object({
43203
- campaignId: z163.string().min(1).describe("Meta campaign ID returned by publish_to_meta.")
43412
+ var MetaStatusInput = z164.object({
43413
+ campaignId: z164.string().min(1).describe("Meta campaign ID returned by publish_to_meta.")
43204
43414
  });
43205
- var TikTokStatusInput = z163.object({
43206
- campaignId: z163.string().min(1).describe("TikTok campaign ID returned by publish_to_tiktok."),
43207
- advertiserId: z163.string().min(1).describe("The same advertiserId used to publish the campaign.")
43415
+ var TikTokStatusInput = z164.object({
43416
+ campaignId: z164.string().min(1).describe("TikTok campaign ID returned by publish_to_tiktok."),
43417
+ advertiserId: z164.string().min(1).describe("The same advertiserId used to publish the campaign.")
43208
43418
  });
43209
43419
  function registerCampaignTools(server, api) {
43210
43420
  server.registerTool("get_meta_campaign_status", {
@@ -43309,10 +43519,10 @@ function renderTikTokStatusMarkdown(r) {
43309
43519
  __name(renderTikTokStatusMarkdown, "renderTikTokStatusMarkdown");
43310
43520
 
43311
43521
  // ../../packages/product-economics/src/product-costing.ts
43312
- import { z as z165 } from "zod";
43522
+ import { z as z166 } from "zod";
43313
43523
 
43314
43524
  // ../../packages/product-economics/src/product-costing-countries.ts
43315
- import { z as z164 } from "zod";
43525
+ import { z as z165 } from "zod";
43316
43526
 
43317
43527
  // ../../packages/product-economics/src/product-costing-shipping-references.json
43318
43528
  var product_costing_shipping_references_default = {
@@ -43376,21 +43586,21 @@ var product_costing_shipping_references_default = {
43376
43586
  };
43377
43587
 
43378
43588
  // ../../packages/product-economics/src/product-costing-countries.ts
43379
- var ShippingReferenceSchema = z164.object({
43380
- reference: z164.number().positive(),
43381
- min: z164.number().nonnegative(),
43382
- max: z164.number().positive(),
43383
- updatedAt: z164.string().date(),
43384
- confidence: z164.enum([
43589
+ var ShippingReferenceSchema = z165.object({
43590
+ reference: z165.number().positive(),
43591
+ min: z165.number().nonnegative(),
43592
+ max: z165.number().positive(),
43593
+ updatedAt: z165.string().date(),
43594
+ confidence: z165.enum([
43385
43595
  "high",
43386
43596
  "medium",
43387
43597
  "medium-low"
43388
43598
  ]),
43389
- sources: z164.array(z164.string().url().startsWith("https://")).min(1).max(3)
43599
+ sources: z165.array(z165.string().url().startsWith("https://")).min(1).max(3)
43390
43600
  }).superRefine(({ reference, min, max }, context) => {
43391
43601
  if (min > reference || reference > max) {
43392
43602
  context.addIssue({
43393
- code: z164.ZodIssueCode.custom,
43603
+ code: z165.ZodIssueCode.custom,
43394
43604
  message: "shipping_reference_outside_range",
43395
43605
  path: [
43396
43606
  "reference"
@@ -43398,7 +43608,7 @@ var ShippingReferenceSchema = z164.object({
43398
43608
  });
43399
43609
  }
43400
43610
  });
43401
- var SHIPPING_REFERENCES = z164.record(z164.string(), ShippingReferenceSchema).parse(product_costing_shipping_references_default);
43611
+ var SHIPPING_REFERENCES = z165.record(z165.string(), ShippingReferenceSchema).parse(product_costing_shipping_references_default);
43402
43612
  var PRODUCT_COSTING_COUNTRY_CODES = Object.freeze(Object.keys(SHIPPING_REFERENCES));
43403
43613
  var SPANISH_LOCALE_COUNTRIES = /* @__PURE__ */ new Set([
43404
43614
  "MX",
@@ -43580,18 +43790,18 @@ function getProductCostingCountryName(country) {
43580
43790
  __name(getProductCostingCountryName, "getProductCostingCountryName");
43581
43791
 
43582
43792
  // ../../packages/product-economics/src/product-costing.ts
43583
- var ProductCostingInputSchema = z165.object({
43584
- country: z165.string().refine(isProductCostingCountryCode, "unsupported_country"),
43585
- supplierCost: z165.number().finite().max(Number.MAX_SAFE_INTEGER, "amount_too_large").positive("supplier_cost_positive"),
43586
- shippingCost: z165.number().finite().max(Number.MAX_SAFE_INTEGER, "amount_too_large").nonnegative("shipping_cost_nonnegative"),
43587
- returnRate: z165.number().finite().min(0, "rate_nonnegative").lt(1, "rate_below_one"),
43588
- cancellationRate: z165.number().finite().min(0, "rate_nonnegative").lt(1, "rate_below_one"),
43589
- adsManagerCpa: z165.number().finite().max(Number.MAX_SAFE_INTEGER, "amount_too_large").nonnegative("cpa_nonnegative"),
43590
- desiredMargin: z165.number().finite().min(0, "margin_nonnegative").lt(1, "margin_below_one")
43793
+ var ProductCostingInputSchema = z166.object({
43794
+ country: z166.string().refine(isProductCostingCountryCode, "unsupported_country"),
43795
+ supplierCost: z166.number().finite().max(Number.MAX_SAFE_INTEGER, "amount_too_large").positive("supplier_cost_positive"),
43796
+ shippingCost: z166.number().finite().max(Number.MAX_SAFE_INTEGER, "amount_too_large").nonnegative("shipping_cost_nonnegative"),
43797
+ returnRate: z166.number().finite().min(0, "rate_nonnegative").lt(1, "rate_below_one"),
43798
+ cancellationRate: z166.number().finite().min(0, "rate_nonnegative").lt(1, "rate_below_one"),
43799
+ adsManagerCpa: z166.number().finite().max(Number.MAX_SAFE_INTEGER, "amount_too_large").nonnegative("cpa_nonnegative"),
43800
+ desiredMargin: z166.number().finite().min(0, "margin_nonnegative").lt(1, "margin_below_one")
43591
43801
  }).superRefine(({ returnRate, cancellationRate }, context) => {
43592
43802
  if (returnRate + cancellationRate >= 1) {
43593
43803
  context.addIssue({
43594
- code: z165.ZodIssueCode.custom,
43804
+ code: z166.ZodIssueCode.custom,
43595
43805
  message: "delivery_rate_positive",
43596
43806
  path: [
43597
43807
  "cancellationRate"
@@ -43688,15 +43898,15 @@ function calculateProductCosting(rawInput) {
43688
43898
  __name(calculateProductCosting, "calculateProductCosting");
43689
43899
 
43690
43900
  // src/tools/product-costing.ts
43691
- import { z as z166 } from "zod";
43901
+ import { z as z167 } from "zod";
43692
43902
  var costProductGuidance = getProductMakerCapabilityModelGuidance("cost_product");
43693
- var optionalAmount = /* @__PURE__ */ __name((description) => z166.number().finite().max(Number.MAX_SAFE_INTEGER).nonnegative().optional().describe(description), "optionalAmount");
43694
- var optionalPercent = /* @__PURE__ */ __name((description) => z166.number().finite().min(0).lt(100).optional().describe(description), "optionalPercent");
43695
- var ProductCostingToolInput = z166.object({
43696
- country: z166.string().trim().toUpperCase().refine(isProductCostingCountryCode, {
43903
+ var optionalAmount = /* @__PURE__ */ __name((description) => z167.number().finite().max(Number.MAX_SAFE_INTEGER).nonnegative().optional().describe(description), "optionalAmount");
43904
+ var optionalPercent = /* @__PURE__ */ __name((description) => z167.number().finite().min(0).lt(100).optional().describe(description), "optionalPercent");
43905
+ var ProductCostingToolInput = z167.object({
43906
+ country: z167.string().trim().toUpperCase().refine(isProductCostingCountryCode, {
43697
43907
  message: "Pa\xEDs no soportado por ProductMaker."
43698
43908
  }).optional().describe("C\xF3digo ISO-2 de cualquiera de los pa\xEDses disponibles en ProductMaker. Omite para Colombia."),
43699
- supplierCost: z166.number().finite().max(Number.MAX_SAFE_INTEGER).positive().optional().describe("Costo real de una unidad con el proveedor, en la moneda del pa\xEDs. Requerido salvo que uses supplierCostCop para Colombia."),
43909
+ supplierCost: z167.number().finite().max(Number.MAX_SAFE_INTEGER).positive().optional().describe("Costo real de una unidad con el proveedor, en la moneda del pa\xEDs. Requerido salvo que uses supplierCostCop para Colombia."),
43700
43910
  supplierCostCop: optionalAmount("Alias anterior para costo del proveedor en Colombia. Prefiere supplierCost."),
43701
43911
  shippingCost: optionalAmount("Costo de un env\xEDo en la moneda del pa\xEDs. Omite para usar el valor gu\xEDa vigente."),
43702
43912
  shippingCostCop: optionalAmount("Alias anterior para flete en Colombia. Prefiere shippingCost."),
@@ -43859,7 +44069,7 @@ function formatPercent(value) {
43859
44069
  __name(formatPercent, "formatPercent");
43860
44070
 
43861
44071
  // src/tools/product-research.ts
43862
- import { z as z167 } from "zod";
44072
+ import { z as z168 } from "zod";
43863
44073
 
43864
44074
  // src/tools/product-research-idempotency.ts
43865
44075
  var RESEARCH_IDEMPOTENCY_WINDOW_MS = 2 * 60 * 60 * 1e3;
@@ -44230,17 +44440,17 @@ var TERMINAL2 = /* @__PURE__ */ new Set([
44230
44440
  ]);
44231
44441
  var POLL_INTERVAL_MS = 5e3;
44232
44442
  var MAX_WAIT_SECONDS = 120;
44233
- var FindInput = z167.object({
44443
+ var FindInput = z168.object({
44234
44444
  targetCountry: ResearchTargetCountryEnum.describe("Pa\xEDs objetivo. S\xF3lo CO, MX, PE, EC y CL tienen cobertura de investigaci\xF3n."),
44235
44445
  categoryKey: ResearchCategoryEnum.default("auto").describe('Categor\xEDa a investigar. Usa "auto" para que la IA elija seg\xFAn el mercado.'),
44236
- confirmed: z167.boolean().describe(`Ponlo en true SOLO despu\xE9s de que el usuario haya aceptado el cargo de ${PRICE_CREDITS} cr\xE9ditos. No lo asumas.`),
44237
- waitSeconds: z167.number().int().min(0).max(MAX_WAIT_SECONDS).optional().describe("Segundos a esperar el reporte antes de devolver el runId. M\xE1ximo 120.")
44446
+ confirmed: z168.boolean().describe(`Ponlo en true SOLO despu\xE9s de que el usuario haya aceptado el cargo de ${PRICE_CREDITS} cr\xE9ditos. No lo asumas.`),
44447
+ waitSeconds: z168.number().int().min(0).max(MAX_WAIT_SECONDS).optional().describe("Segundos a esperar el reporte antes de devolver el runId. M\xE1ximo 120.")
44238
44448
  });
44239
- var GetInput = z167.object({
44240
- runId: z167.string().guid().describe("ID del run devuelto por find_winning_products.")
44449
+ var GetInput = z168.object({
44450
+ runId: z168.string().guid().describe("ID del run devuelto por find_winning_products.")
44241
44451
  });
44242
- var ListInput = z167.object({
44243
- limit: z167.number().int().min(1).max(20).default(10)
44452
+ var ListInput = z168.object({
44453
+ limit: z168.number().int().min(1).max(20).default(10)
44244
44454
  });
44245
44455
  function textResult(text4) {
44246
44456
  return {
@@ -44379,17 +44589,17 @@ _Esta llamada no cobr\xF3 cr\xE9ditos: se reutiliz\xF3 una investigaci\xF3n reci
44379
44589
  __name(registerProductResearchTools, "registerProductResearchTools");
44380
44590
 
44381
44591
  // src/tools/dropshipping-projects.ts
44382
- import { z as z168 } from "zod";
44592
+ import { z as z169 } from "zod";
44383
44593
  var startDropshippingProjectGuidance = getProductMakerCapabilityModelGuidance("start_dropshipping_project");
44384
44594
  var costDropshippingProjectGuidance = getProductMakerCapabilityModelGuidance("cost_dropshipping_project");
44385
44595
  var guideDropshippingLaunchGuidance = getProductMakerCapabilityModelGuidance("guide_dropshipping_launch");
44386
- var ProjectId = z168.string().guid();
44387
- var DropshippingProjectStatus = z168.enum([
44596
+ var ProjectId = z169.string().guid();
44597
+ var DropshippingProjectStatus = z169.enum([
44388
44598
  "active",
44389
44599
  "completed",
44390
44600
  "archived"
44391
44601
  ]);
44392
- var DropshippingProjectPhase = z168.enum([
44602
+ var DropshippingProjectPhase = z169.enum([
44393
44603
  "research",
44394
44604
  "costing",
44395
44605
  "media",
@@ -44398,21 +44608,21 @@ var DropshippingProjectPhase = z168.enum([
44398
44608
  "advertising",
44399
44609
  "complete"
44400
44610
  ]);
44401
- var DropshippingRewardMilestone = z168.enum([
44611
+ var DropshippingRewardMilestone = z169.enum([
44402
44612
  "product_selected",
44403
44613
  "costing_saved",
44404
44614
  "product_media_ready",
44405
44615
  "creatives_completed",
44406
44616
  "campaign_created"
44407
44617
  ]);
44408
- var TargetCountry = z168.enum([
44618
+ var TargetCountry = z169.enum([
44409
44619
  "CO",
44410
44620
  "MX",
44411
44621
  "PE",
44412
44622
  "EC",
44413
44623
  "CL"
44414
44624
  ]);
44415
- var ResearchCategory = z168.enum([
44625
+ var ResearchCategory = z169.enum([
44416
44626
  "auto",
44417
44627
  "automotive",
44418
44628
  "kitchen",
@@ -44427,7 +44637,7 @@ var ResearchCategory = z168.enum([
44427
44637
  "garden",
44428
44638
  "cleaning"
44429
44639
  ]);
44430
- var HttpUrl3 = z168.string().url().max(2e3).refine((value) => {
44640
+ var HttpUrl3 = z169.string().url().max(2e3).refine((value) => {
44431
44641
  try {
44432
44642
  return [
44433
44643
  "http:",
@@ -44437,45 +44647,45 @@ var HttpUrl3 = z168.string().url().max(2e3).refine((value) => {
44437
44647
  return false;
44438
44648
  }
44439
44649
  }, "URL must use HTTP(S)");
44440
- var ResearchCandidateOrigin = z168.object({
44441
- type: z168.literal("research_candidate"),
44650
+ var ResearchCandidateOrigin = z169.object({
44651
+ type: z169.literal("research_candidate"),
44442
44652
  runId: ProjectId,
44443
- candidateSourceId: z168.string().min(1).max(160)
44653
+ candidateSourceId: z169.string().min(1).max(160)
44444
44654
  });
44445
- var TaskOrigin = z168.object({
44446
- type: z168.literal("task"),
44655
+ var TaskOrigin = z169.object({
44656
+ type: z169.literal("task"),
44447
44657
  taskId: ProjectId
44448
44658
  });
44449
- var ManualOrigin = z168.object({
44450
- type: z168.literal("manual"),
44659
+ var ManualOrigin = z169.object({
44660
+ type: z169.literal("manual"),
44451
44661
  clientRequestId: ProjectId,
44452
- country: z168.string().min(2).max(3).optional()
44662
+ country: z169.string().min(2).max(3).optional()
44453
44663
  });
44454
- var StartProjectInput = z168.object({
44455
- origin: z168.discriminatedUnion("type", [
44664
+ var StartProjectInput = z169.object({
44665
+ origin: z169.discriminatedUnion("type", [
44456
44666
  ResearchCandidateOrigin,
44457
44667
  TaskOrigin,
44458
44668
  ManualOrigin
44459
44669
  ]),
44460
- productName: z168.string().trim().min(1).max(240).optional(),
44670
+ productName: z169.string().trim().min(1).max(240).optional(),
44461
44671
  productUrl: HttpUrl3.optional(),
44462
- country: z168.string().min(2).max(3).optional(),
44463
- languageCode: z168.string().min(2).max(16).optional()
44672
+ country: z169.string().min(2).max(3).optional(),
44673
+ languageCode: z169.string().min(2).max(16).optional()
44464
44674
  }).strict();
44465
- var CostProjectInput = z168.object({
44675
+ var CostProjectInput = z169.object({
44466
44676
  projectId: ProjectId,
44467
- version: z168.number().int().positive().describe("Version le\xEDda del proyecto. Copia la \xFAltima que viste; no se la pidas al usuario."),
44468
- country: z168.string().trim().toUpperCase().refine(isProductCostingCountryCode, {
44677
+ version: z169.number().int().positive().describe("Version le\xEDda del proyecto. Copia la \xFAltima que viste; no se la pidas al usuario."),
44678
+ country: z169.string().trim().toUpperCase().refine(isProductCostingCountryCode, {
44469
44679
  message: "Pa\xEDs no soportado por ProductMaker."
44470
44680
  }).describe("C\xF3digo ISO-2 del pa\xEDs del proyecto. Usa el `targetCountry` que devuelve el proyecto."),
44471
- supplierCost: z168.number().finite().positive().describe("Costo real de una unidad con el proveedor, en la moneda del pa\xEDs. \xDANICO dato que debes pedirle al usuario: nunca lo inventes."),
44472
- shippingCost: z168.number().finite().nonnegative().optional().describe("Costo de un env\xEDo. Omite para usar el valor gu\xEDa del pa\xEDs en vez de inventarlo."),
44473
- returnRate: z168.number().finite().min(0).lt(1).optional().describe("Fracci\xF3n de pedidos devueltos (0.25 = 25%). Omite para usar el valor gu\xEDa del pa\xEDs."),
44474
- cancellationRate: z168.number().finite().min(0).lt(1).optional().describe("Fracci\xF3n de pedidos cancelados (0.15 = 15%). Omite para usar el valor gu\xEDa del pa\xEDs."),
44475
- adsManagerCpa: z168.number().finite().nonnegative().optional().describe("Costo por compra de Ads Manager. Omite para usar el valor gu\xEDa del pa\xEDs."),
44476
- desiredMargin: z168.number().finite().min(0).lt(1).optional().describe("Margen deseado (0.1 = 10%). Omite para usar el valor gu\xEDa del pa\xEDs.")
44477
- });
44478
- var GuideInput = z168.object({
44681
+ supplierCost: z169.number().finite().positive().describe("Costo real de una unidad con el proveedor, en la moneda del pa\xEDs. \xDANICO dato que debes pedirle al usuario: nunca lo inventes."),
44682
+ shippingCost: z169.number().finite().nonnegative().optional().describe("Costo de un env\xEDo. Omite para usar el valor gu\xEDa del pa\xEDs en vez de inventarlo."),
44683
+ returnRate: z169.number().finite().min(0).lt(1).optional().describe("Fracci\xF3n de pedidos devueltos (0.25 = 25%). Omite para usar el valor gu\xEDa del pa\xEDs."),
44684
+ cancellationRate: z169.number().finite().min(0).lt(1).optional().describe("Fracci\xF3n de pedidos cancelados (0.15 = 15%). Omite para usar el valor gu\xEDa del pa\xEDs."),
44685
+ adsManagerCpa: z169.number().finite().nonnegative().optional().describe("Costo por compra de Ads Manager. Omite para usar el valor gu\xEDa del pa\xEDs."),
44686
+ desiredMargin: z169.number().finite().min(0).lt(1).optional().describe("Margen deseado (0.1 = 10%). Omite para usar el valor gu\xEDa del pa\xEDs.")
44687
+ });
44688
+ var GuideInput = z169.object({
44479
44689
  projectId: ProjectId.optional()
44480
44690
  }).strict();
44481
44691
  var NEXT_ACTION_KINDS = [
@@ -44493,21 +44703,21 @@ var NEXT_ACTION_KINDS = [
44493
44703
  "repair_meta_campaign",
44494
44704
  "review_paused_campaign"
44495
44705
  ];
44496
- var DropshippingProjectNextAction = z168.discriminatedUnion("kind", NEXT_ACTION_KINDS.map((kind2) => z168.object({
44497
- kind: z168.literal(kind2),
44498
- href: z168.string().min(1)
44706
+ var DropshippingProjectNextAction = z169.discriminatedUnion("kind", NEXT_ACTION_KINDS.map((kind2) => z169.object({
44707
+ kind: z169.literal(kind2),
44708
+ href: z169.string().min(1)
44499
44709
  })));
44500
- var CostingInputSchema = z168.object(DropshippingProjectCostingInputSchema.shape).superRefine(({ returnRate, cancellationRate }, context) => {
44710
+ var CostingInputSchema = z169.object(DropshippingProjectCostingInputSchema.shape).superRefine(({ returnRate, cancellationRate }, context) => {
44501
44711
  if (returnRate + cancellationRate >= 1) context.addIssue({
44502
- code: z168.ZodIssueCode.custom,
44712
+ code: z169.ZodIssueCode.custom,
44503
44713
  path: [
44504
44714
  "cancellationRate"
44505
44715
  ]
44506
44716
  });
44507
44717
  });
44508
- var FiniteCostingNumber = z168.number().finite();
44509
- var CostingResultSchema = z168.object({
44510
- country: z168.string().min(2).max(3),
44718
+ var FiniteCostingNumber = z169.number().finite();
44719
+ var CostingResultSchema = z169.object({
44720
+ country: z169.string().min(2).max(3),
44511
44721
  deliveryRate: FiniteCostingNumber,
44512
44722
  adjustedShippingCost: FiniteCostingNumber,
44513
44723
  adjustedCpa: FiniteCostingNumber,
@@ -44520,45 +44730,45 @@ var CostingResultSchema = z168.object({
44520
44730
  estimatedProfit: FiniteCostingNumber,
44521
44731
  actualMargin: FiniteCostingNumber,
44522
44732
  breakEvenAdsManagerCpa: FiniteCostingNumber,
44523
- wasPriceAutoAdjusted: z168.boolean(),
44524
- profitabilityStatus: z168.literal("healthy")
44525
- });
44526
- var RewardProgressSchema = z168.object({
44527
- campaignKey: z168.literal("dropshipping-launch-v1"),
44528
- totalCredits: z168.number().int().positive(),
44529
- earnedCredits: z168.number().int().nonnegative(),
44530
- milestones: z168.array(z168.object({
44733
+ wasPriceAutoAdjusted: z169.boolean(),
44734
+ profitabilityStatus: z169.literal("healthy")
44735
+ });
44736
+ var RewardProgressSchema = z169.object({
44737
+ campaignKey: z169.literal("dropshipping-launch-v1"),
44738
+ totalCredits: z169.number().int().positive(),
44739
+ earnedCredits: z169.number().int().nonnegative(),
44740
+ milestones: z169.array(z169.object({
44531
44741
  milestone: DropshippingRewardMilestone,
44532
- credits: z168.number().int().positive(),
44533
- available: z168.boolean().optional(),
44534
- earned: z168.boolean(),
44742
+ credits: z169.number().int().positive(),
44743
+ available: z169.boolean().optional(),
44744
+ earned: z169.boolean(),
44535
44745
  grantId: ProjectId.nullable(),
44536
- grantedAt: z168.string().datetime().nullable()
44746
+ grantedAt: z169.string().datetime().nullable()
44537
44747
  })).length(DropshippingRewardMilestone.options.length)
44538
44748
  });
44539
- var ProjectResponseSchema = z168.object({
44749
+ var ProjectResponseSchema = z169.object({
44540
44750
  id: ProjectId,
44541
44751
  taskId: ProjectId.nullable(),
44542
44752
  status: DropshippingProjectStatus,
44543
- originKey: z168.string().min(1),
44753
+ originKey: z169.string().min(1),
44544
44754
  researchRunId: ProjectId.nullable(),
44545
- candidateSourceId: z168.string().nullable(),
44546
- productName: z168.string().nullable(),
44755
+ candidateSourceId: z169.string().nullable(),
44756
+ productName: z169.string().nullable(),
44547
44757
  productUrl: HttpUrl3.nullable(),
44548
44758
  referenceImageUrl: HttpUrl3.nullable(),
44549
- targetCountry: z168.string().nullable(),
44550
- languageCode: z168.string().nullable(),
44551
- hasReferenceImage: z168.boolean(),
44552
- hasWinnerReferenceImage: z168.boolean(),
44759
+ targetCountry: z169.string().nullable(),
44760
+ languageCode: z169.string().nullable(),
44761
+ hasReferenceImage: z169.boolean(),
44762
+ hasWinnerReferenceImage: z169.boolean(),
44553
44763
  costingInput: CostingInputSchema.nullable(),
44554
44764
  costingResult: CostingResultSchema.nullable(),
44555
- costingVersion: z168.number().int().positive().nullable(),
44556
- version: z168.number().int().positive(),
44765
+ costingVersion: z169.number().int().positive().nullable(),
44766
+ version: z169.number().int().positive(),
44557
44767
  phase: DropshippingProjectPhase,
44558
44768
  nextAction: DropshippingProjectNextAction.nullable(),
44559
44769
  rewards: RewardProgressSchema,
44560
- createdAt: z168.string().datetime(),
44561
- updatedAt: z168.string().datetime()
44770
+ createdAt: z169.string().datetime(),
44771
+ updatedAt: z169.string().datetime()
44562
44772
  }).passthrough();
44563
44773
  var NEXT_ACTION_GUIDANCE = {
44564
44774
  cost_product: "Llama `cost_dropshipping_project` con el costo real del proveedor. Nunca lo inventes: p\xEDdeselo al usuario. Es el \xDANICO dato que debes pedirle: omite env\xEDo, devoluciones, cancelaciones, CPA y margen para que ProductMaker use los valores gu\xEDa del pa\xEDs, y luego dile al usuario cu\xE1les us\xF3 por si quiere corregirlos.",
@@ -44688,58 +44898,58 @@ function registerDropshippingProjectTools(server, api) {
44688
44898
  __name(registerDropshippingProjectTools, "registerDropshippingProjectTools");
44689
44899
 
44690
44900
  // src/tools/daily-control.ts
44691
- import { z as z169 } from "zod";
44901
+ import { z as z170 } from "zod";
44692
44902
  var getDailyControlGuidance = getProductMakerCapabilityModelGuidance("get_daily_control");
44693
44903
  var linkCampaignToProjectGuidance = getProductMakerCapabilityModelGuidance("link_campaign_to_project");
44694
44904
  var reportDailyReturnsGuidance = getProductMakerCapabilityModelGuidance("report_daily_returns");
44695
- var ProviderCampaignIdentifier = z169.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
44696
- var DateOnly = z169.string().regex(/^\d{4}-\d{2}-\d{2}$/);
44697
- var DailyControlInput = z169.object({
44905
+ var ProviderCampaignIdentifier = z170.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
44906
+ var DateOnly = z170.string().regex(/^\d{4}-\d{2}-\d{2}$/);
44907
+ var DailyControlInput = z170.object({
44698
44908
  date: DateOnly.optional().describe("D\xEDa final de la ventana (YYYY-MM-DD). Si se omite, la ventana termina AYER en UTC \u2014 nunca hoy, porque el d\xEDa en curso est\xE1 incompleto \u2014 y el servidor puede correrla un d\xEDa m\xE1s atr\xE1s si en la zona horaria de la tienda ese d\xEDa todav\xEDa no ha cerrado."),
44699
- days: z169.number().int().min(1).max(14).default(3).describe("Tama\xF1o de la ventana, 1 a 14 d\xEDas."),
44700
- projectId: z169.string().guid().optional().describe("Opcional: limita el reporte a un solo proyecto en vez de todos los productos activos.")
44909
+ days: z170.number().int().min(1).max(14).default(3).describe("Tama\xF1o de la ventana, 1 a 14 d\xEDas."),
44910
+ projectId: z170.string().guid().optional().describe("Opcional: limita el reporte a un solo proyecto en vez de todos los productos activos.")
44701
44911
  }).strict();
44702
- var LinkCampaignInput = z169.object({
44703
- projectId: z169.string().guid(),
44704
- provider: z169.enum([
44912
+ var LinkCampaignInput = z170.object({
44913
+ projectId: z170.string().guid(),
44914
+ provider: z170.enum([
44705
44915
  "meta",
44706
44916
  "tiktok"
44707
44917
  ]),
44708
44918
  accountId: ProviderCampaignIdentifier.describe("Cuenta publicitaria del proveedor. Para Meta el servidor la IGNORA y deriva la cuenta real de la campa\xF1a \u2014 se sigue pidiendo aqu\xED solo porque TikTok s\xED la necesita para resolver la campa\xF1a."),
44709
44919
  campaignId: ProviderCampaignIdentifier
44710
44920
  }).strict();
44711
- var ReportReturnsInput = z169.object({
44712
- projectId: z169.string().guid(),
44921
+ var ReportReturnsInput = z170.object({
44922
+ projectId: z170.string().guid(),
44713
44923
  date: DateOnly,
44714
- returnedOrders: z169.number().int().min(0).max(1e5),
44715
- note: z169.string().trim().max(280).optional()
44716
- }).strict();
44717
- var DailyControlStatusMirror = DailyControlStatusEnum.or(z169.string());
44718
- var DailyControlLightMirror = DailyControlLightEnum.or(z169.string());
44719
- var DailyControlSourceMirror = DailyControlSourceEnum.or(z169.string());
44720
- var DailyControlVerdictMirror = DailyControlVerdictEnum.or(z169.string());
44721
- var DailyControlDayMirror = z169.object({
44722
- date: z169.string(),
44723
- returnedOrders: z169.number(),
44924
+ returnedOrders: z170.number().int().min(0).max(1e5),
44925
+ note: z170.string().trim().max(280).optional()
44926
+ }).strict();
44927
+ var DailyControlStatusMirror = DailyControlStatusEnum.or(z170.string());
44928
+ var DailyControlLightMirror = DailyControlLightEnum.or(z170.string());
44929
+ var DailyControlSourceMirror = DailyControlSourceEnum.or(z170.string());
44930
+ var DailyControlVerdictMirror = DailyControlVerdictEnum.or(z170.string());
44931
+ var DailyControlDayMirror = z170.object({
44932
+ date: z170.string(),
44933
+ returnedOrders: z170.number(),
44724
44934
  returnedSource: DailyControlSourceMirror,
44725
44935
  cancelledSource: DailyControlSourceMirror,
44726
- hasEstimates: z169.boolean(),
44936
+ hasEstimates: z170.boolean(),
44727
44937
  light: DailyControlLightMirror
44728
44938
  }).passthrough();
44729
- var DailyControlProductMirror = z169.object({
44730
- projectId: z169.string().guid(),
44731
- productName: z169.string().nullable(),
44939
+ var DailyControlProductMirror = z170.object({
44940
+ projectId: z170.string().guid(),
44941
+ productName: z170.string().nullable(),
44732
44942
  status: DailyControlStatusMirror,
44733
- statusMessage: z169.string().nullable(),
44734
- days: z169.array(DailyControlDayMirror),
44943
+ statusMessage: z170.string().nullable(),
44944
+ days: z170.array(DailyControlDayMirror),
44735
44945
  verdict: DailyControlVerdictMirror.nullable(),
44736
- rationale: z169.string().nullable()
44946
+ rationale: z170.string().nullable()
44737
44947
  }).passthrough();
44738
- var DailyControlResponseMirror = z169.object({
44739
- since: z169.string(),
44740
- until: z169.string(),
44741
- products: z169.array(DailyControlProductMirror),
44742
- archivedProjectSpend: z169.array(z169.unknown())
44948
+ var DailyControlResponseMirror = z170.object({
44949
+ since: z170.string(),
44950
+ until: z170.string(),
44951
+ products: z170.array(DailyControlProductMirror),
44952
+ archivedProjectSpend: z170.array(z170.unknown())
44743
44953
  }).passthrough();
44744
44954
  var MCP_WARNINGS_KEY = "_mcpDailyControlWarnings";
44745
44955
  function withWarnings(response) {
@@ -44867,7 +45077,7 @@ __name(registerAgentMemoryTools, "registerAgentMemoryTools");
44867
45077
  import { createHash as createHash5 } from "crypto";
44868
45078
  import { readFile, stat } from "fs/promises";
44869
45079
  import { basename as basename2, isAbsolute, resolve as resolve3 } from "path";
44870
- import { z as z170 } from "zod";
45080
+ import { z as z171 } from "zod";
44871
45081
  var getProductControlGuidance = getProductMakerCapabilityModelGuidance("get_product_control");
44872
45082
  var getProductAdsGuidance = getProductMakerCapabilityModelGuidance("get_product_ads");
44873
45083
  var getProductScoreboardGuidance = getProductMakerCapabilityModelGuidance("get_product_scoreboard");
@@ -44884,6 +45094,7 @@ var syncShopifyOrdersGuidance = getProductMakerCapabilityModelGuidance("sync_sho
44884
45094
  var importOrdersFileGuidance = getProductMakerCapabilityModelGuidance("import_orders_file");
44885
45095
  var getDropiStatusGuidance = getProductMakerCapabilityModelGuidance("get_dropi_status");
44886
45096
  var syncDropiOrdersGuidance = getProductMakerCapabilityModelGuidance("sync_dropi_orders");
45097
+ var cancelDropiOrderGuidance = getProductMakerCapabilityModelGuidance("cancel_dropi_order");
44887
45098
  var createManualProductGuidance = getProductMakerCapabilityModelGuidance("create_manual_product");
44888
45099
  var listUnmatchedGuidance = getProductMakerCapabilityModelGuidance("list_unmatched_products");
44889
45100
  var resolveUnmatchedGuidance = getProductMakerCapabilityModelGuidance("resolve_unmatched_product");
@@ -44891,52 +45102,52 @@ var listLinkableCampaignsGuidance = getProductMakerCapabilityModelGuidance("list
44891
45102
  var linkProductCampaignGuidance = getProductMakerCapabilityModelGuidance("link_product_campaign");
44892
45103
  var deleteMonthlyExpenseGuidance = getProductMakerCapabilityModelGuidance("delete_monthly_expense");
44893
45104
  var removeProductControlGuidance = getProductMakerCapabilityModelGuidance("remove_product_control");
44894
- var DateOnly2 = z170.string().regex(/^\d{4}-\d{2}-\d{2}$/);
45105
+ var DateOnly2 = z171.string().regex(/^\d{4}-\d{2}-\d{2}$/);
44895
45106
  var IMPORT_BATCH_MAX2 = 50;
44896
- var ProductControlListInput = z170.object({
44897
- days: z170.number().int().min(1).max(14).default(3).describe("Tama\xF1o de la ventana, 1 a 14 d\xEDas."),
45107
+ var ProductControlListInput = z171.object({
45108
+ days: z171.number().int().min(1).max(14).default(3).describe("Tama\xF1o de la ventana, 1 a 14 d\xEDas."),
44898
45109
  date: DateOnly2.optional().describe("D\xEDa final de la ventana (YYYY-MM-DD). Si se omite, termina en el \xFAltimo d\xEDa cerrado \u2014 nunca hoy, que est\xE1 incompleto."),
44899
- shopDomain: z170.string().min(1).optional().describe("Tienda, si tiene m\xE1s de una conectada.")
45110
+ shopDomain: z171.string().min(1).optional().describe("Tienda, si tiene m\xE1s de una conectada.")
44900
45111
  }).strict();
44901
- var ProductAdsInput = z170.object({
44902
- productControlId: z170.string().uuid().describe("El `productControlId` que devuelve get_product_control."),
45112
+ var ProductAdsInput = z171.object({
45113
+ productControlId: z171.string().uuid().describe("El `productControlId` que devuelve get_product_control."),
44903
45114
  date: DateOnly2.describe("D\xEDa a leer (YYYY-MM-DD).")
44904
45115
  }).strict();
44905
- var ProductScoreboardInput = z170.object({
44906
- productControlId: z170.string().uuid().describe("El `productControlId` que devuelve get_product_control."),
45116
+ var ProductScoreboardInput = z171.object({
45117
+ productControlId: z171.string().uuid().describe("El `productControlId` que devuelve get_product_control."),
44907
45118
  since: DateOnly2.optional().describe("Primer d\xEDa de la prueba (YYYY-MM-DD). Sin \xE9l, el primer d\xEDa con gasto de sus campa\xF1as."),
44908
45119
  until: DateOnly2.optional().describe("\xDAltimo d\xEDa (YYYY-MM-DD). Sin \xE9l, hoy.")
44909
45120
  }).strict();
44910
- var ImportableProductsInput = z170.object({
44911
- q: z170.string().trim().max(120).optional().describe("B\xFAsqueda por t\xEDtulo. Sin esto un cat\xE1logo grande es inrecorrible."),
44912
- after: z170.string().max(512).optional().describe("Cursor de la p\xE1gina anterior, tal como vino en la respuesta."),
44913
- shopDomain: z170.string().min(1).optional()
45121
+ var ImportableProductsInput = z171.object({
45122
+ q: z171.string().trim().max(120).optional().describe("B\xFAsqueda por t\xEDtulo. Sin esto un cat\xE1logo grande es inrecorrible."),
45123
+ after: z171.string().max(512).optional().describe("Cursor de la p\xE1gina anterior, tal como vino en la respuesta."),
45124
+ shopDomain: z171.string().min(1).optional()
44914
45125
  }).strict();
44915
- var ImportProductControlsInput = z170.object({
44916
- shopifyProductIds: z170.array(z170.string().min(1).max(64)).min(1).max(IMPORT_BATCH_MAX2).describe("Identificadores tal como vinieron de list_importable_products. NO los inventes ni los deduzcas del t\xEDtulo."),
45126
+ var ImportProductControlsInput = z171.object({
45127
+ shopifyProductIds: z171.array(z171.string().min(1).max(64)).min(1).max(IMPORT_BATCH_MAX2).describe("Identificadores tal como vinieron de list_importable_products. NO los inventes ni los deduzcas del t\xEDtulo."),
44917
45128
  // Obligatorio, como en el endpoint: con dos tiendas conectadas, importar
44918
45129
  // sin decir a cuál archivaría el producto bajo la tienda equivocada.
44919
- shopDomain: z170.string().min(1)
45130
+ shopDomain: z171.string().min(1)
44920
45131
  }).strict();
44921
- var SetProductCostingInput = z170.object({
45132
+ var SetProductCostingInput = z171.object({
44922
45133
  /* La identidad, de UNA forma: la del producto nuestro, o la pareja
44923
45134
  tienda + id de Shopify. El esquema canónico también las admite juntas,
44924
45135
  pero pedirlas por separado evita que el modelo emita una mezcla que
44925
45136
  diga dos productos a la vez. */
44926
- productControlId: z170.string().guid().optional().describe("El id nuestro (lo devuelven get_product_control y create_manual_product). Obligatorio para productos manuales o importados sin tienda."),
44927
- manualSellingPrice: z170.number().positive().nullable().optional().describe("Precio de venta \u2014 SOLO con productControlId: para el producto sin tienda no hay otra verdad. En un producto de Shopify NO se manda: el precio lo manda la tienda."),
44928
- offerSellingPrice: z170.number().finite().positive().nullable().optional().describe("Precio de la OFERTA \u2014 SOLO con shopDomain + shopifyProductId, cuando el producto se vende en pack o bundle y el pedido trae m\xE1s de una unidad (p. ej. x2 por 69.990 aunque Shopify diga 34.995 por unidad). Es lo que paga el comprador por pedido, sin descuentos puntuales. Mide el equilibrio en vez del precio de la tienda; null lo borra. Om\xEDtelo para no cambiarlo."),
44929
- shopDomain: z170.string().min(1).optional(),
44930
- shopifyProductId: z170.string().min(1).max(64).optional(),
44931
- targetCountry: z170.string().length(2).describe("Pa\xEDs de venta en ISO-2, que fija moneda y referencia de flete."),
44932
- supplierCost: z170.number().finite().positive().describe("Lo que le cuesta el producto al proveedor. Nunca cero."),
44933
- shippingCost: z170.number().finite().nonnegative(),
44934
- returnRate: z170.number().finite().min(0).lt(1).describe("Proporci\xF3n 0\u20131, no porcentaje: 0.15 es quince por ciento."),
44935
- cancellationRate: z170.number().finite().min(0).lt(1)
44936
- }).strict();
44937
- var Count = z170.number().int().min(0).max(1e5).nullable().optional();
44938
- var ReportProductCountsInput = z170.object({
44939
- productControlId: z170.string().guid().describe("El identificador que devuelve get_product_control."),
45137
+ productControlId: z171.string().guid().optional().describe("El id nuestro (lo devuelven get_product_control y create_manual_product). Obligatorio para productos manuales o importados sin tienda."),
45138
+ manualSellingPrice: z171.number().positive().nullable().optional().describe("Precio de venta \u2014 SOLO con productControlId: para el producto sin tienda no hay otra verdad. En un producto de Shopify NO se manda: el precio lo manda la tienda."),
45139
+ offerSellingPrice: z171.number().finite().positive().nullable().optional().describe("Precio de la OFERTA \u2014 SOLO con shopDomain + shopifyProductId, cuando el producto se vende en pack o bundle y el pedido trae m\xE1s de una unidad (p. ej. x2 por 69.990 aunque Shopify diga 34.995 por unidad). Es lo que paga el comprador por pedido, sin descuentos puntuales. Mide el equilibrio en vez del precio de la tienda; null lo borra. Om\xEDtelo para no cambiarlo."),
45140
+ shopDomain: z171.string().min(1).optional(),
45141
+ shopifyProductId: z171.string().min(1).max(64).optional(),
45142
+ targetCountry: z171.string().length(2).describe("Pa\xEDs de venta en ISO-2, que fija moneda y referencia de flete."),
45143
+ supplierCost: z171.number().finite().positive().describe("Lo que le cuesta el producto al proveedor. Nunca cero."),
45144
+ shippingCost: z171.number().finite().nonnegative(),
45145
+ returnRate: z171.number().finite().min(0).lt(1).describe("Proporci\xF3n 0\u20131, no porcentaje: 0.15 es quince por ciento."),
45146
+ cancellationRate: z171.number().finite().min(0).lt(1)
45147
+ }).strict();
45148
+ var Count = z171.number().int().min(0).max(1e5).nullable().optional();
45149
+ var ReportProductCountsInput = z171.object({
45150
+ productControlId: z171.string().guid().describe("El identificador que devuelve get_product_control."),
44940
45151
  date: DateOnly2,
44941
45152
  orders: Count.describe("Pedidos que entraron ese d\xEDa."),
44942
45153
  cancelledOrders: Count,
@@ -44946,64 +45157,68 @@ var ReportProductCountsInput = z170.object({
44946
45157
  }).strict();
44947
45158
  var MAX_ORDERS_FILE_BYTES = 8 * 1024 * 1024;
44948
45159
  var SyncShopifyOrdersInput = SyncShopifyOrdersSchema;
44949
- var ImportOrdersFileInput = z170.object({
45160
+ var ImportOrdersFileInput = z171.object({
44950
45161
  /** Ruta ABSOLUTA en la máquina de quien usa el MCP. */
44951
- path: z170.string().min(1),
44952
- operationId: z170.string().guid().optional(),
45162
+ path: z171.string().min(1),
45163
+ operationId: z171.string().guid().optional(),
44953
45164
  /** Solo mirar: devuelve el resumen y no escribe nada. */
44954
- dryRun: z170.boolean().optional()
45165
+ dryRun: z171.boolean().optional()
44955
45166
  }).strict();
44956
- var CreateOperationInput = z170.object({
44957
- countryCode: z170.string().length(2),
44958
- label: z170.string().trim().min(1).max(60).optional()
45167
+ var CreateOperationInput = z171.object({
45168
+ countryCode: z171.string().length(2),
45169
+ label: z171.string().trim().min(1).max(60).optional()
44959
45170
  }).strict();
44960
- var MergeProductsInput = z170.object({
44961
- sourceId: z170.string().guid(),
44962
- targetId: z170.string().guid()
45171
+ var MergeProductsInput = z171.object({
45172
+ sourceId: z171.string().guid(),
45173
+ targetId: z171.string().guid()
44963
45174
  }).strict();
44964
- var SetMonthlyExpenseInput = z170.object({
44965
- month: z170.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/).optional(),
45175
+ var SetMonthlyExpenseInput = z171.object({
45176
+ month: z171.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/).optional(),
44966
45177
  label: SaveMonthlyExpenseSchema.shape.label,
44967
- amount: z170.number().finite().min(0),
44968
- operationId: z170.string().guid().optional()
45178
+ amount: z171.number().finite().min(0),
45179
+ operationId: z171.string().guid().optional()
44969
45180
  }).strict();
44970
- var SetAdSpendInput = z170.object({
44971
- month: z170.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/).optional(),
44972
- operationId: z170.string().guid().optional(),
45181
+ var SetAdSpendInput = z171.object({
45182
+ month: z171.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/).optional(),
45183
+ operationId: z171.string().guid().optional(),
44973
45184
  /** null RETIRA la corrección; cero afirma que no pautó. */
44974
- amount: z170.number().finite().min(0).nullable()
45185
+ amount: z171.number().finite().min(0).nullable()
44975
45186
  }).strict();
44976
- var GetFinancesInput = z170.object({
44977
- month: z170.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/).optional().describe("Mes en YYYY-MM. Si se omite, el mes en curso. Solo mes calendario."),
44978
- operationId: z170.string().guid().optional().describe("El negocio, si tiene mas de uno. Con uno solo no hace falta decirlo.")
45187
+ var GetFinancesInput = z171.object({
45188
+ month: z171.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/).optional().describe("Mes en YYYY-MM. Si se omite, el mes en curso. Solo mes calendario."),
45189
+ operationId: z171.string().guid().optional().describe("El negocio, si tiene mas de uno. Con uno solo no hace falta decirlo.")
44979
45190
  }).strict();
44980
45191
  var GetDropiStatusInput = DropiCountryQuerySchema.extend({
44981
45192
  countryCode: DropiCountrySchema.optional().describe("Pa\xEDs de la cuenta (ISO-2). Si se omite, el servidor responde por Colombia (CO)."),
44982
- connectionId: z170.string().guid().optional().describe("Una cuenta concreta cuando el pa\xEDs tiene varias. Sale de la lista de conexiones; nunca se inventa.")
45193
+ connectionId: z171.string().guid().optional().describe("Una cuenta concreta cuando el pa\xEDs tiene varias. Sale de la lista de conexiones; nunca se inventa.")
44983
45194
  });
44984
45195
  var SyncDropiOrdersInput = SyncDropiFinancialSchema;
44985
- var CreateManualProductInput = z170.strictObject(CreateManualProductControlSchema.shape).omit({
45196
+ var CancelDropiOrderInput = z171.strictObject({
45197
+ dropiOrderId: DropiOrderIdSchema.describe("N\xFAmero del pedido en Dropi (solo d\xEDgitos), el que muestra \xABMis pedidos\xBB."),
45198
+ ...CancelDropiOrderSchema.shape
45199
+ });
45200
+ var CreateManualProductInput = z171.strictObject(CreateManualProductControlSchema.shape).omit({
44986
45201
  requestId: true
44987
45202
  });
44988
- var ListUnmatchedProductsInput = z170.object({
44989
- operationId: z170.string().guid().optional().describe("El negocio, si tiene mas de uno. Con uno solo no hace falta decirlo.")
45203
+ var ListUnmatchedProductsInput = z171.object({
45204
+ operationId: z171.string().guid().optional().describe("El negocio, si tiene mas de uno. Con uno solo no hace falta decirlo.")
44990
45205
  }).strict();
44991
45206
  var ResolveUnmatchedProductInput = ResolveUnmatchedProductSchema;
44992
- var ListLinkableCampaignsInput = z170.object({}).strict();
44993
- var LinkProductCampaignInput = z170.object({
44994
- provider: z170.enum([
45207
+ var ListLinkableCampaignsInput = z171.object({}).strict();
45208
+ var LinkProductCampaignInput = z171.object({
45209
+ provider: z171.enum([
44995
45210
  "meta",
44996
45211
  "tiktok"
44997
45212
  ]).describe("La red publicitaria de la campa\xF1a."),
44998
- accountId: z170.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/).describe("La cuenta publicitaria. Sale de list_linkable_campaigns; nunca se inventa."),
44999
- campaignId: z170.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/).describe("La campa\xF1a. Sale de list_linkable_campaigns; nunca se inventa."),
45000
- productControlId: z170.string().guid().optional().describe("El id del producto en su control financiero."),
45001
- shopDomain: z170.string().min(1).optional().describe("La tienda del producto; con shopifyProductId es la otra forma de decir cu\xE1l es."),
45002
- shopifyProductId: z170.string().min(1).optional().describe("El id del producto en su tienda. Va junto a shopDomain.")
45213
+ accountId: z171.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/).describe("La cuenta publicitaria. Sale de list_linkable_campaigns; nunca se inventa."),
45214
+ campaignId: z171.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/).describe("La campa\xF1a. Sale de list_linkable_campaigns; nunca se inventa."),
45215
+ productControlId: z171.string().guid().optional().describe("El id del producto en su control financiero."),
45216
+ shopDomain: z171.string().min(1).optional().describe("La tienda del producto; con shopifyProductId es la otra forma de decir cu\xE1l es."),
45217
+ shopifyProductId: z171.string().min(1).optional().describe("El id del producto en su tienda. Va junto a shopDomain.")
45003
45218
  }).strict();
45004
45219
  var DeleteMonthlyExpenseInput = DeleteMonthlyExpenseSchema;
45005
- var RemoveProductControlInput = z170.object({
45006
- productControlId: z170.string().guid().describe("El id del producto en su control. Sale del listado; nunca se inventa.")
45220
+ var RemoveProductControlInput = z171.object({
45221
+ productControlId: z171.string().guid().describe("El id del producto en su control. Sale del listado; nunca se inventa.")
45007
45222
  }).strict();
45008
45223
  function manualProductRequestId(input) {
45009
45224
  const digest3 = createHash5("sha256").update(JSON.stringify(input, [
@@ -45267,6 +45482,17 @@ function registerProductControlTools(server, api, { transport = "http" } = {}) {
45267
45482
  throw translateError(error);
45268
45483
  }
45269
45484
  });
45485
+ server.registerTool("cancel_dropi_order", {
45486
+ description: cancelDropiOrderGuidance.summary + " Solo cancela si el pedido est\xE1 en PENDIENTE CONFIRMACION o PENDIENTE y no tiene gu\xEDa; lee el pedido antes de escribir, as\xED que repetirla es seguro y un pedido ya cancelado responde `already_cancelled`. Con gu\xEDa responde `not_cancellable` con `blockedBy: has_guide`: ya no se cancela, se resuelve la novedad (\xABdevolver al remitente\xBB). \xDAsala cuando el comprador pidi\xF3 cancelar (`reason: buyer_requested`) o el vendedor te lo pidi\xF3 (`seller_requested`); despu\xE9s av\xEDsale al vendedor qu\xE9 pedido cancelaste.",
45487
+ inputSchema: CancelDropiOrderInput.shape,
45488
+ annotations: OVERWRITES_EXTERNAL
45489
+ }, async ({ dropiOrderId, ...body }) => {
45490
+ try {
45491
+ return asText(await api.postJson(`/v1/product-control/dropi/orders/${encodeURIComponent(dropiOrderId)}/cancel`, body));
45492
+ } catch (error) {
45493
+ throw translateError(error);
45494
+ }
45495
+ });
45270
45496
  server.registerTool("create_manual_product", {
45271
45497
  description: createManualProductGuidance.summary + " Pide TODOS los datos antes de llamarla: el costo del proveedor y el flete sin inventar \u2014 un cero volver\xEDa infinitamente rentable el producto. Las dos tasas son proporciones 0\u20131 y SU estimaci\xF3n, no una medici\xF3n. Reintentar con los mismos datos devuelve el mismo producto; no duplica.",
45272
45498
  inputSchema: CreateManualProductInput.shape,
@@ -45373,28 +45599,28 @@ function registerProductControlTools(server, api, { transport = "http" } = {}) {
45373
45599
  __name(registerProductControlTools, "registerProductControlTools");
45374
45600
 
45375
45601
  // src/tools/market-study-estimate.ts
45376
- import { z as z171 } from "zod";
45602
+ import { z as z172 } from "zod";
45377
45603
  var estimateMarketStudyGuidance = getProductMakerCapabilityModelGuidance("estimate_market_study_cost");
45378
- var ProductTaskOutputEnum = z171.enum([
45604
+ var ProductTaskOutputEnum = z172.enum([
45379
45605
  "landing",
45380
45606
  "video",
45381
45607
  "image"
45382
45608
  ]);
45383
- var EstimateMarketStudyInput = z171.object({
45384
- kind: z171.enum([
45609
+ var EstimateMarketStudyInput = z172.object({
45610
+ kind: z172.enum([
45385
45611
  "video",
45386
45612
  "product_task"
45387
45613
  ]).describe('"video" para generate_video_creative; "product_task" para create_product_task.'),
45388
- videoAngleCount: z171.number().int().min(1).max(3).describe("Los mismos 1, 2 o 3 videos que vas a pedir al crear."),
45389
- durationSeconds: z171.number().int().min(4).max(30).default(15).describe("La misma duraci\xF3n que enviar\xE1s al crear."),
45614
+ videoAngleCount: z172.number().int().min(1).max(3).describe("Los mismos 1, 2 o 3 videos que vas a pedir al crear."),
45615
+ durationSeconds: z172.number().int().min(4).max(30).default(15).describe("La misma duraci\xF3n que enviar\xE1s al crear."),
45390
45616
  videoStructure: VideoStructureEnum.default("single_take"),
45391
45617
  videoQuality: VideoQualityEnum.default("economy"),
45392
45618
  videoResolution: VideoResolutionEnum.default("480p"),
45393
- productImageCount: z171.number().int().min(1).max(5).optional().describe("Cantidad de fotos del producto que adjuntar\xE1s (1-5)."),
45619
+ productImageCount: z172.number().int().min(1).max(5).optional().describe("Cantidad de fotos del producto que adjuntar\xE1s (1-5)."),
45394
45620
  outputs: ProductTaskOutputEnum.array().min(1).max(3).optional().describe('Solo para kind="product_task": los mismos outputs de create_product_task. Default: todos.'),
45395
- generateAiMusic: z171.boolean().optional(),
45621
+ generateAiMusic: z172.boolean().optional(),
45396
45622
  generateAiEdit: AiEditRequestSchema.optional(),
45397
- replicateWinnerWhenFound: z171.boolean().optional().describe("La misma preferencia que enviar\xE1s al crear. false excluye la reserva de r\xE9plica del ganador de la cotizaci\xF3n con estudio.")
45623
+ replicateWinnerWhenFound: z172.boolean().optional().describe("La misma preferencia que enviar\xE1s al crear. false excluye la reserva de r\xE9plica del ganador de la cotizaci\xF3n con estudio.")
45398
45624
  }).strict();
45399
45625
  function buildMarketStudyEstimateRequests(input) {
45400
45626
  const quotesVideo = input.kind === "video" || (input.outputs ?? [