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-orca/messages

v0.0.5

Published

Inter-session messaging with inbox delivery

Downloads

496

Readme

pi-orca-messages

Inter-session messaging for Pi coding-agent sessions.

License: MIT

Overview

This extension lets multiple Pi sessions running against the same project deliver messages to each other. A "primary" session can ask a "secondary" session a question, an agent can broadcast a status update, and so on. Messages arrive in the recipient's chat as if the user had pasted them in — the recipient's LLM responds on its own turn without manual prompting.

Architecture in one screen:

  • Store / inbox split. Senders write the message body once to ~/.pi/agent/sessions/<project-slug>/orca/messages/store/<yyyy>/<mm>/<dd>/msg-<uuid>.md and create a small .ref pointer in each recipient's inbox/<recipient-session-id>/. The store is immutable; the inbox is the work queue.
  • Registry. Each running session registers itself in <project-slug>/orca/registry.yaml at session_start (and deregisters on shutdown), recording its UUID, optional human-friendly name, PID, and labels. Senders look recipients up here.
  • Delivery into the LLM. Two paths, both atomic (deliver + consume in one shot):
    • Idle push (pi.sendUserMessage) — every polling.idleIntervalSeconds (default 30s) the extension peeks the inbox, and if the session is idle it renders all unread messages as a rich user prompt (sender name + UUID, sent-at, title, labels, body) and pushes them via pi.sendUserMessage. The agent responds as if the recipient typed a summary themselves.
    • Context-hook inject — when a turn is already starting (user typed something, or idle-push deferred because the session was busy), the context event hook injects the same rich prompt into the outbound event.messages array.
  • Each path consumes only the refs it just delivered, so messages are never silently dropped.

See the Pi Orca specification §4 for full details.

Tool

{
  "name": "message",
  "parameters": {
    "action": "send",          // send | broadcast | read | list | register | sessions
    "to": "primary",           // session UUID, name, or unique prefix of either
    "title": "Auth scan results",
    "body": "Found 3 files...",
    "labels": { "topic": "auth-refactor" }
  }
}

The to field is resolved through resolveSession() — exact UUID match wins, then exact name, then unique prefix on UUID, then unique prefix on name (case-insensitive). Ambiguous prefixes return an error listing the candidates.

Slash commands

| Command | Description | |---|---| | /messages | Open the interactive overlay (inbox / detail / sessions / compose). | | /messages send <session> "<title>" "<body>" | Send to a UUID, name, or unique prefix. Quotes preserve multi-word arguments. | | /messages broadcast "<title>" "<body>" | Send to every registered session except yourself. | | /messages read | Consume your inbox manually (turns refs into a one-shot dump). | | /messages list | List all messages in the project store without consuming refs. | | /messages sessions | List currently-registered sessions, leading with each session's display name. |

The <session> argument may be a UUID, a /name-set display name, or a unique prefix of either. Quoted args ("…" / '…') preserve whitespace; backslash escapes work inside quotes.

Naming sessions

Pi's built-in /name <text> slash command sets a display name on the current session. The messages extension records the name in the registry so other sessions can address you by name instead of UUID. Renames propagate immediately when you next interact with the messages extension (slash command, tool, or overlay) and within polling.idleIntervalSeconds otherwise.

Logging / observability

The extension emits info-level entries to ~/.pi/agent/orca/log.jsonl for every meaningful lifecycle event:

  • send: <from> → <to> "<title>" (<msg-id>)
  • broadcast: <from> → N recipient(s) "<title>" (<msg-id>)
  • idle-poll → sendUserMessage: N message(s) (<titles>)
  • idle-poll: N unread, session not idle — deferring to context hook
  • context-inject: N message(s) → <recipient> (<titles>)

debug-level entries (one per .ref written or consumed) are emitted when logLevel: debug is set in config.yaml. Tail the log file to follow the flow end-to-end across multiple sessions.

Configuration

~/.pi/agent/orca/config.yaml (or <project>/.pi/orca/config.yaml):

polling:
  idleIntervalSeconds: 30   # how often the idle push checks the inbox

Dependencies

  • @pi-orca/core — shared types, utilities, bindSession(), tokenizeArgs(), registry helpers.

License

MIT License — see LICENSE for details.