@each1024/pi-jev-reply

Clearer Pi replies with Jev review, optional rewrite/visuals, and on-demand bilingual settings.

Packages

Package details

extension

Install @each1024/pi-jev-reply from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@each1024/pi-jev-reply
Package
@each1024/pi-jev-reply
Version
0.9.2
Published
Sep 20, 2026
Downloads
718/mo · 718/wk
Author
each1024
License
MIT
Types
extension
Size
2.5 MB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/clear-reply.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

What it is: a Pi TUI extension that reviews an assistant's finished reply for jargon, unexplained abbreviations, and ambiguous phrasing. When useful, it can also add one small static visual.

Install

npm_config_registry=https://registry.npmjs.org pi install npm:@each1024/pi-jev-reply

Run /reload. The plugin is on by default. The session shows a pi-jev-reply mark when it reviews a reply. Open /pi-jev-reply only if you need settings (/clear-reply still works). Requires Pi >= 0.85.1, Node >= 22.18.0, and a Jev API key.

On first install the extension creates clear-reply.json with a settings UI language guessed from your locale (zh*zh-CN, otherwise en). It does not open the settings page. Existing config files are never rewritten for language.

Workflow

Stage Owner Result
Review Jev Decides whether clarity or a visual is warranted.
Edit Main model by default Rewrites the reply and/or adds a compact static visual, then shows it.

The extension keeps the original draft if a call fails, times out, or produces an invalid edit. It does not retry itself into a loop. Structural checks still reject edits that drop paths/commands or change numbers.

Explicit visual asks (flowchart / table / chart) and refusals are honored even if Jev is unsure, so those requests stay stable across runs.

What changes—and what never does

Can improve Deliberately does not do
Black-box phrasing, unexplained acronyms, missing context, and vague conclusions Invent facts, or silently replace a failed draft
A small Markdown table, Mermaid flowchart TD, or text data chart when it helps Generate Canvas, HTML, SVG, JavaScript, external embeds, or interactive visuals
Wording with the current Pi model or a configured provider/model Hardcode a provider or require a model named loop

Controls

/pi-jev-reply                 Open the local settings page
/pi-jev-reply on | off        Toggle processing and save immediately
/pi-jev-reply status          Show enabled state, Jev-key status, and active model

Settings apply immediately—no restart or /reload is needed after saving.

Settings without background noise

The bilingual (en / zh-CN) HTML settings page is served only on demand:

  • binds to 127.0.0.1 with a per-launch token, host/origin validation, CSP, and a bounded request body;
  • starts only from the settings command—no listener, polling, or heartbeat at idle;
  • stops after five idle minutes by default and starts fresh next time;
  • uses ETag/If-Match protection and atomic writes, so a stale tab cannot overwrite newer settings.

The UI language changes only the settings page; it never changes the reply language.

Configuration

clear-reply.json lives in the Pi agent directory (honouring PI_CODING_AGENT_DIR). Defaults are configurable: enablement, chosen rewrite model, rewrite/visual switches, thresholds, Jev model, timeouts, draft hiding, idle timeout, and custom review instructions.

Jev credentials are read from, in order:

  1. TYPESAFE_API_KEY
  2. ~/.config/typesafe/api_key (recommended mode: 600)

Keep tokens out of prompts, examples, issues, and source control.

Privacy & cost

For an eligible reply, Jev receives the draft, up to 2,000 characters of the current user request, and your custom instructions—not the full conversation or model thinking. Obvious credentials are skipped as a convenience, not as a complete secret scanner.

Typical cost: one Jev review; if editing is needed, one selected-model completion. Oversized drafts are skipped instead of truncated.

Boundaries

  • Pi TUI sessions only. JSON, RPC, and print modes are not changed.
  • Draft hiding relies on Pi's native Markdown transformer. Custom transcript renderers, including mini-mode, can still expose the earlier streamed draft.
  • The review is a clarity aid, not a factual, security, or safety guarantee.

Develop

npm install
npm run check
npm test

MIT © eachann1024