limitr-ts
Limitr for TypeScript
@formata/limitr embeds the Limitr engine (the Stof spec compiled to BSTF) in a Stof WebAssembly document and
wraps the policy's functions (at root.policy) as async methods. It runs in-process in Node, Deno, Bun, and browsers. No network
calls happen in any hot path; Cloud mode syncs over a background WebSocket.
This skill covers the TypeScript API. What a policy means and how a call is decided is in the limitr skill; read it before designing a policy or explaining a result.
Install
npm i @formata/limitr
The package depends on @formata/stof (0.11.6 or later). Import only
from @formata/limitr. It ships this skill and the limitr skill in node_modules/@formata/limitr/skill/; the stof
skill (the Stof language) ships with Stof, in node_modules/@formata/stof/skill/stof/. A step-by-step tutorial with
runnable examples is in the repo's typescript/tutorial.