[Client] SEP-2663 Tasks: Poll task handles and answer inputRequests

Đang mở
#349 0 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
55/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
php
Lĩnh vực
api, testing

Hướng nghiên cứu

Bắt đầu với Client\Builder::enableExtension(), Client::request() dạng generic và API TaskClient được mô tả trong issue. Sử dụng tests/Integration/TasksTest và fixture stdio của nó làm điểm xác thực đầu tiên. Được xem là hoàn tất khi các request hỗ trợ task trả về CreateTaskResult, TaskClient hỗ trợ get, update và cancel, và Task::fromArray() đọc cấu trúc wire mà không thêm polling hoặc định tuyến handler.

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

Mô tả

2026-07-28 enhancement improves spec compliance Server

Client side of SEP-2663 for the 2026-07-28 release. Tracked by umbrella #335. Follows the server side (#345–#348).

Scope

  • Client\Builder::enableExtension(new TasksExtension()) declares io.modelcontextprotocol/tasks in the initialize request (no store needed on the client).
  • Mcp\Client\Task\TaskClient wraps a connected Client (the core client stays task-agnostic; it gains a generic Client::request()): callTool() / getPrompt() / readResource() return a CreateTaskResult when the server answered with resultType: "task"; get() polls tasks/get and returns the Task (status, statusMessage, pollIntervalMs, result once completed, error once failed, inputRequests while waiting); update() answers inputRequests through tasks/update; cancel().
  • The polling loop and routing inputRequests to the application's elicitation/sampling handlers stay application code; Task::fromArray() reads the wire shape.
  • End-to-end coverage in tests/Integration/TasksTest against a stdio fixture server.

Notes

The server exposes pending asks on tasks/get and takes answers on tasks/update; that is the SEP-2260 request-scoping the original sketch of this issue described, without piggybacking anything on the tasks/update response.

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

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/php-sdk

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

Issue tương tự

Thêm issue về PHP

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.