Jev directory
CommunityJev Repos & SDKs
@harlan-zw/jev
Nuxt-free TypeScript client for asking Jev typed noul, choice, and score questions about one state. Ships an HTTP client over Cloudflare /ai/run, tagged-template ask helpers, order-stable digests, and eval replay math.
- Reading time
- 2 min
- Published by
- Community
- Added
- Nov 2026
Highlights
- Pure TypeScript client with one dependency, ohash, for sync digests; no Nuxt, Nitro, or h3 code.
- Runs on Node 20+ and workers, calling Cloudflare /ai/run through createJevHttpClient.
- Every call resolves Ok or a tagged JevFailure (Http, Invalid, Network, Timeout); nothing throws or rejects.
- digestKey and canonicalJson give the same key for the same state whatever the key order.
- agreement, summarizeReplay, suggestBand, and replayAnswer measure agreement before a threshold moves.
Questions about this entry
Short answers drawn from the linked project or page.
Install it with pnpm add @harlan-zw/jev. It is pure TypeScript with a single dependency, ohash, for sync digests, and it runs on Node 20+ and workers. The Nuxt module, decision runner, and drizzle schema live in the separate @harlan-zw/nuxt-jev package.
noul, choice, and score return a probability, a picked option, or a rubric level, never prose. The ask tag API wraps these builders, and askIf resolves to a boolean above a threshold.
Failures are values. Every call resolves { _tag: 'Ok', result } or { _tag: 'Err', failure }, where the failure is one tagged JevFailure: Http, Invalid, Network, or Timeout. The HTTP client retries with backoff inside one timeout window and validates each answer.
Credentials are passed in options, or read from the CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN environment variables. The client sends requests to Cloudflare's /ai/run endpoint.
A tagged template puts the state and the question in one call, so a batch goes out in a single request. Each interpolated object goes once into input and its slot becomes a path; awaiting a tag on its own sends it on its own.
digestKey and canonicalJson produce the same digest for the same state regardless of key order, so a stored answer can be reused instead of being invalidated by reordered keys.
Math, counting, and dates stay in code; questions should be read literally, with boundary cases in criteria. Thresholds do not carry across question types, a question and its negation do not sum to 1, and state should be filtered before sending to avoid context rot.
From the Jev guides
Original write-ups on what this entry is for.
From the Jev AI model community
Posts from builders shipping with Jev right now.