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

@d3ara1n/pi-session-namer

v0.6.1

Published

Session naming for pi — cheap side agent on first prompt, user-triggered regeneration, and a rename_session tool for agent-driven naming

Readme

@d3ara1n/pi-session-namer

npm version npm downloads license

Session naming for pi with layered correction paths.

On the first user prompt of a new session, a lightweight side agent generates a concise title so the session is never "Untitled". When the initial name goes stale (the session drifted from its opening message), /namer:rename can regenerate from a conversation excerpt, and the rename_session tool lets the main agent name the session directly — the agent's full context is the best naming source. Optionally, generated titles can also be refreshed after the 5th, 10th, 20th, 50th, and 100th completed user turns.

Features

  • Zero-config: Works out of the box with pi-model-roles' utility role
  • First-turn naming: Names new sessions asynchronously on the opening prompt; later naming calls happen only if periodic renaming is enabled
  • Graceful fallback: If the side agent fails, truncates the user prompt as name
  • Manual rename: /namer:rename regenerates from a conversation excerpt — each turn pairs a user prompt with the assistant's closing reply (the user gives direction, the assistant carries the substance); up to 8 turns, windowed to the first 4 and last 4 (the opening defines why the session exists, the latest shows what it became) when the session is longer
  • Optional periodic rename: Uses the same excerpt as /namer:rename after completed turns 5, 10, 20, 50, and 100; disabled by default. Explicitly set titles (via /name or rename_session) are never overwritten. Existing titles without plugin provenance are also left alone.
  • Agent rename: rename_session tool lets the main agent set the session name on the user's request, with the full conversation as its source

Configuration

In ~/.pi/agent/settings.json:

{
  "sessionNamer": {
    "enabled": true,
    "periodicRename": false,
    "sideAgentRole": "utility",
    "maxLength": 50
  }
}

| Field | Default | Description | |-------|---------|-------------| | enabled | true | Global on/off switch | | periodicRename | false | Refresh plugin-generated titles after completed turns 5, 10, 20, 50, and 100; set to true to enable | | sideAgentRole | "utility" | pi-model-roles role for the naming side agent | | maxLength | 50 | Maximum name length in characters; 0 means unlimited, and negative values are normalized to 0 |

Project-level .pi/settings.json overrides global settings.

Commands

| Command | Description | |---------|-------------| | /namer | Show status and config | | /namer:enable | Enable auto-naming for the current session | | /namer:disable | Disable auto-naming for the current session | | /namer:rename | Regenerate session name from the conversation excerpt |

The enable/disable commands are intentionally session-only. For a persistent choice, set sessionNamer.enabled in settings.json; the extension does not rewrite user configuration files.

Dependencies

Installation

pi install npm:@d3ara1n/pi-model-roles
pi install npm:@d3ara1n/pi-session-namer

Or add to ~/.pi/agent/settings.json:

{
  "extensions": [
    "/absolute/path/to/pi-extensions/packages/pi-model-roles",
    "/absolute/path/to/pi-extensions/packages/pi-session-namer"
  ]
}