modelcontextprotocol / modelcontextprotocol/php-sdk
[Client] SEP-2663 Tasks: Poll task handles and answer inputRequests
Nessuno ha ancora preso questa issue.
- Lingua principale
- PHP
- Stelle
- 1.6k
- Fork
- 173
- Merge medio
- 2g 49m
- PR unite (30g)
- 23
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con Client\Builder::enableExtension(), il Client::request() generico e l’API TaskClient descritta nell’issue. Usa tests/Integration/TasksTest e il relativo fixture stdio come primo punto di validazione. Il lavoro è completo quando le richieste compatibili con i task restituiscono CreateTaskResult, TaskClient supporta get, update e cancel e Task::fromArray() legge la struttura wire senza aggiungere polling o routing degli handler.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- php
- Ambito
- api, testing
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 55/100