@productmaker/mcp 8.8.1 → 8.9.1

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 CHANGED
@@ -130,56 +130,63 @@ credential flow; loading the skill alone does not prove that the remote endpoint
130
130
  is authorized. Public OpenAI/“With MCP” registration and OAuth readiness are a
131
131
  separate release step.
132
132
 
133
- | Tool | What it does |
134
- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
135
- | `cost_product` | Estimate a safe Colombia/COP selling price for free, then reuse its `price` and `compareAtPrice` in `create_product_task` |
136
- | `create_product_task` | Full pipeline from a product image (extract → angles → video → landing → image creatives) |
137
- | `get_task_status` | Check task progress (optional `waitSeconds` for near-sync polling) |
138
- | `list_tasks` | List recent tasks |
139
- | `edit_task_draft` | Edit angle / pain point / persona before generation |
140
- | `create_service_video` | Video for a _service_ built from its landing page URL. **Paid action** — `automatic` generates directly, `guided` returns concepts to approve via `resolve_pending_action` |
141
- | `generate_video_creative` | Standalone UGC video creative |
142
- | `generate_free_video` | One free-form video from an exact prompt/script, optionally with a reference image (async: returns a `taskId`) |
143
- | `generate_image_creatives` | Standalone image creatives (multiple variants) |
144
- | `edit_image_creative` | Fix ONE already-generated image of a creatives task (pick it with `variantIndex`, describe the change in `instruction`) without regenerating the whole set. **Paid action** — charges a single image; requires the task to be `done` |
145
- | `generate_landing` | Standalone landing page |
146
- | `get_video_script` | Read the pending video script when a task was created with script review paused (returns scenes + per-scene word limits) |
147
- | `approve_video_script` | Approve the video script (with optional per-scene edits); render starts and consumes credits |
148
- | `regenerate_video_script` | Re-roll the pending video script (optionally with a different narrative style) |
149
- | `resolve_pending_action` | Resolve a gate the pipeline is waiting on (product-reference confirmation or angle-review approval) when `get_task_status` returns `pendingUserAction` |
150
- | `estimate_creative_variant` | Free estimate of the credit range for an extra video / image / landing section inside an existing task. Call this first |
151
- | `estimate_market_study_cost` | Free quote of the same video / combined task WITHOUT and WITH the market study. The study is off unless the user accepts it; call this before asking and show both totals |
152
- | `create_creative_variant` | Create that extra creative in an existing task. **Paid action** — requires `confirm: true` plus an idempotent `clientRequestId` |
153
- | `list_shopify_shops` | List connected Shopify stores |
154
- | `list_shopify_products` | Search products in a connected Shopify store before choosing `targetProductId` for `publish_to_shopify` |
155
- | `list_meta_ad_accounts` | List connected Meta ad accounts |
156
- | `list_meta_destinations` | List Meta Business portfolios, ad accounts per portfolio, and Facebook Pages; use the returned IDs to choose the exact publication destination |
157
- | `request_media_upload` | Open the consumer-neutral inline file picker for ProductMaker tasks, image/video creatives, landings, and Meta; supports image, video, or mixed sessions, ChatGPT file references, an explicit OK chat handoff, and `/upload-media` only as fallback |
158
- | `check_media_upload` | Return verified owner-scoped opaque asset IDs and media kinds from a universal upload session; no bytes, token, file name, or private URL reaches the model |
159
- | `list_tiktok_advertisers` | List connected TikTok Ads advertiser accounts |
160
- | `publish_to_shopify` | Publish a completed task to Shopify; preserves existing calls and returns typed recovery when seller input is required. Optional `commerceCorrection` requires explicit `confirmed: true`. Success includes landing + product URLs. |
161
- | `publish_to_meta` | Create a Meta Ads campaign from a task (always PAUSED) after selecting exact `portfolioId`, `adAccountId`, and `pageId` with `list_meta_destinations` |
162
- | `publish_creatives_to_meta` | Group task creatives or user media into ONE paused Meta campaign; user media is staged on ProductMaker's CDN and removed after successful publication or TTL expiry |
163
- | `publish_to_tiktok` | Create a TikTok Ads campaign from a task (always created PAUSED). Same `angleIndexes` + `campaignConfig` shape as Meta |
164
- | `get_meta_campaign_status` | Read-only status + lifetime insights (spend/impressions/clicks/reach) of a Meta campaign |
165
- | `get_tiktok_campaign_status` | Read-only status + lifetime report of a TikTok campaign (requires `advertiserId`) |
166
- | `find_winning_products` | Research winning dropshipping products for a country/category with AI-explained reasons, risks, and real Meta Ads evidence. **Costs 2000 credits per run** — requires explicit user confirmation (`confirmed: true`) before charging. Covers CO, MX, PE, EC, CL |
167
- | `get_product_research_run` | Read the full report (score, verdict, confidence, reasons, risks, ad evidence) of a research run by `runId`. Free |
168
- | `list_product_research_runs` | List the user's past research runs, most recent first. Free |
169
- | `start_dropshipping_project` | Start or resume a guided dropshipping project. Idempotent, costs no credits |
170
- | `cost_dropshipping_project` | Save the project's costing inputs (the backend recomputes the canonical result and owns versioning) |
171
- | `guide_dropshipping_launch` | Read-only launch guidance: the project's phase and the single computed `nextAction`. Never activates Meta |
172
- | `list_actors` | List the user's saved personajes (AI-generated people who can star in videos and images). Returns the `id` to pass as `actorId`. Read-only, free |
173
- | `get_daily_control` | Read-only daily profitability traffic-light per product (light + verdict). Never pauses/activates ad campaigns. Optional `projectId` narrows the report to one project. A product with `status !== "ok"` has no metrics — including `no_campaign_linked` (no campaign tied to the project, so there is no spend and no cost per sale). Days marked `returnedSource: "estimated"` are not measured; `cancelledSource: "shopify_settling"` is measured but not yet closed |
174
- | `link_campaign_to_project` | Link an ad campaign the user launched outside ProductMaker to a project, so its spend feeds `get_daily_control`. Only associates an identifier — never creates/pauses/activates a real campaign. For Meta the ad account is derived server-side, not taken from the input |
175
- | `report_daily_returns` | Report how many orders of a product were returned on a given day — the one signal ProductMaker cannot see on its own |
176
- | `sync_shopify_orders` | Pull the store's orders into the ledger as a FOURTH source. It does not replace the provider's report: the store cannot know whether a cash-on-delivery order arrived, so its orders stay in transit unless the money is already collected. Where the provider covered that product on that day, the provider wins. Without dates, from the 1st of the month to today |
177
- | `import_orders_file` | Read the provider's spreadsheet from an ABSOLUTE path on the caller's machine and store its orders. **stdio only** — on the hosted server a path points at OUR disk, so it fails closed. Start with `dryRun: true` and tell the seller what it contains (how many orders, between which dates, which rows could not be read) before writing anything. No column with buyer data is ever read |
178
- | `create_operation` | Create the business of one country. The currency is derived from the country, never asked. Needed before anything else about the month: with no operation there is nothing for `get_finances` to assemble. Someone selling in a single country has one and never hears the word again |
179
- | `merge_products` | Merge two records of the same product into one. The two ids come from `get_product_control` — never invent them. The source DISAPPEARS and its orders move to the target, so confirm by NAME which one stays. It cannot be undone |
180
- | `get_finances` | Read-only monthly P&L: gross and delivered sales, freight, merchandise cost, gross profit, ad spend, fixed costs and NET profit **before taxes**, plus each rate against its target. Grouped on purpose: a model that needs six calls to answer "how am I doing?" assembles the picture itself between trips, and that is where it invents. `adSpendKnown: false` means ad spend could not be read and the profit is INCOMPLETE; `adSpendSource: "user"` means she corrected it by hand; `unconfirmedExpenses > 0` is inherited from last month and unreviewed. With one operation the server resolves it; with several it returns `operation_ambiguous` with the list |
181
- | `set_monthly_expense` | Save one FIXED cost of the month (rent, salaries, accountant). Writing the same label again REPLACES the amount — it does not add a second expense. Without fixed costs written, the month's profit always reads HIGHER than it is. Not for ad spend: that is `set_ad_spend` |
182
- | `set_ad_spend` | Correct by hand what was spent on ads that month. `amount: 0` ASSERTS "I did not advertise"; `null` WITHDRAWS the correction and gives the campaigns back the say. They are not the same |
133
+ | Tool | What it does |
134
+ | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
135
+ | `cost_product` | Estimate a safe Colombia/COP selling price for free, then reuse its `price` and `compareAtPrice` in `create_product_task` |
136
+ | `create_product_task` | Full pipeline from a product image (extract → angles → video → landing → image creatives) |
137
+ | `get_task_status` | Check task progress (optional `waitSeconds` for near-sync polling) |
138
+ | `list_tasks` | List recent tasks |
139
+ | `edit_task_draft` | Edit angle / pain point / persona before generation |
140
+ | `create_service_video` | Video for a _service_ built from its landing page URL. **Paid action** — `automatic` generates directly, `guided` returns concepts to approve via `resolve_pending_action` |
141
+ | `generate_video_creative` | Standalone UGC video creative |
142
+ | `generate_free_video` | One free-form video from an exact prompt/script, optionally with a reference image (async: returns a `taskId`) |
143
+ | `generate_image_creatives` | Standalone image creatives (multiple variants) |
144
+ | `edit_image_creative` | Fix ONE already-generated image of a creatives task (pick it with `variantIndex`, describe the change in `instruction`) without regenerating the whole set. **Paid action** — charges a single image; requires the task to be `done` |
145
+ | `generate_landing` | Standalone landing page |
146
+ | `get_video_script` | Read the pending video script when a task was created with script review paused (returns scenes + per-scene word limits) |
147
+ | `approve_video_script` | Approve the video script (with optional per-scene edits); render starts and consumes credits |
148
+ | `regenerate_video_script` | Re-roll the pending video script (optionally with a different narrative style) |
149
+ | `resolve_pending_action` | Resolve a gate the pipeline is waiting on (product-reference confirmation or angle-review approval) when `get_task_status` returns `pendingUserAction` |
150
+ | `estimate_creative_variant` | Free estimate of the credit range for an extra video / image / landing section inside an existing task. Call this first |
151
+ | `estimate_market_study_cost` | Free quote of the same video / combined task WITHOUT and WITH the market study. The study is off unless the user accepts it; call this before asking and show both totals |
152
+ | `create_creative_variant` | Create that extra creative in an existing task. **Paid action** — requires `confirm: true` plus an idempotent `clientRequestId` |
153
+ | `list_shopify_shops` | List connected Shopify stores |
154
+ | `list_shopify_products` | Search products in a connected Shopify store before choosing `targetProductId` for `publish_to_shopify` |
155
+ | `list_meta_ad_accounts` | List connected Meta ad accounts |
156
+ | `list_meta_destinations` | List Meta Business portfolios, ad accounts per portfolio, and Facebook Pages; use the returned IDs to choose the exact publication destination |
157
+ | `request_media_upload` | Open the consumer-neutral inline file picker for ProductMaker tasks, image/video creatives, landings, and Meta; supports image, video, or mixed sessions, ChatGPT file references, an explicit OK chat handoff, and `/upload-media` only as fallback |
158
+ | `check_media_upload` | Return verified owner-scoped opaque asset IDs and media kinds from a universal upload session; no bytes, token, file name, or private URL reaches the model |
159
+ | `list_tiktok_advertisers` | List connected TikTok Ads advertiser accounts |
160
+ | `publish_to_shopify` | Publish a completed task to Shopify; preserves existing calls and returns typed recovery when seller input is required. Optional `commerceCorrection` requires explicit `confirmed: true`. Success includes landing + product URLs. |
161
+ | `verify_landing_commerce` | Free readback of a saved landing edit after manual Shopify/COD corrections; preserves pending provider notices and never changes money, inventory or SKU. Requires the existing taskId and editId and the editor’s current access permissions. |
162
+ | `publish_to_meta` | Create a Meta Ads campaign from a task (always PAUSED) after selecting exact `portfolioId`, `adAccountId`, and `pageId` with `list_meta_destinations` |
163
+ | `publish_creatives_to_meta` | Group task creatives or user media into ONE paused Meta campaign; user media is staged on ProductMaker's CDN and removed after successful publication or TTL expiry |
164
+ | `publish_to_tiktok` | Create a TikTok Ads campaign from a task (always created PAUSED). Same `angleIndexes` + `campaignConfig` shape as Meta |
165
+ | `get_meta_campaign_status` | Read-only status + lifetime insights (spend/impressions/clicks/reach) of a Meta campaign |
166
+ | `get_tiktok_campaign_status` | Read-only status + lifetime report of a TikTok campaign (requires `advertiserId`) |
167
+ | `find_winning_products` | Research winning dropshipping products for a country/category with AI-explained reasons, risks, and real Meta Ads evidence. **Costs 2000 credits per run** — requires explicit user confirmation (`confirmed: true`) before charging. Covers CO, MX, PE, EC, CL |
168
+ | `get_product_research_run` | Read the full report (score, verdict, confidence, reasons, risks, ad evidence) of a research run by `runId`. Free |
169
+ | `list_product_research_runs` | List the user's past research runs, most recent first. Free |
170
+ | `start_dropshipping_project` | Start or resume a guided dropshipping project. Idempotent, costs no credits |
171
+ | `cost_dropshipping_project` | Save the project's costing inputs (the backend recomputes the canonical result and owns versioning) |
172
+ | `guide_dropshipping_launch` | Read-only launch guidance: the project's phase and the single computed `nextAction`. Never activates Meta |
173
+ | `list_actors` | List the user's saved personajes (AI-generated people who can star in videos and images). Returns the `id` to pass as `actorId`. Read-only, free |
174
+ | `get_daily_control` | Read-only daily profitability traffic-light per product (light + verdict). Never pauses/activates ad campaigns. Optional `projectId` narrows the report to one project. A product with `status !== "ok"` has no metrics — including `no_campaign_linked` (no campaign tied to the project, so there is no spend and no cost per sale). Days marked `returnedSource: "estimated"` are not measured; `cancelledSource: "shopify_settling"` is measured but not yet closed |
175
+ | `link_campaign_to_project` | Link an ad campaign the user launched outside ProductMaker to a project, so its spend feeds `get_daily_control`. Only associates an identifier — never creates/pauses/activates a real campaign. For Meta the ad account is derived server-side, not taken from the input |
176
+ | `report_daily_returns` | Report how many orders of a product were returned on a given day — the one signal ProductMaker cannot see on its own |
177
+ | `sync_shopify_orders` | Pull the store's orders into the ledger as a FOURTH source. It does not replace the provider's report: the store cannot know whether a cash-on-delivery order arrived, so its orders stay in transit unless the money is already collected. Where the provider covered that product on that day, the provider wins. Without dates, from the 1st of the month to today |
178
+ | `import_orders_file` | Read the provider's spreadsheet from an ABSOLUTE path on the caller's machine and store its orders. **stdio only** — on the hosted server a path points at OUR disk, so it fails closed. Start with `dryRun: true` and tell the seller what it contains (how many orders, between which dates, which rows could not be read) before writing anything. No column with buyer data is ever read |
179
+ | `create_operation` | Create the business of one country. The currency is derived from the country, never asked. Needed before anything else about the month: with no operation there is nothing for `get_finances` to assemble. Someone selling in a single country has one and never hears the word again |
180
+ | `merge_products` | Merge two records of the same product into one. The two ids come from `get_product_control` — never invent them. The source DISAPPEARS and its orders move to the target, so confirm by NAME which one stays. It cannot be undone |
181
+ | `get_finances` | Read-only monthly P&L: gross and delivered sales, freight, merchandise cost, gross profit, ad spend, fixed costs and NET profit **before taxes**, plus each rate against its target. Grouped on purpose: a model that needs six calls to answer "how am I doing?" assembles the picture itself between trips, and that is where it invents. `adSpendKnown: false` means ad spend could not be read and the profit is INCOMPLETE; `adSpendSource: "user"` means she corrected it by hand; `unconfirmedExpenses > 0` is inherited from last month and unreviewed. With one operation the server resolves it; with several it returns `operation_ambiguous` with the list |
182
+ | `set_monthly_expense` | Save one FIXED cost of the month (rent, salaries, accountant). Writing the same label again REPLACES the amount — it does not add a second expense. Without fixed costs written, the month's profit always reads HIGHER than it is. Not for ad spend: that is `set_ad_spend` |
183
+ | `set_ad_spend` | Correct by hand what was spent on ads that month. `amount: 0` ASSERTS "I did not advertise"; `null` WITHDRAWS the correction and gives the campaigns back the say. They are not the same |
184
+ | `prepare_winning_product_image` | Prepare and show the exact photo of a user-selected winning-product candidate for free; securely stages it before the next photo choice. |
185
+ | `get_product_control` | Read-only daily profitability verdicts and measurement status per store product. Incomplete samples or unmeasured delivered sales must remain explicit; never changes campaigns. |
186
+ | `list_importable_products` | Read one page of store products eligible for financial control; preserve `hasNextPage` and already-imported markers. |
187
+ | `import_product_controls` | Add selected store products to financial control. They remain `no_costing` until their real costs are saved. |
188
+ | `set_product_costing` | Save seller-provided supplier cost, freight and estimated cancellation/return rates; store price stays canonical and missing costs cannot be invented. |
189
+ | `report_product_counts` | Save only seller-observed daily counts as the final override. Omitted counts remain unmeasured; zero is an explicit observation. |
183
190
 
