@productmaker/mcp 12.24.0 → 12.25.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 (3) hide show
  1. package/dist/http.js +164 -66
  2. package/dist/stdio.js +164 -66
  3. package/package.json +1 -1
package/dist/http.js CHANGED
@@ -1174,6 +1174,20 @@ var DEFAULT_PRICING = {
1174
1174
  ourCostCents: 20,
1175
1175
  userPriceCents: 40
1176
1176
  },
1177
+ // Video Mix mask legs (scene person/setting replacement). Published Fal
1178
+ // rates read 2026-11-18: SAM 3 video "$0.005 per 16 frames of video input"
1179
+ // (fal.ai/models/fal-ai/sam-3/video; spike: ~5¢ per 5 s at 30 fps) and
1180
+ // Depth Anything Video "$0.04 per second of video"
1181
+ // (fal.ai/models/fal-ai/depth-anything-video; spike: ~20¢ per 5 s).
1182
+ // Retail keeps the 2x house markup.
1183
+ "fal:video-segmentation:sam3-video-per16frames": {
1184
+ ourCostCents: 0.5,
1185
+ userPriceCents: 1
1186
+ },
1187
+ "fal:video-depth-estimation:depth-anything-video-persec": {
1188
+ ourCostCents: 4,
1189
+ userPriceCents: 8
1190
+ },
1177
1191
  // Seedance 2.5 (bytedance/seedance-2-5) — explicit per-second pricing.
1178
1192
  // Image/audio references use the no-video rate; only a real video reference
1179
1193
  // uses the with-video rate. Units are USD cents per provider second.
