omp packages

@mrclrchtr/supi-extras19.0.0

Quality-of-life extras for the Pi coding agent: compact codemode rows, session capability controls, prompt stash, shortcuts, and activity indicators

GitHub Actions Published 18 hours ago MIT ~3.2K 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

@mrclrchtr/supi-extras

GitHub stars npm downloads

Adds a bundle of small quality-of-life features to the Pi coding agent.

  • Compact codemode rows — see the nested tool calls of a codemode script at a glance instead of a wall of code.
  • Session capabilities — choose extension tools and model-visible skills per session, with reusable profiles.
  • Prompt stash — save, restore, and copy prompt drafts across restarts.
  • Footer and activity — Git status, cache-hit rate, context usage, and a tab-title spinner.
  • Safe defaults — headless git editors and a default bash timeout.

Install

pi install npm:@mrclrchtr/supi-extras

Stash picker overlay

Commands

  • /exit — exit pi
  • /e — alias for /exit
  • /clear — start a new session (alias for /new)
  • /clone-session <session-id> — clone a session into the current worktree and switch to it; autocomplete searches IDs and session names
  • /supi-stash — browse, restore, copy, delete, or clear saved prompt drafts
  • /supi-capabilities — choose extension tools and model-visible skills for this session

Session capabilities

/supi-capabilities opens a searchable selector. Use it to change extension tool and skill visibility for the current session.

  • The selector lists only extension tools that were active at startup. It does not list Pi built-in tools or tools supplied by integrations.
  • Tool and skill overrides are stored in the session. Resume restores them. Fork and /clone-session copy them. New sessions use the optional default profile; without a default, they start without overrides.
  • Tree navigation keeps explicit capability tool choices and does not change other tool choices.
  • The selector waits until the agent is idle before it opens. It does not interrupt a running tool call.
  • Saved tool and skill exclusions remain stored when an item is absent. They apply if the item becomes eligible later.
  • Skill changes affect the model skill catalog only. Explicit /skill:name commands and $name shortcuts stay available.
  • Use Reset Tools, Reset Skills, or Reset All to remove overrides.
  • The footer shows an override count and the applied profile name. Modified means session exclusions differ from the copy captured when the profile was applied.

Install @mrclrchtr/supi-skills to manage skills. Tool controls work without that package.

Session Capability Profiles

Use Tab to open Profiles in /supi-capabilities. Apply a saved profile, save current exclusions under a new name, replace or delete a saved profile, or choose a default. Saving requires an explicit global or project scope. Replacement and deletion require confirmation.

Profiles contain exclusions, not a fixed list of available capabilities. New eligible tools and skills remain available unless their exact names are excluded. Package rows select current tools only; they do not create rules for future tools. Profiles do not change the model, instructions, child Agent Profiles, or security permissions.

Store definitions in ~/.pi/agent/supi/config.json or a trusted project's .pi/supi/config.json:

{
  "sessionCapabilities": {
    "profiles": {
      "research": {
        "excludedTools": ["agent_run"],
        "hiddenSkills": ["implement"]
      }
    },
    "defaultProfile": "research"
  }
}
  • Profile IDs contain lowercase words separated by optional hyphens. Omitted exclusion lists are empty. Unknown fields and invalid values produce errors.
  • Project profiles and defaults require Pi project trust. A project definition replaces the complete global definition with the same ID. An invalid project definition blocks that ID; it does not use the global definition instead.
  • An absent project defaultProfile inherits the global default. Set it to null to use no default in that project. Missing or invalid defaults produce a warning and normal startup without profile exclusions.
  • Applying a profile replaces both session selections and stores a separate session copy. Later configuration edits, deletion, and reload do not change that copy. Resume and fork do not apply a new default.
  • Saving a profile does not apply it. Apply it explicitly to use its current saved definition.
  • Deletion leaves default references unchanged. Deleting a project definition can expose a same-ID global definition; the confirmation explains this effect.
  • Reset All clears session exclusions and profile identity. It does not change saved profiles or defaults, and it does not reapply the default in the current session.
  • Manual profile management is TUI-only. Configured startup defaults also work in non-interactive modes.

Shortcuts

  • Alt+S — stash the current editor text
  • Alt+C — copy the current editor text to the system clipboard

Prompt stash

Prompt stash stores drafts in ~/.pi/agent/supi/prompt-stash.json so they survive restarts.

/supi-stash opens an overlay with these actions:

  • Enter — restore the selected draft into the editor
  • c — copy the selected draft to the clipboard
  • d — delete the selected draft
  • D — clear all drafts
  • Esc — close the overlay

If the stash file cannot be read or written, drafts are kept in memory only and can be lost when pi closes.

Passive behavior

Tab-title spinner

