← Back to Plugins
Tools

Jev Harness

AntonioCoppe By AntonioCoppe 👁 94 views ▲ 0 votes

OpenClaw plugin: jev-harness DecisionHarness as System One decide layer (policy/confidence/shadow)

GitHub

Install

npm install
npm

README

# openclaw-jev-harness

**OpenClaw owns the assistant OS. This plugin owns the System One *decide* layer** (policy / confidence / shadow) via [`jev-harness`](https://github.com/AntonioCoppe/jev-harness). Generative work still uses Claude, Codex, or whatever model OpenClaw routes to — Jev only gates and routes *decisions*.

> **Experimental.** OpenClaw plugin APIs are experimental. Pin your OpenClaw host version and re-test on upgrades. Manifest + entry follow [Building plugins](https://docs.openclaw.ai/plugins/building-plugins); if a host field drifts, treat this scaffold as best-effort until validated against that release.

**Not affiliated with TypeSafe or the OpenClaw Foundation.** You need a TypeSafe API key to call Jev.

## One-liner

Confidence-gated DecisionHarness tools + `before_tool_call` hooks for OpenClaw — shell/tool allow-deny, model-cost routing, inbox triage, browser next-action, agent stuck/drift.

## Install

```bash
# From ClawHub (when published) or npm / local path:
openclaw plugins install npm-pack:./openclaw-jev-harness   # after npm pack
# or link during development:
openclaw plugins install --link ./openclaw-jev-harness --force
openclaw plugins enable jev-harness
```

Requires Node 20+ (OpenClaw hosts often want Node 24+). Peer: `openclaw` ≥ `2026.3.24-beta.2`.

### API key

```bash
export TYPESAFE_API_KEY=tsk_...
```

Or set `plugins.entries.jev-harness.config.apiKey` (sensitive; prefer env / secret refs).

## What it exposes

### Agent tools (`contracts.tools`)

| Tool | Recipe id | Decides |
| --- | --- | --- |
| `jev_shell_command_gate` | `shell-command-gate` | `allow` / `deny` / `ask` for a shell command string |
| `jev_tool_call_allowlist` | `tool-call-allowlist` | `allow` / `deny` / `require_confirm` for a tool name + args |
| `jev_model_cost_router` | `model-cost-router` | `cheap` / `mid` / `frontier` |
| `jev_inbox_triage` | `inbox-triage` | `bookings` / `orders` / `support` / `spam` / `other` |
| `jev_browser_next_action` | `browser-next-action` | candidate id or `STOP` (Choice over candidates) |
| `jev_agent_stuck_drift` | `agent-stuck-drift` | `continue` / `nudge` / `recover` / `stop_review` |

### Hooks

| Hook | When | Behavior |
| --- | --- | --- |
| `before_tool_call` (`matcher: ["exec"]`) | `config.gateExec` (default **true**) | Runs `shell-command-gate`; deny → `{ block: true }`; ask/low-confidence → `requireApproval` |
| `before_tool_call` (all tools) | `config.gateTools` (default **false**) | Runs `tool-call-allowlist` against `toolAllowlist` |

In `mode: "shadow"`, hooks observe only (no block / approval) so you can compare intended actions safely.

## Config (`openclaw.plugin.json` / `plugins.entries.jev-harness.config`)

```json5
{
  plugins: {
    entries: {
      "jev-harness": {
        enabled: true,
        config: {
          // apiKey: "tsk_...",          // or TYPESAFE_API_KEY
          mode: "live",                  // or "shadow"
          gateExec: true,
          gateTools: false,
          toolAllowlist: ["web_search", "read"],
          knownSafeCommands: ["ls", "pwd", "git status", "git diff", "git log"],
          defaultUserGoal: "Help the operator without irreversible side effects",
        },
      },
    },
  },
}
```

## Positioning

| Layer | Owner |
| --- | --- |
| Assistant OS (sessions, channels, tools, delivery) | **OpenClaw** |
| Generative reasoning / coding | Claude, Codex, … via OpenClaw providers |
| Fast structured *decide* (choice / score / noul + policy + confidence + shadow) | **This plugin → jev-harness → TypeSafe Jev** |


## Recipe source notes

Most tools call runners from `jev-harness/recipes` (`tool-call-allowlist`, `model-cost-router`, `inbox-triage`, `browser-next-action`).

`shell-command-gate` and `agent-stuck-drift` use local DecisionHarness adapters under `src/recipes/` (same recipe IDs / policies) until those runners ship in a published `jev-harness` release — see TODOs in those files.

## Develop

```bash
npm install
npm run build
openclaw plugins inspect jev-harness --runtime --json   # on a host with OpenClaw
```

Runtime entry: `dist/index.js` (see `package.json` → `openclaw.extensions`). Source uses `definePluginEntry` from `openclaw/plugin-sdk/plugin-entry` and `Type` from `typebox`, per OpenClaw docs.

## License

MIT
tools

Comments

Sign in to leave a comment

Loading comments...