# jevascript > jevascript is a semantic runtime for TypeScript: `is`, `score` and `choose` as ordinary values next to `string`, `number` and `boolean`, backed by a decision model that scores propositions and returns calibrated probabilities. The model supplies the judgement; your code decides the consequence. Package: `jevascript` on npm (ESM, zero dependencies, Node >= 22.6). Version 0.1.x; the API may change before 1.0. Every page below has a Markdown twin at the linked URL and an HTML version at the same path without `.md`. The full documentation in one file: https://jevascript.org/llms-full.txt Key facts: questions created in one synchronous turn share one request (batching); `is()` returns a probability thresholded at 0.5; `score()` maps a probability onto a range (0–100 by default) or a rubric; `choose()` returns one of a fixed set with the literal union inferred; confidence is measured by re-asking, never derived from the probability; jevascript is not a security boundary and does not generate text. ## Overview - [Landing page](https://jevascript.org/index.md): what jevascript is, in one screen ## Getting started - [Introduction](https://jevascript.org/docs/index.md): jevascript is a semantic runtime for TypeScript. It adds is, score and choose next to string, number and boolean, so judgements that do not come from a property can still be ordinary values in ordinary control flow. - [Installation](https://jevascript.org/docs/installation.md): Install the package, meet the requirements, and put an API key where the runtime can find it. - [Quick start](https://jevascript.org/docs/quick-start.md): From an empty file to a decision your code can act on, in five steps. - [Configuration](https://jevascript.org/docs/configuration.md): Zero-config with an API key, configureSemantic for the module-level instance, createSemantic for a private one, and every default you can set. ## Concepts - [Primitives](https://jevascript.org/docs/primitives.md): Everything semantic(state).is(), .score() and .choose() accept, what they return, and how to write criteria the model answers well. - [Batching](https://jevascript.org/docs/batching.md): Every question created in the same synchronous turn travels in one request. What that means, how to keep it, and what it saves. - [Definitions](https://jevascript.org/docs/definitions.md): Declare a rule, a metric or a whole schema once, with a name and a version, and apply it to data. Every field resolves in one request. - [Collections](https://jevascript.org/docs/collections.md): filter, some, every, rank, find and compare over lists. Which cost one request and which cost N. - [Uncertainty](https://jevascript.org/docs/uncertainty.md): Probability versus confidence, why confidence is measured rather than invented, and how bands and fallbacks keep decisions honest. - [Not a security boundary](https://jevascript.org/docs/not-a-security-boundary.md): What semantic evaluation must never decide on its own, what prompt injection can and cannot do to a decision model, and how to keep a deterministic gate in front of every consequence. ## Guides - [Providers](https://jevascript.org/docs/providers.md): The provider interface, the built-in Jev provider and its options, retries and timeouts, and how to write a provider of your own. - [Caching](https://jevascript.org/docs/caching.md): Cache answers per call or per instance, choose a TTL, plug in Redis, and understand what the key is made of. - [Testing](https://jevascript.org/docs/testing.md): Run everything around a semantic call without a model or a key. The mock provider answers from a table and counts requests. - [Observability](https://jevascript.org/docs/observability.md): Every evaluation emits one event with latency, request count, token usage, cache status and the definition it came from. Wire it to whatever you already use. - [Errors](https://jevascript.org/docs/errors.md): Every error the runtime throws, what it carries, when it happens, and how to handle it. - [Frameworks](https://jevascript.org/docs/frameworks.md): Where a semantic call belongs in Next.js, Express, Hono and edge runtimes, and how to keep the key on the server. ## Scenarios - [Scenarios](https://jevascript.org/docs/scenarios.md): Six complete, runnable examples. Each one is a real decision, the questions behind it, and the plain code that acts on the answers. - [Ticket triage](https://jevascript.org/docs/scenarios/ticket-triage.md): Declare what a support ticket means for your business once, then apply it to every ticket. One request per ticket, however many fields. - [Lead qualification](https://jevascript.org/docs/scenarios/lead-qualification.md): Your ideal customer profile lives in one place, as prose the revenue team can edit. Every lead is judged against it in one request. - [Moderation](https://jevascript.org/docs/scenarios/moderation.md): The policy is prose your trust-and-safety team owns. The thresholds are a diffable object. Hard rules stay in code. - [RAG gate](https://jevascript.org/docs/scenarios/rag-gate.md): Judge every retrieved passage against the actual question, in one request, and answer the question retrieval cannot. Does the corpus contain an answer at all? - [Agent guardrail](https://jevascript.org/docs/scenarios/agent-guardrail.md): An agent is about to run a tool call. Screen it with five checks that share one request, then let plain code decide whether to allow, confirm or block. - [Fraud review](https://jevascript.org/docs/scenarios/fraud-review.md): Ask several independent propositions, combine them with weights you own, keep hard facts deterministic, and pay for measured confidence only on the expensive path. ## Reference - [API reference](https://jevascript.org/docs/api.md): Every export of jevascript and jevascript/testing, with its signature and a link to the page that explains it. - [FAQ](https://jevascript.org/docs/faq.md): Short answers to the questions that come up first. - [Changelog](https://jevascript.org/docs/changelog.md): What changed in each release. The package follows semantic versioning; before 1.0, minor versions may change the public API. ## Optional - [GitHub repository](https://github.com/hakantapanyigit/jevascript): source, examples and issues - [npm package](https://www.npmjs.com/package/jevascript): releases - [Sitemap](https://jevascript.org/sitemap.xml)