omp packages

pi-tokstream0.1.2

Producer-only token throughput data for Pi: live tok/s while streaming plus provider-reported usage per exchange, with no rendering. Built to feed renderers like herdr-sidecar.

wilberc Published 12 days ago MIT ~718 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-tokstream

Live tokens per second for your Pi session, recorded as data that other tools can draw. A producer-only Pi and Gentle Shell extension.

What it does

While the main model streams, it estimates the output rate (tok/s); when each message finalizes, it keeps the provider-reported throughput and usage (input, output, cache read, cache write). Finished subagent tasks are relayed with their own last reported usage. Everything goes into an append-only JSONL journal beside the session file, size-rotated so it stays bounded. It renders nothing: renderers such as the herdr-sidecar agents view read the journal and own all presentation.

What it solves

  • "Is the model actually streaming, and how fast?" A side panel can show a live rate without hooking into Pi itself.
  • Invented numbers. Estimates are labeled as estimates, provider numbers as reported, and a missing category is null, never zero.
  • Logs that grow forever. The journal rotates at 2 MiB and keeps one previous generation.

Install

# Gentle Shell
gentle-shell install npm:pi-tokstream

# Pi
pi install npm:pi-tokstream

Then /reload inside the session.

Quick reference

Command Effect
/tokstream or /tokstream status the switch plus the current snapshot (n/a (no data) before any measurement)
/tokstream off stop all journal production until /tokstream on or a Pi restart (not persisted)
/tokstream on resume production

Documentation

I want to… Read
Read the journal from a renderer docs/journal.md
Know who owns what between producer and renderer docs/design.md
Run the tests docs/development.md

License

MIT — see LICENSE.