Proposal: experimental Events extension module (client and server)

未關閉
#2,945 1 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
typescript
領域
api

研究方向

Start by reading the experimental/tasks module and the linked Events design sketch, then compare the listed client and server behaviors with the conformance scenarios in conformance#521 and #540. Review mcpkit's implementation where the design is silent. Done means the placement and scope are agreed and all three delivery modes are covered on both client and server.

由索引模型根據 Issue 內容生成。

描述

I'd like to add support for the Events extension (design sketch) under experimental/, next to tasks. I'm opening this before writing code because the extension isn't an accepted SEP yet, and I'd rather hear now whether that rules it out.

Why now

The conformance repo is adding an Events suite. Server scenarios are in modelcontextprotocol/conformance#521, and client scenarios are tracked in modelcontextprotocol/conformance#540. That repo runs its suites against this SDK and builds its everything-client on it. Without events support here, the client scenarios have to ship a hand-written JSON-RPC client as their passing example, which is how the MRTR scenario works today. An SDK module would replace that, and other SDKs would have a reference to compare against.

What it would cover

The extension has three delivery modes, and the module would cover all three on both sides.

On the client side, that means events/list; a poll loop that drains on hasMore and applies a 1000 ms floor; an events/stream call that skips the default request timeout and reconnects with its cursor when the stream goes quiet; webhook events/subscribe with a refresh loop scheduled from refreshBefore; cursor handling for truncated: true and cursor: null; and secret generation from a CSPRNG.

On the server side, it means the capability declaration, events/list, events/poll, events/stream with heartbeats, and webhook subscribe/unsubscribe with signed delivery. The five conformance server scenarios would grade this half.

Existing implementation

mcpkit (Go) has a server and a client for this extension, and its server was the main target while the modelcontextprotocol/conformance#521 suite was being built. Where the document is silent, the TypeScript module would follow mcpkit's behaviour, and the conformance suite would hold both to the same rows.

Questions/Considerations

  1. Picking experimental/ as the location for this as the extension is not yet accepted. Any thoughts?
主要語言
TypeScript
星號
13.8k
分支
2.5k
平均合併
6 天 23 小時
30 天內合併 PR
2

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

modelcontextprotocol/typescript-sdk 的其他 Issue

查看 modelcontextprotocol/typescript-sdk 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。