Guardrails & review

mastra-jev-moderation

@CodeAlive-AI2TypeScriptMITupdated 2026-09-18runnable

Input moderation for Mastra agents on TypeSafe Jev — one file

CodeAlive-AI/mastra-jev-moderation

Where it calls Jev

export const JEV_ENDPOINT = "https://api.typesafe.ai/v1/systemone";

jev-moderation.ts:33

The link points at the commit we read, so the line number still holds.

What it asks Jev

These question sets are lifted from this project's source exactly as written.

from jev-moderation.ts:164

  1. blockingtrue/false

    ${context}`message` is what a user typed to the assistant. Must `message` be blocked before it reaches the assistant?

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    blocking: { type: 'boolean', instructions: '${context}`message` is what a user typed to the assistant. Must `message` be blocked before it reaches the assistant?' },
  },
});

Other projects in this category