While the agent is working, the package animates a spinner in the terminal tab title. When the turn finishes, it shows a done marker. The spinner pauses while a question waits for your answer.

Herdr

Inside a Herdr TUI pane (HERDR_ENV=1) in Pi's TUI, the package hands status signals to Herdr and names the tab after the session:

  • The terminal title stays π - <name> - <dir>, without spinner, done or review icons, and without the terminal bell. Herdr shows the status instead.

  • While a dialog waits for your answer, Herdr marks the pane blocked: select, confirm, input, and editor dialogs of any extension, and SuPi forms such as ask_user and the /supi-improve review. This needs Herdr's Pi integration (herdr integration install pi). Other custom screens do not count as waiting, such as /agents, /supi-settings, and the progress loader of /supi-review. An extension marks its own custom screen as waiting with runWaitingUi() from @mrclrchtr/supi-core/session.

  • While Agent Runs work on their task, the pane's idle and done states read idle · 2 agent runs or done · 1 agent run. Background runs keep working after Pi's turn ends, which Herdr otherwise shows as finished. A run whose result is ready, but whose optional retrospective still runs, no longer counts. Herdr's own state, herdr agent wait, and notifications are unchanged.

  • The tab label shows the working directory, for example π supi-wt2, so worktrees in one Herdr workspace are easy to tell apart. A named session (/name fix-login) replaces it with π fix-login and sets the sidebar agent to pi: fix-login. Labels have at most 30 characters.

  • The package changes only a tab label that is all digits, Herdr's default, or starts with π . A label you set yourself stays. When you quit Pi, a π label goes back to the tab's position; /reload, /new, /resume, and forks keep it.

  • With the herdr.auto-title plugin installed, the package leaves tab names to the plugin and sets only the sidebar agent.

  • The pane reports four sidebar tokens: $model (model id, for example claude-opus-5-5), $thinking (thinking level, for example high; left out when thinking is off), $ctx (context usage, for example 42%), and $cost (session cost in dollars, for example 1.83; left out at zero). $cost is a bare number, so Herdr's numeric gt/lt rules can color it. $ctx keeps its %, so it needs text rules. They update after each turn, on model or thinking changes, and after compaction, and are removed when you quit Pi. Herdr shows them only in rows you configure, for example in ~/.config/herdr/config.toml. The example colors context yellow from 60 % and red from 80 %; the first matching rule wins, and the equals rules without styles keep 6% to 9% out of the starts_with rules:

    [ui.sidebar.agents.rows_by_agent]
    pi = [
      ["state_icon", "workspace", "tab"],
      [
        { token = "$model", dim = true },
        { token = "$thinking", dim = true },
        { token = "$ctx", rules = [
          { equals = "6%" }, { equals = "7%" }, { equals = "8%" }, { equals = "9%" },
          { equals = "100%", fg = "#ed8796", bold = true },
          { starts_with = "8", fg = "#ed8796", bold = true }, { starts_with = "9", fg = "#ed8796", bold = true },
          { starts_with = "6", fg = "#eed49f" }, { starts_with = "7", fg = "#eed49f" },
        ] },
      ],
    ]
    

The package calls the herdr CLI (HERDR_BIN_PATH). If a call fails, Pi keeps running and shows one warning per session; details are in supi-debug events.

In the Herdr desktop app (a herdr-core terminal: HC_TERMINAL_ID set, TERM_PROGRAM=ghostty, not inside tmux), the title also stays plain and the bell stays off. The app gets Pi's status from Pi itself (OSC 7501) and names an unnamed tab after the title, for example π - fix-login - supi-wt2, so the package names nothing there. HERDR_* variables that reach an app terminal, for example when the app was started from a Herdr TUI shell, are ignored.

Footer replacement

The package replaces pi's default footer with two lines, each split into sections separated by a dim ·:

~/Development/supi  main !9                                       λ 3✓ ◫43
↑112 ↓52k · R4.5M W146k CH96.9% · $3.113 sub · ▰▱▱▱▱ 11.8%/1.0M   ✦ (anthropic) claude · high

The path line holds workspace state. It shows the Git branch with ahead/behind and file counts, for example main ⇡2 +1 !3 ?1. Counts refresh after tool runs, at most once per second. The stash count includes only stashes created on the current branch, because all worktrees of a repository share one stash stack. Workspace status from other SuPi packages, such as the LSP status, appears on the right.

With Landing status on, a branch other than the Default Branch also shows whether it is Landed: every commit on it is on the local main (or the branch origin/HEAD names, else master), as after a fast-forward landing. ✓main means Landed, →main ⇡3 ⇣17 means 3 commits are not on main yet and main has 17 commits the branch lacks. A Landed branch still shows ⇣n when main has moved on. Only ancestry counts, so squash or cherry-pick integrations stay unlanded. Uncommitted changes do not affect it; the file counts show them. The status is hidden on the Default Branch itself and on detached HEAD.

