@tryinget/pi-activity-strip
v0.3.0
Published
pi extension package for activity-strip workflows in monorepo runtime
Maintainers
Readme
summary: "Top-row live activity strip for local Pi sessions running in Ghostty or other terminals." read_when:
- "Starting work in this package workspace."
- "Installing or verifying the activity strip in Pi." system4d: container: "Monorepo package for a local broker + Electron overlay + Pi extension telemetry seam." compass: "Make Pi session activity visible at a glance without changing the operator's normal terminal workflow." engine: "Pi extension emits session telemetry -> local broker aggregates -> top-row Electron strip renders live state." fog: "Main risks are runtime drift across Pi host versions, Electron availability, and stale-session behavior under real long-running work."
@tryinget/pi-activity-strip
A Pi extension package that gives you a screen-top activity strip showing what your live Pi sessions are doing.
This package is designed for the exact workflow you asked for:
- multiple Ghostty tabs
- multiple Pi sessions
- a persistent top-row ribbon
- fine-grained live detail without changing how you normally run Pi
What it does
- auto-starts a local top-row overlay when Pi starts in a TUI session
- tracks each active Pi session independently
- on Niri, shows one card per tracked live Pi terminal on only the focused workspace; non-Niri desktops retain the global live-session view
- surfaces:
- repo/session label
- current phase
- current tool or target
- fine-grained detail text
- elapsed time plus last-seen freshness
- state color (
thinking,tool,waiting,done,error)
- keeps a local broker so multiple Pi processes can report into one strip
- marks the Pi session in the currently focused Niri/Ghostty terminal with a stronger border and left rail, without adding another label
- keeps green
done/monitoringcards directly beside the Activity tile, followed by active work and then other settled sessions, on a calm 15-second ordering clock - reveals prompt, response, path, and full activity detail on hover or keyboard focus
- focuses the exact matching Ghostty/Niri window on click or Enter, failing closed when identity is missing or ambiguous
- keeps an aligned strip resident on its Niri workspace while that workspace still has tracked terminals, so visiting an empty workspace does not unmap or reposition it
Architecture
Pi session
-> activity-strip extension
-> local unix-socket broker
-> Electron top-row overlayThis is intentionally local-first.
It does not require moving your workflow onto pi-server first.
Current scope
Implemented now:
- local per-host broker
- primary-display top-row strip
- one card per tracked live Pi terminal on the focused Niri workspace, regardless of activity state
- headless-safe telemetry publishing
- explicit open/focus-strip/focus-session/status/doctor/snapshot/fix-top/stop commands
- focus-scoped Left/Right navigation and Shift+Left/Right manual card movement
- local visual capture helpers so the agent can inspect the strip directly
Not implemented yet:
- multi-monitor strip replication
- historical timeline
- persisted manual card order across strip restarts
- remote observers via
pi-server
Installation in Pi
From this package directory:
cd ~/ai-society/softwareco/owned/pi-extensions/packages/pi-activity-strip
pi install "$PWD"Then for existing Pi tabs:
- run
/reloadin each tab you want tracked
For new Pi tabs:
- the package will load automatically from your Pi settings
Operator commands
Package-local CLI
npm run strip:open
npm run strip:status
npm run strip:doctor
npm run strip:snapshot
npm run strip:fix-top
npm run strip:stopor directly:
node ./bin/pi-activity-strip.mjs open
node ./bin/pi-activity-strip.mjs focus-strip
node ./bin/pi-activity-strip.mjs focus-session <full-pi-session-id>
node ./bin/pi-activity-strip.mjs status
node ./bin/pi-activity-strip.mjs doctor
node ./bin/pi-activity-strip.mjs snapshot
node ./bin/pi-activity-strip.mjs fix-topPi slash commands
Inside Pi:
/activity-strip
/activity-strip status
/activity-strip doctor
/activity-strip fix-top
/activity-strip stop
/activity-strip-stopIn Pi with UI support:
/activity-strip statusopens a detailed runtime status report when an editor surface is available/activity-strip doctoropens the host-compatibility report
Interaction model
- Workspace locality: one strip follows the Niri workspace selected with Up/Down and renders only tracked Pi terminals whose exact Ghostty windows are on that workspace. Focused-workspace events trigger reconciliation immediately, with polling retained as a fallback. When an empty workspace is visited, an aligned strip whose resident workspace still has tracked terminals remains rendered on that prior workspace; Niri keeps it off the empty workspace and returning brings the already-positioned strip back with its row. If its resident terminals disappear, the renderer is concealed and input-disabled. When an actual remap or floating correction is unavoidable, reveal waits beyond Niri's compositor movement animation and then re-verifies placement and membership. The broker remains global and non-Niri desktops retain the global card view.
- Ordering: green
donecards whose footer readsmonitoringstay at the far left beside the Activity tile. Active tool/thinking/waiting cards follow, then other settled cards. The group order refreshes every 15 seconds rather than on every telemetry packet; text and timers still update live. - Current terminal: on Niri, the card matching the focused Ghostty window gets a stronger border and left rail without an extra label. Matching uses the same exact session-title identity seam as click-to-focus and fails closed when focus or identity is missing or ambiguous.
- Pointer: hover expands the strip and reveals detail, last prompt, assistant preview, and path. Leaving the strip or activating another window collapses it immediately. Single click asks Niri to focus the one Ghostty title carrying that exact Pi session-id suffix.
- Keyboard inside the strip: Left/Right changes card focus, Enter activates the focused card, and Shift+Left/Right manually moves it. Manual movement lasts until a later activity regroup or runtime restart.
- Fail-closed focus: current telemetry uses the exact Pi identity directly. For already-running tabs that still publish a legacy broker id, the strip may recover only the process-bound
pi-session-presencesidecar when its source, PID, and cwd all agree; this is not repo-name guessing or arbitrary-PID focusing. If identity still matches zero or multiple Ghostty windows, focus does nothing and asks for one/reload.
Keyboard-only entry on Niri
The package deliberately does not reserve a global Electron shortcut. Bind one compositor key to the fail-closed CLI entrypoint instead:
binds {
Mod+Shift+A { spawn "node" "/home/tryinget/ai-society/softwareco/owned/pi-extensions/packages/pi-activity-strip/bin/pi-activity-strip.mjs" "focus-strip"; }
}focus-strip gives keyboard focus only to the unique strip already resident on the currently focused workspace; it never moves a strip between workspaces. When the focused workspace has no tracked live Pi terminals, the command fails closed rather than forcing an empty bar into view. This keeps shortcut ownership explicit in Niri and avoids application-level global-key collisions.
Verification commands
Package checks
npm install
npm run check
npm run release:check:quickRun the strip locally
npm run strip:open
npm run strip:status
npm run strip:doctor
npm run strip:snapshotCapture what the agent should inspect
npm run capture:strip # just the Pi activity strip window
npm run capture:top # top band of the focused output, including the strip + upper window areaThese are specifically useful so the agent can inspect the current visual state without you manually posting screenshots.
Simulate multiple sessions
npm run demo:simulateReal Pi smoke on the live broker
npm run smoke:headless-liveThis smoke:
- opens the strip
- runs a real headless Pi session with this extension loaded
- exercises a real tool call
- verifies that the broker observed the session while it was active
Compatibility diagnostics
npm run strip:doctor
node ./bin/pi-activity-strip.mjs doctor --jsonUse doctor before opening the strip when the host/display assumptions are uncertain. It reports:
- whether a graphical session is present
- whether Electron can be resolved
- whether Niri-specific top-edge repair is available
- whether the current setup is multi-display even though the strip remains primary-display-only
Environment controls
PI_ACTIVITY_STRIP_AUTO_START=0- disable automatic strip opening on Pi session start
PI_ACTIVITY_STRIP_CLICK_THROUGH=1- opt out of interaction and restore a mouse-transparent overlay; interactive hover/click/keyboard behavior is the default
PI_ACTIVITY_STRIP_ELECTRON_BIN=/path/to/electron- override Electron binary discovery
GLIMPSE_ELECTRON_BIN=/path/to/electron- shared Electron override also respected
Practical usage for your Ghostty tabs
If you want this for all current tabs:
- install the package once with
pi install - run
/reloadinside each already-open Pi tab - open the strip once with
/activity-stripornpm run strip:open - from then on, every loaded Pi session should report into the same top-row ribbon
- ensure
pi-little-helperssession presence is loaded when you want exact click-to-Ghostty focus; its· <full-32-hex-session-id-token>title suffix is the preferred fail-closed identity seam (an 8-hex legacy title remains usable only when no legacy duplicate or migrated full title shares its prefix)
