omp packages

@crooycom/pi-read-only0.1.1

Read-only mode for Pi — question & discussion mode with no side effects

crooycom Published 17 days ago MIT ~285 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

pi-read-only

Read-Only mode for Pi — a read-only question & discussion mode.

When active, every user message is treated as a question, request for explanation, or point of discussion. The agent researches freely but never makes any changes.

Features

  • /read-only — toggle on/off (/readonly is an alias)
  • /read-only on / /read-only off — explicit control
  • pi --read-only — start a session in Read-Only mode
  • Status bar shows 📖 read-only while active
  • [read-only] widget above the editor
  • Persists across /reload, resume, and fork
  • Tool enforcement: edit/write removed, bash restricted to reads

Detection API for other extensions

Read-only mode exposes a global API that other extensions can check:

// Check if read-only mode is active
const ro = (globalThis as any).__PI_READ_ONLY;
if (ro?.enabled) {
  // Don't perform destructive operations
}

// Subscribe to changes
const unsub = ro?.on("change", (enabled: boolean) => {
  console.log("Read-only mode is now", enabled ? "ON" : "OFF");
});

// Clean up listener when done
unsub?.();

Install

From npm:

pi install npm:@crooycom/pi-read-only

Or straight from git:

pi install git:tangled.org/crooy.tngl.sh/pi-read-only

Then run /reload in Pi.

Structure

pi-read-only/
├── package.json           # pi package manifest
├── extensions/
│   └── read-only.ts       # the extension
└── README.md