Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

1.2 KB
Raw Blame
/**
 * Compression eval/benchmark harness (F0.3 — C1 + N4 gate + TV3 replay).
 *
 * API-free, CI-safe primitives to answer "did meaning survive?" (retention) and
 * "did cost/task get worse?" (budget gate), plus a replay path over real
 * transcripts. Engines and the studios consume these to keep compression honest.
 */
export {
  extractEntities,
  computeRetention,
  measureCompression,
  type RetentionScore,
  type CompressionMeasurement,
} from "./measure.ts";

export {
  runCompressionEval,
  type EvalCase,
  type CompressFn,
  type EvalResult,
  type EvalReport,
} from "./runner.ts";

export {
  tokensPerTask,
  checkTokensPerTaskGate,
  type BudgetBaseline,
  type BudgetRegression,
  type BudgetGateResult,
} from "./budgetGate.ts";

export {
  transcriptsToCorpus,
  replayTranscripts,
  requestBodyToTranscript,
  requestBodiesToTranscripts,
  type Transcript,
  type TranscriptTurn,
  type CapturedRequestBody,
} from "./replay.ts";

export {
  BENCHMARK_CORPUS,
  DEFAULT_BENCHMARK_ENGINES,
  engineToCompressFn,
  benchmarkEngines,
  compareReports,
  runBenchmarkGate,
  formatBenchmarkTable,
  type EngineSummaryRow,
  type EngineBenchmarkGateRow,
} from "./benchmark.ts";