@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/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:
|
|
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(),
|
|
@@ -7820,6 +7871,7 @@ var SellerPricingNoticeSchema = z16.object({
|
|
|
7820
7871
|
});
|
|
7821
7872
|
var SellerPricingSnapshotSchema = z16.object({
|
|
7822
7873
|
policyVersion: z16.literal(1),
|
|
7874
|
+
source: z16.literal("classic_commercial_edit").optional(),
|
|
7823
7875
|
submitted: SellerPricingInputSchema,
|
|
7824
7876
|
effective: SellerPricingInputSchema,
|
|
7825
7877
|
notices: z16.array(SellerPricingNoticeSchema).max(32),
|
|
@@ -9864,7 +9916,7 @@ var LandingConfigSchema = z28.object({
|
|
|
9864
9916
|
});
|
|
9865
9917
|
var CODE_LANDING_SCHEMA_VERSION = 1;
|
|
9866
9918
|
var CODE_LANDING_RUNTIME_VERSION = 1;
|
|
9867
|
-
var MAX_STOREFRONT_LANDING_BYTES =
|
|
9919
|
+
var MAX_STOREFRONT_LANDING_BYTES = 120 * 1024;
|
|
9868
9920
|
var UTF8_ENCODER = new TextEncoder();
|
|
9869
9921
|
function measureUtf8Bytes(value) {
|
|
9870
9922
|
return UTF8_ENCODER.encode(value).length;
|
|
@@ -15124,6 +15176,8 @@ var IngestEstimationOptions = z53.object({
|
|
|
15124
15176
|
aiEditAngleTiers: z53.array(AiEditTierSchema.nullable()).max(3).optional()
|
|
15125
15177
|
});
|
|
15126
15178
|
var IngestResumeEstimationOptions = z53.object({
|
|
15179
|
+
/** Autopilot quotes before creation share new video admission. Saved resumes omit this. */
|
|
15180
|
+
forNewVideo: z53.literal(true).optional(),
|
|
15127
15181
|
sourceProductUrl: z53.string().max(4096).optional(),
|
|
15128
15182
|
/** Number of product references already submitted by extract for cleaning. */
|
|
15129
15183
|
productImageCount: z53.number().int().min(1).max(INGEST_MAX_REFERENCE_IMAGES).optional(),
|
|
@@ -15182,6 +15236,8 @@ var IngestResumeEstimationOptions = z53.object({
|
|
|
15182
15236
|
styleMix: z53.boolean().optional()
|
|
15183
15237
|
});
|
|
15184
15238
|
var VideoCreativeEstimationOptions = z53.object({
|
|
15239
|
+
/** Owner-verified existing direct video only. New quotes omit it. */
|
|
15240
|
+
continuationTaskId: z53.string().min(1).max(128).optional(),
|
|
15185
15241
|
sourceProductUrl: z53.string().max(4096).optional(),
|
|
15186
15242
|
/** Direct free-video flow: one provider clip, no extraction/angles pipeline. */
|
|
15187
15243
|
videoMode: z53.enum([
|
|
@@ -15514,6 +15570,7 @@ var CostEstimationBatchRequest = z53.object({
|
|
|
15514
15570
|
requests: z53.array(CostEstimationRequest).min(1).max(COST_ESTIMATION_BATCH_LIMIT)
|
|
15515
15571
|
});
|
|
15516
15572
|
var CostEstimationUnavailableCode = z53.enum([
|
|
15573
|
+
"VIDEO_SINGLE_TAKE_DISABLED",
|
|
15517
15574
|
"CREATIVE_ENGINE_VIDEO_QUALITY_NOT_ADMITTED",
|
|
15518
15575
|
"CREATIVE_ENGINE_VIDEO_RESOLUTION_NOT_ADMITTED",
|
|
15519
15576
|
"STRUCTURE_NOT_ADMITTED",
|
|
@@ -18054,6 +18111,9 @@ var FeatureSpec = z68.object({
|
|
|
18054
18111
|
}
|
|
18055
18112
|
});
|
|
18056
18113
|
|
|
18114
|
+
// ../../packages/types/src/guided-video-format-policy.ts
|
|
18115
|
+
var DEFAULT_GUIDED_VIDEO_STRUCTURE = "multi_scene";
|
|
18116
|
+
|
|
18057
18117
|
// ../../packages/types/src/mix.ts
|
|
18058
18118
|
import { z as z70 } from "zod";
|
|
18059
18119
|
|
|
@@ -18101,7 +18161,9 @@ var MIX_DEGRADATION_REASONS = [
|
|
|
18101
18161
|
*/
|
|
18102
18162
|
"scene_length_unsupported",
|
|
18103
18163
|
/** Transient provider failures exhausted the budget. */
|
|
18104
|
-
"provider_unavailable"
|
|
18164
|
+
"provider_unavailable",
|
|
18165
|
+
/** The primary renders did not pass the quality checks within the budget. */
|
|
18166
|
+
"quality_retries_exhausted"
|
|
18105
18167
|
];
|
|
18106
18168
|
var MixDegradationReasonSchema = z69.enum(MIX_DEGRADATION_REASONS);
|
|
18107
18169
|
|
|
@@ -19225,6 +19287,10 @@ var ClassicLandingImageEditQuoteEnvelopeSchema = ClassicLandingImageEditInventor
|
|
|
19225
19287
|
var ClassicLandingImageEditBatchSnapshotSchema = ClassicLandingImageEditQuoteEnvelopeSchema.extend({
|
|
19226
19288
|
quoteId: z78.string().uuid()
|
|
19227
19289
|
}).strict();
|
|
19290
|
+
var ClassicLandingImageEditExecutionSnapshotSchema = ClassicLandingImageEditBatchSnapshotSchema.extend({
|
|
19291
|
+
executionVersion: z78.literal(2).optional(),
|
|
19292
|
+
commercialExecution: z78.literal(true).optional()
|
|
19293
|
+
}).strict();
|
|
19228
19294
|
var ClassicLandingImageEditInstructionPlanStatusSchema = z78.enum([
|
|
19229
19295
|
"planned",
|
|
19230
19296
|
"unavailable"
|
|
@@ -19248,7 +19314,7 @@ var ClassicLandingImageEditBatchCheckpointItemSchema = z78.object({
|
|
|
19248
19314
|
"localized"
|
|
19249
19315
|
]).optional()
|
|
19250
19316
|
}).strict();
|
|
19251
|
-
var
|
|
19317
|
+
var ClassicLandingImageEditBatchStatusCheckpointSchema = z78.object({
|
|
19252
19318
|
version: z78.literal(1),
|
|
19253
19319
|
kind: z78.literal("classic_image_batch"),
|
|
19254
19320
|
status: ClassicLandingImageEditBatchStatusSchema,
|
|
@@ -19262,6 +19328,27 @@ var ClassicLandingImageEditBatchCheckpointSchema = z78.object({
|
|
|
19262
19328
|
instructionPlan: ClassicLandingImageEditInstructionPlanStatusSchema.optional(),
|
|
19263
19329
|
items: z78.array(ClassicLandingImageEditBatchCheckpointItemSchema).max(CLASSIC_LANDING_IMAGE_EDIT_MAX_IMAGES)
|
|
19264
19330
|
}).strict();
|
|
19331
|
+
var ClassicLandingImageEditCommerceSchema = z78.object({
|
|
19332
|
+
beforeCountry: z78.string().nullable(),
|
|
19333
|
+
beforePrice: z78.string().nullable(),
|
|
19334
|
+
beforeCompareAtPrice: z78.string().nullable(),
|
|
19335
|
+
beforeOffer: z78.string().nullable(),
|
|
19336
|
+
beforePricing: SellerPricingSnapshotSchema.nullable(),
|
|
19337
|
+
country: z78.string().nullable(),
|
|
19338
|
+
pricing: SellerPricingSnapshotSchema
|
|
19339
|
+
}).strict();
|
|
19340
|
+
var ClassicLandingImageEditCommercialReceiptSchema = z78.object({
|
|
19341
|
+
kind: z78.literal("classic_image_commercial_batch"),
|
|
19342
|
+
commerce: ClassicLandingImageEditCommerceSchema
|
|
19343
|
+
}).strict();
|
|
19344
|
+
var ClassicLandingImageEditBatchCheckpointSchema = ClassicLandingImageEditBatchStatusCheckpointSchema.extend({
|
|
19345
|
+
commerce: ClassicLandingImageEditCommerceSchema.optional()
|
|
19346
|
+
}).strict();
|
|
19347
|
+
var ClassicLandingCommercialImageCandidateSchema = z78.object({
|
|
19348
|
+
key: z78.string().min(1).max(2048),
|
|
19349
|
+
width: z78.number().int().positive(),
|
|
19350
|
+
height: z78.number().int().positive()
|
|
19351
|
+
}).strict();
|
|
19265
19352
|
|
|
19266
19353
|
// ../../packages/types/src/landing-gif-execution-proof.ts
|
|
19267
19354
|
import { z as z79 } from "zod";
|
|
@@ -19611,6 +19698,11 @@ var SaveAgentPlaybookSchema = z81.object({
|
|
|
19611
19698
|
body: z81.string().trim().min(1).max(AGENT_MEMORY_LIMITS.playbookChars)
|
|
19612
19699
|
}).strict();
|
|
19613
19700
|
var AGENT_PENDING_OPERATION_TARGETS = [
|
|
19701
|
+
"campaign",
|
|
19702
|
+
"adset",
|
|
19703
|
+
"ad"
|
|
19704
|
+
];
|
|
19705
|
+
var AGENT_PENDING_BUDGET_TARGETS = [
|
|
19614
19706
|
"campaign",
|
|
19615
19707
|
"adset"
|
|
19616
19708
|
];
|
|
@@ -19636,7 +19728,7 @@ var AgentPendingOperationSchema = z81.discriminatedUnion("type", [
|
|
|
19636
19728
|
}).strict(),
|
|
19637
19729
|
z81.object({
|
|
19638
19730
|
type: z81.literal("meta_set_daily_budget"),
|
|
19639
|
-
target: z81.enum(
|
|
19731
|
+
target: z81.enum(AGENT_PENDING_BUDGET_TARGETS),
|
|
19640
19732
|
objectId: MetaObjectIdSchema,
|
|
19641
19733
|
/** En unidades de la moneda (COP 80000, USD 25.5), no en las de Meta. */
|
|
19642
19734
|
amount: z81.number().positive().max(1e9),
|
|
@@ -19707,6 +19799,12 @@ var SaveAgentSettingsSchema = z81.object({
|
|
|
19707
19799
|
/** Sugerido por campaña; el monto real lo acuerda el vendedor. */
|
|
19708
19800
|
adSetDailyBudget: z81.number().int().min(0).max(1e9).nullable().optional(),
|
|
19709
19801
|
budgetCurrency: z81.string().trim().length(3).toUpperCase().nullable().optional(),
|
|
19802
|
+
/**
|
|
19803
|
+
* Lo máximo que puede perder una prueba abierta, en `budgetCurrency`.
|
|
19804
|
+
* Al pasarlo, el turno propone apagar su campaña (el dueño aprueba).
|
|
19805
|
+
* Null = sin tope; no hay uno por defecto.
|
|
19806
|
+
*/
|
|
19807
|
+
testLossCap: z81.number().int().min(1).max(1e9).nullable().optional(),
|
|
19710
19808
|
/** Prende o apaga los turnos cada 3 horas. */
|
|
19711
19809
|
autopilot: z81.boolean().optional()
|
|
19712
19810
|
}).strict();
|
|
@@ -19846,6 +19944,8 @@ var AgentSettingsSchema = z81.object({
|
|
|
19846
19944
|
adSetDailyBudget: z81.number().int().nullable(),
|
|
19847
19945
|
/** La guardada, la del país o COP si aún no se sabe. */
|
|
19848
19946
|
budgetCurrency: z81.string(),
|
|
19947
|
+
/** Pérdida máxima por prueba abierta en `budgetCurrency`; null = sin tope. */
|
|
19948
|
+
testLossCap: z81.number().int().nullable(),
|
|
19849
19949
|
autopilot: z81.boolean(),
|
|
19850
19950
|
/** Null mientras la cuenta no ha guardado nada. */
|
|
19851
19951
|
updatedAt: z81.string().nullable()
|
|
@@ -24823,6 +24923,14 @@ var ProductControlAdSchema = z105.object({
|
|
|
24823
24923
|
name: z105.string(),
|
|
24824
24924
|
/** `effective_status` de Meta (ACTIVE, PAUSED, …), tal cual. */
|
|
24825
24925
|
status: z105.string().nullable(),
|
|
24926
|
+
/**
|
|
24927
|
+
* Conjunto del anuncio: con ADSET_PAUSED, este es el id que hay que prender.
|
|
24928
|
+
* `null` si Meta no lo mandó; una respuesta de una API anterior sin el campo
|
|
24929
|
+
* también se lee como `null` en vez de rechazar todo el desglose.
|
|
24930
|
+
*/
|
|
24931
|
+
adSetId: z105.string().nullable().default(null),
|
|
24932
|
+
/** `effective_status` del conjunto, tal cual. */
|
|
24933
|
+
adSetStatus: z105.string().nullable().default(null),
|
|
24826
24934
|
thumbnailUrl: z105.string().url().nullable(),
|
|
24827
24935
|
creativeKind: z105.enum([
|
|
24828
24936
|
"video",
|
|
@@ -25149,7 +25257,8 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25149
25257
|
// MCP 12.8.0: + manual-only, cohort-gated «viral» preset/angle narrative.
|
|
25150
25258
|
// MCP 12.18.1: «viral» prose admits Un solo clip (15 s).
|
|
25151
25259
|
// MCP 12.19.0: + landingMode (classic | code landing).
|
|
25152
|
-
|
|
25260
|
+
// MCP 12.25.0: Multiescena predeterminada para videos nuevos.
|
|
25261
|
+
"90ba32108e2a484d662b9441e7facf246fad166933d42f4659831f16801b6b12",
|
|
25153
25262
|
"credit_consuming",
|
|
25154
25263
|
"creative",
|
|
25155
25264
|
[
|
|
@@ -25393,31 +25502,42 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25393
25502
|
"cost_estimate"
|
|
25394
25503
|
]
|
|
25395
25504
|
),
|
|
25396
|
-
defineCapability(
|
|
25397
|
-
"
|
|
25398
|
-
|
|
25399
|
-
|
|
25400
|
-
|
|
25401
|
-
|
|
25402
|
-
|
|
25403
|
-
"
|
|
25404
|
-
|
|
25405
|
-
|
|
25406
|
-
"
|
|
25407
|
-
|
|
25408
|
-
|
|
25409
|
-
|
|
25410
|
-
|
|
25411
|
-
|
|
25412
|
-
|
|
25413
|
-
|
|
25414
|
-
|
|
25415
|
-
|
|
25416
|
-
|
|
25417
|
-
|
|
25418
|
-
|
|
25419
|
-
|
|
25420
|
-
|
|
25505
|
+
defineCapability(
|
|
25506
|
+
"estimate_market_study_cost",
|
|
25507
|
+
// MCP 12.25.0: Multiescena predeterminada para videos nuevos.
|
|
25508
|
+
"d7b3570035bfc209cc3a4e30de8feeb35c11fae99663e17cc5a5fcf57e32bf81",
|
|
25509
|
+
"none",
|
|
25510
|
+
"read_only",
|
|
25511
|
+
[
|
|
25512
|
+
"read"
|
|
25513
|
+
],
|
|
25514
|
+
[
|
|
25515
|
+
slot("creative_kind", true, [
|
|
25516
|
+
"kind"
|
|
25517
|
+
], []),
|
|
25518
|
+
slot("video_configuration", true, [
|
|
25519
|
+
"videoAngleCount",
|
|
25520
|
+
"durationSeconds",
|
|
25521
|
+
"videoStructure",
|
|
25522
|
+
"videoQuality",
|
|
25523
|
+
"videoResolution"
|
|
25524
|
+
], []),
|
|
25525
|
+
slot("estimate_options", false, [
|
|
25526
|
+
"productImageCount",
|
|
25527
|
+
"outputs",
|
|
25528
|
+
"generateAiMusic",
|
|
25529
|
+
"generateAiEdit",
|
|
25530
|
+
"replicateWinnerWhenFound"
|
|
25531
|
+
], [])
|
|
25532
|
+
],
|
|
25533
|
+
[
|
|
25534
|
+
"creative"
|
|
25535
|
+
],
|
|
25536
|
+
[
|
|
25537
|
+
"cost_estimate"
|
|
25538
|
+
],
|
|
25539
|
+
MCP_ONLY_CHANNEL_EXPOSURE
|
|
25540
|
+
),
|
|
25421
25541
|
defineCapability("find_winning_products", "b73a18bb9618b96067b17791bf2f8e7450e17e34881c4f997e117be89abe058d", "credit_consuming", "business", [
|
|
25422
25542
|
"credit_consuming",
|
|
25423
25543
|
"state_change"
|
|
@@ -25730,7 +25850,8 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25730
25850
|
// MCP 12.8.0: + manual-only, cohort-gated «viral» preset/angle narrative.
|
|
25731
25851
|
// MCP 12.18.1: «viral» prose admits Un solo clip (15 s).
|
|
25732
25852
|
// MCP 12.19.0: + landingMode (classic | code landing).
|
|
25733
|
-
|
|
25853
|
+
// MCP 12.25.0: Multiescena predeterminada para videos nuevos.
|
|
25854
|
+
"9b0169fe939bd43c9a0fd64de8308e143b388ab38dd3cc0d0b95182ca85f44eb",
|
|
25734
25855
|
"credit_consuming",
|
|
25735
25856
|
"creative",
|
|
25736
25857
|
[
|
|
@@ -27290,7 +27411,7 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
27290
27411
|
], SHARED_CHANNEL_EXPOSURE),
|
|
27291
27412
|
defineCapability(
|
|
27292
27413
|
"save_agent_memory",
|
|
27293
|
-
"
|
|
27414
|
+
"fa4641b787c522add5f81987325304f7cc54ed60539515f45ec1c6551380dc14",
|
|
27294
27415
|
// La memoria es el cuaderno del propio agente y no cobra créditos. Aprobar
|
|
27295
27416
|
// un pendiente que trae `operation` sí cambia la campaña o el conjunto en
|
|
27296
27417
|
// Meta: esa aprobación ES la confirmación del dueño (el pendiente muestra
|
|
@@ -33040,7 +33161,7 @@ var ApiClient = class {
|
|
|
33040
33161
|
};
|
|
33041
33162
|
|
|
33042
33163
|
// src/index.ts
|
|
33043
|
-
var MCP_VERSION = "12.
|
|
33164
|
+
var MCP_VERSION = "12.26.0";
|
|
33044
33165
|
|
|
33045
33166
|
// src/meta-upload-app.ts
|
|
33046
33167
|
import { readFileSync } from "fs";
|
|
@@ -34068,6 +34189,11 @@ var VideoPresetEnum = VideoPreset.extract([
|
|
|
34068
34189
|
"viral"
|
|
34069
34190
|
]);
|
|
34070
34191
|
var VideoStructureEnum = VideoStructure;
|
|
34192
|
+
var GUIDED_VIDEO_STRUCTURE_LABELS = {
|
|
34193
|
+
multi_scene: "Multiescena",
|
|
34194
|
+
single_take: "Un solo clip"
|
|
34195
|
+
};
|
|
34196
|
+
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
34197
|
var VideoQualityEnum = VideoQuality;
|
|
34072
34198
|
var VideoRouteIdEnum = VideoRouteId;
|
|
34073
34199
|
var TaskCreativeVariantVideoPresetEnum = TaskCreativeVariantVideoPreset;
|
|
@@ -34410,6 +34536,7 @@ var McpErrorCode = {
|
|
|
34410
34536
|
SERVICE_VIDEO_SNAPSHOT_UNAVAILABLE: "SERVICE_VIDEO_SNAPSHOT_UNAVAILABLE",
|
|
34411
34537
|
// Input
|
|
34412
34538
|
INVALID_INPUT: "INVALID_INPUT",
|
|
34539
|
+
VIDEO_SINGLE_TAKE_DISABLED: "VIDEO_SINGLE_TAKE_DISABLED",
|
|
34413
34540
|
INSUFFICIENT_CREDITS: "INSUFFICIENT_CREDITS",
|
|
34414
34541
|
FEATURE_NOT_AVAILABLE: "FEATURE_NOT_AVAILABLE",
|
|
34415
34542
|
TASK_QUOTA_EXCEEDED: "TASK_QUOTA_EXCEEDED",
|
|
@@ -34598,6 +34725,7 @@ var McpErrorCode = {
|
|
|
34598
34725
|
INTERNAL: "INTERNAL"
|
|
34599
34726
|
};
|
|
34600
34727
|
var CODE_MESSAGES = {
|
|
34728
|
+
VIDEO_SINGLE_TAKE_DISABLED: "Single Take is disabled for new videos. Quote Multi Scene and ask for confirmation before creating the video.",
|
|
34601
34729
|
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
34730
|
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
34731
|
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 +34927,7 @@ var AGENT_MEMORY_CODES = [
|
|
|
34799
34927
|
McpErrorCode.AGENT_SHOP_REQUIRED
|
|
34800
34928
|
];
|
|
34801
34929
|
var INVALID_PARAM_CODES = /* @__PURE__ */ new Set([
|
|
34930
|
+
McpErrorCode.VIDEO_SINGLE_TAKE_DISABLED,
|
|
34802
34931
|
// Input/auth
|
|
34803
34932
|
McpErrorCode.INVALID_INPUT,
|
|
34804
34933
|
McpErrorCode.INSUFFICIENT_CREDITS,
|
|
@@ -34932,6 +35061,7 @@ var INVALID_PARAM_CODES = /* @__PURE__ */ new Set([
|
|
|
34932
35061
|
McpErrorCode.NO_META_AD_ACCOUNTS
|
|
34933
35062
|
]);
|
|
34934
35063
|
var PASSTHROUGH_CODES = /* @__PURE__ */ new Set([
|
|
35064
|
+
McpErrorCode.VIDEO_SINGLE_TAKE_DISABLED,
|
|
34935
35065
|
McpErrorCode.USER_NOT_PROVISIONED,
|
|
34936
35066
|
McpErrorCode.CREDIT_ADMISSION_UNAVAILABLE,
|
|
34937
35067
|
McpErrorCode.INSUFFICIENT_CREDITS,
|
|
@@ -35180,7 +35310,7 @@ function translateError(err) {
|
|
|
35180
35310
|
const message = resolveMessage(body.code, void 0);
|
|
35181
35311
|
return mcp(body.code, saved2 ? `Commerce changes were saved. ${message}` : message, extra);
|
|
35182
35312
|
}
|
|
35183
|
-
const messageCode = typeof body.message === "string" && /^VOICE_[A-Z0-9_]+$/.test(body.message) ? body.message : void 0;
|
|
35313
|
+
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
35314
|
const rawCode = (typeof body.code === "string" ? body.code : void 0) ?? messageCode;
|
|
35185
35315
|
const code = rawCode === "INSUFFICIENT_CREDIT" ? McpErrorCode.INSUFFICIENT_CREDITS : rawCode;
|
|
35186
35316
|
if (code && PASSTHROUGH_CODES.has(code)) {
|
|
@@ -37216,17 +37346,17 @@ var CreateProductTaskInput = z152.object({
|
|
|
37216
37346
|
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
37347
|
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
37348
|
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
|
|
37349
|
+
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
37350
|
sound: ViralVideoSoundSchema.optional().describe('Solo para Viral. "music" = m\xFAsica (por defecto), "music_voiceover" = m\xFAsica y voz en off, "none" = sin sonido.'),
|
|
37221
37351
|
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
37352
|
durationSeconds: z152.union([
|
|
37223
37353
|
z152.literal(15),
|
|
37224
37354
|
z152.literal(30)
|
|
37225
|
-
]).default(15).describe("Opcional. Duraci\xF3n objetivo
|
|
37355
|
+
]).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
37356
|
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
37357
|
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(
|
|
37229
|
-
videoStructure: VideoStructureEnum.
|
|
37358
|
+
videoTier: VideoTierEnum.optional().describe("Compatibilidad con clientes antiguos. Usa videoStructure para solicitudes nuevas."),
|
|
37359
|
+
videoStructure: VideoStructureEnum.optional().describe(GUIDED_VIDEO_STRUCTURE_DESCRIPTION),
|
|
37230
37360
|
videoQuality: VideoQualityEnum.default("economy").describe('Opcional. Calidad: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro. El proveedor se elige internamente. Default: economy.'),
|
|
37231
37361
|
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
37362
|
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 +37774,24 @@ function registerTaskTools(server, api, { proxyBaseUrl = null, transport = "http
|
|
|
37644
37774
|
server.registerTool("create_product_task", {
|
|
37645
37775
|
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
37776
|
|
|
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,
|
|
37777
|
+
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
37778
|
|
|
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.`,
|
|
37779
|
+
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
37780
|
inputSchema: CreateProductTaskInput.shape,
|
|
37651
37781
|
annotations: CREATES_PAID_OPEN_WORLD
|
|
37652
37782
|
}, async (input) => {
|
|
37653
37783
|
try {
|
|
37654
37784
|
const selectedOutputs = input.outputs ?? DEFAULT_PRODUCT_TASK_OUTPUTS;
|
|
37785
|
+
const wireTier = input.videoTier ? resolveWireVideoTier(input.videoTier, input.durationSeconds) : void 0;
|
|
37786
|
+
const videoStructure = input.videoStructure ?? (wireTier === "single_call" ? "single_take" : DEFAULT_GUIDED_VIDEO_STRUCTURE);
|
|
37655
37787
|
const videoPreset = selectedOutputs.includes("video") && input.competitorScanEnabled === true ? "auto" : input.videoPreset;
|
|
37656
|
-
assertVideoPresetDurationCompatibility(videoPreset, input.durationSeconds,
|
|
37657
|
-
assertAngleNarrativeDurationCompatibility(input.angleNarratives, input.durationSeconds,
|
|
37788
|
+
assertVideoPresetDurationCompatibility(videoPreset, input.durationSeconds, videoStructure, input.videoQuality);
|
|
37789
|
+
assertAngleNarrativeDurationCompatibility(input.angleNarratives, input.durationSeconds, videoStructure);
|
|
37658
37790
|
if (input.animationStyle !== void 0 && !animationStyleApplies(videoPreset, input.angleNarratives)) {
|
|
37659
37791
|
throw new Error("animationStyle solo aplica a narrativas animadas.");
|
|
37660
37792
|
}
|
|
37661
37793
|
if (selectedOutputs.includes("video")) {
|
|
37662
|
-
assertSemanticVideoDurationCompatibility(
|
|
37794
|
+
assertSemanticVideoDurationCompatibility(videoStructure, input.videoQuality, input.durationSeconds);
|
|
37663
37795
|
}
|
|
37664
37796
|
if (!input.images && !input.projectId && !input.winnerReference) {
|
|
37665
37797
|
throw new Error("images, winnerReference o projectId es requerido.");
|
|
@@ -37673,7 +37805,7 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
|
|
|
37673
37805
|
if (input.angleNarratives && input.videoAngleCount !== void 0 && input.angleNarratives.length > input.videoAngleCount) {
|
|
37674
37806
|
throw new Error("angleNarratives no puede contener m\xE1s entradas que videoAngleCount.");
|
|
37675
37807
|
}
|
|
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")))}` : ""}`);
|
|
37808
|
+
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
37809
|
const resolvedInputImages = await resolveWinnerImages(api, input.winnerReference, input.images);
|
|
37678
37810
|
const assetIds = resolvedInputImages ? uploadedAssetIds(resolvedInputImages) : null;
|
|
37679
37811
|
const imgs = resolvedInputImages && !assetIds ? await resolveImages(resolvedInputImages.map(({ url: url3, path: path3 }) => ({
|
|
@@ -37687,7 +37819,6 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
|
|
|
37687
37819
|
filename: `image-${i}.png`
|
|
37688
37820
|
}));
|
|
37689
37821
|
const resolved = resolveVideoPreset(videoPreset);
|
|
37690
|
-
const wireTier = input.videoTier ? resolveWireVideoTier(input.videoTier, input.durationSeconds) : void 0;
|
|
37691
37822
|
const reviewPolicy = resolveConversationalReviewPolicy(input.aiDecidesAll);
|
|
37692
37823
|
const fields = {
|
|
37693
37824
|
...flatten({
|
|
@@ -37706,7 +37837,7 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
|
|
|
37706
37837
|
"options.videoStyle": resolved?.videoStyle,
|
|
37707
37838
|
"options.narrativeStyle": resolved?.narrativeStyle,
|
|
37708
37839
|
"options.videoTier": wireTier,
|
|
37709
|
-
"options.videoStructure":
|
|
37840
|
+
"options.videoStructure": videoStructure,
|
|
37710
37841
|
"options.videoQuality": input.videoQuality,
|
|
37711
37842
|
"options.ugcFormat": resolveVideoFormatForDuration(input.durationSeconds),
|
|
37712
37843
|
"options.videoResolution": input.videoResolution,
|
|
@@ -39570,7 +39701,7 @@ var VideoInput = z156.object({
|
|
|
39570
39701
|
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
39702
|
sound: ViralVideoSoundSchema.optional().describe('Solo para Viral. "music" = m\xFAsica (por defecto), "music_voiceover" = m\xFAsica y voz en off, "none" = sin sonido.'),
|
|
39572
39703
|
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(
|
|
39704
|
+
videoStructure: VideoStructureEnum.default(DEFAULT_GUIDED_VIDEO_STRUCTURE).describe(GUIDED_VIDEO_STRUCTURE_DESCRIPTION),
|
|
39574
39705
|
videoQuality: VideoQualityEnum.default("economy").describe('Opcional. Calidad: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro. El sistema elige el proveedor internamente. Default: economy.'),
|
|
39575
39706
|
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
39707
|
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 +40009,7 @@ function registerCreativeTools(server, api, { transport = "http", proxyBaseUrl =
|
|
|
39878
40009
|
}
|
|
39879
40010
|
});
|
|
39880
40011
|
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:
|
|
40012
|
+
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
40013
|
inputSchema: VideoInput.shape,
|
|
39883
40014
|
annotations: CREATES_PAID_OPEN_WORLD
|
|
39884
40015
|
}, async (input) => {
|
|
@@ -39891,7 +40022,8 @@ function registerCreativeTools(server, api, { transport = "http", proxyBaseUrl =
|
|
|
39891
40022
|
throw new Error("angleNarratives no puede contener m\xE1s entradas que videoAngleCount.");
|
|
39892
40023
|
}
|
|
39893
40024
|
const marketStudyEnabled = input.competitorScanEnabled === true || Boolean(input.angleNarratives?.includes("market"));
|
|
39894
|
-
|
|
40025
|
+
const format = GUIDED_VIDEO_STRUCTURE_LABELS[input.videoStructure];
|
|
40026
|
+
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
40027
|
const guidedSetup = input.creativeSetup.mode === "guided" ? input.creativeSetup : null;
|
|
39896
40028
|
const videoPreset = input.competitorScanEnabled === true ? "auto" : guidedSetup?.videoPreset ?? "auto";
|
|
39897
40029
|
assertVideoPresetDurationCompatibility(videoPreset, input.durationSeconds, input.videoStructure, input.videoQuality);
|
|
@@ -43802,7 +43934,7 @@ function queryString(values) {
|
|
|
43802
43934
|
__name(queryString, "queryString");
|
|
43803
43935
|
function registerAgentMemoryTools(server, api) {
|
|
43804
43936
|
server.registerTool("get_agent_memory_brief", {
|
|
43805
|
-
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.",
|
|
43937
|
+
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.",
|
|
43806
43938
|
inputSchema: BriefInput.shape,
|
|
43807
43939
|
annotations: READS_INTERNAL
|
|
43808
43940
|
}, async (input) => {
|
|
@@ -43824,7 +43956,7 @@ function registerAgentMemoryTools(server, api) {
|
|
|
43824
43956
|
}
|
|
43825
43957
|
});
|
|
43826
43958
|
server.registerTool("save_agent_memory", {
|
|
43827
|
-
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
|
|
43959
|
+
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.',
|
|
43828
43960
|
inputSchema: SaveInput.shape,
|
|
43829
43961
|
annotations: OVERWRITES_INTERNAL
|
|
43830
43962
|
}, async (input) => {
|
|
@@ -44377,7 +44509,7 @@ var EstimateMarketStudyInput = z172.object({
|
|
|
44377
44509
|
]).describe('"video" para generate_video_creative; "product_task" para create_product_task.'),
|
|
44378
44510
|
videoAngleCount: z172.number().int().min(1).max(3).describe("Los mismos 1, 2 o 3 videos que vas a pedir al crear."),
|
|
44379
44511
|
durationSeconds: z172.number().int().min(4).max(30).default(15).describe("La misma duraci\xF3n que enviar\xE1s al crear."),
|
|
44380
|
-
videoStructure: VideoStructureEnum.default(
|
|
44512
|
+
videoStructure: VideoStructureEnum.default(DEFAULT_GUIDED_VIDEO_STRUCTURE),
|
|
44381
44513
|
videoQuality: VideoQualityEnum.default("economy"),
|
|
44382
44514
|
videoResolution: VideoResolutionEnum.default("480p"),
|
|
44383
44515
|
productImageCount: z172.number().int().min(1).max(5).optional().describe("Cantidad de fotos del producto que adjuntar\xE1s (1-5)."),
|
|
@@ -44443,6 +44575,9 @@ function buildMarketStudyEstimateRequests(input) {
|
|
|
44443
44575
|
type: "ingest-resume",
|
|
44444
44576
|
options: {
|
|
44445
44577
|
...common,
|
|
44578
|
+
...videoGeneratorEnabled ? {
|
|
44579
|
+
forNewVideo: true
|
|
44580
|
+
} : {},
|
|
44446
44581
|
landingEnabled: outputs.includes("landing"),
|
|
44447
44582
|
adCreativeEnabled: outputs.includes("image"),
|
|
44448
44583
|
generateCreative: outputs.includes("image"),
|
|
@@ -44460,6 +44595,15 @@ function buildMarketStudyEstimateRequests(input) {
|
|
|
44460
44595
|
};
|
|
44461
44596
|
}
|
|
44462
44597
|
__name(buildMarketStudyEstimateRequests, "buildMarketStudyEstimateRequests");
|
|
44598
|
+
function requireAvailableEstimate(estimate) {
|
|
44599
|
+
if (!("unavailable" in estimate)) return estimate;
|
|
44600
|
+
const { code, message } = estimate.unavailable;
|
|
44601
|
+
if (code === McpErrorCode.VIDEO_SINGLE_TAKE_DISABLED) {
|
|
44602
|
+
throw mcp(code, `${message} Cotiza Multiescena y pide confirmaci\xF3n antes de crear el video.`);
|
|
44603
|
+
}
|
|
44604
|
+
throw mcp(McpErrorCode.INVALID_INPUT, message);
|
|
44605
|
+
}
|
|
44606
|
+
__name(requireAvailableEstimate, "requireAvailableEstimate");
|
|
44463
44607
|
function summarize(estimate) {
|
|
44464
44608
|
return {
|
|
44465
44609
|
typicalCredits: estimate.estimatedCostCredits,
|
|
@@ -44471,23 +44615,24 @@ function summarize(estimate) {
|
|
|
44471
44615
|
__name(summarize, "summarize");
|
|
44472
44616
|
function registerMarketStudyEstimateTools(server, api) {
|
|
44473
44617
|
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.",
|
|
44618
|
+
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
44619
|
inputSchema: EstimateMarketStudyInput.shape,
|
|
44476
44620
|
annotations: READS_INTERNAL
|
|
44477
44621
|
}, async (rawInput) => {
|
|
44478
44622
|
try {
|
|
44479
44623
|
const input = EstimateMarketStudyInput.parse(rawInput);
|
|
44480
44624
|
const { withoutStudy, withStudy } = buildMarketStudyEstimateRequests(input);
|
|
44481
|
-
const { estimates } = await api.postJson("/v1/billing/estimate/batch", {
|
|
44625
|
+
const { estimates: [withoutEstimate, withEstimate] } = CostEstimationBatchResponse.parse(await api.postJson("/v1/billing/estimate/batch", {
|
|
44482
44626
|
requests: [
|
|
44483
44627
|
withoutStudy,
|
|
44484
44628
|
withStudy
|
|
44485
44629
|
]
|
|
44486
|
-
});
|
|
44487
|
-
|
|
44488
|
-
if (!without || !withMarket) {
|
|
44630
|
+
}));
|
|
44631
|
+
if (!withoutEstimate || !withEstimate) {
|
|
44489
44632
|
throw new Error("La cotizaci\xF3n no devolvi\xF3 ambas opciones.");
|
|
44490
44633
|
}
|
|
44634
|
+
const without = requireAvailableEstimate(withoutEstimate);
|
|
44635
|
+
const withMarket = requireAvailableEstimate(withEstimate);
|
|
44491
44636
|
return asText({
|
|
44492
44637
|
kind: input.kind,
|
|
44493
44638
|
withoutMarketStudy: summarize(without),
|