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

context-capsules-runtime

v0.6.0

Published

Local immutable context capsules with native Git persistence

Readme

Context Capsules Runtime

A local CLI for preserving task context, code checkpoints and execution notes alongside isolated Git worktrees.

Prepare an immutable packet of selected input, assign it to a run, and record checkpoints that another session can reconstruct. Pivot when requirements change, hand off a checkpoint into a fresh worktree, and archive finished runs while retaining their history. Source commits and context history stay separate.

Start with the user guide for capsules vs. runs vs. checkpoints, the public API, and a runnable example that carries real results through preparation, acknowledgment, checkpoints, a pivot and handoff.

New runs use .context/execution/ for editable operational artifacts. Existing .context-capsule runs keep their recorded paths and history; obtain the actual root from the binding. Stage prerequisite drafts outside the source/context worktrees and establish the assignment before writing canonical execution artifacts. An unmanaged folder at either supported root is refused and preserved.

Use Node 22 and native Git. Run npm ci, then npm pack; packing performs a clean build automatically. Install the resulting tarball with --ignore-scripts; no compilation is needed after installation. npm test exercises the actual installed package in disposable repositories. See releasing for exact-artifact validation and provenance.

This repository builds two independently released packages. Build the viewer with npm run viewer:build; pack it with npm pack --workspace=context-capsules-viewer. Install both exact tarballs into the same npm prefix for source mode. Export reusable JSON with capsule export-history --source /path/to/project --output /tmp/history.json, then render without Git or the runtime using capsule-view --input /tmp/history.json. See the public export contract.

Discover usage from any directory with capsule --help (or -h). Use capsule prepare --help, capsule checkpoint --help, or any other command's help for required fields, editable JSON examples, result identities and recovery rules. Help is plain text and takes no additional flags; normal commands keep JSON output. No repository is needed to read help.

The Context Capsules skill guides agents through reading, acknowledgment, checkpoints, pivots, handoff, archive and recovery using the installed CLI help. It ships in the repository as a separate native skill package. Copy the skills/context-capsules directory into your agent's skills directory; for Codex, use ${CODEX_HOME:-$HOME/.codex}/skills/context-capsules. Preserve any existing customized copy. Invoke it with $context-capsules, for example: “Resume the Context Capsules assignment at /absolute/project/.worktrees/task-one.” The CLI must be installed separately and available on PATH or supplied by absolute path.

Retention and required reading are separate. Keep a recipient-specific reading map in execution/plan.md, with required paths/selections, pinned source identities and explicit expansion triggers for retained history. The index identifies one canonical plan and whether the retained material is a pinned copy, verified selection or subordinate execution notes. Every role uses assignment-specific source inspection and expands unresolved dependencies; generic full-read rules do not apply. Manifest-required input disclosure remains unchanged. See the skill's “Plan authority and recipient reading” section for authoring and fallback rules, and the bounded interface addendum when changing this contract. The runtime preserves bytes; agents validate selection coverage.

Use capsule-view --source /path/to/project to export an interactive offline history. The graph connects implementation commits, inputs, run states and checkpoints, with full trees and parent diffs. See the viewer guide.

Each run binds a source worktree to an independent context branch and checkout. The start response supplies explicit reading instructions. Acknowledgment records a session receipt while preserving dirty source and unpublished execution edits. Checkpoints retain the clean source commit and exact working execution bytes with their capsule and session receipt. Pivots replace input deliberately. Handoff reconstructs pinned code, input, plan and explicitly selected inherited evidence in a new run that requires its own acknowledgment. Archive closes recorded runs while retaining both worktrees and their history. S4-3.3 supplies complete lifecycle, compatibility and fresh native-session evidence for review; agent launch orchestration and remote integration remain deferred. Passing tests establish implementation evidence for review, not acceptance of the implementation.

A complete workflow is: prepare → start → read/status → acknowledge → checkpoint → prepare revised input → pivot → reread/acknowledge → checkpoint → handoff → archive the recorded origin. An archived checkpoint can also seed a new active run. Each successor needs its own receipt. New handoffs default to plan only; declare additional executionPaths for current decisions or proof. Historical payloads remain retained and capsule retrieve --help explains verified one-file retrieval. If an operation is incomplete, pause dependent writes and recover only after all writers and child Git commands have stopped.

Fresh start/handoff responses describe recipient reading, plan authority, archive and recovery. Historical responses keep their original wording so retries remain exact; the current skill supersedes their blanket inherited-file reading rule. Archival retains worktrees and history; it does not clean up or release the assignment.

The existing jasonbelmonti/context-capsules repository remains the historical design project. This repository contains the runtime implementation and its design documentation.

Use worktrees under .worktrees for changes. Verify durable planning artifacts with shasum -a 256 -c docs/checksums.sha256 from the repository root. Historical files have their own retained checksums and must be interpreted at their recorded revisions.

Runtime 0.6.0 owns capsule; independently versioned context-capsules-viewer 0.1.1 owns capsule-view. Migrating from the combined 0.4.1 package requires installing both packages. Later visualization updates can replace only the viewer. Native skill and Fleet pins change only through a separate adoption; see release and native staging commands.