The polish release: a full-project review (82 verified findings) applied end to end — bug fixes across the envelope, schema, macro, and transports, a proper import JSONRPC umbrella module, rewritten documentation, and a test suite that grew from 60 to 137 tests. Everything is additive or deprecation-mediated; existing code keeps compiling.
Bug fixes
- JSON-RPC: a response with a nil result now encodes spec-valid
"result": null(and round-trips through this library's own decoder); batches are no longer truncated to their first message by the transports; a malformed batch element surfaces its real decoding error;isBatchPayloadtolerates a UTF-8 BOM. - JSONSchema:
withoutRequiredandaddingAdditionalPropertiesRestrictionToObjectsno longer drop objecttitles. @Schemamacro: non-ASCII text (umlauts, emoji) survives into generated descriptions; aCodingKeysenum is honored at any access level (previouslyprivateonly), so schema names match wire keys.JSONValue: JSON0/1parsed viaJSONSerializationno longer misclassify as booleans (NSNumber→Bool bridging, on both Darwin and Linux).- TCP: a write to a hung-up peer can no longer kill the host process with SIGPIPE, and mid-stream write failures report a dedicated
sendFailederror. - Stdio: executable PATH resolution is Windows-aware (
;separators, case-insensitivePath,.exe/.cmd/.bat).
import JSONRPC now works
The batteries-included JSONRPC product is backed by a real umbrella module re-exporting the peer, codecs, and the stdio/TCP/SSE transports — no more product/module mismatch.
Renames (old names deprecated, still compiling)
MCPJSONCoding→JSONCodingStdioMessageTransport→StdioTransportJSONValue.value→JSONValue.jsonObject(now public)
Other improvements
JSONRPCPeer.sendRequesthonors task cancellation; peer/transport contracts (notification ordering, send-after-close) are documented.JSONValuegainsuintValue;JSONRPCIDgainsdebugDescription; SSE comment messages round-trip throughLosslessStringConvertible.- README rewritten around all nine products with runtime examples and
Subprocess-trait instructions; doc comments across the previously undocumented public surface;.spi.ymlfor hosted DocC. - CI now builds and tests the
Subprocesstrait, pins SwiftLint and toolchain actions, and the whole repo isswiftformat/swiftlint --strictclean.
Full Changelog: 2.4.0...2.5.0