README.md

September 20, 2026 · View on GitHub

omapi — oma on π

omapi-overlay — a Nix flake overlay: stock omp, thin omapi wrap, skills input, optional Jev gates.

CI MIT license Nix TypeScript Node omp v18.2.6 pin

What it is · Quick start · Packages · Jev · Skills · Platforms · Status · Contributing

Wraps oh-my-pi (omp), itself a fork of Pi by @mariozechner.


This flake overlays stock omp with a thin omapi command, a skills flake input, and optional Jev gates for cursor-agent. Humans and widgets call omapi. There is no omp source tree in this repository.

What it is

This overlay
Command you callomapi
EngineStock omp — host omp / $OMP_BIN, or the documented release pin
SkillsFlake inputs.skills only
JevOptional jev-router + cursor-agent-jev (shadow by default)
Consume viaoverlays.default, homeManagerModules.default, or packages.<system>.*

What it is not

ClaimReality
An omp source forkNo omp sources here. Features come from upstream omp.
A rebuilt ompThe wrap is omapi. Install omp from omp.sh or use omapi-pinned.
A skills product repoSkills are a flake input. This tree ships a bootstrap stub only.
A Jev lab or key storeThe router is Choice-only. Keys stay in the process environment.

Quick start

From a clone:

nix build .#omapi
nix build .#jev-router
nix build .#cursor-agent-jev

Default omapi wraps a host omp (or $OMP_BIN). If neither is present, it exits 127 and tells you so.

To put the pinned upstream binary in the Nix store (~180–240 MB):

nix build .#omapi-pinned

Flake input (Home Manager)

{
  inputs.omapi-overlay.url = "github:VirtualMachinist/omapi-overlay";
}

{
  nixpkgs.overlays = [ inputs.omapi-overlay.overlays.default ];
  home-manager.users.you = {
    imports = [ inputs.omapi-overlay.homeManagerModules.default ];
    programs.omapi.enable = true;
  };
}

programs.omapi.enable installs omapi and, by default, jev-router and cursor-agent-jev. It also symlinks the skills input to ~/.config/omp/agent/skills.

Packages

PackageWhat it is
omapiThin wrap of host omp / $OMP_BIN. Fail-closed if neither exists.
omapi-pinnedSame wrap, targeting a fetchurl pin of oh-my-pi v18.2.6. Not omp source.
jev-routerNode router: asks Typesafe Choice, prints a JSON verdict. Loop-stop (continue / stop / escalate) plus jev-router --check for a shadow diff check.
cursor-agent-jevRuns jev-router, then execs cursor-agent (cursor-agent must already be on PATH). Shadow never blocks; active honors continue/auto only.

Jev

Jev is a shadow-first decision gate in front of cursor-agent. Shadow logs a Choice and never blocks. TYPESAFE_API_KEY is runtime-only — set it in the process environment; the flake does not bake it.

# TYPESAFE_API_KEY must already be in the environment
JEV_MODE=shadow cursor-agent-jev "<intent>" -- <cursor-agent args>
VariableRole
JEV_MODE=shadowDefault. Log the Choice; always run cursor-agent.
JEV_MODE=activeHonor continue / gate: auto only. stop / escalate exit 2 (no exec).
JEV_BYPASS=1Kill switch: skip the router and run cursor-agent.
JEV_ROUTEROverride the router binary.
JEV_STEP_DIGESTOptional step / trajectory digest for the loop-stop Choice.
TYPESAFE_API_KEYRuntime only. @typesafe-ai/sdk reads it.

Missing key: shadow continues unclassified; active fail-closes (escalate / hold).

Loop-stop Choice is {continue, stop, escalate} over intent + optional digest. Thresholds: omapi-loop-stop-policy@1 (conf ≥ 0.6, p ≥ 0.55, margin ≥ 0.15). choice: escalate + gate: hold is HITL — not auto-retry. How to run: docs/SPIKE-loop-stop.md.

Shadow check

jev-router --check reads git-diff evidence, applies an available-gate, asks a Choice, then applies code thresholds. The result is findings, parked, and notChecked. Empty findings are not approval.

JEV_MODE=shadow jev-router --check --intent "<task>"
# or: --diff-file packages/jev-router/testdata/skip-marker.diff

Skill: skills-stub/check. How to run: docs/SPIKE-stanley.md.

Skills

Skills are a flake input — the sole source of truth. This repo ships skills-stub so the input is a valid omp skills tree (*/SKILL.md) on day one. The stub includes bootstrap and a shadow check skill (jev-router --check). Home Manager only symlinks that store path to ~/.config/omp/agent/skills. When you have a real skills repo, change inputs.skills.url and the lock; do not copy a second skills/ tree into this overlay.

Platforms

Declared systems: aarch64-darwin, x86_64-darwin, aarch64-linux, x86_64-linux.

Systemomp pin (v18.2.6)Availability
aarch64-darwinomp-darwin-arm64Pin present. No hosted runner in this workflow.
x86_64-darwinomp-darwin-x64Pin present. Evaluated against nixpkgs-26.05-darwin (nixpkgs 26.11 dropped Intel macOS). No hosted runner in this workflow.
aarch64-linuxomp-linux-arm64Pin present. No hosted runner in this workflow.
x86_64-linuxomp-linux-x64Pin present. GitHub Actions evaluates all four systems and builds overlay packages here.

If a future omp release drops a slice, packages/omp-pin.nix throws for that system. A skipped CI row is a skip with a reason, not a pretend build.

nix flake check and nix build .#omapi .#jev-router .#cursor-agent-jev do not download the pin. nix build .#omapi-pinned does.

Status

  • Overlay packages evaluate on all four declared systems.
  • CI on this repo runs the x86_64-linux job; the other three matrix rows skip (no matching hosted runner).
  • omapi-pinned is opt-in (180–240 MB fetchurl).
  • Jev defaults to shadow. jev-router --check is the shadow diff check; empty findings are not approval. Loop-stop is shadow-first; active stop/escalate do not exec.
  • Skills ship as skills-stub until you swap the input URL.

Contributing

Issues and pull requests are welcome. Match CI from a clone:

nix flake check -L
nix build -L .#omapi .#jev-router .#cursor-agent-jev

Do not commit secrets. TYPESAFE_API_KEY and other keys belong in the process environment, not the flake.

Credits and license

MIT. This overlay wraps stock oh-my-pi (omp). omp is a fork of Pi by Mario Zechner.