@maximem/jev-core
v0.1.1
Published
Typed client and decision policy for TypeSafe Jev. The only module that talks to the Jev API.
Readme
@maximem/jev-core
Typed client and decision policy for TypeSafe Jev. The only module in jev_mcp that talks to the Jev API.
Most people want @maximem/jev-mcp instead
— this package is its engine. Use this directly only if you are embedding Jev decisions in your
own program rather than giving them to an agent over MCP.
import { JevClient, choice, noul, score } from '@maximem/jev-core';
const client = new JevClient(); // reads TYPESAFE_API_KEY from the environment
// All questions travel in ONE request — six questions cost one round trip, not six.
const { answers, model, latencyMs } = await client.ask(
{ ticket: 'I was charged twice and need a refund today.' },
{
intent: choice('What does the customer want?', {
refund: 'Money returned.',
other: 'Anything else.',
}),
urgent: noul('The ticket communicates time pressure.'),
anger: score('How frustrated are they?', ['calm', 'annoyed', 'angry']),
},
);Also provides the threshold policy (including the abstain band, so a probability near 0.5 escalates instead of being treated as a decision), a per-task call budget, and an append-only decision ledger.
MIT
