npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lukemelnik/pi-session-recap

v0.2.0

Published

A Pi extension that shows a one-line recap of what the current session has been about.

Readme

pi-session-recap — one-line session context for Pi

A Pi extension that keeps a one-line recap above the editor so long-running coding sessions are easier to resume.

pi install npm:@lukemelnik/pi-session-recap
/session-recap status

Features

  • Recap widget — show the current session focus directly above Pi's editor.
  • Idle refresh — update the recap after agent turns once Pi is idle.
  • Model selection — choose auto, the current active model, or a fixed provider/model-id.
  • Fallback summaries — use local heuristics when no authenticated recap model is available.
  • Session persistence — save the latest recap as extension state so resumed sessions and external monitors can read it.
  • Configurable delay — refresh immediately or after delays such as 10s, 30s, 2m, or 1h.
  • Command autocomplete — complete subcommands, delays, and authenticated model IDs.

Install

Install from npm:

pi install npm:@lukemelnik/pi-session-recap

Install project-locally instead of globally:

pi install npm:@lukemelnik/pi-session-recap -l

Install from GitHub or a local checkout:

pi install git:github.com/lukemelnik/pi-session-recap
pi install /absolute/path/to/pi-session-recap

Quick Start

Install the package, open Pi, then check the current recap configuration:

/session-recap status

Use the default model selection and refresh delay:

/session-recap model auto
/session-recap delay default

Regenerate the recap immediately from recent session context:

/session-recap refresh

Commands

| Command | Description | |---------|-------------| | /session-recap | Show current settings. Same as /session-recap status. | | /session-recap status | Show whether the widget is enabled, the recap model, delay, and settings path. | | /session-recap on | Show the recap widget and refresh after agent turns. | | /session-recap off | Hide the recap widget and stop refreshes. | | /session-recap toggle | Toggle the recap widget. | | /session-recap refresh | Regenerate the recap immediately from recent context. | | /session-recap model | Open a model picker for authenticated models. | | /session-recap model auto | Use the first available recap candidate, then fall back to the current active model. | | /session-recap model current | Always use the current active Pi model. | | /session-recap model <provider>/<model-id> | Use a fixed model for recaps. | | /session-recap delay | Show the current refresh delay. | | /session-recap delay <duration> | Set the refresh delay. Supports ms, s, m, and h. | | /session-recap delay default | Restore the default 30 second delay. |

Model Behavior

The auto model mode tries these authenticated models first, then falls back to the active Pi model:

  1. openai-codex/gpt-5.4-mini
  2. openai/gpt-5.4-mini
  3. openrouter/openai/gpt-5.4-mini

If no authenticated model is available, the extension generates a best-effort local fallback from recent user requests and file paths.

The selected recap model receives recent session text so it can summarize the actual task. Use /session-recap off if recap context should not be sent to a model provider.

Configuration

Settings are stored globally at:

~/.pi/agent/session-recap.json

| Setting | Default | Description | |---------|---------|-------------| | enabled | true | Whether the recap widget is shown. | | delayMs | 30000 | Delay after an agent turn before refreshing. | | modelMode | auto | One of auto, current, or fixed. | | provider | unset | Provider used when modelMode is fixed. | | modelId | unset | Model ID used when modelMode is fixed. |

Settings changes are also written into the current Pi session so resumed or forked sessions keep their recap choices.

Session State

The latest generated recap is saved in the current Pi session as a custom extension entry:

{
  "type": "custom",
  "customType": "session-synopsis-state",
  "data": {
    "schemaVersion": 1,
    "synopsis": "Debugging API integration failures in Songkeeper",
    "lastSummarizedLeafId": "abc123",
    "updatedAt": 1778165000000
  }
}

Pi custom entries are extension state and are not sent to the model as conversation context. Consumers should read the current branch from newest to oldest and use the first session-synopsis-state entry.

Manage the Package

pi list
pi config
pi update npm:@lukemelnik/pi-session-recap
pi remove npm:@lukemelnik/pi-session-recap

If the package was installed project-locally, pass -l to pi remove:

pi remove npm:@lukemelnik/pi-session-recap -l

Requirements

  • Pi with package support.
  • An authenticated model for generated recaps. Without one, local fallback summaries still work.

Development

Maintainer setup, type checking, and release commands are documented in docs/development.md.

License

MIT