Brainby arc-labs/docs
Changelog

TypeScript SDK changelog

Release notes for @brain-db/sdk on npm.

0.1.0 — initial public pre-release

The first published version of the hand-written TypeScript SDK. Two clients over one package (npm install @brain-db/sdk).

Added

  • HTTP clientBrainHttpClient, a JSON client for the Brain HTTP edge. Verbs: encode, recall, forget, link, unlink, plan, reason, whoami, capabilities. Constructed with { apiKey, baseUrl?, timeoutMs?, retry?, fetch? }; baseUrl defaults to http://127.0.0.1:8080.
  • Wire clientBrainClient, speaking the BRN0 binary protocol (32-byte frame header + CBOR payload + optional little-endian f32 vector section). Full surface: the memory verbs plus typed-graph create/read (entities, statements, relations), schema, transactions, and SUBSCRIBE streaming. Connect with BrainClient.connect(host, port, { auth }).
  • Membership-shaped recallrecall returns a Single / Many / None verdict (answer_kind lowercase over HTTP, capitalized on the wire), not a ranked list. Absence is explicit.
  • Request buildersEncodeBuilder, RecallBuilder, ForgetBuilder fill wire defaults, mint the requestId, and expose the knobs a call tunes (including per-request actAs(namespace, agentId)).
  • AuthAuthorization: Bearer <key> on the HTTP client; token / mTLS on the wire client, sent after the WELCOME handshake.
  • Connection pool, mux, and retryPool, multiplexed MuxConnection / Subscription, and a withRetry combinator driven by isRetryable.
  • Error taxonomyBrainHttpError (status / code / message) for the HTTP client; the BrainError hierarchy (ProtocolError, ConnectionClosed, BrainTimeout, VersionMismatch, ServerError) for the wire client, plus the isRetryable / isActAsDenied helpers.
  • Wire layer — CBOR codec (shortest round-tripping IEEE-754 float per field), frame codec with CRC32C, opcode table, and the typed payload structs, all re-exported for advanced use. Validated against the shared wire conformance corpus.

Was this page helpful?

On this page