@productmaker/mcp 11.6.3 → 11.6.4

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,6 +130,12 @@ 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
+ `list_tasks` also includes generated service landings and their active or failed
134
+ creation. A row with `resourceType: "service_page"` belongs to a ServicePage,
135
+ not the product Task API. Follow its `nextAction` (`create_service_landing` with
136
+ `action: "status"` and `servicePageId`) to inspect it. The web opens that row in
137
+ its service-page editor, including its generation progress.
138
+
133
139
  | Tool | What it does |
134
140
  | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
135
141
  | `cost_product` | Estimate a safe Colombia/COP selling price for free, then reuse its `price` and `compareAtPrice` in `create_product_task` |
package/dist/http.js CHANGED
@@ -8233,6 +8233,8 @@ var StatusResponse = z41.object({
8233
8233
  });
8234
8234
  var TaskSummary = z41.object({
8235
8235
  taskId: z41.string().uuid(),
8236
+ /** A projected ServicePage, opened through its own editor and lifecycle. */
8237
+ resourceType: z41.literal("service_page").optional(),
8236
8238
  status: TaskStatusSchema,
8237
8239
  step: z41.enum([
8238
8240
  "extract",
@@ -25038,7 +25040,7 @@ var ApiClient = class {
25038
25040
  };
25039
25041
 
25040
25042
  // src/index.ts
25041
- var MCP_VERSION = "11.6.3";
25043
+ var MCP_VERSION = "11.6.4";
25042
25044
 
25043
25045
  // src/meta-upload-app.ts
25044
25046
  import { readFileSync } from "fs";
@@ -28980,7 +28982,30 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
28980
28982
  if (input.search) qs.set("search", input.search);
28981
28983
  const path3 = `/v1/tasks${qs.toString() ? "?" + qs.toString() : ""}`;
28982
28984
  const r = await api.getJson(path3);
28983
- return asText(r);
28985
+ const page = z120.object({
28986
+ items: z120.array(z120.unknown())
28987
+ }).passthrough().safeParse(r);
28988
+ if (!page.success) return asText(r);
28989
+ return asText({
28990
+ ...page.data,
28991
+ items: page.data.items.map((item) => {
28992
+ const servicePage = z120.object({
28993
+ taskId: z120.string().uuid(),
28994
+ resourceType: z120.literal("service_page")
28995
+ }).passthrough().safeParse(item);
28996
+ if (!servicePage.success) return item;
28997
+ return {
28998
+ ...servicePage.data,
28999
+ nextAction: {
29000
+ tool: "create_service_landing",
29001
+ arguments: {
29002
+ action: "status",
29003
+ servicePageId: servicePage.data.taskId
29004
+ }
29005
+ }
29006
+ };
29007
+ })
29008
+ });
28984
29009
  } catch (e) {
28985
29010
  throw translateError(e);
28986
29011
  }
@@ -29979,6 +30004,24 @@ function registerServiceLandingTools(server, api) {
29979
30004
  throw mcp(McpErrorCode.INVALID_INPUT, "servicePageId es obligatorio: usa el que devolvi\xF3 prepare. No se cobr\xF3 nada.");
29980
30005
  }
29981
30006
  if (input.action === "status") {
30007
+ if (!input.operationId) {
30008
+ const creation = ServicePageCreationStatusSchema.parse(await api.getJson(`${pagePath(input.servicePageId)}/creation`));
30009
+ if (creation.status !== "idle") {
30010
+ const editorUrl = serviceEditorUrl(api, input.servicePageId);
30011
+ return asText({
30012
+ servicePageId: input.servicePageId,
30013
+ status: creation.status,
30014
+ ...editorUrl ? {
30015
+ editorUrl
30016
+ } : {},
30017
+ ...creation.status === "failed" ? {
30018
+ errorCode: creation.errorCode,
30019
+ reason: "No pudimos terminar la p\xE1gina. Tus datos siguen guardados."
30020
+ } : {},
30021
+ nextAction: creation.status === "running" ? "Sigue en curso. Vuelve a llamar action=status con el mismo servicePageId en unos segundos; no inicies otra etapa." : "La creaci\xF3n fall\xF3. Muestra el motivo al usuario y el enlace al editor, si est\xE1 disponible; no inicies otra generaci\xF3n sin su autorizaci\xF3n."
30022
+ });
30023
+ }
30024
+ }
29982
30025
  let operation2 = null;
29983
30026
  if (input.operationId) {
29984
30027
  operation2 = await api.getJson(`/v1/service-pages/operations/${encodeURIComponent(input.operationId)}`);
@@ -30013,6 +30056,22 @@ function registerServiceLandingTools(server, api) {
30013
30056
  }
30014
30057
  const page2 = await readPage(input.servicePageId);
30015
30058
  if (isPageGenerated(page2)) return generatedResponse(page2);
30059
+ if (!input.operationId) {
30060
+ const editorUrl = serviceEditorUrl(api, page2.id);
30061
+ return asText({
30062
+ servicePageId: page2.id,
30063
+ status: "not_generated",
30064
+ operationStatus: "unknown",
30065
+ ...editorUrl ? {
30066
+ editorUrl
30067
+ } : {},
30068
+ reason: "La p\xE1gina a\xFAn no tiene un resultado generado. Sin operationId no podemos determinar el estado de la operaci\xF3n; consulta sus tareas o abre el editor para revisar su progreso.",
30069
+ nextAction: {
30070
+ tool: "list_tasks",
30071
+ arguments: {}
30072
+ }
30073
+ });
30074
+ }
30016
30075
  const missing = describeMissing(page2.missingFields);
30017
30076
  return asText({
30018
30077
  servicePageId: page2.id,
package/dist/stdio.js CHANGED
@@ -8255,6 +8255,8 @@ var StatusResponse = z41.object({
8255
8255
  });
8256
8256
  var TaskSummary = z41.object({
8257
8257
  taskId: z41.string().uuid(),
8258
+ /** A projected ServicePage, opened through its own editor and lifecycle. */
8259
+ resourceType: z41.literal("service_page").optional(),
8258
8260
  status: TaskStatusSchema,
8259
8261
  step: z41.enum([
8260
8262
  "extract",
@@ -23367,7 +23369,7 @@ var ApiClient = class {
23367
23369
  };
23368
23370
 
23369
23371
  // src/index.ts
23370
- var MCP_VERSION = "11.6.3";
23372
+ var MCP_VERSION = "11.6.4";
23371
23373
 
23372
23374
  // src/meta-upload-app.ts
23373
23375
  import { readFileSync } from "fs";
@@ -27362,7 +27364,30 @@ ANTES de invocar, resume outputs, cantidad de videos y datos comerciales, explic
27362
27364
  if (input.search) qs.set("search", input.search);
27363
27365
  const path3 = `/v1/tasks${qs.toString() ? "?" + qs.toString() : ""}`;
27364
27366
  const r = await api.getJson(path3);
27365
- return asText(r);
27367
+ const page = z119.object({
27368
+ items: z119.array(z119.unknown())
27369
+ }).passthrough().safeParse(r);
27370
+ if (!page.success) return asText(r);
27371
+ return asText({
27372
+ ...page.data,
27373
+ items: page.data.items.map((item) => {
27374
+ const servicePage = z119.object({
27375
+ taskId: z119.string().uuid(),
27376
+ resourceType: z119.literal("service_page")
27377
+ }).passthrough().safeParse(item);
27378
+ if (!servicePage.success) return item;
27379
+ return {
27380
+ ...servicePage.data,
27381
+ nextAction: {
27382
+ tool: "create_service_landing",
27383
+ arguments: {
27384
+ action: "status",
27385
+ servicePageId: servicePage.data.taskId
27386
+ }
27387
+ }
27388
+ };
27389
+ })
27390
+ });
27366
27391
  } catch (e) {
27367
27392
  throw translateError(e);
27368
27393
  }
@@ -28361,6 +28386,24 @@ function registerServiceLandingTools(server, api) {
28361
28386
  throw mcp(McpErrorCode.INVALID_INPUT, "servicePageId es obligatorio: usa el que devolvi\xF3 prepare. No se cobr\xF3 nada.");
28362
28387
  }
28363
28388
  if (input.action === "status") {
28389
+ if (!input.operationId) {
28390
+ const creation = ServicePageCreationStatusSchema.parse(await api.getJson(`${pagePath(input.servicePageId)}/creation`));
28391
+ if (creation.status !== "idle") {
28392
+ const editorUrl = serviceEditorUrl(api, input.servicePageId);
28393
+ return asText({
28394
+ servicePageId: input.servicePageId,
28395
+ status: creation.status,
28396
+ ...editorUrl ? {
28397
+ editorUrl
28398
+ } : {},
28399
+ ...creation.status === "failed" ? {
28400
+ errorCode: creation.errorCode,
28401
+ reason: "No pudimos terminar la p\xE1gina. Tus datos siguen guardados."
28402
+ } : {},
28403
+ nextAction: creation.status === "running" ? "Sigue en curso. Vuelve a llamar action=status con el mismo servicePageId en unos segundos; no inicies otra etapa." : "La creaci\xF3n fall\xF3. Muestra el motivo al usuario y el enlace al editor, si est\xE1 disponible; no inicies otra generaci\xF3n sin su autorizaci\xF3n."
28404
+ });
28405
+ }
28406
+ }
28364
28407
  let operation2 = null;
28365
28408
  if (input.operationId) {
28366
28409
  operation2 = await api.getJson(`/v1/service-pages/operations/${encodeURIComponent(input.operationId)}`);
@@ -28395,6 +28438,22 @@ function registerServiceLandingTools(server, api) {
28395
28438
  }
28396
28439
  const page2 = await readPage(input.servicePageId);
28397
28440
  if (isPageGenerated(page2)) return generatedResponse(page2);
28441
+ if (!input.operationId) {
28442
+ const editorUrl = serviceEditorUrl(api, page2.id);
28443
+ return asText({
28444
+ servicePageId: page2.id,
28445
+ status: "not_generated",
28446
+ operationStatus: "unknown",
28447
+ ...editorUrl ? {
28448
+ editorUrl
28449
+ } : {},
28450
+ reason: "La p\xE1gina a\xFAn no tiene un resultado generado. Sin operationId no podemos determinar el estado de la operaci\xF3n; consulta sus tareas o abre el editor para revisar su progreso.",
28451
+ nextAction: {
28452
+ tool: "list_tasks",
28453
+ arguments: {}
28454
+ }
28455
+ });
28456
+ }
28398
28457
  const missing = describeMissing(page2.missingFields);
28399
28458
  return asText({
28400
28459
  servicePageId: page2.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@productmaker/mcp",
3
- "version": "11.6.3",
3
+ "version": "11.6.4",
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.",
@@ -66,8 +66,8 @@
66
66
  "typescript": "^7.0.2",
67
67
  "vitest": "5.0.3",
68
68
  "@packages/product-economics": "0.1.0",
69
- "@packages/types": "0.1.0",
70
- "@packages/utils": "0.1.0"
69
+ "@packages/utils": "0.1.0",
70
+ "@packages/types": "0.1.0"
71
71
  },
72
72
  "publishConfig": {
73
73
  "access": "public"