[Client] Implement SSE reconnect with Last-Event-ID
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
- 66/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- php
- Lĩnh vực
- api, networking
Hướng nghiên cứu
Bắt đầu với src/Client/Transport/HttpTransport.php::processSSEStream và theo dõi cách phân tích SSE hiện có cũng như việc xử lý trạng thái stream. Bổ sung kiểm thử đơn vị cho việc theo dõi ID sự kiện và kết nối lại, sau đó chạy kịch bản tuân thủ sse-retry; hoàn tất khi các lần kết nối lại tiếp tục với Last-Event-ID và chính sách retry được tuân thủ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
Per the MCP Streamable HTTP transport spec, when an SSE stream disconnects the client SHOULD reconnect using Last-Event-ID to resume the stream without losing notifications. src/Client/Transport/HttpTransport.php::processSSEStream currently abandons the stream on EOF.
Scope
- Track the most recent
id:line per active stream. - On unexpected EOF (stream still expected open — pending request unresolved, or session active), reconnect with:
GET <endpoint>+Accept: text/event-streamMcp-Session-IdheaderLast-Event-ID: <id>header
- Configurable retry policy: backoff (1s, 2s, 4s, capped at 10s) + max attempts (default 5).
- Respect
retry:SSE field when present.
Conformance scenarios unblocked
sse-retry.
Dependencies
Independent — can run in parallel with auth work.
Acceptance
- Unit tests for ID tracking + reconnect with Last-Event-ID.
- Conformance:
sse-retrypasses.
cc @soyuka
- Ngôn ngữ chính
- PHP
- Star
- 1.6k
- Fork
- 173
- Merge trung bình
- 2 ngày 49 phút
- Pull request đã merge (30 ngày)
- 23
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/php-sdk
-
[Server] Handler type uses bare Closure, hard to decorate RegistryInterface under strict PHPStan Đang mởServer
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/php-sdk#468 · 2 bình luận ·
-
needs confirmation needs maintainer action Server
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/php-sdk#398 · 1 reaction ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/php-sdk#370 ·
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
modelcontextprotocol/php-sdk#510 · 1 bình luận ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
modelcontextprotocol/php-sdk#504 ·
Tất cả issue của modelcontextprotocol/php-sdk
Issue tương tự
-
[Chore] Keep one viget-block-generator skill and replicate it, instead of four tracked copies Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
hector-jewell/food-delivery-system-for-restaurant-using-php#1311 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Sylius/SyliusGridBundle#501 ·