184
191
  ### Uploading personal media from a remote chat
185
192
 
@@ -276,6 +283,16 @@ The `base64` field was removed. MCP JSON-RPC transports truncate large tool argu
276
283
 
277
284
  ## Version history
278
285
 
286
+ ### 8.9.1 — Actualización del entorno de pruebas
287
+
288
+ - Vitest 5 y Node 22.23.3 para instalar y compilar con las dependencias de pruebas soportadas.
289
+ - El artefacto mantiene su compatibilidad publicada con Node 18; la imagen de ejecución conserva Node 20.
290
+
291
+ ### 8.9.0 — Verificación gratuita de ofertas y catálogo financiero integrado
292
+
293
+ - `verify_landing_commerce` relee la corrección manual de una edición existente mediante el endpoint canónico; conserva los pendientes por proveedor y no cobra créditos ni modifica precios, inventario o SKU. La compra solo se habilita tras confirmar documento, valores y checkout.
294
+ - `publish_to_shopify` admite intención explícita de precio tachado por pack, incluyendo `null` para retirarlo.
295
+
279
296
  ### 8.8.1 — Variantes en video de una sola toma
280
297
 
281
298
  - La generación canónica conserva las variantes confirmadas en una sola toma de Grok, H3 y Wan, con la misma persona usando cada prenda y sin cambiar la estructura ni el precio cotizado.
