Scan your whole stack
From OX Research Newsroom
Are you using pi-typesafe?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.17.0
pi-typesafe was last scanned on 28 Nov 2026 at version 0.17.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.17.0 LATEST | 28 Nov 2026 | No rules fired |
| 0.16.0 | 27 Nov 2026 | No rules fired |
| 0.15.1 | 21 Nov 2026 | No rules fired |
| 0.14.0 | 3 Nov 2026 | Not shown |
| 0.13.2 | 3 Nov 2026 | Not shown |
Findings for v0.17.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.17.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Jev inside Pi. Jev is TypeSafe's judgment model: send it some state and typed questions and it returns probabilities instead of prose, in well under a second, for a fraction of a cent. This package gives Pi three things built on it:
typesafe_evaluate hands small structured judgments (classify, triage, compare, score) to Jev and returns calibrated numbers in one batched call./typesafe test and /typesafe playground run requests from the terminal without touching the model's context.
Independent project. Not affiliated with TypeSafe AI or the Pi authors.
pi install npm:pi-typesafe
Then, inside Pi:
/typesafe login and paste a key from console.typesafe.ai. Input is hidden; the key is verified against the API and saved to ~/.pi/agent/pi-typesafe/auth.json with owner-only permissions. /typesafe login <backend> does the same for OpenRouter, Command Code, Liquid AI, SubQ, Nace.AI, or an endpoint you name, keeping each key under its own name in the same store./typesafe test sends one built-in sample request and shows the answers./typesafe enable lets the agent call the tool for this session, after you confirm the data notice.Requires Pi 0.85 or newer and Node.js 22.19 or newer. It runs under Bun as well, where Pi ships: there the judge transport replays each response body, because Bun 1.4.4 marks a body used once a reader on it is released. Usage is billed to your TypeSafe account. For CI or scripts set TYPESAFE_API_KEY in the environment instead; it takes precedence over the stored key. Do not paste the key into chat, command arguments, or project files.
Jev answers three kinds of question about the state you send. Every question in a request runs in parallel and in isolation, so adding questions barely changes the latency.
| Type | Asks | Returns |
|---|---|---|
| Choice | Which of these options fits? | the chosen key, a probability per option, confidence |
| Score | Where on this ordered rubric does it sit? | a position (may be fractional), probabilities, confidence |
| Noul | Is this statement true? | a probability from 0 to 1 |
{
"state": { "message": "I was charged twice. Please help today." },
"questions": {
"team": { "type": "choice", "instructions": "Which team should handle this?",
"criteria": { "billing": "Charges and payments", "technical": "Software failures", "other": "None of these" } },
"urgent": { "type": "noul", "instructions": "Does the sender request help today?" },
"frustration": { "type": "score", "instructions": "How frustrated does the sender sound?",
"criteria": ["Neutral request", "Frustrated but civil", "Explicit anger or threats"] }
}
}
Read probabilities and confidence alongside the answer. Confidence describes how concentrated the distribution is; it is not proof of correctness or permission to act.
typesafe_evaluate is registered at startup but disabled until you run /typesafe enable in the session. For automated or headless runs, set PI_TYPESAFE_ENABLED=1 explicitly.
The tool accepts JSON state plus 1 to 32 questions and returns answers, model, token usage, and elapsed time. Good uses: triaging a list of issues in one call, deciding which of several files a change belongs to, checking whether a reply answers the question that was asked, scoring candidates against a rubric you wrote. Bad uses: anything that needs reasoning across steps, or a single question that mixes several judgments.
The question text is the whole program. Jev answers exactly what is asked, so ambiguity shows up as a middling probability rather than an error.
P(yes) = 0.36 for Is the bug reproducible from the text? because that can also mean "could a reader reproduce it using only this text?". Does the reporter state that the problem occurs consistently? is the intended question."Workaround exists" is checkable; "medium" is not.other, unclear) when nothing may fit; the model cannot pick an option you omitted.`report.body`) when the state has several parts.The TypeSafe docs cover each primitive in detail.
An enabled extension with no usable key looks exactly like a working one — one evaluation ran keyless for hours before anyone noticed. Three answers exist now, and /typesafe status prints all of them:
authState() reports the key source, whether it has been accepted, and the last failure that degraded it; describeAuth() turns that into a level and one safe line. The extension calls both at session start, so a headless run says judgments will fail instead of quietly falling back to its offline path. Only an HTTP 401 rejects the key, and even that stops vetoing it after fifteen minutes; a 403 refuses one request — permissions, a guardrail block, moderation, or a provider cap — and is shown without ever making the key unusable. Every message names the backend that answered.getSpend() returns session counters, today's persisted counters, and the cap currently reached. Cost is estimated from input tokens only, because output is free, except on OpenRouter, which reports what each request was billed and is recorded at that; a count the API did not report counts as nothing.maxRequests bounds a client instance. Three caps bound a local day, survive restarts, and stop a request before it is submitted:| Option | Environment | Bounds |
|---|---|---|
maxRequestsPerDay |
PI_TYPESAFE_MAX_REQUESTS_PER_DAY |
requests |
maxInputTokensPerDay |
PI_TYPESAFE_MAX_INPUT_TOKENS_PER_DAY |
input tokens |
maxUsdPerDay |
PI_TYPESAFE_MAX_USD_PER_DAY |
reported or estimated spend |
The environment may lower an explicit cap but never raise it. A reached cap raises a budget error naming the cap, the amount used, and the day.
Need more than one request? evaluateAll(request) asks any number of questions about one state (over the backend's limit, 32 or 16 on SubQ, are chunked and fanned out), and evaluateMany(requests) runs several requests at once. Both preserve order, bound concurrency, never throw, and stop submitting once the budget is gone. pi-typesafe/calibrate turns labelled cases into thresholds with AUC, a sweep, and a replay runner.
| Command | Effect |
|---|---|
/typesafe login [backend] |
Enter and verify a backend's API key (hidden input), then store it under that backend; no argument means the session's backend. Refuses while that backend's environment variable is set, because the variable wins |
/typesafe logout [backend] |
Delete that backend's stored key, and turn judgments off when it was the session's backend; no argument means the session's backend |
/typesafe setup |
Check which key is in use; starts login if none |
/typesafe status |
Opt-in state, key state, session and today's counters, cost estimate, any reached cap |
/typesafe enable |
Confirm the data notice and allow agent tool calls this session |
/typesafe disable |
Stop future agent tool calls |
/typesafe test |
Send one built-in sample request |
/typesafe playground |
Edit request JSON in Pi's editor, confirm, view results |
/typesafe model status |
Show local Warden-S1 runtime, cache directory, verification state, and shared daemon status |
/typesafe model download |
Download and SHA-256-verify local Warden-S1 weights (MLX on Apple Silicon, ONNX elsewhere) into ~/.cache/pi-warden/ |
/typesafe help |
Show command usage |
Playground and test results are shown in the terminal only; they do not enter the model's context.
Do I need a key to install?
Install works without one; nothing is sent until you log in and enable the tool. Keys for TypeSafe cloud come from console.typesafe.ai. To run offline with no API key and $0 spend, run /typesafe model download and launch Pi with PI_TYPESAFE_BACKEND=warden-s1.
What does a request cost?
Whatever TypeSafe bills for the input tokens of your state and questions; output is free. At the listed rate ($42 per billion input tokens at the time of writing) a few hundred tokens cost well under a hundredth of a cent. The per-session cap is 20 attempts, and maxUsdPerDay stops a long run at a number you choose.
Why not just ask the main model? The main model can answer any of these questions in prose. It is slower, costs more per call, and grades its own work. Jev returns a calibrated number your code or the agent can branch on, in a quarter of a second, from a separate model. That matters most when the same question is asked many times: every tool call, every file, every issue in a list.
What is sent?
Only the state and questions you (or the agent, once enabled) submit, to the backend that serves the session: https://api.typesafe.ai by default, otherwise the host PI_TYPESAFE_BACKEND names, which /typesafe status reports. No files, conversation history, or telemetry. Error messages never include upstream response bodies, headers, keys, or your submitted state.
Limits?
Per request: 32 questions (16 on SubQ) and 64 KiB of JSON on cloud backends, or 2 MiB (LOCAL_MAX_INPUT_BYTES) for 128K-context evaluations on warden-s1. Per session: 20 attempts, 15-second timeout (30 seconds on warden-s1), no automatic retries. Per day: no cap unless you set one. Session limits reset when a session starts or reloads; daily counters live in ~/.pi/agent/pi-typesafe/usage.json and roll over at local midnight. The SDK's TYPESAFE_BASE_URL and TYPESAFE_LOG_LEVEL overrides are ignored.
Import the library from your own extension. It has no dependency on Pi and is safe in tests.
TypeBox is a required wildcard peer: Pi supplies it for managed extension installs; ordinary npm installs resolve it automatically. If your package manager does not install peers, install typebox alongside pi-typesafe for standalone use.
import { ask, createTypeSafe, choice, noul, score } from "pi-typesafe";
const typesafe = createTypeSafe({ maxRequests: 5, maxUsdPerDay: 1 }); // key: TYPESAFE_API_KEY, else the login store
const answer = await ask(typesafe, {
state: { title: "Login fails after update", body: "..." },
questions: {
area: choice("Which area does this report concern?", { auth: "Sign-in", ui: "Layout", other: null }),
duplicate: noul("Does the report describe the same defect as `known_issue`?"),
severity: score("How severe is the defect?", ["Cosmetic", "Workaround exists", "Blocking"]),
},
}, { timeoutMs: 5_000 });
if (!answer.ok) return { skipped: answer.errorCode === "budget" }; // never throws
Your extension owns its own user consent and budget; /typesafe enable applies only to this package's tool. Check authState() rather than your own consent flag before you report that judgments are on.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.