Context engineering

pi-jev-compaction

@Wang-auspicious1TypeScriptMITupdated 2026-09-18runnable

Jev-powered context compaction for Pi. Keep critical instructions and tool history, prune the noise, and fall back gracefully.

Wang-auspicious/pi-jev-compaction

Where it calls Jev

const response = await fetcher(options.endpoint ?? 'https://api.typesafe.ai/v1/systemone', {

src/client.ts:13

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 test/integration.test.ts:11

  1. qtrue/false

    Keep this exact call and output?

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: {
    q: { type: 'boolean', instructions: 'Keep this exact call and output?' },
  },
});

Other projects in this category