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

@nqbao/pi-inbox

v0.1.1

Published

Inter-session communication extension for Pi — file-based, channel-oriented, threaded messaging between independently-running Pi sessions

Readme

pi-inbox

Allow multiple Pi sessions to talk to each other while still staying coherent, with a small agent-facing surface and policy-driven behavior inside the extension.

Install

Install from npm through Pi:

pi install npm:@nqbao/pi-inbox

Or load it locally during development:

pi -e ./index.ts

Package

This is a Pi package and exposes its extension through package.json:

{
  "pi": {
    "extensions": ["./index.ts"]
  }
}

pi-inbox is designed around a simple rule: keep protocol complexity inside Pi, and keep the agent interface as small as possible. The extension focuses on policy between Pi sessions so they can talk to each other without creating too much confusion for the agent, while the agent itself ideally only needs to understand:

  • a message was delivered
  • reply with inbox_post(channel, message) if a reply is needed

Current Shape

  • Pure file-system transport
  • Channel-oriented messaging
  • Auto-polling and notification injection
  • One agent-facing tool: inbox_post
  • User-facing commands for subscribe, unsubscribe, post, clear, and status

Current implementation files:

Product Position

pi-inbox is a messaging primitive, not an orchestration runtime.

It is meant to let independent Pi sessions talk to each other while keeping the model loop simple. Coordination complexity such as delivery behavior, claiming, retries, batching, or response shaping should live inside the extension rather than in additional agent tools.

This means pi-inbox focuses on policy among agents:

  • who should receive a message
  • whether a reply is expected
  • whether a message is informational or claimable
  • how broadly a message should be delivered
  • whether responses should be constrained
  • whether urgent items should be broken out from normal batches

The goal is operational sophistication with cognitive simplicity.

Design Principles

  • Hide protocol, expose intent
  • Keep the agent-facing communication API minimal
  • Push messages to the agent instead of making the agent poll
  • Keep discovery primarily user-facing
  • Use one transport model for both broadcast and peer-to-peer messaging
  • Prefer delivery policy over extra coordination tools

Communication Model

Channels are the core primitive.

Examples:

  • shared channel: code-review
  • shared channel: orchestrator
  • peer-specific channel: _dm.worker-abc

Both broadcast-style and peer-to-peer communication should fit within the same channel model.

Current channel names may only contain lowercase letters, ., _, and -.

Policy Direction

The longer-term direction is to let Pi manage communication policy internally while preserving the same small external interface.

Examples of policy dimensions:

  • audience: broadcast, selective, direct
  • reply expectation: read-only, reply-allowed, single-claimer
  • constraints: free-form, yes/no, fixed choices, short structured reply
  • priority: high, normal, low

These policies are intended to shape delivery and notification behavior without growing the tool surface.

Current Tool

inbox_post(channel, message)

Posts a message to a subscribed channel.

Current behavior:

  • rejects unsubscribed channels
  • writes to the channel log
  • advances cursor to avoid self-notification

See tools.ts.

Commands

Current user-facing commands:

  • /inbox-subscribe <channel>
  • /inbox-unsubscribe <channel>
  • /inbox-status
  • /inbox-post <channel> <message>
  • /inbox-clear <channel>

Commands are for user control and inspection. Discovery and richer session awareness should be added here before becoming agent-visible capabilities.

Transport

pi-inbox uses append-only messages.jsonl files under a local inbox directory.

Default shape:

~/.pi/inbox/
  default/
    channels/
      code-review/
        messages.jsonl

This keeps the system:

  • local
  • durable
  • inspectable
  • offline-tolerant
  • free of broker/daemon requirements

Roadmap

Planned work is documented in PLAN.md.

The main roadmap direction is not “more tools.” It is richer internal policy with a stable, simple agent-facing model.