omp packages

@vtstech/pi-status1.3.4

System monitor / status bar extension for Pi Coding Agent

vtstech Published 9 days ago MIT ~526 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

@vtstech/pi-status

System monitor extension for the Pi Coding Agent.

Adds composable named status items to the framework footer using ctx.ui.setStatus(). Each metric gets its own named slot so it coexists cleanly with other extensions' status items.

# Install as part of the bundle
pi install git:github.com/VTSTech/pi-coding-agent

# Or install individually
pi install "npm:@vtstech/pi-status"

How It Works

Automatically loaded — no commands needed. Slots are rendered in the framework footer alongside framework items (model name, session tokens, context usage). All labels use dimmed coloring; all values use green highlighting.

CPU/RAM/Swap are only shown when using a local Ollama provider (not for cloud/remote). For cloud providers, system metrics are omitted.

The extension uses intelligent polling: main metrics update every 5 seconds while a session is active, with a fast 1-second interval only when tools are actively running. All intervals are properly cleaned up on session shutdown to prevent memory leaks.

Example (local Ollama):

CtxMax:41k RespMax:16.4k Resp 2m3s TPS 45 CPU 12% RAM 2.2G/15.1G SEC:MAX Prompt: 2840 chr 393 tok pi:0.66.1

Example (cloud provider, basic mode):

CtxMax:128k RespMax:16.4k Resp 1m22s TPS 32 SEC:BASIC Prompt: 2840 chr 393 tok pi:0.66.1

Example with persistent tool timing:

CtxMax:41k RespMax:16.4k Resp 2m3s TPS 45 CPU 12% RAM 2.2G/15.1G SEC:MAX Last:read: 15s Prompt: 2840 chr 393 tok pi:0.66.1

Enhanced Features

  • Fast 1-second tool timer - Real-time active tool tracking with elapsed time
  • Persistent tool timing - Last tool call time remains visible even when no tool is currently running
  • TPS monitoring - Tokens per second calculation for each response to measure processing efficiency
  • Security flash indicator - 3-second visual flash when tools are blocked, plus persistent blocked count
  • Improved error handling - Better debugging and error messages throughout the extension
  • Enhanced session management - Proper cleanup of intervals and timers on session shutdown
  • Better memory management - Unref() timers to prevent preventing process exit
  • Optimized metrics polling - Session-gated polling to avoid unnecessary CPU usage

Status Slots

Slots are updated every 5 seconds (1 second for active tool timing). Render order is deterministic — all slots are managed through flushStatus().

Slot Description Condition
CtxMax + RespMax Combined: native model context window + max response tokens (e.g., CtxMax:33k RespMax:16.4k) Ollama or after first provider request
Resp Agent loop duration (e.g., 2m3s) After first agent cycle
TPS Tokens per second for the last response (e.g., TPS 45) After first agent cycle with token data
CPU% Per-core CPU usage delta Local Ollama only
RAM Used/total system memory Local Ollama only
Swap Used/total swap space Local only, when active
Generation params Temperature, top_p, top_k, num_predict, context size, reasoning_effort (dimmed) After first provider request
Active tool Live elapsed timer with > indicator while running, or last tool call time when idle Always shown (persists after tool completion)
Prompt System prompt size as chars chr tokens tok After first agent start
Pi version pi:0.66.1 (dim label + green value, always last) Always shown

All slots are cleared on session_shutdown. Metrics that the framework already provides (model name, session tokens, context usage, thinking level) are intentionally omitted to avoid duplication.

Status Examples

Local Ollama with active tool and security blocks:

CtxMax:41k RespMax:16.4k Resp 2m3s TPS 45 CPU 12% RAM 2.2G/15.1G SEC:MAX (blocked: 3) Last:read: 15s Prompt: 2840 chr 393 tok pi:0.66.1
> exec: 2s3

Cloud provider with TPS monitoring:

CtxMax:128k RespMax:16.4k Resp 1m22s TPS 32 SEC:BASIC Prompt: 2840 chr 393 tok pi:0.66.1

Security flash indicator (3-second window):

CtxMax:41k RespMax:16.4k Resp 2m3s TPS 45 CPU 12% RAM 2.2G/15.1G SEC:MAX (blocked: security-audit) Last:read: 15s Prompt: 2840 chr 393 tok pi:0.66.1

Links

License

MIT — VTSTech