mcp-prompt-optimizer 3.8.1 → 3.8.2

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/index.js +14 -1
  3. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.8.2] - 2026-08-27
9
+
10
+ ### Added
11
+ - **Surface CE structural warnings in tool output.** The backend `/context-engineer/transform`
12
+ and `/context-engineer/generate-skill-package` responses now carry a non-fatal `warnings`
13
+ array (dropped SOP stages, duplicated tables, fabricated headings). `transform_for_framework`
14
+ and `generate_skill_package` previously discarded it, so a structurally degraded artifact
15
+ shipped silently. Both now render a `## ⚠️ Structural Warnings` section when the array is
16
+ non-empty. No change when it is empty (the normal case) — output is byte-identical.
17
+
8
18
  ## [3.8.1] - 2026-07-29
9
19
 
10
20
  ### Fixed
package/index.js CHANGED
@@ -1289,7 +1289,7 @@ class MCPPromptOptimizer {
1289
1289
  sop_content: args.sop_content, goal: args.goal, framework: args.framework
1290
1290
  });
1291
1291
  const code = result.code || result.content || result.result || JSON.stringify(result, null, 2);
1292
- return { content: [{ type: "text", text: `# ${args.framework} Implementation\n\n\`\`\`python\n${code}\n\`\`\`\n\n---\n*Transformed by MCP Prompt Optimizer CE*` }] };
1292
+ return { content: [{ type: "text", text: `# ${args.framework} Implementation\n\n\`\`\`python\n${code}\n\`\`\`${this._formatWarnings(result)}\n\n---\n*Transformed by MCP Prompt Optimizer CE*` }] };
1293
1293
  } catch (error) {
1294
1294
  throw new Error(`Failed to transform: ${error.message}`);
1295
1295
  }
@@ -1566,10 +1566,23 @@ class MCPPromptOptimizer {
1566
1566
  } else {
1567
1567
  sections.push('\n```json\n' + JSON.stringify(result, null, 2) + '\n```');
1568
1568
  }
1569
+ const warn = this._formatWarnings(result);
1570
+ if (warn) sections.push(warn);
1569
1571
  sections.push('\n---\n*Generated by MCP Prompt Optimizer CE*');
1570
1572
  return sections.join('\n');
1571
1573
  }
1572
1574
 
1575
+ // Backend CE responses carry a non-fatal `warnings` array (dropped SOP
1576
+ // stages, duplicated tables, fabricated headings). Surface it so a degraded
1577
+ // artifact travels with the reason instead of shipping silently. Returns ''
1578
+ // when there is nothing to report.
1579
+ _formatWarnings(result) {
1580
+ const w = result && (result.warnings || result.validation_warnings);
1581
+ if (!Array.isArray(w) || w.length === 0) return '';
1582
+ return `\n\n## ⚠️ Structural Warnings\n\n${w.map(x => `- ${x}`).join('\n')}\n\n` +
1583
+ `_The artifact is delivered as-is; review these before use._`;
1584
+ }
1585
+
1573
1586
  _buildUrl(path) {
1574
1587
  return `${this.backendUrl}${path}`;
1575
1588
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-prompt-optimizer",
3
- "version": "3.8.1",
3
+ "version": "3.8.2",
4
4
  "description": "Professional cloud-based MCP server for AI-powered prompt optimization with intelligent context detection, Bayesian optimization, AG-UI real-time optimization, template auto-save, optimization insights, personal model configuration via WebUI, team collaboration, enterprise-grade features, production resilience, and startup validation. Universal compatibility with Claude Desktop, Cursor, Windsurf, and 17+ MCP clients.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -26,6 +26,7 @@
26
26
  "test:simple": "node tests/simple-test.js",
27
27
  "test:contract": "node tests/contract-check.js",
28
28
  "test:e2e": "node tests/e2e-stdio-smoke.js",
29
+ "test:prod-canary": "node tests/prod-canary.js",
29
30
  "pretest": "npm run health-check",
30
31
  "prepublishOnly": "npm run test:quick",
31
32
  "version": "echo 'Updating version...' && npm run test:quick"