TypeScript SDK
Planned for Phase 2. This guide describes the planned setup; the configuration shown below is validated against the current API schema so it stays accurate.
The TypeScript SDK, with its browser client, is planned for Phase 2.
Browser ingestion with publishable keys is part of the HTTPS ingestion API
today. The planned package name is
@mantika-ai/tessera. Do not
install a package called tessera or @tessera/sdk from
npm. It will mirror the contract of the planned Python SDK: an
ergonomic track() with local buffering and flush guarantees,
plus a fully typed client generated from the same OpenAPI document.
TypeScript services send events with
HTTPS ingestion directly — the batch contract,
idempotency semantics, and per-item results documented there are exactly
what the SDK will wrap. That includes the event_id rule: make the first
16 characters of every event id unique: start it with a random or hashed
part (for example a UUID or a hash), not a fixed prefix such as a date or an
order-number stem. Until the ledger identity upgrade, an event whose first
16 characters match another event of the same entity at the same timestamp
is held back, not stored, until the upgrade stores it. Those first 16
characters must not contain # (events.track() throws
TesseraValidationError for such an id before anything is queued; see
choosing event_id values).
Entity ids must not contain # anywhere either: events.track() throws
TesseraValidationError (entity.id: must not contain '#') before anything
is queued (see entity ids).