[Server] SEP-2663 Tasks: Handlers return task handles; the application advances the task
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先阅读 TaskContext::create()、TaskContext::getStore()、TaskInputHandlerInterface 和 TasksUpdateHandler。跟踪 handler 如何返回 ResultInterface 值,以及 store 如何保存任务进度;完成的标准是任务结果能够传递下去、parked-task 输入能够正确委托,并且应用代码无需 core 中特定于任务的逻辑即可推进任务。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- PHP
- 星标
- 1.6k
- 派生
- 173
- 平均合并
- 19 小时 19 分钟
- 30 天内合并 PR
- 8
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
modelcontextprotocol/php-sdk 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
modelcontextprotocol/php-sdk#516 ·
维护者通常 1 天内回复
-
[Server] Handler type uses bare Closure, hard to decorate RegistryInterface under strict PHPStan未关闭Server
难度 1/5 1 小时以内 新手友好度 78/100
modelcontextprotocol/php-sdk#468 · 2 条评论 ·
维护者通常 1 天内回复
-
needs confirmation needs maintainer action Server
难度 2/5 1-3 小时 新手友好度 68/100
modelcontextprotocol/php-sdk#398 · 1 个 reaction ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
modelcontextprotocol/php-sdk#370 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 74/100
modelcontextprotocol/php-sdk#524 ·
维护者通常 1 天内回复
查看 modelcontextprotocol/php-sdk 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
filamentphp/filament#20630 ·
维护者通常 1 天内回复
-
Issue: Bug
难度 2/5 1-3 小时 新手友好度 82/100
OpenAPITools/openapi-generator#25107 ·
维护者通常 1 天内回复
-
needs-maintainer-review review:approve
难度 2/5 1-3 小时 新手友好度 68/100
Ultimate-Multisite/ultimate-ai-connector-compatible-endpoints#163 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
-
Bug
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复