diff --git a/src/data/docsNav.ts b/src/data/docsNav.ts index 9332dea..e3dd120 100644 --- a/src/data/docsNav.ts +++ b/src/data/docsNav.ts @@ -20,6 +20,8 @@ export const docsNav: NavItem[] = [ icon: '' }, { label: 'Python SDK', href: '/docs/python-sdk', slug: 'python-sdk', icon: '' }, + { label: 'SDK Parity', href: '/docs/sdk-parity', slug: 'sdk-parity', + icon: '' }, // Features { section: 'Features', label: 'Messaging', href: '/docs/messaging', slug: 'messaging', icon: '' }, diff --git a/src/pages/docs/messaging.astro b/src/pages/docs/messaging.astro index de733d8..2e494f4 100644 --- a/src/pages/docs/messaging.astro +++ b/src/pages/docs/messaging.astro @@ -179,7 +179,7 @@ const bodyContent = `
Where each Pilot Protocol SDK stands today and what's planned to close the gap.
+ +Three official SDKs ship under one brand: Python, Node.js, and Swift (iOS/macOS). They all speak the same wire protocol — but they don't yet expose the same public API surface. This page tracks where they line up and where they don't.
+| SDK | Package | Coverage | Notes |
|---|---|---|---|
| Node.js | +pilotprotocol on npm |
+ Feature complete | +TypeScript types, using support, Buffer I/O. The reference surface alongside Python. |
+
| Python | +pilotprotocol on PyPI |
+ Feature complete | +Full type hints (py.typed), context managers, snake_case naming. |
+
| Swift | +sdk-swift (SwiftPM) |
+ Core trust + datagrams | +Embedded daemon (XCFramework, no separate process). Streams, networks, managed networks, policy, member tags, high-level services, and most registry admin are not yet exposed. | +
Updated against sdk-node@d02bd00, sdk-python@93584ea, sdk-swift@0d49f87 (audited 2026-05-28).
| Feature category | +Node | +Python | +Swift | +Notes | +
|---|---|---|---|---|
| Lifecycle (construct, dispose) | ✅ | ✅ | ✅ | Each SDK uses its native idiom (using, with, deinit). |
Daemon admin — info, health | ✅ | ✅ | ✅ | |
Daemon admin — rotateKey | ✅ | ✅ | — | Planned for Swift. |
| Trust — initiate handshake, list trusted peers | ✅ | ✅ | ✅ | |
| Trust admin — approve/reject/pending/revoke | ✅ | ✅ | — | Planned for Swift. |
Trust convenience — waitForTrust | — | — | ✅ | Planned for Node and Python. Currently Swift-only. |
Datagrams — sendTo, recvFrom | ✅ | ✅ | ✅ | Swift uses send(to:port:data:) and returns a typed Datagram. |
Datagrams — broadcast | ✅ | ✅ | — | Planned for Swift. |
Streams — dial, listen, Conn, Listener | ✅ | ✅ | — | Planned for Swift. |
| Registry admin — hostname / visibility / deregister / tags / webhook | ✅ | ✅ | — | Planned for Swift. |
| Networks — list/join/leave/members/invite/respond | ✅ | ✅ | — | Planned for Swift. |
| Managed networks — score/status/rankings/cycle/reconcile | ✅ | ✅ | — | Planned for Swift. |
| Policy — get/set | ✅ | ✅ | — | Planned for Swift. |
| Member tags — get/set | ✅ | ✅ | — | Planned for Swift. |
High-level services — sendMessage, sendFile, publishEvent, subscribeEvent | ✅ | ✅ | — | Planned for Swift. |
FFI loader — findLibrary / loadLibrary | ✅ | private | n/a | Intentional: Swift embeds the library in an XCFramework — no loader needed. |
Typed response structs (Config, StartResult, Datagram, Error) | n/a | n/a | ✅ | Swift idiom. Node/Python return untyped Record<string, unknown> / dict[str, Any] from the same RPCs. |
Naming differences across languages are not gaps. The matrix collapses idiomatic equivalents into a single canonical row:
+new Driver() (Node), Driver() (Python), and Pilot.start(config) (Swift) are the same operation expressed in each language's idiom.driver.close(), pilot.stop(), Python's with, and Node's using all resolve to the same teardown call.send_message maps to Node/Swift's sendMessage — same method, language-appropriate spelling.dict; Swift returns a typed Datagram struct. Both surface the same underlying RPC.A real gap is an operation that one SDK does not expose at all. Those are the rows in the matrix marked unintentional — every one of them has a follow-up ticket to close it.
The complete row-per-method matrix — including exact signatures and rationale for each gap — lives in the canonical spreadsheet:
+SDK Parity Matrix — Google Sheet
+The matrix is generated by a deterministic script in the main protocol repo (scripts/parity-audit/). Re-running it against newer commits of the three SDKs produces an updated matrix.csv — drop it into the Sheet to refresh.
End-state target: full parity across all three SDKs, except for the three intentional rows above (FFI loader, socket-path default, and Swift's typed response structs).
+waitForTrust(peerId, timeoutMs) — Swift's blocking convenience. Today, Node and Python users have to poll pendingHandshakes.Cross-SDK versioning is documented in the GOVERNANCE file in the main protocol repo: all three SDKs share the same MAJOR.MINOR line, with coordinated releases when the wire protocol changes.