@productmaker/mcp 12.21.2 → 12.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/http.js +1357 -1131
- package/dist/stdio.js +1346 -1120
- package/package.json +3 -3
package/dist/stdio.js
CHANGED
|
@@ -192,8 +192,31 @@ __name(canonicalizeProductContext, "canonicalizeProductContext");
|
|
|
192
192
|
import { z as z5 } from "zod";
|
|
193
193
|
|
|
194
194
|
// ../../packages/types/src/pricing-gemini-omni.ts
|
|
195
|
-
var
|
|
196
|
-
|
|
195
|
+
var GEMINI_OMNI_RATE_CENTS_PER_SEC = {
|
|
196
|
+
"720p": {
|
|
197
|
+
ourCostCents: 4.5,
|
|
198
|
+
userPriceCents: 9
|
|
199
|
+
},
|
|
200
|
+
"1080p": {
|
|
201
|
+
ourCostCents: 5,
|
|
202
|
+
userPriceCents: 10
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
function geminiOmniBilledSeconds(clipDurationSec) {
|
|
206
|
+
if (!Number.isFinite(clipDurationSec) || clipDurationSec <= 0) return 1;
|
|
207
|
+
return Math.max(1, Math.round(clipDurationSec));
|
|
208
|
+
}
|
|
209
|
+
__name(geminiOmniBilledSeconds, "geminiOmniBilledSeconds");
|
|
210
|
+
function priceGeminiOmniVideo(tier, clipDurationSec) {
|
|
211
|
+
const rate = GEMINI_OMNI_RATE_CENTS_PER_SEC[tier];
|
|
212
|
+
const seconds = geminiOmniBilledSeconds(clipDurationSec);
|
|
213
|
+
return {
|
|
214
|
+
ourCostCents: rate.ourCostCents * seconds,
|
|
215
|
+
userPriceCents: rate.userPriceCents * seconds
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
__name(priceGeminiOmniVideo, "priceGeminiOmniVideo");
|
|
219
|
+
var GEMINI_OMNI_REFERENCE_BLOCK_PRICE = priceGeminiOmniVideo("1080p", 10);
|
|
197
220
|
|
|
198
221
|
// ../../packages/types/src/image-models.ts
|
|
199
222
|
var IMAGE_RESOLUTIONS = [
|
|
@@ -1205,25 +1228,14 @@ var DEFAULT_PRICING = {
|
|
|
1205
1228
|
ourCostCents: 120,
|
|
1206
1229
|
userPriceCents: 240
|
|
1207
1230
|
},
|
|
1208
|
-
// Gemini Omni Video — Mix primary generator since 2026-08-18.
|
|
1209
|
-
//
|
|
1210
|
-
//
|
|
1211
|
-
//
|
|
1212
|
-
// The wire model became `google/gemini-omni-flash-1-1` on 2026-09-01; this
|
|
1213
|
-
// KEY stayed `kie:gemini-omni-video` on purpose, because 1.1 charges the
|
|
1214
|
-
// same flat rate and renaming it would orphan every historical
|
|
1215
|
-
// BillingRecord for nothing.
|
|
1231
|
+
// Gemini Omni Video — Mix primary generator since 2026-08-18. The KEY stays
|
|
1232
|
+
// `kie:gemini-omni-video` across wire upgrades (1.1 on 2026-09-01, 1.2 on
|
|
1233
|
+
// 2026-11-17) so historical BillingRecords keep resolving.
|
|
1216
1234
|
//
|
|
1217
|
-
//
|
|
1218
|
-
//
|
|
1219
|
-
//
|
|
1220
|
-
|
|
1221
|
-
// than repeating the numbers: a literal here that drifted from the estimator
|
|
1222
|
-
// would quote one price and charge another on every mix.
|
|
1223
|
-
"kie:gemini-omni-video": {
|
|
1224
|
-
ourCostCents: GEMINI_OMNI_FLAT_OUR_COST_CENTS,
|
|
1225
|
-
userPriceCents: GEMINI_OMNI_FLAT_USER_PRICE_CENTS
|
|
1226
|
-
},
|
|
1235
|
+
// 1.2 bills PER SECOND of the input clip by resolution: the mix webhook
|
|
1236
|
+
// passes priceGeminiOmniVideo() overrides (see pricing-gemini-omni.ts). This
|
|
1237
|
+
// static entry is the reference for one 10s block at 1080p, for audits.
|
|
1238
|
+
"kie:gemini-omni-video": GEMINI_OMNI_REFERENCE_BLOCK_PRICE,
|
|
1227
1239
|
"kie:video-lipsync-generation": {
|
|
1228
1240
|
ourCostCents: 45,
|
|
1229
1241
|
userPriceCents: 90
|
|
@@ -1362,6 +1374,13 @@ var DEFAULT_PRICING = {
|
|
|
1362
1374
|
ourCostCents: 3,
|
|
1363
1375
|
userPriceCents: 6
|
|
1364
1376
|
},
|
|
1377
|
+
// Landing policy rung since 2026-11-14 (KIE_LANDING_POLICY_IMAGE_MODEL).
|
|
1378
|
+
// KIE: 6.3 credits at 2K + 1.44 per input image ($0.005/credit) — ~$0.039 with
|
|
1379
|
+
// one reference, ~$0.053 with three; 6¢ covers the usual 1–3 product refs.
|
|
1380
|
+
"kie:image-generation:seedream-5-5-image-to-image": {
|
|
1381
|
+
ourCostCents: 6,
|
|
1382
|
+
userPriceCents: 12
|
|
1383
|
+
},
|
|
1365
1384
|
// flux-3/klein-edit-image — KIE's edit-only Jobs model (image_urls required).
|
|
1366
1385
|
// Flat key: the billing row carries no resolution tier for it. KIE charges
|
|
1367
1386
|
// ~$0.008@1K / ~$0.0125@2K / ~$0.0325@4K — 2¢ ourCost covers the common
|
|
@@ -8375,6 +8394,22 @@ var MoveAnchorOperationSchema = z24.object({
|
|
|
8375
8394
|
beforeAnchorId: CodeLandingIdSchema.optional(),
|
|
8376
8395
|
afterAnchorId: CodeLandingIdSchema.optional()
|
|
8377
8396
|
});
|
|
8397
|
+
var ReplaceTextOperationSchema = z24.object({
|
|
8398
|
+
requirementIds: LandingPatchRequirementIdsSchema,
|
|
8399
|
+
kind: z24.literal("replace_text"),
|
|
8400
|
+
anchorId: CodeLandingIdSchema,
|
|
8401
|
+
pmId: z24.string().min(1).max(80).optional(),
|
|
8402
|
+
currentText: z24.string().min(1).max(2e3).optional(),
|
|
8403
|
+
text: z24.string().min(1).max(4e3)
|
|
8404
|
+
});
|
|
8405
|
+
var ReplaceImageOperationSchema = z24.object({
|
|
8406
|
+
requirementIds: LandingPatchRequirementIdsSchema,
|
|
8407
|
+
kind: z24.literal("replace_image"),
|
|
8408
|
+
anchorId: CodeLandingIdSchema,
|
|
8409
|
+
assetId: CodeLandingIdSchema,
|
|
8410
|
+
replacementAssetId: CodeLandingIdSchema,
|
|
8411
|
+
alt: z24.string().min(1).max(300).optional()
|
|
8412
|
+
});
|
|
8378
8413
|
var LandingPatchOperationSchema = z24.discriminatedUnion("kind", [
|
|
8379
8414
|
z24.object({
|
|
8380
8415
|
requirementIds: LandingPatchRequirementIdsSchema,
|
|
@@ -8382,6 +8417,8 @@ var LandingPatchOperationSchema = z24.discriminatedUnion("kind", [
|
|
|
8382
8417
|
anchorId: CodeLandingIdSchema,
|
|
8383
8418
|
html: z24.string().min(1).max(22e4)
|
|
8384
8419
|
}),
|
|
8420
|
+
ReplaceTextOperationSchema,
|
|
8421
|
+
ReplaceImageOperationSchema,
|
|
8385
8422
|
z24.object({
|
|
8386
8423
|
requirementIds: LandingPatchRequirementIdsSchema,
|
|
8387
8424
|
kind: z24.literal("replace_css"),
|
|
@@ -8442,6 +8479,17 @@ var LandingPatchSchema = z24.object({
|
|
|
8442
8479
|
operations: z24.array(LandingPatchOperationSchema).min(1).max(32)
|
|
8443
8480
|
}).superRefine((value, ctx) => {
|
|
8444
8481
|
value.operations.forEach((operation, index) => {
|
|
8482
|
+
if (operation.kind === "replace_text" && operation.pmId == null === (operation.currentText == null)) {
|
|
8483
|
+
ctx.addIssue({
|
|
8484
|
+
code: z24.ZodIssueCode.custom,
|
|
8485
|
+
message: "replace_text requires exactly one of pmId or currentText",
|
|
8486
|
+
path: [
|
|
8487
|
+
"operations",
|
|
8488
|
+
index
|
|
8489
|
+
]
|
|
8490
|
+
});
|
|
8491
|
+
return;
|
|
8492
|
+
}
|
|
8445
8493
|
if (operation.kind !== "move_anchor") return;
|
|
8446
8494
|
if (operation.beforeAnchorId == null === (operation.afterAnchorId == null)) {
|
|
8447
8495
|
ctx.addIssue({
|
|
@@ -11211,6 +11259,14 @@ var CreativeEngineRecipeSchema = z39.object({
|
|
|
11211
11259
|
* speaker-based rules exactly.
|
|
11212
11260
|
*/
|
|
11213
11261
|
personFramingPolicy: z39.literal("scene_person_framing_v1").optional(),
|
|
11262
|
+
/**
|
|
11263
|
+
* New executable recipes keep multi-scene cuts tight: at most 0.4 s
|
|
11264
|
+
* of silence across a seam, a 0.15 s minimum tail after each master
|
|
11265
|
+
* and a fitted total down to 90% of the request (same price) instead
|
|
11266
|
+
* of silent padding. Absent — every historical recipe — keeps the
|
|
11267
|
+
* 1.0 s cap, 0.35 s tail and 100% floor exactly. Single take ignores it.
|
|
11268
|
+
*/
|
|
11269
|
+
seamSilencePolicy: z39.literal("tight_seams_v1").optional(),
|
|
11214
11270
|
/**
|
|
11215
11271
|
* New recipes give the director's corrective turn every plan error at
|
|
11216
11272
|
* once, fit durations even when another rule also fails (reporting
|
|
@@ -11544,6 +11600,24 @@ var CreativeEngineSpeakerPixelRegionSchema = z39.object({
|
|
|
11544
11600
|
width: z39.number().int().positive(),
|
|
11545
11601
|
height: z39.number().int().positive()
|
|
11546
11602
|
}).strict().refine((region) => Object.values(region).every((value) => value % 2 === 0), "Speaker region must align to chroma pixels");
|
|
11603
|
+
var CreativeEngineFaceBoxSchema = z39.object({
|
|
11604
|
+
x: z39.number().finite().min(0).max(1),
|
|
11605
|
+
y: z39.number().finite().min(0).max(1),
|
|
11606
|
+
width: z39.number().finite().positive().max(1),
|
|
11607
|
+
height: z39.number().finite().positive().max(1)
|
|
11608
|
+
}).strict();
|
|
11609
|
+
var CreativeEngineFaceFrameSchema = z39.object({
|
|
11610
|
+
timestampSec: z39.number().finite().nonnegative(),
|
|
11611
|
+
faces: z39.array(CreativeEngineFaceBoxSchema.extend({
|
|
11612
|
+
score: z39.number().finite().min(0).max(1)
|
|
11613
|
+
}).strict())
|
|
11614
|
+
}).strict();
|
|
11615
|
+
var CreativeEngineFaceTrackSchema = z39.object({
|
|
11616
|
+
id: z39.string().regex(/^face_[1-9][0-9]*$/),
|
|
11617
|
+
boxes: z39.array(CreativeEngineFaceBoxSchema.extend({
|
|
11618
|
+
timestampSec: z39.number().finite().nonnegative()
|
|
11619
|
+
}).strict())
|
|
11620
|
+
}).strict();
|
|
11547
11621
|
var CreativeEngineSpeechObservationSchema = z39.object({
|
|
11548
11622
|
startSec: z39.number().finite().nonnegative(),
|
|
11549
11623
|
endSec: z39.number().finite().positive(),
|
|
@@ -11555,7 +11629,9 @@ var CreativeEngineSpeechObservationSchema = z39.object({
|
|
|
11555
11629
|
]),
|
|
11556
11630
|
speakerRegion: CreativeEngineSpeakerRegionSchema.optional(),
|
|
11557
11631
|
/** Includes silent background humans and anthropomorphic mouths. */
|
|
11558
|
-
multipleVisibleSpeakers: z39.boolean().optional()
|
|
11632
|
+
multipleVisibleSpeakers: z39.boolean().optional(),
|
|
11633
|
+
/** Detected face tracks that are the speaker's own face; empty when undetected. */
|
|
11634
|
+
speakerFaceIds: z39.array(z39.string().regex(/^face_[1-9][0-9]*$/)).max(8).optional()
|
|
11559
11635
|
}).strict().refine((value) => value.endSec > value.startSec && (!value.multipleVisibleSpeakers || !!value.speakerRegion), "Empty or unisolated speech window");
|
|
11560
11636
|
var reviewUnavailabilityReason = z39.enum([
|
|
11561
11637
|
"rate_limited",
|
|
@@ -11935,6 +12011,13 @@ var CreativeEngineReplanAuthorContractRetrySchema = z39.object({
|
|
|
11935
12011
|
requestedAtMs: z39.number().int().nonnegative(),
|
|
11936
12012
|
token: id2
|
|
11937
12013
|
}).strict();
|
|
12014
|
+
var CreativeEngineDirectorTransportRetrySchema = z39.object({
|
|
12015
|
+
failedOperationId: id2,
|
|
12016
|
+
reason: z39.literal("provider_unavailable"),
|
|
12017
|
+
context: CreativeEngineContextBindingSchema,
|
|
12018
|
+
requestedAtMs: z39.number().int().nonnegative(),
|
|
12019
|
+
token: id2
|
|
12020
|
+
}).strict();
|
|
11938
12021
|
var CreativeEngineCompositionRepairSchema = z39.object({
|
|
11939
12022
|
reviewId: id2,
|
|
11940
12023
|
outputHash: hash,
|
|
@@ -12077,6 +12160,7 @@ var CreativeEngineStateSchema = z39.object({
|
|
|
12077
12160
|
}).strict().optional(),
|
|
12078
12161
|
repairAuthorContractRetry: CreativeEngineRepairAuthorContractRetrySchema.optional(),
|
|
12079
12162
|
replanAuthorContractRetry: CreativeEngineReplanAuthorContractRetrySchema.optional(),
|
|
12163
|
+
directorTransportRetry: CreativeEngineDirectorTransportRetrySchema.optional(),
|
|
12080
12164
|
final: CreativeEngineFinalSchema.optional()
|
|
12081
12165
|
}).strict().superRefine((state, ctx) => {
|
|
12082
12166
|
const repairAuthorContractRetry = state.repairAuthorContractRetry;
|
|
@@ -12242,6 +12326,12 @@ var CreativeEngineEventSchema = z39.discriminatedUnion("type", [
|
|
|
12242
12326
|
context: CreativeEngineContextBindingSchema,
|
|
12243
12327
|
token: id2
|
|
12244
12328
|
}).strict(),
|
|
12329
|
+
z39.object({
|
|
12330
|
+
type: z39.literal("director_transport_retry_requested"),
|
|
12331
|
+
failedOperationId: id2,
|
|
12332
|
+
context: CreativeEngineContextBindingSchema,
|
|
12333
|
+
token: id2
|
|
12334
|
+
}).strict(),
|
|
12245
12335
|
z39.object({
|
|
12246
12336
|
type: z39.literal("repair_author_contract_retry_requested"),
|
|
12247
12337
|
failedOperationId: id2,
|
|
@@ -15567,8 +15657,23 @@ var CodeLandingEffectiveReceiptSchema = z53.object({
|
|
|
15567
15657
|
/** Paid routed editor response cost; outer COGS remains zero, usage pricing remains actual. */
|
|
15568
15658
|
routedUsageCostUsd: z53.number().finite().nonnegative().optional(),
|
|
15569
15659
|
ourCostCents: z53.number().finite().nonnegative().optional(),
|
|
15570
|
-
userPriceCents: z53.number().finite().nonnegative().optional()
|
|
15660
|
+
userPriceCents: z53.number().finite().nonnegative().optional(),
|
|
15661
|
+
/**
|
|
15662
|
+
* A KIE image the quoted node's model did not serve (the landing policy
|
|
15663
|
+
* rung): what KIE actually charged. The identity stays the node's; only
|
|
15664
|
+
* the recorded provider COGS follows the render that really ran.
|
|
15665
|
+
*/
|
|
15666
|
+
servedProviderCostCents: z53.number().finite().nonnegative().optional()
|
|
15571
15667
|
}).strict().superRefine((receipt, ctx) => {
|
|
15668
|
+
if (receipt.servedProviderCostCents !== void 0 && (receipt.transport !== "kie" || receipt.internalAccountingMode !== void 0)) {
|
|
15669
|
+
ctx.addIssue({
|
|
15670
|
+
code: z53.ZodIssueCode.custom,
|
|
15671
|
+
path: [
|
|
15672
|
+
"servedProviderCostCents"
|
|
15673
|
+
],
|
|
15674
|
+
message: "a served provider cost belongs to a plain KIE receipt"
|
|
15675
|
+
});
|
|
15676
|
+
}
|
|
15572
15677
|
if (!BillingProvider.safeParse(receipt.provider).success) {
|
|
15573
15678
|
ctx.addIssue({
|
|
15574
15679
|
code: z53.ZodIssueCode.custom,
|
|
@@ -15981,6 +16086,12 @@ var CodeLandingCostEnvelopeSchema = z53.object({
|
|
|
15981
16086
|
kind: CodeLandingOperationKindSchema,
|
|
15982
16087
|
currency: z53.literal("USD"),
|
|
15983
16088
|
editPlan: LandingEditPlanSchema.optional(),
|
|
16089
|
+
/**
|
|
16090
|
+
* The admission router marked this unplanned patch a change of the whole
|
|
16091
|
+
* page's audience or body zone: the quote funds every still on the page
|
|
16092
|
+
* and the worker, not the author, decides which pictures are redone.
|
|
16093
|
+
*/
|
|
16094
|
+
pageWideFocus: z53.literal(true).optional(),
|
|
15984
16095
|
minimumUserCents: z53.number().finite().nonnegative(),
|
|
15985
16096
|
maximumUserCents: z53.number().finite().nonnegative(),
|
|
15986
16097
|
limits: z53.object({
|
|
@@ -16033,7 +16144,7 @@ var CodeLandingCostEnvelopeSchema = z53.object({
|
|
|
16033
16144
|
const action = requirements.get(binding.requirementId)?.action;
|
|
16034
16145
|
return action === "generate_image" || action === "generate_clip";
|
|
16035
16146
|
});
|
|
16036
|
-
const primary = envelope.nodes.filter((node) => node.phase === "asset" && node.round === 0);
|
|
16147
|
+
const primary = envelope.nodes.filter((node) => node.phase === "asset" && node.round === 0 && !node.assetId?.startsWith("asset-image-qa-"));
|
|
16037
16148
|
if (envelope.kind !== "edit_patch" && envelope.kind !== "edit_full" || primary.length !== generated.length || generated.some((binding) => !primary.some((node) => node.assetId === binding.assetId))) {
|
|
16038
16149
|
ctx.addIssue({
|
|
16039
16150
|
code: z53.ZodIssueCode.custom,
|
|
@@ -19017,6 +19128,10 @@ var ClassicLandingImageEditQuoteEnvelopeSchema = ClassicLandingImageEditInventor
|
|
|
19017
19128
|
var ClassicLandingImageEditBatchSnapshotSchema = ClassicLandingImageEditQuoteEnvelopeSchema.extend({
|
|
19018
19129
|
quoteId: z77.string().uuid()
|
|
19019
19130
|
}).strict();
|
|
19131
|
+
var ClassicLandingImageEditInstructionPlanStatusSchema = z77.enum([
|
|
19132
|
+
"planned",
|
|
19133
|
+
"unavailable"
|
|
19134
|
+
]);
|
|
19020
19135
|
var ClassicLandingImageEditBatchCheckpointItemSchema = z77.object({
|
|
19021
19136
|
ownerTaskId: z77.string().uuid(),
|
|
19022
19137
|
sourceIndex: z77.number().int().positive(),
|
|
@@ -19025,7 +19140,16 @@ var ClassicLandingImageEditBatchCheckpointItemSchema = z77.object({
|
|
|
19025
19140
|
status: ClassicLandingImageEditItemStatusSchema,
|
|
19026
19141
|
operationId: z77.string().min(1).nullable(),
|
|
19027
19142
|
failureCode: z77.string().min(1).nullable(),
|
|
19028
|
-
refunded: z77.boolean()
|
|
19143
|
+
refunded: z77.boolean(),
|
|
19144
|
+
/** Worker-only per-image instruction written by the batch planning step;
|
|
19145
|
+
* absent means the child edits with the seller's original message. */
|
|
19146
|
+
plannedInstruction: ClassicLandingImageEditMessageSchema.optional(),
|
|
19147
|
+
/** Whether the planned instruction changes the whole image or one area;
|
|
19148
|
+
* absent with a planned instruction means `localized`. */
|
|
19149
|
+
plannedEditScope: z77.enum([
|
|
19150
|
+
"whole_image",
|
|
19151
|
+
"localized"
|
|
19152
|
+
]).optional()
|
|
19029
19153
|
}).strict();
|
|
19030
19154
|
var ClassicLandingImageEditBatchCheckpointSchema = z77.object({
|
|
19031
19155
|
version: z77.literal(1),
|
|
@@ -19035,6 +19159,10 @@ var ClassicLandingImageEditBatchCheckpointSchema = z77.object({
|
|
|
19035
19159
|
completed: z77.number().int().nonnegative(),
|
|
19036
19160
|
failed: z77.number().int().nonnegative(),
|
|
19037
19161
|
updatedAt: z77.string().datetime(),
|
|
19162
|
+
/** Set once, before the first child is admitted: `planned` when at least
|
|
19163
|
+
* one slot received a per-image instruction, `unavailable` when planning
|
|
19164
|
+
* failed and every slot keeps the original message. */
|
|
19165
|
+
instructionPlan: ClassicLandingImageEditInstructionPlanStatusSchema.optional(),
|
|
19038
19166
|
items: z77.array(ClassicLandingImageEditBatchCheckpointItemSchema).max(CLASSIC_LANDING_IMAGE_EDIT_MAX_IMAGES)
|
|
19039
19167
|
}).strict();
|
|
19040
19168
|
|
|
@@ -23264,6 +23392,21 @@ var CAPABILITY_MODEL_GUIDANCE = {
|
|
|
23264
23392
|
"solo lectura; no conecta ni desconecta cuentas"
|
|
23265
23393
|
]
|
|
23266
23394
|
},
|
|
23395
|
+
cancel_dropi_order: {
|
|
23396
|
+
summary: "Cancela en Dropi un pedido sin gu\xEDa para que no salga.",
|
|
23397
|
+
useWhen: [
|
|
23398
|
+
"el comprador cancel\xF3 el pedido"
|
|
23399
|
+
],
|
|
23400
|
+
avoidWhen: [
|
|
23401
|
+
"ya tiene gu\xEDa: va por novedad"
|
|
23402
|
+
],
|
|
23403
|
+
defaults: [
|
|
23404
|
+
"pa\xEDs CO"
|
|
23405
|
+
],
|
|
23406
|
+
disclosures: [
|
|
23407
|
+
"autoridad expl\xEDcita del comprador o vendedor; no se deshace"
|
|
23408
|
+
]
|
|
23409
|
+
},
|
|
23267
23410
|
sync_dropi_orders: {
|
|
23268
23411
|
summary: "Trae los pedidos reales de su cuenta Dropi al libro de cuentas.",
|
|
23269
23412
|
useWhen: [
|
|
@@ -26707,6 +26850,37 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
26707
26850
|
],
|
|
26708
26851
|
MCP_ONLY_CHANNEL_EXPOSURE
|
|
26709
26852
|
),
|
|
26853
|
+
defineCapability(
|
|
26854
|
+
"cancel_dropi_order",
|
|
26855
|
+
// Filled by the MCP schema fingerprint test.
|
|
26856
|
+
"ad519ce693e2552a9dd66b1ad385c952048879f8c7d1633592cedf7f872c18ff",
|
|
26857
|
+
"external_mutation",
|
|
26858
|
+
"business",
|
|
26859
|
+
[
|
|
26860
|
+
"external_mutation"
|
|
26861
|
+
],
|
|
26862
|
+
[
|
|
26863
|
+
slot("dropi_order", true, [
|
|
26864
|
+
"dropiOrderId"
|
|
26865
|
+
]),
|
|
26866
|
+
slot("cancel_reason", true, [
|
|
26867
|
+
"reason"
|
|
26868
|
+
]),
|
|
26869
|
+
slot("country", false, [
|
|
26870
|
+
"countryCode"
|
|
26871
|
+
]),
|
|
26872
|
+
slot("dropi_connection", false, [
|
|
26873
|
+
"connectionId"
|
|
26874
|
+
])
|
|
26875
|
+
],
|
|
26876
|
+
[
|
|
26877
|
+
"dropi_connection"
|
|
26878
|
+
],
|
|
26879
|
+
[
|
|
26880
|
+
"dropi_order_cancellation"
|
|
26881
|
+
],
|
|
26882
|
+
MCP_ONLY_CHANNEL_EXPOSURE
|
|
26883
|
+
),
|
|
26710
26884
|
defineCapability(
|
|
26711
26885
|
"create_manual_product",
|
|
26712
26886
|
// Filled by the MCP schema fingerprint test.
|
|
@@ -29213,9 +29387,15 @@ var provenance = {
|
|
|
29213
29387
|
* knowing the extract job's inputs (plan Global Constraint "Invalidez"). */
|
|
29214
29388
|
sourceImageKeys: z118.array(z118.string().min(1)).max(20).optional()
|
|
29215
29389
|
};
|
|
29390
|
+
var ProductTruthAngleRefocusSchema = z118.object({
|
|
29391
|
+
angleHash: z118.string().min(1).max(64),
|
|
29392
|
+
modelId: z118.string().min(1).max(200),
|
|
29393
|
+
refocusedAt: z118.string().min(1)
|
|
29394
|
+
});
|
|
29216
29395
|
var ProductTruthKnownSchema = ProductTruthBody.extend({
|
|
29217
29396
|
...provenance,
|
|
29218
|
-
known: z118.literal(true)
|
|
29397
|
+
known: z118.literal(true),
|
|
29398
|
+
angleRefocus: ProductTruthAngleRefocusSchema.optional().catch(void 0)
|
|
29219
29399
|
}).transform(resolveStateRefs);
|
|
29220
29400
|
var ProductTruthUnknownSchema = z118.object({
|
|
29221
29401
|
schemaVersion: z118.literal(PRODUCT_TRUTH_SCHEMA_VERSION),
|
|
@@ -31403,24 +31583,37 @@ var DropiFinancialSyncResultSchema = z135.object({
|
|
|
31403
31583
|
}))
|
|
31404
31584
|
});
|
|
31405
31585
|
|
|
31406
|
-
// ../../packages/types/src/
|
|
31586
|
+
// ../../packages/types/src/dropi-order-cancel.ts
|
|
31407
31587
|
import { z as z136 } from "zod";
|
|
31408
|
-
var
|
|
31588
|
+
var DropiOrderCancelReasonSchema = z136.enum([
|
|
31589
|
+
"buyer_requested",
|
|
31590
|
+
"seller_requested"
|
|
31591
|
+
]);
|
|
31592
|
+
var CancelDropiOrderSchema = z136.object({
|
|
31593
|
+
countryCode: DropiCountrySchema.default("CO"),
|
|
31594
|
+
connectionId: z136.string().guid().optional(),
|
|
31595
|
+
reason: DropiOrderCancelReasonSchema
|
|
31596
|
+
}).strict();
|
|
31597
|
+
var DropiOrderIdSchema = z136.string().regex(/^\d{1,12}$/);
|
|
31598
|
+
|
|
31599
|
+
// ../../packages/types/src/service-image.ts
|
|
31600
|
+
import { z as z137 } from "zod";
|
|
31601
|
+
var ServiceImageIntentSchema = z137.enum([
|
|
31409
31602
|
"user_brief",
|
|
31410
31603
|
"delegate_to_ai"
|
|
31411
31604
|
]);
|
|
31412
|
-
var ServiceImageReferenceRoleSchema =
|
|
31605
|
+
var ServiceImageReferenceRoleSchema = z137.enum([
|
|
31413
31606
|
"upload",
|
|
31414
31607
|
"logo",
|
|
31415
31608
|
"hero",
|
|
31416
31609
|
"brand_reference"
|
|
31417
31610
|
]);
|
|
31418
|
-
var ServiceImageReferenceSchema =
|
|
31419
|
-
key:
|
|
31611
|
+
var ServiceImageReferenceSchema = z137.object({
|
|
31612
|
+
key: z137.string().max(600),
|
|
31420
31613
|
role: ServiceImageReferenceRoleSchema
|
|
31421
31614
|
}).strict();
|
|
31422
|
-
var ServiceImageInputSchema =
|
|
31423
|
-
instruction:
|
|
31615
|
+
var ServiceImageInputSchema = z137.object({
|
|
31616
|
+
instruction: z137.string().trim().max(4e3).default(""),
|
|
31424
31617
|
intent: ServiceImageIntentSchema.default("user_brief")
|
|
31425
31618
|
}).strict().refine((value) => value.intent === "delegate_to_ai" || value.instruction.length > 0, {
|
|
31426
31619
|
message: "Cu\xE9ntanos qu\xE9 servicio quieres promocionar.",
|
|
@@ -31428,69 +31621,69 @@ var ServiceImageInputSchema = z136.object({
|
|
|
31428
31621
|
"instruction"
|
|
31429
31622
|
]
|
|
31430
31623
|
});
|
|
31431
|
-
var ServiceImageBrandVisualSchema =
|
|
31432
|
-
designDirection:
|
|
31433
|
-
photographyStyle:
|
|
31434
|
-
buttonStyle:
|
|
31435
|
-
radiusScale:
|
|
31436
|
-
fonts:
|
|
31437
|
-
display:
|
|
31438
|
-
body:
|
|
31624
|
+
var ServiceImageBrandVisualSchema = z137.object({
|
|
31625
|
+
designDirection: z137.string().max(60).optional(),
|
|
31626
|
+
photographyStyle: z137.string().max(60).optional(),
|
|
31627
|
+
buttonStyle: z137.string().max(40).optional(),
|
|
31628
|
+
radiusScale: z137.string().max(40).optional(),
|
|
31629
|
+
fonts: z137.object({
|
|
31630
|
+
display: z137.string().max(120).optional(),
|
|
31631
|
+
body: z137.string().max(120).optional()
|
|
31439
31632
|
}).strict().optional(),
|
|
31440
|
-
categoryLayer:
|
|
31441
|
-
visualAesthetics:
|
|
31442
|
-
toneAdjectives:
|
|
31443
|
-
coreValues:
|
|
31444
|
-
paletteRoles:
|
|
31445
|
-
primary:
|
|
31446
|
-
secondary:
|
|
31447
|
-
tertiary:
|
|
31448
|
-
neutral:
|
|
31449
|
-
accents:
|
|
31633
|
+
categoryLayer: z137.string().max(60).optional(),
|
|
31634
|
+
visualAesthetics: z137.array(z137.string().max(80)).max(20).optional(),
|
|
31635
|
+
toneAdjectives: z137.array(z137.string().max(80)).max(20).optional(),
|
|
31636
|
+
coreValues: z137.array(z137.string().max(120)).max(20).optional(),
|
|
31637
|
+
paletteRoles: z137.object({
|
|
31638
|
+
primary: z137.string().max(20).optional(),
|
|
31639
|
+
secondary: z137.string().max(20).optional(),
|
|
31640
|
+
tertiary: z137.string().max(20).optional(),
|
|
31641
|
+
neutral: z137.string().max(20).optional(),
|
|
31642
|
+
accents: z137.array(z137.string().max(20)).max(8).optional()
|
|
31450
31643
|
}).strict().optional(),
|
|
31451
|
-
positioning:
|
|
31452
|
-
market:
|
|
31453
|
-
innovation:
|
|
31454
|
-
trust:
|
|
31455
|
-
design:
|
|
31644
|
+
positioning: z137.object({
|
|
31645
|
+
market: z137.string().max(200).optional(),
|
|
31646
|
+
innovation: z137.string().max(200).optional(),
|
|
31647
|
+
trust: z137.string().max(200).optional(),
|
|
31648
|
+
design: z137.string().max(200).optional()
|
|
31456
31649
|
}).strict().optional()
|
|
31457
31650
|
}).strict();
|
|
31458
|
-
var ServiceImagePersonaSchema =
|
|
31459
|
-
name:
|
|
31460
|
-
demographics:
|
|
31461
|
-
painPoints:
|
|
31462
|
-
motivations:
|
|
31463
|
-
objections:
|
|
31464
|
-
gender:
|
|
31465
|
-
}).strict();
|
|
31466
|
-
var ServiceImageBusinessSchema =
|
|
31467
|
-
painPoints:
|
|
31468
|
-
benefits:
|
|
31469
|
-
whatsappNumber:
|
|
31470
|
-
whatsappMessage:
|
|
31651
|
+
var ServiceImagePersonaSchema = z137.object({
|
|
31652
|
+
name: z137.string().max(200),
|
|
31653
|
+
demographics: z137.string().max(2e3).optional(),
|
|
31654
|
+
painPoints: z137.array(z137.string().max(2e3)).max(10).optional(),
|
|
31655
|
+
motivations: z137.string().max(2e3).optional(),
|
|
31656
|
+
objections: z137.string().max(2e3).optional(),
|
|
31657
|
+
gender: z137.string().max(60).optional()
|
|
31658
|
+
}).strict();
|
|
31659
|
+
var ServiceImageBusinessSchema = z137.object({
|
|
31660
|
+
painPoints: z137.string().max(2e3).optional(),
|
|
31661
|
+
benefits: z137.string().max(2e3).optional(),
|
|
31662
|
+
whatsappNumber: z137.string().max(40).optional(),
|
|
31663
|
+
whatsappMessage: z137.string().max(500).optional(),
|
|
31471
31664
|
facts: ServicePageFactsSchema.optional()
|
|
31472
31665
|
}).strict();
|
|
31473
|
-
var ServiceImageContextSchema =
|
|
31474
|
-
kind:
|
|
31475
|
-
version:
|
|
31476
|
-
instruction:
|
|
31666
|
+
var ServiceImageContextSchema = z137.object({
|
|
31667
|
+
kind: z137.literal("service_image"),
|
|
31668
|
+
version: z137.literal(1),
|
|
31669
|
+
instruction: z137.string().max(4e3),
|
|
31477
31670
|
intent: ServiceImageIntentSchema,
|
|
31478
|
-
businessName:
|
|
31479
|
-
description:
|
|
31480
|
-
brandCard:
|
|
31481
|
-
palette:
|
|
31482
|
-
referenceKeys:
|
|
31483
|
-
references:
|
|
31671
|
+
businessName: z137.string().max(300),
|
|
31672
|
+
description: z137.string().max(2e4),
|
|
31673
|
+
brandCard: z137.string().max(2e4),
|
|
31674
|
+
palette: z137.array(z137.string()).max(20),
|
|
31675
|
+
referenceKeys: z137.array(z137.string()).max(10),
|
|
31676
|
+
references: z137.array(ServiceImageReferenceSchema).max(10).optional(),
|
|
31484
31677
|
brandVisual: ServiceImageBrandVisualSchema.optional(),
|
|
31485
31678
|
persona: ServiceImagePersonaSchema.optional(),
|
|
31486
31679
|
business: ServiceImageBusinessSchema.optional()
|
|
31487
31680
|
}).strict();
|
|
31488
31681
|
|
|
31489
31682
|
// ../../packages/types/src/brand-creation.ts
|
|
31490
|
-
import { z as
|
|
31491
|
-
var BrandCreationReceiptSchema =
|
|
31492
|
-
brandId:
|
|
31493
|
-
status:
|
|
31683
|
+
import { z as z138 } from "zod";
|
|
31684
|
+
var BrandCreationReceiptSchema = z138.object({
|
|
31685
|
+
brandId: z138.string().guid(),
|
|
31686
|
+
status: z138.enum([
|
|
31494
31687
|
"extracting",
|
|
31495
31688
|
"ready",
|
|
31496
31689
|
"failed"
|
|
@@ -31509,7 +31702,7 @@ function isRetryableBrandCreationFailure(error) {
|
|
|
31509
31702
|
__name(isRetryableBrandCreationFailure, "isRetryableBrandCreationFailure");
|
|
31510
31703
|
|
|
31511
31704
|
// ../../packages/types/src/task-ad-defaults.ts
|
|
31512
|
-
import { z as
|
|
31705
|
+
import { z as z139 } from "zod";
|
|
31513
31706
|
|
|
31514
31707
|
// ../../packages/types/src/service-page-hosting.ts
|
|
31515
31708
|
var SERVICE_PAGE_RESERVED_SLUGS = /* @__PURE__ */ new Set([
|
|
@@ -31555,25 +31748,25 @@ __name(suggestServicePageSlug, "suggestServicePageSlug");
|
|
|
31555
31748
|
|
|
31556
31749
|
// ../../packages/types/src/task-ad-defaults.ts
|
|
31557
31750
|
var AD_HEADLINE_MAX_CHARS = 255;
|
|
31558
|
-
var TaskAdDefaultsSchema =
|
|
31559
|
-
subjectKind:
|
|
31751
|
+
var TaskAdDefaultsSchema = z139.object({
|
|
31752
|
+
subjectKind: z139.enum([
|
|
31560
31753
|
"product",
|
|
31561
31754
|
"service"
|
|
31562
31755
|
]),
|
|
31563
|
-
landingUrl:
|
|
31564
|
-
landingSource:
|
|
31756
|
+
landingUrl: z139.string().url().nullable(),
|
|
31757
|
+
landingSource: z139.enum([
|
|
31565
31758
|
"shopify",
|
|
31566
31759
|
"service_page"
|
|
31567
31760
|
]).nullable(),
|
|
31568
|
-
headline:
|
|
31761
|
+
headline: z139.string().min(1).max(AD_HEADLINE_MAX_CHARS).nullable(),
|
|
31569
31762
|
/** ISO 3166-1 alpha-2 when known. */
|
|
31570
|
-
country:
|
|
31763
|
+
country: z139.string().min(2).nullable(),
|
|
31571
31764
|
/** The task Brand's contact; optional for older API responses. */
|
|
31572
31765
|
whatsappNumber: WhatsAppE164Schema.nullable().optional()
|
|
31573
31766
|
});
|
|
31574
31767
|
|
|
31575
31768
|
// ../../packages/types/src/service-website-capture.ts
|
|
31576
|
-
import { z as
|
|
31769
|
+
import { z as z140 } from "zod";
|
|
31577
31770
|
var captureQueueMs = 5 * 6e4;
|
|
31578
31771
|
var captureExecutionMs = 6 * 6e4;
|
|
31579
31772
|
var captureProcessMs = captureExecutionMs + 6e4;
|
|
@@ -31599,13 +31792,13 @@ var WEBSITE_CAPTURE_MAX_FILES = 100;
|
|
|
31599
31792
|
var WEBSITE_CAPTURE_MAX_FILE_BYTES = 8 * 1024 * 1024;
|
|
31600
31793
|
var WEBSITE_CAPTURE_MAX_BUNDLE_BYTES = 30 * 1024 * 1024;
|
|
31601
31794
|
var WEBSITE_CAPTURE_MAX_SOURCE_HTML_BYTES = 2 * 1024 * 1024;
|
|
31602
|
-
var WebsiteCaptureCauseSchema =
|
|
31795
|
+
var WebsiteCaptureCauseSchema = z140.enum([
|
|
31603
31796
|
"site_blocked",
|
|
31604
31797
|
"site_unreachable",
|
|
31605
31798
|
"not_enough_content",
|
|
31606
31799
|
"internal"
|
|
31607
31800
|
]);
|
|
31608
|
-
var WebsiteCaptureStatusSchema =
|
|
31801
|
+
var WebsiteCaptureStatusSchema = z140.enum([
|
|
31609
31802
|
"queued",
|
|
31610
31803
|
"capturing",
|
|
31611
31804
|
"ready",
|
|
@@ -31627,36 +31820,36 @@ function normalizeWebsiteCaptureUrl(value) {
|
|
|
31627
31820
|
}
|
|
31628
31821
|
}
|
|
31629
31822
|
__name(normalizeWebsiteCaptureUrl, "normalizeWebsiteCaptureUrl");
|
|
31630
|
-
var WebsiteCaptureRequestSchema =
|
|
31631
|
-
url:
|
|
31823
|
+
var WebsiteCaptureRequestSchema = z140.object({
|
|
31824
|
+
url: z140.string().trim().max(2048).url().refine((value) => normalizeWebsiteCaptureUrl(value) !== null, "Use an HTTP(S) URL without credentials").transform((value) => normalizeWebsiteCaptureUrl(value)),
|
|
31632
31825
|
language: MotionGraphicsLanguageSchema
|
|
31633
31826
|
}).strict();
|
|
31634
|
-
var WebsiteCaptureResponseSchema =
|
|
31635
|
-
captureId:
|
|
31827
|
+
var WebsiteCaptureResponseSchema = z140.object({
|
|
31828
|
+
captureId: z140.string().guid(),
|
|
31636
31829
|
status: WebsiteCaptureStatusSchema,
|
|
31637
|
-
expiresAt:
|
|
31638
|
-
previewUrl:
|
|
31830
|
+
expiresAt: z140.string().datetime(),
|
|
31831
|
+
previewUrl: z140.string().url().optional(),
|
|
31639
31832
|
/** Final customer amount for accepted Instagram acquisition still pending payment. */
|
|
31640
|
-
socialAcquisitionPriceCents:
|
|
31833
|
+
socialAcquisitionPriceCents: z140.number().finite().nonnegative().optional(),
|
|
31641
31834
|
cause: WebsiteCaptureCauseSchema.optional()
|
|
31642
31835
|
});
|
|
31643
31836
|
var WebsiteCaptureJobSchema = WebsiteCaptureRequestSchema.extend({
|
|
31644
|
-
captureId:
|
|
31645
|
-
attempt:
|
|
31646
|
-
leaseUntil:
|
|
31837
|
+
captureId: z140.string().guid(),
|
|
31838
|
+
attempt: z140.number().int().positive(),
|
|
31839
|
+
leaseUntil: z140.string().datetime(),
|
|
31647
31840
|
/** Public profile document prepared by the API; never contains a provider credential. */
|
|
31648
|
-
socialProfileHtml:
|
|
31841
|
+
socialProfileHtml: z140.string().max(2e5).optional(),
|
|
31649
31842
|
/** Present only after explicit capability negotiation; legacy agents retain the old wire. */
|
|
31650
|
-
websiteFallback:
|
|
31843
|
+
websiteFallback: z140.literal("v1").optional()
|
|
31651
31844
|
});
|
|
31652
|
-
var WebsiteCaptureClaimResponseSchema =
|
|
31845
|
+
var WebsiteCaptureClaimResponseSchema = z140.object({
|
|
31653
31846
|
capture: WebsiteCaptureJobSchema.nullable()
|
|
31654
31847
|
});
|
|
31655
31848
|
var attempt2 = {
|
|
31656
|
-
attempt:
|
|
31849
|
+
attempt: z140.number().int().positive()
|
|
31657
31850
|
};
|
|
31658
|
-
var digest2 =
|
|
31659
|
-
var WebsiteCaptureFallbackReasonSchema =
|
|
31851
|
+
var digest2 = z140.string().regex(/^[a-f0-9]{64}$/);
|
|
31852
|
+
var WebsiteCaptureFallbackReasonSchema = z140.enum([
|
|
31660
31853
|
"http_403",
|
|
31661
31854
|
"http_408",
|
|
31662
31855
|
"http_429",
|
|
@@ -31665,207 +31858,207 @@ var WebsiteCaptureFallbackReasonSchema = z139.enum([
|
|
|
31665
31858
|
"render_timeout",
|
|
31666
31859
|
"anti_bot"
|
|
31667
31860
|
]);
|
|
31668
|
-
var WebsiteCaptureFallbackRequestSchema =
|
|
31861
|
+
var WebsiteCaptureFallbackRequestSchema = z140.object({
|
|
31669
31862
|
...attempt2,
|
|
31670
|
-
leaseUntil:
|
|
31671
|
-
deadlineAt:
|
|
31863
|
+
leaseUntil: z140.string().datetime(),
|
|
31864
|
+
deadlineAt: z140.string().datetime(),
|
|
31672
31865
|
reason: WebsiteCaptureFallbackReasonSchema,
|
|
31673
|
-
browserClosed:
|
|
31866
|
+
browserClosed: z140.literal(true)
|
|
31674
31867
|
}).strict();
|
|
31675
|
-
var sourceArtifactUrl =
|
|
31868
|
+
var sourceArtifactUrl = z140.string().url().max(8192).refine((value) => {
|
|
31676
31869
|
const url3 = new URL(value);
|
|
31677
31870
|
return url3.protocol === "https:" && !url3.username && !url3.password;
|
|
31678
31871
|
});
|
|
31679
|
-
var WebsiteCaptureExternalSourceSchema =
|
|
31680
|
-
kind:
|
|
31681
|
-
finalUrl:
|
|
31872
|
+
var WebsiteCaptureExternalSourceSchema = z140.object({
|
|
31873
|
+
kind: z140.literal("firecrawl"),
|
|
31874
|
+
finalUrl: z140.string().url().max(2048).refine((value) => normalizeWebsiteCaptureUrl(value) !== null),
|
|
31682
31875
|
htmlUrl: sourceArtifactUrl,
|
|
31683
31876
|
htmlSha256: digest2,
|
|
31684
31877
|
screenshotUrl: sourceArtifactUrl,
|
|
31685
31878
|
screenshotSha256: digest2
|
|
31686
31879
|
}).strict();
|
|
31687
|
-
var WebsiteCaptureUploadRequestSchema =
|
|
31880
|
+
var WebsiteCaptureUploadRequestSchema = z140.object({
|
|
31688
31881
|
...attempt2,
|
|
31689
|
-
contentLength:
|
|
31882
|
+
contentLength: z140.number().int().positive().max(WEBSITE_CAPTURE_MAX_BUNDLE_BYTES),
|
|
31690
31883
|
sha256: digest2
|
|
31691
31884
|
}).strict();
|
|
31692
|
-
var WebsiteCaptureDoneRequestSchema =
|
|
31885
|
+
var WebsiteCaptureDoneRequestSchema = z140.object({
|
|
31693
31886
|
...attempt2,
|
|
31694
31887
|
sha256: digest2
|
|
31695
31888
|
}).strict();
|
|
31696
|
-
var WebsiteCaptureFailedRequestSchema =
|
|
31889
|
+
var WebsiteCaptureFailedRequestSchema = z140.object({
|
|
31697
31890
|
...attempt2,
|
|
31698
31891
|
cause: WebsiteCaptureCauseSchema
|
|
31699
31892
|
}).strict();
|
|
31700
|
-
var WebsiteCaptureBundleSchema =
|
|
31701
|
-
version:
|
|
31702
|
-
files:
|
|
31703
|
-
path:
|
|
31704
|
-
base64:
|
|
31893
|
+
var WebsiteCaptureBundleSchema = z140.object({
|
|
31894
|
+
version: z140.literal(1),
|
|
31895
|
+
files: z140.array(z140.object({
|
|
31896
|
+
path: z140.string().max(140).regex(/^research\/(?:page\.json|(?:desktop|mobile)-[1-9]\d*\.jpg|logo\.(?:png|svg)|image-[1-9]\d*\.(?:png|jpg|jpeg|webp|svg|avif)|font-[1-9]\d*\.(?:woff2?|ttf|otf))$/),
|
|
31897
|
+
base64: z140.string().max(Math.ceil(WEBSITE_CAPTURE_MAX_FILE_BYTES / 3) * 4).regex(/^[A-Za-z0-9+/]*={0,2}$/).refine((value) => value.length % 4 === 0),
|
|
31705
31898
|
sha256: digest2
|
|
31706
31899
|
}).strict()).min(1).max(WEBSITE_CAPTURE_MAX_FILES)
|
|
31707
31900
|
}).strict().refine((bundle) => new Set(bundle.files.map((file) => file.path)).size === bundle.files.length, "Duplicate capture file");
|
|
31708
|
-
var WebsiteCaptureScreenshotSchema =
|
|
31709
|
-
file:
|
|
31710
|
-
scrollTop:
|
|
31711
|
-
});
|
|
31712
|
-
var WebsiteCaptureAccessSchema =
|
|
31713
|
-
publicContentText:
|
|
31714
|
-
passwordGate:
|
|
31715
|
-
challengeGate:
|
|
31716
|
-
blockingOverlay:
|
|
31901
|
+
var WebsiteCaptureScreenshotSchema = z140.object({
|
|
31902
|
+
file: z140.string(),
|
|
31903
|
+
scrollTop: z140.number()
|
|
31904
|
+
});
|
|
31905
|
+
var WebsiteCaptureAccessSchema = z140.object({
|
|
31906
|
+
publicContentText: z140.string().max(8e3),
|
|
31907
|
+
passwordGate: z140.boolean(),
|
|
31908
|
+
challengeGate: z140.boolean(),
|
|
31909
|
+
blockingOverlay: z140.boolean(),
|
|
31717
31910
|
// Decoded, substantial images visible outside access walls and page chrome.
|
|
31718
31911
|
// Optional for compatibility with already captured text-led research.
|
|
31719
|
-
publicImageUrls:
|
|
31720
|
-
});
|
|
31721
|
-
var WebsiteCaptureResearchSchema =
|
|
31722
|
-
requestedUrl:
|
|
31723
|
-
capturedAt:
|
|
31724
|
-
locale:
|
|
31725
|
-
bodyTextTruncated:
|
|
31726
|
-
finalUrl:
|
|
31727
|
-
lang:
|
|
31728
|
-
title:
|
|
31729
|
-
description:
|
|
31730
|
-
openGraph:
|
|
31731
|
-
title:
|
|
31732
|
-
description:
|
|
31733
|
-
image:
|
|
31734
|
-
siteName:
|
|
31912
|
+
publicImageUrls: z140.array(z140.string().url().max(8192)).max(20).optional()
|
|
31913
|
+
});
|
|
31914
|
+
var WebsiteCaptureResearchSchema = z140.object({
|
|
31915
|
+
requestedUrl: z140.string().url(),
|
|
31916
|
+
capturedAt: z140.string().datetime(),
|
|
31917
|
+
locale: z140.string(),
|
|
31918
|
+
bodyTextTruncated: z140.boolean(),
|
|
31919
|
+
finalUrl: z140.string().url(),
|
|
31920
|
+
lang: z140.string().nullable(),
|
|
31921
|
+
title: z140.string(),
|
|
31922
|
+
description: z140.string(),
|
|
31923
|
+
openGraph: z140.object({
|
|
31924
|
+
title: z140.string(),
|
|
31925
|
+
description: z140.string(),
|
|
31926
|
+
image: z140.string(),
|
|
31927
|
+
siteName: z140.string()
|
|
31735
31928
|
}),
|
|
31736
|
-
themeColor:
|
|
31737
|
-
headings:
|
|
31738
|
-
h1:
|
|
31739
|
-
h2:
|
|
31740
|
-
h3:
|
|
31929
|
+
themeColor: z140.string(),
|
|
31930
|
+
headings: z140.object({
|
|
31931
|
+
h1: z140.array(z140.string()),
|
|
31932
|
+
h2: z140.array(z140.string()),
|
|
31933
|
+
h3: z140.array(z140.string())
|
|
31741
31934
|
}),
|
|
31742
|
-
callsToAction:
|
|
31743
|
-
listItems:
|
|
31744
|
-
bodyText:
|
|
31935
|
+
callsToAction: z140.array(z140.string()),
|
|
31936
|
+
listItems: z140.array(z140.string()),
|
|
31937
|
+
bodyText: z140.string(),
|
|
31745
31938
|
access: WebsiteCaptureAccessSchema.optional(),
|
|
31746
|
-
consent:
|
|
31747
|
-
pressed:
|
|
31748
|
-
removed:
|
|
31939
|
+
consent: z140.object({
|
|
31940
|
+
pressed: z140.string().nullable(),
|
|
31941
|
+
removed: z140.number().nonnegative()
|
|
31749
31942
|
}).optional(),
|
|
31750
|
-
overlaysDismissed:
|
|
31751
|
-
style:
|
|
31752
|
-
bodyBackground:
|
|
31753
|
-
bodyColor:
|
|
31754
|
-
bodyFont:
|
|
31755
|
-
headingFont:
|
|
31756
|
-
headingColor:
|
|
31757
|
-
actionColors:
|
|
31758
|
-
color:
|
|
31759
|
-
uses:
|
|
31943
|
+
overlaysDismissed: z140.number().int().nonnegative().optional(),
|
|
31944
|
+
style: z140.object({
|
|
31945
|
+
bodyBackground: z140.string(),
|
|
31946
|
+
bodyColor: z140.string(),
|
|
31947
|
+
bodyFont: z140.string(),
|
|
31948
|
+
headingFont: z140.string().nullable(),
|
|
31949
|
+
headingColor: z140.string().nullable(),
|
|
31950
|
+
actionColors: z140.array(z140.object({
|
|
31951
|
+
color: z140.string(),
|
|
31952
|
+
uses: z140.number()
|
|
31760
31953
|
}))
|
|
31761
31954
|
}),
|
|
31762
|
-
images:
|
|
31763
|
-
file:
|
|
31764
|
-
src:
|
|
31765
|
-
alt:
|
|
31766
|
-
width:
|
|
31767
|
-
height:
|
|
31768
|
-
isOpenGraph:
|
|
31955
|
+
images: z140.array(z140.object({
|
|
31956
|
+
file: z140.string(),
|
|
31957
|
+
src: z140.string(),
|
|
31958
|
+
alt: z140.string(),
|
|
31959
|
+
width: z140.number().nullable(),
|
|
31960
|
+
height: z140.number().nullable(),
|
|
31961
|
+
isOpenGraph: z140.boolean()
|
|
31769
31962
|
})),
|
|
31770
|
-
logo:
|
|
31771
|
-
file:
|
|
31772
|
-
svg:
|
|
31773
|
-
width:
|
|
31774
|
-
height:
|
|
31963
|
+
logo: z140.object({
|
|
31964
|
+
file: z140.literal("logo.png"),
|
|
31965
|
+
svg: z140.literal("logo.svg").optional(),
|
|
31966
|
+
width: z140.number(),
|
|
31967
|
+
height: z140.number()
|
|
31775
31968
|
}).nullable(),
|
|
31776
|
-
fonts:
|
|
31777
|
-
family:
|
|
31778
|
-
weight:
|
|
31779
|
-
style:
|
|
31780
|
-
unicodeRange:
|
|
31781
|
-
file:
|
|
31969
|
+
fonts: z140.array(z140.object({
|
|
31970
|
+
family: z140.string(),
|
|
31971
|
+
weight: z140.string(),
|
|
31972
|
+
style: z140.string(),
|
|
31973
|
+
unicodeRange: z140.string().nullable(),
|
|
31974
|
+
file: z140.string().optional()
|
|
31782
31975
|
}).transform((font) => ({
|
|
31783
31976
|
...font,
|
|
31784
31977
|
file: font.file
|
|
31785
31978
|
}))),
|
|
31786
|
-
screenshots:
|
|
31787
|
-
desktop:
|
|
31788
|
-
mobile:
|
|
31979
|
+
screenshots: z140.object({
|
|
31980
|
+
desktop: z140.array(WebsiteCaptureScreenshotSchema),
|
|
31981
|
+
mobile: z140.array(WebsiteCaptureScreenshotSchema)
|
|
31789
31982
|
})
|
|
31790
31983
|
});
|
|
31791
31984
|
|
|
31792
31985
|
// ../../packages/types/src/demo-mode.ts
|
|
31793
|
-
import { z as
|
|
31986
|
+
import { z as z143 } from "zod";
|
|
31794
31987
|
|
|
31795
31988
|
// ../../packages/types/src/demo-mode-product.ts
|
|
31796
|
-
import { z as
|
|
31797
|
-
var text3 =
|
|
31798
|
-
var nullableText =
|
|
31799
|
-
var image =
|
|
31989
|
+
import { z as z141 } from "zod";
|
|
31990
|
+
var text3 = z141.string().trim().min(1).max(2e5);
|
|
31991
|
+
var nullableText = z141.string().max(2e5).nullable();
|
|
31992
|
+
var image = z141.object({
|
|
31800
31993
|
provider: text3,
|
|
31801
31994
|
model: text3,
|
|
31802
|
-
prompt:
|
|
31995
|
+
prompt: z141.string().max(2e5),
|
|
31803
31996
|
imageUrl: text3,
|
|
31804
|
-
width:
|
|
31805
|
-
height:
|
|
31997
|
+
width: z141.number().int().positive(),
|
|
31998
|
+
height: z141.number().int().positive(),
|
|
31806
31999
|
adCopy: nullableText,
|
|
31807
|
-
rawResponse:
|
|
32000
|
+
rawResponse: z141.unknown().optional()
|
|
31808
32001
|
});
|
|
31809
|
-
var ProductDemoSnapshotSchema =
|
|
32002
|
+
var ProductDemoSnapshotSchema = z141.object({
|
|
31810
32003
|
/** Optional only for packs frozen before seller review drafts were captured. */
|
|
31811
32004
|
customAngleOverride: nullableText.optional(),
|
|
31812
32005
|
painPoints: nullableText.optional(),
|
|
31813
32006
|
benefits: nullableText.optional(),
|
|
31814
|
-
product:
|
|
32007
|
+
product: z141.object({
|
|
31815
32008
|
title: text3,
|
|
31816
32009
|
price: nullableText,
|
|
31817
32010
|
country: nullableText,
|
|
31818
|
-
features:
|
|
32011
|
+
features: z141.array(text3).max(100),
|
|
31819
32012
|
form: nullableText,
|
|
31820
|
-
details:
|
|
31821
|
-
isCombo:
|
|
31822
|
-
comboItems:
|
|
31823
|
-
images:
|
|
31824
|
-
cleanImages:
|
|
31825
|
-
cleanImagesMeta:
|
|
32013
|
+
details: z141.unknown().optional(),
|
|
32014
|
+
isCombo: z141.boolean(),
|
|
32015
|
+
comboItems: z141.unknown().optional(),
|
|
32016
|
+
images: z141.array(text3).min(1).max(50),
|
|
32017
|
+
cleanImages: z141.array(text3).max(50),
|
|
32018
|
+
cleanImagesMeta: z141.unknown().optional()
|
|
31826
32019
|
}),
|
|
31827
|
-
angles:
|
|
32020
|
+
angles: z141.array(z141.object({
|
|
31828
32021
|
content: text3,
|
|
31829
32022
|
buyerPersona: nullableText,
|
|
31830
32023
|
actor: nullableText,
|
|
31831
32024
|
scriptNotes: nullableText
|
|
31832
32025
|
})).min(1).max(10),
|
|
31833
|
-
videos:
|
|
32026
|
+
videos: z141.array(z141.object({
|
|
31834
32027
|
/** Present only for explicit multi-template packs; legacy arrays keep selection-order playback. */
|
|
31835
|
-
reviewAngleIndex:
|
|
32028
|
+
reviewAngleIndex: z141.number().int().min(0).max(9).optional(),
|
|
31836
32029
|
provider: text3,
|
|
31837
32030
|
model: text3,
|
|
31838
32031
|
script: text3,
|
|
31839
|
-
prompt:
|
|
32032
|
+
prompt: z141.string().max(2e5),
|
|
31840
32033
|
imageUrl: text3,
|
|
31841
|
-
durationSeconds:
|
|
32034
|
+
durationSeconds: z141.number().int().positive().nullable(),
|
|
31842
32035
|
format: VideoFormat,
|
|
31843
|
-
resultUrls:
|
|
31844
|
-
rawResponse:
|
|
32036
|
+
resultUrls: z141.array(text3).min(1).max(10),
|
|
32037
|
+
rawResponse: z141.unknown().optional(),
|
|
31845
32038
|
adCopy: nullableText
|
|
31846
32039
|
})).min(1).max(10),
|
|
31847
|
-
landingImages:
|
|
32040
|
+
landingImages: z141.array(z141.object({
|
|
31848
32041
|
role: LandingRole,
|
|
31849
|
-
indexNum:
|
|
32042
|
+
indexNum: z141.number().int().min(1),
|
|
31850
32043
|
url: text3,
|
|
31851
|
-
width:
|
|
31852
|
-
height:
|
|
32044
|
+
width: z141.number().int().positive(),
|
|
32045
|
+
height: z141.number().int().positive(),
|
|
31853
32046
|
notes: nullableText
|
|
31854
32047
|
})).max(20),
|
|
31855
|
-
landingConfig:
|
|
32048
|
+
landingConfig: z141.unknown().optional(),
|
|
31856
32049
|
image,
|
|
31857
|
-
productUseSheet:
|
|
31858
|
-
productTruth:
|
|
31859
|
-
productReference:
|
|
31860
|
-
referenceEvidenceVersion:
|
|
31861
|
-
planVersion:
|
|
32050
|
+
productUseSheet: z141.unknown().optional(),
|
|
32051
|
+
productTruth: z141.unknown().optional(),
|
|
32052
|
+
productReference: z141.object({
|
|
32053
|
+
referenceEvidenceVersion: z141.number().int().nonnegative(),
|
|
32054
|
+
planVersion: z141.number().int().positive(),
|
|
31862
32055
|
baseReferenceSetHash: text3,
|
|
31863
|
-
referenceSet:
|
|
31864
|
-
preparationPlan:
|
|
31865
|
-
canonicalIdentityAnchors:
|
|
32056
|
+
referenceSet: z141.unknown().optional(),
|
|
32057
|
+
preparationPlan: z141.unknown().optional(),
|
|
32058
|
+
canonicalIdentityAnchors: z141.unknown().optional()
|
|
31866
32059
|
})
|
|
31867
32060
|
});
|
|
31868
|
-
var ProductDemoPhaseSchema =
|
|
32061
|
+
var ProductDemoPhaseSchema = z141.enum([
|
|
31869
32062
|
"preparing",
|
|
31870
32063
|
"angles",
|
|
31871
32064
|
"preparing_scripts",
|
|
@@ -31873,39 +32066,39 @@ var ProductDemoPhaseSchema = z140.enum([
|
|
|
31873
32066
|
"generating",
|
|
31874
32067
|
"done"
|
|
31875
32068
|
]);
|
|
31876
|
-
var ProductDemoJobPhaseSchema =
|
|
32069
|
+
var ProductDemoJobPhaseSchema = z141.enum([
|
|
31877
32070
|
"preparing",
|
|
31878
32071
|
"scripts",
|
|
31879
32072
|
"generating"
|
|
31880
32073
|
]);
|
|
31881
|
-
var ProductDemoTaskStateSchema =
|
|
31882
|
-
admitted:
|
|
32074
|
+
var ProductDemoTaskStateSchema = z141.object({
|
|
32075
|
+
admitted: z141.boolean().default(false),
|
|
31883
32076
|
phase: ProductDemoPhaseSchema,
|
|
31884
|
-
waitMs:
|
|
32077
|
+
waitMs: z141.number().int().positive(),
|
|
31885
32078
|
snapshot: ProductDemoSnapshotSchema,
|
|
31886
|
-
selectedAngleIndices:
|
|
31887
|
-
chargeCents:
|
|
31888
|
-
maxCents:
|
|
32079
|
+
selectedAngleIndices: z141.array(z141.number().int().min(0).max(9)).max(10),
|
|
32080
|
+
chargeCents: z141.number().int().min(0).max(1e5),
|
|
32081
|
+
maxCents: z141.number().int().min(0).optional()
|
|
31889
32082
|
});
|
|
31890
32083
|
|
|
31891
32084
|
// ../../packages/types/src/demo-mode-service-page-assets.ts
|
|
31892
|
-
import { z as
|
|
31893
|
-
var DemoServicePageAssetSourceSchema =
|
|
31894
|
-
pageId:
|
|
31895
|
-
ownerId:
|
|
31896
|
-
assets:
|
|
31897
|
-
id:
|
|
31898
|
-
storageKey:
|
|
31899
|
-
mediaType:
|
|
32085
|
+
import { z as z142 } from "zod";
|
|
32086
|
+
var DemoServicePageAssetSourceSchema = z142.object({
|
|
32087
|
+
pageId: z142.string().guid(),
|
|
32088
|
+
ownerId: z142.string().min(1),
|
|
32089
|
+
assets: z142.array(z142.object({
|
|
32090
|
+
id: z142.string().guid(),
|
|
32091
|
+
storageKey: z142.string().min(1).max(1024),
|
|
32092
|
+
mediaType: z142.enum([
|
|
31900
32093
|
"image/webp",
|
|
31901
32094
|
"video/mp4"
|
|
31902
32095
|
]),
|
|
31903
|
-
byteSize:
|
|
31904
|
-
width:
|
|
31905
|
-
height:
|
|
31906
|
-
contentHash:
|
|
32096
|
+
byteSize: z142.number().int().positive().max(32 * 1024 * 1024),
|
|
32097
|
+
width: z142.number().int().positive().max(1920),
|
|
32098
|
+
height: z142.number().int().positive().max(1920),
|
|
32099
|
+
contentHash: z142.string().regex(/^[a-f0-9]{64}$/i),
|
|
31907
32100
|
sourceKind: ServicePageSourceKindSchema,
|
|
31908
|
-
approvedAt:
|
|
32101
|
+
approvedAt: z142.string().datetime()
|
|
31909
32102
|
}).strict()).max(24)
|
|
31910
32103
|
}).strict();
|
|
31911
32104
|
|
|
@@ -31917,7 +32110,7 @@ var DEMO_MODE_FLOWS = [
|
|
|
31917
32110
|
"image",
|
|
31918
32111
|
"product"
|
|
31919
32112
|
];
|
|
31920
|
-
var DemoModeFlowSchema =
|
|
32113
|
+
var DemoModeFlowSchema = z143.enum(DEMO_MODE_FLOWS);
|
|
31921
32114
|
var DEMO_MODE_STEPS = [
|
|
31922
32115
|
"running",
|
|
31923
32116
|
"research",
|
|
@@ -31930,7 +32123,7 @@ var DEMO_MODE_STEPS = [
|
|
|
31930
32123
|
"final",
|
|
31931
32124
|
"watchdog"
|
|
31932
32125
|
];
|
|
31933
|
-
var DemoModeStepSchema =
|
|
32126
|
+
var DemoModeStepSchema = z143.enum(DEMO_MODE_STEPS);
|
|
31934
32127
|
var DEMO_MODE_WAIT_SECONDS = {
|
|
31935
32128
|
min: 30,
|
|
31936
32129
|
max: 450,
|
|
@@ -31943,8 +32136,8 @@ var DEMO_MODE_DEFAULT_CHARGE_CENTS = {
|
|
|
31943
32136
|
image: 200,
|
|
31944
32137
|
product: 1500
|
|
31945
32138
|
};
|
|
31946
|
-
var centsSchema =
|
|
31947
|
-
var emailSchema =
|
|
32139
|
+
var centsSchema = z143.number().int().min(0).max(1e5);
|
|
32140
|
+
var emailSchema = z143.string().trim().toLowerCase().email();
|
|
31948
32141
|
var DEMO_MODE_OPTIONAL_MOTION_TEMPLATE_KEYS = [
|
|
31949
32142
|
"motionVariantTaskId",
|
|
31950
32143
|
"motionThirdTaskId"
|
|
@@ -31970,28 +32163,28 @@ var DEMO_MODE_OPTIONAL_TEMPLATE_KEYS = [
|
|
|
31970
32163
|
...DEMO_MODE_OPTIONAL_MOTION_TEMPLATE_KEYS,
|
|
31971
32164
|
...DEMO_MODE_PRODUCT_ALL_TEMPLATE_KEYS
|
|
31972
32165
|
];
|
|
31973
|
-
var optionalTemplateId =
|
|
31974
|
-
var DemoModeTemplatesSchema =
|
|
31975
|
-
brandId:
|
|
31976
|
-
servicePageId:
|
|
31977
|
-
motionTaskId:
|
|
32166
|
+
var optionalTemplateId = z143.preprocess((value) => value === "" ? void 0 : value, z143.string().guid().optional());
|
|
32167
|
+
var DemoModeTemplatesSchema = z143.object({
|
|
32168
|
+
brandId: z143.string().guid(),
|
|
32169
|
+
servicePageId: z143.string().guid(),
|
|
32170
|
+
motionTaskId: z143.string().guid(),
|
|
31978
32171
|
motionVariantTaskId: optionalTemplateId,
|
|
31979
32172
|
motionThirdTaskId: optionalTemplateId,
|
|
31980
|
-
imageTaskId:
|
|
32173
|
+
imageTaskId: z143.string().guid(),
|
|
31981
32174
|
productLandingTaskId: optionalTemplateId,
|
|
31982
32175
|
productVideoTaskId: optionalTemplateId,
|
|
31983
32176
|
productVideoVariantTaskId: optionalTemplateId,
|
|
31984
32177
|
productVideoThirdTaskId: optionalTemplateId,
|
|
31985
32178
|
productImageTaskId: optionalTemplateId
|
|
31986
32179
|
});
|
|
31987
|
-
var DemoModeEditableObjectSchema =
|
|
31988
|
-
productsEnabled:
|
|
31989
|
-
enabled:
|
|
31990
|
-
emails:
|
|
32180
|
+
var DemoModeEditableObjectSchema = z143.object({
|
|
32181
|
+
productsEnabled: z143.boolean().default(false),
|
|
32182
|
+
enabled: z143.boolean(),
|
|
32183
|
+
emails: z143.array(emailSchema).max(50).transform((list) => [
|
|
31991
32184
|
...new Set(list)
|
|
31992
32185
|
]),
|
|
31993
|
-
waitSeconds:
|
|
31994
|
-
chargeCents:
|
|
32186
|
+
waitSeconds: z143.number().int().min(DEMO_MODE_WAIT_SECONDS.min).max(DEMO_MODE_WAIT_SECONDS.max),
|
|
32187
|
+
chargeCents: z143.object({
|
|
31995
32188
|
brand: centsSchema,
|
|
31996
32189
|
servicePage: centsSchema,
|
|
31997
32190
|
motion: centsSchema,
|
|
@@ -32004,7 +32197,7 @@ var DemoModeEditableSchema = DemoModeEditableObjectSchema.superRefine((value, ct
|
|
|
32004
32197
|
if (!value.productsEnabled) return;
|
|
32005
32198
|
for (const key2 of DEMO_MODE_PRODUCT_TEMPLATE_KEYS) {
|
|
32006
32199
|
if (!value.templates[key2]) ctx.addIssue({
|
|
32007
|
-
code:
|
|
32200
|
+
code: z143.ZodIssueCode.custom,
|
|
32008
32201
|
path: [
|
|
32009
32202
|
"templates",
|
|
32010
32203
|
key2
|
|
@@ -32013,83 +32206,83 @@ var DemoModeEditableSchema = DemoModeEditableObjectSchema.superRefine((value, ct
|
|
|
32013
32206
|
});
|
|
32014
32207
|
}
|
|
32015
32208
|
});
|
|
32016
|
-
var nullableString =
|
|
32017
|
-
var DemoModeSnapshotSchema =
|
|
32209
|
+
var nullableString = z143.string().nullable();
|
|
32210
|
+
var DemoModeSnapshotSchema = z143.object({
|
|
32018
32211
|
product: ProductDemoSnapshotSchema.optional(),
|
|
32019
|
-
brand:
|
|
32212
|
+
brand: z143.object({
|
|
32020
32213
|
/** Columnas de identidad de `Brand` listas para un `update` (sin id/userId/slug/estado/fechas). */
|
|
32021
|
-
identity:
|
|
32022
|
-
productSamples:
|
|
32023
|
-
name:
|
|
32024
|
-
priceCents:
|
|
32214
|
+
identity: z143.record(z143.string(), z143.unknown()),
|
|
32215
|
+
productSamples: z143.array(z143.object({
|
|
32216
|
+
name: z143.string(),
|
|
32217
|
+
priceCents: z143.number().int().nullable(),
|
|
32025
32218
|
currency: nullableString,
|
|
32026
|
-
imageKey:
|
|
32219
|
+
imageKey: z143.string(),
|
|
32027
32220
|
productUrl: nullableString,
|
|
32028
|
-
position:
|
|
32221
|
+
position: z143.number().int()
|
|
32029
32222
|
})),
|
|
32030
|
-
personas:
|
|
32031
|
-
name:
|
|
32223
|
+
personas: z143.array(z143.object({
|
|
32224
|
+
name: z143.string(),
|
|
32032
32225
|
demographics: nullableString,
|
|
32033
32226
|
painPoints: nullableString,
|
|
32034
32227
|
motivations: nullableString,
|
|
32035
32228
|
objections: nullableString,
|
|
32036
32229
|
gender: nullableString,
|
|
32037
|
-
isDefault:
|
|
32230
|
+
isDefault: z143.boolean()
|
|
32038
32231
|
}))
|
|
32039
32232
|
}),
|
|
32040
|
-
servicePage:
|
|
32041
|
-
facts:
|
|
32042
|
-
review:
|
|
32043
|
-
artifact:
|
|
32233
|
+
servicePage: z143.object({
|
|
32234
|
+
facts: z143.unknown().optional(),
|
|
32235
|
+
review: z143.unknown().optional(),
|
|
32236
|
+
artifact: z143.unknown().optional(),
|
|
32044
32237
|
/** Optional only for snapshots saved before page-owned demo media. */
|
|
32045
32238
|
assetSource: DemoServicePageAssetSourceSchema.optional()
|
|
32046
32239
|
}),
|
|
32047
|
-
motion:
|
|
32240
|
+
motion: z143.object({
|
|
32048
32241
|
outputs: MotionGraphicsOutputsSchema,
|
|
32049
32242
|
/**
|
|
32050
32243
|
* La captura REAL de la web de la plantilla (nunca una fabricada por la
|
|
32051
32244
|
* demo). Null cuando la plantilla no tiene ninguna: la captura demo nunca
|
|
32052
32245
|
* va live, así que el servicio usa `DEMO_MODE_PLACEHOLDER_CAPTURE`.
|
|
32053
32246
|
*/
|
|
32054
|
-
capture:
|
|
32055
|
-
bundleKey:
|
|
32056
|
-
sha256:
|
|
32057
|
-
uploadBytes:
|
|
32247
|
+
capture: z143.object({
|
|
32248
|
+
bundleKey: z143.string(),
|
|
32249
|
+
sha256: z143.string(),
|
|
32250
|
+
uploadBytes: z143.number().int().nullable(),
|
|
32058
32251
|
previewKey: nullableString
|
|
32059
32252
|
}).nullable()
|
|
32060
32253
|
}),
|
|
32061
|
-
image:
|
|
32062
|
-
provider:
|
|
32063
|
-
model:
|
|
32064
|
-
prompt:
|
|
32065
|
-
imageUrl:
|
|
32066
|
-
width:
|
|
32067
|
-
height:
|
|
32254
|
+
image: z143.object({
|
|
32255
|
+
provider: z143.string(),
|
|
32256
|
+
model: z143.string(),
|
|
32257
|
+
prompt: z143.string(),
|
|
32258
|
+
imageUrl: z143.string(),
|
|
32259
|
+
width: z143.number().int(),
|
|
32260
|
+
height: z143.number().int(),
|
|
32068
32261
|
adCopy: nullableString,
|
|
32069
|
-
rawResponse:
|
|
32262
|
+
rawResponse: z143.unknown().optional()
|
|
32070
32263
|
})
|
|
32071
32264
|
});
|
|
32072
32265
|
var DemoModeConfigSchema = DemoModeEditableObjectSchema.extend({
|
|
32073
32266
|
snapshot: DemoModeSnapshotSchema.nullable(),
|
|
32074
|
-
snapshotAt:
|
|
32267
|
+
snapshotAt: z143.string().datetime().nullable()
|
|
32075
32268
|
});
|
|
32076
32269
|
var DemoModeAdminViewSchema = DemoModeEditableObjectSchema.extend({
|
|
32077
32270
|
// Sin configurar, la API devuelve ids vacíos ("" no es uuid): la vista los
|
|
32078
32271
|
// admite; el PUT sí exige uuid (`DemoModeEditableSchema`).
|
|
32079
|
-
templates:
|
|
32080
|
-
brandId:
|
|
32081
|
-
servicePageId:
|
|
32082
|
-
motionTaskId:
|
|
32083
|
-
motionVariantTaskId:
|
|
32084
|
-
motionThirdTaskId:
|
|
32085
|
-
imageTaskId:
|
|
32086
|
-
productLandingTaskId:
|
|
32087
|
-
productVideoTaskId:
|
|
32088
|
-
productVideoVariantTaskId:
|
|
32089
|
-
productVideoThirdTaskId:
|
|
32090
|
-
productImageTaskId:
|
|
32272
|
+
templates: z143.object({
|
|
32273
|
+
brandId: z143.string(),
|
|
32274
|
+
servicePageId: z143.string(),
|
|
32275
|
+
motionTaskId: z143.string(),
|
|
32276
|
+
motionVariantTaskId: z143.string().optional(),
|
|
32277
|
+
motionThirdTaskId: z143.string().optional(),
|
|
32278
|
+
imageTaskId: z143.string(),
|
|
32279
|
+
productLandingTaskId: z143.string().optional(),
|
|
32280
|
+
productVideoTaskId: z143.string().optional(),
|
|
32281
|
+
productVideoVariantTaskId: z143.string().optional(),
|
|
32282
|
+
productVideoThirdTaskId: z143.string().optional(),
|
|
32283
|
+
productImageTaskId: z143.string().optional()
|
|
32091
32284
|
}),
|
|
32092
|
-
snapshotAt:
|
|
32285
|
+
snapshotAt: z143.string().nullable()
|
|
32093
32286
|
});
|
|
32094
32287
|
var DEMO_MODE_TEMPLATE_PROBLEMS = [
|
|
32095
32288
|
"not_found",
|
|
@@ -32104,16 +32297,16 @@ var DEMO_MODE_TEMPLATE_PROBLEMS = [
|
|
|
32104
32297
|
"no_angles",
|
|
32105
32298
|
"no_landing"
|
|
32106
32299
|
];
|
|
32107
|
-
var DemoModeTemplateVerdictSchema =
|
|
32108
|
-
|
|
32109
|
-
ok:
|
|
32300
|
+
var DemoModeTemplateVerdictSchema = z143.discriminatedUnion("ok", [
|
|
32301
|
+
z143.object({
|
|
32302
|
+
ok: z143.literal(true)
|
|
32110
32303
|
}),
|
|
32111
|
-
|
|
32112
|
-
ok:
|
|
32113
|
-
problem:
|
|
32304
|
+
z143.object({
|
|
32305
|
+
ok: z143.literal(false),
|
|
32306
|
+
problem: z143.enum(DEMO_MODE_TEMPLATE_PROBLEMS)
|
|
32114
32307
|
})
|
|
32115
32308
|
]);
|
|
32116
|
-
var DemoModeValidationSchema =
|
|
32309
|
+
var DemoModeValidationSchema = z143.object({
|
|
32117
32310
|
brandId: DemoModeTemplateVerdictSchema,
|
|
32118
32311
|
servicePageId: DemoModeTemplateVerdictSchema,
|
|
32119
32312
|
motionTaskId: DemoModeTemplateVerdictSchema,
|
|
@@ -32126,48 +32319,48 @@ var DemoModeValidationSchema = z142.object({
|
|
|
32126
32319
|
productVideoThirdTaskId: DemoModeTemplateVerdictSchema.optional(),
|
|
32127
32320
|
productImageTaskId: DemoModeTemplateVerdictSchema.optional()
|
|
32128
32321
|
});
|
|
32129
|
-
var DemoModeJobSchema =
|
|
32322
|
+
var DemoModeJobSchema = z143.object({
|
|
32130
32323
|
flow: DemoModeFlowSchema,
|
|
32131
32324
|
productPhase: ProductDemoJobPhaseSchema.optional(),
|
|
32132
32325
|
step: DemoModeStepSchema,
|
|
32133
32326
|
/** brandId | servicePageOperationId | taskId según el flujo. */
|
|
32134
|
-
targetId:
|
|
32135
|
-
userId:
|
|
32327
|
+
targetId: z143.string().guid(),
|
|
32328
|
+
userId: z143.string().min(1),
|
|
32136
32329
|
/** Solo marca: la generación de extracción que el guion completa. */
|
|
32137
|
-
generation:
|
|
32330
|
+
generation: z143.number().int().positive().optional(),
|
|
32138
32331
|
/** Solo `final`/`watchdog`: la parte del snapshot de ESTE flujo, congelada al empezar. */
|
|
32139
|
-
result:
|
|
32332
|
+
result: z143.unknown().optional()
|
|
32140
32333
|
});
|
|
32141
32334
|
|
|
32142
32335
|
// ../../packages/types/src/landing-optional-review.ts
|
|
32143
|
-
import { z as
|
|
32336
|
+
import { z as z144 } from "zod";
|
|
32144
32337
|
var deliveryEvidence = {
|
|
32145
|
-
contract:
|
|
32146
|
-
artifactHash:
|
|
32147
|
-
revision:
|
|
32148
|
-
providerEpoch:
|
|
32149
|
-
review:
|
|
32338
|
+
contract: z144.literal("landing-optional-review-delivery-v1"),
|
|
32339
|
+
artifactHash: z144.string().regex(/^[a-f0-9]{64}$/),
|
|
32340
|
+
revision: z144.number().int().positive(),
|
|
32341
|
+
providerEpoch: z144.number().int().nonnegative(),
|
|
32342
|
+
review: z144.literal("unassessed")
|
|
32150
32343
|
};
|
|
32151
|
-
var LandingOptionalReviewDeliveryReceiptSchema =
|
|
32152
|
-
|
|
32344
|
+
var LandingOptionalReviewDeliveryReceiptSchema = z144.discriminatedUnion("auditOwner", [
|
|
32345
|
+
z144.object({
|
|
32153
32346
|
...deliveryEvidence,
|
|
32154
|
-
auditOwner:
|
|
32155
|
-
checkpointId:
|
|
32156
|
-
snapshotFingerprint:
|
|
32157
|
-
accounting:
|
|
32347
|
+
auditOwner: z144.literal("checkpoint"),
|
|
32348
|
+
checkpointId: z144.string().min(1).max(256),
|
|
32349
|
+
snapshotFingerprint: z144.string().regex(/^[a-f0-9]{64}$/),
|
|
32350
|
+
accounting: z144.enum([
|
|
32158
32351
|
"known",
|
|
32159
32352
|
"pending"
|
|
32160
32353
|
])
|
|
32161
32354
|
}).strict(),
|
|
32162
|
-
|
|
32355
|
+
z144.object({
|
|
32163
32356
|
...deliveryEvidence,
|
|
32164
|
-
auditOwner:
|
|
32165
|
-
operationId:
|
|
32166
|
-
stepId:
|
|
32167
|
-
stepKey:
|
|
32168
|
-
quoteFingerprint:
|
|
32357
|
+
auditOwner: z144.literal("native_step"),
|
|
32358
|
+
operationId: z144.string().min(1).max(256),
|
|
32359
|
+
stepId: z144.string().min(1).max(256),
|
|
32360
|
+
stepKey: z144.string().min(1).max(512),
|
|
32361
|
+
quoteFingerprint: z144.string().regex(/^[a-f0-9]{64}$/),
|
|
32169
32362
|
// A persisted start/epoch is real custody, not proof of a known bill.
|
|
32170
|
-
accounting:
|
|
32363
|
+
accounting: z144.literal("pending")
|
|
32171
32364
|
}).strict()
|
|
32172
32365
|
]);
|
|
32173
32366
|
|
|
@@ -32644,11 +32837,11 @@ var ApiClient = class {
|
|
|
32644
32837
|
};
|
|
32645
32838
|
|
|
32646
32839
|
// src/index.ts
|
|
32647
|
-
var MCP_VERSION = "12.
|
|
32840
|
+
var MCP_VERSION = "12.22.0";
|
|
32648
32841
|
|
|
32649
32842
|
// src/meta-upload-app.ts
|
|
32650
32843
|
import { readFileSync } from "fs";
|
|
32651
|
-
import { z as
|
|
32844
|
+
import { z as z145 } from "zod";
|
|
32652
32845
|
import { registerAppResource, RESOURCE_MIME_TYPE } from "@modelcontextprotocol/ext-apps/server";
|
|
32653
32846
|
|
|
32654
32847
|
// src/public-https.ts
|
|
@@ -33136,7 +33329,7 @@ var MEDIA_UPLOAD_CONNECT_DOMAINS = [
|
|
|
33136
33329
|
var STORAGE_ORIGINS_ERROR = "PM_MEDIA_UPLOAD_STORAGE_ORIGINS must be a JSON array of exact public HTTPS origins";
|
|
33137
33330
|
function normalizeStorageOrigins(value) {
|
|
33138
33331
|
try {
|
|
33139
|
-
const origins =
|
|
33332
|
+
const origins = z145.array(z145.string().trim().min(1)).max(16).parse(value);
|
|
33140
33333
|
return [
|
|
33141
33334
|
...new Set(origins.map((origin) => {
|
|
33142
33335
|
assertSafePublicBaseUrl("PM_MEDIA_UPLOAD_STORAGE_ORIGINS", origin);
|
|
@@ -33347,7 +33540,7 @@ function registerTaskResultsAppResource(server, proxyBaseUrl) {
|
|
|
33347
33540
|
__name(registerTaskResultsAppResource, "registerTaskResultsAppResource");
|
|
33348
33541
|
|
|
33349
33542
|
// src/tools/tasks.ts
|
|
33350
|
-
import { z as
|
|
33543
|
+
import { z as z151 } from "zod";
|
|
33351
33544
|
|
|
33352
33545
|
// src/status-poller.ts
|
|
33353
33546
|
var TERMINAL = /* @__PURE__ */ new Set([
|
|
@@ -33643,9 +33836,9 @@ async function resolveMediaRef(ref, opts) {
|
|
|
33643
33836
|
__name(resolveMediaRef, "resolveMediaRef");
|
|
33644
33837
|
|
|
33645
33838
|
// src/tools/shared.ts
|
|
33646
|
-
import { z as
|
|
33647
|
-
var Lang =
|
|
33648
|
-
var Country =
|
|
33839
|
+
import { z as z146 } from "zod";
|
|
33840
|
+
var Lang = z146.string().regex(/^[a-z]{2}(?:[-_][a-zA-Z]{2})?$/, "Usa un c\xF3digo de idioma BCP-47, por ejemplo es, en-US o pt-BR").max(10);
|
|
33841
|
+
var Country = z146.string().min(2).max(3);
|
|
33649
33842
|
var LandingStrategyEnum = SelectableLandingStrategySchema;
|
|
33650
33843
|
var LandingImageFormatEnum = LandingImageFormatSchema;
|
|
33651
33844
|
var VideoPresetEnum = VideoPreset.extract([
|
|
@@ -33754,7 +33947,7 @@ function animationStyleApplies(videoPreset, angleNarratives) {
|
|
|
33754
33947
|
return ANIMATED_VIDEO_PRESETS.has(videoPreset ?? "") || (angleNarratives ?? []).some((n) => ANIMATED_NARRATIVE_STYLES.has(n));
|
|
33755
33948
|
}
|
|
33756
33949
|
__name(animationStyleApplies, "animationStyleApplies");
|
|
33757
|
-
var VideoTierEnum =
|
|
33950
|
+
var VideoTierEnum = z146.enum([
|
|
33758
33951
|
"basic"
|
|
33759
33952
|
]);
|
|
33760
33953
|
function resolveVideoTier(_tier) {
|
|
@@ -33812,10 +34005,10 @@ var ImageCreativeStyleEnum = ImageCreativeStyle;
|
|
|
33812
34005
|
var ImageCreativeArchetypeEnum = ImageCreativeArchetype;
|
|
33813
34006
|
var ImageCreativeVisualTreatmentEnum = ImageCreativeVisualTreatment;
|
|
33814
34007
|
var ImageCreativeAspectRatioEnum = ImageCreativeAspectRatio;
|
|
33815
|
-
var ImageRefSchema =
|
|
33816
|
-
url:
|
|
33817
|
-
path:
|
|
33818
|
-
assetId:
|
|
34008
|
+
var ImageRefSchema = z146.object({
|
|
34009
|
+
url: z146.string().url().optional().describe('URL p\xFAblica HTTPS de la foto. Ej: una URL de Shopify CDN, Cloudinary, Imgur. \xDAsala cuando el usuario te diga "est\xE1 en X.com/foto.jpg" o cuando la foto ya est\xE9 hospedada.'),
|
|
34010
|
+
path: z146.string().min(1).optional().describe('Ruta del archivo en el computador del usuario. Ej: "/Users/maria/Desktop/foto.jpg", "~/Pictures/camiseta.png", "C:\\Users\\Maria\\Desktop\\foto.jpg". El MCP local la lee del disco y la sube. SOLO funciona cuando el MCP corre local (stdio). NO funciona en mcp.productmaker.app (HTTP) \u2014 ah\xED usa `url`.'),
|
|
34011
|
+
assetId: z146.string().guid().optional().describe("ID opaco devuelto por check_media_upload. \xDAsalo para una imagen subida desde el MCP App; ProductMaker adopta el archivo directamente y el MCP nunca descarga sus bytes.")
|
|
33819
34012
|
}).refine((v) => [
|
|
33820
34013
|
v.url,
|
|
33821
34014
|
v.path,
|
|
@@ -33823,11 +34016,11 @@ var ImageRefSchema = z145.object({
|
|
|
33823
34016
|
].filter(Boolean).length === 1, {
|
|
33824
34017
|
message: "each image entry must have exactly one of `url`, `path`, or `assetId`"
|
|
33825
34018
|
});
|
|
33826
|
-
var ImagesInput =
|
|
34019
|
+
var ImagesInput = z146.array(ImageRefSchema).min(1).max(5).superRefine((images, ctx) => {
|
|
33827
34020
|
const assetCount = images.filter((image2) => Boolean(image2.assetId)).length;
|
|
33828
34021
|
if (assetCount > 0 && assetCount !== images.length) {
|
|
33829
34022
|
ctx.addIssue({
|
|
33830
|
-
code:
|
|
34023
|
+
code: z146.ZodIssueCode.custom,
|
|
33831
34024
|
message: "all image entries must use assetId, or all must use URL/path sources"
|
|
33832
34025
|
});
|
|
33833
34026
|
}
|
|
@@ -33908,14 +34101,14 @@ async function submitCreative(api, opts) {
|
|
|
33908
34101
|
});
|
|
33909
34102
|
}
|
|
33910
34103
|
__name(submitCreative, "submitCreative");
|
|
33911
|
-
var ResearchTargetCountryEnum =
|
|
34104
|
+
var ResearchTargetCountryEnum = z146.enum([
|
|
33912
34105
|
"CO",
|
|
33913
34106
|
"MX",
|
|
33914
34107
|
"PE",
|
|
33915
34108
|
"EC",
|
|
33916
34109
|
"CL"
|
|
33917
34110
|
]);
|
|
33918
|
-
var ResearchCategoryEnum =
|
|
34111
|
+
var ResearchCategoryEnum = z146.enum([
|
|
33919
34112
|
"auto",
|
|
33920
34113
|
"automotive",
|
|
33921
34114
|
"kitchen",
|
|
@@ -34084,6 +34277,11 @@ var McpErrorCode = {
|
|
|
34084
34277
|
CAMPAIGN_NO_CREATIVES: "CAMPAIGN_NO_CREATIVES",
|
|
34085
34278
|
CAMPAIGN_MISSING_THUMBNAILS: "CAMPAIGN_MISSING_THUMBNAILS",
|
|
34086
34279
|
CAMPAIGN_RECONCILIATION_REQUIRED: "CAMPAIGN_RECONCILIATION_REQUIRED",
|
|
34280
|
+
// Dropi order actions (cancel_dropi_order)
|
|
34281
|
+
DROPI_CANCEL_UNCERTAIN: "DROPI_CANCEL_UNCERTAIN",
|
|
34282
|
+
DROPI_CANCEL_INVALID_RESPONSE: "DROPI_CANCEL_INVALID_RESPONSE",
|
|
34283
|
+
DROPI_CANCEL_REJECTED: "DROPI_CANCEL_REJECTED",
|
|
34284
|
+
DROPI_RECONNECT_REQUIRED: "DROPI_RECONNECT_REQUIRED",
|
|
34087
34285
|
// Shopify
|
|
34088
34286
|
SHOPIFY_NOT_CONNECTED: "SHOPIFY_NOT_CONNECTED",
|
|
34089
34287
|
SHOPIFY_TOKEN_EXPIRED: "SHOPIFY_TOKEN_EXPIRED",
|
|
@@ -34191,6 +34389,11 @@ var CODE_MESSAGES = {
|
|
|
34191
34389
|
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.",
|
|
34192
34390
|
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.",
|
|
34193
34391
|
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.",
|
|
34392
|
+
// Dropi order actions
|
|
34393
|
+
DROPI_CANCEL_UNCERTAIN: "Dropi did not confirm the cancellation. Call cancel_dropi_order again: it reads the order first, so repeating is safe.",
|
|
34394
|
+
DROPI_CANCEL_INVALID_RESPONSE: "Dropi answered with an unreadable response. Check the order in Dropi before trying again.",
|
|
34395
|
+
DROPI_CANCEL_REJECTED: "Dropi refused to cancel this order. Tell the seller the reason in providerMessage; do not retry.",
|
|
34396
|
+
DROPI_RECONNECT_REQUIRED: "The Dropi connection was rejected. The seller must reconnect Dropi at https://productmaker.app/integrations.",
|
|
34194
34397
|
// Shopify
|
|
34195
34398
|
SHOPIFY_NOT_CONNECTED: "No Shopify store is connected. Connect one at https://productmaker.app/integrations before publishing.",
|
|
34196
34399
|
SHOPIFY_TOKEN_EXPIRED: "The Shopify session expired. Reconnect the store at https://productmaker.app/integrations.",
|
|
@@ -34499,6 +34702,7 @@ var INVALID_PARAM_CODES = /* @__PURE__ */ new Set([
|
|
|
34499
34702
|
McpErrorCode.SHOPIFY_TOKEN_EXPIRED,
|
|
34500
34703
|
McpErrorCode.SHOPIFY_SCOPE_UPGRADE_REQUIRED,
|
|
34501
34704
|
McpErrorCode.SHOPIFY_NOT_CONNECTED,
|
|
34705
|
+
McpErrorCode.DROPI_RECONNECT_REQUIRED,
|
|
34502
34706
|
McpErrorCode.SHOPIFY_NO_PUBLISHED_THEME,
|
|
34503
34707
|
McpErrorCode.SHOPIFY_SHOP_UNAVAILABLE,
|
|
34504
34708
|
McpErrorCode.SHOPIFY_THEME_STRUCTURE_UNSUPPORTED,
|
|
@@ -34551,6 +34755,11 @@ var PASSTHROUGH_CODES = /* @__PURE__ */ new Set([
|
|
|
34551
34755
|
McpErrorCode.SHOPIFY_PUBLISH_CORRECTION_NOT_CONVERGED,
|
|
34552
34756
|
McpErrorCode.SHOPIFY_PUBLISH_VERIFICATION_FAILED,
|
|
34553
34757
|
McpErrorCode.SHOPIFY_PUBLISH_TARGET_INCOMPATIBLE,
|
|
34758
|
+
// Dropi order actions
|
|
34759
|
+
McpErrorCode.DROPI_CANCEL_UNCERTAIN,
|
|
34760
|
+
McpErrorCode.DROPI_CANCEL_INVALID_RESPONSE,
|
|
34761
|
+
McpErrorCode.DROPI_CANCEL_REJECTED,
|
|
34762
|
+
McpErrorCode.DROPI_RECONNECT_REQUIRED,
|
|
34554
34763
|
McpErrorCode.SHOPIFY_NOT_CONNECTED,
|
|
34555
34764
|
McpErrorCode.SHOPIFY_TOKEN_EXPIRED,
|
|
34556
34765
|
McpErrorCode.SHOPIFY_SCOPE_UPGRADE_REQUIRED,
|
|
@@ -34699,7 +34908,8 @@ function passthroughExtra(body) {
|
|
|
34699
34908
|
}
|
|
34700
34909
|
for (const key2 of [
|
|
34701
34910
|
"dimension",
|
|
34702
|
-
"retryAt"
|
|
34911
|
+
"retryAt",
|
|
34912
|
+
"providerMessage"
|
|
34703
34913
|
]) {
|
|
34704
34914
|
if (typeof body[key2] === "string") extra[key2] = body[key2];
|
|
34705
34915
|
}
|
|
@@ -34828,7 +35038,7 @@ function approveRefusalMessage(reason) {
|
|
|
34828
35038
|
__name(approveRefusalMessage, "approveRefusalMessage");
|
|
34829
35039
|
|
|
34830
35040
|
// src/tools/task-outputs.ts
|
|
34831
|
-
import { z as
|
|
35041
|
+
import { z as z147 } from "zod";
|
|
34832
35042
|
|
|
34833
35043
|
// src/asset-proxy.ts
|
|
34834
35044
|
import { createHmac, timingSafeEqual } from "crypto";
|
|
@@ -35012,12 +35222,12 @@ function serviceVideoResultMedia(result) {
|
|
|
35012
35222
|
};
|
|
35013
35223
|
}
|
|
35014
35224
|
__name(serviceVideoResultMedia, "serviceVideoResultMedia");
|
|
35015
|
-
var CreativeVariantIdentity =
|
|
35016
|
-
variantTaskId:
|
|
35017
|
-
sourceTaskId:
|
|
35225
|
+
var CreativeVariantIdentity = z147.object({
|
|
35226
|
+
variantTaskId: z147.string().guid(),
|
|
35227
|
+
sourceTaskId: z147.string().guid(),
|
|
35018
35228
|
kind: TaskCreativeVariantKind,
|
|
35019
35229
|
status: TaskStatusSchema,
|
|
35020
|
-
error:
|
|
35230
|
+
error: z147.string().optional()
|
|
35021
35231
|
});
|
|
35022
35232
|
function proxifyOutputs(outputs, proxyBaseUrl) {
|
|
35023
35233
|
if (!proxyBaseUrl || !isProxyEnabled()) return outputs;
|
|
@@ -35621,29 +35831,29 @@ ${parsed.data.error ? `${escapeMarkdownText(parsed.data.error)}
|
|
|
35621
35831
|
__name(renderVideoScriptMarkdown, "renderVideoScriptMarkdown");
|
|
35622
35832
|
|
|
35623
35833
|
// src/tools/media-presentation.ts
|
|
35624
|
-
import { z as
|
|
35625
|
-
var HttpsPresentationUrlSchema =
|
|
35834
|
+
import { z as z148 } from "zod";
|
|
35835
|
+
var HttpsPresentationUrlSchema = z148.string().url().max(2048).refine((value) => new URL(value).protocol === "https:");
|
|
35626
35836
|
var ProductMakerPreviewUrlSchema = HttpsPresentationUrlSchema.refine((value) => {
|
|
35627
35837
|
const hostname = new URL(value).hostname.toLowerCase();
|
|
35628
35838
|
return hostname === "productmaker.app" || hostname.endsWith(".productmaker.app");
|
|
35629
35839
|
}, "preview URL must be owned by ProductMaker");
|
|
35630
|
-
var positiveIntAtMost = /* @__PURE__ */ __name((maximum2) =>
|
|
35631
|
-
var PresentationImageSchema =
|
|
35632
|
-
kind:
|
|
35840
|
+
var positiveIntAtMost = /* @__PURE__ */ __name((maximum2) => z148.number().int().positive().max(maximum2), "positiveIntAtMost");
|
|
35841
|
+
var PresentationImageSchema = z148.object({
|
|
35842
|
+
kind: z148.literal("image"),
|
|
35633
35843
|
url: HttpsPresentationUrlSchema,
|
|
35634
|
-
mimeType:
|
|
35844
|
+
mimeType: z148.enum([
|
|
35635
35845
|
"image/jpeg",
|
|
35636
35846
|
"image/png"
|
|
35637
35847
|
]),
|
|
35638
35848
|
byteSize: positiveIntAtMost(5 * 1024 * 1024),
|
|
35639
35849
|
width: positiveIntAtMost(16384),
|
|
35640
35850
|
height: positiveIntAtMost(16384),
|
|
35641
|
-
alt:
|
|
35851
|
+
alt: z148.string().trim().min(1).max(240)
|
|
35642
35852
|
}).strict();
|
|
35643
35853
|
var McpMediaPresentationSchema = PresentationImageSchema;
|
|
35644
|
-
var GalleryImageSchema =
|
|
35854
|
+
var GalleryImageSchema = z148.object({
|
|
35645
35855
|
url: ProductMakerPreviewUrlSchema,
|
|
35646
|
-
alt:
|
|
35856
|
+
alt: z148.string().trim().min(1).max(240)
|
|
35647
35857
|
});
|
|
35648
35858
|
var MCP_GALLERY_IMAGE_MAX_BYTES = 10 * 1024 * 1024;
|
|
35649
35859
|
async function imageBlocks(image2, transport) {
|
|
@@ -35700,12 +35910,12 @@ async function buildMcpMediaPresentationContent(rawPresentation, transport = "ht
|
|
|
35700
35910
|
];
|
|
35701
35911
|
}
|
|
35702
35912
|
__name(buildMcpMediaPresentationContent, "buildMcpMediaPresentationContent");
|
|
35703
|
-
var OwnedImagePreviewSchema =
|
|
35913
|
+
var OwnedImagePreviewSchema = z148.object({
|
|
35704
35914
|
url: HttpsPresentationUrlSchema.refine((value) => {
|
|
35705
35915
|
const url3 = new URL(value);
|
|
35706
35916
|
return !url3.username && !url3.password && !isPrivateHost(url3.hostname);
|
|
35707
35917
|
}, "Preview URL must be public HTTPS without credentials"),
|
|
35708
|
-
alt:
|
|
35918
|
+
alt: z148.string().trim().min(1).max(240)
|
|
35709
35919
|
});
|
|
35710
35920
|
async function buildMcpImagePreviewContent(rawPreview, transport = "http") {
|
|
35711
35921
|
const preview2 = OwnedImagePreviewSchema.safeParse(rawPreview);
|
|
@@ -36001,7 +36211,7 @@ async function observeMcpMediaDelivery(fingerprint, work) {
|
|
|
36001
36211
|
__name(observeMcpMediaDelivery, "observeMcpMediaDelivery");
|
|
36002
36212
|
|
|
36003
36213
|
// src/tools/animated-video.ts
|
|
36004
|
-
import { z as
|
|
36214
|
+
import { z as z149 } from "zod";
|
|
36005
36215
|
|
|
36006
36216
|
// src/tools/paid-confirmation.ts
|
|
36007
36217
|
function describeMarketStudyChoice(enabled) {
|
|
@@ -36250,30 +36460,30 @@ function hookVariantsLabel(count) {
|
|
|
36250
36460
|
return count === 1 ? "1 versi\xF3n del gancho" : `${count} versiones del gancho`;
|
|
36251
36461
|
}
|
|
36252
36462
|
__name(hookVariantsLabel, "hookVariantsLabel");
|
|
36253
|
-
var DurationInput =
|
|
36254
|
-
var CreateAnimatedVideoInput =
|
|
36255
|
-
action:
|
|
36463
|
+
var DurationInput = z149.union(MOTION_GRAPHICS_DURATIONS.map((d) => z149.literal(d)));
|
|
36464
|
+
var CreateAnimatedVideoInput = z149.object({
|
|
36465
|
+
action: z149.enum([
|
|
36256
36466
|
"prepare",
|
|
36257
36467
|
"status",
|
|
36258
36468
|
"cancel",
|
|
36259
36469
|
"generate"
|
|
36260
36470
|
]).default("prepare").describe("prepare inicia una captura gratuita; status consulta websiteCaptureId; cancel la cancela; generate requiere captura ready y confirmaci\xF3n expl\xEDcita del usuario despu\xE9s de mostrar vista previa y precio."),
|
|
36261
|
-
brandId:
|
|
36262
|
-
websiteCaptureId:
|
|
36263
|
-
generationRequestId:
|
|
36264
|
-
confirmed:
|
|
36471
|
+
brandId: z149.string().guid().optional().describe("ID de un servicio propio y listo (de create_brand). Obligatorio al preparar y crear videos nuevos. Conserva el mismo brandId en reintentos; si recuperas una generaci\xF3n hist\xF3rica aceptada sin este campo, om\xEDtelo como en la petici\xF3n original. status/cancel no lo necesitan."),
|
|
36472
|
+
websiteCaptureId: z149.string().guid().optional().describe("ID de la captura preparada. Obligatorio para status/cancel/generate; no inventarlo."),
|
|
36473
|
+
generationRequestId: z149.string().guid().optional().describe("Identidad opcional de una generaci\xF3n confirmada. Repite el mismo UUID al recuperar una respuesta perdida; usa otro \xFAnicamente cuando el usuario pida y confirme otro video, nunca por un error de transporte."),
|
|
36474
|
+
confirmed: z149.boolean().optional().describe("Solo true despu\xE9s de que el usuario confirme esta captura, formato, duraci\xF3n, idioma y precio. Obligatorio para generate; preparar no genera ni cobra."),
|
|
36265
36475
|
// Plain text, not `.url()`: users type «cal.com», and the web accepts it.
|
|
36266
36476
|
// normalizeWebAddress (shared with the web) adds https:// and refuses
|
|
36267
36477
|
// anything that is not a public http(s) address.
|
|
36268
|
-
landingUrl:
|
|
36478
|
+
landingUrl: z149.string().trim().min(1).optional().describe("Enlace p\xFAblico de la p\xE1gina del servicio, como lo dio el usuario (\xABcal.com\xBB o \xABhttps://cal.com\xBB). El video sale de lo que muestra esa p\xE1gina: su marca, colores y mensajes."),
|
|
36269
36479
|
format: MotionGraphicsFormatSchema.optional().describe('Formato: "vertical" (9:16, Reels/TikTok), "square" (1:1, feed) u "horizontal" (16:9, YouTube/web). Si el usuario no lo dijo, PREG\xDANTALE.'),
|
|
36270
36480
|
durationSec: DurationInput.optional().describe(`Duraci\xF3n en segundos: ${MOTION_GRAPHICS_DURATIONS.join(", ")}. Fija el precio (ver la descripci\xF3n de la herramienta). Si el usuario no la dijo, PREG\xDANTALE.`),
|
|
36271
36481
|
language: MotionGraphicsLanguageSchema.optional().describe('Idioma de los textos del video: "es", "en" o "pt".'),
|
|
36272
36482
|
videoQuality: MotionGraphicsVideoQualitySchema.default(DEFAULT_MOTION_GRAPHICS_VIDEO_QUALITY).describe('Calidad IA: "economy" (econ\xF3mica) o "pro" (alta, por defecto). Afecta el precio de los clips IA.'),
|
|
36273
36483
|
videoResolution: MotionGraphicsVideoResolutionSchema.default(DEFAULT_MOTION_GRAPHICS_VIDEO_RESOLUTION).describe('Resoluci\xF3n: "480p" (por defecto), "720p" o "1080p". 1080p solo est\xE1 disponible con videoQuality="pro".'),
|
|
36274
|
-
notes:
|
|
36484
|
+
notes: z149.string().trim().max(MOTION_GRAPHICS_NOTES_MAX_CHARS).optional().describe("Opcional. Idea creativa, escenarios, acciones, di\xE1logo, voz o m\xFAsica en lenguaje natural. El director puede hacer solo motion graphics, escenas reales o escenas imposibles seg\xFAn la idea; las frases gu\xEDan el guion sin garantizar reproducci\xF3n exacta."),
|
|
36275
36485
|
hookVariants: MotionGraphicsHookVariantsSchema.optional().describe(`Opcional. Cantidad de videos independientes, de 1 a ${MOTION_GRAPHICS_HOOK_VARIANTS_MAX} (por defecto 1). Cada uno tiene su propio \xE1ngulo, guion y estilo visual, respetando notes, y reserva el precio completo de un video (ver la descripci\xF3n); \xFAsalo solo si el usuario lo pide.`),
|
|
36276
|
-
music:
|
|
36486
|
+
music: z149.boolean().optional().describe("Opcional. M\xFAsica y efectos dirigidos seg\xFAn el negocio y el video (por defecto true), con una copia adicional solo con voces. false entrega solo voces, sin m\xFAsica ni efectos a\xF1adidos ni el cargo de m\xFAsica. \xDAsalo solo si el usuario lo pide.")
|
|
36277
36487
|
}).strict();
|
|
36278
36488
|
function captureNextAction(capture) {
|
|
36279
36489
|
if (capture.status === "ready") return "Muestra la vista previa al usuario y confirma formato, duraci\xF3n, idioma, calidad IA, resoluci\xF3n y precio. Solo despu\xE9s llama create_animated_video con action=generate, este websiteCaptureId y confirmed=true.";
|
|
@@ -36326,33 +36536,33 @@ var FORMAT_LABELS = {
|
|
|
36326
36536
|
square: "cuadrado 1:1",
|
|
36327
36537
|
horizontal: "horizontal 16:9"
|
|
36328
36538
|
};
|
|
36329
|
-
var AnimatedVideoResultSchema =
|
|
36330
|
-
status:
|
|
36539
|
+
var AnimatedVideoResultSchema = z149.object({
|
|
36540
|
+
status: z149.enum([
|
|
36331
36541
|
"pending",
|
|
36332
36542
|
"done",
|
|
36333
36543
|
"error"
|
|
36334
36544
|
]),
|
|
36335
|
-
serviceMode:
|
|
36336
|
-
finalMp4Url:
|
|
36337
|
-
adCopy:
|
|
36338
|
-
adCopies:
|
|
36339
|
-
error:
|
|
36340
|
-
motionGraphics:
|
|
36545
|
+
serviceMode: z149.literal("motion_graphics"),
|
|
36546
|
+
finalMp4Url: z149.string().optional(),
|
|
36547
|
+
adCopy: z149.string().optional(),
|
|
36548
|
+
adCopies: z149.array(z149.string()).optional(),
|
|
36549
|
+
error: z149.string().optional(),
|
|
36550
|
+
motionGraphics: z149.object({
|
|
36341
36551
|
stage: MotionGraphicsStageSchema,
|
|
36342
36552
|
format: MotionGraphicsFormatSchema,
|
|
36343
|
-
durationSec:
|
|
36344
|
-
width:
|
|
36345
|
-
height:
|
|
36553
|
+
durationSec: z149.number(),
|
|
36554
|
+
width: z149.number().optional(),
|
|
36555
|
+
height: z149.number().optional(),
|
|
36346
36556
|
language: MotionGraphicsLanguageSchema.optional(),
|
|
36347
36557
|
videoQuality: MotionGraphicsVideoQualitySchema.optional().catch(void 0),
|
|
36348
36558
|
videoResolution: MotionGraphicsVideoResolutionSchema.optional().catch(void 0),
|
|
36349
|
-
creativeBatch:
|
|
36559
|
+
creativeBatch: z149.object({
|
|
36350
36560
|
index: MotionGraphicsHookVariantsSchema,
|
|
36351
36561
|
count: MotionGraphicsHookVariantsSchema,
|
|
36352
|
-
tasks:
|
|
36353
|
-
taskId:
|
|
36562
|
+
tasks: z149.array(z149.object({
|
|
36563
|
+
taskId: z149.string().guid(),
|
|
36354
36564
|
index: MotionGraphicsHookVariantsSchema,
|
|
36355
|
-
status:
|
|
36565
|
+
status: z149.enum([
|
|
36356
36566
|
"queued",
|
|
36357
36567
|
"processing",
|
|
36358
36568
|
"done",
|
|
@@ -36360,29 +36570,29 @@ var AnimatedVideoResultSchema = z148.object({
|
|
|
36360
36570
|
])
|
|
36361
36571
|
})).max(MOTION_GRAPHICS_HOOK_VARIANTS_MAX)
|
|
36362
36572
|
}).optional().catch(void 0),
|
|
36363
|
-
queuedAt:
|
|
36364
|
-
jobsAhead:
|
|
36365
|
-
stageStartedAt:
|
|
36366
|
-
renderProgress:
|
|
36573
|
+
queuedAt: z149.string().optional(),
|
|
36574
|
+
jobsAhead: z149.number().int().nonnegative().optional(),
|
|
36575
|
+
stageStartedAt: z149.string().optional(),
|
|
36576
|
+
renderProgress: z149.number().optional(),
|
|
36367
36577
|
// AI clip fields (absent on a video paid before clips, or from an API
|
|
36368
36578
|
// that predates them). Lenient: an unreadable value is dropped
|
|
36369
36579
|
// instead of hiding the status.
|
|
36370
|
-
clipCount:
|
|
36371
|
-
clipsUsed:
|
|
36372
|
-
clipPriceCents:
|
|
36373
|
-
clipsRefunded:
|
|
36580
|
+
clipCount: z149.number().int().nonnegative().optional().catch(void 0),
|
|
36581
|
+
clipsUsed: z149.number().int().nonnegative().optional().catch(void 0),
|
|
36582
|
+
clipPriceCents: z149.number().finite().nonnegative().optional().catch(void 0),
|
|
36583
|
+
clipsRefunded: z149.number().int().nonnegative().optional().catch(void 0),
|
|
36374
36584
|
// Hook versions (absent from an API or a video before them): the
|
|
36375
36585
|
// count ordered and, once done, the signed URLs of the EXTRA versions
|
|
36376
36586
|
// (hook 2, hook 3); `finalMp4Url` is hook 1.
|
|
36377
|
-
hookVariants:
|
|
36378
|
-
cleanVideoUrl:
|
|
36379
|
-
cleanVariantUrls:
|
|
36380
|
-
variantUrls:
|
|
36587
|
+
hookVariants: z149.number().int().min(1).max(MOTION_GRAPHICS_HOOK_VARIANTS_MAX).optional().catch(void 0),
|
|
36588
|
+
cleanVideoUrl: z149.string().url().optional().catch(void 0),
|
|
36589
|
+
cleanVariantUrls: z149.array(z149.string().url()).max(MOTION_GRAPHICS_HOOK_VARIANTS_MAX - 1).optional().catch(void 0),
|
|
36590
|
+
variantUrls: z149.array(z149.string().min(1)).max(MOTION_GRAPHICS_HOOK_VARIANTS_MAX - 1).optional().catch(void 0),
|
|
36381
36591
|
// Extra hook versions given back, as the task recorded it once the
|
|
36382
36592
|
// refunds landed (absent until then, and from an API before it).
|
|
36383
|
-
variantsRefunded:
|
|
36384
|
-
activity:
|
|
36385
|
-
previewUrl:
|
|
36593
|
+
variantsRefunded: z149.number().int().nonnegative().optional().catch(void 0),
|
|
36594
|
+
activity: z149.array(MotionGraphicsActivitySchema).optional().catch(void 0),
|
|
36595
|
+
previewUrl: z149.string().optional()
|
|
36386
36596
|
}).passthrough()
|
|
36387
36597
|
}).passthrough();
|
|
36388
36598
|
function parseAnimatedVideoResult(value) {
|
|
@@ -36661,7 +36871,7 @@ function registerAnimatedVideoTools(server, api) {
|
|
|
36661
36871
|
nowMs: 0
|
|
36662
36872
|
})
|
|
36663
36873
|
});
|
|
36664
|
-
const parsedTaskIds =
|
|
36874
|
+
const parsedTaskIds = z149.array(z149.string().guid()).min(1).max(MOTION_GRAPHICS_HOOK_VARIANTS_MAX).safeParse(created.taskIds);
|
|
36665
36875
|
const taskIds = parsedTaskIds.success && parsedTaskIds.data[0] === created.taskId ? parsedTaskIds.data : void 0;
|
|
36666
36876
|
const receipt = {
|
|
36667
36877
|
taskId: created.taskId,
|
|
@@ -36703,10 +36913,10 @@ function registerAnimatedVideoTools(server, api) {
|
|
|
36703
36913
|
__name(registerAnimatedVideoTools, "registerAnimatedVideoTools");
|
|
36704
36914
|
|
|
36705
36915
|
// src/tools/winning-product-image.ts
|
|
36706
|
-
import { z as
|
|
36707
|
-
var WinnerReferenceInput =
|
|
36708
|
-
runId:
|
|
36709
|
-
candidateSourceId:
|
|
36916
|
+
import { z as z150 } from "zod";
|
|
36917
|
+
var WinnerReferenceInput = z150.object({
|
|
36918
|
+
runId: z150.string().guid(),
|
|
36919
|
+
candidateSourceId: z150.string().trim().min(1).max(160)
|
|
36710
36920
|
}).strict().describe("Referencia opaca de un producto devuelto por find_winning_products/get_product_research_run.");
|
|
36711
36921
|
async function resolveWinnerImages(api, winnerReference, images) {
|
|
36712
36922
|
if (!winnerReference) return images;
|
|
@@ -36743,63 +36953,63 @@ var createProductTaskSingleOutputDescription = renderCreateProductTaskAvoidWhenF
|
|
|
36743
36953
|
var CREATE_SERVICE_VIDEO_ON_MCP = PRODUCTMAKER_MCP_CAPABILITY_NAMES.includes("create_service_video");
|
|
36744
36954
|
var listTasksGuidance = getProductMakerCapabilityModelGuidance("list_tasks");
|
|
36745
36955
|
var editTaskDraftGuidance = getProductMakerCapabilityModelGuidance("edit_task_draft");
|
|
36746
|
-
var CreateProductTaskInput =
|
|
36956
|
+
var CreateProductTaskInput = z151.object({
|
|
36747
36957
|
images: ImagesInput.optional().describe("1\u20135 fotos del mismo producto. Omitir \xFAnicamente cuando projectId apunta a un proyecto propio con imagen guardada."),
|
|
36748
36958
|
winnerReference: WinnerReferenceInput.optional().describe(WINNER_IMAGE_CHOICE_GUIDANCE),
|
|
36749
|
-
projectId:
|
|
36750
|
-
productUrl:
|
|
36959
|
+
projectId: z151.string().guid().optional().describe("Opcional. Proyecto guiado propio. Permite continuar sin volver a subir la imagen guardada; nunca evita cr\xE9ditos, cuotas ni confirmaciones."),
|
|
36960
|
+
productUrl: z151.string().url().optional().describe("Opcional. URL de la p\xE1gina del producto (Shopify, AliExpress, Amazon, etc.) para enriquecer el contexto. Si se omite, la IA infiere todo desde la imagen."),
|
|
36751
36961
|
language: Lang.describe('C\xF3digo de idioma para el contenido generado. Ejemplos: "es", "en", "pt". REQUERIDO \u2014 si el usuario no lo especific\xF3, PREG\xDANTALE antes de invocar. NUNCA infieras desde el contexto del chat ni asumas "es" por default.'),
|
|
36752
36962
|
country: Country.describe('C\xF3digo ISO del pa\xEDs objetivo. Ejemplos: "CO", "MX", "US", "AR". Define moneda, m\xE9todos de pago locales y tono. REQUERIDO \u2014 si el usuario no lo especific\xF3, PREG\xDANTALE antes de invocar. NUNCA infieras desde el contexto del chat.'),
|
|
36753
|
-
price:
|
|
36754
|
-
compareAtPrice:
|
|
36755
|
-
offer:
|
|
36756
|
-
paymentMethods:
|
|
36757
|
-
productContext:
|
|
36758
|
-
productLabel:
|
|
36963
|
+
price: z151.string().min(1).max(120).optional().describe('Precio que se mostrar\xE1 en la landing y video. Formato libre \u2014 ej. "$89.900", "USD 29.99", "MXN 599". Opcional pero MUY IMPACTANTE: si el usuario no lo mencion\xF3, PREG\xDANTALE antes de invocar. Si te dice "t\xFA elige", om\xEDtelo y el backend sugiere uno.'),
|
|
36964
|
+
compareAtPrice: z151.string().min(1).max(120).optional().describe('Opcional. Precio anterior para comunicar un descuento real en landing e im\xE1genes. Ej. "$129.000" cuando price="$89.900".'),
|
|
36965
|
+
offer: z151.string().min(1).max(240).optional().describe('Oferta o promoci\xF3n a destacar. Ej. "2x1", "Env\xEDo gratis hoy", "50% OFF". Opcional pero MUY IMPACTANTE: si el usuario no lo mencion\xF3, PREG\xDANTALE antes de invocar (es v\xE1lido que diga "sin oferta"). Si te dice "t\xFA elige", om\xEDtelo.'),
|
|
36966
|
+
paymentMethods: z151.string().min(1).max(240).optional().describe('Opcional. M\xE9todos de pago que puede mostrar la landing. Ej. "Tarjeta, PSE, Nequi, Contraentrega". Si se omite, la landing no muestra m\xE9todos de pago.'),
|
|
36967
|
+
productContext: z151.string().max(PRODUCT_CONTEXT_MAX_CHARS).optional().describe("Opcional. Informacion adicional del producto que la IA debe usar como contexto prioritario: uso real, comprador, restricciones, diferenciadores o direccion creativa. No reemplaza la investigacion de competencia; si hay competencia, guia el primer angulo y los outputs no deben contradecirlo."),
|
|
36968
|
+
productLabel: z151.string().trim().max(80).optional().describe('Opcional. Qu\xE9 es el producto, en pocas palabras (ej. "quita pelusas para ropa"). Es AUTORITATIVO: si lo env\xEDas, la IA usa esta identidad y no la reemplaza por otra categor\xEDa. Si lo omites, la IA detecta el producto desde la imagen.'),
|
|
36759
36969
|
videoPreset: VideoPresetEnum.default("auto").describe('Opcional. Tipo/narrativa del video \u2014 \xFAnico campo de "estilo" que el usuario controla. Default "auto" (la IA escoge tras analizar el producto). Todos los presets funcionan a 15s (single_call) y 30s (Multiescena), salvo "viral", que solo existe a 15 s (Un solo clip o Multiescena); "problem_solution" en single_call abre sin el producto y el producto entra por referencia en su beat de soluci\xF3n. Opciones: "auto", "ugc_dynamic" (review con experiencia y prueba), "ugc_how_to" (tutorial con pasos y resultado visible), "ugc_unboxing_chaos" (apertura y primera prueba), "problem_solution" (problema concreto, producto como soluci\xF3n y CTA), "product_showcase" (producto ejecutando una funci\xF3n real), "wearable_showcase" (prenda o accesorio modelado), "cinematic" (TV spot con receta cinematogr\xE1fica), "wild_card" (idea imposible: un truco visual que en la vida real no podr\xEDa pasar, y al cierre la invitaci\xF3n a comprar), "pixar_problem" (problema animado 3D), "pixar_sassy" (producto que habla), "viral" (video sin voz con r\xF3tulos en pantalla; antes/despu\xE9s solo en Multiescena; solo 15 s, Un solo clip o Multiescena, y solo para cuentas habilitadas; la API rechaza otras duraciones). Si el usuario pide algo fuera de esta lista, p\xEDdele una opci\xF3n v\xE1lida.'),
|
|
36760
36970
|
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.'),
|
|
36761
|
-
durationSeconds:
|
|
36762
|
-
|
|
36763
|
-
|
|
36971
|
+
durationSeconds: z151.union([
|
|
36972
|
+
z151.literal(15),
|
|
36973
|
+
z151.literal(30)
|
|
36764
36974
|
]).default(15).describe("Opcional. Duraci\xF3n objetivo del video: 15s (single_call, default) o 30s (Multiescena, aproximadamente 30s y facturado por escena)."),
|
|
36765
|
-
pauseForAngleReview:
|
|
36766
|
-
aiDecidesAll:
|
|
36975
|
+
pauseForAngleReview: z151.boolean().optional().describe("Compatibilidad heredada. MCP deriva esta pausa de aiDecidesAll: manual siempre pausa y autom\xE1tico siempre la omite. No uses este campo para saltar reviews."),
|
|
36976
|
+
aiDecidesAll: z151.boolean().optional().describe("Mapea el toggle web \u201CDejar que la IA decida todo\u201D. Si true, ProductMaker omite reviews. Act\xEDvalo \xFAnicamente cuando el usuario lo pida expl\xEDcitamente. Omitido/false = reviews conversacionales."),
|
|
36767
36977
|
videoTier: VideoTierEnum.optional().describe('Opcional. Estilo del video. "basic" = "Realista" para 15s; al pedir durationSeconds=30 el sistema selecciona internamente Multiescena. No se expone el tier interno directamente.'),
|
|
36768
36978
|
videoStructure: VideoStructureEnum.default("single_take").describe('Opcional. Formato: "single_take" = Un solo clip (generado completo; puede incluir cambios de plano) o "multi_scene" = Multiescena. Default: single_take.'),
|
|
36769
36979
|
videoQuality: VideoQualityEnum.default("economy").describe('Opcional. Calidad: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro. El proveedor se elige internamente. Default: economy.'),
|
|
36770
36980
|
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).'),
|
|
36771
|
-
videoAngleCount:
|
|
36981
|
+
videoAngleCount: z151.number().int().min(1).max(3).optional().describe("Cantidad de videos a renderizar: 1, 2 o 3. REQUERIDO cuando outputs incluye video (o se omite outputs, cuyo default incluye video); om\xEDtelo s\xF3lo cuando no se generar\xE1 video. Preg\xFAntalo incluso con aiDecidesAll=true porque cambia el costo."),
|
|
36772
36982
|
angleNarratives: PublicNarrativeStyleEnum.array().max(3).optional().describe('Opcional. Narrativa POR \xC1NGULO (posicional). Valores actuales: "review", "ugc_how_to", "ugc_unboxing_chaos", "problem_product_cta" (problema concreto, producto como soluci\xF3n y CTA), "product_showcase", "wearable_showcase", "cinematic", "wild_card", "animated_problem_pixar", "sassy_product_pixar", "viral" (video sin voz: r\xF3tulos en pantalla; antes/despu\xE9s solo en Multiescena; solo 15 s, Un solo clip o Multiescena, y solo para cuentas habilitadas; la API rechaza otras duraciones), "market" (narrativa an\xE1lisis de mercado: adapta el video a los patrones ganadores estudiados de la competencia; requiere competitorScanEnabled: true). angleNarratives[i] fuerza la narrativa del \xE1ngulo i; las posiciones restantes las elige la IA. La lista no puede superar videoAngleCount.'),
|
|
36773
|
-
outputs:
|
|
36983
|
+
outputs: z151.array(z151.enum([
|
|
36774
36984
|
"landing",
|
|
36775
36985
|
"video",
|
|
36776
36986
|
"image"
|
|
36777
36987
|
])).min(1).max(3).optional().describe(`Opcional. Qu\xE9 outputs generar. Default: todos ["landing","video","image"]. Para 2 outputs: ["landing","image"] (sin video), ["video","image"] (sin landing), ["landing","video"] (sin imagen). ${createProductTaskSingleOutputDescription}`),
|
|
36778
|
-
includeInitialLandingGif:
|
|
36779
|
-
competitorScanEnabled:
|
|
36988
|
+
includeInitialLandingGif: z151.boolean().optional().describe("Opcional. En nuevas landings cl\xE1sicas habilitadas, omitirlo incluye el primer GIF del producto y su coste en el total. Env\xEDa false si el usuario lo excluye: no se genera ni se reserva su coste. Conserva la elecci\xF3n al confirmar y al reintentar."),
|
|
36989
|
+
competitorScanEnabled: z151.boolean().optional().describe("Opcional. Default false: omitirlo significa SIN estudio de mercado. Antes de crear, llama estimate_market_study_cost con kind=product_task, muestra al usuario el costo con y sin estudio y preg\xFAntale si lo quiere; env\xEDa true solo si lo acepta (o si solicita la narrativa an\xE1lisis de mercado). Si la tarea incluye video, true analiza anuncios de la competencia y desbloquea la narrativa an\xE1lisis de mercado; si el estudio no encuentra datos suficientes, degrada al planner cl\xE1sico."),
|
|
36780
36990
|
generateAiEdit: AiEditRequestSchema.optional().describe('Opcional. Pide la Edici\xF3n con IA: una pasada que a\xF1ade texto, efectos y m\xFAsica sobre cada video entregado (variante with_ai_edit; se cobra al entregar, por video). Nivel: "economy" (Econ\xF3mica, Sonnet 5.5, m\xE1s barata) o "pro" (Opus 5.5, mejor calidad, ~10 min). true equivale a "pro"; false/omitido = sin edici\xF3n.'),
|
|
36781
|
-
replicateWinnerWhenFound:
|
|
36782
|
-
brandId:
|
|
36783
|
-
actorId:
|
|
36991
|
+
replicateWinnerWhenFound: z151.boolean().optional().describe("Conserva la preferencia de copiar un ganador si existe. false estudia el mercado sin reemplazar un \xE1ngulo por el anuncio ganador. No a\xF1ade una pregunta obligatoria."),
|
|
36992
|
+
brandId: z151.string().guid().optional().describe("Opcional. ID de una marca del usuario; si se env\xEDa, el sistema usa su voz, colores y persona para enriquecer los outputs generados."),
|
|
36993
|
+
actorId: z151.string().trim().min(1).max(120).optional().describe("Opcional. ID de un personaje guardado (usa list_actors para verlos). Si lo env\xEDas, su foto y su voz mandan sobre la descripci\xF3n de texto."),
|
|
36784
36994
|
creativeGender: CreativeGenderEnum.optional().describe('Opcional. QUI\xC9N APARECE EN PANTALLA en todos los creativos de la task: el presentador del video, las personas fotografiadas en la landing y la persona del anuncio. NO es la voz. M\xE1ndalo en cuanto el usuario lo diga en cualquier momento de la conversaci\xF3n y con cualquier redacci\xF3n ("quiero una mujer", "que salga un hombre", "esto es para hombres"): si no lo mandas, el g\xE9nero lo inventa la IA y el usuario recibe lo contrario de lo que pidi\xF3 sin ning\xFAn aviso. "mixed" solo cuando pida expl\xEDcitamente ambos. Si adem\xE1s mandas actorId, el personaje guardado manda sobre este campo.'),
|
|
36785
|
-
creativeDirection:
|
|
36786
|
-
headline:
|
|
36787
|
-
subheadline:
|
|
36995
|
+
creativeDirection: z151.string().max(500).optional().describe('Opcional. Direcci\xF3n creativa en texto libre (colores, mood, estilo) que aplica a los outputs de IMAGEN y LANDING (no al video \u2014 el estilo/ambiente del video se dirige con scriptNotes). M\xC1XIMA PRIORIDAD: anula marca, colores y estilo por defecto. Ej. "amarillo y azul, minimalista". M\xE1x 500 caracteres.'),
|
|
36996
|
+
headline: z151.string().max(120).optional().describe("Opcional. Titular EXACTO a renderizar. Se imprime tal cual: la IA no lo reescribe, no lo acorta y no lo traduce. Se aplica a las IM\xC1GENES y a la portada de la landing de esta task (el video no lo usa; para el video usa scriptNotes). \xDAsalo cuando el copy es de marca y no es negociable. M\xE1x 120 caracteres. Si lo omites, la IA escribe el titular."),
|
|
36997
|
+
subheadline: z151.string().max(160).optional().describe("Opcional. Subt\xEDtulo EXACTO a renderizar, misma regla que headline. Independiente: puedes fijar solo el subt\xEDtulo. M\xE1x 160 caracteres."),
|
|
36788
36998
|
landingStrategy: LandingStrategyEnum.optional().describe('Opcional. Estructura de la landing cl\xE1sica cuando landing est\xE1 entre outputs: "classic" (Landing cl\xE1sica de ProductMaker: estructura original probada y recomendada) , "social_proof" (Landing Viral: UGC, WhatsApp, Instagram y evidencia social) o "pain_solution" (Problema y soluci\xF3n: dolor reconocible, demostraci\xF3n y transformaci\xF3n). Default "classic".'),
|
|
36789
36999
|
landingImageFormat: LandingImageFormatEnum.default("9:16").describe('Opcional. Formato/relaci\xF3n de aspecto de las im\xE1genes de la landing cl\xE1sica cuando landing est\xE1 entre outputs: "9:16" (vertical, por defecto), "4:5" (vertical compacto para feed) o "1:1" (cuadrado). Default "9:16".'),
|
|
36790
37000
|
landingMode: LandingModeSchema.optional().describe('Opcional. Tipo de landing cuando landing est\xE1 entre outputs: "classic" (cl\xE1sica de im\xE1genes, por defecto) o "code" (landing de c\xF3digo editable por chat; se edita luego con quote_code_landing_edit / edit_code_landing). Con "code", landingStrategy y landingImageFormat no aplican y no se env\xEDan.')
|
|
36791
37001
|
}).strict();
|
|
36792
|
-
var CreateServiceVideoInput =
|
|
36793
|
-
landingUrl:
|
|
36794
|
-
additionalContext:
|
|
37002
|
+
var CreateServiceVideoInput = z151.object({
|
|
37003
|
+
landingUrl: z151.string().url().describe("URL p\xFAblica de la landing del servicio. Es suficiente para generar el video; los medios son opcionales en la web."),
|
|
37004
|
+
additionalContext: z151.string().max(3e3).optional().describe('Instrucci\xF3n natural prioritaria. Ej.: "adapta el ritmo de estos competidores", "enfatiza reservas de demos" o restricciones de claims.'),
|
|
36795
37005
|
language: Lang.describe("Idioma del video: es, en o pt."),
|
|
36796
|
-
voiceId:
|
|
36797
|
-
brandId:
|
|
36798
|
-
reviewMode:
|
|
37006
|
+
voiceId: z151.string().trim().min(1).pipe(VoiceId).optional().describe('Opcional. Voz para toda la narraci\xF3n. Usa "auto" para que la IA la alinee con el presentador. Las voces del banco compartido fueron retiradas.'),
|
|
37007
|
+
brandId: z151.string().guid().optional().describe("Marca guardada del usuario. Aplica voz, mensajes, paleta y persona predeterminada."),
|
|
37008
|
+
reviewMode: z151.enum([
|
|
36799
37009
|
"automatic",
|
|
36800
37010
|
"guided"
|
|
36801
37011
|
]).default("automatic").describe("automatic = la IA elige concepto y guion sin pausas; guided = el usuario aprueba concepto y storyboard."),
|
|
36802
|
-
videoPreset:
|
|
37012
|
+
videoPreset: z151.enum([
|
|
36803
37013
|
"auto",
|
|
36804
37014
|
"ugc_dynamic",
|
|
36805
37015
|
"ugc_how_to",
|
|
@@ -36809,128 +37019,128 @@ var CreateServiceVideoInput = z150.object({
|
|
|
36809
37019
|
videoQuality: VideoQualityEnum.default("economy").describe('Opcional. Calidad: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro. El proveedor se elige internamente. Default: economy.'),
|
|
36810
37020
|
videoResolution: VideoResolutionEnum.default("480p").describe('Opcional. Resoluci\xF3n: "480p" o "720p". 720p cuesta m\xE1s por segundo y solo est\xE1 disponible en "economy" y "pro" (Medio = 768P). Default: 480p.')
|
|
36811
37021
|
}).strict();
|
|
36812
|
-
var GetTaskStatusInput =
|
|
36813
|
-
taskId:
|
|
36814
|
-
waitSeconds:
|
|
37022
|
+
var GetTaskStatusInput = z151.object({
|
|
37023
|
+
taskId: z151.string().min(1),
|
|
37024
|
+
waitSeconds: z151.number().int().min(0).max(120).optional()
|
|
36815
37025
|
});
|
|
36816
|
-
var ListTasksInput =
|
|
36817
|
-
limit:
|
|
36818
|
-
offset:
|
|
36819
|
-
search:
|
|
37026
|
+
var ListTasksInput = z151.object({
|
|
37027
|
+
limit: z151.number().int().min(1).max(50).optional(),
|
|
37028
|
+
offset: z151.number().int().min(0).optional(),
|
|
37029
|
+
search: z151.string().optional()
|
|
36820
37030
|
});
|
|
36821
37031
|
var MCP_REVIEW_LIST_FIELD_MAX = IMAGE_WIZARD_LIST_FIELD_MAX;
|
|
36822
37032
|
var MCP_REVIEW_FEATURE_ITEM_MAX = IMAGE_FEATURE_ITEM_MAX;
|
|
36823
|
-
var EditTaskDraftInput =
|
|
36824
|
-
taskId:
|
|
36825
|
-
angleIndex:
|
|
36826
|
-
angle:
|
|
36827
|
-
angle:
|
|
36828
|
-
buyerPersona:
|
|
36829
|
-
actor:
|
|
36830
|
-
actorId:
|
|
36831
|
-
gender:
|
|
37033
|
+
var EditTaskDraftInput = z151.object({
|
|
37034
|
+
taskId: z151.string().min(1),
|
|
37035
|
+
angleIndex: z151.number().int().min(0),
|
|
37036
|
+
angle: z151.object({
|
|
37037
|
+
angle: z151.string().min(1).max(480),
|
|
37038
|
+
buyerPersona: z151.string().min(1).max(360),
|
|
37039
|
+
actor: z151.string().min(1).max(360).optional(),
|
|
37040
|
+
actorId: z151.string().trim().min(1).optional().describe("Opcional. ID de un personaje guardado (usa list_actors para verlos). Si lo env\xEDas, su foto y su voz mandan sobre la descripci\xF3n de texto."),
|
|
37041
|
+
gender: z151.enum([
|
|
36832
37042
|
"female",
|
|
36833
37043
|
"male"
|
|
36834
37044
|
]).optional(),
|
|
36835
|
-
scriptNotes:
|
|
37045
|
+
scriptNotes: z151.string().max(2e3).optional()
|
|
36836
37046
|
})
|
|
36837
37047
|
});
|
|
36838
|
-
var PendingActionPayload =
|
|
36839
|
-
|
|
36840
|
-
kind:
|
|
37048
|
+
var PendingActionPayload = z151.discriminatedUnion("kind", [
|
|
37049
|
+
z151.object({
|
|
37050
|
+
kind: z151.literal("product_reference_set_approval"),
|
|
36841
37051
|
scope: ProductReferenceScopeEnum.optional(),
|
|
36842
|
-
scopeKey:
|
|
36843
|
-
scopeSnapshotId:
|
|
36844
|
-
expectedScopeHash:
|
|
37052
|
+
scopeKey: z151.string().min(1).max(120).optional(),
|
|
37053
|
+
scopeSnapshotId: z151.string().guid().optional(),
|
|
37054
|
+
expectedScopeHash: z151.string().min(1).max(128).optional(),
|
|
36845
37055
|
decision: ProductReferenceResolutionDecisionEnum,
|
|
36846
37056
|
reason: ProductReferenceRejectionReasonEnum.optional(),
|
|
36847
|
-
affectedRefKeys:
|
|
36848
|
-
affectedPhotoNumbers:
|
|
36849
|
-
recoveryAction:
|
|
37057
|
+
affectedRefKeys: z151.array(z151.string().min(1).max(200)).min(1).optional(),
|
|
37058
|
+
affectedPhotoNumbers: z151.array(z151.number().int().positive()).min(1).optional(),
|
|
37059
|
+
recoveryAction: z151.enum([
|
|
36850
37060
|
"remove",
|
|
36851
37061
|
"replace",
|
|
36852
37062
|
"upload",
|
|
36853
37063
|
"return_to_selection"
|
|
36854
37064
|
]).optional()
|
|
36855
37065
|
}),
|
|
36856
|
-
|
|
36857
|
-
kind:
|
|
36858
|
-
selectedPhotoNumbers:
|
|
37066
|
+
z151.object({
|
|
37067
|
+
kind: z151.literal("product_reference_confirmation"),
|
|
37068
|
+
selectedPhotoNumbers: z151.array(z151.number().int().positive().max(5)).min(1).max(5).optional().describe("Opcional. N\xFAmeros visibles de las fotos que el usuario quiere conservar; las dem\xE1s se deseleccionan. Debe quedar al menos una."),
|
|
36859
37069
|
userChoice: ProductReferenceUserChoiceEnum.optional(),
|
|
36860
|
-
confirmedProductNames:
|
|
37070
|
+
confirmedProductNames: z151.array(z151.string().min(1).max(120)).min(2).max(8).optional(),
|
|
36861
37071
|
videoStructure: VideoStructureEnum.optional().describe("Opcional. Formato para reanudar el video: single_take (Un solo clip, generado completo; puede incluir cambios de plano) o multi_scene (Multiescena). El backend vuelve a validar que sea compatible con el agrupamiento confirmado."),
|
|
36862
37072
|
videoQuality: VideoQualityEnum.optional().describe("Opcional. Calidad para reanudar el video: economy (Econ\xF3mico), medium (Medio) o pro. El proveedor se elige internamente y el backend vuelve a cotizar la ruta."),
|
|
36863
|
-
useMultiSceneShowcase:
|
|
37073
|
+
useMultiSceneShowcase: z151.boolean().optional().describe("Compatibilidad con confirmaciones antiguas: si es true junto con userChoice=variants, conserva el showcase multiescena.")
|
|
36864
37074
|
}),
|
|
36865
|
-
|
|
36866
|
-
kind:
|
|
37075
|
+
z151.object({
|
|
37076
|
+
kind: z151.literal("angle_review_approval"),
|
|
36867
37077
|
// All edits are optional — empty action body just approves the
|
|
36868
37078
|
// backend-generated draft as-is. Field shapes mirror the angle-review
|
|
36869
37079
|
// request contracts in @packages/types/wizard.ts; the handler routes to
|
|
36870
37080
|
// the dedicated video/image/autopilot endpoint based on StatusResponse.kind.
|
|
36871
|
-
customAngle:
|
|
37081
|
+
customAngle: z151.string().min(1).max(480).optional(),
|
|
36872
37082
|
// Keep the shared MCP action within the strictest downstream contract:
|
|
36873
37083
|
// autopilot/image resume endpoints cap these fields at 1500 characters.
|
|
36874
|
-
painPoints:
|
|
36875
|
-
benefits:
|
|
37084
|
+
painPoints: z151.string().max(MCP_REVIEW_LIST_FIELD_MAX).optional(),
|
|
37085
|
+
benefits: z151.string().max(MCP_REVIEW_LIST_FIELD_MAX).optional(),
|
|
36876
37086
|
// Same policy as the two fields above: the strictest downstream contract
|
|
36877
37087
|
// wins. The image endpoint caps each feature at 240 while landing/video
|
|
36878
37088
|
// accept 300, and this single action routes to whichever the task is — so
|
|
36879
37089
|
// accepting 300 here turns a 250-character feature on an image task into
|
|
36880
37090
|
// an opaque HTTP 400 after the model already believed it had been saved.
|
|
36881
|
-
features:
|
|
36882
|
-
buyerPersona:
|
|
37091
|
+
features: z151.array(z151.string().min(1).max(MCP_REVIEW_FEATURE_ITEM_MAX)).max(10).optional(),
|
|
37092
|
+
buyerPersona: z151.string().min(1).max(360).optional(),
|
|
36883
37093
|
narrativeStyle: PublicNarrativeStyleEnum.optional().describe('Narrativa del video. "problem_product_cta" (Problema y Soluci\xF3n) funciona en ambos formatos \u2014 en Un solo clip abre sin producto y el producto entra por referencia en su beat. La familia storyteller ("animated_storyteller", "animated_inner_journey", "animated_object_soul", "animated_timeline") no est\xE1 disponible por ahora. "viral" (sin voz, r\xF3tulos; antes/despu\xE9s solo en Multiescena; solo 15 s, Un solo clip o Multiescena) solo est\xE1 disponible para cuentas habilitadas y tareas del motor nuevo.'),
|
|
36884
|
-
actor:
|
|
36885
|
-
actorId:
|
|
36886
|
-
creativeDirection:
|
|
36887
|
-
selectedAngleNumbers:
|
|
36888
|
-
angleEdits:
|
|
36889
|
-
angleNumber:
|
|
36890
|
-
narrativeSelection:
|
|
37094
|
+
actor: z151.string().min(1).max(360).optional().describe("Nueva descripci\xF3n del presentador. Al enviarla sin actorId, se elimina autom\xE1ticamente cualquier actor guardado previo de esos \xE1ngulos."),
|
|
37095
|
+
actorId: z151.string().max(120).nullable().optional(),
|
|
37096
|
+
creativeDirection: z151.string().max(2e3).optional(),
|
|
37097
|
+
selectedAngleNumbers: z151.array(z151.number().int().positive()).min(1).max(3).optional().describe("N\xFAmeros visibles (1-based) de los \xE1ngulos que el usuario quiere renderizar. Deben ser \xFAnicos, existir en la review y no superar el videoAngleCount autorizado."),
|
|
37098
|
+
angleEdits: z151.array(z151.object({
|
|
37099
|
+
angleNumber: z151.number().int().positive(),
|
|
37100
|
+
narrativeSelection: z151.enum([
|
|
36891
37101
|
"market",
|
|
36892
37102
|
"guided"
|
|
36893
37103
|
]).optional().describe("Elecci\xF3n expl\xEDcita: market usa el estudio disponible; guided usa la narrativa elegida para este \xE1ngulo. Si la omites y la tarea tiene un estudio de mercado listo, el \xE1ngulo sale en market; repetir la narrativeStyle que propuso la IA no cuenta como elecci\xF3n."),
|
|
36894
|
-
angle:
|
|
36895
|
-
buyerPersona:
|
|
37104
|
+
angle: z151.string().min(1).max(480).optional(),
|
|
37105
|
+
buyerPersona: z151.string().min(1).max(360).optional(),
|
|
36896
37106
|
narrativeStyle: PublicNarrativeStyleEnum.optional().describe('Narrativa del video. "problem_product_cta" (Problema y Soluci\xF3n) funciona en ambos formatos \u2014 en Un solo clip abre sin producto y el producto entra por referencia en su beat. La familia storyteller ("animated_storyteller", "animated_inner_journey", "animated_object_soul", "animated_timeline") no est\xE1 disponible por ahora. "viral" (sin voz, r\xF3tulos; antes/despu\xE9s solo en Multiescena; solo 15 s, Un solo clip o Multiescena) solo est\xE1 disponible para cuentas habilitadas y tareas del motor nuevo.'),
|
|
36897
|
-
actor:
|
|
36898
|
-
actorId:
|
|
36899
|
-
creativeDirection:
|
|
37107
|
+
actor: z151.string().min(1).max(360).optional(),
|
|
37108
|
+
actorId: z151.string().max(120).nullable().optional(),
|
|
37109
|
+
creativeDirection: z151.string().max(2e3).optional()
|
|
36900
37110
|
}).strict()).max(3).optional().describe("Ediciones independientes por n\xFAmero visible de \xE1ngulo. S\xF3lo se aceptan para \xE1ngulos incluidos en selectedAngleNumbers (o en la selecci\xF3n por defecto)."),
|
|
36901
|
-
gapDurationSeconds:
|
|
36902
|
-
|
|
36903
|
-
|
|
37111
|
+
gapDurationSeconds: z151.union([
|
|
37112
|
+
z151.literal(15),
|
|
37113
|
+
z151.literal(30)
|
|
36904
37114
|
]).optional().describe("Opcional. Solo para aceptar expl\xEDcitamente la recomendaci\xF3n gapDurationChoice del status. 30 env\xEDa el override double_30s para el \xE1ngulo recomendado; 15 u omitido conserva la duraci\xF3n cotizada.")
|
|
36905
37115
|
}),
|
|
36906
|
-
|
|
36907
|
-
kind:
|
|
36908
|
-
angleId:
|
|
36909
|
-
angleNumber:
|
|
36910
|
-
content:
|
|
36911
|
-
creativeDirection:
|
|
36912
|
-
actor:
|
|
37116
|
+
z151.object({
|
|
37117
|
+
kind: z151.literal("service_angle_approval"),
|
|
37118
|
+
angleId: z151.string().guid().optional(),
|
|
37119
|
+
angleNumber: z151.number().int().positive().optional(),
|
|
37120
|
+
content: z151.string().min(1).max(480).optional(),
|
|
37121
|
+
creativeDirection: z151.string().min(1).max(1500).optional(),
|
|
37122
|
+
actor: z151.string().min(1).max(360).optional()
|
|
36913
37123
|
}),
|
|
36914
|
-
|
|
36915
|
-
kind:
|
|
36916
|
-
voiceovers:
|
|
36917
|
-
visualDirections:
|
|
36918
|
-
voiceoversByScene:
|
|
36919
|
-
visualDirectionsByScene:
|
|
37124
|
+
z151.object({
|
|
37125
|
+
kind: z151.literal("service_script_approval"),
|
|
37126
|
+
voiceovers: z151.record(z151.string(), z151.string().min(1).max(600)).optional(),
|
|
37127
|
+
visualDirections: z151.record(z151.string(), z151.string().min(1).max(1200)).optional(),
|
|
37128
|
+
voiceoversByScene: z151.record(z151.string(), z151.string().min(1).max(600)).optional(),
|
|
37129
|
+
visualDirectionsByScene: z151.record(z151.string(), z151.string().min(1).max(1200)).optional()
|
|
36920
37130
|
})
|
|
36921
37131
|
]);
|
|
36922
|
-
var ResolvePendingActionInput =
|
|
36923
|
-
taskId:
|
|
37132
|
+
var ResolvePendingActionInput = z151.object({
|
|
37133
|
+
taskId: z151.string().min(1),
|
|
36924
37134
|
action: PendingActionPayload
|
|
36925
37135
|
}).strict();
|
|
36926
37136
|
function resolveVariantConfirmVideoTier(action) {
|
|
36927
37137
|
return action.useMultiSceneShowcase && action.userChoice === "variants" ? "standard" : void 0;
|
|
36928
37138
|
}
|
|
36929
37139
|
__name(resolveVariantConfirmVideoTier, "resolveVariantConfirmVideoTier");
|
|
36930
|
-
var StatusForResolveSchema =
|
|
37140
|
+
var StatusForResolveSchema = z151.object({
|
|
36931
37141
|
// Metadata used to select the backend resume contract. Older API responses
|
|
36932
37142
|
// may omit these fields, so the resolver keeps the generic fallback.
|
|
36933
|
-
kind:
|
|
37143
|
+
kind: z151.enum([
|
|
36934
37144
|
"autopilot",
|
|
36935
37145
|
"video",
|
|
36936
37146
|
"image",
|
|
@@ -36938,18 +37148,18 @@ var StatusForResolveSchema = z150.object({
|
|
|
36938
37148
|
"mix",
|
|
36939
37149
|
"service"
|
|
36940
37150
|
]).optional(),
|
|
36941
|
-
selectedOutputs:
|
|
37151
|
+
selectedOutputs: z151.array(z151.enum([
|
|
36942
37152
|
"landing",
|
|
36943
37153
|
"video",
|
|
36944
37154
|
"image"
|
|
36945
37155
|
])).optional(),
|
|
36946
|
-
videoAngleCount:
|
|
36947
|
-
ugcFormat:
|
|
37156
|
+
videoAngleCount: z151.number().int().min(1).max(3).optional(),
|
|
37157
|
+
ugcFormat: z151.enum([
|
|
36948
37158
|
"single_8s",
|
|
36949
37159
|
"single_15s",
|
|
36950
37160
|
"double_30s"
|
|
36951
37161
|
]).optional(),
|
|
36952
|
-
videoStyle:
|
|
37162
|
+
videoStyle: z151.enum([
|
|
36953
37163
|
"ugc",
|
|
36954
37164
|
"cartoon_3d",
|
|
36955
37165
|
"product_only",
|
|
@@ -36959,13 +37169,13 @@ var StatusForResolveSchema = z150.object({
|
|
|
36959
37169
|
videoQuality: VideoQualityEnum.optional(),
|
|
36960
37170
|
videoRouteId: VideoRouteIdEnum.optional(),
|
|
36961
37171
|
videoModel: TaskVideoModelEnum.optional(),
|
|
36962
|
-
videoTier:
|
|
37172
|
+
videoTier: z151.enum([
|
|
36963
37173
|
"legacy",
|
|
36964
37174
|
"standard",
|
|
36965
37175
|
"pro",
|
|
36966
37176
|
"single_call"
|
|
36967
37177
|
]).optional(),
|
|
36968
|
-
videoResolution:
|
|
37178
|
+
videoResolution: z151.enum([
|
|
36969
37179
|
"480p",
|
|
36970
37180
|
"720p"
|
|
36971
37181
|
]).optional(),
|
|
@@ -36973,60 +37183,60 @@ var StatusForResolveSchema = z150.object({
|
|
|
36973
37183
|
// A task created before a narrative was blocked/hidden must still parse,
|
|
36974
37184
|
// or resolve_pending_action could never approve it.
|
|
36975
37185
|
narrativeStyle: NarrativeStyle.optional(),
|
|
36976
|
-
pauseForVideoScriptReview:
|
|
36977
|
-
pendingUserAction:
|
|
36978
|
-
kind:
|
|
36979
|
-
candidateGrouping:
|
|
36980
|
-
selectedImageUrls:
|
|
36981
|
-
proposedProductNames:
|
|
37186
|
+
pauseForVideoScriptReview: z151.boolean().optional(),
|
|
37187
|
+
pendingUserAction: z151.object({
|
|
37188
|
+
kind: z151.string(),
|
|
37189
|
+
candidateGrouping: z151.string().optional(),
|
|
37190
|
+
selectedImageUrls: z151.array(z151.string()).optional(),
|
|
37191
|
+
proposedProductNames: z151.array(z151.string()).optional(),
|
|
36982
37192
|
// Adaptive reference questions are server-owned. Echo only the evidence
|
|
36983
37193
|
// identity and the choices shown by the current snapshot; never accept a
|
|
36984
37194
|
// client-supplied reference set as authorization.
|
|
36985
|
-
options:
|
|
36986
|
-
mode:
|
|
37195
|
+
options: z151.array(ProductReferenceUserChoiceEnum).max(4).optional(),
|
|
37196
|
+
mode: z151.enum([
|
|
36987
37197
|
"question",
|
|
36988
37198
|
"visual_recovery"
|
|
36989
37199
|
]).optional(),
|
|
36990
37200
|
/** Hand-mirrored from packages/types result.ts — see CLAUDE.md § MCP Server Sync. */
|
|
36991
|
-
canKeepSelection:
|
|
36992
|
-
decisionKey:
|
|
36993
|
-
questionOrdinal:
|
|
36994
|
-
questionCeiling:
|
|
36995
|
-
|
|
36996
|
-
|
|
37201
|
+
canKeepSelection: z151.boolean().optional(),
|
|
37202
|
+
decisionKey: z151.string().optional(),
|
|
37203
|
+
questionOrdinal: z151.number().int().min(1).max(5).optional(),
|
|
37204
|
+
questionCeiling: z151.union([
|
|
37205
|
+
z151.literal(3),
|
|
37206
|
+
z151.literal(5)
|
|
36997
37207
|
]).optional(),
|
|
36998
|
-
referenceEvidenceVersion:
|
|
36999
|
-
expectedEvidenceHash:
|
|
37000
|
-
question:
|
|
37001
|
-
prompt:
|
|
37002
|
-
helpText:
|
|
37003
|
-
options:
|
|
37208
|
+
referenceEvidenceVersion: z151.number().int().positive().optional(),
|
|
37209
|
+
expectedEvidenceHash: z151.string().optional(),
|
|
37210
|
+
question: z151.object({
|
|
37211
|
+
prompt: z151.string().min(1).max(240),
|
|
37212
|
+
helpText: z151.string().min(1).max(300).optional(),
|
|
37213
|
+
options: z151.array(z151.object({
|
|
37004
37214
|
value: ProductReferenceUserChoiceEnum,
|
|
37005
|
-
label:
|
|
37006
|
-
description:
|
|
37215
|
+
label: z151.string().min(1).max(120),
|
|
37216
|
+
description: z151.string().min(1).max(240).optional()
|
|
37007
37217
|
})).min(2).max(4)
|
|
37008
37218
|
}).optional(),
|
|
37009
37219
|
scope: ProductReferenceScopeEnum.optional(),
|
|
37010
|
-
scopeKey:
|
|
37011
|
-
scopeSnapshotId:
|
|
37012
|
-
scopeHash:
|
|
37013
|
-
baseReferenceSetHash:
|
|
37014
|
-
phase:
|
|
37220
|
+
scopeKey: z151.string().optional(),
|
|
37221
|
+
scopeSnapshotId: z151.string().guid().optional(),
|
|
37222
|
+
scopeHash: z151.string().optional(),
|
|
37223
|
+
baseReferenceSetHash: z151.string().optional(),
|
|
37224
|
+
phase: z151.enum([
|
|
37015
37225
|
"preparation",
|
|
37016
37226
|
"final"
|
|
37017
37227
|
]).optional(),
|
|
37018
|
-
selectedRefKeys:
|
|
37019
|
-
allowedDecisions:
|
|
37020
|
-
previews:
|
|
37021
|
-
refKey:
|
|
37228
|
+
selectedRefKeys: z151.array(z151.string().min(1).max(200)).optional(),
|
|
37229
|
+
allowedDecisions: z151.array(ProductReferenceResolutionDecisionEnum).optional(),
|
|
37230
|
+
previews: z151.array(z151.object({
|
|
37231
|
+
refKey: z151.string().min(1).max(200)
|
|
37022
37232
|
}).passthrough()).optional(),
|
|
37023
|
-
customAngleDraft:
|
|
37024
|
-
painPointsDraft:
|
|
37025
|
-
benefitsDraft:
|
|
37026
|
-
featuresDraft:
|
|
37027
|
-
angleOptions:
|
|
37028
|
-
index:
|
|
37029
|
-
angle:
|
|
37233
|
+
customAngleDraft: z151.string().optional(),
|
|
37234
|
+
painPointsDraft: z151.string().optional(),
|
|
37235
|
+
benefitsDraft: z151.string().optional(),
|
|
37236
|
+
featuresDraft: z151.array(z151.string()).optional(),
|
|
37237
|
+
angleOptions: z151.array(z151.object({
|
|
37238
|
+
index: z151.number().int().nonnegative(),
|
|
37239
|
+
angle: z151.string().min(1)
|
|
37030
37240
|
}).passthrough()).min(1).max(5).optional(),
|
|
37031
37241
|
// Recommendation consumed only when the caller explicitly sends
|
|
37032
37242
|
// gapDurationSeconds: 30 in the angle approval action.
|
|
@@ -37036,17 +37246,17 @@ var StatusForResolveSchema = z150.object({
|
|
|
37036
37246
|
// keys. `actorId` (the saved custom actor the picker stored) was silently
|
|
37037
37247
|
// dropped here, so the approval handler below could not echo it back on the
|
|
37038
37248
|
// PATCH — the selection looked accepted and reached no render.
|
|
37039
|
-
angles:
|
|
37040
|
-
id:
|
|
37041
|
-
content:
|
|
37042
|
-
creativeDirection:
|
|
37043
|
-
actor:
|
|
37044
|
-
actorId:
|
|
37249
|
+
angles: z151.array(z151.object({
|
|
37250
|
+
id: z151.string().guid(),
|
|
37251
|
+
content: z151.string(),
|
|
37252
|
+
creativeDirection: z151.string(),
|
|
37253
|
+
actor: z151.string(),
|
|
37254
|
+
actorId: z151.string().nullable().optional()
|
|
37045
37255
|
}).passthrough()).optional(),
|
|
37046
|
-
panels:
|
|
37047
|
-
beatId:
|
|
37048
|
-
voiceover:
|
|
37049
|
-
visualDirection:
|
|
37256
|
+
panels: z151.array(z151.object({
|
|
37257
|
+
beatId: z151.string(),
|
|
37258
|
+
voiceover: z151.string(),
|
|
37259
|
+
visualDirection: z151.string()
|
|
37050
37260
|
}).passthrough()).optional()
|
|
37051
37261
|
}).optional()
|
|
37052
37262
|
}).passthrough();
|
|
@@ -37403,8 +37613,8 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
|
|
|
37403
37613
|
server.registerTool("verify_landing_commerce", {
|
|
37404
37614
|
description: getProductMakerCapabilityModelGuidance("verify_landing_commerce").summary + " Verifica una correcci\xF3n manual de precios, tachados o packs de una landing editable existente. Solo relee Shopify y los recibos externos; no cambia precios, inventario, SKU ni compra una edici\xF3n. Pasa taskId y editId de la edici\xF3n ya conocida; nunca inventes IDs ni pidas repetir el cambio. Devuelve el estado can\xF3nico por proveedor: conserva el aviso pendiente hasta confirmar los valores reales. Solo despu\xE9s de confirmar todos los valores, el servidor puede volver a habilitar la compra. Web guardada no demuestra publicaci\xF3n p\xFAblica ni checkout; muestra las correcciones y enlaces pendientes sin c\xF3digos t\xE9cnicos. La disponibilidad del editor conserva sus permisos actuales.",
|
|
37405
37615
|
inputSchema: {
|
|
37406
|
-
taskId:
|
|
37407
|
-
editId:
|
|
37616
|
+
taskId: z151.string().guid(),
|
|
37617
|
+
editId: z151.string().guid()
|
|
37408
37618
|
},
|
|
37409
37619
|
annotations: OVERWRITES_EXTERNAL
|
|
37410
37620
|
}, async (input) => {
|
|
@@ -37675,16 +37885,16 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
|
|
|
37675
37885
|
if (input.search) qs.set("search", input.search);
|
|
37676
37886
|
const path3 = `/v1/tasks${qs.toString() ? "?" + qs.toString() : ""}`;
|
|
37677
37887
|
const r = await api.getJson(path3);
|
|
37678
|
-
const page =
|
|
37679
|
-
items:
|
|
37888
|
+
const page = z151.object({
|
|
37889
|
+
items: z151.array(z151.unknown())
|
|
37680
37890
|
}).passthrough().safeParse(r);
|
|
37681
37891
|
if (!page.success) return asText(r);
|
|
37682
37892
|
return asText({
|
|
37683
37893
|
...page.data,
|
|
37684
37894
|
items: page.data.items.map((item) => {
|
|
37685
|
-
const servicePage =
|
|
37686
|
-
taskId:
|
|
37687
|
-
resourceType:
|
|
37895
|
+
const servicePage = z151.object({
|
|
37896
|
+
taskId: z151.string().guid(),
|
|
37897
|
+
resourceType: z151.literal("service_page")
|
|
37688
37898
|
}).passthrough().safeParse(item);
|
|
37689
37899
|
if (!servicePage.success) return item;
|
|
37690
37900
|
return {
|
|
@@ -38174,28 +38384,28 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
|
|
|
38174
38384
|
__name(registerTaskTools, "registerTaskTools");
|
|
38175
38385
|
|
|
38176
38386
|
// src/tools/brands.ts
|
|
38177
|
-
import { z as
|
|
38387
|
+
import { z as z152 } from "zod";
|
|
38178
38388
|
var guidance2 = getProductMakerCapabilityModelGuidance("create_brand");
|
|
38179
38389
|
var BRAND_START_REPLAY_WINDOW_MS = 15 * 60 * 1e3;
|
|
38180
38390
|
var BRAND_NOTES_MAX_CHARS = 2e4;
|
|
38181
38391
|
var BRAND_AMBIGUOUS_REQUEST_RETENTION_MS = 24 * 60 * 60 * 1e3;
|
|
38182
38392
|
var BRAND_CREATION_REQUEST_LIMIT = 500;
|
|
38183
38393
|
var brandCreationRequests = /* @__PURE__ */ new Map();
|
|
38184
|
-
var CreateBrandInput =
|
|
38185
|
-
action:
|
|
38394
|
+
var CreateBrandInput = z152.object({
|
|
38395
|
+
action: z152.enum([
|
|
38186
38396
|
"start",
|
|
38187
38397
|
"status",
|
|
38188
38398
|
"list"
|
|
38189
38399
|
]).default("start").describe("start cotiza (sin confirmed) o inicia (confirmed=true) el an\xE1lisis; status consulta brandId hasta ready o failed; list muestra las marcas que el usuario ya tiene."),
|
|
38190
|
-
sourceUrl:
|
|
38191
|
-
businessNotes:
|
|
38192
|
-
language:
|
|
38400
|
+
sourceUrl: z152.string().trim().min(1).max(BRAND_SOURCE_URL_MAX_LENGTH).optional().describe("Instagram, Facebook, TikTok o web p\xFAblica del negocio, como la dio el usuario (\xAB@sanlucasbarberia\xBB, \xABinstagram.com/sanlucasbarberia\xBB, \xABmibarberia.com\xBB). Obligatorio para start."),
|
|
38401
|
+
businessNotes: z152.string().trim().max(BRAND_NOTES_MAX_CHARS).optional().describe("Opcional. Lo que el usuario cuente de su negocio en el chat (servicios y precios, WhatsApp, ciudad o zona, horarios). Se guarda como documento del negocio y llega tal cual a la marca y a su landing. Copia sus palabras; no inventes datos."),
|
|
38402
|
+
language: z152.enum([
|
|
38193
38403
|
"es",
|
|
38194
38404
|
"en",
|
|
38195
38405
|
"pt"
|
|
38196
38406
|
]).optional().describe("Idioma de la conversaci\xF3n. Solo se usa si la p\xE1gina del negocio no deja claro su idioma."),
|
|
38197
|
-
confirmed:
|
|
38198
|
-
brandId:
|
|
38407
|
+
confirmed: z152.boolean().optional().describe("Solo true despu\xE9s de mostrar el precio y que el usuario acepte. Sin confirmed, start solo cotiza y no cobra."),
|
|
38408
|
+
brandId: z152.string().guid().optional().describe("ID de la marca. Obligatorio para status; no lo inventes.")
|
|
38199
38409
|
}).strict();
|
|
38200
38410
|
function normalizeBrandSourceUrl(raw) {
|
|
38201
38411
|
const value = raw.trim();
|
|
@@ -38479,24 +38689,24 @@ __name(registerBrandTools, "registerBrandTools");
|
|
|
38479
38689
|
|
|
38480
38690
|
// src/tools/service-landing.ts
|
|
38481
38691
|
import { createHash as createHash3, randomUUID } from "crypto";
|
|
38482
|
-
import { z as
|
|
38692
|
+
import { z as z153 } from "zod";
|
|
38483
38693
|
var guidance3 = getProductMakerCapabilityModelGuidance("create_service_landing");
|
|
38484
38694
|
var SERVICE_LANDING_KEY_NAMESPACE = "6f1d8c2a-3b4e-5f60-8a7b-9c0d1e2f3a4b";
|
|
38485
38695
|
var SERVICE_LANDING_INFO_MAX_CHARS = 2e4;
|
|
38486
|
-
var CreateServiceLandingInput =
|
|
38487
|
-
action:
|
|
38696
|
+
var CreateServiceLandingInput = z153.object({
|
|
38697
|
+
action: z153.enum([
|
|
38488
38698
|
"prepare",
|
|
38489
38699
|
"build",
|
|
38490
38700
|
"status",
|
|
38491
38701
|
"publish"
|
|
38492
38702
|
]).default("prepare").describe("prepare (gratis) crea o retoma la landing de la marca y da el precio; build (pagado, confirmed=true) genera la p\xE1gina directamente con la marca y los datos guardados; status sigue el avance; publish la publica y devuelve su enlace."),
|
|
38493
|
-
brandId:
|
|
38494
|
-
servicePageId:
|
|
38495
|
-
businessInfo:
|
|
38496
|
-
confirmed:
|
|
38497
|
-
maxCredits:
|
|
38498
|
-
operationId:
|
|
38499
|
-
slug:
|
|
38703
|
+
brandId: z153.string().guid().optional().describe("ID de la marca (de create_brand). Obligatorio para prepare. Nunca un taskId de producto."),
|
|
38704
|
+
servicePageId: z153.string().guid().optional().describe("ID de la landing que devolvi\xF3 prepare. Obligatorio para build, status y publish."),
|
|
38705
|
+
businessInfo: z153.string().trim().max(SERVICE_LANDING_INFO_MAX_CHARS).optional().describe("Opcional. Lo que el usuario cont\xF3 del negocio y no estaba en su marca: servicios y precios, WhatsApp o tel\xE9fono, ciudad o zona, horarios. Copia sus palabras; no inventes datos."),
|
|
38706
|
+
confirmed: z153.boolean().optional().describe("Solo true despu\xE9s de mostrar el precio total y que el usuario acepte. Obligatorio para build."),
|
|
38707
|
+
maxCredits: z153.number().int().positive().optional().describe("El total en cr\xE9ditos que el usuario acept\xF3 (el que devolvi\xF3 prepare). Obligatorio para build: ninguna etapa se inicia si su precio supera este total."),
|
|
38708
|
+
operationId: z153.string().guid().optional().describe("Opcional en status: la operaci\xF3n que devolvi\xF3 build."),
|
|
38709
|
+
slug: z153.string().trim().toLowerCase().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).max(64).optional().describe("Opcional en publish: la direcci\xF3n corta de la p\xE1gina (ej. sanlucas-barberia). Si falta se usa la sugerida desde el nombre del negocio.")
|
|
38500
38710
|
}).strict();
|
|
38501
38711
|
function serviceKey(...parts) {
|
|
38502
38712
|
return deriveUuidV5(parts.join(":"), SERVICE_LANDING_KEY_NAMESPACE);
|
|
@@ -38875,7 +39085,7 @@ function registerServiceLandingTools(server, api) {
|
|
|
38875
39085
|
__name(registerServiceLandingTools, "registerServiceLandingTools");
|
|
38876
39086
|
|
|
38877
39087
|
// src/tools/service-images.ts
|
|
38878
|
-
import { z as
|
|
39088
|
+
import { z as z154 } from "zod";
|
|
38879
39089
|
var guidance4 = getProductMakerCapabilityModelGuidance("create_service_images");
|
|
38880
39090
|
var SERVICE_IMAGE_FORMATS = [
|
|
38881
39091
|
"4:5",
|
|
@@ -38888,19 +39098,19 @@ var LANGUAGE_TAGS = {
|
|
|
38888
39098
|
en: "en-US",
|
|
38889
39099
|
pt: "pt-BR"
|
|
38890
39100
|
};
|
|
38891
|
-
var CreateServiceImagesInput =
|
|
38892
|
-
brandId:
|
|
38893
|
-
instruction:
|
|
38894
|
-
delegateToAi:
|
|
38895
|
-
format:
|
|
38896
|
-
count:
|
|
38897
|
-
language:
|
|
39101
|
+
var CreateServiceImagesInput = z154.object({
|
|
39102
|
+
brandId: z154.string().guid().optional().describe("ID de un servicio propio y listo (de create_brand), obligatorio para cotizar y crear im\xE1genes nuevas. En un retry hist\xF3rico ya confirmado que originalmente no ten\xEDa este campo, conserva la petici\xF3n original. Nunca un taskId de producto."),
|
|
39103
|
+
instruction: z154.string().trim().max(4e3).optional().describe("Opcional. Qu\xE9 servicio o promoci\xF3n mostrar, con las palabras del usuario (ej. \xABcorte + barba a $35.000 los martes\xBB). Si se omite, la IA propone la imagen usando la informaci\xF3n del servicio."),
|
|
39104
|
+
delegateToAi: z154.boolean().optional().describe("true si el usuario prefiere que la IA elija qu\xE9 mostrar a partir de su servicio. Tambi\xE9n se delega cuando instruction est\xE1 vac\xEDo."),
|
|
39105
|
+
format: z154.enum(SERVICE_IMAGE_FORMATS).optional().describe('Formato: "4:5" (feed, por defecto), "9:16" (historias/reels) o "1:1" (cuadrado).'),
|
|
39106
|
+
count: z154.number().int().min(1).max(SERVICE_IMAGE_MAX_COUNT).optional().describe("Cu\xE1ntas im\xE1genes, de 1 a 3 (por defecto 1)."),
|
|
39107
|
+
language: z154.enum([
|
|
38898
39108
|
"es",
|
|
38899
39109
|
"en",
|
|
38900
39110
|
"pt"
|
|
38901
39111
|
]).optional().describe("Idioma de los textos de la imagen (por defecto es)."),
|
|
38902
|
-
adCopy:
|
|
38903
|
-
confirmed:
|
|
39112
|
+
adCopy: z154.boolean().optional().describe("Compatibilidad con clientes anteriores: el copy para publicar siempre est\xE1 incluido en cada imagen de servicios."),
|
|
39113
|
+
confirmed: z154.boolean().optional().describe("Solo true despu\xE9s de mostrar el precio y que el usuario acepte. Sin confirmed, solo cotiza y no cobra.")
|
|
38904
39114
|
}).strict();
|
|
38905
39115
|
function registerServiceImageTools(server, api, options = {}) {
|
|
38906
39116
|
const now = options.now ?? Date.now;
|
|
@@ -39009,7 +39219,7 @@ function registerServiceImageTools(server, api, options = {}) {
|
|
|
39009
39219
|
nextAction: "Dile al usuario que est\xE1s creando sus im\xE1genes. Llama get_task_status con este taskId (waitSeconds=45) hasta done (trae las im\xE1genes reales de ProductMaker) o error. Muestra los recursos de imagen devueltos directamente en el chat. Nunca generes ni recrees una imagen sustituta con otra herramienta. Si la vista previa falla, explica el fallo y conserva los enlaces protegidos devueltos."
|
|
39010
39220
|
});
|
|
39011
39221
|
} catch (error) {
|
|
39012
|
-
if (error instanceof
|
|
39222
|
+
if (error instanceof z154.ZodError) throw invalidInputFromZod(error);
|
|
39013
39223
|
throw translateError(error);
|
|
39014
39224
|
}
|
|
39015
39225
|
});
|
|
@@ -39017,7 +39227,7 @@ function registerServiceImageTools(server, api, options = {}) {
|
|
|
39017
39227
|
__name(registerServiceImageTools, "registerServiceImageTools");
|
|
39018
39228
|
|
|
39019
39229
|
// src/tools/creatives.ts
|
|
39020
|
-
import { z as
|
|
39230
|
+
import { z as z155 } from "zod";
|
|
39021
39231
|
var generateFreeVideoGuidance = getProductMakerCapabilityModelGuidance("generate_free_video");
|
|
39022
39232
|
var generateVideoCreativeGuidance = getProductMakerCapabilityModelGuidance("generate_video_creative");
|
|
39023
39233
|
var generateImageCreativesGuidance = getProductMakerCapabilityModelGuidance("generate_image_creatives");
|
|
@@ -39028,72 +39238,72 @@ var CreativeRefs = {
|
|
|
39028
39238
|
images: ImagesInput,
|
|
39029
39239
|
language: Lang.describe('Idioma del contenido. Ej. "es", "en", "pt". REQUERIDO \u2014 si el usuario no lo dijo, PREG\xDANTALE antes de invocar. NUNCA infieras desde el contexto del chat ni asumas un default.'),
|
|
39030
39240
|
country: Country.describe('Pa\xEDs objetivo ISO. Ej. "CO", "MX", "US", "AR". Define moneda, m\xE9todos de pago y tono. REQUERIDO \u2014 si el usuario no lo dijo, PREG\xDANTALE antes de invocar. NUNCA infieras desde el contexto del chat ni asumas un default.'),
|
|
39031
|
-
price:
|
|
39032
|
-
offer:
|
|
39033
|
-
compareAtPrice:
|
|
39034
|
-
productContext:
|
|
39035
|
-
productLabel:
|
|
39036
|
-
buyerPersona:
|
|
39037
|
-
isCombo:
|
|
39038
|
-
competitorScanEnabled:
|
|
39039
|
-
brandId:
|
|
39241
|
+
price: z155.string().min(1).max(120).optional().describe('Precio en formato libre \u2014 ej. "$89.900", "USD 29.99". Opcional pero MUY IMPACTANTE para conversi\xF3n: si el usuario no lo mencion\xF3, PREG\xDANTALE antes de invocar. Si el usuario te dice "t\xFA elige", omite el campo y la IA del backend sugiere uno.'),
|
|
39242
|
+
offer: z155.string().min(1).max(240).optional().describe('Oferta a destacar \u2014 ej. "2x1", "Env\xEDo gratis", "50% OFF". Opcional pero MUY IMPACTANTE: si el usuario no lo mencion\xF3, PREG\xDANTALE antes de invocar (es v\xE1lido que diga "sin oferta"). Si el usuario te dice "t\xFA elige", omite el campo.'),
|
|
39243
|
+
compareAtPrice: z155.string().min(1).max(120).optional().describe('Opcional. Precio anterior o de referencia para mostrar descuento. Ej. "$129.000" cuando price="$89.900".'),
|
|
39244
|
+
productContext: z155.string().max(3e3).optional().describe("Opcional. Informacion adicional del producto que la IA debe usar como contexto prioritario: uso real, comprador, restricciones, diferenciadores o direccion creativa. No reemplaza la investigacion de competencia; si hay competencia, guia el primer angulo y los outputs no deben contradecirlo."),
|
|
39245
|
+
productLabel: z155.string().trim().max(80).optional().describe('Opcional. Nombre o tipo del producto en pocas palabras (ej. "collar de oro", "quita pelusas para ropa"). Es AUTORITATIVO: la IA usa esta identidad y no la reemplaza por otra categor\xEDa. Si lo omites, la IA lo detecta desde la imagen. NO salta la extracci\xF3n.'),
|
|
39246
|
+
buyerPersona: z155.string().optional().describe('Opcional. Descripci\xF3n del comprador objetivo. Ej. "Mujeres 35-50, profesionales urbanas". Si se omite, la IA infiere desde el \xE1ngulo y producto.'),
|
|
39247
|
+
isCombo: z155.boolean().optional().describe("Opcional. Si true, el creativo presenta el producto como combo/pack. Default false."),
|
|
39248
|
+
competitorScanEnabled: z155.boolean().optional().describe("Opcional. Default false: omitirlo significa SIN estudio de mercado. Antes de crear, llama estimate_market_study_cost, muestra al usuario el costo con y sin estudio y preg\xFAntale si lo quiere; env\xEDa true solo si lo acepta (o si solicita la narrativa an\xE1lisis de mercado). En video, true analiza anuncios de la competencia y desbloquea la narrativa an\xE1lisis de mercado; si el estudio no encuentra datos suficientes, degrada al planner cl\xE1sico."),
|
|
39249
|
+
brandId: z155.string().guid().optional().describe("Opcional. ID de una marca del usuario; si se env\xEDa, el sistema usa su voz, colores y persona para enriquecer el creativo.")
|
|
39040
39250
|
};
|
|
39041
|
-
var VideoPresenter =
|
|
39042
|
-
|
|
39043
|
-
mode:
|
|
39251
|
+
var VideoPresenter = z155.discriminatedUnion("mode", [
|
|
39252
|
+
z155.object({
|
|
39253
|
+
mode: z155.literal("none")
|
|
39044
39254
|
}).strict(),
|
|
39045
|
-
|
|
39046
|
-
mode:
|
|
39047
|
-
actorId:
|
|
39255
|
+
z155.object({
|
|
39256
|
+
mode: z155.literal("saved_actor"),
|
|
39257
|
+
actorId: z155.string().trim().min(1).max(120).describe("ID devuelto por list_actors para un actor guardado del usuario.")
|
|
39048
39258
|
}).strict(),
|
|
39049
|
-
|
|
39050
|
-
mode:
|
|
39051
|
-
description:
|
|
39259
|
+
z155.object({
|
|
39260
|
+
mode: z155.literal("described"),
|
|
39261
|
+
description: z155.string().trim().min(1).max(500).describe("Descripci\xF3n concreta de la persona que presenta el producto.")
|
|
39052
39262
|
}).strict()
|
|
39053
39263
|
]);
|
|
39054
|
-
var VideoCreativeSetup =
|
|
39055
|
-
|
|
39056
|
-
mode:
|
|
39264
|
+
var VideoCreativeSetup = z155.discriminatedUnion("mode", [
|
|
39265
|
+
z155.object({
|
|
39266
|
+
mode: z155.literal("automatic").describe('S\xF3lo cuando el usuario pidi\xF3 expl\xEDcitamente "decide todo".')
|
|
39057
39267
|
}).strict(),
|
|
39058
|
-
|
|
39059
|
-
mode:
|
|
39268
|
+
z155.object({
|
|
39269
|
+
mode: z155.literal("guided"),
|
|
39060
39270
|
videoPreset: VideoPresetEnum.default("auto").describe('Narrativa opcional. Con estudio de mercado no la preguntes: se usa "auto" y el estudio define la estructura. Sin estudio conserva la elecci\xF3n del usuario. Todas las narrativas funcionan en Un solo clip y Multiescena. "viral" es un video sin voz (r\xF3tulos en pantalla; antes/despu\xE9s solo en Multiescena), solo de 15 s y solo para cuentas habilitadas; la API rechaza otras duraciones.'),
|
|
39061
|
-
buyerPersona:
|
|
39271
|
+
buyerPersona: z155.string().trim().min(1).max(360),
|
|
39062
39272
|
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.'),
|
|
39063
39273
|
presenter: VideoPresenter,
|
|
39064
|
-
creativeDirection:
|
|
39274
|
+
creativeDirection: z155.string().trim().min(1).max(500).nullable().describe("Direcci\xF3n visual elegida. null significa que el usuario deleg\xF3 expl\xEDcitamente esta decisi\xF3n.")
|
|
39065
39275
|
}).strict()
|
|
39066
39276
|
]);
|
|
39067
|
-
var VideoInput =
|
|
39277
|
+
var VideoInput = z155.object({
|
|
39068
39278
|
images: CreativeRefs.images.optional(),
|
|
39069
39279
|
winnerReference: WinnerReferenceInput.optional().describe(WINNER_IMAGE_CHOICE_GUIDANCE),
|
|
39070
|
-
title:
|
|
39071
|
-
primaryAngle:
|
|
39280
|
+
title: z155.string().min(1).describe('T\xEDtulo corto del producto. Aparece en la primera vista del video. Ej. "Crema Anti-Edad Premium".'),
|
|
39281
|
+
primaryAngle: z155.string().min(1).describe('\xC1ngulo de venta principal (frase del beneficio). Ej. "Reduce arrugas en 14 d\xEDas" o "Para quienes odian las cremas grasosas".'),
|
|
39072
39282
|
language: CreativeRefs.language,
|
|
39073
39283
|
country: CreativeRefs.country,
|
|
39074
|
-
aspectRatio:
|
|
39284
|
+
aspectRatio: z155.enum([
|
|
39075
39285
|
"9:16",
|
|
39076
39286
|
"16:9",
|
|
39077
39287
|
"Auto"
|
|
39078
39288
|
]).describe('Relaci\xF3n de aspecto. "9:16" = vertical (TikTok/Reels \u2014 default recomendado para ads). "16:9" = horizontal (YouTube). "Auto" = decide la IA.'),
|
|
39079
39289
|
generateAiEdit: AiEditRequestSchema.optional().describe('Opcional. Pide la Edici\xF3n con IA: una pasada que a\xF1ade texto, efectos y m\xFAsica sobre cada video entregado (variante with_ai_edit; se cobra al entregar, por video). Nivel: "economy" (Econ\xF3mica, Sonnet 5.5, m\xE1s barata) o "pro" (Opus 5.5, mejor calidad, ~10 min). true equivale a "pro"; false/omitido = sin edici\xF3n.'),
|
|
39080
|
-
durationSeconds:
|
|
39081
|
-
videoAngleCount:
|
|
39290
|
+
durationSeconds: z155.number().int().min(4).max(30).default(15).describe("Opcional. Duraci\xF3n objetivo: Un solo clip Econ\xF3mico o Medio usa 15s; Un solo clip Pro usa 15s o 30s; Multiescena usa 15s o 30s totales. La combinaci\xF3n de formato y calidad determina la ruta y el costo."),
|
|
39291
|
+
videoAngleCount: z155.number().int().min(1).max(3).describe("Cantidad de videos a renderizar: 1, 2 o 3. Es una decisi\xF3n de costo obligatoria: preg\xFAntala incluso cuando creativeSetup.mode=automatic."),
|
|
39082
39292
|
angleNarratives: PublicNarrativeStyleEnum.array().max(3).optional().describe('Opcional. Narrativa POR \xC1NGULO (posicional). Valores actuales: "review", "ugc_how_to", "ugc_unboxing_chaos", "problem_product_cta" (problema concreto, producto como soluci\xF3n y CTA), "product_showcase", "wearable_showcase", "cinematic", "wild_card", "animated_problem_pixar", "sassy_product_pixar", "viral" (video sin voz: r\xF3tulos en pantalla; antes/despu\xE9s solo en Multiescena; solo 15 s, Un solo clip o Multiescena, y solo para cuentas habilitadas; la API rechaza otras duraciones), "market" (narrativa an\xE1lisis de mercado: adapta el video a los patrones ganadores estudiados de la competencia; requiere competitorScanEnabled: true). angleNarratives[i] fuerza la narrativa del \xE1ngulo i; las posiciones restantes las elige la IA. La lista no puede superar videoAngleCount.'),
|
|
39083
39293
|
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."),
|
|
39084
39294
|
videoStructure: VideoStructureEnum.default("single_take").describe('Opcional. Formato: "single_take" = Un solo clip (generado completo; puede incluir cambios de plano) o "multi_scene" = Multiescena (varias tomas concatenadas). Default: single_take.'),
|
|
39085
39295
|
videoQuality: VideoQualityEnum.default("economy").describe('Opcional. Calidad: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro. El sistema elige el proveedor internamente. Default: economy.'),
|
|
39086
39296
|
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.'),
|
|
39087
|
-
features:
|
|
39297
|
+
features: z155.array(z155.string()).optional().describe('Opcional. Lista de features/beneficios clave a mencionar. Ej. ["resistente al agua", "bater\xEDa 24h", "carga inal\xE1mbrica"].'),
|
|
39088
39298
|
price: CreativeRefs.price,
|
|
39089
39299
|
offer: CreativeRefs.offer,
|
|
39090
39300
|
productContext: CreativeRefs.productContext,
|
|
39091
39301
|
productLabel: CreativeRefs.productLabel,
|
|
39092
|
-
cta:
|
|
39093
|
-
scriptNotes:
|
|
39302
|
+
cta: z155.string().optional().describe('Opcional. Call-to-action final del video. Ej. "Compra ahora", "Pide el tuyo hoy", "Link en bio". Si se omite, la IA escribe uno.'),
|
|
39303
|
+
scriptNotes: z155.string().optional().describe('Opcional. Notas/restricciones para el guion (la IA las usa al redactar). Ej. "No mencionar la marca X", "Tono divertido, no cl\xEDnico", "Mencionar 2x1". NO es el guion literal: creativeSetup.mode=guided activa siempre la revisi\xF3n palabra-por-palabra con get_video_script / approve_video_script.'),
|
|
39094
39304
|
creativeGender: CreativeGenderEnum.optional().describe('Opcional. QUI\xC9N APARECE EN PANTALLA en el video: mujer ("female"), hombre ("male") o ambos ("mixed"). NO es la voz; cuando se fija, la voz se alinea sola con el personaje. M\xE1ndalo en cuanto el usuario diga qui\xE9n debe SALIR en el video, con cualquier redacci\xF3n ("quiero una mujer", "que salga un hombre", "protagonista femenina"): si no lo mandas, el g\xE9nero lo inventa la IA y el usuario puede recibir lo contrario de lo que pidi\xF3 sin ning\xFAn aviso. NO lo mandes cuando hable del P\xDABLICO COMPRADOR ("esto es para hombres", "mi p\xFAblico son mujeres", "va dirigido a mam\xE1s"): eso es a qui\xE9n se le vende, no qui\xE9n act\xFAa, y fijarlo ah\xED pinea un protagonista que nadie pidi\xF3. "mixed" solo cuando pida expl\xEDcitamente ambos, y ten en cuenta que no garantiza una mezcla: no fija ning\xFAn g\xE9nero y cada creativo elige su protagonista. No lo preguntes como paso obligatorio. Si creativeSetup.presenter.mode="saved_actor", el personaje guardado manda sobre este campo.'),
|
|
39095
39305
|
competitorScanEnabled: CreativeRefs.competitorScanEnabled,
|
|
39096
|
-
replicateWinnerWhenFound:
|
|
39306
|
+
replicateWinnerWhenFound: z155.boolean().optional().describe("Conserva la preferencia de copiar un ganador si existe. false permite estudiar el mercado sin reemplazar un \xE1ngulo por el anuncio ganador. No a\xF1adas una pregunta obligatoria para este campo."),
|
|
39097
39307
|
brandId: CreativeRefs.brandId
|
|
39098
39308
|
}).strict();
|
|
39099
39309
|
var FreeVideoQualityEnum = VideoQualityEnum;
|
|
@@ -39111,7 +39321,7 @@ var FREE_VIDEO_DURATIONS_BY_QUALITY = {
|
|
|
39111
39321
|
length: 29
|
|
39112
39322
|
}, (_, index) => index + 2)
|
|
39113
39323
|
};
|
|
39114
|
-
var FreeVideoModelIdEnum =
|
|
39324
|
+
var FreeVideoModelIdEnum = z155.enum([
|
|
39115
39325
|
"grok-imagine-video-1-5-preview",
|
|
39116
39326
|
"minimax-h3/reference-to-video",
|
|
39117
39327
|
"wan/3-0-video",
|
|
@@ -39122,26 +39332,26 @@ var FREE_SELECTABLE_MODEL_IDS = [
|
|
|
39122
39332
|
"minimax-h3/reference-to-video",
|
|
39123
39333
|
"wan/3-0-video"
|
|
39124
39334
|
];
|
|
39125
|
-
var FreeVideoInput =
|
|
39335
|
+
var FreeVideoInput = z155.object({
|
|
39126
39336
|
images: ImagesInput.optional().describe("Opcional. 1-5 fotos del producto. Om\xEDtelo para generar desde texto puro."),
|
|
39127
|
-
rawPrompt:
|
|
39337
|
+
rawPrompt: z155.string().trim().min(1).max(2e3).describe("Prompt o guion exacto del video. Si activas subt\xEDtulos, este mismo texto se usa como guion de subt\xEDtulos."),
|
|
39128
39338
|
language: CreativeRefs.language,
|
|
39129
39339
|
quality: FreeVideoQualityEnum.describe('Calidad del video: "economy" = Econ\xF3mico, "medium" = Medio o "pro" = Pro (Wan).'),
|
|
39130
39340
|
// Retired in MCP 7.0.0 (Task 11): kept in the schema, accepted, and
|
|
39131
39341
|
// parsed ONLY so the handler can reject it with a message naming its
|
|
39132
39342
|
// replacement — dropping it silently would turn a caller's explicit
|
|
39133
39343
|
// Pro++ pick into a quiet fallback to Wan.
|
|
39134
|
-
freeProModel:
|
|
39344
|
+
freeProModel: z155.enum([
|
|
39135
39345
|
"wan",
|
|
39136
39346
|
"seedance"
|
|
39137
39347
|
]).optional().describe("ELIMINADO en MCP 7.0.0 \u2014 usa `modelId`. Enviar este campo produce un error."),
|
|
39138
39348
|
modelId: FreeVideoModelIdEnum.optional().describe('Opcional. Elige expl\xEDcitamente el modelo del registro en vez del default de la calidad: "grok-imagine-video-1-5-preview" (Grok 1.5), "minimax-h3/reference-to-video" (H3 Max) o "wan/3-0-video" (Wan 3.0). Om\xEDtelo para usar el modelo por defecto de la calidad elegida. El modelo determina la duraci\xF3n permitida (Grok 6/8/10/15s, H3 Max 4-15s, Wan 2-30s) y el precio. "bytedance/seedance-2-5" est\xE1 inactivo y se rechaza con un error claro, nunca un 500.'),
|
|
39139
|
-
durationSeconds:
|
|
39349
|
+
durationSeconds: z155.number().int().min(2).max(30).describe("Duraci\xF3n exacta. Econ\xF3mico: 6, 8, 10 o 15s; Medio: enteros de 4 a 15s; Pro Wan: 2 a 30s; Pro++ Seedance: 4 a 30s."),
|
|
39140
39350
|
videoResolution: VideoResolutionEnum.describe("Resoluci\xF3n del video: 480p o 720p."),
|
|
39141
|
-
generateAiMusic:
|
|
39351
|
+
generateAiMusic: z155.boolean().default(false).describe('Opcional. Agrega m\xFAsica instrumental IA debajo del audio nativo. Default false. Equivale a generateAiEdit (nivel "pro"): la Edici\xF3n con IA trae su propia m\xFAsica.'),
|
|
39142
39352
|
generateAiEdit: AiEditRequestSchema.optional().describe('Opcional. Pide la Edici\xF3n con IA: una pasada que a\xF1ade texto, gr\xE1ficos y m\xFAsica sobre el video ya entregado (variante with_ai_edit; se cobra al entregar). Nivel: "economy" (Econ\xF3mica, Sonnet 5.5, m\xE1s barata) o "pro" (Opus 5.5, mejor calidad, ~10 min). true equivale a "pro". Default sin edici\xF3n.'),
|
|
39143
|
-
addSubtitles:
|
|
39144
|
-
idempotencyKey:
|
|
39353
|
+
addSubtitles: z155.boolean().default(false).describe("Opcional. Quema subt\xEDtulos usando el rawPrompt exacto. Default false."),
|
|
39354
|
+
idempotencyKey: z155.string().guid().optional().describe("Opcional. Se acepta por compatibilidad pero se ignora: la identidad del reintento se deriva autom\xE1ticamente de los argumentos sem\xE1nticos, as\xED que un retry con los mismos argumentos ya es idempotente sin este campo.")
|
|
39145
39355
|
}).strict();
|
|
39146
39356
|
var imageStyleList = ImageCreativeStyleEnum.options.join(" | ");
|
|
39147
39357
|
var dropRetiredImageQuality = /* @__PURE__ */ __name((value) => {
|
|
@@ -39149,43 +39359,43 @@ var dropRetiredImageQuality = /* @__PURE__ */ __name((value) => {
|
|
|
39149
39359
|
const { imageModel: _retired, ...rest } = value;
|
|
39150
39360
|
return rest;
|
|
39151
39361
|
}, "dropRetiredImageQuality");
|
|
39152
|
-
var ImageCreativeSetupShape =
|
|
39153
|
-
|
|
39154
|
-
mode:
|
|
39362
|
+
var ImageCreativeSetupShape = z155.discriminatedUnion("mode", [
|
|
39363
|
+
z155.object({
|
|
39364
|
+
mode: z155.literal("automatic")
|
|
39155
39365
|
}).strict(),
|
|
39156
|
-
|
|
39157
|
-
mode:
|
|
39158
|
-
creativeArchetype:
|
|
39366
|
+
z155.object({
|
|
39367
|
+
mode: z155.literal("guided"),
|
|
39368
|
+
creativeArchetype: z155.union([
|
|
39159
39369
|
ImageCreativeArchetypeEnum,
|
|
39160
|
-
|
|
39370
|
+
z155.literal("ai_decides")
|
|
39161
39371
|
]),
|
|
39162
|
-
visualTreatment:
|
|
39372
|
+
visualTreatment: z155.union([
|
|
39163
39373
|
ImageCreativeVisualTreatmentEnum,
|
|
39164
|
-
|
|
39374
|
+
z155.literal("ai_decides")
|
|
39165
39375
|
]),
|
|
39166
39376
|
aspectRatio: ImageCreativeAspectRatioEnum,
|
|
39167
|
-
nVariants:
|
|
39168
|
-
|
|
39169
|
-
|
|
39170
|
-
|
|
39171
|
-
|
|
39172
|
-
|
|
39377
|
+
nVariants: z155.union([
|
|
39378
|
+
z155.literal(1),
|
|
39379
|
+
z155.literal(2),
|
|
39380
|
+
z155.literal(3),
|
|
39381
|
+
z155.literal(4),
|
|
39382
|
+
z155.literal(6)
|
|
39173
39383
|
]),
|
|
39174
|
-
styleMix:
|
|
39175
|
-
generateAdCopy:
|
|
39176
|
-
competitorScanEnabled:
|
|
39177
|
-
productContext:
|
|
39178
|
-
creativeDirection:
|
|
39179
|
-
brandColors:
|
|
39180
|
-
headline:
|
|
39181
|
-
subheadline:
|
|
39384
|
+
styleMix: z155.boolean().nullable().describe("Decisi\xF3n s\xF3lo para 2\u20134 variantes. Usa null para 1 o 6, cuando la UI no hace esta pregunta."),
|
|
39385
|
+
generateAdCopy: z155.boolean(),
|
|
39386
|
+
competitorScanEnabled: z155.boolean(),
|
|
39387
|
+
productContext: z155.string().trim().min(1).max(3e3).nullable(),
|
|
39388
|
+
creativeDirection: z155.string().trim().min(1).max(500).nullable(),
|
|
39389
|
+
brandColors: z155.string().trim().min(1).max(240).nullable().describe('Colores en lenguaje natural, igual que en el chat web. Ej. "Azul y Dorado". null significa sin colores espec\xEDficos.'),
|
|
39390
|
+
headline: z155.string().trim().min(1).max(120).nullable(),
|
|
39391
|
+
subheadline: z155.string().trim().min(1).max(160).nullable()
|
|
39182
39392
|
}).strict()
|
|
39183
39393
|
]).superRefine((setup, context) => {
|
|
39184
39394
|
if (setup.mode !== "guided") return;
|
|
39185
39395
|
const needsStyleMix = setup.nVariants >= 2 && setup.nVariants <= 4;
|
|
39186
39396
|
if (needsStyleMix && setup.styleMix === null) {
|
|
39187
39397
|
context.addIssue({
|
|
39188
|
-
code:
|
|
39398
|
+
code: z155.ZodIssueCode.custom,
|
|
39189
39399
|
path: [
|
|
39190
39400
|
"styleMix"
|
|
39191
39401
|
],
|
|
@@ -39194,7 +39404,7 @@ var ImageCreativeSetupShape = z154.discriminatedUnion("mode", [
|
|
|
39194
39404
|
}
|
|
39195
39405
|
if (!needsStyleMix && setup.styleMix !== null) {
|
|
39196
39406
|
context.addIssue({
|
|
39197
|
-
code:
|
|
39407
|
+
code: z155.ZodIssueCode.custom,
|
|
39198
39408
|
path: [
|
|
39199
39409
|
"styleMix"
|
|
39200
39410
|
],
|
|
@@ -39202,57 +39412,57 @@ var ImageCreativeSetupShape = z154.discriminatedUnion("mode", [
|
|
|
39202
39412
|
});
|
|
39203
39413
|
}
|
|
39204
39414
|
});
|
|
39205
|
-
var ImageCreativeSetup =
|
|
39206
|
-
var LandingCreativeSetup =
|
|
39207
|
-
|
|
39208
|
-
mode:
|
|
39415
|
+
var ImageCreativeSetup = z155.preprocess(dropRetiredImageQuality, ImageCreativeSetupShape);
|
|
39416
|
+
var LandingCreativeSetup = z155.discriminatedUnion("mode", [
|
|
39417
|
+
z155.object({
|
|
39418
|
+
mode: z155.literal("automatic")
|
|
39209
39419
|
}).strict(),
|
|
39210
|
-
|
|
39211
|
-
mode:
|
|
39420
|
+
z155.object({
|
|
39421
|
+
mode: z155.literal("guided"),
|
|
39212
39422
|
landingStrategy: LandingStrategyEnum,
|
|
39213
39423
|
landingImageFormat: LandingImageFormatEnum,
|
|
39214
|
-
competitorScanEnabled:
|
|
39215
|
-
paymentMethods:
|
|
39216
|
-
productContext:
|
|
39217
|
-
creativeDirection:
|
|
39218
|
-
headline:
|
|
39219
|
-
subheadline:
|
|
39424
|
+
competitorScanEnabled: z155.boolean(),
|
|
39425
|
+
paymentMethods: z155.string().trim().min(1).max(240).nullable(),
|
|
39426
|
+
productContext: z155.string().trim().min(1).max(3e3).nullable(),
|
|
39427
|
+
creativeDirection: z155.string().trim().min(1).max(500).nullable(),
|
|
39428
|
+
headline: z155.string().trim().min(1).max(120).nullable(),
|
|
39429
|
+
subheadline: z155.string().trim().min(1).max(160).nullable()
|
|
39220
39430
|
}).strict()
|
|
39221
39431
|
]);
|
|
39222
|
-
var ImageInput =
|
|
39432
|
+
var ImageInput = z155.object({
|
|
39223
39433
|
images: CreativeRefs.images.optional(),
|
|
39224
39434
|
winnerReference: WinnerReferenceInput.optional().describe(WINNER_IMAGE_CHOICE_GUIDANCE),
|
|
39225
|
-
productTitle:
|
|
39226
|
-
primaryAngle:
|
|
39435
|
+
productTitle: z155.string().min(1).describe('Nombre del producto. Ej. "Crema Anti-Edad Premium".'),
|
|
39436
|
+
primaryAngle: z155.string().min(1).optional().describe('Opcional. \xC1ngulo de venta principal. Si se omite, ProductMaker lo genera y creativeSetup.mode="guided" lo muestra para revisi\xF3n antes de crear las im\xE1genes.'),
|
|
39227
39437
|
buyerPersona: CreativeRefs.buyerPersona,
|
|
39228
39438
|
language: CreativeRefs.language,
|
|
39229
39439
|
country: CreativeRefs.country,
|
|
39230
39440
|
creativeSetup: ImageCreativeSetup.describe("Configuraci\xF3n obligatoria equivalente al wizard web. Usa guided salvo que el usuario delegue expl\xEDcitamente todo; presenta las decisiones guiadas en un \xFAnico checklist compacto."),
|
|
39231
39441
|
imageStyle: ImageCreativeStyleEnum.optional().describe(`Opcional. Estilo del shot del producto. Valores: ${imageStyleList}. Si se omite, la IA escoge seg\xFAn el archetype.`),
|
|
39232
|
-
features:
|
|
39442
|
+
features: z155.array(z155.string()).optional().describe('Opcional. Features/beneficios a destacar visualmente. Ej. ["resistente al agua", "ultra liviano"].'),
|
|
39233
39443
|
price: CreativeRefs.price,
|
|
39234
|
-
omitPrice:
|
|
39444
|
+
omitPrice: z155.boolean().optional().describe("Pon true \xFAnicamente cuando el usuario pida expl\xEDcitamente una imagen sin precio. Evita que el backend reutilice un precio extra\xEDdo del producto. No lo combines con price ni compareAtPrice."),
|
|
39235
39445
|
compareAtPrice: CreativeRefs.compareAtPrice,
|
|
39236
39446
|
offer: CreativeRefs.offer,
|
|
39237
39447
|
productLabel: CreativeRefs.productLabel,
|
|
39238
39448
|
isCombo: CreativeRefs.isCombo,
|
|
39239
39449
|
brandId: CreativeRefs.brandId
|
|
39240
39450
|
});
|
|
39241
|
-
var EditImageCreativeInput =
|
|
39242
|
-
taskId:
|
|
39243
|
-
variantIndex:
|
|
39244
|
-
clientRequestId:
|
|
39245
|
-
instruction:
|
|
39451
|
+
var EditImageCreativeInput = z155.object({
|
|
39452
|
+
taskId: z155.string().guid().describe("ID de la tarea de imagen ya finalizada."),
|
|
39453
|
+
variantIndex: z155.number().int().min(0).max(10).describe("\xCDndice de la variante a corregir (0 = primera imagen)."),
|
|
39454
|
+
clientRequestId: z155.string().min(1).max(160).optional().describe("Identidad estable de esta correcci\xF3n; reutil\xEDzala al reconciliar una respuesta perdida, no para otra instrucci\xF3n."),
|
|
39455
|
+
instruction: z155.string().min(1).max(1e3).describe('Qu\xE9 cambiar en esa imagen. Ej. "quita el badge de env\xEDo gratis", "cambia el fondo a blanco".')
|
|
39246
39456
|
});
|
|
39247
|
-
var LandingInput =
|
|
39248
|
-
includeInitialLandingGif:
|
|
39457
|
+
var LandingInput = z155.object({
|
|
39458
|
+
includeInitialLandingGif: z155.boolean().optional().describe("Opcional. En nuevas landings cl\xE1sicas habilitadas, omitirlo incluye el primer GIF del producto y su coste en el total. Env\xEDa false si el usuario lo excluye: no se genera ni se reserva su coste. Conserva la elecci\xF3n al confirmar y al reintentar."),
|
|
39249
39459
|
images: CreativeRefs.images.optional(),
|
|
39250
39460
|
winnerReference: WinnerReferenceInput.optional().describe(WINNER_IMAGE_CHOICE_GUIDANCE),
|
|
39251
39461
|
language: CreativeRefs.language,
|
|
39252
39462
|
country: CreativeRefs.country,
|
|
39253
39463
|
landingMode: LandingModeSchema.default("classic").describe('Opcional. Tipo de landing: "classic" (landing cl\xE1sica de im\xE1genes, por defecto) o "code" (landing de c\xF3digo editable: HTML real con el editor por chat, se edita luego con quote_code_landing_edit / edit_code_landing). Preg\xFAntalo en el checklist si el usuario no lo dijo. Con "code", landingStrategy y landingImageFormat no aplican y se ignoran.'),
|
|
39254
39464
|
creativeSetup: LandingCreativeSetup.describe('Configuraci\xF3n obligatoria equivalente al wizard web. Con landingMode="code" env\xEDa igualmente los campos de guided; estrategia y formato se ignoran.'),
|
|
39255
|
-
salesAngle:
|
|
39465
|
+
salesAngle: z155.string().optional().describe('Opcional. \xC1ngulo de venta principal. Ej. "Reduce arrugas en 14 d\xEDas". Si se omite, la IA lo deduce de la imagen.'),
|
|
39256
39466
|
buyerPersona: CreativeRefs.buyerPersona,
|
|
39257
39467
|
price: CreativeRefs.price,
|
|
39258
39468
|
compareAtPrice: CreativeRefs.compareAtPrice,
|
|
@@ -39537,8 +39747,8 @@ function registerCreativeTools(server, api, { transport = "http", proxyBaseUrl =
|
|
|
39537
39747
|
server.registerTool("get_image_edit_status", {
|
|
39538
39748
|
description: imageEditStatusGuidance.summary,
|
|
39539
39749
|
inputSchema: {
|
|
39540
|
-
taskId:
|
|
39541
|
-
operationId:
|
|
39750
|
+
taskId: z155.string().guid(),
|
|
39751
|
+
operationId: z155.string().guid()
|
|
39542
39752
|
},
|
|
39543
39753
|
annotations: READS_INTERNAL,
|
|
39544
39754
|
_meta: taskResultsToolMeta()
|
|
@@ -39638,10 +39848,10 @@ function registerCreativeTools(server, api, { transport = "http", proxyBaseUrl =
|
|
|
39638
39848
|
__name(registerCreativeTools, "registerCreativeTools");
|
|
39639
39849
|
|
|
39640
39850
|
// src/tools/creative-variants.ts
|
|
39641
|
-
import { z as
|
|
39851
|
+
import { z as z156 } from "zod";
|
|
39642
39852
|
var estimateCreativeVariantGuidance = getProductMakerCapabilityModelGuidance("estimate_creative_variant");
|
|
39643
39853
|
var createCreativeVariantGuidance = getProductMakerCapabilityModelGuidance("create_creative_variant");
|
|
39644
|
-
var LandingSectionKeyEnum =
|
|
39854
|
+
var LandingSectionKeyEnum = z156.enum([
|
|
39645
39855
|
"problem_hook",
|
|
39646
39856
|
"problem_cost",
|
|
39647
39857
|
"solution_mechanism",
|
|
@@ -39681,24 +39891,24 @@ var LandingSectionKeyEnum = z155.enum([
|
|
|
39681
39891
|
"lifestyle_fit",
|
|
39682
39892
|
"join_lifestyle"
|
|
39683
39893
|
]);
|
|
39684
|
-
var CreativeVariantKindEnum =
|
|
39894
|
+
var CreativeVariantKindEnum = z156.enum([
|
|
39685
39895
|
"video",
|
|
39686
39896
|
"image",
|
|
39687
39897
|
"landing"
|
|
39688
39898
|
]);
|
|
39689
|
-
var EstimateCreativeVariantInputBase =
|
|
39690
|
-
sourceTaskId:
|
|
39899
|
+
var EstimateCreativeVariantInputBase = z156.object({
|
|
39900
|
+
sourceTaskId: z156.string().guid().describe("ID de la tarea original completada."),
|
|
39691
39901
|
kind: CreativeVariantKindEnum,
|
|
39692
39902
|
videoPreset: TaskCreativeVariantVideoPresetEnum.optional().describe("Opcional para video. Solo cambia el preset p\xFAblico; el servidor conserva el modelo/tier del task origen."),
|
|
39693
39903
|
videoResolution: VideoResolutionEnum.optional().describe("Opcional para video. Resoluci\xF3n del nuevo render."),
|
|
39694
|
-
nVariants:
|
|
39904
|
+
nVariants: z156.number().int().min(1).max(3).optional().describe("Opcional para imagen. N\xFAmero de im\xE1genes adicionales (1-3)."),
|
|
39695
39905
|
sectionKey: LandingSectionKeyEnum.optional().describe("Opcional para landing. Si ya conoces la secci\xF3n, evita cotizar la clasificaci\xF3n con IA."),
|
|
39696
|
-
instructions:
|
|
39906
|
+
instructions: z156.string().trim().min(1).max(2e3).optional().describe("Opcional para landing. Si se env\xEDa sin sectionKey, el estimado suma la clasificaci\xF3n pagada con IA.")
|
|
39697
39907
|
}).strict();
|
|
39698
39908
|
var EstimateCreativeVariantInput = EstimateCreativeVariantInputBase.superRefine((input, ctx) => {
|
|
39699
39909
|
if (input.kind === "video" && input.nVariants !== void 0) {
|
|
39700
39910
|
ctx.addIssue({
|
|
39701
|
-
code:
|
|
39911
|
+
code: z156.ZodIssueCode.custom,
|
|
39702
39912
|
path: [
|
|
39703
39913
|
"nVariants"
|
|
39704
39914
|
],
|
|
@@ -39708,7 +39918,7 @@ var EstimateCreativeVariantInput = EstimateCreativeVariantInputBase.superRefine(
|
|
|
39708
39918
|
if (input.kind !== "video") {
|
|
39709
39919
|
if (input.videoPreset !== void 0) {
|
|
39710
39920
|
ctx.addIssue({
|
|
39711
|
-
code:
|
|
39921
|
+
code: z156.ZodIssueCode.custom,
|
|
39712
39922
|
path: [
|
|
39713
39923
|
"videoPreset"
|
|
39714
39924
|
],
|
|
@@ -39717,7 +39927,7 @@ var EstimateCreativeVariantInput = EstimateCreativeVariantInputBase.superRefine(
|
|
|
39717
39927
|
}
|
|
39718
39928
|
if (input.videoResolution !== void 0) {
|
|
39719
39929
|
ctx.addIssue({
|
|
39720
|
-
code:
|
|
39930
|
+
code: z156.ZodIssueCode.custom,
|
|
39721
39931
|
path: [
|
|
39722
39932
|
"videoResolution"
|
|
39723
39933
|
],
|
|
@@ -39727,7 +39937,7 @@ var EstimateCreativeVariantInput = EstimateCreativeVariantInputBase.superRefine(
|
|
|
39727
39937
|
}
|
|
39728
39938
|
if (input.kind !== "image" && input.nVariants !== void 0) {
|
|
39729
39939
|
ctx.addIssue({
|
|
39730
|
-
code:
|
|
39940
|
+
code: z156.ZodIssueCode.custom,
|
|
39731
39941
|
path: [
|
|
39732
39942
|
"nVariants"
|
|
39733
39943
|
],
|
|
@@ -39737,7 +39947,7 @@ var EstimateCreativeVariantInput = EstimateCreativeVariantInputBase.superRefine(
|
|
|
39737
39947
|
if (input.kind !== "landing") {
|
|
39738
39948
|
if (input.sectionKey !== void 0) {
|
|
39739
39949
|
ctx.addIssue({
|
|
39740
|
-
code:
|
|
39950
|
+
code: z156.ZodIssueCode.custom,
|
|
39741
39951
|
path: [
|
|
39742
39952
|
"sectionKey"
|
|
39743
39953
|
],
|
|
@@ -39746,7 +39956,7 @@ var EstimateCreativeVariantInput = EstimateCreativeVariantInputBase.superRefine(
|
|
|
39746
39956
|
}
|
|
39747
39957
|
if (input.instructions !== void 0) {
|
|
39748
39958
|
ctx.addIssue({
|
|
39749
|
-
code:
|
|
39959
|
+
code: z156.ZodIssueCode.custom,
|
|
39750
39960
|
path: [
|
|
39751
39961
|
"instructions"
|
|
39752
39962
|
],
|
|
@@ -39755,31 +39965,31 @@ var EstimateCreativeVariantInput = EstimateCreativeVariantInputBase.superRefine(
|
|
|
39755
39965
|
}
|
|
39756
39966
|
}
|
|
39757
39967
|
});
|
|
39758
|
-
var CreateCreativeVariantInputBase =
|
|
39759
|
-
sourceTaskId:
|
|
39968
|
+
var CreateCreativeVariantInputBase = z156.object({
|
|
39969
|
+
sourceTaskId: z156.string().guid().describe("ID de la tarea original completada."),
|
|
39760
39970
|
kind: CreativeVariantKindEnum,
|
|
39761
|
-
confirm:
|
|
39762
|
-
clientRequestId:
|
|
39763
|
-
angle:
|
|
39764
|
-
buyerPersona:
|
|
39765
|
-
scriptNotes:
|
|
39766
|
-
creativeDirection:
|
|
39971
|
+
confirm: z156.literal(true).describe("Confirmaci\xF3n expl\xEDcita del usuario despu\xE9s de mostrarle el estimado de cr\xE9ditos."),
|
|
39972
|
+
clientRequestId: z156.string().guid().describe("UUID estable para esta intenci\xF3n (obligatorio por compatibilidad de contrato; el servidor deriva la identidad real del request desde los argumentos sem\xE1nticos, as\xED que un UUID nuevo en un retry NO crea una variante duplicada). Si la API devuelve status=error, una nueva generaci\xF3n exige otra confirmaci\xF3n."),
|
|
39973
|
+
angle: z156.string().trim().min(1).max(500).optional().describe("\xC1ngulo nuevo para video o imagen."),
|
|
39974
|
+
buyerPersona: z156.string().trim().min(1).max(360).optional().describe("Buyer persona coherente con el \xE1ngulo."),
|
|
39975
|
+
scriptNotes: z156.string().trim().min(1).max(2e3).optional().describe("Direcci\xF3n breve del guion para una variante de video."),
|
|
39976
|
+
creativeDirection: z156.string().trim().min(1).max(2e3).optional().describe("Direcci\xF3n creativa para una variante de imagen."),
|
|
39767
39977
|
videoPreset: TaskCreativeVariantVideoPresetEnum.optional().describe("Opcional para video. Preset p\xFAblico; el servidor resuelve modelo/tier desde el task origen."),
|
|
39768
39978
|
videoResolution: VideoResolutionEnum.optional().describe("Opcional para video."),
|
|
39769
|
-
generateAiMusic:
|
|
39770
|
-
nVariants:
|
|
39979
|
+
generateAiMusic: z156.boolean().optional().describe("Opcional para video."),
|
|
39980
|
+
nVariants: z156.number().int().min(1).max(3).optional().describe("Opcional para imagen. N\xFAmero de im\xE1genes adicionales (1-3)."),
|
|
39771
39981
|
imageStyle: ImageCreativeStyleEnum.optional().describe("Opcional para imagen."),
|
|
39772
39982
|
creativeArchetype: ImageCreativeArchetypeEnum.optional().describe("Opcional para imagen."),
|
|
39773
39983
|
visualTreatment: ImageCreativeVisualTreatmentEnum.optional().describe("Opcional para imagen."),
|
|
39774
39984
|
aspectRatio: ImageCreativeAspectRatioEnum.optional().describe("Opcional para imagen."),
|
|
39775
|
-
styleMix:
|
|
39985
|
+
styleMix: z156.boolean().optional().describe("Opcional para imagen."),
|
|
39776
39986
|
sectionKey: LandingSectionKeyEnum.optional().describe("Opcional para landing. Si se omite, se clasifica con IA a partir de instructions."),
|
|
39777
|
-
instructions:
|
|
39987
|
+
instructions: z156.string().trim().min(1).max(2e3).optional().describe("Solicitud libre para una nueva secci\xF3n de landing. La IA la clasifica si no env\xEDas sectionKey.")
|
|
39778
39988
|
}).strict();
|
|
39779
39989
|
var CreateCreativeVariantInput = CreateCreativeVariantInputBase.superRefine((input, ctx) => {
|
|
39780
39990
|
if ((input.kind === "video" || input.kind === "image") && !input.angle) {
|
|
39781
39991
|
ctx.addIssue({
|
|
39782
|
-
code:
|
|
39992
|
+
code: z156.ZodIssueCode.custom,
|
|
39783
39993
|
path: [
|
|
39784
39994
|
"angle"
|
|
39785
39995
|
],
|
|
@@ -39788,7 +39998,7 @@ var CreateCreativeVariantInput = CreateCreativeVariantInputBase.superRefine((inp
|
|
|
39788
39998
|
}
|
|
39789
39999
|
if (input.kind === "landing" && !input.sectionKey && !input.instructions) {
|
|
39790
40000
|
ctx.addIssue({
|
|
39791
|
-
code:
|
|
40001
|
+
code: z156.ZodIssueCode.custom,
|
|
39792
40002
|
path: [
|
|
39793
40003
|
"instructions"
|
|
39794
40004
|
],
|
|
@@ -39834,7 +40044,7 @@ var CreateCreativeVariantInput = CreateCreativeVariantInputBase.superRefine((inp
|
|
|
39834
40044
|
for (const field of fieldsByKind[input.kind]) {
|
|
39835
40045
|
if (input[field] !== void 0) {
|
|
39836
40046
|
ctx.addIssue({
|
|
39837
|
-
code:
|
|
40047
|
+
code: z156.ZodIssueCode.custom,
|
|
39838
40048
|
path: [
|
|
39839
40049
|
field
|
|
39840
40050
|
],
|
|
@@ -40061,38 +40271,38 @@ Costo m\xE1ximo: ${maximumCredits} cr\xE9ditos.`);
|
|
|
40061
40271
|
__name(registerLandingImageEditTools, "registerLandingImageEditTools");
|
|
40062
40272
|
|
|
40063
40273
|
// src/tools/code-landing-edits.ts
|
|
40064
|
-
import { z as
|
|
40274
|
+
import { z as z157 } from "zod";
|
|
40065
40275
|
var quoteGuidance2 = getProductMakerCapabilityModelGuidance("quote_code_landing_edit");
|
|
40066
40276
|
var editGuidance2 = getProductMakerCapabilityModelGuidance("edit_code_landing");
|
|
40067
40277
|
var statusGuidance2 = getProductMakerCapabilityModelGuidance("get_code_landing_edit_status");
|
|
40068
40278
|
var undoGuidance = getProductMakerCapabilityModelGuidance("undo_code_landing_edit");
|
|
40069
40279
|
var EDIT_SCOPE = "patch";
|
|
40070
40280
|
var CODE_LANDING_EDIT_KEY_NAMESPACE = "6f0c5a2e-3b1d-5c7e-9a4f-2d8b1e6c0a93";
|
|
40071
|
-
var TaskId =
|
|
40072
|
-
var EditMessage =
|
|
40073
|
-
var QuoteCodeLandingEditInput =
|
|
40281
|
+
var TaskId = z157.string().guid().describe("ID de la tarea due\xF1a de la landing de c\xF3digo.");
|
|
40282
|
+
var EditMessage = z157.string().trim().min(3).max(2e3).describe('Instrucci\xF3n literal de la persona, sin agregar condiciones. Ej. "cambia el t\xEDtulo por Env\xEDo gratis hoy".');
|
|
40283
|
+
var QuoteCodeLandingEditInput = z157.object({
|
|
40074
40284
|
taskId: TaskId,
|
|
40075
40285
|
message: EditMessage
|
|
40076
40286
|
}).strict();
|
|
40077
|
-
var EditCodeLandingInput =
|
|
40287
|
+
var EditCodeLandingInput = z157.object({
|
|
40078
40288
|
taskId: TaskId,
|
|
40079
40289
|
message: EditMessage.describe("El MISMO texto cotizado en quote_code_landing_edit, sin cambios: la cotizaci\xF3n est\xE1 atada a ese texto."),
|
|
40080
|
-
quoteId:
|
|
40081
|
-
expectedRevision:
|
|
40290
|
+
quoteId: z157.string().guid().describe("quoteId devuelto por quote_code_landing_edit y aceptado."),
|
|
40291
|
+
expectedRevision: z157.number().int().nonnegative().describe("expectedRevision devuelto por la misma cotizaci\xF3n. Nunca lo inventes.")
|
|
40082
40292
|
}).strict();
|
|
40083
|
-
var GetCodeLandingEditStatusInput =
|
|
40293
|
+
var GetCodeLandingEditStatusInput = z157.object({
|
|
40084
40294
|
taskId: TaskId,
|
|
40085
|
-
editId:
|
|
40295
|
+
editId: z157.string().guid().optional().describe("Opcional. editId devuelto por edit_code_landing. Si se omite, devuelve la edici\xF3n m\xE1s reciente.")
|
|
40086
40296
|
}).strict();
|
|
40087
|
-
var UndoCodeLandingEditInput =
|
|
40297
|
+
var UndoCodeLandingEditInput = z157.object({
|
|
40088
40298
|
taskId: TaskId
|
|
40089
40299
|
}).strict();
|
|
40090
|
-
var RevisionFence =
|
|
40091
|
-
activeRevision:
|
|
40092
|
-
undoRevision:
|
|
40093
|
-
redoRevision:
|
|
40094
|
-
current:
|
|
40095
|
-
activeRevision:
|
|
40300
|
+
var RevisionFence = z157.object({
|
|
40301
|
+
activeRevision: z157.number().int().nonnegative(),
|
|
40302
|
+
undoRevision: z157.number().int().positive().nullable(),
|
|
40303
|
+
redoRevision: z157.number().int().positive().nullable(),
|
|
40304
|
+
current: z157.object({
|
|
40305
|
+
activeRevision: z157.number().int().positive()
|
|
40096
40306
|
}).nullable()
|
|
40097
40307
|
});
|
|
40098
40308
|
function centsToCredits3(cents) {
|
|
@@ -40271,13 +40481,13 @@ Costo: el de la cotizaci\xF3n aceptada (se cobra lo usado, nunca m\xE1s del m\xE
|
|
|
40271
40481
|
__name(registerCodeLandingEditTools, "registerCodeLandingEditTools");
|
|
40272
40482
|
|
|
40273
40483
|
// src/tools/script-review.ts
|
|
40274
|
-
import { z as
|
|
40484
|
+
import { z as z158 } from "zod";
|
|
40275
40485
|
var getVideoScriptGuidance = getProductMakerCapabilityModelGuidance("get_video_script");
|
|
40276
40486
|
var regenerateVideoScriptGuidance = getProductMakerCapabilityModelGuidance("regenerate_video_script");
|
|
40277
40487
|
var approveVideoScriptGuidance = getProductMakerCapabilityModelGuidance("approve_video_script");
|
|
40278
|
-
var GetVideoScriptInput =
|
|
40279
|
-
taskId:
|
|
40280
|
-
angleKey:
|
|
40488
|
+
var GetVideoScriptInput = z158.object({
|
|
40489
|
+
taskId: z158.string().min(1).describe("ID de la tarea (la misma que devolvi\xF3 create_product_task / generate_video_creative)."),
|
|
40490
|
+
angleKey: z158.string().min(1).optional().describe('Clave persistida del \xE1ngulo cuyo guion se quiere leer (formato "angle_0", "angle_1", ...). Usa exactamente el angleKey recibido en reviewNextAction.calls al aprobar \xE1ngulos, incluso si s\xF3lo elegiste uno. Si se omite, el backend resuelve a "angle_0" literal; elegir el segundo candidato no crea angle_0. No derives esta clave del n\xFAmero visible del candidato.')
|
|
40281
40491
|
}).strict();
|
|
40282
40492
|
var ApproveVideoScriptInput = ApproveVideoScriptCapabilityRequest;
|
|
40283
40493
|
var RegenerateVideoScriptInput = RegenerateVideoScriptCapabilityRequest.extend({
|
|
@@ -40383,7 +40593,7 @@ Consulta get_task_status con esta tarea antes de reintentar. Si la tarea termin\
|
|
|
40383
40593
|
__name(registerScriptReviewTools, "registerScriptReviewTools");
|
|
40384
40594
|
|
|
40385
40595
|
// src/tools/connections.ts
|
|
40386
|
-
import { z as
|
|
40596
|
+
import { z as z159 } from "zod";
|
|
40387
40597
|
var listShopifyShopsGuidance = getProductMakerCapabilityModelGuidance("list_shopify_shops");
|
|
40388
40598
|
var listShopifyProductsGuidance = getProductMakerCapabilityModelGuidance("list_shopify_products");
|
|
40389
40599
|
var listShopifyLandingPixelsGuidance = getProductMakerCapabilityModelGuidance("list_shopify_landing_pixels");
|
|
@@ -40394,7 +40604,7 @@ var listStoreOrdersGuidance = getProductMakerCapabilityModelGuidance("list_store
|
|
|
40394
40604
|
function registerConnectionTools(server, api) {
|
|
40395
40605
|
server.registerTool("list_shopify_shops", {
|
|
40396
40606
|
description: listShopifyShopsGuidance.summary + " Si la lista est\xE1 vac\xEDa, dile al usuario que conecte una tienda en productmaker.app/integrations antes de intentar publicar.",
|
|
40397
|
-
inputSchema:
|
|
40607
|
+
inputSchema: z159.object({}).shape,
|
|
40398
40608
|
annotations: READS_INTERNAL
|
|
40399
40609
|
}, async () => {
|
|
40400
40610
|
try {
|
|
@@ -40406,12 +40616,12 @@ function registerConnectionTools(server, api) {
|
|
|
40406
40616
|
});
|
|
40407
40617
|
server.registerTool("list_shopify_products", {
|
|
40408
40618
|
description: listShopifyProductsGuidance.summary + ' Usa el `id` devuelto junto con `publicationMode="existing"` en `publish_to_shopify`. Con `taskId` puedes ver el producto publicado actualmente. Antes de pedir confirmaci\xF3n para publicar, vuelve a llamar con `taskId` y el `publicationMode` elegido (`auto`, `new` o `existing` con `targetProductId`). Si tambi\xE9n pasas `query`, devuelve el cat\xE1logo junto al chequeo. Si devuelve `warning`, muestra su `message` y `settingsUrl`; el aviso permite continuar. No modifica Shopify.',
|
|
40409
|
-
inputSchema:
|
|
40410
|
-
shopDomain:
|
|
40411
|
-
query:
|
|
40412
|
-
taskId:
|
|
40619
|
+
inputSchema: z159.object({
|
|
40620
|
+
shopDomain: z159.string().min(3).max(120),
|
|
40621
|
+
query: z159.string().trim().max(120).optional(),
|
|
40622
|
+
taskId: z159.string().guid().optional(),
|
|
40413
40623
|
publicationMode: ShopifyPublicationMode.optional(),
|
|
40414
|
-
targetProductId:
|
|
40624
|
+
targetProductId: z159.string().min(1).max(300).optional()
|
|
40415
40625
|
}).shape,
|
|
40416
40626
|
annotations: READS_EXTERNAL
|
|
40417
40627
|
}, async ({ shopDomain, query, taskId, publicationMode, targetProductId }) => {
|
|
@@ -40454,8 +40664,8 @@ function registerConnectionTools(server, api) {
|
|
|
40454
40664
|
});
|
|
40455
40665
|
server.registerTool("list_shopify_landing_pixels", {
|
|
40456
40666
|
description: listShopifyLandingPixelsGuidance.summary + ' Cada pixel trae `key`, `provider`, `pixelId`, `source` ("theme" = est\xE1 en el tema, "landing" = solo en la landing, "manual" = lo agreg\xF3 la persona) y `selected` (si quedar\xE1 en la landing). Mu\xE9straselos en lenguaje simple antes de `publish_to_shopify` y pregunta cu\xE1les quitar o si agrega uno nuevo; luego pasa la elecci\xF3n en `landingPixels`. `appPixels` son los p\xEDxeles que una app de Shopify carga en toda la tienda (`provider`, `pixelId`, `appName`): mu\xE9stralos como "viene de la app <appName>", sin ofrecer quitarlos (solo se quitan desde esa app) y nunca los pongas en `landingPixels`. Si `unrecognizedCodeDetected` es true, avisa que hay c\xF3digo de seguimiento que no se pudo leer y no se copia. No modifica Shopify.',
|
|
40457
|
-
inputSchema:
|
|
40458
|
-
shopDomain:
|
|
40667
|
+
inputSchema: z159.object({
|
|
40668
|
+
shopDomain: z159.string().min(3).max(120)
|
|
40459
40669
|
}).shape,
|
|
40460
40670
|
annotations: READS_EXTERNAL
|
|
40461
40671
|
}, async ({ shopDomain }) => {
|
|
@@ -40471,7 +40681,7 @@ function registerConnectionTools(server, api) {
|
|
|
40471
40681
|
});
|
|
40472
40682
|
server.registerTool("list_meta_ad_accounts", {
|
|
40473
40683
|
description: listMetaAdAccountsGuidance.summary + " Para publicar, prefiere `list_meta_destinations`, que tambi\xE9n devuelve el portfolio y las p\xE1ginas disponibles. Si est\xE1 vac\xEDa, ind\xEDcale al usuario conectar Meta en productmaker.app/integrations.",
|
|
40474
|
-
inputSchema:
|
|
40684
|
+
inputSchema: z159.object({}).shape,
|
|
40475
40685
|
annotations: READS_EXTERNAL
|
|
40476
40686
|
}, async () => {
|
|
40477
40687
|
try {
|
|
@@ -40483,7 +40693,7 @@ function registerConnectionTools(server, api) {
|
|
|
40483
40693
|
});
|
|
40484
40694
|
server.registerTool("list_meta_destinations", {
|
|
40485
40695
|
description: listMetaDestinationsGuidance.summary + " Es obligatorio llamar esta herramienta antes de publicar, mostrar las opciones y enviar al publicador el `portfolioId`, `adAccountId` y `pageId` elegidos; nunca elijas silenciosamente la primera p\xE1gina o cuenta. No modifica Meta.",
|
|
40486
|
-
inputSchema:
|
|
40696
|
+
inputSchema: z159.object({}).shape,
|
|
40487
40697
|
annotations: READS_EXTERNAL,
|
|
40488
40698
|
_meta: {
|
|
40489
40699
|
"openai/widgetAccessible": true
|
|
@@ -40498,7 +40708,7 @@ function registerConnectionTools(server, api) {
|
|
|
40498
40708
|
});
|
|
40499
40709
|
server.registerTool("list_tiktok_advertisers", {
|
|
40500
40710
|
description: listTikTokAdvertisersGuidance.summary + " Si est\xE1 vac\xEDa, ind\xEDcale al usuario conectar TikTok en productmaker.app/integrations.",
|
|
40501
|
-
inputSchema:
|
|
40711
|
+
inputSchema: z159.object({}).shape,
|
|
40502
40712
|
annotations: READS_EXTERNAL
|
|
40503
40713
|
}, async () => {
|
|
40504
40714
|
try {
|
|
@@ -40528,7 +40738,7 @@ function registerConnectionTools(server, api) {
|
|
|
40528
40738
|
__name(registerConnectionTools, "registerConnectionTools");
|
|
40529
40739
|
|
|
40530
40740
|
// src/tools/actors.ts
|
|
40531
|
-
import { z as
|
|
40741
|
+
import { z as z160 } from "zod";
|
|
40532
40742
|
var listActorsGuidance = getProductMakerCapabilityModelGuidance("list_actors");
|
|
40533
40743
|
var actorVoiceGuidance = {
|
|
40534
40744
|
capabilities: getProductMakerCapabilityModelGuidance("get_actor_voice_capabilities"),
|
|
@@ -40568,7 +40778,7 @@ function sanitizeVoiceResult(value) {
|
|
|
40568
40778
|
__name(sanitizeVoiceResult, "sanitizeVoiceResult");
|
|
40569
40779
|
function registerActorTools(server, api) {
|
|
40570
40780
|
const actor = {
|
|
40571
|
-
actorId:
|
|
40781
|
+
actorId: z160.string().min(1).max(64)
|
|
40572
40782
|
};
|
|
40573
40783
|
const safe = /* @__PURE__ */ __name(async (request) => {
|
|
40574
40784
|
try {
|
|
@@ -40597,8 +40807,8 @@ function registerActorTools(server, api) {
|
|
|
40597
40807
|
inputSchema: {
|
|
40598
40808
|
...actor,
|
|
40599
40809
|
draft: ActorVoiceDraftSchema,
|
|
40600
|
-
requestKey:
|
|
40601
|
-
acceptedQuoteId:
|
|
40810
|
+
requestKey: z160.string().trim().min(1).max(128),
|
|
40811
|
+
acceptedQuoteId: z160.string().trim().min(1).max(128)
|
|
40602
40812
|
},
|
|
40603
40813
|
annotations: CREATES_PAID
|
|
40604
40814
|
}, async ({ actorId, ...body }) => safe(api.postJson(`/v1/actors/${encodeURIComponent(actorId)}/voice/previews`, body)));
|
|
@@ -40606,7 +40816,7 @@ function registerActorTools(server, api) {
|
|
|
40606
40816
|
description: actorVoiceGuidance.get.summary,
|
|
40607
40817
|
inputSchema: {
|
|
40608
40818
|
...actor,
|
|
40609
|
-
candidateId:
|
|
40819
|
+
candidateId: z160.string().min(1).max(64)
|
|
40610
40820
|
},
|
|
40611
40821
|
// Polling can resume the first paid submission of an accepted quote.
|
|
40612
40822
|
// The immutable candidate/operation key keeps recovery idempotent.
|
|
@@ -40619,16 +40829,16 @@ function registerActorTools(server, api) {
|
|
|
40619
40829
|
description: actorVoiceGuidance.approve.summary,
|
|
40620
40830
|
inputSchema: {
|
|
40621
40831
|
...actor,
|
|
40622
|
-
candidateId:
|
|
40623
|
-
expectedRevision:
|
|
40624
|
-
expectedApprovedRevision:
|
|
40832
|
+
candidateId: z160.string().min(1).max(64),
|
|
40833
|
+
expectedRevision: z160.number().int().positive(),
|
|
40834
|
+
expectedApprovedRevision: z160.number().int().positive().nullable().optional()
|
|
40625
40835
|
},
|
|
40626
40836
|
// Replaces the selected voice and withdraws the old catalog grants.
|
|
40627
40837
|
annotations: OVERWRITES_INTERNAL
|
|
40628
40838
|
}, async ({ actorId, ...body }) => safe(api.postJson(`/v1/actors/${encodeURIComponent(actorId)}/voice/approve`, body)));
|
|
40629
40839
|
server.registerTool("list_actors", {
|
|
40630
40840
|
description: listActorsGuidance.summary + " Devuelve id, nombre, descripci\xF3n, g\xE9nero y voz privada del personaje. Cuando el personaje tiene una voz personalizada, `voice.identityId` y `voice.revision` identifican la versi\xF3n aprobada \u2014 conserva la revisi\xF3n al llamar `approve_actor_voice` (expectedApprovedRevision) para reemplazarla. Los IDs de proveedor nunca se exponen por MCP. Usa el `id` como `actorId` al crear o editar una tarea. Solo aparecen los personajes listos para usar; si la lista est\xE1 vac\xEDa, dile al usuario que cree uno en productmaker.app antes de intentar asignarlo. No modifica nada.",
|
|
40631
|
-
inputSchema:
|
|
40841
|
+
inputSchema: z160.object({}).shape,
|
|
40632
40842
|
annotations: READS_INTERNAL
|
|
40633
40843
|
}, async () => {
|
|
40634
40844
|
try {
|
|
@@ -40661,7 +40871,7 @@ function registerActorTools(server, api) {
|
|
|
40661
40871
|
__name(registerActorTools, "registerActorTools");
|
|
40662
40872
|
|
|
40663
40873
|
// src/tools/publish.ts
|
|
40664
|
-
import { z as
|
|
40874
|
+
import { z as z161 } from "zod";
|
|
40665
40875
|
|
|
40666
40876
|
// src/tools/meta-publish-attempt-id.ts
|
|
40667
40877
|
var META_PUBLISH_NAMESPACE = "7b19c9ac-b4eb-4db1-970e-c2f24ce30b98";
|
|
@@ -40700,47 +40910,47 @@ var publishToShopifyGuidance = getProductMakerCapabilityModelGuidance("publish_t
|
|
|
40700
40910
|
var publishToMetaGuidance = getProductMakerCapabilityModelGuidance("publish_to_meta");
|
|
40701
40911
|
var publishCreativesToMetaGuidance = getProductMakerCapabilityModelGuidance("publish_creatives_to_meta");
|
|
40702
40912
|
var publishToTikTokGuidance = getProductMakerCapabilityModelGuidance("publish_to_tiktok");
|
|
40703
|
-
var ShopifyInput =
|
|
40704
|
-
taskId:
|
|
40705
|
-
shopDomain:
|
|
40913
|
+
var ShopifyInput = z161.object({
|
|
40914
|
+
taskId: z161.string().min(1),
|
|
40915
|
+
shopDomain: z161.string().min(1),
|
|
40706
40916
|
/** Override: number of landing images to include. Default = ALL images the
|
|
40707
40917
|
* task generated (the MCP fetches /v1/results first to count). Bounded
|
|
40708
40918
|
* generously here; the backend validates each index against
|
|
40709
40919
|
* landing.images.length and rejects out-of-range. */
|
|
40710
|
-
numLandingImages:
|
|
40711
|
-
variantIndex:
|
|
40920
|
+
numLandingImages: z161.number().int().min(1).max(20).optional(),
|
|
40921
|
+
variantIndex: z161.number().int().min(0).optional(),
|
|
40712
40922
|
/** ASK THE USER before setting: "¿Tu producto tiene variantes (talla, color, etc.)?".
|
|
40713
40923
|
* When true, the landing renders variant-picker pills; when false, it ships
|
|
40714
40924
|
* a single-option product page. Defaults to false. */
|
|
40715
|
-
showVariantPicker:
|
|
40925
|
+
showVariantPicker: z161.boolean().optional(),
|
|
40716
40926
|
/** Default `auto` updates the product previously published for this task and
|
|
40717
40927
|
* shop. Use `existing` with targetProductId to choose another product, or
|
|
40718
40928
|
* `new` only when the user explicitly wants a duplicate/new listing. */
|
|
40719
|
-
publicationMode:
|
|
40929
|
+
publicationMode: z161.enum([
|
|
40720
40930
|
"auto",
|
|
40721
40931
|
"existing",
|
|
40722
40932
|
"new"
|
|
40723
40933
|
]).optional(),
|
|
40724
40934
|
/** Shopify product GID, numeric id, or admin product URL. Required when
|
|
40725
40935
|
* publicationMode is `existing`. */
|
|
40726
|
-
targetProductId:
|
|
40936
|
+
targetProductId: z161.string().trim().min(1).max(300).optional(),
|
|
40727
40937
|
/** Add an announcement bar text above add-to-cart (optional). */
|
|
40728
|
-
announcementBarEnabled:
|
|
40729
|
-
announcementBarText:
|
|
40938
|
+
announcementBarEnabled: z161.boolean().optional(),
|
|
40939
|
+
announcementBarText: z161.string().trim().min(1).max(SHOPIFY_ANNOUNCEMENT_BAR_MAX_LENGTH).optional(),
|
|
40730
40940
|
/** Default true: publish the task's QA-passed landing GIF, as the web
|
|
40731
40941
|
* editor does when the seller keeps it selected. false omits it. */
|
|
40732
|
-
includeLandingGif:
|
|
40942
|
+
includeLandingGif: z161.boolean().optional(),
|
|
40733
40943
|
/** Classic landings only: the seller's pixel choice from
|
|
40734
40944
|
* `list_shopify_landing_pixels`. Omit to keep the store's remembered
|
|
40735
40945
|
* choice (theme pixels checked). */
|
|
40736
40946
|
landingPixels: LandingPixelSelection.optional().describe("P\xEDxeles de la landing cl\xE1sica: deselectedKeys = keys que la persona desmarc\xF3, selectedKeys = keys que quiere dejar, manual = TODOS los p\xEDxeles escritos a mano que deben seguir guardados ({provider: meta|tiktok, pixelId}): copia los de source=manual de list_shopify_landing_pixels y suma los nuevos; uno desmarcado sigue en manual y su key va en deselectedKeys; omite manual para no tocar los guardados. Solo con lo que la persona eligi\xF3 tras ver list_shopify_landing_pixels; omite landingPixels para mantener lo guardado."),
|
|
40737
40947
|
commerceCorrection: PublishCommerceCorrectionSchema.optional().describe("Complete seller-confirmed commerce values, with the revision and fingerprint returned in recovery. Never invent missing prices or convert currency."),
|
|
40738
|
-
confirmed:
|
|
40948
|
+
confirmed: z161.boolean().optional().describe("Required as true only when submitting commerceCorrection, after showing its values and obtaining explicit seller confirmation.")
|
|
40739
40949
|
});
|
|
40740
40950
|
var ShopifyInputWithAnnouncementBarValidation = ShopifyInput.superRefine((value, ctx) => {
|
|
40741
40951
|
if (value.commerceCorrection && value.confirmed !== true) {
|
|
40742
40952
|
ctx.addIssue({
|
|
40743
|
-
code:
|
|
40953
|
+
code: z161.ZodIssueCode.custom,
|
|
40744
40954
|
path: [
|
|
40745
40955
|
"confirmed"
|
|
40746
40956
|
],
|
|
@@ -40749,7 +40959,7 @@ var ShopifyInputWithAnnouncementBarValidation = ShopifyInput.superRefine((value,
|
|
|
40749
40959
|
}
|
|
40750
40960
|
if (value.announcementBarEnabled && !value.announcementBarText) {
|
|
40751
40961
|
ctx.addIssue({
|
|
40752
|
-
code:
|
|
40962
|
+
code: z161.ZodIssueCode.custom,
|
|
40753
40963
|
path: [
|
|
40754
40964
|
"announcementBarText"
|
|
40755
40965
|
],
|
|
@@ -40758,7 +40968,7 @@ var ShopifyInputWithAnnouncementBarValidation = ShopifyInput.superRefine((value,
|
|
|
40758
40968
|
}
|
|
40759
40969
|
if (!value.announcementBarEnabled && value.announcementBarText) {
|
|
40760
40970
|
ctx.addIssue({
|
|
40761
|
-
code:
|
|
40971
|
+
code: z161.ZodIssueCode.custom,
|
|
40762
40972
|
path: [
|
|
40763
40973
|
"announcementBarText"
|
|
40764
40974
|
],
|
|
@@ -40772,90 +40982,90 @@ function parseShopifyInput(rawInput) {
|
|
|
40772
40982
|
return parsed.data;
|
|
40773
40983
|
}
|
|
40774
40984
|
__name(parseShopifyInput, "parseShopifyInput");
|
|
40775
|
-
var McpCampaignConfig =
|
|
40985
|
+
var McpCampaignConfig = z161.object({
|
|
40776
40986
|
/** Legacy USD amount. Meta retains its existing conversion; the TikTok
|
|
40777
40987
|
* schema below restricts this input to USD advertiser accounts. */
|
|
40778
|
-
dailyBudgetUsd:
|
|
40988
|
+
dailyBudgetUsd: z161.number().positive().optional(),
|
|
40779
40989
|
/** ISO-3166-1 alpha-2 country codes or resolvable names (CountryIso2Schema
|
|
40780
40990
|
* normalizes at validation). Meta accepts max 1 (single-country ad set).
|
|
40781
40991
|
* TikTok takes only the first entry. */
|
|
40782
|
-
targetCountries:
|
|
40783
|
-
campaignName:
|
|
40992
|
+
targetCountries: z161.array(CountryIso2Schema).max(1).optional(),
|
|
40993
|
+
campaignName: z161.string().trim().min(1).max(100).optional()
|
|
40784
40994
|
});
|
|
40785
40995
|
var McpAdAccountId = MetaAdAccountId.describe('Meta ad account id. Accepts "act_1234567890" or the bare numeric id "1234567890".');
|
|
40786
|
-
var MetaInput =
|
|
40787
|
-
taskId:
|
|
40996
|
+
var MetaInput = z161.object({
|
|
40997
|
+
taskId: z161.string().min(1),
|
|
40788
40998
|
/** Exact Meta Business portfolio selected from `list_meta_destinations`. */
|
|
40789
|
-
portfolioId:
|
|
40999
|
+
portfolioId: z161.string().trim().min(1),
|
|
40790
41000
|
/** Exact Facebook Page selected from `list_meta_destinations`. */
|
|
40791
|
-
pageId:
|
|
41001
|
+
pageId: z161.string().trim().min(1),
|
|
40792
41002
|
adAccountId: McpAdAccountId,
|
|
40793
|
-
pixelId:
|
|
40794
|
-
landingUrl:
|
|
41003
|
+
pixelId: z161.string().min(1).optional(),
|
|
41004
|
+
landingUrl: z161.string().url().optional(),
|
|
40795
41005
|
/** Select which angles to publish by 0-based index. Omit to publish all
|
|
40796
41006
|
* successful angles. Example: a task with 3 angles → `[0,2]` publishes #0 + #2. */
|
|
40797
|
-
angleIndexes:
|
|
41007
|
+
angleIndexes: z161.array(z161.number().int().nonnegative()).optional(),
|
|
40798
41008
|
campaignConfig: McpCampaignConfig.optional(),
|
|
40799
41009
|
/** Override the ad's primary text (body copy). If omitted, ProductMaker
|
|
40800
41010
|
* uses the auto-generated copy attached to the task. Capped at 500 chars
|
|
40801
41011
|
* (Meta's primary-text limit). */
|
|
40802
|
-
primaryText:
|
|
41012
|
+
primaryText: z161.string().trim().min(1).max(500).optional(),
|
|
40803
41013
|
/** Optional WhatsApp number. When set, the ad button opens a WhatsApp chat
|
|
40804
41014
|
* (wa.me) instead of a landing page. */
|
|
40805
|
-
phoneNumber:
|
|
41015
|
+
phoneNumber: z161.string().min(8).max(32).optional()
|
|
40806
41016
|
});
|
|
40807
|
-
var GroupedTaskSource =
|
|
40808
|
-
type:
|
|
40809
|
-
taskId:
|
|
40810
|
-
angleIndex:
|
|
40811
|
-
videoVariant:
|
|
41017
|
+
var GroupedTaskSource = z161.object({
|
|
41018
|
+
type: z161.literal("task"),
|
|
41019
|
+
taskId: z161.string().min(1),
|
|
41020
|
+
angleIndex: z161.number().int().min(0).optional(),
|
|
41021
|
+
videoVariant: z161.enum([
|
|
40812
41022
|
"with_subtitles",
|
|
40813
41023
|
"without_subtitles"
|
|
40814
41024
|
]).optional(),
|
|
40815
|
-
imageVariantIndex:
|
|
40816
|
-
});
|
|
40817
|
-
var GroupedMediaSource =
|
|
40818
|
-
type:
|
|
40819
|
-
url:
|
|
40820
|
-
path:
|
|
40821
|
-
thumbnailUrl:
|
|
40822
|
-
thumbnailPath:
|
|
41025
|
+
imageVariantIndex: z161.number().int().min(0).optional()
|
|
41026
|
+
});
|
|
41027
|
+
var GroupedMediaSource = z161.object({
|
|
41028
|
+
type: z161.literal("media"),
|
|
41029
|
+
url: z161.string().url().optional().describe("Public HTTPS media URL. For a file on the user laptop, use request_media_upload on the hosted MCP instead."),
|
|
41030
|
+
path: z161.string().min(1).optional().describe('Local file path only when this MCP runs over stdio. On the hosted MCP, call request_media_upload and then use source.type="asset".'),
|
|
41031
|
+
thumbnailUrl: z161.string().url().optional(),
|
|
41032
|
+
thumbnailPath: z161.string().min(1).optional()
|
|
40823
41033
|
}).refine((value) => Boolean(value.url) !== Boolean(value.path), {
|
|
40824
41034
|
message: "media source needs exactly one of `url` or `path`"
|
|
40825
41035
|
}).refine((value) => !(value.thumbnailUrl && value.thumbnailPath), {
|
|
40826
41036
|
message: "media source needs at most one of `thumbnailUrl` or `thumbnailPath`"
|
|
40827
41037
|
});
|
|
40828
|
-
var GroupedUploadedAssetSource =
|
|
40829
|
-
type:
|
|
41038
|
+
var GroupedUploadedAssetSource = z161.object({
|
|
41039
|
+
type: z161.literal("asset"),
|
|
40830
41040
|
/** Returned by check_media_upload. ProductMaker resolves ownership server-side. */
|
|
40831
|
-
assetId:
|
|
40832
|
-
thumbnailAssetId:
|
|
41041
|
+
assetId: z161.string().guid(),
|
|
41042
|
+
thumbnailAssetId: z161.string().guid().optional()
|
|
40833
41043
|
});
|
|
40834
|
-
var GroupedCreative =
|
|
40835
|
-
type:
|
|
41044
|
+
var GroupedCreative = z161.object({
|
|
41045
|
+
type: z161.enum([
|
|
40836
41046
|
"image",
|
|
40837
41047
|
"video"
|
|
40838
41048
|
]),
|
|
40839
|
-
source:
|
|
41049
|
+
source: z161.union([
|
|
40840
41050
|
GroupedTaskSource,
|
|
40841
41051
|
GroupedMediaSource,
|
|
40842
41052
|
GroupedUploadedAssetSource
|
|
40843
41053
|
]),
|
|
40844
|
-
title:
|
|
40845
|
-
description:
|
|
41054
|
+
title: z161.string().max(120).optional(),
|
|
41055
|
+
description: z161.string().max(500).optional(),
|
|
40846
41056
|
cta: MetaCtaType.optional(),
|
|
40847
|
-
creativeId:
|
|
41057
|
+
creativeId: z161.string().min(1).optional()
|
|
40848
41058
|
});
|
|
40849
|
-
var GroupedCampaignConfigBase =
|
|
41059
|
+
var GroupedCampaignConfigBase = z161.object({
|
|
40850
41060
|
campaignType: MetaCampaignType.default("sales"),
|
|
40851
41061
|
optimizationMode: MetaOptimizationMode.default("advantage_plus"),
|
|
40852
41062
|
budgetMode: MetaBudgetMode.optional(),
|
|
40853
|
-
campaignDailyBudget:
|
|
40854
|
-
adSets:
|
|
40855
|
-
tempId:
|
|
40856
|
-
name:
|
|
40857
|
-
dailyBudget:
|
|
40858
|
-
creativeIds:
|
|
41063
|
+
campaignDailyBudget: z161.number().int().positive().optional(),
|
|
41064
|
+
adSets: z161.array(z161.object({
|
|
41065
|
+
tempId: z161.string().min(1).max(80),
|
|
41066
|
+
name: z161.string().min(1).max(100),
|
|
41067
|
+
dailyBudget: z161.number().int().positive().optional(),
|
|
41068
|
+
creativeIds: z161.array(z161.string().min(1)).min(1)
|
|
40859
41069
|
})).min(1).max(CAMPAIGN_LIMITS.MAX_AD_SETS),
|
|
40860
41070
|
/**
|
|
40861
41071
|
* Valid values are 'landing' and 'whatsapp' — there is no 'website'. This
|
|
@@ -40863,17 +41073,17 @@ var GroupedCampaignConfigBase = z160.object({
|
|
|
40863
41073
|
* opaque `invalid_literal` and made the WhatsApp destination — supported by
|
|
40864
41074
|
* the API since #849 — unreachable from this tool.
|
|
40865
41075
|
*/
|
|
40866
|
-
destination:
|
|
40867
|
-
|
|
40868
|
-
type:
|
|
40869
|
-
landingUrl:
|
|
41076
|
+
destination: z161.discriminatedUnion("type", [
|
|
41077
|
+
z161.object({
|
|
41078
|
+
type: z161.literal("landing"),
|
|
41079
|
+
landingUrl: z161.string().url()
|
|
40870
41080
|
}),
|
|
40871
|
-
|
|
40872
|
-
type:
|
|
40873
|
-
phoneNumber:
|
|
41081
|
+
z161.object({
|
|
41082
|
+
type: z161.literal("whatsapp"),
|
|
41083
|
+
phoneNumber: z161.string().min(8).max(32)
|
|
40874
41084
|
})
|
|
40875
41085
|
]),
|
|
40876
|
-
saveAsDefault:
|
|
41086
|
+
saveAsDefault: z161.boolean().default(false),
|
|
40877
41087
|
budgetPolicy: MetaBudgetPolicy.optional()
|
|
40878
41088
|
});
|
|
40879
41089
|
function resolveBudgetMode(value) {
|
|
@@ -40887,7 +41097,7 @@ var GroupedCampaignConfig = GroupedCampaignConfigBase.superRefine((value, ctx) =
|
|
|
40887
41097
|
const budgetMode = resolveBudgetMode(value);
|
|
40888
41098
|
if (budgetMode === "campaign" && value.campaignDailyBudget === void 0) {
|
|
40889
41099
|
ctx.addIssue({
|
|
40890
|
-
code:
|
|
41100
|
+
code: z161.ZodIssueCode.custom,
|
|
40891
41101
|
path: [
|
|
40892
41102
|
"campaignDailyBudget"
|
|
40893
41103
|
],
|
|
@@ -40898,7 +41108,7 @@ var GroupedCampaignConfig = GroupedCampaignConfigBase.superRefine((value, ctx) =
|
|
|
40898
41108
|
value.adSets.forEach((adSet, index) => {
|
|
40899
41109
|
if (adSet.dailyBudget === void 0) {
|
|
40900
41110
|
ctx.addIssue({
|
|
40901
|
-
code:
|
|
41111
|
+
code: z161.ZodIssueCode.custom,
|
|
40902
41112
|
path: [
|
|
40903
41113
|
"adSets",
|
|
40904
41114
|
index,
|
|
@@ -40913,25 +41123,25 @@ var GroupedCampaignConfig = GroupedCampaignConfigBase.superRefine((value, ctx) =
|
|
|
40913
41123
|
...value,
|
|
40914
41124
|
budgetMode: resolveBudgetMode(value)
|
|
40915
41125
|
}));
|
|
40916
|
-
var PublishCreativesToMetaInputBase =
|
|
40917
|
-
creatives:
|
|
41126
|
+
var PublishCreativesToMetaInputBase = z161.object({
|
|
41127
|
+
creatives: z161.array(GroupedCreative).min(1).max(CAMPAIGN_LIMITS.MAX_CREATIVES),
|
|
40918
41128
|
/** Exact Meta Business portfolio selected from `list_meta_destinations`. */
|
|
40919
|
-
portfolioId:
|
|
41129
|
+
portfolioId: z161.string().trim().min(1),
|
|
40920
41130
|
/** Exact Facebook Page selected from `list_meta_destinations`. */
|
|
40921
|
-
pageId:
|
|
41131
|
+
pageId: z161.string().trim().min(1),
|
|
40922
41132
|
adAccountId: McpAdAccountId,
|
|
40923
|
-
pixelId:
|
|
41133
|
+
pixelId: z161.string().min(1).optional(),
|
|
40924
41134
|
/** Required unless `campaignConfig.destination` is whatsapp or a creative
|
|
40925
41135
|
* comes from a task (the API then lands on the published service landing
|
|
40926
41136
|
* of its service tasks) — see the superRefine below. Mirrors the API's
|
|
40927
41137
|
* `FacebookCreateCampaignFromTasksBodySchema`. */
|
|
40928
|
-
landingUrl:
|
|
41138
|
+
landingUrl: z161.string().url().optional(),
|
|
40929
41139
|
/** ISO-2 code or resolvable country name — mirrors the API contract
|
|
40930
41140
|
* (CountryIso2Schema), which normalizes names to alpha-2 at validation.
|
|
40931
41141
|
* Omitted: the brand country of its service tasks (the API answers
|
|
40932
41142
|
* META_NO_TARGET_COUNTRY when it has none); "US" for products. */
|
|
40933
41143
|
targetCountry: CountryIso2Schema.optional(),
|
|
40934
|
-
campaignName:
|
|
41144
|
+
campaignName: z161.string().trim().min(1).max(100),
|
|
40935
41145
|
campaignConfig: GroupedCampaignConfig.optional()
|
|
40936
41146
|
});
|
|
40937
41147
|
var PublishCreativesToMetaInput = PublishCreativesToMetaInputBase.superRefine((value, ctx) => {
|
|
@@ -40939,7 +41149,7 @@ var PublishCreativesToMetaInput = PublishCreativesToMetaInputBase.superRefine((v
|
|
|
40939
41149
|
const hasTaskCreative = value.creatives.some((creative) => creative.source.type === "task");
|
|
40940
41150
|
if (destination?.type !== "whatsapp" && destination?.type !== "landing" && !value.landingUrl && !hasTaskCreative) {
|
|
40941
41151
|
ctx.addIssue({
|
|
40942
|
-
code:
|
|
41152
|
+
code: z161.ZodIssueCode.custom,
|
|
40943
41153
|
path: [
|
|
40944
41154
|
"landingUrl"
|
|
40945
41155
|
],
|
|
@@ -40948,7 +41158,7 @@ var PublishCreativesToMetaInput = PublishCreativesToMetaInputBase.superRefine((v
|
|
|
40948
41158
|
}
|
|
40949
41159
|
if (destination?.type === "landing" && value.landingUrl && destination.landingUrl !== value.landingUrl) {
|
|
40950
41160
|
ctx.addIssue({
|
|
40951
|
-
code:
|
|
41161
|
+
code: z161.ZodIssueCode.custom,
|
|
40952
41162
|
path: [
|
|
40953
41163
|
"campaignConfig",
|
|
40954
41164
|
"destination",
|
|
@@ -40967,16 +41177,16 @@ var PublishCreativesToMetaInput = PublishCreativesToMetaInputBase.superRefine((v
|
|
|
40967
41177
|
}
|
|
40968
41178
|
return value;
|
|
40969
41179
|
});
|
|
40970
|
-
var PresignUploadResponseSchema =
|
|
40971
|
-
uploadUrl:
|
|
41180
|
+
var PresignUploadResponseSchema = z161.object({
|
|
41181
|
+
uploadUrl: z161.string().url().refine((value) => {
|
|
40972
41182
|
const url3 = new URL(value);
|
|
40973
41183
|
return !url3.username && !url3.password && url3.protocol === "https:";
|
|
40974
41184
|
}, "presigned upload URL must be HTTPS without embedded credentials"),
|
|
40975
|
-
publicUrl:
|
|
41185
|
+
publicUrl: z161.string().url().refine((value) => {
|
|
40976
41186
|
const url3 = new URL(value);
|
|
40977
41187
|
return !url3.username && !url3.password;
|
|
40978
41188
|
}, "public media URL must not contain embedded credentials"),
|
|
40979
|
-
stagingAssetId:
|
|
41189
|
+
stagingAssetId: z161.string().guid()
|
|
40980
41190
|
});
|
|
40981
41191
|
async function uploadResolvedMedia(api, media, assetRole) {
|
|
40982
41192
|
if (!media.buffer) throw new ResolveMediaError("INVALID_INPUT", "resolved media has no bytes");
|
|
@@ -41002,14 +41212,14 @@ async function resolveAndUploadMedia(api, ref, expectedKind, assetRole, transpor
|
|
|
41002
41212
|
}
|
|
41003
41213
|
__name(resolveAndUploadMedia, "resolveAndUploadMedia");
|
|
41004
41214
|
var TikTokMcpCampaignConfig = McpCampaignConfig.extend({
|
|
41005
|
-
dailyBudgetUsd:
|
|
41006
|
-
dailyBudget:
|
|
41215
|
+
dailyBudgetUsd: z161.number().finite().positive().optional().describe("Legacy USD amount, supported only for USD advertiser accounts. No FX conversion."),
|
|
41216
|
+
dailyBudget: z161.number().finite().positive().optional().describe("Daily budget in the selected advertiser currency major units; pass budgetCurrency together."),
|
|
41007
41217
|
budgetCurrency: TikTokBudgetCurrencySchema.optional(),
|
|
41008
41218
|
destination: TikTokCampaignDestinationSchema.optional()
|
|
41009
41219
|
}).superRefine((value, ctx) => {
|
|
41010
41220
|
if (value.dailyBudgetUsd !== void 0 && (value.dailyBudget !== void 0 || value.budgetCurrency !== void 0)) {
|
|
41011
41221
|
ctx.addIssue({
|
|
41012
|
-
code:
|
|
41222
|
+
code: z161.ZodIssueCode.custom,
|
|
41013
41223
|
path: [
|
|
41014
41224
|
"dailyBudgetUsd"
|
|
41015
41225
|
],
|
|
@@ -41018,7 +41228,7 @@ var TikTokMcpCampaignConfig = McpCampaignConfig.extend({
|
|
|
41018
41228
|
}
|
|
41019
41229
|
if (value.dailyBudget !== void 0 !== (value.budgetCurrency !== void 0)) {
|
|
41020
41230
|
ctx.addIssue({
|
|
41021
|
-
code:
|
|
41231
|
+
code: z161.ZodIssueCode.custom,
|
|
41022
41232
|
path: [
|
|
41023
41233
|
"budgetCurrency"
|
|
41024
41234
|
],
|
|
@@ -41026,16 +41236,16 @@ var TikTokMcpCampaignConfig = McpCampaignConfig.extend({
|
|
|
41026
41236
|
});
|
|
41027
41237
|
}
|
|
41028
41238
|
});
|
|
41029
|
-
var TikTokInput =
|
|
41030
|
-
taskId:
|
|
41031
|
-
advertiserId:
|
|
41032
|
-
pixelId:
|
|
41033
|
-
landingUrl:
|
|
41034
|
-
angleIndexes:
|
|
41239
|
+
var TikTokInput = z161.object({
|
|
41240
|
+
taskId: z161.string().min(1),
|
|
41241
|
+
advertiserId: z161.string().min(1),
|
|
41242
|
+
pixelId: z161.string().min(1).optional(),
|
|
41243
|
+
landingUrl: z161.string().url().optional(),
|
|
41244
|
+
angleIndexes: z161.array(z161.number().int().nonnegative()).optional(),
|
|
41035
41245
|
campaignConfig: TikTokMcpCampaignConfig.optional(),
|
|
41036
41246
|
/** Override the ad's description (TikTok's body copy). If omitted,
|
|
41037
41247
|
* ProductMaker uses the auto-generated copy attached to the task. */
|
|
41038
|
-
primaryText:
|
|
41248
|
+
primaryText: z161.string().trim().min(1).max(500).optional()
|
|
41039
41249
|
});
|
|
41040
41250
|
function registerPublishTools(server, api, opts = {}) {
|
|
41041
41251
|
const transport = opts.transport ?? "http";
|
|
@@ -41486,40 +41696,40 @@ __name(toTikTokCampaignConfig, "toTikTokCampaignConfig");
|
|
|
41486
41696
|
|
|
41487
41697
|
// src/tools/meta-upload.ts
|
|
41488
41698
|
import { registerAppTool } from "@modelcontextprotocol/ext-apps/server";
|
|
41489
|
-
import { z as
|
|
41699
|
+
import { z as z162 } from "zod";
|
|
41490
41700
|
var requestMediaUploadGuidance = getProductMakerCapabilityModelGuidance("request_media_upload");
|
|
41491
41701
|
var checkMediaUploadGuidance = getProductMakerCapabilityModelGuidance("check_media_upload");
|
|
41492
|
-
var UploadSessionInputBase =
|
|
41493
|
-
mediaKind:
|
|
41702
|
+
var UploadSessionInputBase = z162.object({
|
|
41703
|
+
mediaKind: z162.enum([
|
|
41494
41704
|
"image",
|
|
41495
41705
|
"video",
|
|
41496
41706
|
"mixed"
|
|
41497
41707
|
]).default("mixed").describe("The kind of file the user will select. Use image for product references and landing pages, video for a single video, and mixed only when the consumer supports both."),
|
|
41498
|
-
assetRole:
|
|
41708
|
+
assetRole: z162.enum([
|
|
41499
41709
|
"media",
|
|
41500
41710
|
"thumbnail"
|
|
41501
41711
|
]).default("media").describe("Use media for the creative itself; thumbnail only for an image thumbnail."),
|
|
41502
|
-
uploadPurpose:
|
|
41712
|
+
uploadPurpose: z162.enum([
|
|
41503
41713
|
"product_reference",
|
|
41504
41714
|
"creative",
|
|
41505
41715
|
"generic"
|
|
41506
41716
|
]).default("generic").describe("The user's purpose for these files. Use product_reference for a product photo used by tasks or landings, creative for media that will become an ad or creative, and generic only when neither applies."),
|
|
41507
|
-
maxFiles:
|
|
41717
|
+
maxFiles: z162.number().int().min(1).max(10).optional().describe("Optional batch limit: image accepts 1-5, video exactly 1, and mixed 1-10.")
|
|
41508
41718
|
});
|
|
41509
|
-
var OpenAiFileReference =
|
|
41510
|
-
download_url:
|
|
41511
|
-
file_id:
|
|
41512
|
-
mime_type:
|
|
41513
|
-
file_name:
|
|
41719
|
+
var OpenAiFileReference = z162.object({
|
|
41720
|
+
download_url: z162.string().url().describe("Required by ChatGPT's openai/fileParams schema. The App prefers getFileDownloadUrl(file_id) for a fresh URL, and the server never fetches this value."),
|
|
41721
|
+
file_id: z162.string().min(1),
|
|
41722
|
+
mime_type: z162.string().min(1).optional(),
|
|
41723
|
+
file_name: z162.string().min(1).optional()
|
|
41514
41724
|
});
|
|
41515
41725
|
var UploadSessionToolInputShape = {
|
|
41516
41726
|
...UploadSessionInputBase.shape,
|
|
41517
|
-
files:
|
|
41727
|
+
files: z162.array(OpenAiFileReference).max(10).optional().describe("Optional OpenAI-hosted file references provided by ChatGPT. They are only metadata for the UI bridge and are never forwarded to ProductMaker.")
|
|
41518
41728
|
};
|
|
41519
|
-
var UploadSessionToolInput =
|
|
41729
|
+
var UploadSessionToolInput = z162.object(UploadSessionToolInputShape).superRefine((value, ctx) => {
|
|
41520
41730
|
if (value.assetRole === "thumbnail" && value.mediaKind !== "image") {
|
|
41521
41731
|
ctx.addIssue({
|
|
41522
|
-
code:
|
|
41732
|
+
code: z162.ZodIssueCode.custom,
|
|
41523
41733
|
path: [
|
|
41524
41734
|
"mediaKind"
|
|
41525
41735
|
],
|
|
@@ -41528,7 +41738,7 @@ var UploadSessionToolInput = z161.object(UploadSessionToolInputShape).superRefin
|
|
|
41528
41738
|
}
|
|
41529
41739
|
if (value.mediaKind === "video" && value.maxFiles !== void 0 && value.maxFiles !== 1) {
|
|
41530
41740
|
ctx.addIssue({
|
|
41531
|
-
code:
|
|
41741
|
+
code: z162.ZodIssueCode.custom,
|
|
41532
41742
|
path: [
|
|
41533
41743
|
"maxFiles"
|
|
41534
41744
|
],
|
|
@@ -41537,7 +41747,7 @@ var UploadSessionToolInput = z161.object(UploadSessionToolInputShape).superRefin
|
|
|
41537
41747
|
}
|
|
41538
41748
|
if (value.mediaKind === "image" && (value.maxFiles ?? 1) > 5) {
|
|
41539
41749
|
ctx.addIssue({
|
|
41540
|
-
code:
|
|
41750
|
+
code: z162.ZodIssueCode.custom,
|
|
41541
41751
|
path: [
|
|
41542
41752
|
"maxFiles"
|
|
41543
41753
|
],
|
|
@@ -41545,38 +41755,38 @@ var UploadSessionToolInput = z161.object(UploadSessionToolInputShape).superRefin
|
|
|
41545
41755
|
});
|
|
41546
41756
|
}
|
|
41547
41757
|
});
|
|
41548
|
-
var UploadSessionResponse =
|
|
41549
|
-
sessionId:
|
|
41550
|
-
uploadPageUrl:
|
|
41551
|
-
mediaKind:
|
|
41758
|
+
var UploadSessionResponse = z162.object({
|
|
41759
|
+
sessionId: z162.string().guid(),
|
|
41760
|
+
uploadPageUrl: z162.string().url(),
|
|
41761
|
+
mediaKind: z162.enum([
|
|
41552
41762
|
"image",
|
|
41553
41763
|
"video",
|
|
41554
41764
|
"mixed"
|
|
41555
41765
|
]),
|
|
41556
|
-
assetRole:
|
|
41766
|
+
assetRole: z162.enum([
|
|
41557
41767
|
"media",
|
|
41558
41768
|
"thumbnail"
|
|
41559
41769
|
]),
|
|
41560
|
-
maxFiles:
|
|
41561
|
-
expiresAt:
|
|
41770
|
+
maxFiles: z162.number().int().positive(),
|
|
41771
|
+
expiresAt: z162.string().datetime()
|
|
41562
41772
|
});
|
|
41563
|
-
var UploadStatusInput =
|
|
41564
|
-
sessionId:
|
|
41773
|
+
var UploadStatusInput = z162.object({
|
|
41774
|
+
sessionId: z162.string().guid().describe("The sessionId returned by request_media_upload.")
|
|
41565
41775
|
});
|
|
41566
|
-
var UniversalUploadStatusResponse =
|
|
41567
|
-
|
|
41568
|
-
status:
|
|
41569
|
-
assets:
|
|
41776
|
+
var UniversalUploadStatusResponse = z162.discriminatedUnion("status", [
|
|
41777
|
+
z162.object({
|
|
41778
|
+
status: z162.literal("pending"),
|
|
41779
|
+
assets: z162.array(z162.never()).length(0)
|
|
41570
41780
|
}),
|
|
41571
|
-
|
|
41572
|
-
status:
|
|
41573
|
-
assets:
|
|
41574
|
-
assetId:
|
|
41575
|
-
mediaKind:
|
|
41781
|
+
z162.object({
|
|
41782
|
+
status: z162.literal("uploaded"),
|
|
41783
|
+
assets: z162.array(z162.object({
|
|
41784
|
+
assetId: z162.string().guid(),
|
|
41785
|
+
mediaKind: z162.enum([
|
|
41576
41786
|
"image",
|
|
41577
41787
|
"video"
|
|
41578
41788
|
]),
|
|
41579
|
-
assetRole:
|
|
41789
|
+
assetRole: z162.enum([
|
|
41580
41790
|
"media",
|
|
41581
41791
|
"thumbnail"
|
|
41582
41792
|
])
|
|
@@ -41584,13 +41794,13 @@ var UniversalUploadStatusResponse = z161.discriminatedUnion("status", [
|
|
|
41584
41794
|
})
|
|
41585
41795
|
]);
|
|
41586
41796
|
var UniversalUploadStructuredResponse = UploadSessionResponse.extend({
|
|
41587
|
-
uploadPurpose:
|
|
41797
|
+
uploadPurpose: z162.enum([
|
|
41588
41798
|
"product_reference",
|
|
41589
41799
|
"creative",
|
|
41590
41800
|
"generic"
|
|
41591
41801
|
]),
|
|
41592
|
-
checkToolName:
|
|
41593
|
-
resolveEndpoint:
|
|
41802
|
+
checkToolName: z162.literal("check_media_upload"),
|
|
41803
|
+
resolveEndpoint: z162.string().url()
|
|
41594
41804
|
});
|
|
41595
41805
|
function contextualizeUploadPageUrl(uploadPageUrl, uploadPurpose) {
|
|
41596
41806
|
const url3 = new URL(uploadPageUrl);
|
|
@@ -41681,15 +41891,15 @@ function registerMediaUploadTools(server, api) {
|
|
|
41681
41891
|
__name(registerMediaUploadTools, "registerMediaUploadTools");
|
|
41682
41892
|
|
|
41683
41893
|
// src/tools/campaigns.ts
|
|
41684
|
-
import { z as
|
|
41894
|
+
import { z as z163 } from "zod";
|
|
41685
41895
|
var getMetaCampaignStatusGuidance = getProductMakerCapabilityModelGuidance("get_meta_campaign_status");
|
|
41686
41896
|
var getTikTokCampaignStatusGuidance = getProductMakerCapabilityModelGuidance("get_tiktok_campaign_status");
|
|
41687
|
-
var MetaStatusInput =
|
|
41688
|
-
campaignId:
|
|
41897
|
+
var MetaStatusInput = z163.object({
|
|
41898
|
+
campaignId: z163.string().min(1).describe("Meta campaign ID returned by publish_to_meta.")
|
|
41689
41899
|
});
|
|
41690
|
-
var TikTokStatusInput =
|
|
41691
|
-
campaignId:
|
|
41692
|
-
advertiserId:
|
|
41900
|
+
var TikTokStatusInput = z163.object({
|
|
41901
|
+
campaignId: z163.string().min(1).describe("TikTok campaign ID returned by publish_to_tiktok."),
|
|
41902
|
+
advertiserId: z163.string().min(1).describe("The same advertiserId used to publish the campaign.")
|
|
41693
41903
|
});
|
|
41694
41904
|
function registerCampaignTools(server, api) {
|
|
41695
41905
|
server.registerTool("get_meta_campaign_status", {
|
|
@@ -41794,10 +42004,10 @@ function renderTikTokStatusMarkdown(r) {
|
|
|
41794
42004
|
__name(renderTikTokStatusMarkdown, "renderTikTokStatusMarkdown");
|
|
41795
42005
|
|
|
41796
42006
|
// ../../packages/product-economics/src/product-costing.ts
|
|
41797
|
-
import { z as
|
|
42007
|
+
import { z as z165 } from "zod";
|
|
41798
42008
|
|
|
41799
42009
|
// ../../packages/product-economics/src/product-costing-countries.ts
|
|
41800
|
-
import { z as
|
|
42010
|
+
import { z as z164 } from "zod";
|
|
41801
42011
|
|
|
41802
42012
|
// ../../packages/product-economics/src/product-costing-shipping-references.json
|
|
41803
42013
|
var product_costing_shipping_references_default = {
|
|
@@ -41861,21 +42071,21 @@ var product_costing_shipping_references_default = {
|
|
|
41861
42071
|
};
|
|
41862
42072
|
|
|
41863
42073
|
// ../../packages/product-economics/src/product-costing-countries.ts
|
|
41864
|
-
var ShippingReferenceSchema =
|
|
41865
|
-
reference:
|
|
41866
|
-
min:
|
|
41867
|
-
max:
|
|
41868
|
-
updatedAt:
|
|
41869
|
-
confidence:
|
|
42074
|
+
var ShippingReferenceSchema = z164.object({
|
|
42075
|
+
reference: z164.number().positive(),
|
|
42076
|
+
min: z164.number().nonnegative(),
|
|
42077
|
+
max: z164.number().positive(),
|
|
42078
|
+
updatedAt: z164.string().date(),
|
|
42079
|
+
confidence: z164.enum([
|
|
41870
42080
|
"high",
|
|
41871
42081
|
"medium",
|
|
41872
42082
|
"medium-low"
|
|
41873
42083
|
]),
|
|
41874
|
-
sources:
|
|
42084
|
+
sources: z164.array(z164.string().url().startsWith("https://")).min(1).max(3)
|
|
41875
42085
|
}).superRefine(({ reference, min, max }, context) => {
|
|
41876
42086
|
if (min > reference || reference > max) {
|
|
41877
42087
|
context.addIssue({
|
|
41878
|
-
code:
|
|
42088
|
+
code: z164.ZodIssueCode.custom,
|
|
41879
42089
|
message: "shipping_reference_outside_range",
|
|
41880
42090
|
path: [
|
|
41881
42091
|
"reference"
|
|
@@ -41883,7 +42093,7 @@ var ShippingReferenceSchema = z163.object({
|
|
|
41883
42093
|
});
|
|
41884
42094
|
}
|
|
41885
42095
|
});
|
|
41886
|
-
var SHIPPING_REFERENCES =
|
|
42096
|
+
var SHIPPING_REFERENCES = z164.record(z164.string(), ShippingReferenceSchema).parse(product_costing_shipping_references_default);
|
|
41887
42097
|
var PRODUCT_COSTING_COUNTRY_CODES = Object.freeze(Object.keys(SHIPPING_REFERENCES));
|
|
41888
42098
|
var SPANISH_LOCALE_COUNTRIES = /* @__PURE__ */ new Set([
|
|
41889
42099
|
"MX",
|
|
@@ -42065,18 +42275,18 @@ function getProductCostingCountryName(country) {
|
|
|
42065
42275
|
__name(getProductCostingCountryName, "getProductCostingCountryName");
|
|
42066
42276
|
|
|
42067
42277
|
// ../../packages/product-economics/src/product-costing.ts
|
|
42068
|
-
var ProductCostingInputSchema =
|
|
42069
|
-
country:
|
|
42070
|
-
supplierCost:
|
|
42071
|
-
shippingCost:
|
|
42072
|
-
returnRate:
|
|
42073
|
-
cancellationRate:
|
|
42074
|
-
adsManagerCpa:
|
|
42075
|
-
desiredMargin:
|
|
42278
|
+
var ProductCostingInputSchema = z165.object({
|
|
42279
|
+
country: z165.string().refine(isProductCostingCountryCode, "unsupported_country"),
|
|
42280
|
+
supplierCost: z165.number().finite().max(Number.MAX_SAFE_INTEGER, "amount_too_large").positive("supplier_cost_positive"),
|
|
42281
|
+
shippingCost: z165.number().finite().max(Number.MAX_SAFE_INTEGER, "amount_too_large").nonnegative("shipping_cost_nonnegative"),
|
|
42282
|
+
returnRate: z165.number().finite().min(0, "rate_nonnegative").lt(1, "rate_below_one"),
|
|
42283
|
+
cancellationRate: z165.number().finite().min(0, "rate_nonnegative").lt(1, "rate_below_one"),
|
|
42284
|
+
adsManagerCpa: z165.number().finite().max(Number.MAX_SAFE_INTEGER, "amount_too_large").nonnegative("cpa_nonnegative"),
|
|
42285
|
+
desiredMargin: z165.number().finite().min(0, "margin_nonnegative").lt(1, "margin_below_one")
|
|
42076
42286
|
}).superRefine(({ returnRate, cancellationRate }, context) => {
|
|
42077
42287
|
if (returnRate + cancellationRate >= 1) {
|
|
42078
42288
|
context.addIssue({
|
|
42079
|
-
code:
|
|
42289
|
+
code: z165.ZodIssueCode.custom,
|
|
42080
42290
|
message: "delivery_rate_positive",
|
|
42081
42291
|
path: [
|
|
42082
42292
|
"cancellationRate"
|
|
@@ -42173,15 +42383,15 @@ function calculateProductCosting(rawInput) {
|
|
|
42173
42383
|
__name(calculateProductCosting, "calculateProductCosting");
|
|
42174
42384
|
|
|
42175
42385
|
// src/tools/product-costing.ts
|
|
42176
|
-
import { z as
|
|
42386
|
+
import { z as z166 } from "zod";
|
|
42177
42387
|
var costProductGuidance = getProductMakerCapabilityModelGuidance("cost_product");
|
|
42178
|
-
var optionalAmount = /* @__PURE__ */ __name((description) =>
|
|
42179
|
-
var optionalPercent = /* @__PURE__ */ __name((description) =>
|
|
42180
|
-
var ProductCostingToolInput =
|
|
42181
|
-
country:
|
|
42388
|
+
var optionalAmount = /* @__PURE__ */ __name((description) => z166.number().finite().max(Number.MAX_SAFE_INTEGER).nonnegative().optional().describe(description), "optionalAmount");
|
|
42389
|
+
var optionalPercent = /* @__PURE__ */ __name((description) => z166.number().finite().min(0).lt(100).optional().describe(description), "optionalPercent");
|
|
42390
|
+
var ProductCostingToolInput = z166.object({
|
|
42391
|
+
country: z166.string().trim().toUpperCase().refine(isProductCostingCountryCode, {
|
|
42182
42392
|
message: "Pa\xEDs no soportado por ProductMaker."
|
|
42183
42393
|
}).optional().describe("C\xF3digo ISO-2 de cualquiera de los pa\xEDses disponibles en ProductMaker. Omite para Colombia."),
|
|
42184
|
-
supplierCost:
|
|
42394
|
+
supplierCost: z166.number().finite().max(Number.MAX_SAFE_INTEGER).positive().optional().describe("Costo real de una unidad con el proveedor, en la moneda del pa\xEDs. Requerido salvo que uses supplierCostCop para Colombia."),
|
|
42185
42395
|
supplierCostCop: optionalAmount("Alias anterior para costo del proveedor en Colombia. Prefiere supplierCost."),
|
|
42186
42396
|
shippingCost: optionalAmount("Costo de un env\xEDo en la moneda del pa\xEDs. Omite para usar el valor gu\xEDa vigente."),
|
|
42187
42397
|
shippingCostCop: optionalAmount("Alias anterior para flete en Colombia. Prefiere shippingCost."),
|
|
@@ -42344,7 +42554,7 @@ function formatPercent(value) {
|
|
|
42344
42554
|
__name(formatPercent, "formatPercent");
|
|
42345
42555
|
|
|
42346
42556
|
// src/tools/product-research.ts
|
|
42347
|
-
import { z as
|
|
42557
|
+
import { z as z167 } from "zod";
|
|
42348
42558
|
|
|
42349
42559
|
// src/tools/product-research-idempotency.ts
|
|
42350
42560
|
var RESEARCH_IDEMPOTENCY_WINDOW_MS = 2 * 60 * 60 * 1e3;
|
|
@@ -42715,17 +42925,17 @@ var TERMINAL2 = /* @__PURE__ */ new Set([
|
|
|
42715
42925
|
]);
|
|
42716
42926
|
var POLL_INTERVAL_MS = 5e3;
|
|
42717
42927
|
var MAX_WAIT_SECONDS = 120;
|
|
42718
|
-
var FindInput =
|
|
42928
|
+
var FindInput = z167.object({
|
|
42719
42929
|
targetCountry: ResearchTargetCountryEnum.describe("Pa\xEDs objetivo. S\xF3lo CO, MX, PE, EC y CL tienen cobertura de investigaci\xF3n."),
|
|
42720
42930
|
categoryKey: ResearchCategoryEnum.default("auto").describe('Categor\xEDa a investigar. Usa "auto" para que la IA elija seg\xFAn el mercado.'),
|
|
42721
|
-
confirmed:
|
|
42722
|
-
waitSeconds:
|
|
42931
|
+
confirmed: z167.boolean().describe(`Ponlo en true SOLO despu\xE9s de que el usuario haya aceptado el cargo de ${PRICE_CREDITS} cr\xE9ditos. No lo asumas.`),
|
|
42932
|
+
waitSeconds: z167.number().int().min(0).max(MAX_WAIT_SECONDS).optional().describe("Segundos a esperar el reporte antes de devolver el runId. M\xE1ximo 120.")
|
|
42723
42933
|
});
|
|
42724
|
-
var GetInput =
|
|
42725
|
-
runId:
|
|
42934
|
+
var GetInput = z167.object({
|
|
42935
|
+
runId: z167.string().guid().describe("ID del run devuelto por find_winning_products.")
|
|
42726
42936
|
});
|
|
42727
|
-
var ListInput =
|
|
42728
|
-
limit:
|
|
42937
|
+
var ListInput = z167.object({
|
|
42938
|
+
limit: z167.number().int().min(1).max(20).default(10)
|
|
42729
42939
|
});
|
|
42730
42940
|
function textResult(text4) {
|
|
42731
42941
|
return {
|
|
@@ -42864,17 +43074,17 @@ _Esta llamada no cobr\xF3 cr\xE9ditos: se reutiliz\xF3 una investigaci\xF3n reci
|
|
|
42864
43074
|
__name(registerProductResearchTools, "registerProductResearchTools");
|
|
42865
43075
|
|
|
42866
43076
|
// src/tools/dropshipping-projects.ts
|
|
42867
|
-
import { z as
|
|
43077
|
+
import { z as z168 } from "zod";
|
|
42868
43078
|
var startDropshippingProjectGuidance = getProductMakerCapabilityModelGuidance("start_dropshipping_project");
|
|
42869
43079
|
var costDropshippingProjectGuidance = getProductMakerCapabilityModelGuidance("cost_dropshipping_project");
|
|
42870
43080
|
var guideDropshippingLaunchGuidance = getProductMakerCapabilityModelGuidance("guide_dropshipping_launch");
|
|
42871
|
-
var ProjectId =
|
|
42872
|
-
var DropshippingProjectStatus =
|
|
43081
|
+
var ProjectId = z168.string().guid();
|
|
43082
|
+
var DropshippingProjectStatus = z168.enum([
|
|
42873
43083
|
"active",
|
|
42874
43084
|
"completed",
|
|
42875
43085
|
"archived"
|
|
42876
43086
|
]);
|
|
42877
|
-
var DropshippingProjectPhase =
|
|
43087
|
+
var DropshippingProjectPhase = z168.enum([
|
|
42878
43088
|
"research",
|
|
42879
43089
|
"costing",
|
|
42880
43090
|
"media",
|
|
@@ -42883,21 +43093,21 @@ var DropshippingProjectPhase = z167.enum([
|
|
|
42883
43093
|
"advertising",
|
|
42884
43094
|
"complete"
|
|
42885
43095
|
]);
|
|
42886
|
-
var DropshippingRewardMilestone =
|
|
43096
|
+
var DropshippingRewardMilestone = z168.enum([
|
|
42887
43097
|
"product_selected",
|
|
42888
43098
|
"costing_saved",
|
|
42889
43099
|
"product_media_ready",
|
|
42890
43100
|
"creatives_completed",
|
|
42891
43101
|
"campaign_created"
|
|
42892
43102
|
]);
|
|
42893
|
-
var TargetCountry =
|
|
43103
|
+
var TargetCountry = z168.enum([
|
|
42894
43104
|
"CO",
|
|
42895
43105
|
"MX",
|
|
42896
43106
|
"PE",
|
|
42897
43107
|
"EC",
|
|
42898
43108
|
"CL"
|
|
42899
43109
|
]);
|
|
42900
|
-
var ResearchCategory =
|
|
43110
|
+
var ResearchCategory = z168.enum([
|
|
42901
43111
|
"auto",
|
|
42902
43112
|
"automotive",
|
|
42903
43113
|
"kitchen",
|
|
@@ -42912,7 +43122,7 @@ var ResearchCategory = z167.enum([
|
|
|
42912
43122
|
"garden",
|
|
42913
43123
|
"cleaning"
|
|
42914
43124
|
]);
|
|
42915
|
-
var HttpUrl3 =
|
|
43125
|
+
var HttpUrl3 = z168.string().url().max(2e3).refine((value) => {
|
|
42916
43126
|
try {
|
|
42917
43127
|
return [
|
|
42918
43128
|
"http:",
|
|
@@ -42922,45 +43132,45 @@ var HttpUrl3 = z167.string().url().max(2e3).refine((value) => {
|
|
|
42922
43132
|
return false;
|
|
42923
43133
|
}
|
|
42924
43134
|
}, "URL must use HTTP(S)");
|
|
42925
|
-
var ResearchCandidateOrigin =
|
|
42926
|
-
type:
|
|
43135
|
+
var ResearchCandidateOrigin = z168.object({
|
|
43136
|
+
type: z168.literal("research_candidate"),
|
|
42927
43137
|
runId: ProjectId,
|
|
42928
|
-
candidateSourceId:
|
|
43138
|
+
candidateSourceId: z168.string().min(1).max(160)
|
|
42929
43139
|
});
|
|
42930
|
-
var TaskOrigin =
|
|
42931
|
-
type:
|
|
43140
|
+
var TaskOrigin = z168.object({
|
|
43141
|
+
type: z168.literal("task"),
|
|
42932
43142
|
taskId: ProjectId
|
|
42933
43143
|
});
|
|
42934
|
-
var ManualOrigin =
|
|
42935
|
-
type:
|
|
43144
|
+
var ManualOrigin = z168.object({
|
|
43145
|
+
type: z168.literal("manual"),
|
|
42936
43146
|
clientRequestId: ProjectId,
|
|
42937
|
-
country:
|
|
43147
|
+
country: z168.string().min(2).max(3).optional()
|
|
42938
43148
|
});
|
|
42939
|
-
var StartProjectInput =
|
|
42940
|
-
origin:
|
|
43149
|
+
var StartProjectInput = z168.object({
|
|
43150
|
+
origin: z168.discriminatedUnion("type", [
|
|
42941
43151
|
ResearchCandidateOrigin,
|
|
42942
43152
|
TaskOrigin,
|
|
42943
43153
|
ManualOrigin
|
|
42944
43154
|
]),
|
|
42945
|
-
productName:
|
|
43155
|
+
productName: z168.string().trim().min(1).max(240).optional(),
|
|
42946
43156
|
productUrl: HttpUrl3.optional(),
|
|
42947
|
-
country:
|
|
42948
|
-
languageCode:
|
|
43157
|
+
country: z168.string().min(2).max(3).optional(),
|
|
43158
|
+
languageCode: z168.string().min(2).max(16).optional()
|
|
42949
43159
|
}).strict();
|
|
42950
|
-
var CostProjectInput =
|
|
43160
|
+
var CostProjectInput = z168.object({
|
|
42951
43161
|
projectId: ProjectId,
|
|
42952
|
-
version:
|
|
42953
|
-
country:
|
|
43162
|
+
version: z168.number().int().positive().describe("Version le\xEDda del proyecto. Copia la \xFAltima que viste; no se la pidas al usuario."),
|
|
43163
|
+
country: z168.string().trim().toUpperCase().refine(isProductCostingCountryCode, {
|
|
42954
43164
|
message: "Pa\xEDs no soportado por ProductMaker."
|
|
42955
43165
|
}).describe("C\xF3digo ISO-2 del pa\xEDs del proyecto. Usa el `targetCountry` que devuelve el proyecto."),
|
|
42956
|
-
supplierCost:
|
|
42957
|
-
shippingCost:
|
|
42958
|
-
returnRate:
|
|
42959
|
-
cancellationRate:
|
|
42960
|
-
adsManagerCpa:
|
|
42961
|
-
desiredMargin:
|
|
42962
|
-
});
|
|
42963
|
-
var GuideInput =
|
|
43166
|
+
supplierCost: z168.number().finite().positive().describe("Costo real de una unidad con el proveedor, en la moneda del pa\xEDs. \xDANICO dato que debes pedirle al usuario: nunca lo inventes."),
|
|
43167
|
+
shippingCost: z168.number().finite().nonnegative().optional().describe("Costo de un env\xEDo. Omite para usar el valor gu\xEDa del pa\xEDs en vez de inventarlo."),
|
|
43168
|
+
returnRate: z168.number().finite().min(0).lt(1).optional().describe("Fracci\xF3n de pedidos devueltos (0.25 = 25%). Omite para usar el valor gu\xEDa del pa\xEDs."),
|
|
43169
|
+
cancellationRate: z168.number().finite().min(0).lt(1).optional().describe("Fracci\xF3n de pedidos cancelados (0.15 = 15%). Omite para usar el valor gu\xEDa del pa\xEDs."),
|
|
43170
|
+
adsManagerCpa: z168.number().finite().nonnegative().optional().describe("Costo por compra de Ads Manager. Omite para usar el valor gu\xEDa del pa\xEDs."),
|
|
43171
|
+
desiredMargin: z168.number().finite().min(0).lt(1).optional().describe("Margen deseado (0.1 = 10%). Omite para usar el valor gu\xEDa del pa\xEDs.")
|
|
43172
|
+
});
|
|
43173
|
+
var GuideInput = z168.object({
|
|
42964
43174
|
projectId: ProjectId.optional()
|
|
42965
43175
|
}).strict();
|
|
42966
43176
|
var NEXT_ACTION_KINDS = [
|
|
@@ -42978,21 +43188,21 @@ var NEXT_ACTION_KINDS = [
|
|
|
42978
43188
|
"repair_meta_campaign",
|
|
42979
43189
|
"review_paused_campaign"
|
|
42980
43190
|
];
|
|
42981
|
-
var DropshippingProjectNextAction =
|
|
42982
|
-
kind:
|
|
42983
|
-
href:
|
|
43191
|
+
var DropshippingProjectNextAction = z168.discriminatedUnion("kind", NEXT_ACTION_KINDS.map((kind2) => z168.object({
|
|
43192
|
+
kind: z168.literal(kind2),
|
|
43193
|
+
href: z168.string().min(1)
|
|
42984
43194
|
})));
|
|
42985
|
-
var CostingInputSchema =
|
|
43195
|
+
var CostingInputSchema = z168.object(DropshippingProjectCostingInputSchema.shape).superRefine(({ returnRate, cancellationRate }, context) => {
|
|
42986
43196
|
if (returnRate + cancellationRate >= 1) context.addIssue({
|
|
42987
|
-
code:
|
|
43197
|
+
code: z168.ZodIssueCode.custom,
|
|
42988
43198
|
path: [
|
|
42989
43199
|
"cancellationRate"
|
|
42990
43200
|
]
|
|
42991
43201
|
});
|
|
42992
43202
|
});
|
|
42993
|
-
var FiniteCostingNumber =
|
|
42994
|
-
var CostingResultSchema =
|
|
42995
|
-
country:
|
|
43203
|
+
var FiniteCostingNumber = z168.number().finite();
|
|
43204
|
+
var CostingResultSchema = z168.object({
|
|
43205
|
+
country: z168.string().min(2).max(3),
|
|
42996
43206
|
deliveryRate: FiniteCostingNumber,
|
|
42997
43207
|
adjustedShippingCost: FiniteCostingNumber,
|
|
42998
43208
|
adjustedCpa: FiniteCostingNumber,
|
|
@@ -43005,45 +43215,45 @@ var CostingResultSchema = z167.object({
|
|
|
43005
43215
|
estimatedProfit: FiniteCostingNumber,
|
|
43006
43216
|
actualMargin: FiniteCostingNumber,
|
|
43007
43217
|
breakEvenAdsManagerCpa: FiniteCostingNumber,
|
|
43008
|
-
wasPriceAutoAdjusted:
|
|
43009
|
-
profitabilityStatus:
|
|
43010
|
-
});
|
|
43011
|
-
var RewardProgressSchema =
|
|
43012
|
-
campaignKey:
|
|
43013
|
-
totalCredits:
|
|
43014
|
-
earnedCredits:
|
|
43015
|
-
milestones:
|
|
43218
|
+
wasPriceAutoAdjusted: z168.boolean(),
|
|
43219
|
+
profitabilityStatus: z168.literal("healthy")
|
|
43220
|
+
});
|
|
43221
|
+
var RewardProgressSchema = z168.object({
|
|
43222
|
+
campaignKey: z168.literal("dropshipping-launch-v1"),
|
|
43223
|
+
totalCredits: z168.number().int().positive(),
|
|
43224
|
+
earnedCredits: z168.number().int().nonnegative(),
|
|
43225
|
+
milestones: z168.array(z168.object({
|
|
43016
43226
|
milestone: DropshippingRewardMilestone,
|
|
43017
|
-
credits:
|
|
43018
|
-
available:
|
|
43019
|
-
earned:
|
|
43227
|
+
credits: z168.number().int().positive(),
|
|
43228
|
+
available: z168.boolean().optional(),
|
|
43229
|
+
earned: z168.boolean(),
|
|
43020
43230
|
grantId: ProjectId.nullable(),
|
|
43021
|
-
grantedAt:
|
|
43231
|
+
grantedAt: z168.string().datetime().nullable()
|
|
43022
43232
|
})).length(DropshippingRewardMilestone.options.length)
|
|
43023
43233
|
});
|
|
43024
|
-
var ProjectResponseSchema =
|
|
43234
|
+
var ProjectResponseSchema = z168.object({
|
|
43025
43235
|
id: ProjectId,
|
|
43026
43236
|
taskId: ProjectId.nullable(),
|
|
43027
43237
|
status: DropshippingProjectStatus,
|
|
43028
|
-
originKey:
|
|
43238
|
+
originKey: z168.string().min(1),
|
|
43029
43239
|
researchRunId: ProjectId.nullable(),
|
|
43030
|
-
candidateSourceId:
|
|
43031
|
-
productName:
|
|
43240
|
+
candidateSourceId: z168.string().nullable(),
|
|
43241
|
+
productName: z168.string().nullable(),
|
|
43032
43242
|
productUrl: HttpUrl3.nullable(),
|
|
43033
43243
|
referenceImageUrl: HttpUrl3.nullable(),
|
|
43034
|
-
targetCountry:
|
|
43035
|
-
languageCode:
|
|
43036
|
-
hasReferenceImage:
|
|
43037
|
-
hasWinnerReferenceImage:
|
|
43244
|
+
targetCountry: z168.string().nullable(),
|
|
43245
|
+
languageCode: z168.string().nullable(),
|
|
43246
|
+
hasReferenceImage: z168.boolean(),
|
|
43247
|
+
hasWinnerReferenceImage: z168.boolean(),
|
|
43038
43248
|
costingInput: CostingInputSchema.nullable(),
|
|
43039
43249
|
costingResult: CostingResultSchema.nullable(),
|
|
43040
|
-
costingVersion:
|
|
43041
|
-
version:
|
|
43250
|
+
costingVersion: z168.number().int().positive().nullable(),
|
|
43251
|
+
version: z168.number().int().positive(),
|
|
43042
43252
|
phase: DropshippingProjectPhase,
|
|
43043
43253
|
nextAction: DropshippingProjectNextAction.nullable(),
|
|
43044
43254
|
rewards: RewardProgressSchema,
|
|
43045
|
-
createdAt:
|
|
43046
|
-
updatedAt:
|
|
43255
|
+
createdAt: z168.string().datetime(),
|
|
43256
|
+
updatedAt: z168.string().datetime()
|
|
43047
43257
|
}).passthrough();
|
|
43048
43258
|
var NEXT_ACTION_GUIDANCE = {
|
|
43049
43259
|
cost_product: "Llama `cost_dropshipping_project` con el costo real del proveedor. Nunca lo inventes: p\xEDdeselo al usuario. Es el \xDANICO dato que debes pedirle: omite env\xEDo, devoluciones, cancelaciones, CPA y margen para que ProductMaker use los valores gu\xEDa del pa\xEDs, y luego dile al usuario cu\xE1les us\xF3 por si quiere corregirlos.",
|
|
@@ -43173,58 +43383,58 @@ function registerDropshippingProjectTools(server, api) {
|
|
|
43173
43383
|
__name(registerDropshippingProjectTools, "registerDropshippingProjectTools");
|
|
43174
43384
|
|
|
43175
43385
|
// src/tools/daily-control.ts
|
|
43176
|
-
import { z as
|
|
43386
|
+
import { z as z169 } from "zod";
|
|
43177
43387
|
var getDailyControlGuidance = getProductMakerCapabilityModelGuidance("get_daily_control");
|
|
43178
43388
|
var linkCampaignToProjectGuidance = getProductMakerCapabilityModelGuidance("link_campaign_to_project");
|
|
43179
43389
|
var reportDailyReturnsGuidance = getProductMakerCapabilityModelGuidance("report_daily_returns");
|
|
43180
|
-
var ProviderCampaignIdentifier =
|
|
43181
|
-
var DateOnly =
|
|
43182
|
-
var DailyControlInput =
|
|
43390
|
+
var ProviderCampaignIdentifier = z169.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
|
|
43391
|
+
var DateOnly = z169.string().regex(/^\d{4}-\d{2}-\d{2}$/);
|
|
43392
|
+
var DailyControlInput = z169.object({
|
|
43183
43393
|
date: DateOnly.optional().describe("D\xEDa final de la ventana (YYYY-MM-DD). Si se omite, la ventana termina AYER en UTC \u2014 nunca hoy, porque el d\xEDa en curso est\xE1 incompleto \u2014 y el servidor puede correrla un d\xEDa m\xE1s atr\xE1s si en la zona horaria de la tienda ese d\xEDa todav\xEDa no ha cerrado."),
|
|
43184
|
-
days:
|
|
43185
|
-
projectId:
|
|
43394
|
+
days: z169.number().int().min(1).max(14).default(3).describe("Tama\xF1o de la ventana, 1 a 14 d\xEDas."),
|
|
43395
|
+
projectId: z169.string().guid().optional().describe("Opcional: limita el reporte a un solo proyecto en vez de todos los productos activos.")
|
|
43186
43396
|
}).strict();
|
|
43187
|
-
var LinkCampaignInput =
|
|
43188
|
-
projectId:
|
|
43189
|
-
provider:
|
|
43397
|
+
var LinkCampaignInput = z169.object({
|
|
43398
|
+
projectId: z169.string().guid(),
|
|
43399
|
+
provider: z169.enum([
|
|
43190
43400
|
"meta",
|
|
43191
43401
|
"tiktok"
|
|
43192
43402
|
]),
|
|
43193
43403
|
accountId: ProviderCampaignIdentifier.describe("Cuenta publicitaria del proveedor. Para Meta el servidor la IGNORA y deriva la cuenta real de la campa\xF1a \u2014 se sigue pidiendo aqu\xED solo porque TikTok s\xED la necesita para resolver la campa\xF1a."),
|
|
43194
43404
|
campaignId: ProviderCampaignIdentifier
|
|
43195
43405
|
}).strict();
|
|
43196
|
-
var ReportReturnsInput =
|
|
43197
|
-
projectId:
|
|
43406
|
+
var ReportReturnsInput = z169.object({
|
|
43407
|
+
projectId: z169.string().guid(),
|
|
43198
43408
|
date: DateOnly,
|
|
43199
|
-
returnedOrders:
|
|
43200
|
-
note:
|
|
43201
|
-
}).strict();
|
|
43202
|
-
var DailyControlStatusMirror = DailyControlStatusEnum.or(
|
|
43203
|
-
var DailyControlLightMirror = DailyControlLightEnum.or(
|
|
43204
|
-
var DailyControlSourceMirror = DailyControlSourceEnum.or(
|
|
43205
|
-
var DailyControlVerdictMirror = DailyControlVerdictEnum.or(
|
|
43206
|
-
var DailyControlDayMirror =
|
|
43207
|
-
date:
|
|
43208
|
-
returnedOrders:
|
|
43409
|
+
returnedOrders: z169.number().int().min(0).max(1e5),
|
|
43410
|
+
note: z169.string().trim().max(280).optional()
|
|
43411
|
+
}).strict();
|
|
43412
|
+
var DailyControlStatusMirror = DailyControlStatusEnum.or(z169.string());
|
|
43413
|
+
var DailyControlLightMirror = DailyControlLightEnum.or(z169.string());
|
|
43414
|
+
var DailyControlSourceMirror = DailyControlSourceEnum.or(z169.string());
|
|
43415
|
+
var DailyControlVerdictMirror = DailyControlVerdictEnum.or(z169.string());
|
|
43416
|
+
var DailyControlDayMirror = z169.object({
|
|
43417
|
+
date: z169.string(),
|
|
43418
|
+
returnedOrders: z169.number(),
|
|
43209
43419
|
returnedSource: DailyControlSourceMirror,
|
|
43210
43420
|
cancelledSource: DailyControlSourceMirror,
|
|
43211
|
-
hasEstimates:
|
|
43421
|
+
hasEstimates: z169.boolean(),
|
|
43212
43422
|
light: DailyControlLightMirror
|
|
43213
43423
|
}).passthrough();
|
|
43214
|
-
var DailyControlProductMirror =
|
|
43215
|
-
projectId:
|
|
43216
|
-
productName:
|
|
43424
|
+
var DailyControlProductMirror = z169.object({
|
|
43425
|
+
projectId: z169.string().guid(),
|
|
43426
|
+
productName: z169.string().nullable(),
|
|
43217
43427
|
status: DailyControlStatusMirror,
|
|
43218
|
-
statusMessage:
|
|
43219
|
-
days:
|
|
43428
|
+
statusMessage: z169.string().nullable(),
|
|
43429
|
+
days: z169.array(DailyControlDayMirror),
|
|
43220
43430
|
verdict: DailyControlVerdictMirror.nullable(),
|
|
43221
|
-
rationale:
|
|
43431
|
+
rationale: z169.string().nullable()
|
|
43222
43432
|
}).passthrough();
|
|
43223
|
-
var DailyControlResponseMirror =
|
|
43224
|
-
since:
|
|
43225
|
-
until:
|
|
43226
|
-
products:
|
|
43227
|
-
archivedProjectSpend:
|
|
43433
|
+
var DailyControlResponseMirror = z169.object({
|
|
43434
|
+
since: z169.string(),
|
|
43435
|
+
until: z169.string(),
|
|
43436
|
+
products: z169.array(DailyControlProductMirror),
|
|
43437
|
+
archivedProjectSpend: z169.array(z169.unknown())
|
|
43228
43438
|
}).passthrough();
|
|
43229
43439
|
var MCP_WARNINGS_KEY = "_mcpDailyControlWarnings";
|
|
43230
43440
|
function withWarnings(response) {
|
|
@@ -43352,7 +43562,7 @@ __name(registerAgentMemoryTools, "registerAgentMemoryTools");
|
|
|
43352
43562
|
import { createHash as createHash4 } from "crypto";
|
|
43353
43563
|
import { readFile, stat } from "fs/promises";
|
|
43354
43564
|
import { basename as basename2, isAbsolute, resolve as resolve3 } from "path";
|
|
43355
|
-
import { z as
|
|
43565
|
+
import { z as z170 } from "zod";
|
|
43356
43566
|
var getProductControlGuidance = getProductMakerCapabilityModelGuidance("get_product_control");
|
|
43357
43567
|
var getProductAdsGuidance = getProductMakerCapabilityModelGuidance("get_product_ads");
|
|
43358
43568
|
var getProductScoreboardGuidance = getProductMakerCapabilityModelGuidance("get_product_scoreboard");
|
|
@@ -43369,6 +43579,7 @@ var syncShopifyOrdersGuidance = getProductMakerCapabilityModelGuidance("sync_sho
|
|
|
43369
43579
|
var importOrdersFileGuidance = getProductMakerCapabilityModelGuidance("import_orders_file");
|
|
43370
43580
|
var getDropiStatusGuidance = getProductMakerCapabilityModelGuidance("get_dropi_status");
|
|
43371
43581
|
var syncDropiOrdersGuidance = getProductMakerCapabilityModelGuidance("sync_dropi_orders");
|
|
43582
|
+
var cancelDropiOrderGuidance = getProductMakerCapabilityModelGuidance("cancel_dropi_order");
|
|
43372
43583
|
var createManualProductGuidance = getProductMakerCapabilityModelGuidance("create_manual_product");
|
|
43373
43584
|
var listUnmatchedGuidance = getProductMakerCapabilityModelGuidance("list_unmatched_products");
|
|
43374
43585
|
var resolveUnmatchedGuidance = getProductMakerCapabilityModelGuidance("resolve_unmatched_product");
|
|
@@ -43376,52 +43587,52 @@ var listLinkableCampaignsGuidance = getProductMakerCapabilityModelGuidance("list
|
|
|
43376
43587
|
var linkProductCampaignGuidance = getProductMakerCapabilityModelGuidance("link_product_campaign");
|
|
43377
43588
|
var deleteMonthlyExpenseGuidance = getProductMakerCapabilityModelGuidance("delete_monthly_expense");
|
|
43378
43589
|
var removeProductControlGuidance = getProductMakerCapabilityModelGuidance("remove_product_control");
|
|
43379
|
-
var DateOnly2 =
|
|
43590
|
+
var DateOnly2 = z170.string().regex(/^\d{4}-\d{2}-\d{2}$/);
|
|
43380
43591
|
var IMPORT_BATCH_MAX2 = 50;
|
|
43381
|
-
var ProductControlListInput =
|
|
43382
|
-
days:
|
|
43592
|
+
var ProductControlListInput = z170.object({
|
|
43593
|
+
days: z170.number().int().min(1).max(14).default(3).describe("Tama\xF1o de la ventana, 1 a 14 d\xEDas."),
|
|
43383
43594
|
date: DateOnly2.optional().describe("D\xEDa final de la ventana (YYYY-MM-DD). Si se omite, termina en el \xFAltimo d\xEDa cerrado \u2014 nunca hoy, que est\xE1 incompleto."),
|
|
43384
|
-
shopDomain:
|
|
43595
|
+
shopDomain: z170.string().min(1).optional().describe("Tienda, si tiene m\xE1s de una conectada.")
|
|
43385
43596
|
}).strict();
|
|
43386
|
-
var ProductAdsInput =
|
|
43387
|
-
productControlId:
|
|
43597
|
+
var ProductAdsInput = z170.object({
|
|
43598
|
+
productControlId: z170.string().uuid().describe("El `productControlId` que devuelve get_product_control."),
|
|
43388
43599
|
date: DateOnly2.describe("D\xEDa a leer (YYYY-MM-DD).")
|
|
43389
43600
|
}).strict();
|
|
43390
|
-
var ProductScoreboardInput =
|
|
43391
|
-
productControlId:
|
|
43601
|
+
var ProductScoreboardInput = z170.object({
|
|
43602
|
+
productControlId: z170.string().uuid().describe("El `productControlId` que devuelve get_product_control."),
|
|
43392
43603
|
since: DateOnly2.optional().describe("Primer d\xEDa de la prueba (YYYY-MM-DD). Sin \xE9l, el primer d\xEDa con gasto de sus campa\xF1as."),
|
|
43393
43604
|
until: DateOnly2.optional().describe("\xDAltimo d\xEDa (YYYY-MM-DD). Sin \xE9l, hoy.")
|
|
43394
43605
|
}).strict();
|
|
43395
|
-
var ImportableProductsInput =
|
|
43396
|
-
q:
|
|
43397
|
-
after:
|
|
43398
|
-
shopDomain:
|
|
43606
|
+
var ImportableProductsInput = z170.object({
|
|
43607
|
+
q: z170.string().trim().max(120).optional().describe("B\xFAsqueda por t\xEDtulo. Sin esto un cat\xE1logo grande es inrecorrible."),
|
|
43608
|
+
after: z170.string().max(512).optional().describe("Cursor de la p\xE1gina anterior, tal como vino en la respuesta."),
|
|
43609
|
+
shopDomain: z170.string().min(1).optional()
|
|
43399
43610
|
}).strict();
|
|
43400
|
-
var ImportProductControlsInput =
|
|
43401
|
-
shopifyProductIds:
|
|
43611
|
+
var ImportProductControlsInput = z170.object({
|
|
43612
|
+
shopifyProductIds: z170.array(z170.string().min(1).max(64)).min(1).max(IMPORT_BATCH_MAX2).describe("Identificadores tal como vinieron de list_importable_products. NO los inventes ni los deduzcas del t\xEDtulo."),
|
|
43402
43613
|
// Obligatorio, como en el endpoint: con dos tiendas conectadas, importar
|
|
43403
43614
|
// sin decir a cuál archivaría el producto bajo la tienda equivocada.
|
|
43404
|
-
shopDomain:
|
|
43615
|
+
shopDomain: z170.string().min(1)
|
|
43405
43616
|
}).strict();
|
|
43406
|
-
var SetProductCostingInput =
|
|
43617
|
+
var SetProductCostingInput = z170.object({
|
|
43407
43618
|
/* La identidad, de UNA forma: la del producto nuestro, o la pareja
|
|
43408
43619
|
tienda + id de Shopify. El esquema canónico también las admite juntas,
|
|
43409
43620
|
pero pedirlas por separado evita que el modelo emita una mezcla que
|
|
43410
43621
|
diga dos productos a la vez. */
|
|
43411
|
-
productControlId:
|
|
43412
|
-
manualSellingPrice:
|
|
43413
|
-
offerSellingPrice:
|
|
43414
|
-
shopDomain:
|
|
43415
|
-
shopifyProductId:
|
|
43416
|
-
targetCountry:
|
|
43417
|
-
supplierCost:
|
|
43418
|
-
shippingCost:
|
|
43419
|
-
returnRate:
|
|
43420
|
-
cancellationRate:
|
|
43421
|
-
}).strict();
|
|
43422
|
-
var Count =
|
|
43423
|
-
var ReportProductCountsInput =
|
|
43424
|
-
productControlId:
|
|
43622
|
+
productControlId: z170.string().guid().optional().describe("El id nuestro (lo devuelven get_product_control y create_manual_product). Obligatorio para productos manuales o importados sin tienda."),
|
|
43623
|
+
manualSellingPrice: z170.number().positive().nullable().optional().describe("Precio de venta \u2014 SOLO con productControlId: para el producto sin tienda no hay otra verdad. En un producto de Shopify NO se manda: el precio lo manda la tienda."),
|
|
43624
|
+
offerSellingPrice: z170.number().finite().positive().nullable().optional().describe("Precio de la OFERTA \u2014 SOLO con shopDomain + shopifyProductId, cuando el producto se vende en pack o bundle y el pedido trae m\xE1s de una unidad (p. ej. x2 por 69.990 aunque Shopify diga 34.995 por unidad). Es lo que paga el comprador por pedido, sin descuentos puntuales. Mide el equilibrio en vez del precio de la tienda; null lo borra. Om\xEDtelo para no cambiarlo."),
|
|
43625
|
+
shopDomain: z170.string().min(1).optional(),
|
|
43626
|
+
shopifyProductId: z170.string().min(1).max(64).optional(),
|
|
43627
|
+
targetCountry: z170.string().length(2).describe("Pa\xEDs de venta en ISO-2, que fija moneda y referencia de flete."),
|
|
43628
|
+
supplierCost: z170.number().finite().positive().describe("Lo que le cuesta el producto al proveedor. Nunca cero."),
|
|
43629
|
+
shippingCost: z170.number().finite().nonnegative(),
|
|
43630
|
+
returnRate: z170.number().finite().min(0).lt(1).describe("Proporci\xF3n 0\u20131, no porcentaje: 0.15 es quince por ciento."),
|
|
43631
|
+
cancellationRate: z170.number().finite().min(0).lt(1)
|
|
43632
|
+
}).strict();
|
|
43633
|
+
var Count = z170.number().int().min(0).max(1e5).nullable().optional();
|
|
43634
|
+
var ReportProductCountsInput = z170.object({
|
|
43635
|
+
productControlId: z170.string().guid().describe("El identificador que devuelve get_product_control."),
|
|
43425
43636
|
date: DateOnly2,
|
|
43426
43637
|
orders: Count.describe("Pedidos que entraron ese d\xEDa."),
|
|
43427
43638
|
cancelledOrders: Count,
|
|
@@ -43431,64 +43642,68 @@ var ReportProductCountsInput = z169.object({
|
|
|
43431
43642
|
}).strict();
|
|
43432
43643
|
var MAX_ORDERS_FILE_BYTES = 8 * 1024 * 1024;
|
|
43433
43644
|
var SyncShopifyOrdersInput = SyncShopifyOrdersSchema;
|
|
43434
|
-
var ImportOrdersFileInput =
|
|
43645
|
+
var ImportOrdersFileInput = z170.object({
|
|
43435
43646
|
/** Ruta ABSOLUTA en la máquina de quien usa el MCP. */
|
|
43436
|
-
path:
|
|
43437
|
-
operationId:
|
|
43647
|
+
path: z170.string().min(1),
|
|
43648
|
+
operationId: z170.string().guid().optional(),
|
|
43438
43649
|
/** Solo mirar: devuelve el resumen y no escribe nada. */
|
|
43439
|
-
dryRun:
|
|
43650
|
+
dryRun: z170.boolean().optional()
|
|
43440
43651
|
}).strict();
|
|
43441
|
-
var CreateOperationInput =
|
|
43442
|
-
countryCode:
|
|
43443
|
-
label:
|
|
43652
|
+
var CreateOperationInput = z170.object({
|
|
43653
|
+
countryCode: z170.string().length(2),
|
|
43654
|
+
label: z170.string().trim().min(1).max(60).optional()
|
|
43444
43655
|
}).strict();
|
|
43445
|
-
var MergeProductsInput =
|
|
43446
|
-
sourceId:
|
|
43447
|
-
targetId:
|
|
43656
|
+
var MergeProductsInput = z170.object({
|
|
43657
|
+
sourceId: z170.string().guid(),
|
|
43658
|
+
targetId: z170.string().guid()
|
|
43448
43659
|
}).strict();
|
|
43449
|
-
var SetMonthlyExpenseInput =
|
|
43450
|
-
month:
|
|
43660
|
+
var SetMonthlyExpenseInput = z170.object({
|
|
43661
|
+
month: z170.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/).optional(),
|
|
43451
43662
|
label: SaveMonthlyExpenseSchema.shape.label,
|
|
43452
|
-
amount:
|
|
43453
|
-
operationId:
|
|
43663
|
+
amount: z170.number().finite().min(0),
|
|
43664
|
+
operationId: z170.string().guid().optional()
|
|
43454
43665
|
}).strict();
|
|
43455
|
-
var SetAdSpendInput =
|
|
43456
|
-
month:
|
|
43457
|
-
operationId:
|
|
43666
|
+
var SetAdSpendInput = z170.object({
|
|
43667
|
+
month: z170.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/).optional(),
|
|
43668
|
+
operationId: z170.string().guid().optional(),
|
|
43458
43669
|
/** null RETIRA la corrección; cero afirma que no pautó. */
|
|
43459
|
-
amount:
|
|
43670
|
+
amount: z170.number().finite().min(0).nullable()
|
|
43460
43671
|
}).strict();
|
|
43461
|
-
var GetFinancesInput =
|
|
43462
|
-
month:
|
|
43463
|
-
operationId:
|
|
43672
|
+
var GetFinancesInput = z170.object({
|
|
43673
|
+
month: z170.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/).optional().describe("Mes en YYYY-MM. Si se omite, el mes en curso. Solo mes calendario."),
|
|
43674
|
+
operationId: z170.string().guid().optional().describe("El negocio, si tiene mas de uno. Con uno solo no hace falta decirlo.")
|
|
43464
43675
|
}).strict();
|
|
43465
43676
|
var GetDropiStatusInput = DropiCountryQuerySchema.extend({
|
|
43466
43677
|
countryCode: DropiCountrySchema.optional().describe("Pa\xEDs de la cuenta (ISO-2). Si se omite, el servidor responde por Colombia (CO)."),
|
|
43467
|
-
connectionId:
|
|
43678
|
+
connectionId: z170.string().guid().optional().describe("Una cuenta concreta cuando el pa\xEDs tiene varias. Sale de la lista de conexiones; nunca se inventa.")
|
|
43468
43679
|
});
|
|
43469
43680
|
var SyncDropiOrdersInput = SyncDropiFinancialSchema;
|
|
43470
|
-
var
|
|
43681
|
+
var CancelDropiOrderInput = z170.strictObject({
|
|
43682
|
+
dropiOrderId: DropiOrderIdSchema.describe("N\xFAmero del pedido en Dropi (solo d\xEDgitos), el que muestra \xABMis pedidos\xBB."),
|
|
43683
|
+
...CancelDropiOrderSchema.shape
|
|
43684
|
+
});
|
|
43685
|
+
var CreateManualProductInput = z170.strictObject(CreateManualProductControlSchema.shape).omit({
|
|
43471
43686
|
requestId: true
|
|
43472
43687
|
});
|
|
43473
|
-
var ListUnmatchedProductsInput =
|
|
43474
|
-
operationId:
|
|
43688
|
+
var ListUnmatchedProductsInput = z170.object({
|
|
43689
|
+
operationId: z170.string().guid().optional().describe("El negocio, si tiene mas de uno. Con uno solo no hace falta decirlo.")
|
|
43475
43690
|
}).strict();
|
|
43476
43691
|
var ResolveUnmatchedProductInput = ResolveUnmatchedProductSchema;
|
|
43477
|
-
var ListLinkableCampaignsInput =
|
|
43478
|
-
var LinkProductCampaignInput =
|
|
43479
|
-
provider:
|
|
43692
|
+
var ListLinkableCampaignsInput = z170.object({}).strict();
|
|
43693
|
+
var LinkProductCampaignInput = z170.object({
|
|
43694
|
+
provider: z170.enum([
|
|
43480
43695
|
"meta",
|
|
43481
43696
|
"tiktok"
|
|
43482
43697
|
]).describe("La red publicitaria de la campa\xF1a."),
|
|
43483
|
-
accountId:
|
|
43484
|
-
campaignId:
|
|
43485
|
-
productControlId:
|
|
43486
|
-
shopDomain:
|
|
43487
|
-
shopifyProductId:
|
|
43698
|
+
accountId: z170.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/).describe("La cuenta publicitaria. Sale de list_linkable_campaigns; nunca se inventa."),
|
|
43699
|
+
campaignId: z170.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/).describe("La campa\xF1a. Sale de list_linkable_campaigns; nunca se inventa."),
|
|
43700
|
+
productControlId: z170.string().guid().optional().describe("El id del producto en su control financiero."),
|
|
43701
|
+
shopDomain: z170.string().min(1).optional().describe("La tienda del producto; con shopifyProductId es la otra forma de decir cu\xE1l es."),
|
|
43702
|
+
shopifyProductId: z170.string().min(1).optional().describe("El id del producto en su tienda. Va junto a shopDomain.")
|
|
43488
43703
|
}).strict();
|
|
43489
43704
|
var DeleteMonthlyExpenseInput = DeleteMonthlyExpenseSchema;
|
|
43490
|
-
var RemoveProductControlInput =
|
|
43491
|
-
productControlId:
|
|
43705
|
+
var RemoveProductControlInput = z170.object({
|
|
43706
|
+
productControlId: z170.string().guid().describe("El id del producto en su control. Sale del listado; nunca se inventa.")
|
|
43492
43707
|
}).strict();
|
|
43493
43708
|
function manualProductRequestId(input) {
|
|
43494
43709
|
const digest3 = createHash4("sha256").update(JSON.stringify(input, [
|
|
@@ -43752,6 +43967,17 @@ function registerProductControlTools(server, api, { transport = "http" } = {}) {
|
|
|
43752
43967
|
throw translateError(error);
|
|
43753
43968
|
}
|
|
43754
43969
|
});
|
|
43970
|
+
server.registerTool("cancel_dropi_order", {
|
|
43971
|
+
description: cancelDropiOrderGuidance.summary + " Solo cancela si el pedido est\xE1 en PENDIENTE CONFIRMACION o PENDIENTE y no tiene gu\xEDa; lee el pedido antes de escribir, as\xED que repetirla es seguro y un pedido ya cancelado responde `already_cancelled`. Con gu\xEDa responde `not_cancellable` con `blockedBy: has_guide`: ya no se cancela, se resuelve la novedad (\xABdevolver al remitente\xBB). \xDAsala cuando el comprador pidi\xF3 cancelar (`reason: buyer_requested`) o el vendedor te lo pidi\xF3 (`seller_requested`); despu\xE9s av\xEDsale al vendedor qu\xE9 pedido cancelaste.",
|
|
43972
|
+
inputSchema: CancelDropiOrderInput.shape,
|
|
43973
|
+
annotations: OVERWRITES_EXTERNAL
|
|
43974
|
+
}, async ({ dropiOrderId, ...body }) => {
|
|
43975
|
+
try {
|
|
43976
|
+
return asText(await api.postJson(`/v1/product-control/dropi/orders/${encodeURIComponent(dropiOrderId)}/cancel`, body));
|
|
43977
|
+
} catch (error) {
|
|
43978
|
+
throw translateError(error);
|
|
43979
|
+
}
|
|
43980
|
+
});
|
|
43755
43981
|
server.registerTool("create_manual_product", {
|
|
43756
43982
|
description: createManualProductGuidance.summary + " Pide TODOS los datos antes de llamarla: el costo del proveedor y el flete sin inventar \u2014 un cero volver\xEDa infinitamente rentable el producto. Las dos tasas son proporciones 0\u20131 y SU estimaci\xF3n, no una medici\xF3n. Reintentar con los mismos datos devuelve el mismo producto; no duplica.",
|
|
43757
43983
|
inputSchema: CreateManualProductInput.shape,
|
|
@@ -43858,28 +44084,28 @@ function registerProductControlTools(server, api, { transport = "http" } = {}) {
|
|
|
43858
44084
|
__name(registerProductControlTools, "registerProductControlTools");
|
|
43859
44085
|
|
|
43860
44086
|
// src/tools/market-study-estimate.ts
|
|
43861
|
-
import { z as
|
|
44087
|
+
import { z as z171 } from "zod";
|
|
43862
44088
|
var estimateMarketStudyGuidance = getProductMakerCapabilityModelGuidance("estimate_market_study_cost");
|
|
43863
|
-
var ProductTaskOutputEnum =
|
|
44089
|
+
var ProductTaskOutputEnum = z171.enum([
|
|
43864
44090
|
"landing",
|
|
43865
44091
|
"video",
|
|
43866
44092
|
"image"
|
|
43867
44093
|
]);
|
|
43868
|
-
var EstimateMarketStudyInput =
|
|
43869
|
-
kind:
|
|
44094
|
+
var EstimateMarketStudyInput = z171.object({
|
|
44095
|
+
kind: z171.enum([
|
|
43870
44096
|
"video",
|
|
43871
44097
|
"product_task"
|
|
43872
44098
|
]).describe('"video" para generate_video_creative; "product_task" para create_product_task.'),
|
|
43873
|
-
videoAngleCount:
|
|
43874
|
-
durationSeconds:
|
|
44099
|
+
videoAngleCount: z171.number().int().min(1).max(3).describe("Los mismos 1, 2 o 3 videos que vas a pedir al crear."),
|
|
44100
|
+
durationSeconds: z171.number().int().min(4).max(30).default(15).describe("La misma duraci\xF3n que enviar\xE1s al crear."),
|
|
43875
44101
|
videoStructure: VideoStructureEnum.default("single_take"),
|
|
43876
44102
|
videoQuality: VideoQualityEnum.default("economy"),
|
|
43877
44103
|
videoResolution: VideoResolutionEnum.default("480p"),
|
|
43878
|
-
productImageCount:
|
|
44104
|
+
productImageCount: z171.number().int().min(1).max(5).optional().describe("Cantidad de fotos del producto que adjuntar\xE1s (1-5)."),
|
|
43879
44105
|
outputs: ProductTaskOutputEnum.array().min(1).max(3).optional().describe('Solo para kind="product_task": los mismos outputs de create_product_task. Default: todos.'),
|
|
43880
|
-
generateAiMusic:
|
|
44106
|
+
generateAiMusic: z171.boolean().optional(),
|
|
43881
44107
|
generateAiEdit: AiEditRequestSchema.optional(),
|
|
43882
|
-
replicateWinnerWhenFound:
|
|
44108
|
+
replicateWinnerWhenFound: z171.boolean().optional().describe("La misma preferencia que enviar\xE1s al crear. false excluye la reserva de r\xE9plica del ganador de la cotizaci\xF3n con estudio.")
|
|
43883
44109
|
}).strict();
|
|
43884
44110
|
function buildMarketStudyEstimateRequests(input) {
|
|
43885
44111
|
const quotesVideo = input.kind === "video" || (input.outputs ?? [
|