@productmaker/mcp 0.15.2 → 0.15.3

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 CHANGED
@@ -113,7 +113,7 @@ var ApiClient = class {
113
113
  };
114
114
 
115
115
  // src/index.ts
116
- var MCP_VERSION = "0.3.0";
116
+ var MCP_VERSION = "0.15.3";
117
117
 
118
118
  // src/tools/tasks.ts
119
119
  import { z as z2 } from "zod";
@@ -358,13 +358,13 @@ async function pollStatus(fetcher, waitSeconds, signal, opts = {}) {
358
358
  const effective = Math.min(Math.max(0, waitSeconds), maxWait);
359
359
  let snapshot = await fetcher();
360
360
  if (effective === 0) return snapshot;
361
- if (TERMINAL.has(snapshot.status) || snapshot.status === "awaiting_review") return snapshot;
361
+ if (TERMINAL.has(snapshot.status) || snapshot.status === "awaiting_review" || snapshot.pendingUserAction != null) return snapshot;
362
362
  const deadline = Date.now() + effective * 1e3;
363
363
  while (Date.now() < deadline) {
364
364
  if (signal?.aborted) throw new Error("aborted");
365
365
  await sleep(intervalMs, signal);
366
366
  const next = await fetcher();
367
- if (next.status !== snapshot.status || next.phase !== snapshot.phase || TERMINAL.has(next.status) || next.status === "awaiting_review") {
367
+ if (next.status !== snapshot.status || next.phase !== snapshot.phase || TERMINAL.has(next.status) || next.status === "awaiting_review" || next.pendingUserAction != null) {
368
368
  return next;
369
369
  }
370
370
  snapshot = next;
@@ -1284,7 +1284,7 @@ function registerTaskTools(server, api, { proxyBaseUrl = null, transport = "http
1284
1284
  throw translateError(e);
1285
1285
  }
1286
1286
  });
1287
- server.tool("get_task_status", 'Devuelve el estado y URLs de outputs de una tarea. Si waitSeconds>0, hace polling hasta que cambie la fase o llegue al timeout (max 120s). Cuando la tarea queda en `done`, la respuesta incluye un segundo bloque markdown con previews inline de las im\xE1genes, links descargables al video MP4 y un enlace a Product Maker para ver el resultado completo.\n\nIMPORTANTE \u2014 `pendingUserAction`: si est\xE1 presente, el pipeline est\xE1 PARADO esperando que el usuario decida algo. Mira el `kind` (hoy: `"product_reference_confirmation"` \u2014 el clasificador no est\xE1 seguro si las fotos son variantes del mismo producto o productos distintos), mu\xE9strale al usuario `targetProductLabel` + `reason` en lenguaje natural, recoge su respuesta, y llama `resolve_pending_action` con `action: { kind: <mismo kind>, ... }` (las `options` v\xE1lidas vienen en el mismo objeto). Sin esto la tarea NUNCA avanza por m\xE1s que esperes. Use this to check on a task progress; pass waitSeconds for a near-synchronous response.', GetTaskStatusInput.shape, async (input, extra) => {
1287
+ server.tool("get_task_status", 'Devuelve el estado y URLs de outputs de una tarea. Si waitSeconds>0, hace polling hasta que cambie la fase, aparezca `pendingUserAction`, o llegue al timeout (max 120s). Cuando la tarea queda en `done`, la respuesta incluye un segundo bloque markdown con previews inline de las im\xE1genes, links descargables al video MP4 y un enlace a Product Maker para ver el resultado completo.\n\nIMPORTANTE \u2014 `pendingUserAction`: si est\xE1 presente, el pipeline est\xE1 PARADO esperando que el usuario decida algo. Mira el `kind` y llama `resolve_pending_action` con `action: { kind: <mismo kind>, ... }`; sin esto la tarea NUNCA avanza por m\xE1s que esperes. Kinds actuales:\n- `product_reference_confirmation`: el clasificador no est\xE1 seguro si las fotos son variantes del mismo producto o productos distintos. Mu\xE9strale al usuario `targetProductLabel` + `reason`, recoge su respuesta, y usa SOLO valores presentes en `options`.\n- `angle_review_approval`: la IA ya gener\xF3 el \xE1ngulo/revisi\xF3n antes de renderizar. Mu\xE9strale `customAngleDraft`, `painPointsDraft`, `benefitsDraft`, `featuresDraft` si vienen; si no vienen, puedes pedir aprobaci\xF3n general y llamar `resolve_pending_action` con solo `{ kind: "angle_review_approval" }` para aprobar tal cual.\nUse this to check on a task progress; pass waitSeconds for a near-synchronous response.', GetTaskStatusInput.shape, async (input, extra) => {
1288
1288
  try {
1289
1289
  const fetcher = /* @__PURE__ */ __name(() => api.getJson(`/v1/status/${encodeURIComponent(input.taskId)}`), "fetcher");
1290
1290
  const signal = extra?.signal;
package/dist/stdio.js CHANGED
@@ -110,7 +110,7 @@ var ApiClient = class {
110
110
  };
111
111
 
112
112
  // src/index.ts
113
- var MCP_VERSION = "0.3.0";
113
+ var MCP_VERSION = "0.15.3";
114
114
 
115
115
  // src/tools/tasks.ts
116
116
  import { z as z2 } from "zod";
@@ -355,13 +355,13 @@ async function pollStatus(fetcher, waitSeconds, signal, opts = {}) {
355
355
  const effective = Math.min(Math.max(0, waitSeconds), maxWait);
356
356
  let snapshot = await fetcher();
357
357
  if (effective === 0) return snapshot;
358
- if (TERMINAL.has(snapshot.status) || snapshot.status === "awaiting_review") return snapshot;
358
+ if (TERMINAL.has(snapshot.status) || snapshot.status === "awaiting_review" || snapshot.pendingUserAction != null) return snapshot;
359
359
  const deadline = Date.now() + effective * 1e3;
360
360
  while (Date.now() < deadline) {
361
361
  if (signal?.aborted) throw new Error("aborted");
362
362
  await sleep(intervalMs, signal);
363
363
  const next = await fetcher();
364
- if (next.status !== snapshot.status || next.phase !== snapshot.phase || TERMINAL.has(next.status) || next.status === "awaiting_review") {
364
+ if (next.status !== snapshot.status || next.phase !== snapshot.phase || TERMINAL.has(next.status) || next.status === "awaiting_review" || next.pendingUserAction != null) {
365
365
  return next;
366
366
  }
367
367
  snapshot = next;
@@ -1240,7 +1240,7 @@ function registerTaskTools(server, api, { proxyBaseUrl = null, transport = "http
1240
1240
  throw translateError(e);
1241
1241
  }
1242
1242
  });
1243
- server.tool("get_task_status", 'Devuelve el estado y URLs de outputs de una tarea. Si waitSeconds>0, hace polling hasta que cambie la fase o llegue al timeout (max 120s). Cuando la tarea queda en `done`, la respuesta incluye un segundo bloque markdown con previews inline de las im\xE1genes, links descargables al video MP4 y un enlace a Product Maker para ver el resultado completo.\n\nIMPORTANTE \u2014 `pendingUserAction`: si est\xE1 presente, el pipeline est\xE1 PARADO esperando que el usuario decida algo. Mira el `kind` (hoy: `"product_reference_confirmation"` \u2014 el clasificador no est\xE1 seguro si las fotos son variantes del mismo producto o productos distintos), mu\xE9strale al usuario `targetProductLabel` + `reason` en lenguaje natural, recoge su respuesta, y llama `resolve_pending_action` con `action: { kind: <mismo kind>, ... }` (las `options` v\xE1lidas vienen en el mismo objeto). Sin esto la tarea NUNCA avanza por m\xE1s que esperes. Use this to check on a task progress; pass waitSeconds for a near-synchronous response.', GetTaskStatusInput.shape, async (input, extra) => {
1243
+ server.tool("get_task_status", 'Devuelve el estado y URLs de outputs de una tarea. Si waitSeconds>0, hace polling hasta que cambie la fase, aparezca `pendingUserAction`, o llegue al timeout (max 120s). Cuando la tarea queda en `done`, la respuesta incluye un segundo bloque markdown con previews inline de las im\xE1genes, links descargables al video MP4 y un enlace a Product Maker para ver el resultado completo.\n\nIMPORTANTE \u2014 `pendingUserAction`: si est\xE1 presente, el pipeline est\xE1 PARADO esperando que el usuario decida algo. Mira el `kind` y llama `resolve_pending_action` con `action: { kind: <mismo kind>, ... }`; sin esto la tarea NUNCA avanza por m\xE1s que esperes. Kinds actuales:\n- `product_reference_confirmation`: el clasificador no est\xE1 seguro si las fotos son variantes del mismo producto o productos distintos. Mu\xE9strale al usuario `targetProductLabel` + `reason`, recoge su respuesta, y usa SOLO valores presentes en `options`.\n- `angle_review_approval`: la IA ya gener\xF3 el \xE1ngulo/revisi\xF3n antes de renderizar. Mu\xE9strale `customAngleDraft`, `painPointsDraft`, `benefitsDraft`, `featuresDraft` si vienen; si no vienen, puedes pedir aprobaci\xF3n general y llamar `resolve_pending_action` con solo `{ kind: "angle_review_approval" }` para aprobar tal cual.\nUse this to check on a task progress; pass waitSeconds for a near-synchronous response.', GetTaskStatusInput.shape, async (input, extra) => {
1244
1244
  try {
1245
1245
  const fetcher = /* @__PURE__ */ __name(() => api.getJson(`/v1/status/${encodeURIComponent(input.taskId)}`), "fetcher");
1246
1246
  const signal = extra?.signal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@productmaker/mcp",
3
- "version": "0.15.2",
3
+ "version": "0.15.3",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "Product Maker MCP server — connect Claude Desktop, Claude Code, ChatGPT, or Gemini to Product Maker AI to generate dropshipping landing pages, UGC videos, and ad creatives, and publish to Shopify and Meta Ads from your AI assistant.",