modelcontextprotocol / modelcontextprotocol/php-sdk
[Server] SEP-2663 Tasks: Handlers return task handles; the application advances the task
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
Execution model for SEP-2663 for the 2026-07-28 release. Tracked by umbrella #335.
Decision
The SDK owns storage and the tasks/* surface; advancing a task is the application's job. PHP has no in-process background executor to build on, and picking a queue or process model on the user's behalf would be the wrong call for a framework-agnostic SDK.
Scope
- Any tool, prompt or resource handler may return a
CreateTaskResult(viaTaskContext::create()) instead of its usual result; the core handlers pass anyResultInterfacea handler returns through untouched, so no core code knows about tasks. - What happens next is application code: enqueue something a worker picks up, and have the worker call
$store->save($task->with(...))as it progresses.TaskContext::getStore()gives a handler the store for a task it did not create in this request. TaskInputHandlerInterfaceis the hook for what an answer to a parked (input_required) task means;TasksUpdateHandlerdelegatesinputResponsesto it.- No
#[McpTool]task-eligibility marker and no early-return path inReferenceHandler: whether to create a task is the handler's decision, made per request.
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 dem Lesen von TaskContext::create(), TaskContext::getStore(), TaskInputHandlerInterface und TasksUpdateHandler. Verfolge, wie Handler ResultInterface-Werte zurückgeben und wie der Store den Aufgabenfortschritt speichert; abgeschlossen ist die Aufgabe, wenn Aufgabenergebnisse weitergereicht werden, die Eingabe für geparkte Aufgaben korrekt delegiert wird und Anwendungscode Aufgaben ohne aufgabenspezifische Logik im Core voranbringen kann.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- php
- Bereich
- api, backend
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100