The session line groups token totals, cache totals with the session cache-hit rate, cost, and context usage. Cache-hit and context values change color at their thresholds; context usage also shows a small bar unless icons are set to ascii. The model and thinking level appear on the right in theme colors, after status icons from other SuPi packages. When the window is narrow, the right side of each line shortens first.

When the first user message on the current session branch names GitHub issues or pull requests, the path line shows them after the session name, for example • #12 acme/app#5. It recognizes github.com issue and pull request URLs, owner/repo#12, and a bare #12, which resolves against the origin remote when it points to GitHub. Expanded skills and code are ignored. If the terminal supports hyperlinks, each reference links to its GitHub page.

Statuses that other extensions set with Pi's setStatus() appear on a third line.

Configure the footer under /supi-settings → Footer:

Setting Values Default
icons auto, nerd, unicode, ascii auto
gitStatus true, false true
landingStatus true, false false
issueLink true, false true

auto cannot detect the terminal font. It uses Nerd Font icons on a local UTF-8 terminal, Unicode symbols over SSH, and ASCII otherwise. If icons render as boxes, choose unicode. ascii keeps the former path (branch) layout.

Compact codemode rows

Compact codemode row with nested calls

One codemode script can chain many tool calls. The compact row shows what the script did, not just its source: in the example above, a 10-line health check ran 7 calls in under two seconds. Its leading comment becomes the headline, each code_health, code_resolve, and bash call has its own line with its key argument, status, and duration, and the script's one-line result closes the row.

Pi's codemode tool (including wrappers that keep its code input) shows a compact row while collapsed: the script's first line (a leading // comment appears as plain text, so start scripts with one that states their purpose), its nested calls, a status line with duration, call count, failures, and model cost, and the first output line. Expand tool output (ctrl+o by default) to see Pi's full view with the script and output. Nested calls show their key argument (for example a path, command, or code-intelligence query), the error of failed calls, and durations of 100 ms or more. Consecutive identical calls merge into one row with a count (×5) and their summed duration. Long scripts show at most 8 call rows: running and failed calls stay visible, the latest other calls fill the rest, and one … N more calls: bash ×4, read ×4 row stands in for the hidden ones.

Turn compact rows off under /supi-settings → Codemode View; the change applies to new rows and to rows rebuilt on /reload.

Setting Default Description
codemode-view.compact true Collapse codemode rows to a summary

Block Menu

In fullscreen mode (Pi's default tuiMode), a closed fenced code block shows ⋯ at the right end of its opening fence line while the pointer is over the block. Click ⋯ and the fence line shows copy and esc. copy puts the block's content on the clipboard (without fences, with the model's original tabs) and briefly shows ✓ copied. esc, the Escape key, or a click elsewhere closes the menu. Under tmux, zellij, and screen the terminal reports no pointer motion, so ⋯ stays visible on every block. Regular mode leaves the mouse to the terminal and shows no Block Menu. Only top-level blocks get the menu, not blocks inside lists or quotes, and a block that is still streaming gets it only after its closing fence arrives.

Pi has no extension hook for rendered code blocks, so the Block Menu patches Pi's Markdown component. If a Pi update changes the parts it relies on, the Block Menu turns itself off and SuPi shows one warning per Pi process.

Setting Default Description
block-menu.enabled true Show the Block Menu on code blocks in fullscreen mode

Headless git safety

The package sets:

  • GIT_EDITOR=true
  • GIT_SEQUENCE_EDITOR=true

That prevents git subprocesses from hanging while waiting for an interactive editor.

Default bash timeout

Pi's bash tool has no default timeout. When the model calls bash without timeout, the package fills in a default (600 seconds) so a hung command cannot stall an unattended session. The limit is long enough for typical test and check runs; set an explicit timeout or lower the default for faster failure. Explicit timeout values are kept; other tools are untouched.

Configure it in /supi-settings → Bash Timeout → Default Timeout (seconds), stored in the bash-timeout section of ~/.pi/agent/supi/config.json or .pi/supi/config.json. This replaces the former @mrclrchtr/supi-bash-timeout package; existing settings keep working. Agent Runs of SuPi Agent and SuPi Review apply the same default, also without this package. Because Pi describes timeout as having no default, the rules of bash in the system prompt name the configured value: ``bashcalls withouttimeoutstop after 600 seconds; settimeout for longer runs.

With SuPi Debug enabled, each timeout records a bash-timeout event (source supi-bash-timeout): timeout seconds, whether it was the default or set by the model, elapsed time, milliseconds since the command's last output (null for none), and whether it came from the session or an Agent Run. When the model starts the same command again, a bash-timeout-retry event records the new timeout, a sign that the previous one fired too early. Events show the command truncated; the full command is raw data.