Streamable Stateless server should support upgrade to SSE response

未關閉
#539 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
java
領域
api, backend

研究方向

先追蹤目前回傳 ServerResponse.ok().contentType(MediaType.APPLICATION_JSON).body(jsonrpcResponse) 的伺服器路徑,接著找出對傳入 CallToolRequest 的處理。根據 issue 定義 SSE 升級、進度通知、最終的 CallToolResponse 以及串流關閉,並檢查現有的 server-response 測試是否涵蓋此序列。

由索引模型根據 Issue 內容生成。

描述

feature/stateless-sse-upgrade

Expected Behavior

A server that is fully stateless and does not support long-lived connections can still take advantage of streaming in this design.
For example, to issue progress notifications during a tool call:
When the incoming POST request is a CallToolRequest, server indicates the response will be SSE
Server starts executing the tool
Server sends any number of ProgressNotifications over SSE while the tool is executing
When the tool execution completes, the server sends a CallToolResponse over SSE
Server closes the SSE stream

https://github.com/modelcontextprotocol/modelcontextprotocol/pull/206

Current Behavior

The current implementation can only return json

return ServerResponse.ok().contentType(MediaType.APPLICATION_JSON).body(jsonrpcResponse);

Context

主要語言
Java
星號
3.7k
分支
1.1k
平均合併
1 天 15 小時
30 天內合併 PR
9

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

modelcontextprotocol/java-sdk 的其他 Issue

查看 modelcontextprotocol/java-sdk 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。