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 client —
BrainHttpClient, 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? };baseUrldefaults tohttp://127.0.0.1:8080. - Wire client —
BrainClient, speaking theBRN0binary protocol (32-byte frame header + CBOR payload + optional little-endianf32vector section). Full surface: the memory verbs plus typed-graph create/read (entities, statements, relations), schema, transactions, andSUBSCRIBEstreaming. Connect withBrainClient.connect(host, port, { auth }). - Membership-shaped recall —
recallreturns aSingle/Many/Noneverdict (answer_kindlowercase over HTTP, capitalized on the wire), not a ranked list. Absence is explicit. - Request builders —
EncodeBuilder,RecallBuilder,ForgetBuilderfill wire defaults, mint therequestId, and expose the knobs a call tunes (including per-requestactAs(namespace, agentId)). - Auth —
Authorization: Bearer <key>on the HTTP client; token / mTLS on the wire client, sent after theWELCOMEhandshake. - Connection pool, mux, and retry —
Pool, multiplexedMuxConnection/Subscription, and awithRetrycombinator driven byisRetryable. - Error taxonomy —
BrainHttpError(status/code/message) for the HTTP client; theBrainErrorhierarchy (ProtocolError,ConnectionClosed,BrainTimeout,VersionMismatch,ServerError) for the wire client, plus theisRetryable/isActAsDeniedhelpers. - 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.
See also
Was this page helpful?