omp packages

@techs/pi-decision0.2.0

Jev-backed tool guardrail for pi

GitHub Actions Published 20 days ago MIT ~324 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

@techs/pi-decision

English | 简体中文

A Pi tool_call guardrail extension using Jev as its current judgment provider. Before each tool call, it assesses six risk dimensions: destructive, secretExposure, privacyExposure, externalSideEffect, privilegeEscalation, and scopeViolation. You can disable or customize built-in dimensions and add your own. The risk policy comes from the provider-neutral core, but this Pi extension currently creates the Jev provider directly; using another judgment model requires a new adapter and Pi integration. The agent's main model still generates responses, and Pi's own permission rules continue to apply.

export AI_GATEWAY_API_KEY=your_gateway_key
pi install npm:@techs/pi-decision

The default shadow mode observes asynchronously without blocking tools. Configure credentials for Pi's main model separately. Judgments are written to $XDG_STATE_HOME/dsh-decision/pi-audit.jsonl, or ~/.local/state/dsh-decision/pi-audit.jsonl when XDG state is unset.

Environment variable Default Purpose
AI_GATEWAY_API_KEY None Vercel AI Gateway key; takes priority over JEV_API_KEY
JEV_API_KEY None Fallback key; required for the direct backend
PI_DECISION_JEV_BACKEND vercel vercel for Gateway; direct for api.typesafe.ai
PI_DECISION_ENFORCEMENT shadow shadow observes; enforce applies judgments (experimental)
PI_DECISION_TOOLS All tools Comma-separated exact tool names, such as bash,write
PI_DECISION_ON_FAILURE allow Stance when a judgment request fails: allow, ask, or deny
PI_DECISION_OUTBOUND redact Mask recognizable secret patterns; raw sends unchanged input
PI_DECISION_RISKS None JSON custom risk dimensions, like dsh guardrail.customRisks
PI_DECISION_AUDIT on Set to off to disable audit records
PI_DECISION_AUDIT_PATH XDG state path Audit JSONL path