[Schema] SEP-2663 Tasks: Task shape, resultType discriminator, tasks/* request/result types

Đang mở
#345 0 bình luận 1 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
48/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, backend-api-design

Hướng nghiên cứu

Bắt đầu với các mẫu schema và enum hiện có cho TaskStatus, ResultType, CallToolResult và EmptyResult, sau đó xem xét extensions framework trong #344 và phạm vi tổng thể trong #335. Triển khai các kiểu task envelope, result, request và enum được liệt kê, giữ nguyên flat wire shape và cách mã hóa inputRequests; hoàn tất khi tất cả các kiểu được nêu tên và ngữ nghĩa status khớp với đặc tả đã hợp nhất cùng các kỳ vọng về conformance.

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 Schema

Schema portion of SEP-2663 (Tasks extension, io.modelcontextprotocol/tasks) for the 2026-07-28 release. Tracked by umbrella #335; sits on the SEP-2133 extensions framework (#344).

Scope

  • Mcp\Schema\Task: taskId, status, createdAt, lastUpdatedAt, ttlMs, pollIntervalMs, statusMessage, result, error, inputRequests. Flat on the wire in both places it appears (no nested task key). Enforces the status semantics: a tool that ran and reported a problem is completed with isError; failed is reserved for protocol-level errors and carries the error inlined.
  • Mcp\Schema\Enum\TaskStatus: working, input_required, completed, failed, cancelled (what the merged spec and conformance suite use — not pending/running).
  • Mcp\Schema\Enum\ResultType::Task ("task") alongside Complete and InputRequired.
  • CreateTaskResult — a result in its own right (resultType: "task" + the task envelope), returned by any task-augmentable handler instead of a discriminator bolted onto CallToolResult.
  • TaskResult for tasks/get; tasks/update and tasks/cancel answer EmptyResult.
  • TasksGetRequest, TasksUpdateRequest (taskId, inputResponses), TasksCancelRequest.
  • inputRequests reuse the multi round-trip (SEP-2322) encoding: a map of server-assigned keys to bare method/params pairs.

Notes

SEP-2663 supersedes SEP-1686 (#139, closed).

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.