package/dist/http.js CHANGED
@@ -3030,7 +3030,8 @@ var SuggestedPackSchema = z20.object({
3030
3030
  }).strict();
3031
3031
  var ConfirmedPackSchema = z20.object({
3032
3032
  units: PublishRecoveryPackUnitsSchema,
3033
- total: PositiveNormalizedMoneySchema
3033
+ total: PositiveNormalizedMoneySchema,
3034
+ compareAtPrice: PositiveNormalizedMoneySchema.nullable().optional()
3034
3035
  }).strict();
3035
3036
  var SuggestedPacksSchema = z20.array(SuggestedPackSchema).max(2).superRefine(withDistinctPackQuantities);
3036
3037
  var ConfirmedPacksSchema = z20.array(ConfirmedPackSchema).max(2).superRefine(withDistinctPackQuantities);
@@ -3042,6 +3043,7 @@ var PublishCommerceSuggestionSchema = z20.object({
3042
3043
  var PublishCommerceValuesSchema = z20.object({
3043
3044
  currency: CurrencySchema,
3044
3045
  unitPrice: PositiveNormalizedMoneySchema,
3046
+ compareAtPrice: PositiveNormalizedMoneySchema.nullable().optional(),
3045
3047
  packs: ConfirmedPacksSchema
3046
3048
  }).strict();
3047
3049
  var PublishRecoveryFieldSchema = z20.enum([
@@ -3329,10 +3331,14 @@ var CodeLandingCommerceSnapshotSchema = z21.object({
3329
3331
  productVariantId: z21.string().trim().min(1).max(500).optional(),
3330
3332
  price: z21.string().trim().min(1).max(500).optional(),
3331
3333
  compareAtPrice: z21.string().trim().min(1).max(500).optional(),
3334
+ /** Explicit removal survives projections that otherwise derive a comparison. */
3335
+ compareAtPriceRemoved: z21.literal(true).optional(),
3332
3336
  /** Confirmed offer facts before Shopify supplies real chargeable variants. */
3333
3337
  offerPacks: z21.array(z21.object({
3334
3338
  units: z21.number().int().min(2).max(99),
3335
- price: PublishCommerceValuesSchema.shape.unitPrice
3339
+ price: PublishCommerceValuesSchema.shape.unitPrice,
3340
+ /** Absent preserves legacy derivation; null explicitly removes it. */
3341
+ compareAtPrice: PublishCommerceValuesSchema.shape.unitPrice.nullable().optional()
3336
3342
  }).strict()).max(2).refine((packs) => new Set(packs.map((pack) => pack.units)).size === packs.length, "Each confirmed pack quantity must be distinct").optional(),
3337
3343
  /**
3338
3344
  * The seller's explicit pack decision (D5). `offerPacks: []` alone is
@@ -3739,6 +3745,8 @@ var CodeLandingAuthorEnvelopeSchema = z21.object({
3739
3745
  var CodeLandingCommerceChangeSchema = z21.object({
3740
3746
  price: z21.string().trim().min(1).max(40).optional(),
3741
3747
  compareAtPrice: z21.string().trim().min(1).max(40).nullable().optional(),
3748
+ /** Remove offer quantities without deleting their Shopify variants. */
3749
+ removePackUnits: z21.array(z21.number().int().min(2).max(99)).max(2).optional(),
3742
3750
  packs: z21.array(z21.object({
3743
3751
  units: z21.number().int().min(1).max(99),
3744
3752
  price: z21.string().trim().min(1).max(40),
@@ -3968,6 +3976,52 @@ var CreateLandingEditRequest = z21.union([
3968
3976
  QuotedLandingEditRequest,
3969
3977
  LegacyLandingEditRequest
3970
3978
  ]);
3979
+ var CommerceReconciliationSchema = z21.object({
3980
+ state: z21.enum([
3981
+ "pending",
3982
+ "awaiting_external_fix",
3983
+ "verified",
3984
+ "superseded"
3985
+ ]),
3986
+ desiredRevision: z21.number().int().positive(),
3987
+ fingerprint: z21.string().min(1),
3988
+ startedAt: z21.string().datetime(),
3989
+ deadlineAt: z21.string().datetime(),
3990
+ shopDomain: z21.string().optional(),
3991
+ productId: z21.string().optional(),
3992
+ currency: z21.string().optional(),
3993
+ documentPublished: z21.boolean(),
3994
+ checkoutVerified: z21.boolean(),
3995
+ systems: z21.array(z21.object({
3996
+ provider: z21.enum([
3997
+ "shopify",
3998
+ "releasit",
3999
+ "easysell"
4000
+ ]),
4001
+ status: z21.enum([
4002
+ "pending",
4003
+ "verified"
4004
+ ]),
4005
+ adminUrl: z21.string().url().optional(),
4006
+ reason: z21.enum([
4007
+ "money_mismatch",
4008
+ "binding_missing",
4009
+ "provider_unverified",
4010
+ "permission_missing",
4011
+ "publication_pending",
4012
+ "external_conflict",
4013
+ "unavailable"
4014
+ ]).optional(),
4015
+ corrections: z21.array(z21.object({
4016
+ units: z21.number().int().positive(),
4017
+ variantId: z21.string().optional(),
4018
+ price: z21.string(),
4019
+ compareAtPrice: z21.string().nullable(),
4020
+ actualPrice: z21.string().nullable().optional(),
4021
+ actualCompareAtPrice: z21.string().nullable().optional()
4022
+ }))
4023
+ }))
4024
+ });
3971
4025
  var LandingEditDto = z21.object({
3972
4026
  id: z21.string(),
3973
4027
  scope: z21.enum([
@@ -4001,6 +4055,7 @@ var LandingEditDto = z21.object({
4001
4055
  progressStage: z21.string().nullable().optional(),
4002
4056
  errorCode: z21.string().nullable().optional(),
4003
4057
  retryable: z21.boolean().optional(),
4058
+ commerceReconciliation: CommerceReconciliationSchema.nullable().optional(),
4004
4059
  /** Photos the seller attached to this message (see LandingEditAttachmentDto). */
4005
4060
  attachmentIds: z21.array(z21.string().uuid()).max(4).optional()
4006
4061
  });
@@ -12849,6 +12904,21 @@ var CAPABILITY_MODEL_GUIDANCE = {
12849
12904
  "confirma tienda y variantes; guardar no prueba publicaci\xF3n: verifica lo incierto"
12850
12905
  ]
12851
12906
  },
12907
+ verify_landing_commerce: {
12908
+ summary: "Comprueba gratis una correcci\xF3n manual de precios y ofertas de la landing.",
12909
+ useWhen: [
12910
+ "ya correg\xED los precios en mi tienda; verifica la oferta"
12911
+ ],
12912
+ avoidWhen: [
12913
+ "la persona pide cambiar la oferta o generar otra p\xE1gina"
12914
+ ],
12915
+ defaults: [
12916
+ "conserva la p\xE1gina y los avisos pendientes hasta verificar cada sistema"
12917
+ ],
12918
+ disclosures: [
12919
+ "requiere solicitud o confirmaci\xF3n expl\xEDcita de verificaci\xF3n; no cambia precios ni inventario y no consume cr\xE9ditos; una compra verificada puede volver a habilitarse"
12920
+ ]
12921
+ },
12852
12922
  publish_to_tiktok: {
12853
12923
  summary: "Crea una campa\xF1a de TikTok Ads desde la tarea.",
12854
12924
  useWhen: [
@@ -15092,7 +15162,7 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
15092
15162
  ], [
15093
15163
  "meta_publication"
15094
15164
  ]),
15095
- defineCapability("publish_to_shopify", "193dc142c87cda163dbd39879519e38a18ba8d063c9e810c6fc5bf878151959b", "external_mutation", "publishing", [
15165
+ defineCapability("publish_to_shopify", "e041e404ad9f6cf49231c9bc38df22e6bd0aa6e4082b4ab8dc655a132b79873f", "external_mutation", "publishing", [
15096
15166
  "external_mutation",
15097
15167
  "state_change"
15098
15168
  ], [
@@ -15130,6 +15200,24 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
15130
15200
  ], [
15131
15201
  "shopify_product"
15132
15202
  ]),
15203
+ // MCP-only recovery of an existing code edit. WhatsApp has no code-landing
15204
+ // editor or edit receipt input; it hands this recovery to ProductMaker Web.
15205
+ defineCapability("verify_landing_commerce", "4b98ea73f291428fa19ec91ec37deb44a776b76cb19b0d47aef20ee905da7d10", "external_mutation", "publishing", [
15206
+ "read",
15207
+ "state_change",
15208
+ "external_mutation"
15209
+ ], [
15210
+ slot("task", true, [
15211
+ "taskId"
15212
+ ], []),
15213
+ slot("landing_edit", true, [
15214
+ "editId"
15215
+ ], [])
15216
+ ], [
15217
+ "landing_edit"
15218
+ ], [
15219
+ "commerce_verification"
15220
+ ], MCP_ONLY_CHANNEL_EXPOSURE),
15133
15221
  defineCapability("publish_to_tiktok", "89b0ffc96d195d8f9813b77a2d4b7724236a1524dfe8170347c6311547bd2e3e", "external_mutation", "publishing", [
15134
15222
  "external_mutation",
15135
15223
  "state_change"
@@ -18745,7 +18833,7 @@ var ApiClient = class {
18745
18833
  };
18746
18834
 
18747
18835
  // src/index.ts
18748
- var MCP_VERSION = "8.8.1";
18836
+ var MCP_VERSION = "8.9.1";
18749
18837
 
18750
18838
  // src/meta-upload-app.ts
18751
18839
  import { readFileSync } from "fs";
@@ -21802,6 +21890,30 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
21802
21890
  throw translateError(e);
21803
21891
  }
21804
21892
  });
21893
+ server.registerTool("verify_landing_commerce", {
21894
+ 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.",
21895
+ inputSchema: {
21896
+ taskId: z82.string().uuid(),
21897
+ editId: z82.string().uuid()
21898
+ },
21899
+ annotations: OVERWRITES_EXTERNAL
21900
+ }, async (input) => {
21901
+ try {
21902
+ const response = await api.postJson(`/v1/tasks/${encodeURIComponent(input.taskId)}/landing-edits/${encodeURIComponent(input.editId)}/verify-commerce`, {});
21903
+ const edit = LandingEditDto.parse(response.edit);
21904
+ const { error: _diagnostic, errorCode: _code, ...publicEdit } = edit;
21905
+ return {
21906
+ ...asText(JSON.stringify({
21907
+ edit: publicEdit
21908
+ })),
21909
+ structuredContent: {
21910
+ edit: publicEdit
21911
+ }
21912
+ };
21913
+ } catch (error) {
21914
+ throw translateError(error);
21915
+ }
21916
+ });
21805
21917
  server.registerTool("get_task_status", {
21806
21918
  description: "Devuelve estado y outputs. Sigue llam\xE1ndola hasta done/error o una review; un timeout significa que sigue corriendo. Cuando aparece pendingUserAction, la respuesta a\xF1ade Markdown conversacional con el draft y opciones: mu\xE9stralo, pregunta y espera. Usa resolve_pending_action s\xF3lo tras la respuesta del usuario o delegaci\xF3n expl\xEDcita. Nunca expongas IDs, hashes ni payloads t\xE9cnicos. Despu\xE9s de resolver una review, sigue reviewNextAction cuando exista; s\xF3lo vuelve a get_task_status cuando esa transici\xF3n no exista o cuando get_video_script termine en approved/skipped.",
21807
21919
  inputSchema: GetTaskStatusInput.shape,
package/dist/stdio.js CHANGED
@@ -3052,7 +3052,8 @@ var SuggestedPackSchema = z20.object({
3052
3052
  }).strict();
3053
3053
  var ConfirmedPackSchema = z20.object({
3054
3054
  units: PublishRecoveryPackUnitsSchema,
3055
- total: PositiveNormalizedMoneySchema
3055
+ total: PositiveNormalizedMoneySchema,
3056
+ compareAtPrice: PositiveNormalizedMoneySchema.nullable().optional()
3056
3057
  }).strict();
3057
3058
  var SuggestedPacksSchema = z20.array(SuggestedPackSchema).max(2).superRefine(withDistinctPackQuantities);
3058
3059
  var ConfirmedPacksSchema = z20.array(ConfirmedPackSchema).max(2).superRefine(withDistinctPackQuantities);
@@ -3064,6 +3065,7 @@ var PublishCommerceSuggestionSchema = z20.object({
3064
3065
  var PublishCommerceValuesSchema = z20.object({
3065
3066
  currency: CurrencySchema,
3066
3067
  unitPrice: PositiveNormalizedMoneySchema,
3068
+ compareAtPrice: PositiveNormalizedMoneySchema.nullable().optional(),
3067
3069
  packs: ConfirmedPacksSchema
3068
3070
  }).strict();
3069
3071
  var PublishRecoveryFieldSchema = z20.enum([
@@ -3351,10 +3353,14 @@ var CodeLandingCommerceSnapshotSchema = z21.object({
3351
3353
  productVariantId: z21.string().trim().min(1).max(500).optional(),
3352
3354
  price: z21.string().trim().min(1).max(500).optional(),
3353
3355
  compareAtPrice: z21.string().trim().min(1).max(500).optional(),
3356
+ /** Explicit removal survives projections that otherwise derive a comparison. */
3357
+ compareAtPriceRemoved: z21.literal(true).optional(),
3354
3358
  /** Confirmed offer facts before Shopify supplies real chargeable variants. */
3355
3359
  offerPacks: z21.array(z21.object({
3356
3360
  units: z21.number().int().min(2).max(99),
3357
- price: PublishCommerceValuesSchema.shape.unitPrice
3361
+ price: PublishCommerceValuesSchema.shape.unitPrice,
3362
+ /** Absent preserves legacy derivation; null explicitly removes it. */
3363
+ compareAtPrice: PublishCommerceValuesSchema.shape.unitPrice.nullable().optional()
3358
3364
  }).strict()).max(2).refine((packs) => new Set(packs.map((pack) => pack.units)).size === packs.length, "Each confirmed pack quantity must be distinct").optional(),
3359
3365
  /**
3360
3366
  * The seller's explicit pack decision (D5). `offerPacks: []` alone is
@@ -3761,6 +3767,8 @@ var CodeLandingAuthorEnvelopeSchema = z21.object({
3761
3767
  var CodeLandingCommerceChangeSchema = z21.object({
3762
3768
  price: z21.string().trim().min(1).max(40).optional(),
3763
3769
  compareAtPrice: z21.string().trim().min(1).max(40).nullable().optional(),
3770
+ /** Remove offer quantities without deleting their Shopify variants. */
3771
+ removePackUnits: z21.array(z21.number().int().min(2).max(99)).max(2).optional(),
3764
3772
  packs: z21.array(z21.object({
3765
3773
  units: z21.number().int().min(1).max(99),
3766
3774
  price: z21.string().trim().min(1).max(40),
@@ -3990,6 +3998,52 @@ var CreateLandingEditRequest = z21.union([
3990
3998
  QuotedLandingEditRequest,
3991
3999
  LegacyLandingEditRequest
3992
4000
  ]);
4001
+ var CommerceReconciliationSchema = z21.object({
4002
+ state: z21.enum([
4003
+ "pending",
4004
+ "awaiting_external_fix",
4005
+ "verified",
4006
+ "superseded"
4007
+ ]),
4008
+ desiredRevision: z21.number().int().positive(),
4009
+ fingerprint: z21.string().min(1),
4010
+ startedAt: z21.string().datetime(),
4011
+ deadlineAt: z21.string().datetime(),
4012
+ shopDomain: z21.string().optional(),
4013
+ productId: z21.string().optional(),
4014
+ currency: z21.string().optional(),
4015
+ documentPublished: z21.boolean(),
4016
+ checkoutVerified: z21.boolean(),
4017
+ systems: z21.array(z21.object({
4018
+ provider: z21.enum([
4019
+ "shopify",
4020
+ "releasit",
4021
+ "easysell"
4022
+ ]),
4023
+ status: z21.enum([
4024
+ "pending",
4025
+ "verified"
4026
+ ]),
4027
+ adminUrl: z21.string().url().optional(),
4028
+ reason: z21.enum([
4029
+ "money_mismatch",
4030
+ "binding_missing",
4031
+ "provider_unverified",
4032
+ "permission_missing",
4033
+ "publication_pending",
4034
+ "external_conflict",
4035
+ "unavailable"
4036
+ ]).optional(),
4037
+ corrections: z21.array(z21.object({
4038
+ units: z21.number().int().positive(),
4039
+ variantId: z21.string().optional(),
4040
+ price: z21.string(),
4041
+ compareAtPrice: z21.string().nullable(),
4042
+ actualPrice: z21.string().nullable().optional(),
4043
+ actualCompareAtPrice: z21.string().nullable().optional()
4044
+ }))
4045
+ }))
4046
+ });
3993
4047
  var LandingEditDto = z21.object({
3994
4048
  id: z21.string(),
3995
4049
  scope: z21.enum([
@@ -4023,6 +4077,7 @@ var LandingEditDto = z21.object({
4023
4077
  progressStage: z21.string().nullable().optional(),
4024
4078
  errorCode: z21.string().nullable().optional(),
4025
4079
  retryable: z21.boolean().optional(),
4080
+ commerceReconciliation: CommerceReconciliationSchema.nullable().optional(),
4026
4081
  /** Photos the seller attached to this message (see LandingEditAttachmentDto). */
4027
4082
  attachmentIds: z21.array(z21.string().uuid()).max(4).optional()
4028
4083
  });
@@ -12871,6 +12926,21 @@ var CAPABILITY_MODEL_GUIDANCE = {
12871
12926
  "confirma tienda y variantes; guardar no prueba publicaci\xF3n: verifica lo incierto"
12872
12927
  ]
12873
12928
  },
12929
+ verify_landing_commerce: {
12930
+ summary: "Comprueba gratis una correcci\xF3n manual de precios y ofertas de la landing.",
12931
+ useWhen: [
12932
+ "ya correg\xED los precios en mi tienda; verifica la oferta"
12933
+ ],
12934
+ avoidWhen: [
12935
+ "la persona pide cambiar la oferta o generar otra p\xE1gina"
12936
+ ],
12937
+ defaults: [
12938
+ "conserva la p\xE1gina y los avisos pendientes hasta verificar cada sistema"
12939
+ ],
12940
+ disclosures: [
12941
+ "requiere solicitud o confirmaci\xF3n expl\xEDcita de verificaci\xF3n; no cambia precios ni inventario y no consume cr\xE9ditos; una compra verificada puede volver a habilitarse"
12942
+ ]
12943
+ },
12874
12944
  publish_to_tiktok: {
12875
12945
  summary: "Crea una campa\xF1a de TikTok Ads desde la tarea.",
12876
12946
  useWhen: [
@@ -15114,7 +15184,7 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
15114
15184
  ], [
15115
15185
  "meta_publication"
15116
15186
  ]),
15117
- defineCapability("publish_to_shopify", "193dc142c87cda163dbd39879519e38a18ba8d063c9e810c6fc5bf878151959b", "external_mutation", "publishing", [
15187
+ defineCapability("publish_to_shopify", "e041e404ad9f6cf49231c9bc38df22e6bd0aa6e4082b4ab8dc655a132b79873f", "external_mutation", "publishing", [
15118
15188
  "external_mutation",
15119
15189
  "state_change"
15120
15190
  ], [
@@ -15152,6 +15222,24 @@ var PRODUCTMAKER_CAPABILITY_REGISTRY = deepFreeze([
15152
15222
  ], [
15153
15223
  "shopify_product"
15154
15224
  ]),
15225
+ // MCP-only recovery of an existing code edit. WhatsApp has no code-landing
15226
+ // editor or edit receipt input; it hands this recovery to ProductMaker Web.
15227
+ defineCapability("verify_landing_commerce", "4b98ea73f291428fa19ec91ec37deb44a776b76cb19b0d47aef20ee905da7d10", "external_mutation", "publishing", [
15228
+ "read",
15229
+ "state_change",
15230
+ "external_mutation"
15231
+ ], [
15232
+ slot("task", true, [
15233
+ "taskId"
15234
+ ], []),
15235
+ slot("landing_edit", true, [
15236
+ "editId"
15237
+ ], [])
15238
+ ], [
15239
+ "landing_edit"
15240
+ ], [
15241
+ "commerce_verification"
15242
+ ], MCP_ONLY_CHANNEL_EXPOSURE),
15155
15243
  defineCapability("publish_to_tiktok", "89b0ffc96d195d8f9813b77a2d4b7724236a1524dfe8170347c6311547bd2e3e", "external_mutation", "publishing", [
15156
15244
  "external_mutation",
15157
15245
  "state_change"
@@ -17077,7 +17165,7 @@ var ApiClient = class {
17077
17165
  };
17078
17166
 
17079
17167
  // src/index.ts
17080
- var MCP_VERSION = "8.8.1";
17168
+ var MCP_VERSION = "8.9.1";
17081
17169
 
17082
17170
  // src/meta-upload-app.ts
17083
17171
  import { readFileSync } from "fs";
@@ -20187,6 +20275,30 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
20187
20275
  throw translateError(e);
20188
20276
  }
20189
20277
  });
20278
+ server.registerTool("verify_landing_commerce", {
20279
+ 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.",
20280
+ inputSchema: {
20281
+ taskId: z81.string().uuid(),
20282
+ editId: z81.string().uuid()
20283
+ },
20284
+ annotations: OVERWRITES_EXTERNAL
20285
+ }, async (input) => {
20286
+ try {
20287
+ const response = await api.postJson(`/v1/tasks/${encodeURIComponent(input.taskId)}/landing-edits/${encodeURIComponent(input.editId)}/verify-commerce`, {});
20288
+ const edit = LandingEditDto.parse(response.edit);
20289
+ const { error: _diagnostic, errorCode: _code, ...publicEdit } = edit;
20290
+ return {
20291
+ ...asText(JSON.stringify({
20292
+ edit: publicEdit
20293
+ })),
20294
+ structuredContent: {
20295
+ edit: publicEdit
20296
+ }
20297
+ };
20298
+ } catch (error) {
20299
+ throw translateError(error);
20300
+ }
20301
+ });
20190
20302
  server.registerTool("get_task_status", {
20191
20303
  description: "Devuelve estado y outputs. Sigue llam\xE1ndola hasta done/error o una review; un timeout significa que sigue corriendo. Cuando aparece pendingUserAction, la respuesta a\xF1ade Markdown conversacional con el draft y opciones: mu\xE9stralo, pregunta y espera. Usa resolve_pending_action s\xF3lo tras la respuesta del usuario o delegaci\xF3n expl\xEDcita. Nunca expongas IDs, hashes ni payloads t\xE9cnicos. Despu\xE9s de resolver una review, sigue reviewNextAction cuando exista; s\xF3lo vuelve a get_task_status cuando esa transici\xF3n no exista o cuando get_video_script termine en approved/skipped.",
20192
20304
  inputSchema: GetTaskStatusInput.shape,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@productmaker/mcp",
3
- "version": "8.8.1",
3
+ "version": "8.9.1",
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.",
@@ -59,12 +59,12 @@
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/express": "^4.17.21",
62
- "@types/node": "^20.11.0",
62
+ "@types/node": "^22.0.0",
63
63
  "msw": "^2.4.0",
64
64
  "tsup": "^8.3.0",
65
65
  "tsx": "^4.16.0",
66
66
  "typescript": "^7.0.2",
67
- "vitest": "4.1.11",
67
+ "vitest": "5.0.3",
68
68
  "@packages/product-economics": "0.1.0",
69
69
  "@packages/types": "0.1.0"
70
70
  },