Adopting `with`- style accessors as part of the Transport APIs
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- swift
調査の方向性
Start by reading the existing Transport API entry points for connect(), send(), and receive(), then compare them with the proposed withClient closure flow. Done means a bootstrap can manage the connection for the closure, expose sending and incoming messages there, and close and clean up when the closure returns.
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
The current Transport APIs require the user to call connect() to establish a connection. From this point, the user has to manually track whether or not the connection is still alive, by handling any errors thrown by send or receive.
If a user wants to correctly handle error cases, this leads to more complexity in their implementations.
Describe the solution you'd like
In the Swift on Server ecosystem, we've adopted a with- style pattern, which compliments prior art in Swift's standard library. In there, we have a "bootstrap" for each transport that can be configured with the intended behavior of a transport connection.
let bootstrap = MCPTransportBootstrap()
A bootstrap connects in a with- style function call like so:
bootstrap.withClient { send, messages in
try await send(SomeToolCall())
for try await message in messages {
// Handle incoming traffic
}
}
Returning out of the withClient scope closes and cleans up the connection.
This pattern can be wrapped in more domain specific use cases like a request/response style flow in the higher level APIs.
- 主要言語
- Swift
- スター
- 1.6k
- フォーク
- 270
- 平均マージ
- 2日 7時間
- マージ済み PR(30日)
- 15
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/swift-sdk のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
modelcontextprotocol/swift-sdk#327 ·
メンテナーはふだん 2 日以内に返信
-
Value decoding changes data-URL-looking JSON strings into Value.data対応中かも @bitbemol が 73 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
modelcontextprotocol/swift-sdk#277 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
modelcontextprotocol/swift-sdk#274 ·
メンテナーはふだん 2 日以内に返信
-
`HTTPClientTransport` fails to build on Windows: `#if !os(Linux)` guards no longer match the `EventSource` platform condition再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
modelcontextprotocol/swift-sdk#261 ·
メンテナーはふだん 2 日以内に返信
-
Client.withBatch leaves per-request tasks pending when transport.send throws対応中かも @bbdu3 が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
modelcontextprotocol/swift-sdk#324 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
modelcontextprotocol/swift-sdk の issue をすべて見る
似ている issue
-
[java] TestClassWithoutTestCases: document that abstract classes and interfaces are not checkedオープン
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
VictorKildahl/cra#302 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
文件夹设置bugオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
joeseesun/qiaomu-jot#14 ·
メンテナーはふだん 1 日以内に返信