Small, typed decisions for your coding agent. One classifier tool for Choice, Noul and Score — powered by TypeSafe Jev or your own compatible HTTP service.
Pick a label, estimate a yes/no probability, or score against a rubric. Batch questions over shared text and keep the full probability distribution. No chat model, no generated explanations.
Requires Bun and Oh My Pi 18.1.17+.
Clone the repository and install the extension:
git clone https://github.com/SilentBless/omp-classifier.git
cd omp-classifier
bun install --frozen-lockfile
omp install .Restart OMP. The extension is now linked for use across projects. Keep the downloaded directory in place: moving or deleting it breaks the link. To update, pull the latest code, run bun install --frozen-lockfile, and restart OMP.
Want to try it without installing? Run omp -e . from this directory instead. From another directory, use omp -e /absolute/path/to/omp-classifier with the actual location of your copy.
Inside OMP:
/login typesafe
Login validates your key and saves it in OMP's credential storage. Alternatively, set TYPESAFE_API_KEY before starting OMP. The default model is jev-latest; set CLASSIFIER_MODEL to choose another version (TYPESAFE_DEFAULT_MODEL is also supported for TypeSafe).
Set these in the shell that launches OMP:
export CLASSIFIER_BASE_URL="http://127.0.0.1:8000"
export CLASSIFIER_API_KEY="your-server-key"
export CLASSIFIER_MODEL="your-model"
ompThe URL is an API root, not the full endpoint: requests go to POST /v1/systemone beneath it, with Authorization: Bearer <key>. Use HTTPS for remote servers. A custom endpoint requires its own key; it never inherits your saved TypeSafe key or TYPESAFE_API_KEY. /login typesafe always authenticates with TypeSafe, not your server.
The service must implement the System One request and response contract: typed answers, the actual model, and usage.input_tokens / usage.output_tokens. This is not an OpenAI chat-completions client. Partial or incompatible responses are rejected, not filled with invented values.
🌱 Looking for an open-source model? Laya supports Choice, Noul and Score with local inference. Its Python API needs an HTTP wrapper implementing the contract above; this extension does not bundle a Laya server or claim direct HTTP compatibility.
Ask your agent to use classifier; format guidance is loaded automatically. For example:
Use classifier to route this support request and check whether it asks for immediate action: “Please refund my payment today.”
The tool's input looks like this:
choice route: Which team should handle this request?
- billing: Payments and refunds
- technical: Software defects
- other: None of these
noul urgent: Is immediate action explicitly requested?
score tone: How frustrated is the author?
- Calm
- Frustrated
- Very angry
---
Please refund my payment today.
Supporting OpenAI/Codex models use a grammar-constrained freeform call. Other providers send the same text in a JSON input string. Results preserve every probability, available confidence, model name and token usage. Classifier is a tool, so it does not appear in /model.
Only the supplied questions and text are sent to the configured service. The extension does not collect files or session history automatically. Treat classifications as estimates, not permission to act; quality and limits depend on the backend.
bun install --frozen-lockfile
bun run checkCI runs the same formatter, type checks and tests. Distribution is through GitHub; npm publishing is disabled.
MIT · Adapted TypeSafe guidance, credited in THIRD_PARTY_NOTICES.