@@ -23,7 +23,7 @@ public protocol Transport: Actor {
2323 func send( _ data: Data ) async throws
2424
2525 /// Receives data in an async sequence
26- func receive( ) -> AsyncThrowingStream < Data , Error >
26+ func receive( ) -> AsyncThrowingStream < Data , Swift . Error >
2727}
2828
2929/// Standard input/output transport implementation
@@ -158,7 +158,7 @@ public actor StdioTransport: Transport {
158158 }
159159 }
160160
161- public func receive( ) -> AsyncThrowingStream < Data , Error > {
161+ public func receive( ) -> AsyncThrowingStream < Data , Swift . Error > {
162162 return AsyncThrowingStream { continuation in
163163 Task {
164164 for await message in messageStream {
@@ -179,8 +179,8 @@ public actor StdioTransport: Transport {
179179 public nonisolated let logger : Logger
180180
181181 private var isConnected = false
182- private let messageStream : AsyncThrowingStream < Data , Error >
183- private let messageContinuation : AsyncThrowingStream < Data , Error > . Continuation
182+ private let messageStream : AsyncThrowingStream < Data , Swift . Error >
183+ private let messageContinuation : AsyncThrowingStream < Data , Swift . Error > . Continuation
184184
185185 // Track connection state for continuations
186186 private var connectionContinuationResumed = false
@@ -195,7 +195,7 @@ public actor StdioTransport: Transport {
195195 )
196196
197197 // Create message stream
198- var continuation : AsyncThrowingStream < Data , Error > . Continuation !
198+ var continuation : AsyncThrowingStream < Data , Swift . Error > . Continuation !
199199 self . messageStream = AsyncThrowingStream { continuation = $0 }
200200 self . messageContinuation = continuation
201201 }
@@ -209,7 +209,7 @@ public actor StdioTransport: Transport {
209209
210210 // Wait for connection to be ready
211211 try await withCheckedThrowingContinuation {
212- [ weak self] ( continuation: CheckedContinuation < Void , Error > ) in
212+ [ weak self] ( continuation: CheckedContinuation < Void , Swift . Error > ) in
213213 guard let self = self else {
214214 continuation. resume ( throwing: MCPError . internalError ( " Transport deallocated " ) )
215215 return
@@ -245,7 +245,7 @@ public actor StdioTransport: Transport {
245245 }
246246 }
247247
248- private func handleConnectionReady( continuation: CheckedContinuation < Void , Error > )
248+ private func handleConnectionReady( continuation: CheckedContinuation < Void , Swift . Error > )
249249 async
250250 {
251251 if !connectionContinuationResumed {
@@ -259,7 +259,7 @@ public actor StdioTransport: Transport {
259259 }
260260
261261 private func handleConnectionFailed(
262- error: Error , continuation: CheckedContinuation < Void , Error >
262+ error: Swift . Error , continuation: CheckedContinuation < Void , Swift . Error >
263263 ) async {
264264 if !connectionContinuationResumed {
265265 connectionContinuationResumed = true
@@ -268,7 +268,7 @@ public actor StdioTransport: Transport {
268268 }
269269 }
270270
271- private func handleConnectionCancelled( continuation: CheckedContinuation < Void , Error > )
271+ private func handleConnectionCancelled( continuation: CheckedContinuation < Void , Swift . Error > )
272272 async
273273 {
274274 if !connectionContinuationResumed {
@@ -299,7 +299,7 @@ public actor StdioTransport: Transport {
299299 var sendContinuationResumed = false
300300
301301 try await withCheckedThrowingContinuation {
302- [ weak self] ( continuation: CheckedContinuation < Void , Error > ) in
302+ [ weak self] ( continuation: CheckedContinuation < Void , Swift . Error > ) in
303303 guard let self = self else {
304304 continuation. resume ( throwing: MCPError . internalError ( " Transport deallocated " ) )
305305 return
@@ -326,7 +326,7 @@ public actor StdioTransport: Transport {
326326 }
327327 }
328328
329- public func receive( ) -> AsyncThrowingStream < Data , Error > {
329+ public func receive( ) -> AsyncThrowingStream < Data , Swift . Error > {
330330 return AsyncThrowingStream { continuation in
331331 Task {
332332 do {
@@ -382,7 +382,7 @@ public actor StdioTransport: Transport {
382382 var receiveContinuationResumed = false
383383
384384 return try await withCheckedThrowingContinuation {
385- [ weak self] ( continuation: CheckedContinuation < Data , Error > ) in
385+ [ weak self] ( continuation: CheckedContinuation < Data , Swift . Error > ) in
386386 guard let self = self else {
387387 continuation. resume ( throwing: MCPError . internalError ( " Transport deallocated " ) )
388388 return
0 commit comments