Hub: ๐Ÿ”Œ OMP Extensions ยท Contract: ๐Ÿงญ Extension UX Contract ยท Runtime: omp only.

1. ๐Ÿ’Ž Blueprint

id: ompbar                 # display/SSOT id
runtime_file: ~/.omp/agent/extensions/statusbar.ts
rebrand: planned separately; do not load duplicate wrappers
config: ~/.omp/agent/statusbar.json
surface: widget          # colored ยท aboveEditor
command: /statusbar
command_owner: ompbar
api: pi.on(session_*) + pi.setWidget | pi.setStatus
deps: "@oh-my-pi/pi-tui"
status: planned          # loads; interactive HUD verification remains

2. ๐ŸŽฏ Purpose

Event-driven telemetry strip: model ยท context ยท tokens ยท TPS ยท git ยท tools ยท agents ยท quota ยท todos ยท update.

No polling loop โ€” one change-gated render per tick; async work carries session epoch.

3. โš™๏ธ Config quick-ref

KeyYoursMeaning
surfacewidgetColor HUD (status = plain, ANSI stripped)
placementaboveEditorWidget position
orderbrandโ†’modelโ†’โ€ฆโ†’updateSegment left-to-right
segments.*.enabledmost onToggle per segment

4. ๐ŸŽฎ Commands

CommandEffect
/statusbarInteractive config panel
/statusbar widgetColored widget mode
/statusbar statusPlain status line
/statusbar debugsurface=widget todo=โ€ฆ quota=โ€ฆ
/statusbar reloadHot-reload statusbar.json

5. ๐Ÿ”Œ Optional event bus

OMP does not emit these โ€” extensions or scripts can:

pi.events.emit("statusbar:loop", { remaining: 6 });   // โˆžโถ
pi.events.emit("statusbar:mode", { key: "plan", text: "โ–ค" });

Subagent lifecycle: listens on task:subagent:lifecycle.

6. ๐Ÿ—๏ธ Architecture

flowchart LR
  E[OMP events] --> S[statusbar.ts]
  C[statusbar.json] --> S
  S --> W[setWidget / setStatus]
  W --> TUI[Editor HUD]

7. โœ… Done when

  • Bar visible above editor in interactive omp
  • /statusbar debug โ†’ surface=widget
  • Context + token segments update per turn
  • Git segment refreshes after file saves

8. ๐Ÿšง Next (optional)

  • Enable activity / clock segments in config
  • Emit statusbar:loop from custom automation
  • Deduplicate extensions/statusline/ dev copy if unused