logika-sdk-core
v0.1.0
Published
Logika TypeScript SDK core: record/batch model, wire encoder, ids, the uploader state machine, the handshake client, and the BufferBackend/Transport contracts platform packages inject into.
Downloads
386
Readme
logika-sdk-core
The platform-neutral runtime shared by logika-sdk
and logika-sdk-browser — the wire model, id
minting, the uploader state machine, the handshake client, and the
BufferBackend/Transport contracts a platform package injects its own
storage/transport into.
Most applications don't depend on this package directly — install
logika-sdk or logika-sdk-browser instead; both re-export everything
from here a normal integration needs (Context, SpanHandle, Clock,
etc.) alongside their own platform-specific Log(...).
When you'd reach for this package directly
- Writing a new platform package (a third
BufferBackend+Transportpair for some other JS runtime) — implement those two interfaces and callcreateLogger(...), exactly likelogika-sdkandlogika-sdk-browserdo. - PII sealing outside a running
Logger—seal/open/generateKeyPair/decodePublicKey(the NaCl sealed-box primitivespiiparams use) are exported standalone. - Propagating a trace across a boundary the platform packages don't
cover —
Context,contextFromHeader, andtraceHeaderNameare the propagation primitive (spec04 §2.2): pass a span's.context()to another async task, queue, or gRPC call, or build/parse thelogika-traceheader by hand. - Test-authoring utilities —
logika-sdk-core/scenariotest(a scripted- scenario DSL),logika-sdk-core/buffertest(aBufferBackendconformance suite), andlogika-sdk-core/fixturetest(a fixture loader) are separate subpath exports for testing your own integration or a thirdBufferBackend.
Install
npm install logika-sdk-coreRequires Node 18+ (build/test tooling only — this package itself runs in any modern JS engine once bundled).
