@productmaker/mcp 12.24.0 → 12.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/http.js +216 -71
- package/dist/stdio.js +216 -71
- package/package.json +3 -3
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:
|
|
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(),
|
|
@@ -8045,6 +8096,7 @@ var SellerPricingNoticeSchema = z16.object({
|
|
|
8045
8096
|
});
|
|
8046
8097
|
var SellerPricingSnapshotSchema = z16.object({
|
|
8047
8098
|
policyVersion: z16.literal(1),
|
|
8099
|
+
source: z16.literal("classic_commercial_edit").optional(),
|
|
8048
8100
|
submitted: SellerPricingInputSchema,
|
|
8049
8101
|
effective: SellerPricingInputSchema,
|
|
8050
8102
|
notices: z16.array(SellerPricingNoticeSchema).max(32),
|
|
@@ -10089,7 +10141,7 @@ var LandingConfigSchema = z28.object({
|
|
|
10089
10141
|
});
|
|
10090
10142
|
var CODE_LANDING_SCHEMA_VERSION = 1;
|
|
10091
10143
|
var CODE_LANDING_RUNTIME_VERSION = 1;
|
|
10092
|
-
var MAX_STOREFRONT_LANDING_BYTES =
|
|
10144
|
+
var MAX_STOREFRONT_LANDING_BYTES = 120 * 1024;
|
|
10093
10145
|
var UTF8_ENCODER = new TextEncoder();
|
|
10094
10146
|
function measureUtf8Bytes(value) {
|
|
10095
10147
|
return UTF8_ENCODER.encode(value).length;
|
|
@@ -15349,6 +15401,8 @@ var IngestEstimationOptions = z53.object({
|
|
|
15349
15401
|
aiEditAngleTiers: z53.array(AiEditTierSchema.nullable()).max(3).optional()
|
|
15350
15402
|
});
|
|
15351
15403
|
var IngestResumeEstimationOptions = z53.object({
|
|
15404
|
+
/** Autopilot quotes before creation share new video admission. Saved resumes omit this. */
|
|
15405
|
+
forNewVideo: z53.literal(true).optional(),
|
|
15352
15406
|
sourceProductUrl: z53.string().max(4096).optional(),
|
|
15353
15407
|
/** Number of product references already submitted by extract for cleaning. */
|
|
15354
15408
|
productImageCount: z53.number().int().min(1).max(INGEST_MAX_REFERENCE_IMAGES).optional(),
|
|
@@ -15407,6 +15461,8 @@ var IngestResumeEstimationOptions = z53.object({
|
|
|
15407
15461
|
styleMix: z53.boolean().optional()
|
|
15408
15462
|
});
|
|
15409
15463
|
var VideoCreativeEstimationOptions = z53.object({
|
|
15464
|
+
/** Owner-verified existing direct video only. New quotes omit it. */
|
|
15465
|
+
continuationTaskId: z53.string().min(1).max(128).optional(),
|
|
15410
15466
|
sourceProductUrl: z53.string().max(4096).optional(),
|
|
15411
15467
|
/** Direct free-video flow: one provider clip, no extraction/angles pipeline. */
|
|
15412
15468
|
videoMode: z53.enum([
|
|
@@ -15739,6 +15795,7 @@ var CostEstimationBatchRequest = z53.object({
|
|
|
15739
15795
|
requests: z53.array(CostEstimationRequest).min(1).max(COST_ESTIMATION_BATCH_LIMIT)
|
|
15740
15796
|
});
|
|
15741
15797
|
var CostEstimationUnavailableCode = z53.enum([
|
|
15798
|
+
"VIDEO_SINGLE_TAKE_DISABLED",
|
|
15742
15799
|
"CREATIVE_ENGINE_VIDEO_QUALITY_NOT_ADMITTED",
|
|
15743
15800
|
"CREATIVE_ENGINE_VIDEO_RESOLUTION_NOT_ADMITTED",
|
|
15744
15801
|
"STRUCTURE_NOT_ADMITTED",
|
|
@@ -18279,6 +18336,9 @@ var FeatureSpec = z68.object({
|
|
|
18279
18336
|
}
|
|
18280
18337
|
});
|
|
18281
18338
|
|
|
18339
|
+
// ../../packages/types/src/guided-video-format-policy.ts
|
|
18340
|
+
var DEFAULT_GUIDED_VIDEO_STRUCTURE = "multi_scene";
|
|
18341
|
+
|
|
18282
18342
|
// ../../packages/types/src/mix.ts
|
|
18283
18343
|
import { z as z70 } from "zod";
|
|
18284
18344
|
|
|
@@ -18326,7 +18386,9 @@ var MIX_DEGRADATION_REASONS = [
|
|
|
18326
18386
|
*/
|
|
18327
18387
|
"scene_length_unsupported",
|
|
18328
18388
|
/** Transient provider failures exhausted the budget. */
|
|
18329
|
-
"provider_unavailable"
|
|
18389
|
+
"provider_unavailable",
|
|
18390
|
+
/** The primary renders did not pass the quality checks within the budget. */
|
|
18391
|
+
"quality_retries_exhausted"
|
|
18330
18392
|
];
|
|
18331
18393
|
var MixDegradationReasonSchema = z69.enum(MIX_DEGRADATION_REASONS);
|
|
18332
18394
|
|
|
@@ -19450,6 +19512,10 @@ var ClassicLandingImageEditQuoteEnvelopeSchema = ClassicLandingImageEditInventor
|
|
|
19450
19512
|
var ClassicLandingImageEditBatchSnapshotSchema = ClassicLandingImageEditQuoteEnvelopeSchema.extend({
|
|
19451
19513
|
quoteId: z78.string().uuid()
|
|
19452
19514
|
}).strict();
|
|
19515
|
+
var ClassicLandingImageEditExecutionSnapshotSchema = ClassicLandingImageEditBatchSnapshotSchema.extend({
|
|
19516
|
+
executionVersion: z78.literal(2).optional(),
|
|
19517
|
+
commercialExecution: z78.literal(true).optional()
|
|
19518
|
+
}).strict();
|
|
19453
19519
|
var ClassicLandingImageEditInstructionPlanStatusSchema = z78.enum([
|
|
19454
19520
|
"planned",
|
|
19455
19521
|
"unavailable"
|
|
@@ -19473,7 +19539,7 @@ var ClassicLandingImageEditBatchCheckpointItemSchema = z78.object({
|
|
|
19473
19539
|
"localized"
|
|
19474
19540
|
]).optional()
|
|
19475
19541
|
}).strict();
|
|
19476
|
-
var
|
|
19542
|
+
var ClassicLandingImageEditBatchStatusCheckpointSchema = z78.object({
|
|
19477
19543
|
version: z78.literal(1),
|
|
19478
19544
|
kind: z78.literal("classic_image_batch"),
|
|
19479
19545
|
status: ClassicLandingImageEditBatchStatusSchema,
|
|
@@ -19487,6 +19553,27 @@ var ClassicLandingImageEditBatchCheckpointSchema = z78.object({
|
|
|
19487
19553
|
instructionPlan: ClassicLandingImageEditInstructionPlanStatusSchema.optional(),
|
|
19488
19554
|
items: z78.array(ClassicLandingImageEditBatchCheckpointItemSchema).max(CLASSIC_LANDING_IMAGE_EDIT_MAX_IMAGES)
|
|
19489
19555
|
}).strict();
|
|
19556
|
+
var ClassicLandingImageEditCommerceSchema = z78.object({
|
|
19557
|
+
beforeCountry: z78.string().nullable(),
|
|
19558
|
+
beforePrice: z78.string().nullable(),
|
|
19559
|
+
beforeCompareAtPrice: z78.string().nullable(),
|
|
19560
|
+
beforeOffer: z78.string().nullable(),
|
|
19561
|
+
beforePricing: SellerPricingSnapshotSchema.nullable(),
|
|
19562
|
+
country: z78.string().nullable(),
|
|
19563
|
+
pricing: SellerPricingSnapshotSchema
|
|
19564
|
+
}).strict();
|
|
19565
|
+
var ClassicLandingImageEditCommercialReceiptSchema = z78.object({
|
|
19566
|
+
kind: z78.literal("classic_image_commercial_batch"),
|
|
19567
|
+
commerce: ClassicLandingImageEditCommerceSchema
|
|
19568
|
+
}).strict();
|
|
19569
|
+
var ClassicLandingImageEditBatchCheckpointSchema = ClassicLandingImageEditBatchStatusCheckpointSchema.extend({
|
|
19570
|
+
commerce: ClassicLandingImageEditCommerceSchema.optional()
|
|
19571
|
+
}).strict();
|
|
19572
|
+
var ClassicLandingCommercialImageCandidateSchema = z78.object({
|
|
19573
|
+
key: z78.string().min(1).max(2048),
|
|
19574
|
+
width: z78.number().int().positive(),
|
|
19575
|
+
height: z78.number().int().positive()
|
|
19576
|
+
}).strict();
|
|
19490
19577
|
|
|
19491
19578
|
// ../../packages/types/src/landing-gif-execution-proof.ts
|
|
19492
19579
|
import { z as z79 } from "zod";
|
|
@@ -19836,6 +19923,11 @@ var SaveAgentPlaybookSchema = z81.object({
|
|
|
19836
19923
|
body: z81.string().trim().min(1).max(AGENT_MEMORY_LIMITS.playbookChars)
|
|
19837
19924
|
}).strict();
|
|
19838
19925
|
var AGENT_PENDING_OPERATION_TARGETS = [
|
|
19926
|
+
"campaign",
|
|
19927
|
+
"adset",
|
|
19928
|
+
"ad"
|
|
19929
|
+
];
|
|
19930
|
+
var AGENT_PENDING_BUDGET_TARGETS = [
|
|
19839
19931
|
"campaign",
|
|
19840
19932
|
"adset"
|
|
19841
19933
|
];
|
|
@@ -19861,7 +19953,7 @@ var AgentPendingOperationSchema = z81.discriminatedUnion("type", [
|
|
|
19861
19953
|
}).strict(),
|
|
19862
19954
|
z81.object({
|
|
19863
19955
|
type: z81.literal("meta_set_daily_budget"),
|
|
19864
|
-
target: z81.enum(
|
|
19956
|
+
target: z81.enum(AGENT_PENDING_BUDGET_TARGETS),
|
|
19865
19957
|
objectId: MetaObjectIdSchema,
|
|
19866
19958
|
/** En unidades de la moneda (COP 80000, USD 25.5), no en las de Meta. */
|
|
19867
19959
|
amount: z81.number().positive().max(1e9),
|
|
@@ -19932,6 +20024,12 @@ var SaveAgentSettingsSchema = z81.object({
|
|
|
19932
20024
|
/** Sugerido por campaña; el monto real lo acuerda el vendedor. */
|
|
19933
20025
|
adSetDailyBudget: z81.number().int().min(0).max(1e9).nullable().optional(),
|
|
19934
20026
|
budgetCurrency: z81.string().trim().length(3).toUpperCase().nullable().optional(),
|
|
20027
|
+
/**
|
|
20028
|
+
* Lo máximo que puede perder una prueba abierta, en `budgetCurrency`.
|
|
20029
|
+
* Al pasarlo, el turno propone apagar su campaña (el dueño aprueba).
|
|
20030
|
+
* Null = sin tope; no hay uno por defecto.
|
|
20031
|
+
*/
|
|
20032
|
+
testLossCap: z81.number().int().min(1).max(1e9).nullable().optional(),
|
|
19935
20033
|
/** Prende o apaga los turnos cada 3 horas. */
|
|
19936
20034
|
autopilot: z81.boolean().optional()
|
|
19937
20035
|
}).strict();
|
|
@@ -20071,6 +20169,8 @@ var AgentSettingsSchema = z81.object({
|
|
|
20071
20169
|
adSetDailyBudget: z81.number().int().nullable(),
|
|
20072
20170
|
/** La guardada, la del país o COP si aún no se sabe. */
|
|
20073
20171
|
budgetCurrency: z81.string(),
|
|
20172
|
+
/** Pérdida máxima por prueba abierta en `budgetCurrency`; null = sin tope. */
|
|
20173
|
+
testLossCap: z81.number().int().nullable(),
|
|
20074
20174
|
autopilot: z81.boolean(),
|
|
20075
20175
|
/** Null mientras la cuenta no ha guardado nada. */
|
|
20076
20176
|
updatedAt: z81.string().nullable()
|
|
@@ -25048,6 +25148,14 @@ var ProductControlAdSchema = z105.object({
|
|
|
25048
25148
|
name: z105.string(),
|
|
25049
25149
|
/** `effective_status` de Meta (ACTIVE, PAUSED, …), tal cual. */
|
|
25050
25150
|
status: z105.string().nullable(),
|
|
25151
|
+
/**
|
|
25152
|
+
* Conjunto del anuncio: con ADSET_PAUSED, este es el id que hay que prender.
|
|
25153
|
+
* `null` si Meta no lo mandó; una respuesta de una API anterior sin el campo
|
|
25154
|
+
* también se lee como `null` en vez de rechazar todo el desglose.
|
|
25155
|
+
*/
|
|
25156
|
+
adSetId: z105.string().nullable().default(null),
|
|
25157
|
+
/** `effective_status` del conjunto, tal cual. */
|
|
25158
|
+
adSetStatus: z105.string().nullable().default(null),
|
|
25051
25159
|
thumbnailUrl: z105.string().url().nullable(),
|
|
25052
25160
|
creativeKind: z105.enum([
|
|
25053
25161
|
"video",
|
|
@@ -25374,7 +25482,8 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25374
25482
|
// MCP 12.8.0: + manual-only, cohort-gated «viral» preset/angle narrative.
|
|
25375
25483
|
// MCP 12.18.1: «viral» prose admits Un solo clip (15 s).
|
|
25376
25484
|
// MCP 12.19.0: + landingMode (classic | code landing).
|
|
25377
|
-
|
|
25485
|
+
// MCP 12.25.0: Multiescena predeterminada para videos nuevos.
|
|
25486
|
+
"90ba32108e2a484d662b9441e7facf246fad166933d42f4659831f16801b6b12",
|
|
25378
25487
|
"credit_consuming",
|
|
25379
25488
|
"creative",
|
|
25380
25489
|
[
|
|
@@ -25618,31 +25727,42 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25618
25727
|
"cost_estimate"
|
|
25619
25728
|
]
|
|
25620
25729
|
),
|
|
25621
|
-
defineCapability(
|
|
25622
|
-
"
|
|
25623
|
-
|
|
25624
|
-
|
|
25625
|
-
|
|
25626
|
-
|
|
25627
|
-
|
|
25628
|
-
"
|
|
25629
|
-
|
|
25630
|
-
|
|
25631
|
-
"
|
|
25632
|
-
|
|
25633
|
-
|
|
25634
|
-
|
|
25635
|
-
|
|
25636
|
-
|
|
25637
|
-
|
|
25638
|
-
|
|
25639
|
-
|
|
25640
|
-
|
|
25641
|
-
|
|
25642
|
-
|
|
25643
|
-
|
|
25644
|
-
|
|
25645
|
-
|
|
25730
|
+
defineCapability(
|
|
25731
|
+
"estimate_market_study_cost",
|
|
25732
|
+
// MCP 12.25.0: Multiescena predeterminada para videos nuevos.
|
|
25733
|
+
"d7b3570035bfc209cc3a4e30de8feeb35c11fae99663e17cc5a5fcf57e32bf81",
|
|
25734
|
+
"none",
|
|
25735
|
+
"read_only",
|
|
25736
|
+
[
|
|
25737
|
+
"read"
|
|
25738
|
+
],
|
|
25739
|
+
[
|
|
25740
|
+
slot("creative_kind", true, [
|
|
25741
|
+
"kind"
|
|
25742
|
+
], []),
|
|
25743
|
+
slot("video_configuration", true, [
|
|
25744
|
+
"videoAngleCount",
|
|
25745
|
+
"durationSeconds",
|
|
25746
|
+
"videoStructure",
|
|
25747
|
+
"videoQuality",
|
|
25748
|
+
"videoResolution"
|
|
25749
|
+
], []),
|
|
25750
|
+
slot("estimate_options", false, [
|
|
25751
|
+
"productImageCount",
|
|
25752
|
+
"outputs",
|
|
25753
|
+
"generateAiMusic",
|
|
25754
|
+
"generateAiEdit",
|
|
25755
|
+
"replicateWinnerWhenFound"
|
|
25756
|
+
], [])
|
|
25757
|
+
],
|
|
25758
|
+
[
|
|
25759
|
+
"creative"
|
|
25760
|
+
],
|
|
25761
|
+
[
|
|
25762
|
+
"cost_estimate"
|
|
25763
|
+
],
|
|
25764
|
+
MCP_ONLY_CHANNEL_EXPOSURE
|
|
25765
|
+
),
|
|
25646
25766
|
defineCapability("find_winning_products", "b73a18bb9618b96067b17791bf2f8e7450e17e34881c4f997e117be89abe058d", "credit_consuming", "business", [
|
|
25647
25767
|
"credit_consuming",
|
|
25648
25768
|
"state_change"
|
|
@@ -25955,7 +26075,8 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25955
26075
|
// MCP 12.8.0: + manual-only, cohort-gated «viral» preset/angle narrative.
|
|
25956
26076
|
// MCP 12.18.1: «viral» prose admits Un solo clip (15 s).
|
|
25957
26077
|
// MCP 12.19.0: + landingMode (classic | code landing).
|
|
25958
|
-
|
|
26078
|
+
// MCP 12.25.0: Multiescena predeterminada para videos nuevos.
|
|
26079
|
+
"9b0169fe939bd43c9a0fd64de8308e143b388ab38dd3cc0d0b95182ca85f44eb",
|
|
25959
26080
|
"credit_consuming",
|
|
25960
26081
|
"creative",
|
|
25961
26082
|
[
|
|
@@ -27515,7 +27636,7 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
27515
27636
|
], SHARED_CHANNEL_EXPOSURE),
|
|
27516
27637
|
defineCapability(
|
|
27517
27638
|
"save_agent_memory",
|
|
27518
|
-
"
|
|
27639
|
+
"fa4641b787c522add5f81987325304f7cc54ed60539515f45ec1c6551380dc14",
|
|
27519
27640
|
// La memoria es el cuaderno del propio agente y no cobra créditos. Aprobar
|
|
27520
27641
|
// un pendiente que trae `operation` sí cambia la campaña o el conjunto en
|
|
27521
27642
|
// Meta: esa aprobación ES la confirmación del dueño (el pendiente muestra
|
|
@@ -34713,7 +34834,7 @@ var ApiClient = class {
|
|
|
34713
34834
|
};
|
|
34714
34835
|
|
|
34715
34836
|
// src/index.ts
|
|
34716
|
-
var MCP_VERSION = "12.
|
|
34837
|
+
var MCP_VERSION = "12.26.0";
|
|
34717
34838
|
|
|
34718
34839
|
// src/meta-upload-app.ts
|
|
34719
34840
|
import { readFileSync } from "fs";
|
|
@@ -35737,6 +35858,11 @@ var VideoPresetEnum = VideoPreset.extract([
|
|
|
35737
35858
|
"viral"
|
|
35738
35859
|
]);
|
|
35739
35860
|
var VideoStructureEnum = VideoStructure;
|
|
35861
|
+
var GUIDED_VIDEO_STRUCTURE_LABELS = {
|
|
35862
|
+
multi_scene: "Multiescena",
|
|
35863
|
+
single_take: "Un solo clip"
|
|
35864
|
+
};
|
|
35865
|
+
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
35866
|
var VideoQualityEnum = VideoQuality;
|
|
35741
35867
|
var VideoRouteIdEnum = VideoRouteId;
|
|
35742
35868
|
var TaskCreativeVariantVideoPresetEnum = TaskCreativeVariantVideoPreset;
|
|
@@ -36079,6 +36205,7 @@ var McpErrorCode = {
|
|
|
36079
36205
|
SERVICE_VIDEO_SNAPSHOT_UNAVAILABLE: "SERVICE_VIDEO_SNAPSHOT_UNAVAILABLE",
|
|
36080
36206
|
// Input
|
|
36081
36207
|
INVALID_INPUT: "INVALID_INPUT",
|
|
36208
|
+
VIDEO_SINGLE_TAKE_DISABLED: "VIDEO_SINGLE_TAKE_DISABLED",
|
|
36082
36209
|
INSUFFICIENT_CREDITS: "INSUFFICIENT_CREDITS",
|
|
36083
36210
|
FEATURE_NOT_AVAILABLE: "FEATURE_NOT_AVAILABLE",
|
|
36084
36211
|
TASK_QUOTA_EXCEEDED: "TASK_QUOTA_EXCEEDED",
|
|
@@ -36267,6 +36394,7 @@ var McpErrorCode = {
|
|
|
36267
36394
|
INTERNAL: "INTERNAL"
|
|
36268
36395
|
};
|
|
36269
36396
|
var CODE_MESSAGES = {
|
|
36397
|
+
VIDEO_SINGLE_TAKE_DISABLED: "Single Take is disabled for new videos. Quote Multi Scene and ask for confirmation before creating the video.",
|
|
36270
36398
|
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
36399
|
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
36400
|
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 +36596,7 @@ var AGENT_MEMORY_CODES = [
|
|
|
36468
36596
|
McpErrorCode.AGENT_SHOP_REQUIRED
|
|
36469
36597
|
];
|
|
36470
36598
|
var INVALID_PARAM_CODES = /* @__PURE__ */ new Set([
|
|
36599
|
+
McpErrorCode.VIDEO_SINGLE_TAKE_DISABLED,
|
|
36471
36600
|
// Input/auth
|
|
36472
36601
|
McpErrorCode.INVALID_INPUT,
|
|
36473
36602
|
McpErrorCode.INSUFFICIENT_CREDITS,
|
|
@@ -36601,6 +36730,7 @@ var INVALID_PARAM_CODES = /* @__PURE__ */ new Set([
|
|
|
36601
36730
|
McpErrorCode.NO_META_AD_ACCOUNTS
|
|
36602
36731
|
]);
|
|
36603
36732
|
var PASSTHROUGH_CODES = /* @__PURE__ */ new Set([
|
|
36733
|
+
McpErrorCode.VIDEO_SINGLE_TAKE_DISABLED,
|
|
36604
36734
|
McpErrorCode.USER_NOT_PROVISIONED,
|
|
36605
36735
|
McpErrorCode.CREDIT_ADMISSION_UNAVAILABLE,
|
|
36606
36736
|
McpErrorCode.INSUFFICIENT_CREDITS,
|
|
@@ -36849,7 +36979,7 @@ function translateError(err) {
|
|
|
36849
36979
|
const message = resolveMessage(body.code, void 0);
|
|
36850
36980
|
return mcp(body.code, saved2 ? `Commerce changes were saved. ${message}` : message, extra);
|
|
36851
36981
|
}
|
|
36852
|
-
const messageCode = typeof body.message === "string" && /^VOICE_[A-Z0-9_]+$/.test(body.message) ? body.message : void 0;
|
|
36982
|
+
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
36983
|
const rawCode = (typeof body.code === "string" ? body.code : void 0) ?? messageCode;
|
|
36854
36984
|
const code = rawCode === "INSUFFICIENT_CREDIT" ? McpErrorCode.INSUFFICIENT_CREDITS : rawCode;
|
|
36855
36985
|
if (code && PASSTHROUGH_CODES.has(code)) {
|
|
@@ -38731,17 +38861,17 @@ var CreateProductTaskInput = z153.object({
|
|
|
38731
38861
|
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
38862
|
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
38863
|
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
|
|
38864
|
+
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
38865
|
sound: ViralVideoSoundSchema.optional().describe('Solo para Viral. "music" = m\xFAsica (por defecto), "music_voiceover" = m\xFAsica y voz en off, "none" = sin sonido.'),
|
|
38736
38866
|
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
38867
|
durationSeconds: z153.union([
|
|
38738
38868
|
z153.literal(15),
|
|
38739
38869
|
z153.literal(30)
|
|
38740
|
-
]).default(15).describe("Opcional. Duraci\xF3n objetivo
|
|
38870
|
+
]).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
38871
|
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
38872
|
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(
|
|
38744
|
-
videoStructure: VideoStructureEnum.
|
|
38873
|
+
videoTier: VideoTierEnum.optional().describe("Compatibilidad con clientes antiguos. Usa videoStructure para solicitudes nuevas."),
|
|
38874
|
+
videoStructure: VideoStructureEnum.optional().describe(GUIDED_VIDEO_STRUCTURE_DESCRIPTION),
|
|
38745
38875
|
videoQuality: VideoQualityEnum.default("economy").describe('Opcional. Calidad: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro. El proveedor se elige internamente. Default: economy.'),
|
|
38746
38876
|
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
38877
|
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 +39289,24 @@ function registerTaskTools(server, api, { proxyBaseUrl = null, transport = "http
|
|
|
39159
39289
|
server.registerTool("create_product_task", {
|
|
39160
39290
|
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
39291
|
|
|
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,
|
|
39292
|
+
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
39293
|
|
|
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.`,
|
|
39294
|
+
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
39295
|
inputSchema: CreateProductTaskInput.shape,
|
|
39166
39296
|
annotations: CREATES_PAID_OPEN_WORLD
|
|
39167
39297
|
}, async (input) => {
|
|
39168
39298
|
try {
|
|
39169
39299
|
const selectedOutputs = input.outputs ?? DEFAULT_PRODUCT_TASK_OUTPUTS;
|
|
39300
|
+
const wireTier = input.videoTier ? resolveWireVideoTier(input.videoTier, input.durationSeconds) : void 0;
|
|
39301
|
+
const videoStructure = input.videoStructure ?? (wireTier === "single_call" ? "single_take" : DEFAULT_GUIDED_VIDEO_STRUCTURE);
|
|
39170
39302
|
const videoPreset = selectedOutputs.includes("video") && input.competitorScanEnabled === true ? "auto" : input.videoPreset;
|
|
39171
|
-
assertVideoPresetDurationCompatibility(videoPreset, input.durationSeconds,
|
|
39172
|
-
assertAngleNarrativeDurationCompatibility(input.angleNarratives, input.durationSeconds,
|
|
39303
|
+
assertVideoPresetDurationCompatibility(videoPreset, input.durationSeconds, videoStructure, input.videoQuality);
|
|
39304
|
+
assertAngleNarrativeDurationCompatibility(input.angleNarratives, input.durationSeconds, videoStructure);
|
|
39173
39305
|
if (input.animationStyle !== void 0 && !animationStyleApplies(videoPreset, input.angleNarratives)) {
|
|
39174
39306
|
throw new Error("animationStyle solo aplica a narrativas animadas.");
|
|
39175
39307
|
}
|
|
39176
39308
|
if (selectedOutputs.includes("video")) {
|
|
39177
|
-
assertSemanticVideoDurationCompatibility(
|
|
39309
|
+
assertSemanticVideoDurationCompatibility(videoStructure, input.videoQuality, input.durationSeconds);
|
|
39178
39310
|
}
|
|
39179
39311
|
if (!input.images && !input.projectId && !input.winnerReference) {
|
|
39180
39312
|
throw new Error("images, winnerReference o projectId es requerido.");
|
|
@@ -39188,7 +39320,7 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
|
|
|
39188
39320
|
if (input.angleNarratives && input.videoAngleCount !== void 0 && input.angleNarratives.length > input.videoAngleCount) {
|
|
39189
39321
|
throw new Error("angleNarratives no puede contener m\xE1s entradas que videoAngleCount.");
|
|
39190
39322
|
}
|
|
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")))}` : ""}`);
|
|
39323
|
+
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
39324
|
const resolvedInputImages = await resolveWinnerImages(api, input.winnerReference, input.images);
|
|
39193
39325
|
const assetIds = resolvedInputImages ? uploadedAssetIds(resolvedInputImages) : null;
|
|
39194
39326
|
const imgs = resolvedInputImages && !assetIds ? await resolveImages(resolvedInputImages.map(({ url: url3, path: path3 }) => ({
|
|
@@ -39202,7 +39334,6 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
|
|
|
39202
39334
|
filename: `image-${i}.png`
|
|
39203
39335
|
}));
|
|
39204
39336
|
const resolved = resolveVideoPreset(videoPreset);
|
|
39205
|
-
const wireTier = input.videoTier ? resolveWireVideoTier(input.videoTier, input.durationSeconds) : void 0;
|
|
39206
39337
|
const reviewPolicy = resolveConversationalReviewPolicy(input.aiDecidesAll);
|
|
39207
39338
|
const fields = {
|
|
39208
39339
|
...flatten({
|
|
@@ -39221,7 +39352,7 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
|
|
|
39221
39352
|
"options.videoStyle": resolved?.videoStyle,
|
|
39222
39353
|
"options.narrativeStyle": resolved?.narrativeStyle,
|
|
39223
39354
|
"options.videoTier": wireTier,
|
|
39224
|
-
"options.videoStructure":
|
|
39355
|
+
"options.videoStructure": videoStructure,
|
|
39225
39356
|
"options.videoQuality": input.videoQuality,
|
|
39226
39357
|
"options.ugcFormat": resolveVideoFormatForDuration(input.durationSeconds),
|
|
39227
39358
|
"options.videoResolution": input.videoResolution,
|
|
@@ -41085,7 +41216,7 @@ var VideoInput = z157.object({
|
|
|
41085
41216
|
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
41217
|
sound: ViralVideoSoundSchema.optional().describe('Solo para Viral. "music" = m\xFAsica (por defecto), "music_voiceover" = m\xFAsica y voz en off, "none" = sin sonido.'),
|
|
41087
41218
|
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(
|
|
41219
|
+
videoStructure: VideoStructureEnum.default(DEFAULT_GUIDED_VIDEO_STRUCTURE).describe(GUIDED_VIDEO_STRUCTURE_DESCRIPTION),
|
|
41089
41220
|
videoQuality: VideoQualityEnum.default("economy").describe('Opcional. Calidad: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro. El sistema elige el proveedor internamente. Default: economy.'),
|
|
41090
41221
|
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
41222
|
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 +41524,7 @@ function registerCreativeTools(server, api, { transport = "http", proxyBaseUrl =
|
|
|
41393
41524
|
}
|
|
41394
41525
|
});
|
|
41395
41526
|
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:
|
|
41527
|
+
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
41528
|
inputSchema: VideoInput.shape,
|
|
41398
41529
|
annotations: CREATES_PAID_OPEN_WORLD
|
|
41399
41530
|
}, async (input) => {
|
|
@@ -41406,7 +41537,8 @@ function registerCreativeTools(server, api, { transport = "http", proxyBaseUrl =
|
|
|
41406
41537
|
throw new Error("angleNarratives no puede contener m\xE1s entradas que videoAngleCount.");
|
|
41407
41538
|
}
|
|
41408
41539
|
const marketStudyEnabled = input.competitorScanEnabled === true || Boolean(input.angleNarratives?.includes("market"));
|
|
41409
|
-
|
|
41540
|
+
const format = GUIDED_VIDEO_STRUCTURE_LABELS[input.videoStructure];
|
|
41541
|
+
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
41542
|
const guidedSetup = input.creativeSetup.mode === "guided" ? input.creativeSetup : null;
|
|
41411
41543
|
const videoPreset = input.competitorScanEnabled === true ? "auto" : guidedSetup?.videoPreset ?? "auto";
|
|
41412
41544
|
assertVideoPresetDurationCompatibility(videoPreset, input.durationSeconds, input.videoStructure, input.videoQuality);
|
|
@@ -45317,7 +45449,7 @@ function queryString(values) {
|
|
|
45317
45449
|
__name(queryString, "queryString");
|
|
45318
45450
|
function registerAgentMemoryTools(server, api) {
|
|
45319
45451
|
server.registerTool("get_agent_memory_brief", {
|
|
45320
|
-
description: briefGuidance.summary + " Ll\xE1mala UNA vez al empezar cada corrida, antes de decidir nada: devuelve la \xFAltima versi\xF3n del playbook, la ficha de cada producto (c\xF3digo, etapa, CPA objetivo, veredicto y sus enlaces productControlId/projectId), los experimentos abiertos, los pendientes abiertos (aprobaciones del due\xF1o y seguimientos), las notas m\xE1s recientes, `settings` (tienda, cuenta de Meta, pa\xEDs, zona horaria, moneda, presupuesto sugerido por campa\xF1a, topes diarios si el vendedor pidi\xF3 alguno y si el piloto autom\xE1tico est\xE1 prendido; lo que no se ha acordado viene en null: nada trae un valor fijo, s\xE1calo del contexto del vendedor y su producto o preg\xFAntale), `budget` (lo gastado HOY en esa zona: cr\xE9ditos de ProductMaker y conjuntos nuevos, contra su tope solo si existe), `currentSlot` (el turno de ahora del piloto autom\xE1tico y su fase, con `run` si alguien ya lo corri\xF3; null fuera de horario) y `recentRuns` (los \xFAltimos turnos con su reporte). Una cuenta nueva recibe todo vac\xEDo, no un error. Los n\xFAmeros de negocio (ventas, costo por venta, gasto) NO est\xE1n aqu\xED: l\xE9elos con get_daily_control / get_product_control usando los enlaces de cada ficha.",
|
|
45452
|
+
description: briefGuidance.summary + " Ll\xE1mala UNA vez al empezar cada corrida, antes de decidir nada: devuelve la \xFAltima versi\xF3n del playbook, la ficha de cada producto (c\xF3digo, etapa, CPA objetivo, veredicto y sus enlaces productControlId/projectId), los experimentos abiertos, los pendientes abiertos (aprobaciones del due\xF1o y seguimientos), las notas m\xE1s recientes, `settings` (tienda, cuenta de Meta, pa\xEDs, zona horaria, moneda, presupuesto sugerido por campa\xF1a, topes diarios y el tope de p\xE9rdida por prueba (`testLossCap`) si el vendedor pidi\xF3 alguno y si el piloto autom\xE1tico est\xE1 prendido; lo que no se ha acordado viene en null: nada trae un valor fijo, s\xE1calo del contexto del vendedor y su producto o preg\xFAntale), `budget` (lo gastado HOY en esa zona: cr\xE9ditos de ProductMaker y conjuntos nuevos, contra su tope solo si existe), `currentSlot` (el turno de ahora del piloto autom\xE1tico y su fase, con `run` si alguien ya lo corri\xF3; null fuera de horario) y `recentRuns` (los \xFAltimos turnos con su reporte). Una cuenta nueva recibe todo vac\xEDo, no un error. Los n\xFAmeros de negocio (ventas, costo por venta, gasto) NO est\xE1n aqu\xED: l\xE9elos con get_daily_control / get_product_control usando los enlaces de cada ficha.",
|
|
45321
45453
|
inputSchema: BriefInput.shape,
|
|
45322
45454
|
annotations: READS_INTERNAL
|
|
45323
45455
|
}, async (input) => {
|
|
@@ -45339,7 +45471,7 @@ function registerAgentMemoryTools(server, api) {
|
|
|
45339
45471
|
}
|
|
45340
45472
|
});
|
|
45341
45473
|
server.registerTool("save_agent_memory", {
|
|
45342
|
-
description: saveGuidance.summary + ' Un solo punto de escritura; `memory.type` dice qu\xE9 se guarda: "product" crea o actualiza la ficha por `code` (la primera vez exige `name`; solo cambia los campos enviados; `verdict: ""` lo borra; productControlId/projectId deben ser de esta cuenta), "experiment_open" abre un experimento con hip\xF3tesis y montaje, "experiment_close" lo cierra UNA vez con outcome y conclusi\xF3n (cerrado no se reabre: 409, abre otro), "playbook" guarda una versi\xF3n NUEVA completa del playbook (no un parche; las anteriores quedan en el historial), "pending_add" deja una aprobaci\xF3n o seguimiento abierto (una aprobaci\xF3n de activar
|
|
45474
|
+
description: saveGuidance.summary + ' Un solo punto de escritura; `memory.type` dice qu\xE9 se guarda: "product" crea o actualiza la ficha por `code` (la primera vez exige `name`; solo cambia los campos enviados; `verdict: ""` lo borra; productControlId/projectId deben ser de esta cuenta), "experiment_open" abre un experimento con hip\xF3tesis y montaje, "experiment_close" lo cierra UNA vez con outcome y conclusi\xF3n (cerrado no se reabre: 409, abre otro), "playbook" guarda una versi\xF3n NUEVA completa del playbook (no un parche; las anteriores quedan en el historial), "pending_add" deja una aprobaci\xF3n o seguimiento abierto (una aprobaci\xF3n de activar o pausar una campa\xF1a, un conjunto o un anuncio, o de cambiar el presupuesto diario de una campa\xF1a o un conjunto (un anuncio no tiene), lleva `operation` con el id de Meta y, para presupuesto, monto y moneda de la cuenta m\xE1s `expectedAmount` con lo que ten\xEDa; 400 AGENT_OPERATION_NEEDS_APPROVAL en un seguimiento), "pending_resolve" lo resuelve UNA vez (409 si ya estaba resuelto; aprobar uno con `operation` lo ejecuta ProductMaker en Meta en ese momento y `execution` trae el resultado: applied, skipped si ya estaba as\xED o alguien lo cambi\xF3, o failed; no lo repitas t\xFA), "note" escribe en la bit\xE1cora, "settings" guarda la configuraci\xF3n del agente (solo los campos enviados; `null` borra un valor; pa\xEDs, moneda, presupuesto y topes salen del contexto o de lo que diga el vendedor, nunca de un n\xFAmero por defecto; prender `autopilot` exige pa\xEDs o zona: 400 AGENT_COUNTRY_REQUIRED) y "spend" lleva el gasto del d\xEDa: `mode: "check"` ANTES de cada gasto (cr\xE9ditos cotizados o 1 conjunto nuevo) dice si cabe (`fits`) en el tope del vendedor, sin escribir (sin tope, siempre cabe); si no cabe, pide OK al vendedor. `mode: "record"` DESPU\xC9S registra el costo real con una `ref` por cobro (`<taskId>:<tool>`, runId o adSetId): repetirlo con el mismo monto no suma dos veces y otro monto con la misma ref es 409 AGENT_SPEND_REF_CONFLICT. "run_claim" reclama el turno vigente del piloto autom\xE1tico ANTES de correr una fase programada (turnos a las 9, 12, 15, 18 y 21 en la zona del agente; devuelve `phase`: launch, review, evening o weekly): 409 AGENT_RUN_ALREADY_CLAIMED si ya lo corri\xF3 otro (no lo corras), 409 AGENT_RUN_NO_SLOT fuera de horario, 400 AGENT_COUNTRY_REQUIRED si a\xFAn no hay pa\xEDs ni zona (guarda primero "settings" con el pa\xEDs o la zona del vendedor y reclama otra vez). "run_complete" cierra ese turno UNA vez con `status` done o failed y el reporte corto en `summary`. `productCode` debe existir (404 AGENT_PRODUCT_NOT_FOUND: guarda primero el producto). Para reintentar sin duplicar, manda el mismo `requestId` (UUID): la respuesta trae `replayed: true`. Nunca guardes datos personales de compradores, contrase\xF1as ni llaves.',
|
|
45343
45475
|
inputSchema: SaveInput.shape,
|
|
45344
45476
|
annotations: OVERWRITES_INTERNAL
|
|
45345
45477
|
}, async (input) => {
|
|
@@ -45892,7 +46024,7 @@ var EstimateMarketStudyInput = z173.object({
|
|
|
45892
46024
|
]).describe('"video" para generate_video_creative; "product_task" para create_product_task.'),
|
|
45893
46025
|
videoAngleCount: z173.number().int().min(1).max(3).describe("Los mismos 1, 2 o 3 videos que vas a pedir al crear."),
|
|
45894
46026
|
durationSeconds: z173.number().int().min(4).max(30).default(15).describe("La misma duraci\xF3n que enviar\xE1s al crear."),
|
|
45895
|
-
videoStructure: VideoStructureEnum.default(
|
|
46027
|
+
videoStructure: VideoStructureEnum.default(DEFAULT_GUIDED_VIDEO_STRUCTURE),
|
|
45896
46028
|
videoQuality: VideoQualityEnum.default("economy"),
|
|
45897
46029
|
videoResolution: VideoResolutionEnum.default("480p"),
|
|
45898
46030
|
productImageCount: z173.number().int().min(1).max(5).optional().describe("Cantidad de fotos del producto que adjuntar\xE1s (1-5)."),
|
|
@@ -45958,6 +46090,9 @@ function buildMarketStudyEstimateRequests(input) {
|
|
|
45958
46090
|
type: "ingest-resume",
|
|
45959
46091
|
options: {
|
|
45960
46092
|
...common,
|
|
46093
|
+
...videoGeneratorEnabled ? {
|
|
46094
|
+
forNewVideo: true
|
|
46095
|
+
} : {},
|
|
45961
46096
|
landingEnabled: outputs.includes("landing"),
|
|
45962
46097
|
adCreativeEnabled: outputs.includes("image"),
|
|
45963
46098
|
generateCreative: outputs.includes("image"),
|
|
@@ -45975,6 +46110,15 @@ function buildMarketStudyEstimateRequests(input) {
|
|
|
45975
46110
|
};
|
|
45976
46111
|
}
|
|
45977
46112
|
__name(buildMarketStudyEstimateRequests, "buildMarketStudyEstimateRequests");
|
|
46113
|
+
function requireAvailableEstimate(estimate) {
|
|
46114
|
+
if (!("unavailable" in estimate)) return estimate;
|
|
46115
|
+
const { code, message } = estimate.unavailable;
|
|
46116
|
+
if (code === McpErrorCode.VIDEO_SINGLE_TAKE_DISABLED) {
|
|
46117
|
+
throw mcp(code, `${message} Cotiza Multiescena y pide confirmaci\xF3n antes de crear el video.`);
|
|
46118
|
+
}
|
|
46119
|
+
throw mcp(McpErrorCode.INVALID_INPUT, message);
|
|
46120
|
+
}
|
|
46121
|
+
__name(requireAvailableEstimate, "requireAvailableEstimate");
|
|
45978
46122
|
function summarize(estimate) {
|
|
45979
46123
|
return {
|
|
45980
46124
|
typicalCredits: estimate.estimatedCostCredits,
|
|
@@ -45986,23 +46130,24 @@ function summarize(estimate) {
|
|
|
45986
46130
|
__name(summarize, "summarize");
|
|
45987
46131
|
function registerMarketStudyEstimateTools(server, api) {
|
|
45988
46132
|
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.",
|
|
46133
|
+
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
46134
|
inputSchema: EstimateMarketStudyInput.shape,
|
|
45991
46135
|
annotations: READS_INTERNAL
|
|
45992
46136
|
}, async (rawInput) => {
|
|
45993
46137
|
try {
|
|
45994
46138
|
const input = EstimateMarketStudyInput.parse(rawInput);
|
|
45995
46139
|
const { withoutStudy, withStudy } = buildMarketStudyEstimateRequests(input);
|
|
45996
|
-
const { estimates } = await api.postJson("/v1/billing/estimate/batch", {
|
|
46140
|
+
const { estimates: [withoutEstimate, withEstimate] } = CostEstimationBatchResponse.parse(await api.postJson("/v1/billing/estimate/batch", {
|
|
45997
46141
|
requests: [
|
|
45998
46142
|
withoutStudy,
|
|
45999
46143
|
withStudy
|
|
46000
46144
|
]
|
|
46001
|
-
});
|
|
46002
|
-
|
|
46003
|
-
if (!without || !withMarket) {
|
|
46145
|
+
}));
|
|
46146
|
+
if (!withoutEstimate || !withEstimate) {
|
|
46004
46147
|
throw new Error("La cotizaci\xF3n no devolvi\xF3 ambas opciones.");
|
|
46005
46148
|
}
|
|
46149
|
+
const without = requireAvailableEstimate(withoutEstimate);
|
|
46150
|
+
const withMarket = requireAvailableEstimate(withEstimate);
|
|
46006
46151
|
return asText({
|
|
46007
46152
|
kind: input.kind,
|
|
46008
46153
|
withoutMarketStudy: summarize(without),
|