@@ -6200,6 +6214,14 @@ var CreativeEngineRecipeSchema = z14.object({
6200
6214
  productReferencePolicy: z14.literal("clean_gallery_v1").optional(),
6201
6215
  /** Frozen reviewer-only read model; absent keeps historical full request context. */
6202
6216
  reviewerContextPolicy: z14.literal("selected_commercial_v1").optional(),
6217
+ /**
6218
+ * New recipes: a final review whose criticals span several scenes is
6219
+ * repaired sequentially, prioritizing untouched scenes, each within its own
6220
+ * repair allowance and the run cap; the next final review re-judges
6221
+ * the rest (9ed223b0, 2026-11-16). Absent keeps the historical rule:
6222
+ * only a single-scene rejection has a repair target.
6223
+ */
6224
+ finalRepairPolicy: z14.literal("scene_by_scene_v1").optional(),
6203
6225
  /**
6204
6226
  * Frozen at entry: a scene_patch_v1 director repair and every
6205
6227
  * inputs/asset scene review read the scene-scoped context (no research
@@ -6949,6 +6971,30 @@ var CreativeEngineRetainedSceneCandidateBindingSchema = z14.object({
6949
6971
  candidates: z14.array(CreativeEngineCandidateSchema),
6950
6972
  reviews: z14.array(CreativeEngineReviewSchema)
6951
6973
  }).strict();
6974
+ var CreativeEngineSpeechWindowRepairStateSchema = z14.object({
6975
+ candidateId: id2,
6976
+ routingHash: hash,
6977
+ windowId: id2,
6978
+ failedOperationId: id2,
6979
+ /**
6980
+ * Paid-take index being bought for the window (1..paidRetakesMax+1).
6981
+ * A window whose only failure was a confirmed zero-usage take re-buys
6982
+ * the same index; historical receipts pin 2.
6983
+ */
6984
+ attempt: z14.number().int().min(1).max(CREATIVE_ENGINE_MEDIA_RECOVERY_POLICY.paidRetakesMax + 1),
6985
+ supersededCandidateIds: z14.array(id2).max(128).optional()
6986
+ }).strict();
6987
+ var CreativeEngineFinalRepairFallbackSchema = z14.object({
6988
+ owner: CreativeEngineOwnerSchema,
6989
+ plan: CreativeEnginePlanSchema,
6990
+ preparedInputs: z14.array(CreativeEnginePreparedInputsSchema),
6991
+ retainedSceneCandidates: z14.array(CreativeEngineRetainedSceneCandidateBindingSchema).optional(),
6992
+ speechWindowRepair: CreativeEngineSpeechWindowRepairStateSchema.optional(),
6993
+ sceneTiming: CreativeEngineSceneTimingSchema.optional(),
6994
+ selection: z14.record(z14.string(), id2),
6995
+ final: CreativeEngineFinalSchema,
6996
+ reviewId: id2
6997
+ }).strict();
6952
6998
  var CreativeEngineStateSchema = z14.object({
6953
6999
  schemaVersion: z14.union([
6954
7000
  z14.literal(1),
@@ -6983,19 +7029,7 @@ var CreativeEngineStateSchema = z14.object({
6983
7029
  retainedSceneCandidates: z14.array(CreativeEngineRetainedSceneCandidateBindingSchema).optional(),
6984
7030
  inheritedSceneOutputs: z14.array(CreativeEngineInheritedSceneOutputSchema).optional(),
6985
7031
  speechRoutings: z14.array(CreativeEngineSpeechRoutingSchema).optional(),
6986
- speechWindowRepair: z14.object({
6987
- candidateId: id2,
6988
- routingHash: hash,
6989
- windowId: id2,
6990
- failedOperationId: id2,
6991
- /**
6992
- * Paid-take index being bought for the window (1..paidRetakesMax+1).
6993
- * A window whose only failure was a confirmed zero-usage take re-buys
6994
- * the same index; historical receipts pin 2.
6995
- */
6996
- attempt: z14.number().int().min(1).max(CREATIVE_ENGINE_MEDIA_RECOVERY_POLICY.paidRetakesMax + 1),
6997
- supersededCandidateIds: z14.array(id2).max(128).optional()
6998
- }).strict().optional(),
7032
+ speechWindowRepair: CreativeEngineSpeechWindowRepairStateSchema.optional(),
6999
7033
  selection: z14.record(z14.string(), id2),
7000
7034
  selectionManifestHash: hash.optional(),
7001
7035
  operations: z14.array(CreativeEngineOperationSchema),
@@ -7076,8 +7110,20 @@ var CreativeEngineStateSchema = z14.object({
7076
7110
  repairAuthorContractRetry: CreativeEngineRepairAuthorContractRetrySchema.optional(),
7077
7111
  replanAuthorContractRetry: CreativeEngineReplanAuthorContractRetrySchema.optional(),
7078
7112
  directorTransportRetry: CreativeEngineDirectorTransportRetrySchema.optional(),
7079
- final: CreativeEngineFinalSchema.optional()
7113
+ final: CreativeEngineFinalSchema.optional(),
7114
+ finalRepairFallback: CreativeEngineFinalRepairFallbackSchema.optional()
7080
7115
  }).strict().superRefine((state, ctx) => {
7116
+ const fallback = state.finalRepairFallback;
7117
+ if (fallback) {
7118
+ const matchesContext = /* @__PURE__ */ __name((context) => context.physicalRevision === state.context.physicalRevision && context.physicalHash === state.context.physicalHash && context.commercialHash === state.context.commercialHash && context.referencesHash === state.context.referencesHash, "matchesContext");
7119
+ if (state.recipe.capabilities.finalRepairPolicy !== "scene_by_scene_v1" || fallback.owner.taskId !== state.owner.taskId || fallback.owner.angleKey !== state.owner.angleKey || fallback.owner.creativeRevision !== state.owner.creativeRevision || !matchesContext(fallback.plan.context) || !state.reviews.some((review) => review.id === fallback.reviewId && review.gate === "final" && review.verdict === "rejected" && review.subjectHash === fallback.final.outputHash && review.manifestHash === fallback.final.manifestHash && review.planRevision === fallback.plan.revision && matchesContext(review.context))) ctx.addIssue({
7120
+ code: z14.ZodIssueCode.custom,
7121
+ message: "Prior final must match its owner, context and review",
7122
+ path: [
7123
+ "finalRepairFallback"
7124
+ ]
7125
+ });
7126
+ }
7081
7127
  const repairAuthorContractRetry = state.repairAuthorContractRetry;
7082
7128
  if (repairAuthorContractRetry && (state.status !== "repair_pending" || state.repairSceneId !== repairAuthorContractRetry.sceneId || state.plan?.hash !== repairAuthorContractRetry.planHash || Object.entries(state.context).some(([key2, value]) => repairAuthorContractRetry.context[key2] !== value))) ctx.addIssue({
7083
7129
  code: z14.ZodIssueCode.custom,
@@ -7219,6 +7265,11 @@ var CreativeEngineEventSchema = z14.discriminatedUnion("type", [
7219
7265
  manifestHash: hash,
7220
7266
  assetKey
7221
7267
  }).strict(),
7268
+ z14.object({
7269
+ type: z14.literal("final_repair_fallback_selected"),
7270
+ outputHash: hash,
7271
+ assetKey
7272
+ }).strict(),
7222
7273
  z14.object({
7223
7274
  type: z14.literal("delivered")
7224
7275
  }).strict(),
@@ -10089,7 +10140,7 @@ var LandingConfigSchema = z28.object({
10089
10140
  });
10090
10141
  var CODE_LANDING_SCHEMA_VERSION = 1;
10091
10142
  var CODE_LANDING_RUNTIME_VERSION = 1;
10092
- var MAX_STOREFRONT_LANDING_BYTES = 110 * 1024;
10143
+ var MAX_STOREFRONT_LANDING_BYTES = 120 * 1024;
10093
10144
  var UTF8_ENCODER = new TextEncoder();
10094
10145
  function measureUtf8Bytes(value) {
10095
10146
  return UTF8_ENCODER.encode(value).length;
@@ -15349,6 +15400,8 @@ var IngestEstimationOptions = z53.object({
15349
15400
  aiEditAngleTiers: z53.array(AiEditTierSchema.nullable()).max(3).optional()
15350
15401
  });
15351
15402
  var IngestResumeEstimationOptions = z53.object({
15403
+ /** Autopilot quotes before creation share new video admission. Saved resumes omit this. */
15404
+ forNewVideo: z53.literal(true).optional(),
15352
15405
  sourceProductUrl: z53.string().max(4096).optional(),
15353
15406
  /** Number of product references already submitted by extract for cleaning. */
15354
15407
  productImageCount: z53.number().int().min(1).max(INGEST_MAX_REFERENCE_IMAGES).optional(),
@@ -15407,6 +15460,8 @@ var IngestResumeEstimationOptions = z53.object({
15407
15460
  styleMix: z53.boolean().optional()
15408
15461
  });
15409
15462
  var VideoCreativeEstimationOptions = z53.object({
15463
+ /** Owner-verified existing direct video only. New quotes omit it. */
15464
+ continuationTaskId: z53.string().min(1).max(128).optional(),
15410
15465
  sourceProductUrl: z53.string().max(4096).optional(),
15411
15466
  /** Direct free-video flow: one provider clip, no extraction/angles pipeline. */
15412
15467
  videoMode: z53.enum([
@@ -15739,6 +15794,7 @@ var CostEstimationBatchRequest = z53.object({
15739
15794
  requests: z53.array(CostEstimationRequest).min(1).max(COST_ESTIMATION_BATCH_LIMIT)
15740
15795
  });
15741
15796
  var CostEstimationUnavailableCode = z53.enum([
15797
+ "VIDEO_SINGLE_TAKE_DISABLED",
15742
15798
  "CREATIVE_ENGINE_VIDEO_QUALITY_NOT_ADMITTED",
15743
15799
  "CREATIVE_ENGINE_VIDEO_RESOLUTION_NOT_ADMITTED",
15744
15800
  "STRUCTURE_NOT_ADMITTED",
@@ -18279,6 +18335,9 @@ var FeatureSpec = z68.object({
18279
18335
  }
18280
18336
  });
18281
18337
 
18338
+ // ../../packages/types/src/guided-video-format-policy.ts
18339
+ var DEFAULT_GUIDED_VIDEO_STRUCTURE = "multi_scene";
18340
+
18282
18341
  // ../../packages/types/src/mix.ts
18283
18342
  import { z as z70 } from "zod";
18284
18343
 
@@ -18326,7 +18385,9 @@ var MIX_DEGRADATION_REASONS = [
18326
18385
  */
18327
18386
  "scene_length_unsupported",
18328
18387
  /** Transient provider failures exhausted the budget. */
18329
- "provider_unavailable"
18388
+ "provider_unavailable",
18389
+ /** The primary renders did not pass the quality checks within the budget. */
18390
+ "quality_retries_exhausted"
18330
18391
  ];
18331
18392
  var MixDegradationReasonSchema = z69.enum(MIX_DEGRADATION_REASONS);
18332
18393
 
@@ -25374,7 +25435,8 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
25374
25435
  // MCP 12.8.0: + manual-only, cohort-gated «viral» preset/angle narrative.
25375
25436
  // MCP 12.18.1: «viral» prose admits Un solo clip (15 s).
25376
25437
  // MCP 12.19.0: + landingMode (classic | code landing).
25377
- "e49ee21258709cc33dc72b68095723a960e9aa9d8c747af05e4b513de0866cf5",
25438
+ // MCP 12.25.0: Multiescena predeterminada para videos nuevos.
25439
+ "90ba32108e2a484d662b9441e7facf246fad166933d42f4659831f16801b6b12",
25378
25440
  "credit_consuming",
25379
25441
  "creative",
25380
25442
  [
@@ -25618,31 +25680,42 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
25618
25680
  "cost_estimate"
25619
25681
  ]
25620
25682
  ),
25621
- defineCapability("estimate_market_study_cost", "d1fbe8ead642d481258c419a1eed059f9c8188d1cd9f2d4eed12e202fc8800a4", "none", "read_only", [
25622
- "read"
25623
- ], [
25624
- slot("creative_kind", true, [
25625
- "kind"
25626
- ], []),
25627
- slot("video_configuration", true, [
25628
- "videoAngleCount",
25629
- "durationSeconds",
25630
- "videoStructure",
25631
- "videoQuality",
25632
- "videoResolution"
25633
- ], []),
25634
- slot("estimate_options", false, [
25635
- "productImageCount",
25636
- "outputs",
25637
- "generateAiMusic",
25638
- "generateAiEdit",
25639
- "replicateWinnerWhenFound"
25640
- ], [])
25641
- ], [
25642
- "creative"
25643
- ], [
25644
- "cost_estimate"
25645
- ], MCP_ONLY_CHANNEL_EXPOSURE),
25683
+ defineCapability(
25684
+ "estimate_market_study_cost",
25685
+ // MCP 12.25.0: Multiescena predeterminada para videos nuevos.
25686
+ "d7b3570035bfc209cc3a4e30de8feeb35c11fae99663e17cc5a5fcf57e32bf81",
25687
+ "none",
25688
+ "read_only",
25689
+ [
25690
+ "read"
25691
+ ],
25692
+ [
25693
+ slot("creative_kind", true, [
25694
+ "kind"
25695
+ ], []),
25696
+ slot("video_configuration", true, [
25697
+ "videoAngleCount",
25698
+ "durationSeconds",
25699
+ "videoStructure",
25700
+ "videoQuality",
25701
+ "videoResolution"
25702
+ ], []),
25703
+ slot("estimate_options", false, [
25704
+ "productImageCount",
25705
+ "outputs",
25706
+ "generateAiMusic",
25707
+ "generateAiEdit",
25708
+ "replicateWinnerWhenFound"
25709
+ ], [])
25710
+ ],
25711
+ [
25712
+ "creative"
25713
+ ],
25714
+ [
25715
+ "cost_estimate"
25716
+ ],
25717
+ MCP_ONLY_CHANNEL_EXPOSURE
25718
+ ),
25646
25719
  defineCapability("find_winning_products", "b73a18bb9618b96067b17791bf2f8e7450e17e34881c4f997e117be89abe058d", "credit_consuming", "business", [
25647
25720
  "credit_consuming",
25648
25721
  "state_change"
@@ -25955,7 +26028,8 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
25955
26028
  // MCP 12.8.0: + manual-only, cohort-gated «viral» preset/angle narrative.
25956
26029
  // MCP 12.18.1: «viral» prose admits Un solo clip (15 s).
25957
26030
  // MCP 12.19.0: + landingMode (classic | code landing).
25958
- "f5a29286e126209c790850a961e9049f1c4d65be75889985d9e73359742ff7cc",
26031
+ // MCP 12.25.0: Multiescena predeterminada para videos nuevos.
26032
+ "9b0169fe939bd43c9a0fd64de8308e143b388ab38dd3cc0d0b95182ca85f44eb",
25959
26033
  "credit_consuming",
25960
26034
  "creative",
25961
26035
  [
@@ -34713,7 +34787,7 @@ var ApiClient = class {
34713
34787
  };
34714
34788
 
34715
34789
  // src/index.ts
34716
- var MCP_VERSION = "12.24.0";
34790
+ var MCP_VERSION = "12.25.0";
34717
34791
 
34718
34792
  // src/meta-upload-app.ts
34719
34793
  import { readFileSync } from "fs";
@@ -35737,6 +35811,11 @@ var VideoPresetEnum = VideoPreset.extract([
35737
35811
  "viral"
35738
35812
  ]);
35739
35813
  var VideoStructureEnum = VideoStructure;
35814
+ var GUIDED_VIDEO_STRUCTURE_LABELS = {
35815
+ multi_scene: "Multiescena",
35816
+ single_take: "Un solo clip"
35817
+ };
35818
+ var GUIDED_VIDEO_STRUCTURE_DESCRIPTION = 'Opcional. Formato: "multi_scene" = Multiescena (predeterminado); "single_take" = Un solo clip (generado completo, con posibles cambios de plano) si est\xE1 habilitado.';
35740
35819
  var VideoQualityEnum = VideoQuality;
35741
35820
  var VideoRouteIdEnum = VideoRouteId;
35742
35821
  var TaskCreativeVariantVideoPresetEnum = TaskCreativeVariantVideoPreset;
@@ -36079,6 +36158,7 @@ var McpErrorCode = {
36079
36158
  SERVICE_VIDEO_SNAPSHOT_UNAVAILABLE: "SERVICE_VIDEO_SNAPSHOT_UNAVAILABLE",
36080
36159
  // Input
36081
36160
  INVALID_INPUT: "INVALID_INPUT",
36161
+ VIDEO_SINGLE_TAKE_DISABLED: "VIDEO_SINGLE_TAKE_DISABLED",
36082
36162
  INSUFFICIENT_CREDITS: "INSUFFICIENT_CREDITS",
36083
36163
  FEATURE_NOT_AVAILABLE: "FEATURE_NOT_AVAILABLE",
36084
36164
  TASK_QUOTA_EXCEEDED: "TASK_QUOTA_EXCEEDED",
@@ -36267,6 +36347,7 @@ var McpErrorCode = {
36267
36347
  INTERNAL: "INTERNAL"
36268
36348
  };
36269
36349
  var CODE_MESSAGES = {
36350
+ VIDEO_SINGLE_TAKE_DISABLED: "Single Take is disabled for new videos. Quote Multi Scene and ask for confirmation before creating the video.",
36270
36351
  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.",
36271
36352
  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.",
36272
36353
  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.",
@@ -36468,6 +36549,7 @@ var AGENT_MEMORY_CODES = [
36468
36549
  McpErrorCode.AGENT_SHOP_REQUIRED
36469
36550
  ];
36470
36551
  var INVALID_PARAM_CODES = /* @__PURE__ */ new Set([
36552
+ McpErrorCode.VIDEO_SINGLE_TAKE_DISABLED,
36471
36553
  // Input/auth
36472
36554
  McpErrorCode.INVALID_INPUT,
36473
36555
  McpErrorCode.INSUFFICIENT_CREDITS,
@@ -36601,6 +36683,7 @@ var INVALID_PARAM_CODES = /* @__PURE__ */ new Set([
36601
36683
  McpErrorCode.NO_META_AD_ACCOUNTS
36602
36684
  ]);
36603
36685
  var PASSTHROUGH_CODES = /* @__PURE__ */ new Set([
36686
+ McpErrorCode.VIDEO_SINGLE_TAKE_DISABLED,
36604
36687
  McpErrorCode.USER_NOT_PROVISIONED,
36605
36688
  McpErrorCode.CREDIT_ADMISSION_UNAVAILABLE,
36606
36689
  McpErrorCode.INSUFFICIENT_CREDITS,
@@ -36849,7 +36932,7 @@ function translateError(err) {
36849
36932
  const message = resolveMessage(body.code, void 0);
36850
36933
  return mcp(body.code, saved2 ? `Commerce changes were saved. ${message}` : message, extra);
36851
36934
  }
36852
- const messageCode = typeof body.message === "string" && /^VOICE_[A-Z0-9_]+$/.test(body.message) ? body.message : void 0;
36935
+ const messageCode = typeof body.message === "string" && (/^VOICE_[A-Z0-9_]+$/.test(body.message) || body.message === McpErrorCode.VIDEO_SINGLE_TAKE_DISABLED) ? body.message : void 0;
36853
36936
  const rawCode = (typeof body.code === "string" ? body.code : void 0) ?? messageCode;
36854
36937
  const code = rawCode === "INSUFFICIENT_CREDIT" ? McpErrorCode.INSUFFICIENT_CREDITS : rawCode;
36855
36938
  if (code && PASSTHROUGH_CODES.has(code)) {
@@ -38731,17 +38814,17 @@ var CreateProductTaskInput = z153.object({
38731
38814
  paymentMethods: z153.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.'),
38732
38815
  productContext: z153.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."),
38733
38816
  productLabel: z153.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.'),
38734
- 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 con escenas sin di\xE1logo y 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.'),
38817
+ 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 15 o 30 segundos seg\xFAn el formato y la calidad, 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 con escenas sin di\xE1logo y 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.'),
38735
38818
  sound: ViralVideoSoundSchema.optional().describe('Solo para Viral. "music" = m\xFAsica (por defecto), "music_voiceover" = m\xFAsica y voz en off, "none" = sin sonido.'),
38736
38819
  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.'),
38737
38820
  durationSeconds: z153.union([
38738
38821
  z153.literal(15),
38739
38822
  z153.literal(30)
38740
- ]).default(15).describe("Opcional. Duraci\xF3n objetivo del video: 15s (single_call, default) o 30s (Multiescena, aproximadamente 30s y facturado por escena)."),
38823
+ ]).default(15).describe("Opcional. Duraci\xF3n objetivo: Multiescena admite 15 o 30 segundos; Un solo clip admite 15 segundos o 30 en Pro. Default: 15 segundos."),
38741
38824
  pauseForAngleReview: z153.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."),
38742
38825
  aiDecidesAll: z153.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."),
38743
- 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.'),
38744
- 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.'),
38826
+ videoTier: VideoTierEnum.optional().describe("Compatibilidad con clientes antiguos. Usa videoStructure para solicitudes nuevas."),
38827
+ videoStructure: VideoStructureEnum.optional().describe(GUIDED_VIDEO_STRUCTURE_DESCRIPTION),
38745
38828
  videoQuality: VideoQualityEnum.default("economy").describe('Opcional. Calidad: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro. El proveedor se elige internamente. Default: economy.'),
38746
38829
  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).'),
38747
38830
  videoAngleCount: z153.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."),
@@ -39159,22 +39242,24 @@ function registerTaskTools(server, api, { proxyBaseUrl = null, transport = "http
39159
39242
  server.registerTool("create_product_task", {
39160
39243
  description: createProductTaskGuidance.summary + ` ${createProductTaskDefaultDescription} \xDAsala cuando el usuario pide todo o varios outputs, no creando tareas individuales. Usa images para solicitudes directas. Usa projectId \xFAnicamente si el usuario pidi\xF3 expl\xEDcitamente continuar el proyecto guiado que acaba de costear; nunca busques, infieras ni menciones proyectos previos.
39161
39244
 
39162
- REQUERIDOS: images o projectId expl\xEDcito, language y country. Cuando los outputs incluyen video (tambi\xE9n por default), pregunta SIEMPRE videoAngleCount: 1, 2 o 3; es una decisi\xF3n de costo incluso con aiDecidesAll. Con video, pregunta tambi\xE9n si quiere el estudio de mercado (default: NO) mostrando la cotizaci\xF3n con y sin estudio de estimate_market_study_cost. Si falta una foto local, llama primero \`request_media_upload\`. Pregunta price, offer, paymentMethods y compareAtPrice cuando aplique; nunca asumas country/language.
39245
+ REQUERIDOS: images o projectId expl\xEDcito, language y country. Cuando los outputs incluyen video (tambi\xE9n por default), pregunta SIEMPRE videoAngleCount: 1, 2 o 3; es una decisi\xF3n de costo incluso con aiDecidesAll. Con video, usa Multiescena por defecto y respeta Un solo clip si el usuario lo pide y est\xE1 habilitado. Pregunta si quiere el estudio de mercado (default: NO) mostrando la cotizaci\xF3n con y sin estudio de estimate_market_study_cost. Si falta una foto local, llama primero \`request_media_upload\`. Pregunta price, offer, paymentMethods y compareAtPrice cuando aplique; nunca asumas country/language.
39163
39246
 
39164
- ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explica que inicia trabajo pagado y espera confirmaci\xF3n expl\xEDcita. aiDecidesAll omitido/false pausa para reviews conversacionales; muestra todos los \xE1ngulos candidatos y permite escoger/editar hasta el m\xE1ximo autorizado. Usa aiDecidesAll=true s\xF3lo si el usuario pidi\xF3 \u201Cdecide todo\u201D o \u201Cno me preguntes\u201D.`,
39247
+ ANTES de invocar, resume outputs, cantidad y formato de los videos y datos comerciales, explica que inicia trabajo pagado y espera confirmaci\xF3n expl\xEDcita. aiDecidesAll omitido/false pausa para reviews conversacionales; muestra todos los \xE1ngulos candidatos y permite escoger/editar hasta el m\xE1ximo autorizado. Usa aiDecidesAll=true s\xF3lo si el usuario pidi\xF3 \u201Cdecide todo\u201D o \u201Cno me preguntes\u201D.`,
39165
39248
  inputSchema: CreateProductTaskInput.shape,
39166
39249
  annotations: CREATES_PAID_OPEN_WORLD
39167
39250
  }, async (input) => {
39168
39251
  try {
39169
39252
  const selectedOutputs = input.outputs ?? DEFAULT_PRODUCT_TASK_OUTPUTS;
39253
+ const wireTier = input.videoTier ? resolveWireVideoTier(input.videoTier, input.durationSeconds) : void 0;
39254
+ const videoStructure = input.videoStructure ?? (wireTier === "single_call" ? "single_take" : DEFAULT_GUIDED_VIDEO_STRUCTURE);
39170
39255
  const videoPreset = selectedOutputs.includes("video") && input.competitorScanEnabled === true ? "auto" : input.videoPreset;
39171
- assertVideoPresetDurationCompatibility(videoPreset, input.durationSeconds, input.videoStructure, input.videoQuality);
39172
- assertAngleNarrativeDurationCompatibility(input.angleNarratives, input.durationSeconds, input.videoStructure);
39256
+ assertVideoPresetDurationCompatibility(videoPreset, input.durationSeconds, videoStructure, input.videoQuality);
39257
+ assertAngleNarrativeDurationCompatibility(input.angleNarratives, input.durationSeconds, videoStructure);
39173
39258
  if (input.animationStyle !== void 0 && !animationStyleApplies(videoPreset, input.angleNarratives)) {
39174
39259
  throw new Error("animationStyle solo aplica a narrativas animadas.");
39175
39260
  }
39176
39261
  if (selectedOutputs.includes("video")) {
39177
- assertSemanticVideoDurationCompatibility(input.videoStructure, input.videoQuality, input.durationSeconds);
39262
+ assertSemanticVideoDurationCompatibility(videoStructure, input.videoQuality, input.durationSeconds);
39178
39263
  }
39179
39264
  if (!input.images && !input.projectId && !input.winnerReference) {
39180
39265
  throw new Error("images, winnerReference o projectId es requerido.");
@@ -39188,7 +39273,7 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
39188
39273
  if (input.angleNarratives && input.videoAngleCount !== void 0 && input.angleNarratives.length > input.videoAngleCount) {
39189
39274
  throw new Error("angleNarratives no puede contener m\xE1s entradas que videoAngleCount.");
39190
39275
  }
39191
- await requirePaidCreativeConfirmation(server, `${selectedOutputs.join(", ")} para ${input.country}${selectedOutputs.includes("video") ? ` con ${input.videoAngleCount} video${input.videoAngleCount === 1 ? "" : "s"}` : ""}${input.price ? ` y precio ${input.price}` : ""}. Modo: ${input.aiDecidesAll === true ? "la IA decide todo" : "reviews conversacionales"}.${selectedOutputs.includes("landing") && input.landingMode === "code" ? " Landing de c\xF3digo editable." : ""}${selectedOutputs.includes("video") ? ` ${describeMarketStudyChoice(input.competitorScanEnabled === true || Boolean(input.angleNarratives?.includes("market")))}` : ""}`);
39276
+ await requirePaidCreativeConfirmation(server, `${selectedOutputs.join(", ")} para ${input.country}${selectedOutputs.includes("video") ? ` con ${input.videoAngleCount} video${input.videoAngleCount === 1 ? "" : "s"} en ${GUIDED_VIDEO_STRUCTURE_LABELS[videoStructure]}` : ""}${input.price ? ` y precio ${input.price}` : ""}. Modo: ${input.aiDecidesAll === true ? "la IA decide todo" : "reviews conversacionales"}.${selectedOutputs.includes("landing") && input.landingMode === "code" ? " Landing de c\xF3digo editable." : ""}${selectedOutputs.includes("video") ? ` ${describeMarketStudyChoice(input.competitorScanEnabled === true || Boolean(input.angleNarratives?.includes("market")))}` : ""}`);
39192
39277
  const resolvedInputImages = await resolveWinnerImages(api, input.winnerReference, input.images);
39193
39278
  const assetIds = resolvedInputImages ? uploadedAssetIds(resolvedInputImages) : null;
39194
39279
  const imgs = resolvedInputImages && !assetIds ? await resolveImages(resolvedInputImages.map(({ url: url3, path: path3 }) => ({
@@ -39202,7 +39287,6 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
39202
39287
  filename: `image-${i}.png`
39203
39288
  }));
39204
39289
  const resolved = resolveVideoPreset(videoPreset);
39205
- const wireTier = input.videoTier ? resolveWireVideoTier(input.videoTier, input.durationSeconds) : void 0;
39206
39290
  const reviewPolicy = resolveConversationalReviewPolicy(input.aiDecidesAll);
39207
39291
  const fields = {
39208
39292
  ...flatten({
@@ -39221,7 +39305,7 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
39221
39305
  "options.videoStyle": resolved?.videoStyle,
39222
39306
  "options.narrativeStyle": resolved?.narrativeStyle,
39223
39307
  "options.videoTier": wireTier,
39224
- "options.videoStructure": input.videoStructure,
39308
+ "options.videoStructure": videoStructure,
39225
39309
  "options.videoQuality": input.videoQuality,
39226
39310
  "options.ugcFormat": resolveVideoFormatForDuration(input.durationSeconds),
39227
39311
  "options.videoResolution": input.videoResolution,
@@ -41085,7 +41169,7 @@ var VideoInput = z157.object({
41085
41169
  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" (escenas sin di\xE1logo: 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.'),
41086
41170
  sound: ViralVideoSoundSchema.optional().describe('Solo para Viral. "music" = m\xFAsica (por defecto), "music_voiceover" = m\xFAsica y voz en off, "none" = sin sonido.'),
41087
41171
  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."),
41088
- 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.'),
41172
+ videoStructure: VideoStructureEnum.default(DEFAULT_GUIDED_VIDEO_STRUCTURE).describe(GUIDED_VIDEO_STRUCTURE_DESCRIPTION),
41089
41173
  videoQuality: VideoQualityEnum.default("economy").describe('Opcional. Calidad: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro. El sistema elige el proveedor internamente. Default: economy.'),
41090
41174
  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.'),
41091
41175
  features: z157.array(z157.string()).optional().describe('Opcional. Lista de features/beneficios clave a mencionar. Ej. ["resistente al agua", "bater\xEDa 24h", "carga inal\xE1mbrica"].'),
@@ -41393,7 +41477,7 @@ function registerCreativeTools(server, api, { transport = "http", proxyBaseUrl =
41393
41477
  }
41394
41478
  });
41395
41479
  server.registerTool("generate_video_creative", {
41396
- description: generateVideoCreativeGuidance.summary + " Devuelve un taskId. Esta solicitud es directa: nunca busques, reutilices ni menciones un DropshippingProject.\n\nREQUERIDOS: images (1-5 fotos), title, primaryAngle, language, country, aspectRatio, videoAngleCount y creativeSetup. Pregunta SIEMPRE cu\xE1ntos videos quiere (1, 2 o 3): la cantidad cambia el costo y no forma parte de \u2018la IA decide todo\u2019. Si falta una foto local, llama primero `request_media_upload` y usa los assetId; no pidas path ni URL. PREGUNTA price y offer si faltan; no asumas country/language.\n\nFORMATO Y CALIDAD: pregunta videoStructure (Un solo clip o Multiescena) y videoQuality (Econ\xF3mico, Medio o Pro). Un solo clip se genera completo y puede incluir cambios de plano. El sistema elige el proveedor internamente.\n\nCONFIGURACI\xD3N: salvo que el usuario diga expl\xEDcitamente que la IA decida todo, usa creativeSetup.mode=guided y pregunta si quiere el estudio de mercado (default: NO) mostrando la cotizaci\xF3n con y sin estudio de estimate_market_study_cost, y pregunta narrativa solo si no hay estudio de mercado; recoge p\xFAblico comprador, presentador (actor guardado, descripci\xF3n o ninguno) y direcci\xF3n creativa. Si el usuario dice qui\xE9n debe aparecer (mujer, hombre o ambos), env\xEDa creativeGender; no lo preguntes si no lo menciona. creativeDirection=null s\xF3lo despu\xE9s de que el usuario delegue esa decisi\xF3n concreta. No inventes valores de setup.\n\nANTES de invocar, muestra un resumen compacto que incluya cantidad, planificaci\xF3n (estudio de mercado o narrativa), p\xFAblico, presentador y direcci\xF3n y espera confirmaci\xF3n expl\xEDcita porque inicia trabajo pagado. Multiescena se factura por escena, as\xED que avisa ese mayor costo. Advierte tambi\xE9n que, si luego el usuario confirma que las fotos son de varios productos (combo), el pipeline r\xE1pido actualmente omite la pausa de guion aunque mantiene las dem\xE1s revisiones.\n\nREVIEWS: guided muestra los \xE1ngulos candidatos y permite escoger hasta videoAngleCount, editar cada \xE1ngulo y revisar sus guiones. automatic equivale al toggle web \u201CDejar que la IA decida todo\u201D y omite ambas reviews. scriptNotes agrega restricciones al guion; get_video_script y approve_video_script manejan la review palabra por palabra.",
41480
+ description: generateVideoCreativeGuidance.summary + " Devuelve un taskId. Esta solicitud es directa: nunca busques, reutilices ni menciones un DropshippingProject.\n\nREQUERIDOS: images (1-5 fotos), title, primaryAngle, language, country, aspectRatio, videoAngleCount y creativeSetup. Pregunta SIEMPRE cu\xE1ntos videos quiere (1, 2 o 3): la cantidad cambia el costo y no forma parte de \u2018la IA decide todo\u2019. Si falta una foto local, llama primero `request_media_upload` y usa los assetId; no pidas path ni URL. PREGUNTA price y offer si faltan; no asumas country/language.\n\nFORMATO Y CALIDAD: usa Multiescena por defecto y respeta Un solo clip si el usuario lo pide y est\xE1 habilitado. Pregunta videoQuality (Econ\xF3mico, Medio o Pro). El sistema elige el proveedor internamente.\n\nCONFIGURACI\xD3N: salvo que el usuario diga expl\xEDcitamente que la IA decida todo, usa creativeSetup.mode=guided y pregunta si quiere el estudio de mercado (default: NO) mostrando la cotizaci\xF3n con y sin estudio de estimate_market_study_cost, y pregunta narrativa solo si no hay estudio de mercado; recoge p\xFAblico comprador, presentador (actor guardado, descripci\xF3n o ninguno) y direcci\xF3n creativa. Si el usuario dice qui\xE9n debe aparecer (mujer, hombre o ambos), env\xEDa creativeGender; no lo preguntes si no lo menciona. creativeDirection=null s\xF3lo despu\xE9s de que el usuario delegue esa decisi\xF3n concreta. No inventes valores de setup.\n\nANTES de invocar, muestra un resumen compacto que incluya cantidad, formato, planificaci\xF3n (estudio de mercado o narrativa), p\xFAblico, presentador y direcci\xF3n y espera confirmaci\xF3n expl\xEDcita porque inicia trabajo pagado. Muestra la cotizaci\xF3n del formato elegido y explica que Multiescena se factura por escena. Advierte tambi\xE9n que, si luego el usuario confirma que las fotos son de varios productos (combo), el pipeline r\xE1pido actualmente omite la pausa de guion aunque mantiene las dem\xE1s revisiones.\n\nREVIEWS: guided muestra los \xE1ngulos candidatos y permite escoger hasta videoAngleCount, editar cada \xE1ngulo y revisar sus guiones. automatic equivale al toggle web \u201CDejar que la IA decida todo\u201D y omite ambas reviews. scriptNotes agrega restricciones al guion; get_video_script y approve_video_script manejan la review palabra por palabra.",
41397
41481
  inputSchema: VideoInput.shape,
41398
41482
  annotations: CREATES_PAID_OPEN_WORLD
41399
41483
  }, async (input) => {
@@ -41406,7 +41490,8 @@ function registerCreativeTools(server, api, { transport = "http", proxyBaseUrl =
41406
41490
  throw new Error("angleNarratives no puede contener m\xE1s entradas que videoAngleCount.");
41407
41491
  }
41408
41492
  const marketStudyEnabled = input.competitorScanEnabled === true || Boolean(input.angleNarratives?.includes("market"));
41409
- await requirePaidCreativeConfirmation(server, input.creativeSetup.mode === "automatic" ? `${input.videoAngleCount} video${input.videoAngleCount === 1 ? "" : "s"} de ${input.durationSeconds}s para \u201C${input.title}\u201D en ${input.country}. Configuraci\xF3n: la IA decide todo. ${describeMarketStudyChoice(marketStudyEnabled)}` : `${input.videoAngleCount} video${input.videoAngleCount === 1 ? "" : "s"} de ${input.durationSeconds}s para \u201C${input.title}\u201D en ${input.country}. Planificaci\xF3n: ${input.competitorScanEnabled === true ? "an\xE1lisis de mercado" : input.creativeSetup.videoPreset}. ${describeMarketStudyChoice(marketStudyEnabled)} P\xFAblico: ${input.creativeSetup.buyerPersona}. Presentador: ${input.creativeSetup.presenter.mode}. Direcci\xF3n: ${input.creativeSetup.creativeDirection ?? "la IA decide"}. Si despu\xE9s confirmas que las fotos son de varios productos (combo), el pipeline r\xE1pido omite actualmente la pausa de revisi\xF3n del guion.`);
41493
+ const format = GUIDED_VIDEO_STRUCTURE_LABELS[input.videoStructure];
41494
+ await requirePaidCreativeConfirmation(server, input.creativeSetup.mode === "automatic" ? `${input.videoAngleCount} video${input.videoAngleCount === 1 ? "" : "s"} de ${input.durationSeconds}s para \u201C${input.title}\u201D en ${input.country}. Formato: ${format}. Configuraci\xF3n: la IA decide todo. ${describeMarketStudyChoice(marketStudyEnabled)}` : `${input.videoAngleCount} video${input.videoAngleCount === 1 ? "" : "s"} de ${input.durationSeconds}s para \u201C${input.title}\u201D en ${input.country}. Formato: ${format}. Planificaci\xF3n: ${input.competitorScanEnabled === true ? "an\xE1lisis de mercado" : input.creativeSetup.videoPreset}. ${describeMarketStudyChoice(marketStudyEnabled)} P\xFAblico: ${input.creativeSetup.buyerPersona}. Presentador: ${input.creativeSetup.presenter.mode}. Direcci\xF3n: ${input.creativeSetup.creativeDirection ?? "la IA decide"}. Si despu\xE9s confirmas que las fotos son de varios productos (combo), el pipeline r\xE1pido omite actualmente la pausa de revisi\xF3n del guion.`);
41410
41495
  const guidedSetup = input.creativeSetup.mode === "guided" ? input.creativeSetup : null;
41411
41496
  const videoPreset = input.competitorScanEnabled === true ? "auto" : guidedSetup?.videoPreset ?? "auto";
41412
41497
  assertVideoPresetDurationCompatibility(videoPreset, input.durationSeconds, input.videoStructure, input.videoQuality);
@@ -45892,7 +45977,7 @@ var EstimateMarketStudyInput = z173.object({
45892
45977
  ]).describe('"video" para generate_video_creative; "product_task" para create_product_task.'),
45893
45978
  videoAngleCount: z173.number().int().min(1).max(3).describe("Los mismos 1, 2 o 3 videos que vas a pedir al crear."),
45894
45979
  durationSeconds: z173.number().int().min(4).max(30).default(15).describe("La misma duraci\xF3n que enviar\xE1s al crear."),
45895
- videoStructure: VideoStructureEnum.default("single_take"),
45980
+ videoStructure: VideoStructureEnum.default(DEFAULT_GUIDED_VIDEO_STRUCTURE),
45896
45981
  videoQuality: VideoQualityEnum.default("economy"),
45897
45982
  videoResolution: VideoResolutionEnum.default("480p"),
45898
45983
  productImageCount: z173.number().int().min(1).max(5).optional().describe("Cantidad de fotos del producto que adjuntar\xE1s (1-5)."),
@@ -45958,6 +46043,9 @@ function buildMarketStudyEstimateRequests(input) {
45958
46043
  type: "ingest-resume",
45959
46044
  options: {
45960
46045
  ...common,
46046
+ ...videoGeneratorEnabled ? {
46047
+ forNewVideo: true
46048
+ } : {},
45961
46049
  landingEnabled: outputs.includes("landing"),
45962
46050
  adCreativeEnabled: outputs.includes("image"),
45963
46051
  generateCreative: outputs.includes("image"),
@@ -45975,6 +46063,15 @@ function buildMarketStudyEstimateRequests(input) {
45975
46063
  };
45976
46064
  }
45977
46065
  __name(buildMarketStudyEstimateRequests, "buildMarketStudyEstimateRequests");
46066
+ function requireAvailableEstimate(estimate) {
46067
+ if (!("unavailable" in estimate)) return estimate;
46068
+ const { code, message } = estimate.unavailable;
46069
+ if (code === McpErrorCode.VIDEO_SINGLE_TAKE_DISABLED) {
46070
+ throw mcp(code, `${message} Cotiza Multiescena y pide confirmaci\xF3n antes de crear el video.`);
46071
+ }
46072
+ throw mcp(McpErrorCode.INVALID_INPUT, message);
46073
+ }
46074
+ __name(requireAvailableEstimate, "requireAvailableEstimate");
45978
46075
  function summarize(estimate) {
45979
46076
  return {
45980
46077
  typicalCredits: estimate.estimatedCostCredits,
@@ -45986,23 +46083,24 @@ function summarize(estimate) {
45986
46083
  __name(summarize, "summarize");
45987
46084
  function registerMarketStudyEstimateTools(server, api) {
45988
46085
  server.registerTool("estimate_market_study_cost", {
45989
- description: estimateMarketStudyGuidance.summary + " Devuelve dos cotizaciones con la misma configuraci\xF3n: sin estudio de mercado (el default: si omites competitorScanEnabled al crear, NO se hace el estudio) y con estudio. No consume cr\xE9ditos. Muestra ambas cifras al usuario, preg\xFAntale si quiere el estudio y env\xEDa competitorScanEnabled=true en generate_video_creative o create_product_task solo si lo acepta.",
46086
+ description: estimateMarketStudyGuidance.summary + " Usa el mismo formato que al crear el video (Multiescena por defecto). Devuelve dos cotizaciones con la misma configuraci\xF3n: sin estudio de mercado (el default: si omites competitorScanEnabled al crear, NO se hace el estudio) y con estudio. No consume cr\xE9ditos. Muestra ambas cifras al usuario, preg\xFAntale si quiere el estudio y env\xEDa competitorScanEnabled=true en generate_video_creative o create_product_task solo si lo acepta.",
45990
46087
  inputSchema: EstimateMarketStudyInput.shape,
45991
46088
  annotations: READS_INTERNAL
45992
46089
  }, async (rawInput) => {
45993
46090
  try {
45994
46091
  const input = EstimateMarketStudyInput.parse(rawInput);
45995
46092
  const { withoutStudy, withStudy } = buildMarketStudyEstimateRequests(input);
45996
- const { estimates } = await api.postJson("/v1/billing/estimate/batch", {
46093
+ const { estimates: [withoutEstimate, withEstimate] } = CostEstimationBatchResponse.parse(await api.postJson("/v1/billing/estimate/batch", {
45997
46094
  requests: [
45998
46095
  withoutStudy,
45999
46096
  withStudy
46000
46097
  ]
46001
- });
46002
- const [without, withMarket] = estimates;
46003
- if (!without || !withMarket) {
46098
+ }));
46099
+ if (!withoutEstimate || !withEstimate) {
46004
46100
  throw new Error("La cotizaci\xF3n no devolvi\xF3 ambas opciones.");
46005
46101
  }
46102
+ const without = requireAvailableEstimate(withoutEstimate);
46103
+ const withMarket = requireAvailableEstimate(withEstimate);
46006
46104
  return asText({
46007
46105
  kind: input.kind,
46008
46106
  withoutMarketStudy: summarize(without),
package/dist/stdio.js CHANGED
@@ -949,6 +949,20 @@ var DEFAULT_PRICING = {
949
949
  ourCostCents: 20,
950
950
  userPriceCents: 40
951
951
  },
952
+ // Video Mix mask legs (scene person/setting replacement). Published Fal
953
+ // rates read 2026-11-18: SAM 3 video "$0.005 per 16 frames of video input"
954
+ // (fal.ai/models/fal-ai/sam-3/video; spike: ~5¢ per 5 s at 30 fps) and
955
+ // Depth Anything Video "$0.04 per second of video"
956
+ // (fal.ai/models/fal-ai/depth-anything-video; spike: ~20¢ per 5 s).
957
+ // Retail keeps the 2x house markup.
958
+ "fal:video-segmentation:sam3-video-per16frames": {
959
+ ourCostCents: 0.5,
960
+ userPriceCents: 1
961
+ },
962
+ "fal:video-depth-estimation:depth-anything-video-persec": {
963
+ ourCostCents: 4,
964
+ userPriceCents: 8
965
+ },
952
966
  // Seedance 2.5 (bytedance/seedance-2-5) — explicit per-second pricing.
953
967
  // Image/audio references use the no-video rate; only a real video reference
954
968
  // uses the with-video rate. Units are USD cents per provider second.
@@ -5975,6 +5989,14 @@ var CreativeEngineRecipeSchema = z14.object({
5975
5989
  productReferencePolicy: z14.literal("clean_gallery_v1").optional(),
5976
5990
  /** Frozen reviewer-only read model; absent keeps historical full request context. */
5977
5991
  reviewerContextPolicy: z14.literal("selected_commercial_v1").optional(),
5992
+ /**
5993
+ * New recipes: a final review whose criticals span several scenes is
5994
+ * repaired sequentially, prioritizing untouched scenes, each within its own
5995
+ * repair allowance and the run cap; the next final review re-judges
5996
+ * the rest (9ed223b0, 2026-11-16). Absent keeps the historical rule:
5997
+ * only a single-scene rejection has a repair target.
5998
+ */
5999
+ finalRepairPolicy: z14.literal("scene_by_scene_v1").optional(),
5978
6000
  /**
5979
6001
  * Frozen at entry: a scene_patch_v1 director repair and every
5980
6002
  * inputs/asset scene review read the scene-scoped context (no research
@@ -6724,6 +6746,30 @@ var CreativeEngineRetainedSceneCandidateBindingSchema = z14.object({
6724
6746
  candidates: z14.array(CreativeEngineCandidateSchema),
6725
6747
  reviews: z14.array(CreativeEngineReviewSchema)
6726
6748
  }).strict();
6749
+ var CreativeEngineSpeechWindowRepairStateSchema = z14.object({
6750
+ candidateId: id2,
6751
+ routingHash: hash,
6752
+ windowId: id2,
6753
+ failedOperationId: id2,
6754
+ /**
6755
+ * Paid-take index being bought for the window (1..paidRetakesMax+1).
6756
+ * A window whose only failure was a confirmed zero-usage take re-buys
6757
+ * the same index; historical receipts pin 2.
6758
+ */
6759
+ attempt: z14.number().int().min(1).max(CREATIVE_ENGINE_MEDIA_RECOVERY_POLICY.paidRetakesMax + 1),
6760
+ supersededCandidateIds: z14.array(id2).max(128).optional()
6761
+ }).strict();
6762
+ var CreativeEngineFinalRepairFallbackSchema = z14.object({
6763
+ owner: CreativeEngineOwnerSchema,
6764
+ plan: CreativeEnginePlanSchema,
6765
+ preparedInputs: z14.array(CreativeEnginePreparedInputsSchema),
6766
+ retainedSceneCandidates: z14.array(CreativeEngineRetainedSceneCandidateBindingSchema).optional(),
6767
+ speechWindowRepair: CreativeEngineSpeechWindowRepairStateSchema.optional(),
6768
+ sceneTiming: CreativeEngineSceneTimingSchema.optional(),
6769
+ selection: z14.record(z14.string(), id2),
6770
+ final: CreativeEngineFinalSchema,
6771
+ reviewId: id2
6772
+ }).strict();
6727
6773
  var CreativeEngineStateSchema = z14.object({
6728
6774
  schemaVersion: z14.union([
6729
6775
  z14.literal(1),
@@ -6758,19 +6804,7 @@ var CreativeEngineStateSchema = z14.object({
6758
6804
  retainedSceneCandidates: z14.array(CreativeEngineRetainedSceneCandidateBindingSchema).optional(),
6759
6805
  inheritedSceneOutputs: z14.array(CreativeEngineInheritedSceneOutputSchema).optional(),
6760
6806
  speechRoutings: z14.array(CreativeEngineSpeechRoutingSchema).optional(),
6761
- speechWindowRepair: z14.object({
6762
- candidateId: id2,
6763
- routingHash: hash,
6764
- windowId: id2,
6765
- failedOperationId: id2,
6766
- /**
6767
- * Paid-take index being bought for the window (1..paidRetakesMax+1).
6768
- * A window whose only failure was a confirmed zero-usage take re-buys
6769
- * the same index; historical receipts pin 2.
6770
- */
6771
- attempt: z14.number().int().min(1).max(CREATIVE_ENGINE_MEDIA_RECOVERY_POLICY.paidRetakesMax + 1),
6772
- supersededCandidateIds: z14.array(id2).max(128).optional()
6773
- }).strict().optional(),
6807
+ speechWindowRepair: CreativeEngineSpeechWindowRepairStateSchema.optional(),
6774
6808
  selection: z14.record(z14.string(), id2),
6775
6809
  selectionManifestHash: hash.optional(),
6776
6810
  operations: z14.array(CreativeEngineOperationSchema),
@@ -6851,8 +6885,20 @@ var CreativeEngineStateSchema = z14.object({
6851
6885
  repairAuthorContractRetry: CreativeEngineRepairAuthorContractRetrySchema.optional(),
6852
6886
  replanAuthorContractRetry: CreativeEngineReplanAuthorContractRetrySchema.optional(),
6853
6887
  directorTransportRetry: CreativeEngineDirectorTransportRetrySchema.optional(),
6854
- final: CreativeEngineFinalSchema.optional()
6888
+ final: CreativeEngineFinalSchema.optional(),
6889
+ finalRepairFallback: CreativeEngineFinalRepairFallbackSchema.optional()
6855
6890
  }).strict().superRefine((state, ctx) => {
6891
+ const fallback = state.finalRepairFallback;
6892
+ if (fallback) {
6893
+ const matchesContext = /* @__PURE__ */ __name((context) => context.physicalRevision === state.context.physicalRevision && context.physicalHash === state.context.physicalHash && context.commercialHash === state.context.commercialHash && context.referencesHash === state.context.referencesHash, "matchesContext");
6894
+ if (state.recipe.capabilities.finalRepairPolicy !== "scene_by_scene_v1" || fallback.owner.taskId !== state.owner.taskId || fallback.owner.angleKey !== state.owner.angleKey || fallback.owner.creativeRevision !== state.owner.creativeRevision || !matchesContext(fallback.plan.context) || !state.reviews.some((review) => review.id === fallback.reviewId && review.gate === "final" && review.verdict === "rejected" && review.subjectHash === fallback.final.outputHash && review.manifestHash === fallback.final.manifestHash && review.planRevision === fallback.plan.revision && matchesContext(review.context))) ctx.addIssue({
6895
+ code: z14.ZodIssueCode.custom,
6896
+ message: "Prior final must match its owner, context and review",
6897
+ path: [
6898
+ "finalRepairFallback"
6899
+ ]
6900
+ });
6901
+ }
6856
6902
  const repairAuthorContractRetry = state.repairAuthorContractRetry;
6857
6903
  if (repairAuthorContractRetry && (state.status !== "repair_pending" || state.repairSceneId !== repairAuthorContractRetry.sceneId || state.plan?.hash !== repairAuthorContractRetry.planHash || Object.entries(state.context).some(([key2, value]) => repairAuthorContractRetry.context[key2] !== value))) ctx.addIssue({
6858
6904
  code: z14.ZodIssueCode.custom,
@@ -6994,6 +7040,11 @@ var CreativeEngineEventSchema = z14.discriminatedUnion("type", [
6994
7040
  manifestHash: hash,
6995
7041
  assetKey
6996
7042
  }).strict(),
7043
+ z14.object({
7044
+ type: z14.literal("final_repair_fallback_selected"),
7045
+ outputHash: hash,
7046
+ assetKey
7047
+ }).strict(),
6997
7048
  z14.object({
6998
7049
  type: z14.literal("delivered")
6999
7050
  }).strict(),
@@ -9864,7 +9915,7 @@ var LandingConfigSchema = z28.object({
9864
9915
  });
9865
9916
  var CODE_LANDING_SCHEMA_VERSION = 1;
9866
9917
  var CODE_LANDING_RUNTIME_VERSION = 1;
9867
- var MAX_STOREFRONT_LANDING_BYTES = 110 * 1024;
9918
+ var MAX_STOREFRONT_LANDING_BYTES = 120 * 1024;
9868
9919
  var UTF8_ENCODER = new TextEncoder();
9869
9920
  function measureUtf8Bytes(value) {
9870
9921
  return UTF8_ENCODER.encode(value).length;
@@ -15124,6 +15175,8 @@ var IngestEstimationOptions = z53.object({
15124
15175
  aiEditAngleTiers: z53.array(AiEditTierSchema.nullable()).max(3).optional()
15125
15176
  });
15126
15177
  var IngestResumeEstimationOptions = z53.object({
15178
+ /** Autopilot quotes before creation share new video admission. Saved resumes omit this. */
15179
+ forNewVideo: z53.literal(true).optional(),
15127
15180
  sourceProductUrl: z53.string().max(4096).optional(),
15128
15181
  /** Number of product references already submitted by extract for cleaning. */
15129
15182
  productImageCount: z53.number().int().min(1).max(INGEST_MAX_REFERENCE_IMAGES).optional(),
@@ -15182,6 +15235,8 @@ var IngestResumeEstimationOptions = z53.object({
15182
15235
  styleMix: z53.boolean().optional()
15183
15236
  });
15184
15237
  var VideoCreativeEstimationOptions = z53.object({
15238
+ /** Owner-verified existing direct video only. New quotes omit it. */
15239
+ continuationTaskId: z53.string().min(1).max(128).optional(),
15185
15240
  sourceProductUrl: z53.string().max(4096).optional(),
15186
15241
  /** Direct free-video flow: one provider clip, no extraction/angles pipeline. */
15187
15242
  videoMode: z53.enum([
@@ -15514,6 +15569,7 @@ var CostEstimationBatchRequest = z53.object({
15514
15569
  requests: z53.array(CostEstimationRequest).min(1).max(COST_ESTIMATION_BATCH_LIMIT)
15515
15570
  });
15516
15571
  var CostEstimationUnavailableCode = z53.enum([
15572
+ "VIDEO_SINGLE_TAKE_DISABLED",
15517
15573
  "CREATIVE_ENGINE_VIDEO_QUALITY_NOT_ADMITTED",
15518
15574
  "CREATIVE_ENGINE_VIDEO_RESOLUTION_NOT_ADMITTED",
15519
15575
  "STRUCTURE_NOT_ADMITTED",
@@ -18054,6 +18110,9 @@ var FeatureSpec = z68.object({
18054
18110
  }
18055
18111
  });
18056
18112
 
18113
+ // ../../packages/types/src/guided-video-format-policy.ts
18114
+ var DEFAULT_GUIDED_VIDEO_STRUCTURE = "multi_scene";
18115
+
18057
18116
  // ../../packages/types/src/mix.ts
18058
18117
  import { z as z70 } from "zod";
18059
18118
 
@@ -18101,7 +18160,9 @@ var MIX_DEGRADATION_REASONS = [
18101
18160
  */
18102
18161
  "scene_length_unsupported",
18103
18162
  /** Transient provider failures exhausted the budget. */
18104
- "provider_unavailable"
18163
+ "provider_unavailable",
18164
+ /** The primary renders did not pass the quality checks within the budget. */
18165
+ "quality_retries_exhausted"
18105
18166
  ];
18106
18167
  var MixDegradationReasonSchema = z69.enum(MIX_DEGRADATION_REASONS);
18107
18168
 
@@ -25149,7 +25210,8 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
25149
25210
  // MCP 12.8.0: + manual-only, cohort-gated «viral» preset/angle narrative.
25150
25211
  // MCP 12.18.1: «viral» prose admits Un solo clip (15 s).
25151
25212
  // MCP 12.19.0: + landingMode (classic | code landing).
25152
- "e49ee21258709cc33dc72b68095723a960e9aa9d8c747af05e4b513de0866cf5",
25213
+ // MCP 12.25.0: Multiescena predeterminada para videos nuevos.
25214
+ "90ba32108e2a484d662b9441e7facf246fad166933d42f4659831f16801b6b12",
25153
25215
  "credit_consuming",
25154
25216
  "creative",
25155
25217
  [
@@ -25393,31 +25455,42 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
25393
25455
  "cost_estimate"
25394
25456
  ]
25395
25457
  ),
25396
- defineCapability("estimate_market_study_cost", "d1fbe8ead642d481258c419a1eed059f9c8188d1cd9f2d4eed12e202fc8800a4", "none", "read_only", [
25397
- "read"
25398
- ], [
25399
- slot("creative_kind", true, [
25400
- "kind"
25401
- ], []),
25402
- slot("video_configuration", true, [
25403
- "videoAngleCount",
25404
- "durationSeconds",
25405
- "videoStructure",
25406
- "videoQuality",
25407
- "videoResolution"
25408
- ], []),
25409
- slot("estimate_options", false, [
25410
- "productImageCount",
25411
- "outputs",
25412
- "generateAiMusic",
25413
- "generateAiEdit",
25414
- "replicateWinnerWhenFound"
25415
- ], [])
25416
- ], [
25417
- "creative"
25418
- ], [
25419
- "cost_estimate"
25420
- ], MCP_ONLY_CHANNEL_EXPOSURE),
25458
+ defineCapability(
25459
+ "estimate_market_study_cost",
25460
+ // MCP 12.25.0: Multiescena predeterminada para videos nuevos.
25461
+ "d7b3570035bfc209cc3a4e30de8feeb35c11fae99663e17cc5a5fcf57e32bf81",
25462
+ "none",
25463
+ "read_only",
25464
+ [
25465
+ "read"
25466
+ ],
25467
+ [
25468
+ slot("creative_kind", true, [
25469
+ "kind"
25470
+ ], []),
25471
+ slot("video_configuration", true, [
25472
+ "videoAngleCount",
25473
+ "durationSeconds",
25474
+ "videoStructure",
25475
+ "videoQuality",
25476
+ "videoResolution"
25477
+ ], []),
25478
+ slot("estimate_options", false, [
25479
+ "productImageCount",
25480
+ "outputs",
25481
+ "generateAiMusic",
25482
+ "generateAiEdit",
25483
+ "replicateWinnerWhenFound"
25484
+ ], [])
25485
+ ],
25486
+ [
25487
+ "creative"
25488
+ ],
25489
+ [
25490
+ "cost_estimate"
25491
+ ],
25492
+ MCP_ONLY_CHANNEL_EXPOSURE
25493
+ ),
25421
25494
  defineCapability("find_winning_products", "b73a18bb9618b96067b17791bf2f8e7450e17e34881c4f997e117be89abe058d", "credit_consuming", "business", [
25422
25495
  "credit_consuming",
25423
25496
  "state_change"
@@ -25730,7 +25803,8 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
25730
25803
  // MCP 12.8.0: + manual-only, cohort-gated «viral» preset/angle narrative.
25731
25804
  // MCP 12.18.1: «viral» prose admits Un solo clip (15 s).
25732
25805
  // MCP 12.19.0: + landingMode (classic | code landing).
25733
- "f5a29286e126209c790850a961e9049f1c4d65be75889985d9e73359742ff7cc",
25806
+ // MCP 12.25.0: Multiescena predeterminada para videos nuevos.
25807
+ "9b0169fe939bd43c9a0fd64de8308e143b388ab38dd3cc0d0b95182ca85f44eb",
25734
25808
  "credit_consuming",
25735
25809
  "creative",
25736
25810
  [
@@ -33040,7 +33114,7 @@ var ApiClient = class {
33040
33114
  };
33041
33115
 
33042
33116
  // src/index.ts
33043
- var MCP_VERSION = "12.24.0";
33117
+ var MCP_VERSION = "12.25.0";
33044
33118
 
33045
33119
  // src/meta-upload-app.ts
33046
33120
  import { readFileSync } from "fs";
@@ -34068,6 +34142,11 @@ var VideoPresetEnum = VideoPreset.extract([
34068
34142
  "viral"
34069
34143
  ]);
34070
34144
  var VideoStructureEnum = VideoStructure;
34145
+ var GUIDED_VIDEO_STRUCTURE_LABELS = {
34146
+ multi_scene: "Multiescena",
34147
+ single_take: "Un solo clip"
34148
+ };
34149
+ var GUIDED_VIDEO_STRUCTURE_DESCRIPTION = 'Opcional. Formato: "multi_scene" = Multiescena (predeterminado); "single_take" = Un solo clip (generado completo, con posibles cambios de plano) si est\xE1 habilitado.';
34071
34150
  var VideoQualityEnum = VideoQuality;
34072
34151
  var VideoRouteIdEnum = VideoRouteId;
34073
34152
  var TaskCreativeVariantVideoPresetEnum = TaskCreativeVariantVideoPreset;
@@ -34410,6 +34489,7 @@ var McpErrorCode = {
34410
34489
  SERVICE_VIDEO_SNAPSHOT_UNAVAILABLE: "SERVICE_VIDEO_SNAPSHOT_UNAVAILABLE",
34411
34490
  // Input
34412
34491
  INVALID_INPUT: "INVALID_INPUT",
34492
+ VIDEO_SINGLE_TAKE_DISABLED: "VIDEO_SINGLE_TAKE_DISABLED",
34413
34493
  INSUFFICIENT_CREDITS: "INSUFFICIENT_CREDITS",
34414
34494
  FEATURE_NOT_AVAILABLE: "FEATURE_NOT_AVAILABLE",
34415
34495
  TASK_QUOTA_EXCEEDED: "TASK_QUOTA_EXCEEDED",
@@ -34598,6 +34678,7 @@ var McpErrorCode = {
34598
34678
  INTERNAL: "INTERNAL"
34599
34679
  };
34600
34680
  var CODE_MESSAGES = {
34681
+ VIDEO_SINGLE_TAKE_DISABLED: "Single Take is disabled for new videos. Quote Multi Scene and ask for confirmation before creating the video.",
34601
34682
  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.",
34602
34683
  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.",
34603
34684
  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.",
@@ -34799,6 +34880,7 @@ var AGENT_MEMORY_CODES = [
34799
34880
  McpErrorCode.AGENT_SHOP_REQUIRED
34800
34881
  ];
34801
34882
  var INVALID_PARAM_CODES = /* @__PURE__ */ new Set([
34883
+ McpErrorCode.VIDEO_SINGLE_TAKE_DISABLED,
34802
34884
  // Input/auth
34803
34885
  McpErrorCode.INVALID_INPUT,
34804
34886
  McpErrorCode.INSUFFICIENT_CREDITS,
@@ -34932,6 +35014,7 @@ var INVALID_PARAM_CODES = /* @__PURE__ */ new Set([
34932
35014
  McpErrorCode.NO_META_AD_ACCOUNTS
34933
35015
  ]);
34934
35016
  var PASSTHROUGH_CODES = /* @__PURE__ */ new Set([
35017
+ McpErrorCode.VIDEO_SINGLE_TAKE_DISABLED,
34935
35018
  McpErrorCode.USER_NOT_PROVISIONED,
34936
35019
  McpErrorCode.CREDIT_ADMISSION_UNAVAILABLE,
34937
35020
  McpErrorCode.INSUFFICIENT_CREDITS,
@@ -35180,7 +35263,7 @@ function translateError(err) {
35180
35263
  const message = resolveMessage(body.code, void 0);
35181
35264
  return mcp(body.code, saved2 ? `Commerce changes were saved. ${message}` : message, extra);
35182
35265
  }
35183
- const messageCode = typeof body.message === "string" && /^VOICE_[A-Z0-9_]+$/.test(body.message) ? body.message : void 0;
35266
+ const messageCode = typeof body.message === "string" && (/^VOICE_[A-Z0-9_]+$/.test(body.message) || body.message === McpErrorCode.VIDEO_SINGLE_TAKE_DISABLED) ? body.message : void 0;
35184
35267
  const rawCode = (typeof body.code === "string" ? body.code : void 0) ?? messageCode;
35185
35268
  const code = rawCode === "INSUFFICIENT_CREDIT" ? McpErrorCode.INSUFFICIENT_CREDITS : rawCode;
35186
35269
  if (code && PASSTHROUGH_CODES.has(code)) {
@@ -37216,17 +37299,17 @@ var CreateProductTaskInput = z152.object({
37216
37299
  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.'),
37217
37300
  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."),
37218
37301
  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.'),
37219
- 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 con escenas sin di\xE1logo y 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.'),
37302
+ 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 15 o 30 segundos seg\xFAn el formato y la calidad, 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 con escenas sin di\xE1logo y 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.'),
37220
37303
  sound: ViralVideoSoundSchema.optional().describe('Solo para Viral. "music" = m\xFAsica (por defecto), "music_voiceover" = m\xFAsica y voz en off, "none" = sin sonido.'),
37221
37304
  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.'),
37222
37305
  durationSeconds: z152.union([
37223
37306
  z152.literal(15),
37224
37307
  z152.literal(30)
37225
- ]).default(15).describe("Opcional. Duraci\xF3n objetivo del video: 15s (single_call, default) o 30s (Multiescena, aproximadamente 30s y facturado por escena)."),
37308
+ ]).default(15).describe("Opcional. Duraci\xF3n objetivo: Multiescena admite 15 o 30 segundos; Un solo clip admite 15 segundos o 30 en Pro. Default: 15 segundos."),
37226
37309
  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."),
37227
37310
  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."),
37228
- 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.'),
37229
- 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.'),
37311
+ videoTier: VideoTierEnum.optional().describe("Compatibilidad con clientes antiguos. Usa videoStructure para solicitudes nuevas."),
37312
+ videoStructure: VideoStructureEnum.optional().describe(GUIDED_VIDEO_STRUCTURE_DESCRIPTION),
37230
37313
  videoQuality: VideoQualityEnum.default("economy").describe('Opcional. Calidad: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro. El proveedor se elige internamente. Default: economy.'),
37231
37314
  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).'),
37232
37315
  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."),
@@ -37644,22 +37727,24 @@ function registerTaskTools(server, api, { proxyBaseUrl = null, transport = "http
37644
37727
  server.registerTool("create_product_task", {
37645
37728
  description: createProductTaskGuidance.summary + ` ${createProductTaskDefaultDescription} \xDAsala cuando el usuario pide todo o varios outputs, no creando tareas individuales. Usa images para solicitudes directas. Usa projectId \xFAnicamente si el usuario pidi\xF3 expl\xEDcitamente continuar el proyecto guiado que acaba de costear; nunca busques, infieras ni menciones proyectos previos.
37646
37729
 
37647
- REQUERIDOS: images o projectId expl\xEDcito, language y country. Cuando los outputs incluyen video (tambi\xE9n por default), pregunta SIEMPRE videoAngleCount: 1, 2 o 3; es una decisi\xF3n de costo incluso con aiDecidesAll. Con video, pregunta tambi\xE9n si quiere el estudio de mercado (default: NO) mostrando la cotizaci\xF3n con y sin estudio de estimate_market_study_cost. Si falta una foto local, llama primero \`request_media_upload\`. Pregunta price, offer, paymentMethods y compareAtPrice cuando aplique; nunca asumas country/language.
37730
+ REQUERIDOS: images o projectId expl\xEDcito, language y country. Cuando los outputs incluyen video (tambi\xE9n por default), pregunta SIEMPRE videoAngleCount: 1, 2 o 3; es una decisi\xF3n de costo incluso con aiDecidesAll. Con video, usa Multiescena por defecto y respeta Un solo clip si el usuario lo pide y est\xE1 habilitado. Pregunta si quiere el estudio de mercado (default: NO) mostrando la cotizaci\xF3n con y sin estudio de estimate_market_study_cost. Si falta una foto local, llama primero \`request_media_upload\`. Pregunta price, offer, paymentMethods y compareAtPrice cuando aplique; nunca asumas country/language.
37648
37731
 
37649
- ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explica que inicia trabajo pagado y espera confirmaci\xF3n expl\xEDcita. aiDecidesAll omitido/false pausa para reviews conversacionales; muestra todos los \xE1ngulos candidatos y permite escoger/editar hasta el m\xE1ximo autorizado. Usa aiDecidesAll=true s\xF3lo si el usuario pidi\xF3 \u201Cdecide todo\u201D o \u201Cno me preguntes\u201D.`,
37732
+ ANTES de invocar, resume outputs, cantidad y formato de los videos y datos comerciales, explica que inicia trabajo pagado y espera confirmaci\xF3n expl\xEDcita. aiDecidesAll omitido/false pausa para reviews conversacionales; muestra todos los \xE1ngulos candidatos y permite escoger/editar hasta el m\xE1ximo autorizado. Usa aiDecidesAll=true s\xF3lo si el usuario pidi\xF3 \u201Cdecide todo\u201D o \u201Cno me preguntes\u201D.`,
37650
37733
  inputSchema: CreateProductTaskInput.shape,
37651
37734
  annotations: CREATES_PAID_OPEN_WORLD
37652
37735
  }, async (input) => {
37653
37736
  try {
37654
37737
  const selectedOutputs = input.outputs ?? DEFAULT_PRODUCT_TASK_OUTPUTS;
37738
+ const wireTier = input.videoTier ? resolveWireVideoTier(input.videoTier, input.durationSeconds) : void 0;
37739
+ const videoStructure = input.videoStructure ?? (wireTier === "single_call" ? "single_take" : DEFAULT_GUIDED_VIDEO_STRUCTURE);
37655
37740
  const videoPreset = selectedOutputs.includes("video") && input.competitorScanEnabled === true ? "auto" : input.videoPreset;
37656
- assertVideoPresetDurationCompatibility(videoPreset, input.durationSeconds, input.videoStructure, input.videoQuality);
37657
- assertAngleNarrativeDurationCompatibility(input.angleNarratives, input.durationSeconds, input.videoStructure);
37741
+ assertVideoPresetDurationCompatibility(videoPreset, input.durationSeconds, videoStructure, input.videoQuality);
37742
+ assertAngleNarrativeDurationCompatibility(input.angleNarratives, input.durationSeconds, videoStructure);
37658
37743
  if (input.animationStyle !== void 0 && !animationStyleApplies(videoPreset, input.angleNarratives)) {
37659
37744
  throw new Error("animationStyle solo aplica a narrativas animadas.");
37660
37745
  }
37661
37746
  if (selectedOutputs.includes("video")) {
37662
- assertSemanticVideoDurationCompatibility(input.videoStructure, input.videoQuality, input.durationSeconds);
37747
+ assertSemanticVideoDurationCompatibility(videoStructure, input.videoQuality, input.durationSeconds);
37663
37748
  }
37664
37749
  if (!input.images && !input.projectId && !input.winnerReference) {
37665
37750
  throw new Error("images, winnerReference o projectId es requerido.");
@@ -37673,7 +37758,7 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
37673
37758
  if (input.angleNarratives && input.videoAngleCount !== void 0 && input.angleNarratives.length > input.videoAngleCount) {
37674
37759
  throw new Error("angleNarratives no puede contener m\xE1s entradas que videoAngleCount.");
37675
37760
  }
37676
- await requirePaidCreativeConfirmation(server, `${selectedOutputs.join(", ")} para ${input.country}${selectedOutputs.includes("video") ? ` con ${input.videoAngleCount} video${input.videoAngleCount === 1 ? "" : "s"}` : ""}${input.price ? ` y precio ${input.price}` : ""}. Modo: ${input.aiDecidesAll === true ? "la IA decide todo" : "reviews conversacionales"}.${selectedOutputs.includes("landing") && input.landingMode === "code" ? " Landing de c\xF3digo editable." : ""}${selectedOutputs.includes("video") ? ` ${describeMarketStudyChoice(input.competitorScanEnabled === true || Boolean(input.angleNarratives?.includes("market")))}` : ""}`);
37761
+ await requirePaidCreativeConfirmation(server, `${selectedOutputs.join(", ")} para ${input.country}${selectedOutputs.includes("video") ? ` con ${input.videoAngleCount} video${input.videoAngleCount === 1 ? "" : "s"} en ${GUIDED_VIDEO_STRUCTURE_LABELS[videoStructure]}` : ""}${input.price ? ` y precio ${input.price}` : ""}. Modo: ${input.aiDecidesAll === true ? "la IA decide todo" : "reviews conversacionales"}.${selectedOutputs.includes("landing") && input.landingMode === "code" ? " Landing de c\xF3digo editable." : ""}${selectedOutputs.includes("video") ? ` ${describeMarketStudyChoice(input.competitorScanEnabled === true || Boolean(input.angleNarratives?.includes("market")))}` : ""}`);
37677
37762
  const resolvedInputImages = await resolveWinnerImages(api, input.winnerReference, input.images);
37678
37763
  const assetIds = resolvedInputImages ? uploadedAssetIds(resolvedInputImages) : null;
37679
37764
  const imgs = resolvedInputImages && !assetIds ? await resolveImages(resolvedInputImages.map(({ url: url3, path: path3 }) => ({
@@ -37687,7 +37772,6 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
37687
37772
  filename: `image-${i}.png`
37688
37773
  }));
37689
37774
  const resolved = resolveVideoPreset(videoPreset);
37690
- const wireTier = input.videoTier ? resolveWireVideoTier(input.videoTier, input.durationSeconds) : void 0;
37691
37775
  const reviewPolicy = resolveConversationalReviewPolicy(input.aiDecidesAll);
37692
37776
  const fields = {
37693
37777
  ...flatten({
@@ -37706,7 +37790,7 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
37706
37790
  "options.videoStyle": resolved?.videoStyle,
37707
37791
  "options.narrativeStyle": resolved?.narrativeStyle,
37708
37792
  "options.videoTier": wireTier,
37709
- "options.videoStructure": input.videoStructure,
37793
+ "options.videoStructure": videoStructure,
37710
37794
  "options.videoQuality": input.videoQuality,
37711
37795
  "options.ugcFormat": resolveVideoFormatForDuration(input.durationSeconds),
37712
37796
  "options.videoResolution": input.videoResolution,
@@ -39570,7 +39654,7 @@ var VideoInput = z156.object({
39570
39654
  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" (escenas sin di\xE1logo: 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.'),
39571
39655
  sound: ViralVideoSoundSchema.optional().describe('Solo para Viral. "music" = m\xFAsica (por defecto), "music_voiceover" = m\xFAsica y voz en off, "none" = sin sonido.'),
39572
39656
  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."),
39573
- 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.'),
39657
+ videoStructure: VideoStructureEnum.default(DEFAULT_GUIDED_VIDEO_STRUCTURE).describe(GUIDED_VIDEO_STRUCTURE_DESCRIPTION),
39574
39658
  videoQuality: VideoQualityEnum.default("economy").describe('Opcional. Calidad: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro. El sistema elige el proveedor internamente. Default: economy.'),
39575
39659
  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.'),
39576
39660
  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"].'),
@@ -39878,7 +39962,7 @@ function registerCreativeTools(server, api, { transport = "http", proxyBaseUrl =
39878
39962
  }
39879
39963
  });
39880
39964
  server.registerTool("generate_video_creative", {
39881
- description: generateVideoCreativeGuidance.summary + " Devuelve un taskId. Esta solicitud es directa: nunca busques, reutilices ni menciones un DropshippingProject.\n\nREQUERIDOS: images (1-5 fotos), title, primaryAngle, language, country, aspectRatio, videoAngleCount y creativeSetup. Pregunta SIEMPRE cu\xE1ntos videos quiere (1, 2 o 3): la cantidad cambia el costo y no forma parte de \u2018la IA decide todo\u2019. Si falta una foto local, llama primero `request_media_upload` y usa los assetId; no pidas path ni URL. PREGUNTA price y offer si faltan; no asumas country/language.\n\nFORMATO Y CALIDAD: pregunta videoStructure (Un solo clip o Multiescena) y videoQuality (Econ\xF3mico, Medio o Pro). Un solo clip se genera completo y puede incluir cambios de plano. El sistema elige el proveedor internamente.\n\nCONFIGURACI\xD3N: salvo que el usuario diga expl\xEDcitamente que la IA decida todo, usa creativeSetup.mode=guided y pregunta si quiere el estudio de mercado (default: NO) mostrando la cotizaci\xF3n con y sin estudio de estimate_market_study_cost, y pregunta narrativa solo si no hay estudio de mercado; recoge p\xFAblico comprador, presentador (actor guardado, descripci\xF3n o ninguno) y direcci\xF3n creativa. Si el usuario dice qui\xE9n debe aparecer (mujer, hombre o ambos), env\xEDa creativeGender; no lo preguntes si no lo menciona. creativeDirection=null s\xF3lo despu\xE9s de que el usuario delegue esa decisi\xF3n concreta. No inventes valores de setup.\n\nANTES de invocar, muestra un resumen compacto que incluya cantidad, planificaci\xF3n (estudio de mercado o narrativa), p\xFAblico, presentador y direcci\xF3n y espera confirmaci\xF3n expl\xEDcita porque inicia trabajo pagado. Multiescena se factura por escena, as\xED que avisa ese mayor costo. Advierte tambi\xE9n que, si luego el usuario confirma que las fotos son de varios productos (combo), el pipeline r\xE1pido actualmente omite la pausa de guion aunque mantiene las dem\xE1s revisiones.\n\nREVIEWS: guided muestra los \xE1ngulos candidatos y permite escoger hasta videoAngleCount, editar cada \xE1ngulo y revisar sus guiones. automatic equivale al toggle web \u201CDejar que la IA decida todo\u201D y omite ambas reviews. scriptNotes agrega restricciones al guion; get_video_script y approve_video_script manejan la review palabra por palabra.",
39965
+ description: generateVideoCreativeGuidance.summary + " Devuelve un taskId. Esta solicitud es directa: nunca busques, reutilices ni menciones un DropshippingProject.\n\nREQUERIDOS: images (1-5 fotos), title, primaryAngle, language, country, aspectRatio, videoAngleCount y creativeSetup. Pregunta SIEMPRE cu\xE1ntos videos quiere (1, 2 o 3): la cantidad cambia el costo y no forma parte de \u2018la IA decide todo\u2019. Si falta una foto local, llama primero `request_media_upload` y usa los assetId; no pidas path ni URL. PREGUNTA price y offer si faltan; no asumas country/language.\n\nFORMATO Y CALIDAD: usa Multiescena por defecto y respeta Un solo clip si el usuario lo pide y est\xE1 habilitado. Pregunta videoQuality (Econ\xF3mico, Medio o Pro). El sistema elige el proveedor internamente.\n\nCONFIGURACI\xD3N: salvo que el usuario diga expl\xEDcitamente que la IA decida todo, usa creativeSetup.mode=guided y pregunta si quiere el estudio de mercado (default: NO) mostrando la cotizaci\xF3n con y sin estudio de estimate_market_study_cost, y pregunta narrativa solo si no hay estudio de mercado; recoge p\xFAblico comprador, presentador (actor guardado, descripci\xF3n o ninguno) y direcci\xF3n creativa. Si el usuario dice qui\xE9n debe aparecer (mujer, hombre o ambos), env\xEDa creativeGender; no lo preguntes si no lo menciona. creativeDirection=null s\xF3lo despu\xE9s de que el usuario delegue esa decisi\xF3n concreta. No inventes valores de setup.\n\nANTES de invocar, muestra un resumen compacto que incluya cantidad, formato, planificaci\xF3n (estudio de mercado o narrativa), p\xFAblico, presentador y direcci\xF3n y espera confirmaci\xF3n expl\xEDcita porque inicia trabajo pagado. Muestra la cotizaci\xF3n del formato elegido y explica que Multiescena se factura por escena. Advierte tambi\xE9n que, si luego el usuario confirma que las fotos son de varios productos (combo), el pipeline r\xE1pido actualmente omite la pausa de guion aunque mantiene las dem\xE1s revisiones.\n\nREVIEWS: guided muestra los \xE1ngulos candidatos y permite escoger hasta videoAngleCount, editar cada \xE1ngulo y revisar sus guiones. automatic equivale al toggle web \u201CDejar que la IA decida todo\u201D y omite ambas reviews. scriptNotes agrega restricciones al guion; get_video_script y approve_video_script manejan la review palabra por palabra.",
39882
39966
  inputSchema: VideoInput.shape,
39883
39967
  annotations: CREATES_PAID_OPEN_WORLD
39884
39968
  }, async (input) => {
@@ -39891,7 +39975,8 @@ function registerCreativeTools(server, api, { transport = "http", proxyBaseUrl =
39891
39975
  throw new Error("angleNarratives no puede contener m\xE1s entradas que videoAngleCount.");
39892
39976
  }
39893
39977
  const marketStudyEnabled = input.competitorScanEnabled === true || Boolean(input.angleNarratives?.includes("market"));
39894
- await requirePaidCreativeConfirmation(server, input.creativeSetup.mode === "automatic" ? `${input.videoAngleCount} video${input.videoAngleCount === 1 ? "" : "s"} de ${input.durationSeconds}s para \u201C${input.title}\u201D en ${input.country}. Configuraci\xF3n: la IA decide todo. ${describeMarketStudyChoice(marketStudyEnabled)}` : `${input.videoAngleCount} video${input.videoAngleCount === 1 ? "" : "s"} de ${input.durationSeconds}s para \u201C${input.title}\u201D en ${input.country}. Planificaci\xF3n: ${input.competitorScanEnabled === true ? "an\xE1lisis de mercado" : input.creativeSetup.videoPreset}. ${describeMarketStudyChoice(marketStudyEnabled)} P\xFAblico: ${input.creativeSetup.buyerPersona}. Presentador: ${input.creativeSetup.presenter.mode}. Direcci\xF3n: ${input.creativeSetup.creativeDirection ?? "la IA decide"}. Si despu\xE9s confirmas que las fotos son de varios productos (combo), el pipeline r\xE1pido omite actualmente la pausa de revisi\xF3n del guion.`);
39978
+ const format = GUIDED_VIDEO_STRUCTURE_LABELS[input.videoStructure];
39979
+ await requirePaidCreativeConfirmation(server, input.creativeSetup.mode === "automatic" ? `${input.videoAngleCount} video${input.videoAngleCount === 1 ? "" : "s"} de ${input.durationSeconds}s para \u201C${input.title}\u201D en ${input.country}. Formato: ${format}. Configuraci\xF3n: la IA decide todo. ${describeMarketStudyChoice(marketStudyEnabled)}` : `${input.videoAngleCount} video${input.videoAngleCount === 1 ? "" : "s"} de ${input.durationSeconds}s para \u201C${input.title}\u201D en ${input.country}. Formato: ${format}. Planificaci\xF3n: ${input.competitorScanEnabled === true ? "an\xE1lisis de mercado" : input.creativeSetup.videoPreset}. ${describeMarketStudyChoice(marketStudyEnabled)} P\xFAblico: ${input.creativeSetup.buyerPersona}. Presentador: ${input.creativeSetup.presenter.mode}. Direcci\xF3n: ${input.creativeSetup.creativeDirection ?? "la IA decide"}. Si despu\xE9s confirmas que las fotos son de varios productos (combo), el pipeline r\xE1pido omite actualmente la pausa de revisi\xF3n del guion.`);
39895
39980
  const guidedSetup = input.creativeSetup.mode === "guided" ? input.creativeSetup : null;
39896
39981
  const videoPreset = input.competitorScanEnabled === true ? "auto" : guidedSetup?.videoPreset ?? "auto";
39897
39982
  assertVideoPresetDurationCompatibility(videoPreset, input.durationSeconds, input.videoStructure, input.videoQuality);
@@ -44377,7 +44462,7 @@ var EstimateMarketStudyInput = z172.object({
44377
44462
  ]).describe('"video" para generate_video_creative; "product_task" para create_product_task.'),
44378
44463
  videoAngleCount: z172.number().int().min(1).max(3).describe("Los mismos 1, 2 o 3 videos que vas a pedir al crear."),
44379
44464
  durationSeconds: z172.number().int().min(4).max(30).default(15).describe("La misma duraci\xF3n que enviar\xE1s al crear."),
44380
- videoStructure: VideoStructureEnum.default("single_take"),
44465
+ videoStructure: VideoStructureEnum.default(DEFAULT_GUIDED_VIDEO_STRUCTURE),
44381
44466
  videoQuality: VideoQualityEnum.default("economy"),
44382
44467
  videoResolution: VideoResolutionEnum.default("480p"),
44383
44468
  productImageCount: z172.number().int().min(1).max(5).optional().describe("Cantidad de fotos del producto que adjuntar\xE1s (1-5)."),
@@ -44443,6 +44528,9 @@ function buildMarketStudyEstimateRequests(input) {
44443
44528
  type: "ingest-resume",
44444
44529
  options: {
44445
44530
  ...common,
44531
+ ...videoGeneratorEnabled ? {
44532
+ forNewVideo: true
44533
+ } : {},
44446
44534
  landingEnabled: outputs.includes("landing"),
44447
44535
  adCreativeEnabled: outputs.includes("image"),
44448
44536
  generateCreative: outputs.includes("image"),
@@ -44460,6 +44548,15 @@ function buildMarketStudyEstimateRequests(input) {
44460
44548
  };
44461
44549
  }
44462
44550
  __name(buildMarketStudyEstimateRequests, "buildMarketStudyEstimateRequests");
44551
+ function requireAvailableEstimate(estimate) {
44552
+ if (!("unavailable" in estimate)) return estimate;
44553
+ const { code, message } = estimate.unavailable;
44554
+ if (code === McpErrorCode.VIDEO_SINGLE_TAKE_DISABLED) {
44555
+ throw mcp(code, `${message} Cotiza Multiescena y pide confirmaci\xF3n antes de crear el video.`);
44556
+ }
44557
+ throw mcp(McpErrorCode.INVALID_INPUT, message);
44558
+ }
44559
+ __name(requireAvailableEstimate, "requireAvailableEstimate");
44463
44560
  function summarize(estimate) {
44464
44561
  return {
44465
44562
  typicalCredits: estimate.estimatedCostCredits,
@@ -44471,23 +44568,24 @@ function summarize(estimate) {
44471
44568
  __name(summarize, "summarize");
44472
44569
  function registerMarketStudyEstimateTools(server, api) {
44473
44570
  server.registerTool("estimate_market_study_cost", {
44474
- description: estimateMarketStudyGuidance.summary + " Devuelve dos cotizaciones con la misma configuraci\xF3n: sin estudio de mercado (el default: si omites competitorScanEnabled al crear, NO se hace el estudio) y con estudio. No consume cr\xE9ditos. Muestra ambas cifras al usuario, preg\xFAntale si quiere el estudio y env\xEDa competitorScanEnabled=true en generate_video_creative o create_product_task solo si lo acepta.",
44571
+ description: estimateMarketStudyGuidance.summary + " Usa el mismo formato que al crear el video (Multiescena por defecto). Devuelve dos cotizaciones con la misma configuraci\xF3n: sin estudio de mercado (el default: si omites competitorScanEnabled al crear, NO se hace el estudio) y con estudio. No consume cr\xE9ditos. Muestra ambas cifras al usuario, preg\xFAntale si quiere el estudio y env\xEDa competitorScanEnabled=true en generate_video_creative o create_product_task solo si lo acepta.",
44475
44572
  inputSchema: EstimateMarketStudyInput.shape,
44476
44573
  annotations: READS_INTERNAL
44477
44574
  }, async (rawInput) => {
44478
44575
  try {
44479
44576
  const input = EstimateMarketStudyInput.parse(rawInput);
44480
44577
  const { withoutStudy, withStudy } = buildMarketStudyEstimateRequests(input);
44481
- const { estimates } = await api.postJson("/v1/billing/estimate/batch", {
44578
+ const { estimates: [withoutEstimate, withEstimate] } = CostEstimationBatchResponse.parse(await api.postJson("/v1/billing/estimate/batch", {
44482
44579
  requests: [
44483
44580
  withoutStudy,
44484
44581
  withStudy
44485
44582
  ]
44486
- });
44487
- const [without, withMarket] = estimates;
44488
- if (!without || !withMarket) {
44583
+ }));
44584
+ if (!withoutEstimate || !withEstimate) {
44489
44585
  throw new Error("La cotizaci\xF3n no devolvi\xF3 ambas opciones.");
44490
44586
  }
44587
+ const without = requireAvailableEstimate(withoutEstimate);
44588
+ const withMarket = requireAvailableEstimate(withEstimate);
44491
44589
  return asText({
44492
44590
  kind: input.kind,
44493
44591
  withoutMarketStudy: summarize(without),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@productmaker/mcp",
3
- "version": "12.24.0",
3
+ "version": "12.25.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "ProductMaker MCP server — cost products, generate landing pages, UGC videos, and ad creatives, and publish to Shopify, Meta Ads, and TikTok Ads.",