Agent tooling

tenbin

@simota2TypeScriptMITupdated 2026-09-18runnable

MCP server and agent skill for the TypeSafe AI System One API (Jev): decompose a judgment into Choice / Score / Noul questions, lint them, measure on labelled data, and put calibrated thresholds in code

simota/tenbin

Where it calls Jev

if (err instanceof APIConnectionError) return `Could not reach api.typesafe.ai: ${err.message}. Check network access.`;

tenbin/src/client.ts:167

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 skills/tenbin/templates/questions.py:10

  1. categorychoice

    What is this support message about?

    • bug_reportSomething in the product behaves wrongly
    • billingCharges, invoices, refunds, payment methods
    • feature_requestAsks for something the product does not do
    • otherNone of the above
  2. bug_severityscore

    If the message reports a bug, how severe is it?

    • 0Cosmetic or wording issue
    • 1Broken feature, but a workaround exists
    • 2Broken feature with no workaround
    • 3Data loss, security exposure or the product is unusable
  3. has_repro_stepstrue/false

    The message contains steps that would let an engineer reproduce the problem

  4. refund_requestedtrue/false

    The customer asks for money back

  5. frustrationscore

    How frustrated is the customer?

    • 0Calm, states facts
    • 1Frustrated but civil
    • 2Very angry, strong language or threatens to leave
    • 3Abusive or threatening

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: {
    category: { type: 'choice', instructions: 'What is this support message about?',
      criteria: { bug_report: 'Something in the product behaves wrongly', billing: 'Charges, invoices, refunds, payment methods', feature_request: 'Asks for something the product does not do', other: 'None of the above' } },
    bug_severity: { type: 'score', instructions: 'If the message reports a bug, how severe is it?',
      criteria: ['Cosmetic or wording issue', 'Broken feature, but a workaround exists', 'Broken feature with no workaround', 'Data loss, security exposure or the product is unusable'] },
    has_repro_steps: { type: 'boolean', instructions: 'The message contains steps that would let an engineer reproduce the problem' },
    refund_requested: { type: 'boolean', instructions: 'The customer asks for money back' },
    frustration: { type: 'score', instructions: 'How frustrated is the customer?',
      criteria: ['Calm, states facts', 'Frustrated but civil', 'Very angry, strong language or threatens to leave', 'Abusive or threatening'] },
  },
});

from tenbin/src/server.test.ts:90

  1. sevscore

    Rate severity from 0 to 2

    • 00
    • 11
    • 22

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: {
    sev: { type: 'score', instructions: 'Rate severity from 0 to 2',
      criteria: ['0', '1', '2'] },
  },
});

from tenbin/src/server.test.ts:102

  1. departmentchoice

    Which team should handle this?

    • billingPayments
    • technicalBugs
  2. frustrationscore

    How frustrated is the customer?

    • 0Calm, just stating facts
    • 1Frustrated but civil
    • 2Very angry, strong language
  3. is_urgenttrue/false

    Does the message convey urgency?

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: {
    department: { type: 'choice', instructions: 'Which team should handle this?',
      criteria: { billing: 'Payments', technical: 'Bugs' } },
    frustration: { type: 'score', instructions: 'How frustrated is the customer?',
      criteria: ['Calm, just stating facts', 'Frustrated but civil', 'Very angry, strong language'] },
    is_urgent: { type: 'boolean', instructions: 'Does the message convey urgency?' },
  },
});

from tenbin/src/server.test.ts:132

  1. is_urgenttrue/false

    Does the message convey urgency?

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: {
    is_urgent: { type: 'boolean', instructions: 'Does the message convey urgency?' },
  },
});

Other projects in this category