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

pi-session-recall

v1.0.2

Published

Local-first Pi package for read-only session indexing, manual recall, and optional auto-recall

Readme

pi-session-recall

English | 中文

本地优先的 Pi package:只读索引 Pi session,手动搜索,可选自动召回(v1.0.2,默认关闭)。

仓库地址:github.com/gchigoo/pi-session-recall

要求

  • Node.js >=22.19.0
  • Pi @earendil-works/pi-coding-agent 0.81.1
  • OS:Windows / Linux / macOS;Session:Pi JSONL v3

安装

# 从 npm 安装
npm i -g pi-session-recall
# 或本地路径安装到 Pi
pi install /absolute/path/to/pi-session-recall
# 开发加载
pi -e ./extensions/index.ts

安装本身不扫描历史。Package 具备本机权限——只安装可信源码。

快速开始

# Companion CLI
pi-session-recall setup --root ~/.pi/agent/sessions
pi-session-recall index
pi-session-recall search "认证" --scope project --json

# 在 Pi TUI
/recall setup
/recall search 认证
/recall search --all shared keyword
/recall config auto on   # 可选;确认后临时注入相关历史

Agent tool:session_recall({ query, limit? }) — 仅当前 project。

自动召回:before_agent_start 检索 + 固定 trust rule;context 注入 versioned envelope(不写 JSONL,≤4 条 / ≤600 tokens)。

配置

| 项 | 默认 | 说明 | | ------------------------ | ------------------------------- | ----------------------------- | | PI_SESSION_RECALL_HOME | ~/.pi/agent/pi-session-recall | data-home | | autoRecall | false | /recall config auto on\|off | | 手动 / tool limit | 5(max 20 / 10) | runtime_config |

安全与隐私

  • 不修改 Pi 原始 JSONL
  • 索引为明文本地副本;known secret 脱敏 / 拒绝;未知 secret 可能残留
  • POSIX:data-home 0700,index.sqlite / -wal / -shm 0600;Windows 依赖默认 ACL,不额外改权限
  • tool 输出不含 path;thinking / tool 内容不索引
  • 跨项目 fork 不泄漏;partial rebuild 时自动召回关闭
  • 默认日志不含 query / 正文 / 绝对路径

清理边界

| 操作 | 删除 | 保留 | | ------------- | ---------------------- | ------------------------------------------ | | purge-index | chunks / FTS / cursors | data-home、Pi JSONL | | purge-data | 整个扩展 data-home | Pi JSONL(需重启进程后再 setup) | | 移除 package | 扩展注册 | data-home(除非另跑 purge-data)、Pi JSONL |

开发与质量门

npm install
npm run check
npm run test:integration
npm run test:security
npm run eval:recall
npm run bench:recall
npm run test:package
npm run pack:dry
# 或
npm run release:gate

Changelog:CHANGELOG.md。