swift-sdk/Sources/MCP/Base
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ayal Spitz f6e401aa97
Fix event stream line parsing to handle CRLF and empty lines correctly (#89)
* Optimized code in `connectToEventStream` to use `.lines` computed value of `AsyncSequence` to produce a `AsyncLineSequence` instead of building a lines manually.

* - Reverter use of `lines` (it swallows newlines)
- Fiexed original issue I experienced with line 229 `while let newlineIndex = buffer.firstIndex(of: "\n") {` not handling "\r\n" properly
- Added unit test to test for "\r\n" scenario
- Simplified `end of event` test - `line` creation trims newline, added code trims carriage return. Only thing that should be left is an empty line
2025-04-27 06:50:08 -07:00
..
Transports Fix event stream line parsing to handle CRLF and empty lines correctly (#89) 2025-04-27 06:50:08 -07:00
Utilities Initial implementation 2025-02-11 15:22:35 -08:00
Error.swift Add support for JSON-RPC batching (#67) 2025-04-10 12:13:41 -07:00
ID.swift Initial implementation 2025-02-11 15:22:35 -08:00
Lifecycle.swift Initial implementation 2025-02-11 15:22:35 -08:00
Messages.swift Update AnyNotification to include notification params (#86) 2025-04-27 06:47:38 -07:00
Transport.swift Add streamable HTTP transport for clients (#70) 2025-04-15 09:06:29 -07:00
Value.swift Initial implementation 2025-02-11 15:22:35 -08:00
Versioning.swift Initial implementation 2025-02-11 15:22:35 -08:00