Streamable Stateless server should support upgrade to SSE response

Đang mở
#539 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
api, backend

Hướng nghiên cứu

Bắt đầu bằng cách lần theo luồng server hiện đang trả về ServerResponse.ok().contentType(MediaType.APPLICATION_JSON).body(jsonrpcResponse), sau đó xác định phần xử lý một CallToolRequest đến. Dựa trên issue, hãy xác định việc nâng cấp SSE, các thông báo tiến trình, CallToolResponse cuối cùng và việc đóng stream, đồng thời kiểm tra xem các bài kiểm thử server-response hiện có có bao quát chuỗi này hay không.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Java
Star
3.7k
Fork
1.1k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
9

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelcontextprotocol/java-sdk

Tất cả issue của modelcontextprotocol/java-sdk

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.