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

@puckguo123/session

v0.2.1

Published

puck session persistence: append-only JSONL transcripts. Zero dependencies.

Readme

@puckguo123/session

Append-only JSONL session transcripts with crash-safe append and a streaming reader. Zero dependencies.

Sessions are stored as one file per id (UUID or import-prefixed slug), each containing newline-delimited JSON events: header, message, compaction, etc.

Install

npm install @puckguo123/session

Quick start

import { SessionStore } from "@puckguo123/session";

const store = new SessionStore(".puck/sessions");
store.append(sessionId, { type: "header", id: sessionId, createdAt: Date.now() });
store.append(sessionId, { type: "message", message: { role: "user", content: "hi" } });

const list = store.list();          // string[] of session ids, newest first
const sess = store.load(sessionId); // { id, messages, compactions, ... }

Cross-harness import

Already have sessions from pi, claude-code, or codex? Use the import subpath to convert them into puck format:

import { importExternalSession, scanExternalSessions } from "@puckguo123/session/import";

const pi = scanExternalSessions({ sources: ["pi"] });
for (const info of pi) {
  importExternalSession(info.path, ".puck/sessions", { id: `import-pi-${info.slug}` });
}

Imported sessions are tagged with an importedFrom header so the picker can render them differently.

API surface

  • new SessionStore(dir) — directory of *.jsonl files
  • .append(id, event) — atomic append (writes a single fsyncd line)
  • .load(id) — full session: messages + compactions + meta
  • .list() — ids sorted by mtime desc
  • .stats(id){ turns, assistantMessages, toolCalls, compactions }
  • .projectCwd — derived project dir (for the header.cwd-less legacy files)
  • importExternalSession / scanExternalSessions (subpath ./import)

License

MIT — see LICENSE.