@sakupa/mcp 0.7.47 → 0.7.48

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/bin.js CHANGED
@@ -400,7 +400,7 @@ function isFreeSiteAllowanceNetworkReference(value) {
400
400
  }
401
401
 
402
402
  // ../core/dist/domain/version.js
403
- var SAKUPA_MCP_VERSION = "0.7.47";
403
+ var SAKUPA_MCP_VERSION = "0.7.48";
404
404
 
405
405
  // ../core/dist/domain/errors.js
406
406
  var HTTP_STATUS = {
@@ -3229,6 +3229,11 @@ var STRUCTURED_TOOL_OUTPUT_SCHEMA = {
3229
3229
  operationId: z.string().optional(),
3230
3230
  summary: z.string(),
3231
3231
  data: z.record(z.string(), z.unknown()),
3232
+ presentation: z.object({
3233
+ userLanguage: z.literal("infer_from_conversation"),
3234
+ translateFields: z.array(z.string()),
3235
+ preserveExactFields: z.array(z.string())
3236
+ }).optional(),
3232
3237
  decision: z.object({
3233
3238
  decisionVersion: z.literal(1),
3234
3239
  prompt: z.string(),
@@ -3458,6 +3463,27 @@ function toolError(e) {
3458
3463
  }
3459
3464
 
3460
3465
  // src/tools/decision.ts
3466
+ var DECISION_PRESENTATION_POLICY = {
3467
+ userLanguage: "infer_from_conversation",
3468
+ translateFields: [
3469
+ "summary",
3470
+ "decision.prompt",
3471
+ "decision.options[].label",
3472
+ "decision.options[].description",
3473
+ "decision.options[].consequences[]",
3474
+ "userAction.expectedOutcome",
3475
+ "userAction.options[].label",
3476
+ "userAction.options[].expectedOutcome"
3477
+ ],
3478
+ preserveExactFields: [
3479
+ "decision.options[].id",
3480
+ "decision.options[].nextAction",
3481
+ "userAction.resumeWith",
3482
+ "userAction.options[].value",
3483
+ "nextActions",
3484
+ "embedded URLs, code tokens, field names and confirmation values"
3485
+ ]
3486
+ };
3461
3487
  var FORBIDDEN_DECISION_ARGUMENT_KEYS = /* @__PURE__ */ new Set([
3462
3488
  "credential",
3463
3489
  "candidatecredential",
@@ -3547,7 +3573,9 @@ function formatDecisionFallback(decision) {
3547
3573
  ${option.description}${consequences}
3548
3574
  ${exactAction}`;
3549
3575
  });
3550
- return `USER DECISION REQUIRED: ${decision.prompt}
3576
+ return `LANGUAGE PRESENTATION RULE: Translate all human-readable summaries, prompts, labels, descriptions and consequences into the language the user is using before presenting them. Keep option IDs, tool names, arguments, URLs, field names and confirmation values exactly unchanged.
3577
+
3578
+ USER DECISION REQUIRED: ${decision.prompt}
3551
3579
  No option is selected by default. Present every option to the user, do not choose on their behalf, and never reconstruct or guess tool arguments.
3552
3580
 
3553
3581
  ` + options.join("\n\n");
@@ -3598,6 +3626,7 @@ function decisionToolResult(input) {
3598
3626
 
3599
3627
  ${formatDecisionFallback(decision)}`,
3600
3628
  data: input.data,
3629
+ presentation: DECISION_PRESENTATION_POLICY,
3601
3630
  decision,
3602
3631
  ...userAction === void 0 ? {} : { userAction },
3603
3632
  nextActions
@@ -6181,7 +6210,10 @@ context, paraphrase a selection into different arguments, or invent another opti
6181
6210
  selects, copy that option's exact nextAction. Legacy userAction and nextActions mirror the same
6182
6211
  choice for older clients; decision is the authoritative choice set. A type "none" option means call
6183
6212
  no tool and change nothing. Stripe-hosted links remain direct links because Stripe itself owns plan
6184
- selection and confirmation.
6213
+ selection and confirmation. Before showing any decision, infer the language the user is using and
6214
+ translate every human-readable summary, prompt, option label, description and consequence into that
6215
+ language. Keep option IDs, tool names, exact arguments, URLs, field names and confirmation values
6216
+ unchanged.
6185
6217
 
6186
6218
  Project directory contract: before the first deploy or a new recovery, initialize the intended
6187
6219
  project by calling init with NO path argument. init uses the IDE's exact MCP Root and creates the
package/dist/index.js CHANGED
@@ -145,7 +145,7 @@ function isFreeSiteAllowanceNetworkReference(value) {
145
145
  }
146
146
 
147
147
  // ../core/dist/domain/version.js
148
- var SAKUPA_MCP_VERSION = "0.7.47";
148
+ var SAKUPA_MCP_VERSION = "0.7.48";
149
149
 
150
150
  // ../core/dist/domain/errors.js
151
151
  var HTTP_STATUS = {
@@ -2039,6 +2039,11 @@ var STRUCTURED_TOOL_OUTPUT_SCHEMA = {
2039
2039
  operationId: z.string().optional(),
2040
2040
  summary: z.string(),
2041
2041
  data: z.record(z.string(), z.unknown()),
2042
+ presentation: z.object({
2043
+ userLanguage: z.literal("infer_from_conversation"),
2044
+ translateFields: z.array(z.string()),
2045
+ preserveExactFields: z.array(z.string())
2046
+ }).optional(),
2042
2047
  decision: z.object({
2043
2048
  decisionVersion: z.literal(1),
2044
2049
  prompt: z.string(),
@@ -3574,6 +3579,27 @@ async function resumeCredentialRotation(client, projectDir, site, apiBaseUrl) {
3574
3579
  }
3575
3580
 
3576
3581
  // src/tools/decision.ts
3582
+ var DECISION_PRESENTATION_POLICY = {
3583
+ userLanguage: "infer_from_conversation",
3584
+ translateFields: [
3585
+ "summary",
3586
+ "decision.prompt",
3587
+ "decision.options[].label",
3588
+ "decision.options[].description",
3589
+ "decision.options[].consequences[]",
3590
+ "userAction.expectedOutcome",
3591
+ "userAction.options[].label",
3592
+ "userAction.options[].expectedOutcome"
3593
+ ],
3594
+ preserveExactFields: [
3595
+ "decision.options[].id",
3596
+ "decision.options[].nextAction",
3597
+ "userAction.resumeWith",
3598
+ "userAction.options[].value",
3599
+ "nextActions",
3600
+ "embedded URLs, code tokens, field names and confirmation values"
3601
+ ]
3602
+ };
3577
3603
  var FORBIDDEN_DECISION_ARGUMENT_KEYS = /* @__PURE__ */ new Set([
3578
3604
  "credential",
3579
3605
  "candidatecredential",
@@ -3663,7 +3689,9 @@ function formatDecisionFallback(decision) {
3663
3689
  ${option.description}${consequences}
3664
3690
  ${exactAction}`;
3665
3691
  });
3666
- return `USER DECISION REQUIRED: ${decision.prompt}
3692
+ return `LANGUAGE PRESENTATION RULE: Translate all human-readable summaries, prompts, labels, descriptions and consequences into the language the user is using before presenting them. Keep option IDs, tool names, arguments, URLs, field names and confirmation values exactly unchanged.
3693
+
3694
+ USER DECISION REQUIRED: ${decision.prompt}
3667
3695
  No option is selected by default. Present every option to the user, do not choose on their behalf, and never reconstruct or guess tool arguments.
3668
3696
 
3669
3697
  ` + options.join("\n\n");
@@ -3714,6 +3742,7 @@ function decisionToolResult(input) {
3714
3742
 
3715
3743
  ${formatDecisionFallback(decision)}`,
3716
3744
  data: input.data,
3745
+ presentation: DECISION_PRESENTATION_POLICY,
3717
3746
  decision,
3718
3747
  ...userAction === void 0 ? {} : { userAction },
3719
3748
  nextActions
@@ -6149,7 +6178,10 @@ context, paraphrase a selection into different arguments, or invent another opti
6149
6178
  selects, copy that option's exact nextAction. Legacy userAction and nextActions mirror the same
6150
6179
  choice for older clients; decision is the authoritative choice set. A type "none" option means call
6151
6180
  no tool and change nothing. Stripe-hosted links remain direct links because Stripe itself owns plan
6152
- selection and confirmation.
6181
+ selection and confirmation. Before showing any decision, infer the language the user is using and
6182
+ translate every human-readable summary, prompt, option label, description and consequence into that
6183
+ language. Keep option IDs, tool names, exact arguments, URLs, field names and confirmation values
6184
+ unchanged.
6153
6185
 
6154
6186
  Project directory contract: before the first deploy or a new recovery, initialize the intended
6155
6187
  project by calling init with NO path argument. init uses the IDE's exact MCP Root and creates the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sakupa/mcp",
3
- "version": "0.7.47",
3
+ "version": "0.7.48",
4
4
  "description": "Sakupa MCP server: publish AI-made static sites from your AI tool. AI-made pages, live in seconds.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",