SDK
Protocol overview
How the wire protocol, SDKs, and ingest endpoint fit together.
Protocol overview
The SDK is a convenience layer. Everything underneath is a single HTTP endpoint accepting a batch of typed events.
┌───────────────────┐
Application ───► │ @cuitty/sdk │ ─── HMAC-signed POST ───► Portal
│ (or curl, etc.) │
└───────────────────┘
Three things the SDK gives you
- Batching. Events accumulate in memory and flush every 5 seconds, or on buffer fill, or on
shutdown(). - Signing. HMAC-SHA256 over the body using your API key — no need to hand-roll OpenSSL.
- Plugins. Tap into framework middleware, Pino, or your CI pipeline without rewriting your app.
Three things the SDK does not do
- Poll Cuitty for data — the SDK is push-only.
- Retry indefinitely — failed batches drop after
maxRetriesand are logged locally. - Throw exceptions on transport errors — fail-silent is a deliberate design choice; SDK errors must never crash the host process.
The contract
The contract between SDK and portal is documented in full at Wire protocol. Anything that conforms to the contract works — implement your own client in any language.