API reference
Factory names in jes.policies and jes.recipes are stable, and so is the
text of every question id: a wording change gets a new question id.
| Module | What it holds | Page |
|---|---|---|
jes | Guard, AsyncGuard, Limits, Redactions, Result, the question types, the result types, and the errors | Guard, Results, Redactions, Errors |
jes.guard | Guard, AsyncGuard, and History | Guard |
jes.limits | Limits | Limits |
jes.result | Result, refusal, and finding_name | Results |
jes.policies | Core policy factories, judge, and the policy protocols | Policies |
jes.questions | YesNo, Choice, Score, their answers, and Threshold | Questions |
jes.backend | TypeSafe, ModelSpec, resolve_model, Request, Reply, and the backend protocols | jes.backend |
jes.recipes | Recipes: pre-made policy factories that haven't been evaluated yet | Recipes |
jes.testing | FakeBackend and Rule, for tests | Testing |
jes.types, jes.errors, jes.redactions | The result types, type aliases, exceptions, and TOKEN_RE. jes re-exports most of them. | Results, Errors, Redactions |
jes.__version__ is the installed version string, for example "0.0.1".
Conventions
- Every judgment factory requires
threshold=, as afloator aThreshold. jes ships no default thresholds. stagesdefaults differ per policy. Each stage is one of"input","untrusted","tool_call","tool_result", or"output". Transforms andjudge()takestages=. The built-in judgments andallowed_toolshave fixed stages.name=must be unique within a guard and match[A-Za-z][A-Za-z0-9_-]{0,63}.model=on a policy overrides the guard's model for that policy only. It takes aModelSpec: a TypeSafe model id such as"jev-latest", a classifier, or a backend.