mcp-prompt-optimizer 3.2.0 → 3.2.1

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 (2) hide show
  1. package/index.js +23 -0
  2. package/package.json +12 -3
package/index.js CHANGED
@@ -127,6 +127,25 @@ class MCPPromptOptimizer {
127
127
  type: "boolean",
128
128
  description: "Enable Bayesian optimization features for parameter tuning (if available)",
129
129
  default: true
130
+ },
131
+ value_hierarchy: {
132
+ type: "array",
133
+ description: "Ordered list of values/constraints the optimizer must respect. NON_NEGOTIABLE entries force LLM-tier routing and inject hard constraints into the system prompt. Example: [{label:'NON_NEGOTIABLE',description:'Never suggest removing error handling'},{label:'HIGH',description:'Preserve technical terminology'}]",
134
+ items: {
135
+ type: "object",
136
+ properties: {
137
+ label: {
138
+ type: "string",
139
+ enum: ["NON_NEGOTIABLE", "HIGH", "MEDIUM", "LOW"],
140
+ description: "Priority level for this constraint"
141
+ },
142
+ description: {
143
+ type: "string",
144
+ description: "The value or constraint to enforce during optimization"
145
+ }
146
+ },
147
+ required: ["label", "description"]
148
+ }
130
149
  }
131
150
  },
132
151
  required: ["prompt"]
@@ -689,6 +708,10 @@ class MCPPromptOptimizer {
689
708
  ai_context: detectedContext,
690
709
  };
691
710
 
711
+ if (args.value_hierarchy && args.value_hierarchy.length > 0) {
712
+ optimizationPayload.value_hierarchy = args.value_hierarchy;
713
+ }
714
+
692
715
  const result = await this.callBackendAPI(ENDPOINTS.OPTIMIZE, optimizationPayload);
693
716
 
694
717
  const enableBayesian = args.enable_bayesian !== false && this.bayesianOptimizationEnabled;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-prompt-optimizer",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
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": {
@@ -185,15 +185,24 @@
185
185
  }
186
186
  },
187
187
  "backend_alignment": {
188
- "version": "production-v2.2.0-stable",
188
+ "version": "production-v2.3.0",
189
189
  "api_version": "v1",
190
190
  "endpoints_aligned": true,
191
191
  "feature_parity": true,
192
192
  "bayesian_support": true,
193
193
  "agui_support": true,
194
- "last_sync": "2026-03-13T00:00:00Z"
194
+ "last_sync": "2026-05-19T00:00:00Z"
195
195
  },
196
196
  "release_notes": {
197
+ "v3.2.1": {
198
+ "major_features": [
199
+ "optimize_prompt now accepts value_hierarchy parameter for constraint-driven optimization",
200
+ "NON_NEGOTIABLE entries force LLM-tier routing and inject hard constraints into system prompt",
201
+ "HIGH/MEDIUM/LOW entries add ordered priority directives to optimization context"
202
+ ],
203
+ "breaking_changes": [],
204
+ "migration_guide": "No migration required. value_hierarchy is fully optional; existing calls are unaffected."
205
+ },
197
206
  "v3.0.5": {
198
207
  "major_features": [
199
208
  "Updated homepage and support links to promptoptimizer.xyz"