@productmaker/mcp 3.2.0 → 3.3.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 CHANGED
@@ -2600,7 +2600,13 @@ var VideoGenerator = z18.object({
2600
2600
  videoResolution: VideoResolution.optional(),
2601
2601
  /** Requested controls and the effective provider route that produced this result. */
2602
2602
  execution: VideoExecutionContract.optional(),
2603
- adCopy: z18.string().optional()
2603
+ adCopy: z18.string().optional(),
2604
+ /** TRUE when the seller APPROVED a script for this angle that the plan path
2605
+ * could not honor, so a fresh script was re-authored and rendered instead
2606
+ * (PR #1470). The angle still delivered — nothing was lost and nothing is
2607
+ * refundable — but the video is NOT the script they signed off on, and the
2608
+ * UI must say so. Absent (never `false`) on every honest delivery. */
2609
+ scriptRewritten: z18.boolean().optional()
2604
2610
  });
2605
2611
  var VideoScriptSceneForReview = z18.object({
2606
2612
  index: z18.number().int().nonnegative(),
@@ -4136,8 +4142,20 @@ var AdminUserListResponse = z27.object({
4136
4142
  page: z27.number().int().positive(),
4137
4143
  pageSize: z27.number().int().positive()
4138
4144
  });
4145
+ var AdminCreditGrantReason = z27.enum([
4146
+ "compensation",
4147
+ "goodwill",
4148
+ "promo",
4149
+ "internal-testing",
4150
+ "correction"
4151
+ ]);
4139
4152
  var UpdateUserCreditsRequest = z27.object({
4140
- creditCents: z27.number().nonnegative()
4153
+ creditCents: z27.number().nonnegative(),
4154
+ reason: AdminCreditGrantReason,
4155
+ /** Free-text detail. Required when the enum alone does not explain the grant. */
4156
+ notes: z27.string().trim().min(1).max(500).optional(),
4157
+ /** The task the grant compensates, when there is one. */
4158
+ taskId: z27.string().uuid().optional()
4141
4159
  });
4142
4160
  var QualityReportStatus = z27.enum([
4143
4161
  "open",
@@ -11400,7 +11418,7 @@ var ApiClient = class {
11400
11418
  };
11401
11419
 
11402
11420
  // src/index.ts
11403
- var MCP_VERSION = "3.2.0";
11421
+ var MCP_VERSION = "3.3.0";
11404
11422
 
11405
11423
  // src/meta-upload-app.ts
11406
11424
  import { readFileSync } from "fs";
@@ -12850,7 +12868,12 @@ async function fetchTaskOutputs(api, taskId, options) {
12850
12868
  return {
12851
12869
  angleKey: vg.angleKey ?? "",
12852
12870
  angleIndex: vg.angleIndex ?? 0,
12853
- variants: variants2.length ? variants2 : fallback
12871
+ variants: variants2.length ? variants2 : fallback,
12872
+ // Only ever true — an honest delivery leaves the key off entirely so no
12873
+ // consumer has to distinguish `false` from "the API is older than this".
12874
+ ...vg.scriptRewritten === true ? {
12875
+ scriptRewritten: true
12876
+ } : {}
12854
12877
  };
12855
12878
  }).filter((v) => v.angleKey && v.variants.length);
12856
12879
  const sections = (raw.landing?.images ?? []).filter((img) => Boolean(img.role) && Boolean(img.url)).map((img) => ({
@@ -12913,6 +12936,9 @@ function renderOutputsMarkdown(outputs) {
12913
12936
  for (const variant of v.variants) {
12914
12937
  parts.push(`- [${escapeMdLabel(v.angleKey)} \xB7 ${escapeMdLabel(variant.kind)}](${variant.url})`);
12915
12938
  }
12939
+ if (v.scriptRewritten) {
12940
+ parts.push(` \u26A0\uFE0F No pudimos usar el guion que aprobaste para este \xE1ngulo, as\xED que generamos el video con un guion nuevo. Si no te sirve, ed\xEDtalo o vuelve a generarlo.`);
12941
+ }
12916
12942
  }
12917
12943
  }
12918
12944
  return parts.join("\n");
@@ -15984,7 +16010,7 @@ var CostProjectInput = z62.object({
15984
16010
  var GuideInput = z62.object({
15985
16011
  projectId: ProjectId.optional()
15986
16012
  }).strict();
15987
- var DropshippingProjectNextAction = z62.discriminatedUnion("kind", [
16013
+ var NEXT_ACTION_KINDS = [
15988
16014
  "cost_product",
15989
16015
  "provide_product_media",
15990
16016
  "generate_creatives",
@@ -15998,7 +16024,8 @@ var DropshippingProjectNextAction = z62.discriminatedUnion("kind", [
15998
16024
  "create_meta_campaign",
15999
16025
  "repair_meta_campaign",
16000
16026
  "review_paused_campaign"
16001
- ].map((kind) => z62.object({
16027
+ ];
16028
+ var DropshippingProjectNextAction = z62.discriminatedUnion("kind", NEXT_ACTION_KINDS.map((kind) => z62.object({
16002
16029
  kind: z62.literal(kind),
16003
16030
  href: z62.string().min(1)
16004
16031
  })));
@@ -16072,9 +16099,25 @@ var ProjectResponseSchema = z62.object({
16072
16099
  createdAt: z62.string().datetime(),
16073
16100
  updatedAt: z62.string().datetime()
16074
16101
  }).passthrough();
16102
+ var NEXT_ACTION_GUIDANCE = {
16103
+ cost_product: "Llama `cost_dropshipping_project` con el costo real del proveedor. Nunca lo inventes: p\xEDdeselo al usuario.",
16104
+ provide_product_media: "Llama `request_media_upload` con mediaKind=image y uploadPurpose=product_reference. Cuando el usuario diga que ya subi\xF3, llama `check_media_upload` y usa los assetId. No pidas ruta local ni URL.",
16105
+ generate_creatives: "Llama `create_product_task` con los assetId del producto. Antes dile al usuario qu\xE9 outputs vas a generar y confirma precio y oferta.",
16106
+ wait_for_creatives: "No hay nada que hacer todav\xEDa: la tarea est\xE1 corriendo. Llama `get_task_status` y espera. No crees otra tarea.",
16107
+ repair_creatives: "La tarea fall\xF3. Llama `get_task_status` para leer el error y expl\xEDcaselo al usuario antes de reintentar nada.",
16108
+ complete_creative_set: "Faltan outputs por terminar. Llama `get_task_status` y revisa si hay una acci\xF3n pendiente que resolver con `resolve_pending_action`.",
16109
+ connect_shopify: "Llama `list_shopify_shops`. Si no hay ninguna tienda conectada, el usuario debe conectarla en la web: d\xE1selo como paso manual.",
16110
+ publish_storefront: "Llama `publish_to_shopify` con el taskId y la tienda elegida.",
16111
+ wait_for_storefront: "La publicaci\xF3n en Shopify est\xE1 en curso. Llama `get_task_status` y espera; no publiques otra vez.",
16112
+ connect_meta: "Llama `list_meta_destinations`. Si no hay cuentas, el usuario debe conectar Meta en la web: d\xE1selo como paso manual.",
16113
+ create_meta_campaign: "Llama `list_meta_destinations`, pregunta en el chat por portfolioId, adAccountId y pageId, y luego `publish_to_meta`. La campa\xF1a queda PAUSED.",
16114
+ repair_meta_campaign: "La campa\xF1a qued\xF3 en error o pendiente. Llama `get_meta_campaign_status` y expl\xEDcale al usuario qu\xE9 pas\xF3 antes de reintentar.",
16115
+ review_paused_campaign: "Todo est\xE1 listo. La campa\xF1a qued\xF3 PAUSED a prop\xF3sito: dile al usuario que la active \xE9l mismo en Ads Manager."
16116
+ };
16075
16117
  function projectText(raw) {
16076
16118
  const project = ProjectResponseSchema.parse(raw);
16077
- const next = project.nextAction ? `${project.nextAction.kind} (${project.nextAction.href})` : "ninguna";
16119
+ const kind = project.nextAction?.kind;
16120
+ const guidance = kind ? NEXT_ACTION_GUIDANCE[kind] : void 0;
16078
16121
  return {
16079
16122
  content: [
16080
16123
  {
@@ -16084,6 +16127,9 @@ function projectText(raw) {
16084
16127
  productName: project.productName,
16085
16128
  phase: project.phase,
16086
16129
  nextAction: project.nextAction,
16130
+ // The href is a web anchor and is useless to an agent; the guidance
16131
+ // is the executable form of the same step.
16132
+ nextActionGuidance: guidance ?? null,
16087
16133
  hasReferenceImage: project.hasReferenceImage,
16088
16134
  costingSaved: Boolean(project.costingResult),
16089
16135
  rewardProgress: {
@@ -16092,7 +16138,7 @@ function projectText(raw) {
16092
16138
  milestones: project.rewards.milestones
16093
16139
  },
16094
16140
  version: project.version,
16095
- message: `Siguiente paso: ${next}. Relee este proyecto despu\xE9s de cada mutaci\xF3n.`
16141
+ message: guidance ? `Siguiente paso: ${guidance} Relee este proyecto despu\xE9s de cada mutaci\xF3n.` : "El proyecto no tiene ning\xFAn paso pendiente."
16096
16142
  })
16097
16143
  }
16098
16144
  ]
package/dist/stdio.js CHANGED
@@ -264,7 +264,7 @@ var ApiClient = class {
264
264
  };
265
265
 
266
266
  // src/index.ts
267
- var MCP_VERSION = "3.2.0";
267
+ var MCP_VERSION = "3.3.0";
268
268
 
269
269
  // src/meta-upload-app.ts
270
270
  import { readFileSync } from "fs";
@@ -3221,7 +3221,13 @@ var VideoGenerator = z18.object({
3221
3221
  videoResolution: VideoResolution.optional(),
3222
3222
  /** Requested controls and the effective provider route that produced this result. */
3223
3223
  execution: VideoExecutionContract.optional(),
3224
- adCopy: z18.string().optional()
3224
+ adCopy: z18.string().optional(),
3225
+ /** TRUE when the seller APPROVED a script for this angle that the plan path
3226
+ * could not honor, so a fresh script was re-authored and rendered instead
3227
+ * (PR #1470). The angle still delivered — nothing was lost and nothing is
3228
+ * refundable — but the video is NOT the script they signed off on, and the
3229
+ * UI must say so. Absent (never `false`) on every honest delivery. */
3230
+ scriptRewritten: z18.boolean().optional()
3225
3231
  });
3226
3232
  var VideoScriptSceneForReview = z18.object({
3227
3233
  index: z18.number().int().nonnegative(),
@@ -4757,8 +4763,20 @@ var AdminUserListResponse = z27.object({
4757
4763
  page: z27.number().int().positive(),
4758
4764
  pageSize: z27.number().int().positive()
4759
4765
  });
4766
+ var AdminCreditGrantReason = z27.enum([
4767
+ "compensation",
4768
+ "goodwill",
4769
+ "promo",
4770
+ "internal-testing",
4771
+ "correction"
4772
+ ]);
4760
4773
  var UpdateUserCreditsRequest = z27.object({
4761
- creditCents: z27.number().nonnegative()
4774
+ creditCents: z27.number().nonnegative(),
4775
+ reason: AdminCreditGrantReason,
4776
+ /** Free-text detail. Required when the enum alone does not explain the grant. */
4777
+ notes: z27.string().trim().min(1).max(500).optional(),
4778
+ /** The task the grant compensates, when there is one. */
4779
+ taskId: z27.string().uuid().optional()
4762
4780
  });
4763
4781
  var QualityReportStatus = z27.enum([
4764
4782
  "open",
@@ -11652,7 +11670,12 @@ async function fetchTaskOutputs(api, taskId, options) {
11652
11670
  return {
11653
11671
  angleKey: vg.angleKey ?? "",
11654
11672
  angleIndex: vg.angleIndex ?? 0,
11655
- variants: variants2.length ? variants2 : fallback
11673
+ variants: variants2.length ? variants2 : fallback,
11674
+ // Only ever true — an honest delivery leaves the key off entirely so no
11675
+ // consumer has to distinguish `false` from "the API is older than this".
11676
+ ...vg.scriptRewritten === true ? {
11677
+ scriptRewritten: true
11678
+ } : {}
11656
11679
  };
11657
11680
  }).filter((v) => v.angleKey && v.variants.length);
11658
11681
  const sections = (raw.landing?.images ?? []).filter((img) => Boolean(img.role) && Boolean(img.url)).map((img) => ({
@@ -11715,6 +11738,9 @@ function renderOutputsMarkdown(outputs) {
11715
11738
  for (const variant of v.variants) {
11716
11739
  parts.push(`- [${escapeMdLabel(v.angleKey)} \xB7 ${escapeMdLabel(variant.kind)}](${variant.url})`);
11717
11740
  }
11741
+ if (v.scriptRewritten) {
11742
+ parts.push(` \u26A0\uFE0F No pudimos usar el guion que aprobaste para este \xE1ngulo, as\xED que generamos el video con un guion nuevo. Si no te sirve, ed\xEDtalo o vuelve a generarlo.`);
11743
+ }
11718
11744
  }
11719
11745
  }
11720
11746
  return parts.join("\n");
@@ -14786,7 +14812,7 @@ var CostProjectInput = z61.object({
14786
14812
  var GuideInput = z61.object({
14787
14813
  projectId: ProjectId.optional()
14788
14814
  }).strict();
14789
- var DropshippingProjectNextAction = z61.discriminatedUnion("kind", [
14815
+ var NEXT_ACTION_KINDS = [
14790
14816
  "cost_product",
14791
14817
  "provide_product_media",
14792
14818
  "generate_creatives",
@@ -14800,7 +14826,8 @@ var DropshippingProjectNextAction = z61.discriminatedUnion("kind", [
14800
14826
  "create_meta_campaign",
14801
14827
  "repair_meta_campaign",
14802
14828
  "review_paused_campaign"
14803
- ].map((kind) => z61.object({
14829
+ ];
14830
+ var DropshippingProjectNextAction = z61.discriminatedUnion("kind", NEXT_ACTION_KINDS.map((kind) => z61.object({
14804
14831
  kind: z61.literal(kind),
14805
14832
  href: z61.string().min(1)
14806
14833
  })));
@@ -14874,9 +14901,25 @@ var ProjectResponseSchema = z61.object({
14874
14901
  createdAt: z61.string().datetime(),
14875
14902
  updatedAt: z61.string().datetime()
14876
14903
  }).passthrough();
14904
+ var NEXT_ACTION_GUIDANCE = {
14905
+ cost_product: "Llama `cost_dropshipping_project` con el costo real del proveedor. Nunca lo inventes: p\xEDdeselo al usuario.",
14906
+ provide_product_media: "Llama `request_media_upload` con mediaKind=image y uploadPurpose=product_reference. Cuando el usuario diga que ya subi\xF3, llama `check_media_upload` y usa los assetId. No pidas ruta local ni URL.",
14907
+ generate_creatives: "Llama `create_product_task` con los assetId del producto. Antes dile al usuario qu\xE9 outputs vas a generar y confirma precio y oferta.",
14908
+ wait_for_creatives: "No hay nada que hacer todav\xEDa: la tarea est\xE1 corriendo. Llama `get_task_status` y espera. No crees otra tarea.",
14909
+ repair_creatives: "La tarea fall\xF3. Llama `get_task_status` para leer el error y expl\xEDcaselo al usuario antes de reintentar nada.",
14910
+ complete_creative_set: "Faltan outputs por terminar. Llama `get_task_status` y revisa si hay una acci\xF3n pendiente que resolver con `resolve_pending_action`.",
14911
+ connect_shopify: "Llama `list_shopify_shops`. Si no hay ninguna tienda conectada, el usuario debe conectarla en la web: d\xE1selo como paso manual.",
14912
+ publish_storefront: "Llama `publish_to_shopify` con el taskId y la tienda elegida.",
14913
+ wait_for_storefront: "La publicaci\xF3n en Shopify est\xE1 en curso. Llama `get_task_status` y espera; no publiques otra vez.",
14914
+ connect_meta: "Llama `list_meta_destinations`. Si no hay cuentas, el usuario debe conectar Meta en la web: d\xE1selo como paso manual.",
14915
+ create_meta_campaign: "Llama `list_meta_destinations`, pregunta en el chat por portfolioId, adAccountId y pageId, y luego `publish_to_meta`. La campa\xF1a queda PAUSED.",
14916
+ repair_meta_campaign: "La campa\xF1a qued\xF3 en error o pendiente. Llama `get_meta_campaign_status` y expl\xEDcale al usuario qu\xE9 pas\xF3 antes de reintentar.",
14917
+ review_paused_campaign: "Todo est\xE1 listo. La campa\xF1a qued\xF3 PAUSED a prop\xF3sito: dile al usuario que la active \xE9l mismo en Ads Manager."
14918
+ };
14877
14919
  function projectText(raw) {
14878
14920
  const project = ProjectResponseSchema.parse(raw);
14879
- const next = project.nextAction ? `${project.nextAction.kind} (${project.nextAction.href})` : "ninguna";
14921
+ const kind = project.nextAction?.kind;
14922
+ const guidance = kind ? NEXT_ACTION_GUIDANCE[kind] : void 0;
14880
14923
  return {
14881
14924
  content: [
14882
14925
  {
@@ -14886,6 +14929,9 @@ function projectText(raw) {
14886
14929
  productName: project.productName,
14887
14930
  phase: project.phase,
14888
14931
  nextAction: project.nextAction,
14932
+ // The href is a web anchor and is useless to an agent; the guidance
14933
+ // is the executable form of the same step.
14934
+ nextActionGuidance: guidance ?? null,
14889
14935
  hasReferenceImage: project.hasReferenceImage,
14890
14936
  costingSaved: Boolean(project.costingResult),
14891
14937
  rewardProgress: {
@@ -14894,7 +14940,7 @@ function projectText(raw) {
14894
14940
  milestones: project.rewards.milestones
14895
14941
  },
14896
14942
  version: project.version,
14897
- message: `Siguiente paso: ${next}. Relee este proyecto despu\xE9s de cada mutaci\xF3n.`
14943
+ message: guidance ? `Siguiente paso: ${guidance} Relee este proyecto despu\xE9s de cada mutaci\xF3n.` : "El proyecto no tiene ning\xFAn paso pendiente."
14898
14944
  })
14899
14945
  }
14900
14946
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@productmaker/mcp",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "Product Maker MCP server — cost products, generate dropshipping landing pages, UGC videos, and ad creatives, and publish to Shopify and Meta Ads from Claude, ChatGPT, or Gemini.",