mcp-prompt-optimizer
Version:
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 collabo
140 lines (107 loc) โข 7.51 kB
Markdown
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [3.0.1] - 2025-12-09
### Fixed
- ๐ง **Critical Endpoint Fix**: Corrected quota status endpoint from `/api/v1/api-keys/quota-status` to `/api/v1/mcp/quota-status` for proper API key authentication
- ๐ **Response Mapping**: Updated quota status response handling to support nested structure returned by MCP endpoint
- ๐ฏ **AG-UI Path**: Fixed AG-UI status endpoint path from `/api/v1/agui/status` to `/api/status` to match backend router mounting
- ๐ **Authentication**: All quota operations now use API key authentication instead of JWT
### Technical
- ๐ **Backend Alignment**: Comprehensive endpoint verification against FastAPI Backend production-v2.2.0-stable
- ๐ **Documentation**: Added `ENDPOINT_VERIFICATION_REPORT.md` with complete endpoint mapping
- ๐จ **Critical Issue Identified**: Backend MCP router not mounted - requires backend team deployment before v3.0.1 functionality works
### Backend Dependencies
- โ ๏ธ **REQUIRED**: Backend must mount MCP router at `/api/v1` prefix for quota status to work
- โ ๏ธ **BLOCKER**: Package will fail quota checks until backend is updated
- ๐ **Action**: Coordinate with backend team before publishing to NPM
### Migration Notes
- This is a patch release fixing critical endpoint mismatches
- No breaking changes for users (transparent fixes)
- Package version changed from v3.0.0 to v3.0.1
## [3.0.0] - 2025-12-08
### Changed (Breaking)
- ๐ **Security Hardening**: Development mode permanently disabled for production security
- โฑ๏ธ **Cache Reduction**: API key cache reduced from 24 hours to 1 hour
- โฑ๏ธ **Fallback Cache**: Fallback cache reduced from 7 days to 2 hours
- โ **Offline Mode**: Removed offline mode support
- โ **Mock Validation**: Removed development mode API key bypasses
### Security
- ๐ก๏ธ **All API keys** now require backend validation (no client-side bypasses)
- ๐ **Environment variables** no longer enable development mode
- โ
**Production-only**: Package now enforces backend connectivity
### Migration from v2.x
- All users must have valid API keys from https://promptoptimizer-blog.vercel.app/pricing
- `OPTIMIZER_DEV_MODE=true` no longer works (intentionally disabled)
- Offline usage no longer supported (requires active backend connection)
- Short-lived caching (1-2 hours) replaces long-term caching
## [1.5.0] - 2025-09-25
### Added
- ๐ง **Bayesian Optimization Support**: Advanced parameter tuning and performance prediction
- โก **AG-UI Real-Time Features**: Streaming optimization and WebSocket support
- ๐ฏ **Enhanced AI Context Detection**: Improved weighted scoring system with 7 contexts
- ๐ **Advanced Analytics**: New `get_optimization_insights` tool for Bayesian metrics
- ๐ **Real-Time Status**: New `get_real_time_status` tool for live optimization monitoring
- ๐ง **Feature Flags**: `ENABLE_BAYESIAN_OPTIMIZATION` and `ENABLE_AGUI_FEATURES` environment variables
- ๐ **Enhanced Template Search**: AI-aware filtering by sophistication, complexity, and strategy
- ๐จ **Rich Formatting**: Improved output formatting with better visual organization
### Changed
- ๐ **Backend API Alignment**: Updated to align with FastAPI Backend production-v2.1.0-bayesian
- ๐ฏ **Context Detection**: Upgraded algorithm with weighted scoring and negative patterns
- ๐ **Quota Display**: Enhanced quota status with visual indicators and feature breakdown
- ๐ **Template Search**: Expanded search parameters and improved result formatting
- ๐ **Startup Process**: Enhanced validation with feature status reporting
### Fixed
- โ
**API Endpoints**: Corrected backend endpoint URLs for full compatibility
- ๐ก๏ธ **Error Handling**: Improved fallback mechanisms for network issues
- ๐ **Template Display**: Fixed template preview and confidence score formatting
- ๐ง **Environment Variables**: Better handling of feature flag defaults
### Technical
- ๐ฆ **Dependencies**: Updated to latest MCP SDK version
- ๐๏ธ **Architecture**: Modular feature system with conditional tool loading
- ๐งช **Testing**: Enhanced mock responses for development mode
- ๐ **Documentation**: Updated tool descriptions and parameter schemas
### Backend Compatibility
- โ
**API Version**: v1 (aligned with FastAPI backend)
- โ
**Endpoint Mapping**: `/api/v1/mcp/*` endpoints fully supported
- โ
**Feature Parity**: All backend features now accessible via MCP
- โ
**Error Codes**: Proper HTTP status code handling and user-friendly messages
## [2.2.3] - 2025-11-01
### Fixed
- โ
**API Key Validation**: Corrected `sk-local-*` API key validation, ensuring they are properly validated against the backend instead of being treated as mock keys.
- โ
**Context Detection Error**: Resolved `Cannot read properties of undefined (reading 'name')` error in `generateMockContextDetection` by adding robust checks for `detected_parameters`.
- โ
**Quick Test Failures**: Updated `quick-test.js` to align with current API, fixing `AI Context detection` and removing `Goal enhancement` test.
### Changed
- ๐ **Endpoint Management**: Centralized all backend API endpoints into a new `ENDPOINTS` object for improved maintainability and consistency.
- ๐ง **Mock Context Detection**: Enhanced `generateMockContextDetection` logic with more accurate keyword matching for `code_generation`, `image_generation`, and `llm_interaction` contexts.
- ๐ง **CLI Flag Defaults**: Clarified default behavior for `ENABLE_BAYESIAN_OPTIMIZATION` and `ENABLE_AGUI_FEATURES` environment variables.
- โฑ๏ธ **Timeout Handling**: Removed redundant `req.setTimeout` call in `callBackendAPI` for cleaner and more consistent timeout management.
- ๐ก๏ธ **Defensive Checks**: Added defensive checks for blindly accessed metrics in `formatOptimizationResult` to prevent errors from slim backend responses.
- ๐ **Logging**: Improved `startValidatedMCPServer` logging by using `console.log` for informational messages.
- ๐ **Documentation**: Updated `README.md` to reflect changes in API key usage and context detection patterns.
### Removed
- ๐ฆ **Test Scripts from Package**: Excluded `tests/` directory from the published npm package to reduce package size and focus on core functionality.
## [2.2.0] - 2025-10-31
### Changed
- ๐ **Backend API Alignment**: Updated to align with FastAPI Backend production-v2.2.0-stable
- ๐ ๏ธ **Tool Refinement**: Refined `create_template`, `get_template`, `update_template`, and `detect_ai_context` tools for enhanced functionality and robustness.
### Fixed
- โ
**API Endpoints**: Ensured all backend endpoint URLs are fully compatible and robust.
### Technical
- ๐ฆ **Dependencies**: Updated to latest MCP SDK version for improved stability.
- ๐งช **Testing**: Comprehensive internal testing to ensure full alignment between NPM package and FastAPI backend.
## [1.4.1] - 2025-09-15
### Fixed
- API key format validation
- Template auto-save threshold
## [1.4.0] - 2025-09-10
### Added
- Template auto-save feature
- Basic optimization insights
- Cross-platform support improvements
### Changed
- Improved context detection
- Enhanced error messages
## [1.3.x] - Previous Versions
Historical versions with basic prompt optimization functionality.