jevascript
esc

    Type to search · ↑↓ to move · ↵ to open

    Get started

    Scenarios

    Scenarios

    Six complete, runnable examples. Each one is a real decision, the questions behind it, and the plain code that acts on the answers.

    Every scenario uses the same fictional company, Northwind, a B2B payments API, and the same pattern: declare the questions, ask them in one request, decide in code. The source for each lives in the examples directory of the library repository and runs with a key and one command.

    Running them#

    git clone https://github.com/hakantapanyigit/jevascript
    cd jevascript && npm install
    echo 'JEV_API_KEY=apikey_...' > .env
    npm run example examples/launch/01-ticket-triage.ts

    Each script prints the values it measured and the decision it reached, then the token count and cost of the run.

    What they have in common#

    • Propositions, not labels. Every describe, condition and criterion is a claim that can be true of the input.
    • One request per item. Schemas and batch() keep everything about one input in one call.
    • Facts stay in code. Plan, price, amount, role: compared with === and >, never asked.
    • The model's suggestion is one input. Where a schema includes an action field, the code still applies hard policy on top of it.