Skip to main content

Core classes

jes has a small surface. You build one guard, run checks with it, and read the result. A few other classes shape what a check does or carry state between checks. This section explains each one: its job, how to think about it, and how you use it. For exact signatures, see the API reference.

How they fit together​

  • You build a Guard once, from a list of policies, a backend (the decision model, Jev by default), and optional Limits.
  • Each judgment policy asks the model one or more questions, and its threshold turns the answer into a flag or a block.
  • Every check returns a Result. Branch on result.ok, and forward result.onward.
  • Across a conversation, a Redactions store remembers the values jes hid, and history lets judgments see earlier turns.
  • Tests swap the real model for a FakeBackend. Mistakes in your setup raise an error from the JesError family. Problems with the checked text, such as text that is too long, block the check instead.

The classes​