Add streamable HTTP transport for clients (#70)
* Rename file to Transport.swift * Rename file to StdioTransportTests.swift * Add .index-build/ to .gitignore * Implement HTTP client transport * Add test coverage for streamable HTTP client transport * Conditionally import FoundationNetworking * Conditionalize streaming for unsupported platforms * Import FoundationNetworking in tests * Add 5 minute timeout to CI jobs * Remove debug logging * Formatting * Skip SSE tests on platforms that don't support streaming
This commit is contained in:
parent
4143f35b41
commit
d583151871
1 changed files with 726 additions and 0 deletions
|
|
@ -1,20 +0,0 @@
|
|||
import Logging
|
||||
|
||||
import struct Foundation.Data
|
||||
|
||||
/// Protocol defining the transport layer for MCP communication
|
||||
public protocol Transport: Actor {
|
||||
var logger: Logger { get }
|
||||
|
||||
/// Establishes connection with the transport
|
||||
func connect() async throws
|
||||
|
||||
/// Disconnects from the transport
|
||||
func disconnect() async
|
||||
|
||||
/// Sends data
|
||||
func send(_ data: Data) async throws
|
||||
|
||||
/// Receives data in an async sequence
|
||||
func receive() -> AsyncThrowingStream<Data, Swift.Error>
|
||||
}
|
||||
Loading…
Reference in a new issue