mcp-prompt-optimizer 3.7.1 → 3.7.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.
- package/CHANGELOG.md +9 -0
- package/README.md +6 -1
- package/index.js +1994 -1994
- package/lib/api-key-manager.js +730 -729
- package/package.json +271 -263
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@ 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.7.2] - 2026-07-05
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Stdout JSON-RPC corruption risk**: MCP server startup logs (banner, status lines, key validation, mode indicators) now route to **stderr** instead of stdout. On stdio transports, stdout is the JSON-RPC channel — any non-protocol writes from the server can corrupt the stream and cause client-side parse failures. All server-side logging in `startValidatedMCPServer` and `CloudApiKeyManager._log` (`success`/`info` levels) is now stderr-safe.
|
|
12
|
+
|
|
13
|
+
### Internal
|
|
14
|
+
- **Contract test** (`tests/contract-check.js` + `tests/fixtures/optimize-response.json`): pins the `/optimize` response shape against the backend Pydantic model (`OptimizeResponse`), including runtime-injected fields (`quota_used`, `quota_limit`) and metadata (`ai_context`, `routing_score`, `routing_tier`, `model_used`). Catches backend response drift before publish. Runs with no network/API key via `npm run test:contract`.
|
|
15
|
+
- **CI workflow** (`.github/workflows/ci.yml`): runs `npm ci`, health check, and the contract check on push/PR across Node 18, 20, and 22. The contract check is the publish gate.
|
|
16
|
+
|
|
8
17
|
## [3.6.0] - 2026-06-11
|
|
9
18
|
|
|
10
19
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# MCP Prompt Optimizer v3.
|
|
1
|
+
# MCP Prompt Optimizer v3.7.2
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mcp-prompt-optimizer)
|
|
4
4
|
[](LICENSE)
|
|
@@ -438,6 +438,11 @@ Windsurf, Cline, VS Code, Zed, Replit, JetBrains IDEs, and Neovim are all suppor
|
|
|
438
438
|
|
|
439
439
|
## 📦 Changelog
|
|
440
440
|
|
|
441
|
+
### v3.7.2
|
|
442
|
+
- **Stdout / JSON-RPC safety** — All MCP server startup logs (banner, status, mode indicators, key validation) now route to **stderr** instead of stdout. On stdio transports stdout is the JSON-RPC channel; previously any non-protocol writes there risk corrupting the stream. No user-facing change beyond logging.
|
|
443
|
+
- **Contract test** — `npm run test:contract` pins the `/optimize` response shape (Pydantic fields + runtime-injected `quota_used`/`quota_limit` + metadata `routing_score`/`routing_tier`/`model_used`) against a canonical fixture. Catches backend drift before publish.
|
|
444
|
+
- **CI workflow** — `.github/workflows/ci.yml` runs `npm ci` + health check + contract check on push/PR across Node 18, 20, and 22.
|
|
445
|
+
|
|
441
446
|
### v3.6.0
|
|
442
447
|
- **Free tier MCP access** — Free users can now create an API key (`sk-opt-*`) and use the MCP server for 7 LLM optimizations/month at no cost. Previously, key creation was blocked in the live service due to a bug introduced when the free-tier launch landed in an unused module. Keys with `subscription_status: NULL` (all free accounts) now validate correctly.
|
|
443
448
|
- **`connect` wizard** — `npx mcp-prompt-optimizer connect` interactively writes your API key to Claude Desktop config on macOS, Windows, and Linux. Replaces manual JSON editing for new users.
|