Skip to main content

JavaScript SDK 0.3.0 — validated answers and an optional video peer

JavaScript SDK 0.3.0 validates typed answers, adds request budgets and warmup, infers question and answer types, and moves browser video decoding to an optional peer.

Upgrade notes​

  • Browser video decoding now uses the optional mediabunny peer: npm install mediabunny@1.62.1. HTTP-only installs have no runtime dependencies and avoid unrelated WebCodecs global type conflicts.
  • Typed calls reject malformed responses; raw predict remains available. See contracts/README.md for the timeout and resource ownership guarantees.

Changes​

  • Validate typed answers against request names, kinds, candidates and finite probability distributions. Raw predict remains available. Malformed responses previously accepted now fail explicitly.
  • Total request budgets, Retry-After with jitter, stable timeout and response errors, and metadata-only event hooks.
  • Local loading stages, runtime information and representative-request warmup; documented concurrency and ownership.
  • Versioned cross-language protocol and formula fixtures, and installed-package smoke tests.
  • Infer SystemOne question names, answer kinds and Choice literals; infer Decisions tuple answer kinds and candidate values.
  • Abort listeners are removed after retry waits, cancellation reasons are preserved, and public close is idempotent.

Install​

Terminal
npm install @valen-team/sdk@0.3.0