Updated StreamableHTTPServerTransport to support both sync and async callbacks:
- Changed callback types to return void | Promise<void>
- Used await Promise.resolve() to handle both sync and async callbacks
- Added comprehensive tests for async callback functionality
- Errors in callbacks now properly propagate to HTTP responses
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
• Tests callback is called when session is closed via DELETE
• Tests system works correctly when callback is not provided
• Tests callback is not called for invalid session DELETE requests
• Tests correct session ID is passed when multiple sessions exist
• Follows existing test patterns and includes proper cleanup
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Renamed ondelete callback to onsessionclosed for better clarity
- Moved callback from public property to private field following options pattern
- Added comprehensive JSDoc documentation explaining the callback's purpose
- Updated DELETE request handler to use the new callback structure
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Adds optional ondelete callback that fires when DELETE request is received, providing the sessionId for cleanup handling.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove all console.log, console.warn, and console.error from src/client and src/server
- Add ESLint no-console rule for client and server directories (excluding tests)
- Keep console statements in test files, examples, and CLI tools as intended
Addresses feedback in PR #665🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Tests that when mcp-protocol-version header is missing, the middleware
uses DEFAULT_NEGOTIATED_PROTOCOL_VERSION when calling verifyAccessToken
- Ensures proper fallback behavior for protocol version negotiation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>