modelcontextprotocol / modelcontextprotocol/php-sdk
[Client] SEP-2663 Tasks: Poll task handles and answer inputRequests
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- PHP
- Sterne
- 1.6k
- Forks
- 173
- Ø Merge
- 2 T. 49 Min.
- Gemergte PRs (30 T.)
- 23
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit Client\Builder::enableExtension(), dem generischen Client::request() und der in der Issue beschriebenen TaskClient API. Verwende tests/Integration/TasksTest und dessen stdio-Fixture als ersten Validierungspunkt. Die Arbeit ist abgeschlossen, wenn task-fähige Requests CreateTaskResult zurückgeben, TaskClient get, update und cancel unterstützt und Task::fromArray() die Wire-Struktur liest, ohne Polling oder Handler-Routing hinzuzufügen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- php
- Bereich
- api, testing
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 55/100