Skip to content
System One

DevMortimer/pi-typesafe

Pi extension that gives the agent and other extensions one key-managed TypeSafe client. A batched typesafe_evaluate tool hands classify, triage, compare and score judgments to Jev in a single call, and a terminal playground runs requests without touching the model's context.

Pi triaging three bug reports with one batched TypeSafe call: the prompt, the rendered TypeSafe answers, and the agent's verdict
Image from github.com

DevMortimer/pi-typesafe on GitHub

Stars
45
Forks
7
Language
TypeScript
License
MIT
Last push
24 Sep 2026

Read from GitHub on . Counts change daily.

How it uses Jev

  const result = await client.systemOne(request, callOptions);
  if (!validResult(result, request.questions)) throw new TypeSafeIntegrationError("response", "TypeSafe returned an unexpected answer or usage format.");
  usage.requestsSucceeded += 1;
  usage.inputTokens += result.usage.input_tokens;
  usage.outputTokens += result.usage.output_tokens;
  ledger.recordSuccess(result.usage.input_tokens, result.usage.output_tokens);
  if (!verificationRecorded) {
    verificationRecorded = true;
    recordAuthVerified();
  }
  return { ...result, elapsedMs: Math.round(performance.now() - start) };
} catch (error) {
  const safe = safeError(error, backend);
  // The request was submitted, so it counts even when it fails; the reason stays visible in `authState()`.
  usage.requestsFailed += 1;

View in src/client.ts

Open on GitHub

More like this

Keep browsing