Skip to content

Releases: tmustier/pi-extensions

session-recap v0.1.3

12 May 12:02

Choose a tag to compare

Fixed

  • Defer focus-triggered recaps while the agent is still active, matching Claude Code's away-summary pending behavior and avoiding duplicate/stale recaps during slow tool calls.
  • Cancel stale in-flight recap drafts when a new turn starts.
  • Skip /resume and /fork recap generation in headless/non-UI sessions.
  • Read registered flag values using bare flag names (for example recap-idle-seconds, not --recap-idle-seconds) so automatic trigger configuration actually takes effect.
  • Invoke recap generation with no reasoning, no prompt-cache retention, and maxTokens: 256.

Added

  • Add --recap-during-active to opt back into focus-triggered recaps while an agent turn is still running.

Validation

  • Verified TypeScript checks for session-recap/index.ts.
  • Verified automatic idle, focus-away, active-turn deferral, and --recap-during-active behavior in tmux without using manual /recap.

agent-guidance v0.1.4

28 Apr 05:35

Choose a tag to compare

Templates simplified to focus on durable behavioural overrides:

  • CODEX.md: replaces the previous agent-protocol prose with two blocks for OpenAI models — <solution_persistence> (autonomy + bias for action + persist till done + no quality-for-tokens trade) and <validation> (run validators before summarizing or committing; fix failures before finalizing).
  • GEMINI.md: replaces the empty placeholder with a <tool_usage_rules> block that steers Gemini to pi's read/write/edit tools instead of cat/heredoc/sed -i/etc.

npm: @tmustier/pi-agent-guidance@0.1.4

session-recap v0.1.0

23 Apr 10:15
407a06e

Choose a tag to compare

Claude-Code-style session recap for Pi. When you switch focus away from a Pi session tab and come back, a one-line recap of what the agent just did appears above the editor so you can re-enter flow without re-reading scrollback. Built for multi-clauding / multi-pi workflows.

session-recap widget in a live Pi session

Install

pi install git:github.com/tmustier/pi-extensions

Then in ~/.pi/agent/settings.json:

{
  "packages": [
    {
      "source": "git:github.com/tmustier/pi-extensions",
      "extensions": ["session-recap/index.ts"]
    }
  ]
}

Or npm: @tmustier/pi-session-recap.

Triggers

