← Catalog

@pikibun/pi-prompt-audit

A Pi extension that has a model check each message before it reaches the agent, and refuses ones that reach for the machine's credentials, files, environment or network.

Extension

Install

Install with PiG

pig install npm:@pikibun/pi-prompt-audit

Install with Pi

pi install npm:@pikibun/pi-prompt-audit
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.0 (README.md). PiG does not review it.

Prompt audit, a Pi extension

Has a model check each message before it reaches the agent, and refuses one that tries to get the agent to reveal or misuse what lies on the machine: its credentials and API keys, its owner's files outside the work, its environment and network, or to send its data elsewhere. A message it can't check (no model, a provider error, a timeout) is refused too.

It is an ordinary Pi package: it handles Pi's input event and imports nothing but Pi's own packages and Node's, so it runs in Pi as it does in Pikibun.

In Pi

pi install npm:@pikibun/pi-prompt-audit   # from npm
pi install ./extensions/prompt-audit      # from a clone of this repository
pi -e ./extensions/prompt-audit           # or for one run only

Its settings are Pi flags:

FlagDefaultWhat it does
auditothersothers audits messages that don't come from the person at the terminal (RPC clients, other extensions); all audits every message
audit-modelthe session'sThe auditor's model, as provider/modelId (--audit-model: Pi's own --model sets the agent's model)
modelthe session'sThe same, as Pikibun's host settings name it; audit-model comes first
policynoneThe owner's own rules, in words, added to the auditor's instructions

In Pikibun

Every connector has it built in as piki:prompt-audit, at the connector's version: a host's owner requires it of every session on their host (Host → Extensions), and every workspace has it, turned off, among its extensions, for its owners and admins to turn on for its own sessions. There it audits every message but the host owner's own. See the design.

A host can also run this directory as a dev extension instead (pikibun extensions add ./extensions/prompt-audit), to try a change before it ships with the connector.