Demo app for a video about Jev, TypeSafe's "System One" decision model. Each page is one segment of the script in idea.md: intent search, small typing interactions, a model picker, response depth, json-render, and Twitch chat moderation.
Jev decides, code does. Jev answers Choice, Score and Noul (yes/no) questions through the AI SDK's experimental_evaluate. App code decides what the UI does with the probabilities: apply when confident, suggest when unsure, do nothing when low.
bun install
cp .env.example .env.local # add a key, or skip to use the offline keyword fallback
bun run dev # http://localhost:3000Keys (any one works, checked in this order):
TYPESAFE_AI_API_KEY: direct TypeSafe APIOPENROUTER_API_KEY: Jev via OpenRouter (typesafe/jev-1.13); also streams the LLM answer in the response-depth demoAI_GATEWAY_API_KEY: Jev via the Vercel AI Gateway
With no key, every demo runs on a keyword fallback so the app still works offline. The header shows which source answered and the real round-trip time. The Probabilities switch shows or hides the numbers.
lib/jev/use-cases.ts: the questions for each demo, built on the server, plus the offline fallbacklib/jev/server.ts: picks the model and callsexperimental_evaluate(the API key never leaves the server)lib/jev/tiers.ts,hooks/use-calm.ts: confidence tiers and the "calm UI" hysteresiscomponents/demos/*: one component per demo, built with shadcn/ui