Refinement types
TopK cannot be 0, ProtocolVersion is validated at construction,
Score/Dimension are not interchangeable.Typestate Client
Only constructible via a
connect*() that runs the handshake; gated calls
fail client-side with CapabilityMissing before any I/O.Concept-gated Server<H>
A handler advertises capabilities and implements matching hooks;
if constexpr dispatch makes an advertised-but-unimplemented method a typed
error, never a crash.Total Result<T>
Result<T> = std::expected<T, Error> everywhere — no exceptions for control
flow. static_assert proofs ship in test_types.cpp.Requirements
A C++23 compiler withstd::expected (GCC 13+ or recent Clang). Header-only —
just add sdk/cpp/include to your include path and #include "rcp.hpp".
Server
CapabilityMissing, not a null pointer.
Client
Result<T>; nothing throws across the API boundary.
Build & test
Fusion & the vector codec
rcp/fusion.hpp and rcp/vectors.hpp are standalone, header-only, and tested —
byte-for-byte identical to the Python, Node, and Rust SDKs. The live Federation
delegates to the same rcp::fusion::rrf_fuse, so held-list fusion and fan-out
fusion agree exactly:
The SDK also ships a
Selector (pick one backend) and a Federation (fan out +
RRF fuse) — see Federation.