modelcontextprotocol / modelcontextprotocol/php-sdk
[Client] SEP-2663 Tasks: Poll task handles and answer inputRequests
まだ誰も着手していません。
- 主要言語
- PHP
- スター
- 1.6k
- フォーク
- 173
- 平均マージ
- 2日 49分
- マージ済み PR(30日)
- 23
説明
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())declaresio.modelcontextprotocol/tasksin the initialize request (no store needed on the client).Mcp\Client\Task\TaskClientwraps a connectedClient(the core client stays task-agnostic; it gains a genericClient::request()):callTool()/getPrompt()/readResource()return aCreateTaskResultwhen the server answered withresultType: "task";get()pollstasks/getand returns theTask(status,statusMessage,pollIntervalMs,resultonce completed,erroronce failed,inputRequestswhile waiting);update()answersinputRequeststhroughtasks/update;cancel().- The polling loop and routing
inputRequeststo the application's elicitation/sampling handlers stay application code;Task::fromArray()reads the wire shape. - End-to-end coverage in
tests/Integration/TasksTestagainst 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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Client\Builder::enableExtension()、汎用の Client::request()、および issue に記載されている TaskClient API から始めます。最初の検証ポイントとして、tests/Integration/TasksTest とその stdio fixture を使用します。完了条件は、task に対応したリクエストが CreateTaskResult を返し、TaskClient が get、update、cancel をサポートし、Task::fromArray() が polling や handler routing を追加せずに wire 形式を読み取ることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php
- 領域
- api, testing
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 55/100