Trigger How Default
Terminal focus out → in DECSET ?1004 (ESC[O / ESC[I) drafts on focus-out, reveals on focus-in if away ≥ 3s
Idle after turn ends setTimeout armed on turn_end 45s
/resume, /fork Auto-recap on session_start auto
/recap Manual command on demand

Model

Defaults to the currently active model with reasoning: "minimal" (via completeSimple) when the model advertises reasoning support. Piggybacks on existing auth, so custom providers registered via pi.registerProvider work without extra config. Override with --recap-model "<provider>/<id>".

Flags

Flag Default Description
--recap-idle-seconds <n> 45 Seconds after turn_end before the idle recap fires.
--recap-focus-min-seconds <n> 3 Minimum focus-out duration before a recap is revealed.
--recap-disable-focus false Disable DECSET ?1004 reporting (idle fallback still runs).
--recap-disable false Disable auto-recap; /recap still works.
--recap-model "<p/id>" active model Override the default.

Terminal compatibility

iTerm2 / Ghostty / Alacritty / Kitty / WezTerm / xterm / VS Code / Warp — all work out of the box. tmux needs set -g focus-events on in ~/.tmux.conf. Apple Terminal falls back to the idle trigger.

Implementation highlights

  • turn_end (not agent_end) to arm the idle timer — errored or aborted turns still get a recap.
  • Branch-leaf stamping — repeated focus-out/in without new session activity reuses the recap rather than regenerating.
  • Per-call AbortController ownership — a late-completing aborted request can't stomp on a newer in-flight one.
  • Start-leaf snapshot — if the branch advances while a recap is in flight, the stale draft is discarded.
  • Quick-refocus (< --recap-focus-min-seconds) cancels the in-flight draft so a slow model response can't bypass the suppression.
  • clearTimer() on successful show — no double-draft from focus + idle for the same leaf.
  • Clean cleanup on session_shutdown: \x1b[?1004l + stdin listener removed.

Links

usage-extension v0.3.1

19 Apr 15:33
af7876a

Choose a tag to compare

What changed

/usage now has two view modes, toggled with v:

  • Table (default, unchanged) — per-provider/per-model stats with cost and token breakdown.
  • Insights (new) — Claude-style narrative characteristics of your cost for the active time period.

Example on a real All Time period:

63% of your cost came from sessions active for 8+ hours
27% of your cost was at >150k context
26% of your cost was while 4+ sessions ran in parallel
11% of your cost came from your top 5 sessions
11% of your cost came from >100k-token uncached prompts

Insights view of /usage

Insights

All weighted by recorded API cost (USD):

Insight Threshold
Parallel sessions ≥ 4 sessions active within an exact ±2 min window
Large context input + cacheRead + cacheWrite > 150k
Large uncached prompt input + cacheWrite > 100k
Long-running sessions session lifetime ≥ 8 hours (global, not per-period slice)
Top-session concentration top 5 sessions by cost

Design choices

  • Cost-only weighting. Every bullet reads "X% of your cost …". Periods with no recorded cost show an explicit empty state instead of silently switching to a different unit.
  • Independent characteristics, not a breakdown. Insights overlap and can sum to more than 100% — the subtitle says so.
  • Global session lifetime for the 8h+ insight, so a session that truly ran 8h+ is classified correctly even when only part of it falls inside the selected period.
  • Exact ±120 000 ms window for the parallel-sessions insight (two-pointer sweep).
  • Three distinct empty states: no usage in period, usage but no cost data, usage with cost but no insights clearing the 1% threshold.
  • Timestamps missing/invalid are excluded from the parallel sweep so older/incomplete logs don't collapse into a single synthetic instant.

Navigation

Key Action
v Toggle Table ↔ Insights
Tab / ←→ Switch time period (both views)
↑↓ / Enter / Space Provider selection and expansion (table view only)
q / Esc Close

Install / upgrade

pi install npm:@tmustier/pi-usage-extension

Or via git source (auto-updates on pi pull):

pi install git:github.com/tmustier/pi-extensions

Full changelog: CHANGELOG.md

skill-creator v0.3.1

19 Apr 16:01
67e3a53

Choose a tag to compare

validate_skill.py is now self-contained. The shebang is a PEP 723 uv run --script invocation that declares pyyaml inline, so uv provisions it in an ephemeral environment — no more ModuleNotFoundError: No module named 'yaml' on fresh machines, and nothing is installed into the system Python.

Prerequisite

uv on $PATH (brew install uv or curl -LsSf https://astral.sh/uv/install.sh | sh).

Usage

scripts/validate_skill.py /path/to/my-skill
# or, equivalently:
uv run scripts/validate_skill.py /path/to/my-skill

Thanks to @tekumara for reporting (#20).

ralph-wiggum v0.1.7

19 Apr 16:18
b10679c

Choose a tag to compare

Fixed

  • Ralph loops no longer silently stop after auto-compaction or /compact.

On session reload pi re-initializes the extension module, resetting the in-memory currentLoop to null and leaving ralph_done, agent_end, and before_agent_start as no-ops even though the on-disk state is intact. This release restores currentLoop from disk in the session_start handler — when multiple loops are active it picks the one whose state file was written most recently.

Thanks to @elecnix for the detailed report and proposed fix (#11).

pi-ralph-wiggum v0.2.0

19 Apr 16:42
f4290fd

Choose a tag to compare

Changed

  • BREAKING: SKILL.md name renamed ralph-wiggumpi-ralph-wiggum to match the parent directory (both in the repo and after pi install npm:@tmustier/pi-ralph-wiggum). This removes the [Skill conflicts] warning pi emitted on every startup. The skill's public identifier changes — explicit invocations must now use /skill:pi-ralph-wiggum instead of /skill:ralph-wiggum.
  • Repo directory renamed ralph-wiggum/pi-ralph-wiggum/. Git-source users referencing ~/pi-extensions/ralph-wiggum/… in their pi config should update the path to ~/pi-extensions/pi-ralph-wiggum/…. The npm package name (@tmustier/pi-ralph-wiggum) is unchanged.
  • Renamed the README's Install section to Installation so it matches the skill validator's expectations.

Thanks to @ishanmalik for reporting (#12).

files-widget v0.1.18

19 Apr 21:53
fbc746d

Choose a tag to compare

Changed

  • Show symlinks with a marker in the /readfiles tree.

Fixed

  • Let /readfiles navigate into directory symlinks in both non-git folders and git repos instead of rendering them as inert files or empty directories.
  • Guard symlink directory scanning against ancestor cycles so links like foo -> . or foo -> .. don't recurse forever.
  • Treat git-tracked and untracked directory symlinks as lazily scannable directories rather than plain files.
  • In git repos, expanding a symlinked directory now scans one level on demand; nested directories stay lazy until explicitly expanded, so links into large trees like iCloud/Drive or $HOME do not trigger a broad recursive crawl.

Thanks to @xapids for reporting the original macOS symlink navigation issue (#9).

files-widget v0.1.17

19 Apr 21:31
18e1bd9

Choose a tag to compare

files-widget v0.1.17

Changed

  • Make the inline comment editor multiline with wrapped footer rendering, Enter for a new line, and Ctrl+Enter/Ctrl+D to send.
  • Add an m toggle for rendered vs raw Markdown in the viewer, and fall back to raw mode before line-based search or selection.
  • Show a sent/queued confirmation toast after returning an inline comment to the agent.

Thanks

  • Thanks to avg8888 in the Pi Discord for surfacing the comment editor and Markdown review issues fixed in this release.

files-widget v0.1.16

19 Apr 15:56
65d928e

Choose a tag to compare

Fixed

  • Let /readfiles browser search accept j and k as search text instead of hijacking them for navigation.
  • Fix viewer scrolling so the last lines of a file remain reachable.
  • Restore G / Shift+G navigation to jump to the bottom of the viewer.
  • Refresh an open viewer when the file changes on disk while /readfiles is open.
  • Accept pasted, multi-character, and chunked bracketed-paste input in browser search and the inline comment prompt.
  • Keep viewer search results in sync after live refreshes.
  • Pause live refresh while a line selection or inline comment is active so comments stay anchored to what the user selected.

Published packages:

  • @tmustier/pi-files-widget@0.1.16
  • pi-extensions@0.1.29