# Introduction

> 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.

Section: Getting started · HTML: https://jevascript.org/docs · Markdown: https://jevascript.org/docs/index.md

```ts
// triage.ts
import { semantic } from "jevascript"

const urgency = await semantic(ticket)
  .score("A human needs to act on this urgently.")

if (urgency > 80) {
  pageOnCall()
}
```

The model supplies the judgement. Your code decides the consequence.

## What it is

Ordinary code can test what a value *contains*: `ticket.plan === "enterprise"`, `amount > 1000`. It cannot test what a value *means*: whether a ticket is urgent, whether a comment is passive-aggressive, whether two bug reports describe the same bug.

jevascript makes those judgements values too. Three primitives cover every shape a judgement can take:

| Primitive | Returns | Ask it for |
|---|---|---|
| `is(proposition)` | `boolean` | Whether a claim holds |
| `score(criterion)` | `number` | How strongly a claim holds, on a range you choose |
| `choose(options)` | one of the options | Which of a fixed set fits best |

They are backed by a **decision model**: a model that scores propositions and returns calibrated probabilities. It generates no text, so there is no prompt to hijack and nothing to parse. Every question created in the same synchronous turn travels in **one request**, so seven questions cost about as much as one.

## Where to start

- [Installation](https://jevascript.org/docs/installation): Requirements, package managers, the API key.
- [Quick start](https://jevascript.org/docs/quick-start): From an empty file to a decision in five steps.
- [Primitives](https://jevascript.org/docs/primitives): Everything `is`, `score` and `choose` can do.
- [Batching](https://jevascript.org/docs/batching): Why one request is the default and how to keep it that way.
- [Testing](https://jevascript.org/docs/testing): Run your logic without a model or a key.
- [API reference](https://jevascript.org/docs/api): Every export, with its signature.

## What it is not

- **Not an LLM SDK.** There is no completion, no chat, no streaming. The provider returns probabilities, not prose.
- **Not an agent framework.** Nothing plans or loops. You write the `if`.
- **Not a security boundary.** Authentication, authorisation and exact validation stay deterministic. See [Not a security boundary](https://jevascript.org/docs/not-a-security-boundary).
- **Not a calculator.** Counting, arithmetic and date comparison stay in code. A decision model reads numbers as text.

## Status

Version `0.1.x`. The public API may change before 1.0; every change is listed in the [changelog](https://jevascript.org/docs/changelog). The package has no runtime dependencies and needs Node 22.6 or newer.
