@productmaker/mcp 12.15.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 +164 -18
- package/dist/stdio.js +164 -18
- 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
|
|
@@ -12727,6 +12768,43 @@ var ShopifyPublicationMode = z42.enum([
|
|
|
12727
12768
|
"existing",
|
|
12728
12769
|
"new"
|
|
12729
12770
|
]);
|
|
12771
|
+
var ShopifyShippingCheckRequest = z42.object({
|
|
12772
|
+
shopDomain: z42.string().min(3).max(120),
|
|
12773
|
+
publicationMode: ShopifyPublicationMode,
|
|
12774
|
+
targetProductId: z42.string().min(1).max(300).optional()
|
|
12775
|
+
});
|
|
12776
|
+
var ShopifyShippingCheckResponse = z42.object({
|
|
12777
|
+
warning: z42.discriminatedUnion("code", [
|
|
12778
|
+
z42.object({
|
|
12779
|
+
code: z42.enum([
|
|
12780
|
+
"MARKET_INACTIVE",
|
|
12781
|
+
"NO_SHIPPING_RATE"
|
|
12782
|
+
]),
|
|
12783
|
+
country: z42.string().regex(/^[A-Z]{2}$/),
|
|
12784
|
+
locationName: z42.string().optional(),
|
|
12785
|
+
settingsUrl: z42.string().url()
|
|
12786
|
+
}),
|
|
12787
|
+
z42.object({
|
|
12788
|
+
code: z42.literal("OFFER_UNAVAILABLE"),
|
|
12789
|
+
units: z42.number().int().positive(),
|
|
12790
|
+
settingsUrl: z42.string().url()
|
|
12791
|
+
})
|
|
12792
|
+
]).nullable()
|
|
12793
|
+
});
|
|
12794
|
+
function shopifyPublishAdvisoryMessage(warning) {
|
|
12795
|
+
if (warning.code === "OFFER_UNAVAILABLE") {
|
|
12796
|
+
const unit = warning.units === 1 ? "unidad" : "unidades";
|
|
12797
|
+
return `La oferta de ${warning.units} ${unit} no est\xE1 disponible para comprar.`;
|
|
12798
|
+
}
|
|
12799
|
+
const country = new Intl.DisplayNames([
|
|
12800
|
+
"es"
|
|
12801
|
+
], {
|
|
12802
|
+
type: "region"
|
|
12803
|
+
}).of(warning.country);
|
|
12804
|
+
if (warning.code === "MARKET_INACTIVE") return `${country} no tiene un mercado activo.`;
|
|
12805
|
+
return warning.locationName ? `Falta una tarifa de env\xEDo para ${country} en ${warning.locationName}.` : `Falta una tarifa de env\xEDo para ${country}.`;
|
|
12806
|
+
}
|
|
12807
|
+
__name(shopifyPublishAdvisoryMessage, "shopifyPublishAdvisoryMessage");
|
|
12730
12808
|
var SHOPIFY_ANNOUNCEMENT_BAR_MAX_LENGTH = 160;
|
|
12731
12809
|
var ShopifyPublishRequest = z42.object({
|
|
12732
12810
|
/** Correlates a mutation with read-only recovery after a lost response. */
|
|
@@ -14176,6 +14254,9 @@ var MVPResult = z50.object({
|
|
|
14176
14254
|
"product",
|
|
14177
14255
|
"service"
|
|
14178
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(),
|
|
14179
14260
|
product: Product,
|
|
14180
14261
|
// READ contract, NOT a generation cap. The generator writes exactly 3 angles
|
|
14181
14262
|
// (`replaceAngles` renumbers positions 0..2), but a duplicated angles run
|
|
@@ -23694,8 +23775,19 @@ var ProductControlRowSchema = z102.object({
|
|
|
23694
23775
|
shopifyProductId: z102.string().nullable(),
|
|
23695
23776
|
title: z102.string(),
|
|
23696
23777
|
imageUrl: z102.string().nullable(),
|
|
23697
|
-
/**
|
|
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. */
|
|
23698
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(),
|
|
23699
23791
|
currency: z102.string().nullable(),
|
|
23700
23792
|
/** URL pública del producto, para que pueda abrirlo. */
|
|
23701
23793
|
onlineStoreUrl: z102.string().nullable(),
|
|
@@ -23836,6 +23928,12 @@ var SaveProductControlCostingSchema = z102.object({
|
|
|
23836
23928
|
productControlId: z102.string().guid().optional(),
|
|
23837
23929
|
/** Su precio de venta, solo si el producto no vive en Shopify. */
|
|
23838
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(),
|
|
23839
23937
|
targetCountry: z102.string().min(2).max(2),
|
|
23840
23938
|
supplierCost: z102.number().finite().positive(),
|
|
23841
23939
|
shippingCost: z102.number().finite().nonnegative(),
|
|
@@ -23851,6 +23949,15 @@ var SaveProductControlCostingSchema = z102.object({
|
|
|
23851
23949
|
]
|
|
23852
23950
|
});
|
|
23853
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
|
+
}
|
|
23854
23961
|
if (!value.shopifyProductId && !value.productControlId) {
|
|
23855
23962
|
ctx.addIssue({
|
|
23856
23963
|
code: z102.ZodIssueCode.custom,
|
|
@@ -25345,7 +25452,7 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25345
25452
|
], [
|
|
25346
25453
|
"landing_pixel"
|
|
25347
25454
|
]),
|
|
25348
|
-
defineCapability("list_shopify_products", "
|
|
25455
|
+
defineCapability("list_shopify_products", "9c0e51d1c0026539d635b043e1fa3a7903ffee31a13fd732578641104d085a8f", "none", "read_only", [
|
|
25349
25456
|
"read"
|
|
25350
25457
|
], [
|
|
25351
25458
|
slot("shop", true, [
|
|
@@ -25356,7 +25463,13 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25356
25463
|
]),
|
|
25357
25464
|
slot("task", false, [
|
|
25358
25465
|
"taskId"
|
|
25359
|
-
])
|
|
25466
|
+
]),
|
|
25467
|
+
slot("publication_mode", false, [
|
|
25468
|
+
"publicationMode"
|
|
25469
|
+
], []),
|
|
25470
|
+
slot("target_product", false, [
|
|
25471
|
+
"targetProductId"
|
|
25472
|
+
], [])
|
|
25360
25473
|
], [
|
|
25361
25474
|
"shop"
|
|
25362
25475
|
], [
|
|
@@ -25919,7 +26032,7 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25919
26032
|
], [
|
|
25920
26033
|
"product_control"
|
|
25921
26034
|
]),
|
|
25922
|
-
defineCapability("set_product_costing", "
|
|
26035
|
+
defineCapability("set_product_costing", "5b9c7a253c9e7326ba499fc307c72bbadf1623345d0bcc5ed4c40d03c8ee1b61", "state_change", "business", [
|
|
25923
26036
|
"state_change"
|
|
25924
26037
|
], [
|
|
25925
26038
|
/* La identidad sin tienda solo existe en el contrato MCP: el
|
|
@@ -25931,6 +26044,11 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25931
26044
|
slot("selling_price", false, [
|
|
25932
26045
|
"manualSellingPrice"
|
|
25933
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
|
+
], []),
|
|
25934
26052
|
slot("product", false, [
|
|
25935
26053
|
"shopifyProductId"
|
|
25936
26054
|
]),
|
|
@@ -31952,7 +32070,7 @@ var START_DROPSHIPPING_PROMPT = [
|
|
|
31952
32070
|
"",
|
|
31953
32071
|
"Use the existing creative/task tools for generation, preserve their estimate and confirmation gates, and keep polling get_task_status until the task is done, errored, or paused \u2014 a timed-out poll means it is still running, so call again. When it pauses, show me the draft and ask me; only answer it yourself through resolve_pending_action if I delegated that decision to you or the task runs with aiDecidesAll / reviewMode automatic. Verify actual outputs before calling the creative stage complete.",
|
|
31954
32072
|
"",
|
|
31955
|
-
"Before Shopify publication, call list_shopify_shops, check the real task readiness
|
|
32073
|
+
"Before Shopify publication, call list_shopify_shops, check the real task readiness and ask whether the product has variants. Call list_shopify_products with taskId and the intended publicationMode (and targetProductId for existing) to check the selected destination. Show any warning and its Shopify link with the intended publication, then wait for explicit approval before calling publish_to_shopify. Warnings do not block publication. Report the exact blocker when publication is not ready. If recovery is needs_input, show every typed issue and ask me for missing values. Only send commerceCorrection with confirmed:true after I confirm the exact currency, unit price and pack totals. Never invent prices, convert currency or erase the offer. If the context changed, review it again; open_editor means use the ProductMaker editor. Saved corrections do not prove publication: verify uncertain results before another attempt.",
|
|
31956
32074
|
"",
|
|
31957
32075
|
"Before Meta publication, call list_meta_destinations, show the available Business portfolios, ad accounts and Facebook Pages, and let me choose the exact portfolioId, adAccountId and pageId; never choose the first option silently. Then collect budget, country and optional tracking inputs, show the intended mutation, and wait for explicit approval. Use publish_to_meta for one task or publish_creatives_to_meta for selected assets across tasks/media. ProductMaker campaigns must remain PAUSED and require manual activation. Use get_meta_campaign_status only to verify the created campaign.",
|
|
31958
32076
|
"",
|
|
@@ -32396,7 +32514,7 @@ var ApiClient = class {
|
|
|
32396
32514
|
};
|
|
32397
32515
|
|
|
32398
32516
|
// src/index.ts
|
|
32399
|
-
var MCP_VERSION = "12.
|
|
32517
|
+
var MCP_VERSION = "12.17.0";
|
|
32400
32518
|
|
|
32401
32519
|
// src/meta-upload-app.ts
|
|
32402
32520
|
import { readFileSync } from "fs";
|
|
@@ -39679,22 +39797,49 @@ function registerConnectionTools(server, api) {
|
|
|
39679
39797
|
}
|
|
39680
39798
|
});
|
|
39681
39799
|
server.registerTool("list_shopify_products", {
|
|
39682
|
-
description: listShopifyProductsGuidance.summary + ' Usa el `id` devuelto junto con `publicationMode="existing"` en `publish_to_shopify`.
|
|
39800
|
+
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.',
|
|
39683
39801
|
inputSchema: z149.object({
|
|
39684
39802
|
shopDomain: z149.string().min(3).max(120),
|
|
39685
39803
|
query: z149.string().trim().max(120).optional(),
|
|
39686
|
-
taskId: z149.string().guid().optional()
|
|
39804
|
+
taskId: z149.string().guid().optional(),
|
|
39805
|
+
publicationMode: ShopifyPublicationMode.optional(),
|
|
39806
|
+
targetProductId: z149.string().min(1).max(300).optional()
|
|
39687
39807
|
}).shape,
|
|
39688
39808
|
annotations: READS_EXTERNAL
|
|
39689
|
-
}, async ({ shopDomain, query, taskId }) => {
|
|
39809
|
+
}, async ({ shopDomain, query, taskId, publicationMode, targetProductId }) => {
|
|
39690
39810
|
try {
|
|
39811
|
+
if (publicationMode && (!taskId || publicationMode === "existing" && !targetProductId)) {
|
|
39812
|
+
return {
|
|
39813
|
+
isError: true,
|
|
39814
|
+
content: [
|
|
39815
|
+
{
|
|
39816
|
+
type: "text",
|
|
39817
|
+
text: "Indica taskId y, para existing, tambi\xE9n targetProductId."
|
|
39818
|
+
}
|
|
39819
|
+
]
|
|
39820
|
+
};
|
|
39821
|
+
}
|
|
39691
39822
|
const params = new URLSearchParams({
|
|
39692
39823
|
shopDomain
|
|
39693
39824
|
});
|
|
39694
39825
|
if (query) params.set("query", query);
|
|
39695
39826
|
if (taskId) params.set("taskId", taskId);
|
|
39696
|
-
const
|
|
39697
|
-
|
|
39827
|
+
const [catalog, advisory] = await Promise.all([
|
|
39828
|
+
!publicationMode || query ? api.getJson(`/v1/shopify/products?${params.toString()}`) : {},
|
|
39829
|
+
publicationMode && taskId ? api.postJson(`/v1/tasks/${encodeURIComponent(taskId)}/publish/shopify/shipping-check`, {
|
|
39830
|
+
shopDomain,
|
|
39831
|
+
publicationMode,
|
|
39832
|
+
targetProductId
|
|
39833
|
+
}).then((response) => ShopifyShippingCheckResponse.parse(response)) : null
|
|
39834
|
+
]);
|
|
39835
|
+
const warning = advisory?.warning;
|
|
39836
|
+
return asText(warning ? {
|
|
39837
|
+
...catalog,
|
|
39838
|
+
warning: {
|
|
39839
|
+
...warning,
|
|
39840
|
+
message: shopifyPublishAdvisoryMessage(warning)
|
|
39841
|
+
}
|
|
39842
|
+
} : catalog);
|
|
39698
39843
|
} catch (e) {
|
|
39699
39844
|
throw translateError(e);
|
|
39700
39845
|
}
|
|
@@ -40271,7 +40416,7 @@ var TikTokInput = z151.object({
|
|
|
40271
40416
|
function registerPublishTools(server, api, opts = {}) {
|
|
40272
40417
|
const transport = opts.transport ?? "http";
|
|
40273
40418
|
server.registerTool("publish_to_shopify", {
|
|
40274
|
-
description: publishToShopifyGuidance.summary + " Precondici\xF3n: la tarea debe estar en status='complete' \u2014 usa `get_task_status` antes. Por defecto `publicationMode=auto`: si esta tarea ya fue publicada en esa tienda, actualiza ESE MISMO producto y conserva URL, precio, variantes, inventario y SKU; si no, crea uno. Usa `existing` + `targetProductId` cuando el usuario elija otro producto y `new` s\xF3lo si pide crear uno nuevo. ANTES de llamar preg\xFAntale \"\xBFTu producto tiene variantes (talla, color, etc.)?\" y pasa `showVariantPicker: true` si responde que s\xED. Por defecto publica TODAS las im\xE1genes generadas; pasa `numLandingImages` s\xF3lo si el usuario pide menos. Tambi\xE9n publica el GIF de la landing si la tarea tiene uno aprobado por QA; pasa `includeLandingGif: false` s\xF3lo si el usuario no lo quiere. En code landings con una oferta expl\xEDcita de packs, ProductMaker s\xF3lo publica el selector si variantes reales de Shopify cobran los totales exactos; la respuesta explica si las cre\xF3, verific\xF3 o descart\xF3 por no existir ahorro. Si devuelve SHOPIFY_PUBLISH_INPUT_REQUIRED, muestra todos los problemas de recovery y solicita los importes faltantes. Solo env\xEDa commerceCorrection con su revisi\xF3n/huella y confirmed:true despu\xE9s de confirmar los valores exactos; nunca inventes importes, conviertas moneda ni elimines ofertas. Si adem\xE1s trae correctionRejected, lo que el vendedor confirm\xF3 fue rechazado: l\xE9ele `reason` ANTES de volver a pedir datos. Un contexto obsoleto requiere volver a revisar; open_editor (incluido SHOPIFY_PUBLISH_CORRECTION_NOT_CONVERGED) requiere el editor de ProductMaker y NO se reenv\xEDa la misma correcci\xF3n. SHOPIFY_PUBLISH_VERIFICATION_FAILED trae en `reason` el siguiente paso: reintenta una vez y si se repite sigue ese paso. P\xEDxeles (landing cl\xE1sica): antes de publicar llama `list_shopify_landing_pixels`, mu\xE9strale a la persona los p\xEDxeles que quedar\xE1n y preg\xFAntale si quiere quitar alguno o agregar uno nuevo de Meta o TikTok; pasa su respuesta en `landingPixels`. La elecci\xF3n se guarda por tienda y aplica a todas sus landings cl\xE1sicas de ProductMaker; el tema y las otras p\xE1ginas no cambian. Si devuelve SHOPIFY_THEME_SETUP_REQUIRED, el tema de la tienda no tiene el bloque Code Landing y nada se public\xF3: env\xEDa al usuario el themeEditorDeepLink del error para abrir el editor del tema de Shopify, p\xEDdele que agregue el bloque y pulse Guardar (una sola vez por tienda), y reintenta s\xF3lo despu\xE9s. Ante resultado incierto, verifica la tarea/tienda antes de volver a publicar, especialmente con new; commerceCorrectionSaved no prueba publicaci\xF3n. La respuesta es markdown con el link a la landing y al producto.",
|
|
40419
|
+
description: publishToShopifyGuidance.summary + " Antes de pedir confirmaci\xF3n, usa list_shopify_products con taskId y publicationMode para revisar el destino. Si devuelve un aviso, muestra el mensaje y el enlace de Shopify. El aviso permite continuar. Precondici\xF3n: la tarea debe estar en status='complete' \u2014 usa `get_task_status` antes. Por defecto `publicationMode=auto`: si esta tarea ya fue publicada en esa tienda, actualiza ESE MISMO producto y conserva URL, precio, variantes, inventario y SKU; si no, crea uno. Usa `existing` + `targetProductId` cuando el usuario elija otro producto y `new` s\xF3lo si pide crear uno nuevo. ANTES de llamar preg\xFAntale \"\xBFTu producto tiene variantes (talla, color, etc.)?\" y pasa `showVariantPicker: true` si responde que s\xED. Por defecto publica TODAS las im\xE1genes generadas; pasa `numLandingImages` s\xF3lo si el usuario pide menos. Tambi\xE9n publica el GIF de la landing si la tarea tiene uno aprobado por QA; pasa `includeLandingGif: false` s\xF3lo si el usuario no lo quiere. En code landings con una oferta expl\xEDcita de packs, ProductMaker s\xF3lo publica el selector si variantes reales de Shopify cobran los totales exactos; la respuesta explica si las cre\xF3, verific\xF3 o descart\xF3 por no existir ahorro. Si devuelve SHOPIFY_PUBLISH_INPUT_REQUIRED, muestra todos los problemas de recovery y solicita los importes faltantes. Solo env\xEDa commerceCorrection con su revisi\xF3n/huella y confirmed:true despu\xE9s de confirmar los valores exactos; nunca inventes importes, conviertas moneda ni elimines ofertas. Si adem\xE1s trae correctionRejected, lo que el vendedor confirm\xF3 fue rechazado: l\xE9ele `reason` ANTES de volver a pedir datos. Un contexto obsoleto requiere volver a revisar; open_editor (incluido SHOPIFY_PUBLISH_CORRECTION_NOT_CONVERGED) requiere el editor de ProductMaker y NO se reenv\xEDa la misma correcci\xF3n. SHOPIFY_PUBLISH_VERIFICATION_FAILED trae en `reason` el siguiente paso: reintenta una vez y si se repite sigue ese paso. P\xEDxeles (landing cl\xE1sica): antes de publicar llama `list_shopify_landing_pixels`, mu\xE9strale a la persona los p\xEDxeles que quedar\xE1n y preg\xFAntale si quiere quitar alguno o agregar uno nuevo de Meta o TikTok; pasa su respuesta en `landingPixels`. La elecci\xF3n se guarda por tienda y aplica a todas sus landings cl\xE1sicas de ProductMaker; el tema y las otras p\xE1ginas no cambian. Si devuelve SHOPIFY_THEME_SETUP_REQUIRED, el tema de la tienda no tiene el bloque Code Landing y nada se public\xF3: env\xEDa al usuario el themeEditorDeepLink del error para abrir el editor del tema de Shopify, p\xEDdele que agregue el bloque y pulse Guardar (una sola vez por tienda), y reintenta s\xF3lo despu\xE9s. Ante resultado incierto, verifica la tarea/tienda antes de volver a publicar, especialmente con new; commerceCorrectionSaved no prueba publicaci\xF3n. La respuesta es markdown con el link a la landing y al producto.",
|
|
40275
40420
|
inputSchema: ShopifyInput.shape,
|
|
40276
40421
|
// Publication reaches the public storefront, beyond private account data.
|
|
40277
40422
|
annotations: {
|
|
@@ -42633,6 +42778,7 @@ var SetProductCostingInput = z160.object({
|
|
|
42633
42778
|
diga dos productos a la vez. */
|
|
42634
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."),
|
|
42635
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."),
|
|
42636
42782
|
shopDomain: z160.string().min(1).optional(),
|
|
42637
42783
|
shopifyProductId: z160.string().min(1).max(64).optional(),
|
|
42638
42784
|
targetCountry: z160.string().length(2).describe("Pa\xEDs de venta en ISO-2, que fija moneda y referencia de flete."),
|
|
@@ -42904,7 +43050,7 @@ function registerProductControlTools(server, api, { transport = "http" } = {}) {
|
|
|
42904
43050
|
}
|
|
42905
43051
|
});
|
|
42906
43052
|
server.registerTool("set_product_costing", {
|
|
42907
|
-
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.",
|
|
42908
43054
|
inputSchema: SetProductCostingInput.shape,
|
|
42909
43055
|
annotations: OVERWRITES_INTERNAL
|
|
42910
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
|
|
@@ -12502,6 +12543,43 @@ var ShopifyPublicationMode = z42.enum([
|
|
|
12502
12543
|
"existing",
|
|
12503
12544
|
"new"
|
|
12504
12545
|
]);
|
|
12546
|
+
var ShopifyShippingCheckRequest = z42.object({
|
|
12547
|
+
shopDomain: z42.string().min(3).max(120),
|
|
12548
|
+
publicationMode: ShopifyPublicationMode,
|
|
12549
|
+
targetProductId: z42.string().min(1).max(300).optional()
|
|
12550
|
+
});
|
|
12551
|
+
var ShopifyShippingCheckResponse = z42.object({
|
|
12552
|
+
warning: z42.discriminatedUnion("code", [
|
|
12553
|
+
z42.object({
|
|
12554
|
+
code: z42.enum([
|
|
12555
|
+
"MARKET_INACTIVE",
|
|
12556
|
+
"NO_SHIPPING_RATE"
|
|
12557
|
+
]),
|
|
12558
|
+
country: z42.string().regex(/^[A-Z]{2}$/),
|
|
12559
|
+
locationName: z42.string().optional(),
|
|
12560
|
+
settingsUrl: z42.string().url()
|
|
12561
|
+
}),
|
|
12562
|
+
z42.object({
|
|
12563
|
+
code: z42.literal("OFFER_UNAVAILABLE"),
|
|
12564
|
+
units: z42.number().int().positive(),
|
|
12565
|
+
settingsUrl: z42.string().url()
|
|
12566
|
+
})
|
|
12567
|
+
]).nullable()
|
|
12568
|
+
});
|
|
12569
|
+
function shopifyPublishAdvisoryMessage(warning) {
|
|
12570
|
+
if (warning.code === "OFFER_UNAVAILABLE") {
|
|
12571
|
+
const unit = warning.units === 1 ? "unidad" : "unidades";
|
|
12572
|
+
return `La oferta de ${warning.units} ${unit} no est\xE1 disponible para comprar.`;
|
|
12573
|
+
}
|
|
12574
|
+
const country = new Intl.DisplayNames([
|
|
12575
|
+
"es"
|
|
12576
|
+
], {
|
|
12577
|
+
type: "region"
|
|
12578
|
+
}).of(warning.country);
|
|
12579
|
+
if (warning.code === "MARKET_INACTIVE") return `${country} no tiene un mercado activo.`;
|
|
12580
|
+
return warning.locationName ? `Falta una tarifa de env\xEDo para ${country} en ${warning.locationName}.` : `Falta una tarifa de env\xEDo para ${country}.`;
|
|
12581
|
+
}
|
|
12582
|
+
__name(shopifyPublishAdvisoryMessage, "shopifyPublishAdvisoryMessage");
|
|
12505
12583
|
var SHOPIFY_ANNOUNCEMENT_BAR_MAX_LENGTH = 160;
|
|
12506
12584
|
var ShopifyPublishRequest = z42.object({
|
|
12507
12585
|
/** Correlates a mutation with read-only recovery after a lost response. */
|
|
@@ -13951,6 +14029,9 @@ var MVPResult = z50.object({
|
|
|
13951
14029
|
"product",
|
|
13952
14030
|
"service"
|
|
13953
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(),
|
|
13954
14035
|
product: Product,
|
|
13955
14036
|
// READ contract, NOT a generation cap. The generator writes exactly 3 angles
|
|
13956
14037
|
// (`replaceAngles` renumbers positions 0..2), but a duplicated angles run
|
|
@@ -23469,8 +23550,19 @@ var ProductControlRowSchema = z102.object({
|
|
|
23469
23550
|
shopifyProductId: z102.string().nullable(),
|
|
23470
23551
|
title: z102.string(),
|
|
23471
23552
|
imageUrl: z102.string().nullable(),
|
|
23472
|
-
/**
|
|
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. */
|
|
23473
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(),
|
|
23474
23566
|
currency: z102.string().nullable(),
|
|
23475
23567
|
/** URL pública del producto, para que pueda abrirlo. */
|
|
23476
23568
|
onlineStoreUrl: z102.string().nullable(),
|
|
@@ -23611,6 +23703,12 @@ var SaveProductControlCostingSchema = z102.object({
|
|
|
23611
23703
|
productControlId: z102.string().guid().optional(),
|
|
23612
23704
|
/** Su precio de venta, solo si el producto no vive en Shopify. */
|
|
23613
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(),
|
|
23614
23712
|
targetCountry: z102.string().min(2).max(2),
|
|
23615
23713
|
supplierCost: z102.number().finite().positive(),
|
|
23616
23714
|
shippingCost: z102.number().finite().nonnegative(),
|
|
@@ -23626,6 +23724,15 @@ var SaveProductControlCostingSchema = z102.object({
|
|
|
23626
23724
|
]
|
|
23627
23725
|
});
|
|
23628
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
|
+
}
|
|
23629
23736
|
if (!value.shopifyProductId && !value.productControlId) {
|
|
23630
23737
|
ctx.addIssue({
|
|
23631
23738
|
code: z102.ZodIssueCode.custom,
|
|
@@ -25120,7 +25227,7 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25120
25227
|
], [
|
|
25121
25228
|
"landing_pixel"
|
|
25122
25229
|
]),
|
|
25123
|
-
defineCapability("list_shopify_products", "
|
|
25230
|
+
defineCapability("list_shopify_products", "9c0e51d1c0026539d635b043e1fa3a7903ffee31a13fd732578641104d085a8f", "none", "read_only", [
|
|
25124
25231
|
"read"
|
|
25125
25232
|
], [
|
|
25126
25233
|
slot("shop", true, [
|
|
@@ -25131,7 +25238,13 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25131
25238
|
]),
|
|
25132
25239
|
slot("task", false, [
|
|
25133
25240
|
"taskId"
|
|
25134
|
-
])
|
|
25241
|
+
]),
|
|
25242
|
+
slot("publication_mode", false, [
|
|
25243
|
+
"publicationMode"
|
|
25244
|
+
], []),
|
|
25245
|
+
slot("target_product", false, [
|
|
25246
|
+
"targetProductId"
|
|
25247
|
+
], [])
|
|
25135
25248
|
], [
|
|
25136
25249
|
"shop"
|
|
25137
25250
|
], [
|
|
@@ -25694,7 +25807,7 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25694
25807
|
], [
|
|
25695
25808
|
"product_control"
|
|
25696
25809
|
]),
|
|
25697
|
-
defineCapability("set_product_costing", "
|
|
25810
|
+
defineCapability("set_product_costing", "5b9c7a253c9e7326ba499fc307c72bbadf1623345d0bcc5ed4c40d03c8ee1b61", "state_change", "business", [
|
|
25698
25811
|
"state_change"
|
|
25699
25812
|
], [
|
|
25700
25813
|
/* La identidad sin tienda solo existe en el contrato MCP: el
|
|
@@ -25706,6 +25819,11 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
|
|
|
25706
25819
|
slot("selling_price", false, [
|
|
25707
25820
|
"manualSellingPrice"
|
|
25708
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
|
+
], []),
|
|
25709
25827
|
slot("product", false, [
|
|
25710
25828
|
"shopifyProductId"
|
|
25711
25829
|
]),
|
|
@@ -30723,7 +30841,7 @@ var ApiClient = class {
|
|
|
30723
30841
|
};
|
|
30724
30842
|
|
|
30725
30843
|
// src/index.ts
|
|
30726
|
-
var MCP_VERSION = "12.
|
|
30844
|
+
var MCP_VERSION = "12.17.0";
|
|
30727
30845
|
|
|
30728
30846
|
// src/meta-upload-app.ts
|
|
30729
30847
|
import { readFileSync } from "fs";
|
|
@@ -38164,22 +38282,49 @@ function registerConnectionTools(server, api) {
|
|
|
38164
38282
|
}
|
|
38165
38283
|
});
|
|
38166
38284
|
server.registerTool("list_shopify_products", {
|
|
38167
|
-
description: listShopifyProductsGuidance.summary + ' Usa el `id` devuelto junto con `publicationMode="existing"` en `publish_to_shopify`.
|
|
38285
|
+
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.',
|
|
38168
38286
|
inputSchema: z148.object({
|
|
38169
38287
|
shopDomain: z148.string().min(3).max(120),
|
|
38170
38288
|
query: z148.string().trim().max(120).optional(),
|
|
38171
|
-
taskId: z148.string().guid().optional()
|
|
38289
|
+
taskId: z148.string().guid().optional(),
|
|
38290
|
+
publicationMode: ShopifyPublicationMode.optional(),
|
|
38291
|
+
targetProductId: z148.string().min(1).max(300).optional()
|
|
38172
38292
|
}).shape,
|
|
38173
38293
|
annotations: READS_EXTERNAL
|
|
38174
|
-
}, async ({ shopDomain, query, taskId }) => {
|
|
38294
|
+
}, async ({ shopDomain, query, taskId, publicationMode, targetProductId }) => {
|
|
38175
38295
|
try {
|
|
38296
|
+
if (publicationMode && (!taskId || publicationMode === "existing" && !targetProductId)) {
|
|
38297
|
+
return {
|
|
38298
|
+
isError: true,
|
|
38299
|
+
content: [
|
|
38300
|
+
{
|
|
38301
|
+
type: "text",
|
|
38302
|
+
text: "Indica taskId y, para existing, tambi\xE9n targetProductId."
|
|
38303
|
+
}
|
|
38304
|
+
]
|
|
38305
|
+
};
|
|
38306
|
+
}
|
|
38176
38307
|
const params = new URLSearchParams({
|
|
38177
38308
|
shopDomain
|
|
38178
38309
|
});
|
|
38179
38310
|
if (query) params.set("query", query);
|
|
38180
38311
|
if (taskId) params.set("taskId", taskId);
|
|
38181
|
-
const
|
|
38182
|
-
|
|
38312
|
+
const [catalog, advisory] = await Promise.all([
|
|
38313
|
+
!publicationMode || query ? api.getJson(`/v1/shopify/products?${params.toString()}`) : {},
|
|
38314
|
+
publicationMode && taskId ? api.postJson(`/v1/tasks/${encodeURIComponent(taskId)}/publish/shopify/shipping-check`, {
|
|
38315
|
+
shopDomain,
|
|
38316
|
+
publicationMode,
|
|
38317
|
+
targetProductId
|
|
38318
|
+
}).then((response) => ShopifyShippingCheckResponse.parse(response)) : null
|
|
38319
|
+
]);
|
|
38320
|
+
const warning = advisory?.warning;
|
|
38321
|
+
return asText(warning ? {
|
|
38322
|
+
...catalog,
|
|
38323
|
+
warning: {
|
|
38324
|
+
...warning,
|
|
38325
|
+
message: shopifyPublishAdvisoryMessage(warning)
|
|
38326
|
+
}
|
|
38327
|
+
} : catalog);
|
|
38183
38328
|
} catch (e) {
|
|
38184
38329
|
throw translateError(e);
|
|
38185
38330
|
}
|
|
@@ -38756,7 +38901,7 @@ var TikTokInput = z150.object({
|
|
|
38756
38901
|
function registerPublishTools(server, api, opts = {}) {
|
|
38757
38902
|
const transport = opts.transport ?? "http";
|
|
38758
38903
|
server.registerTool("publish_to_shopify", {
|
|
38759
|
-
description: publishToShopifyGuidance.summary + " Precondici\xF3n: la tarea debe estar en status='complete' \u2014 usa `get_task_status` antes. Por defecto `publicationMode=auto`: si esta tarea ya fue publicada en esa tienda, actualiza ESE MISMO producto y conserva URL, precio, variantes, inventario y SKU; si no, crea uno. Usa `existing` + `targetProductId` cuando el usuario elija otro producto y `new` s\xF3lo si pide crear uno nuevo. ANTES de llamar preg\xFAntale \"\xBFTu producto tiene variantes (talla, color, etc.)?\" y pasa `showVariantPicker: true` si responde que s\xED. Por defecto publica TODAS las im\xE1genes generadas; pasa `numLandingImages` s\xF3lo si el usuario pide menos. Tambi\xE9n publica el GIF de la landing si la tarea tiene uno aprobado por QA; pasa `includeLandingGif: false` s\xF3lo si el usuario no lo quiere. En code landings con una oferta expl\xEDcita de packs, ProductMaker s\xF3lo publica el selector si variantes reales de Shopify cobran los totales exactos; la respuesta explica si las cre\xF3, verific\xF3 o descart\xF3 por no existir ahorro. Si devuelve SHOPIFY_PUBLISH_INPUT_REQUIRED, muestra todos los problemas de recovery y solicita los importes faltantes. Solo env\xEDa commerceCorrection con su revisi\xF3n/huella y confirmed:true despu\xE9s de confirmar los valores exactos; nunca inventes importes, conviertas moneda ni elimines ofertas. Si adem\xE1s trae correctionRejected, lo que el vendedor confirm\xF3 fue rechazado: l\xE9ele `reason` ANTES de volver a pedir datos. Un contexto obsoleto requiere volver a revisar; open_editor (incluido SHOPIFY_PUBLISH_CORRECTION_NOT_CONVERGED) requiere el editor de ProductMaker y NO se reenv\xEDa la misma correcci\xF3n. SHOPIFY_PUBLISH_VERIFICATION_FAILED trae en `reason` el siguiente paso: reintenta una vez y si se repite sigue ese paso. P\xEDxeles (landing cl\xE1sica): antes de publicar llama `list_shopify_landing_pixels`, mu\xE9strale a la persona los p\xEDxeles que quedar\xE1n y preg\xFAntale si quiere quitar alguno o agregar uno nuevo de Meta o TikTok; pasa su respuesta en `landingPixels`. La elecci\xF3n se guarda por tienda y aplica a todas sus landings cl\xE1sicas de ProductMaker; el tema y las otras p\xE1ginas no cambian. Si devuelve SHOPIFY_THEME_SETUP_REQUIRED, el tema de la tienda no tiene el bloque Code Landing y nada se public\xF3: env\xEDa al usuario el themeEditorDeepLink del error para abrir el editor del tema de Shopify, p\xEDdele que agregue el bloque y pulse Guardar (una sola vez por tienda), y reintenta s\xF3lo despu\xE9s. Ante resultado incierto, verifica la tarea/tienda antes de volver a publicar, especialmente con new; commerceCorrectionSaved no prueba publicaci\xF3n. La respuesta es markdown con el link a la landing y al producto.",
|
|
38904
|
+
description: publishToShopifyGuidance.summary + " Antes de pedir confirmaci\xF3n, usa list_shopify_products con taskId y publicationMode para revisar el destino. Si devuelve un aviso, muestra el mensaje y el enlace de Shopify. El aviso permite continuar. Precondici\xF3n: la tarea debe estar en status='complete' \u2014 usa `get_task_status` antes. Por defecto `publicationMode=auto`: si esta tarea ya fue publicada en esa tienda, actualiza ESE MISMO producto y conserva URL, precio, variantes, inventario y SKU; si no, crea uno. Usa `existing` + `targetProductId` cuando el usuario elija otro producto y `new` s\xF3lo si pide crear uno nuevo. ANTES de llamar preg\xFAntale \"\xBFTu producto tiene variantes (talla, color, etc.)?\" y pasa `showVariantPicker: true` si responde que s\xED. Por defecto publica TODAS las im\xE1genes generadas; pasa `numLandingImages` s\xF3lo si el usuario pide menos. Tambi\xE9n publica el GIF de la landing si la tarea tiene uno aprobado por QA; pasa `includeLandingGif: false` s\xF3lo si el usuario no lo quiere. En code landings con una oferta expl\xEDcita de packs, ProductMaker s\xF3lo publica el selector si variantes reales de Shopify cobran los totales exactos; la respuesta explica si las cre\xF3, verific\xF3 o descart\xF3 por no existir ahorro. Si devuelve SHOPIFY_PUBLISH_INPUT_REQUIRED, muestra todos los problemas de recovery y solicita los importes faltantes. Solo env\xEDa commerceCorrection con su revisi\xF3n/huella y confirmed:true despu\xE9s de confirmar los valores exactos; nunca inventes importes, conviertas moneda ni elimines ofertas. Si adem\xE1s trae correctionRejected, lo que el vendedor confirm\xF3 fue rechazado: l\xE9ele `reason` ANTES de volver a pedir datos. Un contexto obsoleto requiere volver a revisar; open_editor (incluido SHOPIFY_PUBLISH_CORRECTION_NOT_CONVERGED) requiere el editor de ProductMaker y NO se reenv\xEDa la misma correcci\xF3n. SHOPIFY_PUBLISH_VERIFICATION_FAILED trae en `reason` el siguiente paso: reintenta una vez y si se repite sigue ese paso. P\xEDxeles (landing cl\xE1sica): antes de publicar llama `list_shopify_landing_pixels`, mu\xE9strale a la persona los p\xEDxeles que quedar\xE1n y preg\xFAntale si quiere quitar alguno o agregar uno nuevo de Meta o TikTok; pasa su respuesta en `landingPixels`. La elecci\xF3n se guarda por tienda y aplica a todas sus landings cl\xE1sicas de ProductMaker; el tema y las otras p\xE1ginas no cambian. Si devuelve SHOPIFY_THEME_SETUP_REQUIRED, el tema de la tienda no tiene el bloque Code Landing y nada se public\xF3: env\xEDa al usuario el themeEditorDeepLink del error para abrir el editor del tema de Shopify, p\xEDdele que agregue el bloque y pulse Guardar (una sola vez por tienda), y reintenta s\xF3lo despu\xE9s. Ante resultado incierto, verifica la tarea/tienda antes de volver a publicar, especialmente con new; commerceCorrectionSaved no prueba publicaci\xF3n. La respuesta es markdown con el link a la landing y al producto.",
|
|
38760
38905
|
inputSchema: ShopifyInput.shape,
|
|
38761
38906
|
// Publication reaches the public storefront, beyond private account data.
|
|
38762
38907
|
annotations: {
|
|
@@ -41118,6 +41263,7 @@ var SetProductCostingInput = z159.object({
|
|
|
41118
41263
|
diga dos productos a la vez. */
|
|
41119
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."),
|
|
41120
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."),
|
|
41121
41267
|
shopDomain: z159.string().min(1).optional(),
|
|
41122
41268
|
shopifyProductId: z159.string().min(1).max(64).optional(),
|
|
41123
41269
|
targetCountry: z159.string().length(2).describe("Pa\xEDs de venta en ISO-2, que fija moneda y referencia de flete."),
|
|
@@ -41389,7 +41535,7 @@ function registerProductControlTools(server, api, { transport = "http" } = {}) {
|
|
|
41389
41535
|
}
|
|
41390
41536
|
});
|
|
41391
41537
|
server.registerTool("set_product_costing", {
|
|
41392
|
-
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.",
|
|
41393
41539
|
inputSchema: SetProductCostingInput.shape,
|
|
41394
41540
|
annotations: OVERWRITES_INTERNAL
|
|
41395
41541
|
}, async (input) => {
|
|
@@ -41724,7 +41870,7 @@ var START_DROPSHIPPING_PROMPT = [
|
|
|
41724
41870
|
"",
|
|
41725
41871
|
"Use the existing creative/task tools for generation, preserve their estimate and confirmation gates, and keep polling get_task_status until the task is done, errored, or paused \u2014 a timed-out poll means it is still running, so call again. When it pauses, show me the draft and ask me; only answer it yourself through resolve_pending_action if I delegated that decision to you or the task runs with aiDecidesAll / reviewMode automatic. Verify actual outputs before calling the creative stage complete.",
|
|
41726
41872
|
"",
|
|
41727
|
-
"Before Shopify publication, call list_shopify_shops, check the real task readiness
|
|
41873
|
+
"Before Shopify publication, call list_shopify_shops, check the real task readiness and ask whether the product has variants. Call list_shopify_products with taskId and the intended publicationMode (and targetProductId for existing) to check the selected destination. Show any warning and its Shopify link with the intended publication, then wait for explicit approval before calling publish_to_shopify. Warnings do not block publication. Report the exact blocker when publication is not ready. If recovery is needs_input, show every typed issue and ask me for missing values. Only send commerceCorrection with confirmed:true after I confirm the exact currency, unit price and pack totals. Never invent prices, convert currency or erase the offer. If the context changed, review it again; open_editor means use the ProductMaker editor. Saved corrections do not prove publication: verify uncertain results before another attempt.",
|
|
41728
41874
|
"",
|
|
41729
41875
|
"Before Meta publication, call list_meta_destinations, show the available Business portfolios, ad accounts and Facebook Pages, and let me choose the exact portfolioId, adAccountId and pageId; never choose the first option silently. Then collect budget, country and optional tracking inputs, show the intended mutation, and wait for explicit approval. Use publish_to_meta for one task or publish_creatives_to_meta for selected assets across tasks/media. ProductMaker campaigns must remain PAUSED and require manual activation. Use get_meta_campaign_status only to verify the created campaign.",
|
|
41730
41876
|
"",
|
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.",
|