modelcontextprotocol / modelcontextprotocol/php-sdk
[Client] SEP-2663 Tasks: Poll task handles and answer inputRequests
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- PHP
- Estrellas
- 1.6k
- Forks
- 173
- Merge medio
- 2 d 49 min
- PR fusionados (30 d)
- 23
Descripción
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con Client\Builder::enableExtension(), el Client::request() genérico y la API de TaskClient descrita en el issue. Usa tests/Integration/TasksTest y su fixture de stdio como primer punto de validación. Se considera terminado cuando las solicitudes capaces de usar tareas devuelven CreateTaskResult, TaskClient admite get, update y cancel, y Task::fromArray() lee la estructura wire sin añadir polling ni enrutamiento de handlers.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- php
- Área
- api, testing
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 55/100