modelcontextprotocol / modelcontextprotocol/php-sdk

[Server] SEP-2663 Tasks: TasksExtension, capability gate, tasks/* handlers

Aperta
#346 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

2026-07-28 enhancement improves spec compliance needs design Server
Lingua principale
PHP
Stelle
1.6k
Fork
173
Merge medio
2g 49m
PR unite (30g)
23

Descrizione

Server-side handler portion of SEP-2663 for the 2026-07-28 release. Tracked by umbrella #335; sits on the SEP-2133 extensions framework (#344).

Scope

  • Mcp\Server\Task\TasksExtension implements MethodProvidingExtensionInterface and ArgumentProvidingExtensionInterface (new, generic: an extension registers its message classes, handlers and injectable handler arguments through Builder::enableExtension(); the core never names the extension). Enable with new TasksExtension($store, $inputHandler) and the tasks/get / tasks/update / tasks/cancel surface appears; no separate setTaskStore() builder knob.
  • Handlers under Mcp\Server\Task\Handler\: TasksGetHandler, TasksUpdateHandler, TasksCancelHandler.
  • Capability gate: TaskCapabilityGuard reads what initialize left in the session and refuses the tasks/* methods with -32021 (missing required client capability) for a client that did not declare the extension.
  • Handlers get a TaskContext by declaring the parameter: isSupported() so a handler that can work either way asks first, create() stores the task before returning the CreateTaskResult (so the first tasks/get cannot arrive before the task exists) and refuses an undeclared client with -32021, getStore().

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con il SEP-2133 extensions framework in #344 e il percorso Builder::enableExtension(), quindi esamina TasksExtension e gli handler sotto Mcp\Server\Task\Handler. Segui TaskCapabilityGuard e TaskContext per verificare i controlli del client dichiarato, l’ordine di creazione dei task e l’accesso allo store. Il lavoro è completato quando la superficie tasks/* è registrata tramite TasksExtension e la capacità client mancante restituisce -32021 come specificato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
php
Ambito
api, backend
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.