Implement DELETE request handling for session termination
- Add explicit DELETE request handling in handleStreamableHTTP - Validate session existence before termination - Send shutdown control messages to clean up Redis resources - Return proper HTTP status codes (200 for success, 404 for not found) - Fix TypeScript issue with JSONRPCMessage id access in redisTransport - Add missing semicolon in startServerListeningToRedis call Follows MCP specification for explicit session termination. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f660459275
commit
f84e54124b
1 changed files with 44 additions and 3 deletions
|
|
@ -156,7 +156,7 @@ export class ServerRedisTransport implements Transport {
|
|||
}
|
||||
|
||||
async send(message: JSONRPCMessage, options?: TransportSendOptions): Promise<void> {
|
||||
const relatedRequestId = options?.relatedRequestId?.toString() ?? "id" in message ? message.id : notificationStreamId;
|
||||
const relatedRequestId = options?.relatedRequestId?.toString() ?? ("id" in message ? message.id?.toString() : notificationStreamId);
|
||||
const channel = getToClientChannel(this._sessionId, relatedRequestId)
|
||||
|
||||
const redisMessage: RedisMessage = { type: 'mcp', message, options };
|
||||
|
|
|
|||
Loading…
Reference in a new issue