@productmaker/mcp 12.16.0 → 12.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/http.js +85 -9
- package/dist/stdio.js +85 -9
- package/package.json +1 -1
package/dist/http.js
CHANGED
|
@@ -2587,6 +2587,11 @@ var DEFAULT_PRICING = {
|
|
|
2587
2587
|
ourCostCents: 1.65,
|
|
2588
2588
|
userPriceCents: 3.3
|
|
2589
2589
|
},
|
|
2590
|
+
// Market gap study: one ~150 s segment of a long ad (over 180 s) read whole.
|
|
2591
|
+
"openrouter:market-ad-long-video-analysis": {
|
|
2592
|
+
ourCostCents: 5,
|
|
2593
|
+
userPriceCents: 10
|
|
2594
|
+
},
|
|
2590
2595
|
"openrouter:market-ad-image-analysis": {
|
|
2591
2596
|
ourCostCents: 1.1,
|
|
2592
2597
|
userPriceCents: 2.2
|
|
@@ -8837,11 +8842,18 @@ var LandingEditAttachmentDto = z23.object({
|
|
|
8837
8842
|
width: z23.number().int().positive().nullable(),
|
|
8838
8843
|
height: z23.number().int().positive().nullable()
|
|
8839
8844
|
});
|
|
8840
|
-
var
|
|
8841
|
-
attachmentId: z23.string().uuid(),
|
|
8845
|
+
var ApplyLandingCarouselGifCommand = z23.object({
|
|
8842
8846
|
expectedRevision: z23.number().int().nonnegative(),
|
|
8843
8847
|
idempotencyKey: z23.string().uuid()
|
|
8844
8848
|
}).strict();
|
|
8849
|
+
var ApplyLandingCarouselGifRequest = z23.union([
|
|
8850
|
+
ApplyLandingCarouselGifCommand.extend({
|
|
8851
|
+
attachmentId: z23.string().uuid()
|
|
8852
|
+
}),
|
|
8853
|
+
ApplyLandingCarouselGifCommand.extend({
|
|
8854
|
+
operationId: z23.string().uuid()
|
|
8855
|
+
})
|
|
8856
|
+
]);
|
|
8845
8857
|
var ApplyLandingCarouselGifResponse = z23.object({
|
|
8846
8858
|
artifact: CodeLandingArtifactSchema,
|
|
8847
8859
|
appliedRevision: z23.number().int().positive(),
|
|
@@ -10634,6 +10646,8 @@ var CompetitorCommercialSignalsSchema = z37.object({
|
|
|
10634
10646
|
isActive: z37.boolean().optional(),
|
|
10635
10647
|
deliveryStartTime: z37.string().datetime().optional(),
|
|
10636
10648
|
deliveryStopTime: z37.string().datetime().optional(),
|
|
10649
|
+
/** Meta EU ads only: people the ad reached in the EU (DSA transparency). */
|
|
10650
|
+
euTotalReach: z37.number().int().nonnegative().optional(),
|
|
10637
10651
|
exactCreativeDuplicateCount: z37.number().int().positive().default(1),
|
|
10638
10652
|
advertiserVariantCount: z37.number().int().positive().default(1)
|
|
10639
10653
|
}).strict();
|
|
@@ -10697,11 +10711,23 @@ var CompetitorCreativeFormatSchema = z37.object({
|
|
|
10697
10711
|
]),
|
|
10698
10712
|
/** ISO 639-1 of the spoken words, or "none" without speech. */
|
|
10699
10713
|
spokenLanguage: z37.string().trim().toLowerCase().regex(/^(?:[a-z]{2}|none)$/).optional(),
|
|
10700
|
-
framing: CreativeFormatFramingSchema.optional()
|
|
10714
|
+
framing: CreativeFormatFramingSchema.optional(),
|
|
10715
|
+
/**
|
|
10716
|
+
* Market gap study only: the ad tells a story with characters, a conflict
|
|
10717
|
+
* and its resolution through the product (a novela-style ad).
|
|
10718
|
+
*/
|
|
10719
|
+
story: z37.boolean().optional(),
|
|
10720
|
+
/** Market gap study only: how the picture is made. */
|
|
10721
|
+
render: z37.enum([
|
|
10722
|
+
"animated",
|
|
10723
|
+
"live_action",
|
|
10724
|
+
"mixed"
|
|
10725
|
+
]).optional()
|
|
10701
10726
|
}).strict();
|
|
10702
10727
|
var CompetitorCommercialProfileSchema = z37.object({
|
|
10703
10728
|
durationSec: z37.number().finite().positive(),
|
|
10704
|
-
|
|
10729
|
+
// Long market gap ads (up to 30 min) keep their whole transcript.
|
|
10730
|
+
transcript: z37.string().max(6e4).optional(),
|
|
10705
10731
|
hook: z37.string().trim().min(1).max(1e3),
|
|
10706
10732
|
body: z37.string().trim().min(1).max(3e3),
|
|
10707
10733
|
cta: z37.string().trim().min(1).max(1e3),
|
|
@@ -10844,7 +10870,14 @@ var MarketFormatDirectionSchema = z37.object({
|
|
|
10844
10870
|
/** Server-owned: the anchor ad's cut rhythm, binding for the director. */
|
|
10845
10871
|
pacing: MarketFormatPacingSchema.optional(),
|
|
10846
10872
|
/** Server-owned: no member speaks the target market's language. */
|
|
10847
|
-
languageFallback: z37.boolean().optional()
|
|
10873
|
+
languageFallback: z37.boolean().optional(),
|
|
10874
|
+
/** Server-owned, market gap study: countries whose analyzed ads use this format. */
|
|
10875
|
+
markets: z37.array(z37.string().trim().min(2).max(3)).max(48).optional(),
|
|
10876
|
+
/**
|
|
10877
|
+
* Server-owned, market gap study: the reference market runs this format
|
|
10878
|
+
* and the seller's market does not, so it is ranked first.
|
|
10879
|
+
*/
|
|
10880
|
+
opportunity: z37.boolean().optional()
|
|
10848
10881
|
}).strict();
|
|
10849
10882
|
var MarketMenuItemSchema = z37.object({
|
|
10850
10883
|
kind: z37.string().trim().min(1).max(120),
|
|
@@ -11319,6 +11352,14 @@ var CreativeEngineRecipeSchema = z38.object({
|
|
|
11319
11352
|
* resume with the hash their manifest binds.
|
|
11320
11353
|
*/
|
|
11321
11354
|
sceneContextPolicy: z38.literal("scene_scoped_v1").optional(),
|
|
11355
|
+
/**
|
|
11356
|
+
* Frozen at entry: a fresh director plan and every review read a
|
|
11357
|
+
* summary of the market study (winning formats and their menu, the
|
|
11358
|
+
* dossier once, the winner in winner mode and the top reference ads as a
|
|
11359
|
+
* compact profile) instead of its corpus. Same models. Absent (recipes
|
|
11360
|
+
* in flight at deploy) keeps the prepared wire.
|
|
11361
|
+
*/
|
|
11362
|
+
studyContextPolicy: z38.literal("study_summary_v1").optional(),
|
|
11322
11363
|
/**
|
|
11323
11364
|
* Frozen at entry: every engine model request sends its prompt as a
|
|
11324
11365
|
* cacheable prefix — the system instructions, then the static contract
|
|
@@ -14213,6 +14254,9 @@ var MVPResult = z50.object({
|
|
|
14213
14254
|
"product",
|
|
14214
14255
|
"service"
|
|
14215
14256
|
]).optional(),
|
|
14257
|
+
/** Set only on a seller «Duplicar» copy: the completed task it was copied
|
|
14258
|
+
* from. The copy is independent and publishes as a new Shopify product. */
|
|
14259
|
+
duplicatedFromTaskId: z50.string().guid().optional(),
|
|
14216
14260
|
product: Product,
|
|
14217
14261
|
// READ contract, NOT a generation cap. The generator writes exactly 3 angles
|
|
14218
14262
|
// (`replaceAngles` renumbers positions 0..2), but a duplicated angles run
|
|
@@ -23731,8 +23775,19 @@ var ProductControlRowSchema = z102.object({
|
|
|
23731
23775
|
shopifyProductId: z102.string().nullable(),
|
|
23732
23776
|
title: z102.string(),
|
|
23733
23777
|
imageUrl: z102.string().nullable(),
|
|
23734
|
-
/**
|
|
23778
|
+
/** El precio con el que se mide el producto: el de la oferta si la
|
|
23779
|
+
* vendedora lo dio (pack x2, bundle), si no el de la tienda. */
|
|
23735
23780
|
sellingPrice: z102.number().nullable(),
|
|
23781
|
+
/** El precio de la tienda tal cual, para que un desfase con la oferta se
|
|
23782
|
+
* vea. Opcional para payloads anteriores. */
|
|
23783
|
+
shopSellingPrice: z102.number().nullable().optional(),
|
|
23784
|
+
/** De dónde sale `sellingPrice`: `offer` (precio de la oferta guardado),
|
|
23785
|
+
* `shop` (la tienda) o `manual` (producto sin tienda). */
|
|
23786
|
+
sellingPriceSource: z102.enum([
|
|
23787
|
+
"shop",
|
|
23788
|
+
"offer",
|
|
23789
|
+
"manual"
|
|
23790
|
+
]).nullable().optional(),
|
|
23736
23791
|
currency: z102.string().nullable(),
|
|
23737
23792
|
/** URL pública del producto, para que pueda abrirlo. */
|
|
23738
23793
|
onlineStoreUrl: z102.string().nullable(),
|
|
@@ -23873,6 +23928,12 @@ var SaveProductControlCostingSchema = z102.object({
|
|
|
23873
23928
|
productControlId: z102.string().guid().optional(),
|
|
23874
23929
|
/** Su precio de venta, solo si el producto no vive en Shopify. */
|
|
23875
23930
|
manualSellingPrice: z102.number().positive().nullable().optional(),
|
|
23931
|
+
/**
|
|
23932
|
+
* Precio de la OFERTA de un producto de Shopify, cuando se vende en pack
|
|
23933
|
+
* o bundle (x2 por 69.990 aunque la tienda diga 34.995 por unidad). Es
|
|
23934
|
+
* el que mide el equilibrio; `null` lo borra y vuelve al de la tienda.
|
|
23935
|
+
*/
|
|
23936
|
+
offerSellingPrice: z102.number().finite().positive().nullable().optional(),
|
|
23876
23937
|
targetCountry: z102.string().min(2).max(2),
|
|
23877
23938
|
supplierCost: z102.number().finite().positive(),
|
|
23878
23939
|
shippingCost: z102.number().finite().nonnegative(),
|
|
@@ -23888,6 +23949,15 @@ var SaveProductControlCostingSchema = z102.object({
|
|
|
23888
23949
|
]
|
|
23889
23950
|
});
|
|
23890
23951
|
}
|
|
23952
|
+
if (value.offerSellingPrice != null && !value.shopifyProductId) {
|
|
23953
|
+
ctx.addIssue({
|
|
23954
|
+
code: z102.ZodIssueCode.custom,
|
|
23955
|
+
message: "offer_price_needs_shop_product",
|
|
23956
|
+
path: [
|
|
23957
|
+
"offerSellingPrice"
|
|
23958
|
+
]
|
|
23959
|
+
});
|
|
23960
|
+
}
|
|
23891
23961
|
if (!value.shopifyProductId && !value.productControlId) {
|
|
23892
23962
|
ctx.addIssue({
|
|
23893
23963
|
code: z102.ZodIssueCode.custom,
|
|
@@ -25962,7 +26032,7 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25962
26032
|
], [
|
|
25963
26033
|
"product_control"
|
|
25964
26034
|
]),
|
|
25965
|
-
defineCapability("set_product_costing", "
|
|
26035
|
+
defineCapability("set_product_costing", "5b9c7a253c9e7326ba499fc307c72bbadf1623345d0bcc5ed4c40d03c8ee1b61", "state_change", "business", [
|
|
25966
26036
|
"state_change"
|
|
25967
26037
|
], [
|
|
25968
26038
|
/* La identidad sin tienda solo existe en el contrato MCP: el
|
|
@@ -25974,6 +26044,11 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25974
26044
|
slot("selling_price", false, [
|
|
25975
26045
|
"manualSellingPrice"
|
|
25976
26046
|
], []),
|
|
26047
|
+
// El precio de la oferta (pack/bundle) lo fija el agente por MCP; el
|
|
26048
|
+
// esquema de WhatsApp no lo declara.
|
|
26049
|
+
slot("offer_price", false, [
|
|
26050
|
+
"offerSellingPrice"
|
|
26051
|
+
], []),
|
|
25977
26052
|
slot("product", false, [
|
|
25978
26053
|
"shopifyProductId"
|
|
25979
26054
|
]),
|
|
@@ -32439,7 +32514,7 @@ var ApiClient = class {
|
|
|
32439
32514
|
};
|
|
32440
32515
|
|
|
32441
32516
|
// src/index.ts
|
|
32442
|
-
var MCP_VERSION = "12.
|
|
32517
|
+
var MCP_VERSION = "12.17.0";
|
|
32443
32518
|
|
|
32444
32519
|
// src/meta-upload-app.ts
|
|
32445
32520
|
import { readFileSync } from "fs";
|
|
@@ -42703,6 +42778,7 @@ var SetProductCostingInput = z160.object({
|
|
|
42703
42778
|
diga dos productos a la vez. */
|
|
42704
42779
|
productControlId: z160.string().guid().optional().describe("El id nuestro (lo devuelven get_product_control y create_manual_product). Obligatorio para productos manuales o importados sin tienda."),
|
|
42705
42780
|
manualSellingPrice: z160.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."),
|
|
42781
|
+
offerSellingPrice: z160.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."),
|
|
42706
42782
|
shopDomain: z160.string().min(1).optional(),
|
|
42707
42783
|
shopifyProductId: z160.string().min(1).max(64).optional(),
|
|
42708
42784
|
targetCountry: z160.string().length(2).describe("Pa\xEDs de venta en ISO-2, que fija moneda y referencia de flete."),
|
|
@@ -42974,7 +43050,7 @@ function registerProductControlTools(server, api, { transport = "http" } = {}) {
|
|
|
42974
43050
|
}
|
|
42975
43051
|
});
|
|
42976
43052
|
server.registerTool("set_product_costing", {
|
|
42977
|
-
description: setProductCostingGuidance.summary + " El producto se identifica de UNA forma: `productControlId` para el manual o importado sin tienda, o `shopDomain` + `shopifyProductId` para el de la tienda \u2014 nunca las dos mezcladas. El precio de venta SOLO viaja con `productControlId` (`manualSellingPrice`): para el producto sin tienda no hay otra verdad; para el de Shopify lo manda la tienda y aceptarlo crear\xEDa una segunda que se desincroniza en silencio. Las dos tasas son proporciones entre 0 y 1 y son la ESTIMACI\xD3N de la persona, no una medici\xF3n \u2014 si ella ya tiene los n\xFAmeros reales del d\xEDa, eso es report_product_counts. Nunca inventes un costo ni lo deduzcas del precio: sin costo real no hay sem\xE1foro, y un cero volver\xEDa infinitamente rentable cualquier producto.",
|
|
43053
|
+
description: setProductCostingGuidance.summary + " El producto se identifica de UNA forma: `productControlId` para el manual o importado sin tienda, o `shopDomain` + `shopifyProductId` para el de la tienda \u2014 nunca las dos mezcladas. El precio de venta SOLO viaja con `productControlId` (`manualSellingPrice`): para el producto sin tienda no hay otra verdad; para el de Shopify lo manda la tienda y aceptarlo crear\xEDa una segunda que se desincroniza en silencio. La excepci\xF3n es la oferta en pack o bundle (`offerSellingPrice`, solo con el de Shopify): la fila devuelve `sellingPriceSource` y `shopSellingPrice` para que un desfase se vea, y conviene revisarla contra el total de los pedidos de Dropi. Las dos tasas son proporciones entre 0 y 1 y son la ESTIMACI\xD3N de la persona, no una medici\xF3n \u2014 si ella ya tiene los n\xFAmeros reales del d\xEDa, eso es report_product_counts. Nunca inventes un costo ni lo deduzcas del precio: sin costo real no hay sem\xE1foro, y un cero volver\xEDa infinitamente rentable cualquier producto.",
|
|
42978
43054
|
inputSchema: SetProductCostingInput.shape,
|
|
42979
43055
|
annotations: OVERWRITES_INTERNAL
|
|
42980
43056
|
}, async (input) => {
|
package/dist/stdio.js
CHANGED
|
@@ -2362,6 +2362,11 @@ var DEFAULT_PRICING = {
|
|
|
2362
2362
|
ourCostCents: 1.65,
|
|
2363
2363
|
userPriceCents: 3.3
|
|
2364
2364
|
},
|
|
2365
|
+
// Market gap study: one ~150 s segment of a long ad (over 180 s) read whole.
|
|
2366
|
+
"openrouter:market-ad-long-video-analysis": {
|
|
2367
|
+
ourCostCents: 5,
|
|
2368
|
+
userPriceCents: 10
|
|
2369
|
+
},
|
|
2365
2370
|
"openrouter:market-ad-image-analysis": {
|
|
2366
2371
|
ourCostCents: 1.1,
|
|
2367
2372
|
userPriceCents: 2.2
|
|
@@ -8612,11 +8617,18 @@ var LandingEditAttachmentDto = z23.object({
|
|
|
8612
8617
|
width: z23.number().int().positive().nullable(),
|
|
8613
8618
|
height: z23.number().int().positive().nullable()
|
|
8614
8619
|
});
|
|
8615
|
-
var
|
|
8616
|
-
attachmentId: z23.string().uuid(),
|
|
8620
|
+
var ApplyLandingCarouselGifCommand = z23.object({
|
|
8617
8621
|
expectedRevision: z23.number().int().nonnegative(),
|
|
8618
8622
|
idempotencyKey: z23.string().uuid()
|
|
8619
8623
|
}).strict();
|
|
8624
|
+
var ApplyLandingCarouselGifRequest = z23.union([
|
|
8625
|
+
ApplyLandingCarouselGifCommand.extend({
|
|
8626
|
+
attachmentId: z23.string().uuid()
|
|
8627
|
+
}),
|
|
8628
|
+
ApplyLandingCarouselGifCommand.extend({
|
|
8629
|
+
operationId: z23.string().uuid()
|
|
8630
|
+
})
|
|
8631
|
+
]);
|
|
8620
8632
|
var ApplyLandingCarouselGifResponse = z23.object({
|
|
8621
8633
|
artifact: CodeLandingArtifactSchema,
|
|
8622
8634
|
appliedRevision: z23.number().int().positive(),
|
|
@@ -10409,6 +10421,8 @@ var CompetitorCommercialSignalsSchema = z37.object({
|
|
|
10409
10421
|
isActive: z37.boolean().optional(),
|
|
10410
10422
|
deliveryStartTime: z37.string().datetime().optional(),
|
|
10411
10423
|
deliveryStopTime: z37.string().datetime().optional(),
|
|
10424
|
+
/** Meta EU ads only: people the ad reached in the EU (DSA transparency). */
|
|
10425
|
+
euTotalReach: z37.number().int().nonnegative().optional(),
|
|
10412
10426
|
exactCreativeDuplicateCount: z37.number().int().positive().default(1),
|
|
10413
10427
|
advertiserVariantCount: z37.number().int().positive().default(1)
|
|
10414
10428
|
}).strict();
|
|
@@ -10472,11 +10486,23 @@ var CompetitorCreativeFormatSchema = z37.object({
|
|
|
10472
10486
|
]),
|
|
10473
10487
|
/** ISO 639-1 of the spoken words, or "none" without speech. */
|
|
10474
10488
|
spokenLanguage: z37.string().trim().toLowerCase().regex(/^(?:[a-z]{2}|none)$/).optional(),
|
|
10475
|
-
framing: CreativeFormatFramingSchema.optional()
|
|
10489
|
+
framing: CreativeFormatFramingSchema.optional(),
|
|
10490
|
+
/**
|
|
10491
|
+
* Market gap study only: the ad tells a story with characters, a conflict
|
|
10492
|
+
* and its resolution through the product (a novela-style ad).
|
|
10493
|
+
*/
|
|
10494
|
+
story: z37.boolean().optional(),
|
|
10495
|
+
/** Market gap study only: how the picture is made. */
|
|
10496
|
+
render: z37.enum([
|
|
10497
|
+
"animated",
|
|
10498
|
+
"live_action",
|
|
10499
|
+
"mixed"
|
|
10500
|
+
]).optional()
|
|
10476
10501
|
}).strict();
|
|
10477
10502
|
var CompetitorCommercialProfileSchema = z37.object({
|
|
10478
10503
|
durationSec: z37.number().finite().positive(),
|
|
10479
|
-
|
|
10504
|
+
// Long market gap ads (up to 30 min) keep their whole transcript.
|
|
10505
|
+
transcript: z37.string().max(6e4).optional(),
|
|
10480
10506
|
hook: z37.string().trim().min(1).max(1e3),
|
|
10481
10507
|
body: z37.string().trim().min(1).max(3e3),
|
|
10482
10508
|
cta: z37.string().trim().min(1).max(1e3),
|
|
@@ -10619,7 +10645,14 @@ var MarketFormatDirectionSchema = z37.object({
|
|
|
10619
10645
|
/** Server-owned: the anchor ad's cut rhythm, binding for the director. */
|
|
10620
10646
|
pacing: MarketFormatPacingSchema.optional(),
|
|
10621
10647
|
/** Server-owned: no member speaks the target market's language. */
|
|
10622
|
-
languageFallback: z37.boolean().optional()
|
|
10648
|
+
languageFallback: z37.boolean().optional(),
|
|
10649
|
+
/** Server-owned, market gap study: countries whose analyzed ads use this format. */
|
|
10650
|
+
markets: z37.array(z37.string().trim().min(2).max(3)).max(48).optional(),
|
|
10651
|
+
/**
|
|
10652
|
+
* Server-owned, market gap study: the reference market runs this format
|
|
10653
|
+
* and the seller's market does not, so it is ranked first.
|
|
10654
|
+
*/
|
|
10655
|
+
opportunity: z37.boolean().optional()
|
|
10623
10656
|
}).strict();
|
|
10624
10657
|
var MarketMenuItemSchema = z37.object({
|
|
10625
10658
|
kind: z37.string().trim().min(1).max(120),
|
|
@@ -11094,6 +11127,14 @@ var CreativeEngineRecipeSchema = z38.object({
|
|
|
11094
11127
|
* resume with the hash their manifest binds.
|
|
11095
11128
|
*/
|
|
11096
11129
|
sceneContextPolicy: z38.literal("scene_scoped_v1").optional(),
|
|
11130
|
+
/**
|
|
11131
|
+
* Frozen at entry: a fresh director plan and every review read a
|
|
11132
|
+
* summary of the market study (winning formats and their menu, the
|
|
11133
|
+
* dossier once, the winner in winner mode and the top reference ads as a
|
|
11134
|
+
* compact profile) instead of its corpus. Same models. Absent (recipes
|
|
11135
|
+
* in flight at deploy) keeps the prepared wire.
|
|
11136
|
+
*/
|
|
11137
|
+
studyContextPolicy: z38.literal("study_summary_v1").optional(),
|
|
11097
11138
|
/**
|
|
11098
11139
|
* Frozen at entry: every engine model request sends its prompt as a
|
|
11099
11140
|
* cacheable prefix — the system instructions, then the static contract
|
|
@@ -13988,6 +14029,9 @@ var MVPResult = z50.object({
|
|
|
13988
14029
|
"product",
|
|
13989
14030
|
"service"
|
|
13990
14031
|
]).optional(),
|
|
14032
|
+
/** Set only on a seller «Duplicar» copy: the completed task it was copied
|
|
14033
|
+
* from. The copy is independent and publishes as a new Shopify product. */
|
|
14034
|
+
duplicatedFromTaskId: z50.string().guid().optional(),
|
|
13991
14035
|
product: Product,
|
|
13992
14036
|
// READ contract, NOT a generation cap. The generator writes exactly 3 angles
|
|
13993
14037
|
// (`replaceAngles` renumbers positions 0..2), but a duplicated angles run
|
|
@@ -23506,8 +23550,19 @@ var ProductControlRowSchema = z102.object({
|
|
|
23506
23550
|
shopifyProductId: z102.string().nullable(),
|
|
23507
23551
|
title: z102.string(),
|
|
23508
23552
|
imageUrl: z102.string().nullable(),
|
|
23509
|
-
/**
|
|
23553
|
+
/** El precio con el que se mide el producto: el de la oferta si la
|
|
23554
|
+
* vendedora lo dio (pack x2, bundle), si no el de la tienda. */
|
|
23510
23555
|
sellingPrice: z102.number().nullable(),
|
|
23556
|
+
/** El precio de la tienda tal cual, para que un desfase con la oferta se
|
|
23557
|
+
* vea. Opcional para payloads anteriores. */
|
|
23558
|
+
shopSellingPrice: z102.number().nullable().optional(),
|
|
23559
|
+
/** De dónde sale `sellingPrice`: `offer` (precio de la oferta guardado),
|
|
23560
|
+
* `shop` (la tienda) o `manual` (producto sin tienda). */
|
|
23561
|
+
sellingPriceSource: z102.enum([
|
|
23562
|
+
"shop",
|
|
23563
|
+
"offer",
|
|
23564
|
+
"manual"
|
|
23565
|
+
]).nullable().optional(),
|
|
23511
23566
|
currency: z102.string().nullable(),
|
|
23512
23567
|
/** URL pública del producto, para que pueda abrirlo. */
|
|
23513
23568
|
onlineStoreUrl: z102.string().nullable(),
|
|
@@ -23648,6 +23703,12 @@ var SaveProductControlCostingSchema = z102.object({
|
|
|
23648
23703
|
productControlId: z102.string().guid().optional(),
|
|
23649
23704
|
/** Su precio de venta, solo si el producto no vive en Shopify. */
|
|
23650
23705
|
manualSellingPrice: z102.number().positive().nullable().optional(),
|
|
23706
|
+
/**
|
|
23707
|
+
* Precio de la OFERTA de un producto de Shopify, cuando se vende en pack
|
|
23708
|
+
* o bundle (x2 por 69.990 aunque la tienda diga 34.995 por unidad). Es
|
|
23709
|
+
* el que mide el equilibrio; `null` lo borra y vuelve al de la tienda.
|
|
23710
|
+
*/
|
|
23711
|
+
offerSellingPrice: z102.number().finite().positive().nullable().optional(),
|
|
23651
23712
|
targetCountry: z102.string().min(2).max(2),
|
|
23652
23713
|
supplierCost: z102.number().finite().positive(),
|
|
23653
23714
|
shippingCost: z102.number().finite().nonnegative(),
|
|
@@ -23663,6 +23724,15 @@ var SaveProductControlCostingSchema = z102.object({
|
|
|
23663
23724
|
]
|
|
23664
23725
|
});
|
|
23665
23726
|
}
|
|
23727
|
+
if (value.offerSellingPrice != null && !value.shopifyProductId) {
|
|
23728
|
+
ctx.addIssue({
|
|
23729
|
+
code: z102.ZodIssueCode.custom,
|
|
23730
|
+
message: "offer_price_needs_shop_product",
|
|
23731
|
+
path: [
|
|
23732
|
+
"offerSellingPrice"
|
|
23733
|
+
]
|
|
23734
|
+
});
|
|
23735
|
+
}
|
|
23666
23736
|
if (!value.shopifyProductId && !value.productControlId) {
|
|
23667
23737
|
ctx.addIssue({
|
|
23668
23738
|
code: z102.ZodIssueCode.custom,
|
|
@@ -25737,7 +25807,7 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25737
25807
|
], [
|
|
25738
25808
|
"product_control"
|
|
25739
25809
|
]),
|
|
25740
|
-
defineCapability("set_product_costing", "
|
|
25810
|
+
defineCapability("set_product_costing", "5b9c7a253c9e7326ba499fc307c72bbadf1623345d0bcc5ed4c40d03c8ee1b61", "state_change", "business", [
|
|
25741
25811
|
"state_change"
|
|
25742
25812
|
], [
|
|
25743
25813
|
/* La identidad sin tienda solo existe en el contrato MCP: el
|
|
@@ -25749,6 +25819,11 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25749
25819
|
slot("selling_price", false, [
|
|
25750
25820
|
"manualSellingPrice"
|
|
25751
25821
|
], []),
|
|
25822
|
+
// El precio de la oferta (pack/bundle) lo fija el agente por MCP; el
|
|
25823
|
+
// esquema de WhatsApp no lo declara.
|
|
25824
|
+
slot("offer_price", false, [
|
|
25825
|
+
"offerSellingPrice"
|
|
25826
|
+
], []),
|
|
25752
25827
|
slot("product", false, [
|
|
25753
25828
|
"shopifyProductId"
|
|
25754
25829
|
]),
|
|
@@ -30766,7 +30841,7 @@ var ApiClient = class {
|
|
|
30766
30841
|
};
|
|
30767
30842
|
|
|
30768
30843
|
// src/index.ts
|
|
30769
|
-
var MCP_VERSION = "12.
|
|
30844
|
+
var MCP_VERSION = "12.17.0";
|
|
30770
30845
|
|
|
30771
30846
|
// src/meta-upload-app.ts
|
|
30772
30847
|
import { readFileSync } from "fs";
|
|
@@ -41188,6 +41263,7 @@ var SetProductCostingInput = z159.object({
|
|
|
41188
41263
|
diga dos productos a la vez. */
|
|
41189
41264
|
productControlId: z159.string().guid().optional().describe("El id nuestro (lo devuelven get_product_control y create_manual_product). Obligatorio para productos manuales o importados sin tienda."),
|
|
41190
41265
|
manualSellingPrice: z159.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."),
|
|
41266
|
+
offerSellingPrice: z159.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."),
|
|
41191
41267
|
shopDomain: z159.string().min(1).optional(),
|
|
41192
41268
|
shopifyProductId: z159.string().min(1).max(64).optional(),
|
|
41193
41269
|
targetCountry: z159.string().length(2).describe("Pa\xEDs de venta en ISO-2, que fija moneda y referencia de flete."),
|
|
@@ -41459,7 +41535,7 @@ function registerProductControlTools(server, api, { transport = "http" } = {}) {
|
|
|
41459
41535
|
}
|
|
41460
41536
|
});
|
|
41461
41537
|
server.registerTool("set_product_costing", {
|
|
41462
|
-
description: setProductCostingGuidance.summary + " El producto se identifica de UNA forma: `productControlId` para el manual o importado sin tienda, o `shopDomain` + `shopifyProductId` para el de la tienda \u2014 nunca las dos mezcladas. El precio de venta SOLO viaja con `productControlId` (`manualSellingPrice`): para el producto sin tienda no hay otra verdad; para el de Shopify lo manda la tienda y aceptarlo crear\xEDa una segunda que se desincroniza en silencio. Las dos tasas son proporciones entre 0 y 1 y son la ESTIMACI\xD3N de la persona, no una medici\xF3n \u2014 si ella ya tiene los n\xFAmeros reales del d\xEDa, eso es report_product_counts. Nunca inventes un costo ni lo deduzcas del precio: sin costo real no hay sem\xE1foro, y un cero volver\xEDa infinitamente rentable cualquier producto.",
|
|
41538
|
+
description: setProductCostingGuidance.summary + " El producto se identifica de UNA forma: `productControlId` para el manual o importado sin tienda, o `shopDomain` + `shopifyProductId` para el de la tienda \u2014 nunca las dos mezcladas. El precio de venta SOLO viaja con `productControlId` (`manualSellingPrice`): para el producto sin tienda no hay otra verdad; para el de Shopify lo manda la tienda y aceptarlo crear\xEDa una segunda que se desincroniza en silencio. La excepci\xF3n es la oferta en pack o bundle (`offerSellingPrice`, solo con el de Shopify): la fila devuelve `sellingPriceSource` y `shopSellingPrice` para que un desfase se vea, y conviene revisarla contra el total de los pedidos de Dropi. Las dos tasas son proporciones entre 0 y 1 y son la ESTIMACI\xD3N de la persona, no una medici\xF3n \u2014 si ella ya tiene los n\xFAmeros reales del d\xEDa, eso es report_product_counts. Nunca inventes un costo ni lo deduzcas del precio: sin costo real no hay sem\xE1foro, y un cero volver\xEDa infinitamente rentable cualquier producto.",
|
|
41463
41539
|
inputSchema: SetProductCostingInput.shape,
|
|
41464
41540
|
annotations: OVERWRITES_INTERNAL
|
|
41465
41541
|
}, async (input) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@productmaker/mcp",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.17.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "ProductMaker MCP server — cost products, generate landing pages, UGC videos, and ad creatives, and publish to Shopify, Meta Ads, and TikTok Ads.",
|