You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: refactor REST endpoints to use management service layer (smart-mcp-proxy#153)
* feat: refactor REST endpoints to use management service layer
This refactoring addresses spec 004 compliance by ensuring REST endpoints
delegate to the management service instead of bypassing it. This eliminates
architectural violations identified in PR smart-mcp-proxy#152 review.
Changes:
- Extended ManagementService interface with GetServerTools() and TriggerOAuthLogin()
- Refactored /api/v1/servers/{id}/tools to use management service
- Refactored /api/v1/servers/{id}/login to use management service
- Added RuntimeOperations interface methods to Runtime type
- Enhanced test mocks to support new methods
- Added 7 unit tests with 82.1% coverage (exceeds 80% target)
- Updated CLAUDE.md with new tool operation methods
Architecture improvements:
- Configuration gates enforced centrally (disable_management, read_only)
- Proper layering maintained: REST → Management → Runtime → StateView
- Lock-free reads via StateView cache (<10ms for GetServerTools)
- Event emissions via existing event bus (servers.changed on OAuth completion)
Testing:
- All 45 tasks completed (T001-T045)
- 25/25 E2E API tests passing
- Zero breaking changes to REST API contracts
- CLI commands work correctly via socket/REST delegation
- Linter: 0 issues
Spec: 005-rest-management-integration
Closes: architectural violation from PR smart-mcp-proxy#152 review
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: make TestDetectSocketPath_Auth platform-aware for Windows named pipes
Windows named pipes use global namespace (\\.\pipe\mcpproxy-<username>-<hash>)
instead of file paths within the data directory. Updated test to check for
named pipe prefix on Windows and data directory containment on Unix.
Fixessmart-mcp-proxy#153 PR build test failure on Windows.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: make TestDetectSocketPath_Tools platform-aware for Windows
Apply the same Windows named pipe fix to tools_cmd_test.go that was
applied to auth_cmd_test.go. Windows named pipes use global namespace
and don't contain the data directory path.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments