omp packages

pi-simple-timeout0.1.0

Pi coding agent extension that sets a configurable default timeout (180s) for the bash tool, updates the bash schema timeout description, prefixes default timeout returns, and lets users adjust the timeout in the TUI.

zhexusun10 Published 10 days ago MIT ~490 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-timeout

A Pi coding agent extension that adds a configurable default timeout (180s by default) to the built-in bash tool.

CI npm License: MIT

Installation

pi install npm:pi-simple-timeout

Then start a new Pi session, or run /reload in an existing session.

GitHub installation also works:

pi install git:github.com/zhexusun10/pi-timeout

What It Changes

Area Before (Pi built-in bash) After (pi-timeout)
bash schema timeout description Timeout in seconds (optional, no default timeout) Timeout in seconds (optional, default 180s) (updates live with your TUI setting)
Agent omits timeout Runs with no timeout Times out after the configured default (180s by default)
Return message on default timeout — Default timeout: Command timed out after 180 seconds
Agent specifies explicit timeout Command timed out after <N> seconds Unchanged (Command timed out after <N> seconds)

Built-in bash rendering, output truncation, outputSchema, shellPath, and shellCommandPrefix settings are preserved.

Adjusting the Timeout in TUI

Run /timeout in Pi:

  • /timeout — Open the interactive TUI selector to choose a preset (30s, 60s, 120s, 180s [default], 300s, 600s), enter a custom value (Custom...), disable the default timeout (Disable), or reset to 180s.
  • /timeout <value> — Set directly without opening the dialog:
    • /timeout 120 or /timeout 120s
    • /timeout 5m
    • /timeout reset (or /timeout default)
    • /timeout off (or /timeout none)

Updating the timeout immediately refreshes the active bash tool schema and persists your choice to ~/.pi/agent/pi-timeout.json (or $PI_TIMEOUT_SETTINGS if set).

Configuration

{
  "version": 1,
  "defaultTimeoutSeconds": 180
}

Development

npm ci --ignore-scripts
npm run check
npm test
npm run verify:load
npm pack

License

MIT