Calibrated-probability decision provider for aux4/decision, backed by the jev / TypeSafe System One decision provider. This package adds nothing to the command line by itself — it plugs into aux4/decision's existing decision ask and decision run commands via --provider jev.
Install aux4/decision alone for a free, offline, no-key choice classifier (the built-in bm25 provider). Install this package too when you need calibrated probabilities, or the noul/score question types, which bm25 cannot answer.
aux4 aux4 pkger install aux4/decision-jev
This pulls in aux4/decision as a dependency if it isn't already installed. The command surface doesn't change — you keep using decision ask / decision run, now with --provider jev available.
aux4 decision ask "Is this urgent?" --type noul --provider jev \
--state "The house is on fire" \
--model <your-typesafe-model-id>
0.9500
The same question can be run against several samples by repeating --state; answers print one per line in input order. If --state is omitted, stdin supplies one sample.
aux4 decision ask "Is this message spam?" --type choice --provider jev --model <model-id> \
--options spam --options not-spam \
--state "Buy now, limited offer" \
--state "Can we move our meeting to 2?"
jev supports all three of aux4/decision's question types:
choice — pick one label out of a candidate list. Returns the chosen label; the full response alsocarries a probability for every label, so one call reranks an entire candidate list.
noul — a single yes/no probability. Returns a bare probability, not a boolean — there is notrue/false field. Use --threshold to turn it into a guard.
score — pick a point on an ordered rubric (minimum 2 levels). Returns a weighted score across therubric, plus a probability per level.
Every response from this provider declares "provider": "jev" and "scale": "probability" — a calibrated number, comparable across calls and across labels. --threshold is accepted because of this: gating a pipeline on --threshold 0.8 is a real check against a calibrated probability. Compare with aux4/decision's built-in bm25, whose "scale": "relative" numbers are not comparable to a fixed threshold at all — see the aux4/decision README for that distinction.
noul as a guardnoul returns a bare probability of "yes" — never a boolean. --threshold (default 0.5) is what turns it into an exit-code guard: the command exits 0 when the probability is at or above the threshold, 1 when below it. Always set the threshold explicitly for anything that gates a pipeline step; never assume the default silently matches your use case.
aux4 decision ask "Is this a security issue?" --provider jev \
--state "$(cat report.txt)" \
--model <your-typesafe-model-id> \
--threshold 0.7 \
&& aux4 notify-security-team || echo "not a security issue"
decision run with jevConfiguration file. state may be one string or an array of samples; aux4/config supplies those values to decision run in the same way as repeated --state flags.
config:
triage:
provider: jev
model: <your-typesafe-model-id> # required
state: "The house is on fire"
questions:
urgent:
type: noul
instructions: Is this urgent?
category:
type: choice
instructions: Which category best fits this ticket?
options:
bug: a defect report
feature: a feature request
question: a question, not an issue
severity:
type: score
instructions: How severe is this issue?
levels:
- low
- medium
- high
aux4 decision run --config triage
With multiple states, run returns an ordered results array. Each entry includes a one-based sample index and the normal provider response. When no state is configured or passed, stdin is used as one sample.
{
"provider": "jev",
"scale": "probability",
"model": "<your-typesafe-model-id>",
"answers": {
"urgent": {
"type": "noul",
"noul": 0.62
},
"category": {
"type": "choice",
"choice": "bug",
"confidence": 0.7,
"scores": {
"bug": 0.7,
"feature": 0.3,
"question": 0.0
}
},
"severity": {
"type": "score",
"score": 1.1,
"scores": {
"0": 0.2,
"1": 0.5,
"2": 0.3
}
}
},
"usage": {
"input_tokens": 55,
"output_tokens": 0
}
}
--top N limits each choice answer's scores map to its top N labels, same as bm25.
decision rank with jevaux4/decision's decision rank <question> (0.3.0+) finds the blocks of text that answer a question. With --provider jev, core splits and filters the input, then this plugin asks jev one calibrated yes/no question per block ("does this block directly answer the question?") plus one for the whole input:
aux4 decision rank "What is the price of this book?" --provider jev --top 3 < product.md
{
"provider": "jev",
"scale": "probability",
"model": "jev-1.13.0",
"question": "What is the price of this book?",
"answered": 0.98,
"blocks": [
{
"id": "b6",
"score": 0.96,
"text": "£22.65",
"heading": "The Requiem Red",
"offset": 1109
},
{
"id": "b20",
"score": 0.93,
"text": "Price (excl. tax)£22.65",
"heading": "The Requiem Red > Product Information",
"offset": 2984
},
{
"id": "b21",
"score": 0.88,
"text": "Price (incl. tax)£22.65",
"heading": "The Requiem Red > Product Information",
"offset": 3071
}
],
"candidates": 65,
"skipped": 0,
"windows": 1,
"usage": {
"input_tokens": 5069,
"output_tokens": 1180
}
}
score is the probability that the block answers the question; answered is the probability that anyblock does — a low value means the page doesn't contain the answer.
--threshold 0.5 returns only blocks at or above 0.5.and merged by score (probabilities are comparable across requests). windows reports how many were sent.
--maxBlockChars (default 1500) in the request; the returned text isalways the full original.
--model defaults to jev-latest for rank.Reads the API key from the TYPESAFE_API_KEY environment variable (bound automatically, including through a secret:// reference) — export it once and every --provider jev call picks it up, without needing an explicit --apiKey flag. Nothing is ever logged or echoed. If the key is missing, both commands fail immediately with a clear error naming the variable, before making any network call.
Note: the resolved key is passed to the underlying provider process as a regular command-line flag (single-quote-escaped, the same as every other aux4/decision flag), not injected into the environment via a hand-built shell prefix — that pattern is an injection sink when a key contains a single quote. This means the key is visible in local process listings (ps) for the brief duration of the call, same as any other aux4-managed credential flag; it is never written to shell history, logs, or disk by this package.
Instead of a TypeSafe key, every command can go through the aux4 inference broker, which holds the vendor key and meters the call: set AUX4_INFERENCE_BROKER_URL (or pass --brokerUrl) and the call is sent to <brokerUrl>/v1/models/<model>/systemone with the aux4 token from AUX4_ACCESS_TOKEN (or --brokerToken). On aux4 Cloud machines both are set for you, so no TypeSafe key ever lives on the machine. When a broker URL is set it always wins over TYPESAFE_API_KEY; a missing token is a clear error before any network call.
model is required for decision ask and decision run — there is no hardcoded default (decision rank defaults to jev-latest). Pass --model directly, or set model in the config.yaml section used with decision run --config <section>.
TYPESAFE_API_KEY — the jev / TypeSafe API key. Required unless the broker is used.AUX4_INFERENCE_BROKER_URL — aux4 inference broker URL; when set, calls go through the broker.AUX4_ACCESS_TOKEN — aux4 token sent to the broker.