-
Notifications
You must be signed in to change notification settings - Fork 571
feat(server): convert ping messages to be spec compliant #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(server): convert ping messages to be spec compliant #169
Conversation
WalkthroughThis change updates the server's keep-alive mechanism for Server-Sent Events (SSE) by replacing the previous comment-style ping with a JSON-RPC 2.0 "ping" request that includes an incrementing request ID. The server now sends these structured ping requests, and the request handler is updated to recognize and ignore incoming JSON-RPC responses. A new test verifies that clients can receive these ping messages and respond appropriately, ensuring the server correctly processes the responses. Changes
Possibly related PRs
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
5c0168d
to
8d4be5e
Compare
Replace string ping messages with MCP spec compliant JSON-RPC requests. - Update request handler to ignore ping responses (add `Result` field to `baseMessage` to disambiguate empty responses from other incoming messages) - Implement MCP spec compliant [ping request](https://modelcontextprotocol.io/specification/2024-11-05/basic/utilities/ping)
8d4be5e
to
3aa0aea
Compare
Replace string ping messages system added in #80 with MCP spec compliant JSON-RPC requests.
Result
field tobaseMessage
to disambiguate empty responses from other incoming messages)Summary by CodeRabbit
New Features
Bug Fixes
Tests