modelcontextprotocol / modelcontextprotocol/php-sdk
[Server] SEP-2663 Tasks: TasksExtension, capability gate, tasks/* handlers
Chưa có ai nhận issue này.
- 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
Mô tả
Server-side handler portion of SEP-2663 for the 2026-07-28 release. Tracked by umbrella #335; sits on the SEP-2133 extensions framework (#344).
Scope
Mcp\Server\Task\TasksExtensionimplementsMethodProvidingExtensionInterfaceandArgumentProvidingExtensionInterface(new, generic: an extension registers its message classes, handlers and injectable handler arguments throughBuilder::enableExtension(); the core never names the extension). Enable withnew TasksExtension($store, $inputHandler)and thetasks/get/tasks/update/tasks/cancelsurface appears; no separatesetTaskStore()builder knob.- Handlers under
Mcp\Server\Task\Handler\:TasksGetHandler,TasksUpdateHandler,TasksCancelHandler. - Capability gate:
TaskCapabilityGuardreads whatinitializeleft in the session and refuses thetasks/*methods with-32021(missing required client capability) for a client that did not declare the extension. - Handlers get a
TaskContextby declaring the parameter:isSupported()so a handler that can work either way asks first,create()stores the task before returning theCreateTaskResult(so the firsttasks/getcannot arrive before the task exists) and refuses an undeclared client with-32021,getStore().
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.
Hướng nghiên cứu
Bắt đầu với SEP-2133 extensions framework trong #344 và đường dẫn Builder::enableExtension(), sau đó kiểm tra TasksExtension và các handler bên dưới Mcp\Server\Task\Handler. Theo dõi TaskCapabilityGuard và TaskContext để xác minh các kiểm tra đối với client đã khai báo, thứ tự tạo task và quyền truy cập store. Hoàn tất khi surface tasks/* được đăng ký thông qua TasksExtension và việc thiếu capability của client trả về -32021 như đã chỉ định.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- php
- Lĩnh vực
- api, backend
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 55/100