[Server] SEP-2663 Tasks: Handlers return task handles; the application advances the task

オープン
#348 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
php
領域
api, backend

調査の方向性

まず TaskContext::create()、TaskContext::getStore()、TaskInputHandlerInterface、TasksUpdateHandler を読みます。ハンドラーがどのように ResultInterface の値を返し、store がどのようにタスクの進行状況を保存するかを追跡します。タスクの結果が受け渡され、parked-task の入力が正しく委譲され、アプリケーションコードが core 内のタスク固有ロジックなしでタスクを進められれば完了です。

索引モデルが issue の本文から書いたものです。

説明

2026-07-28 enhancement improves spec compliance needs design Server

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 (via TaskContext::create()) instead of its usual result; the core handlers pass any ResultInterface a 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.
  • TaskInputHandlerInterface is the hook for what an answer to a parked (input_required) task means; TasksUpdateHandler delegates inputResponses to it.
  • No #[McpTool] task-eligibility marker and no early-return path in ReferenceHandler: whether to create a task is the handler's decision, made per request.
主要言語
PHP
スター
1.6k
フォーク
173
平均マージ
2日 49分
マージ済み PR(30日)
23

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

modelcontextprotocol/php-sdk のほかの issue

modelcontextprotocol/php-sdk の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。