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

@0xsero/opencode-queue

v0.1.0

Published

Message queue plugin for OpenCode - control message flow with hold/immediate modes

Readme

OpenCode Message Queue Plugin

queue-power.svg

npm version

Control how messages behave while a session is running. Queue them up or send them immediately.

NOTE

Be aware that when a message is sent while model is running it looks like it's sent, then when the model is really done it gets sent again.

I can't fix that yet, but the functionality does work the model won't see the 2nd message until after it's done

Modes

| Mode | Behavior | |------|----------| | immediate | Messages are sent right away (default) | | hold | Messages are queued until the current run finishes, then sent in order |

Installation

cd .opencode
bun add @0xsero/open-queue

Then add to your .opencode/opencode.jsonc:

{
  "plugin": ["@0xsero/open-queue"]
}

Optionally, copy the slash command to your project:

cp node_modules/@0xsero/open-queue/command/queue.md .opencode/command/

Usage

Slash Command

The easiest way to control the queue is with the /queue command:

/queue status     # Check current mode and queue size
/queue hold       # Start queueing messages
/queue immediate  # Send messages immediately (drains any queued)

Environment Variable

Set the initial mode via environment variable:

# Start in hold mode
OPENCODE_MESSAGE_QUEUE_MODE=hold opencode

# Start in immediate mode (default)
OPENCODE_MESSAGE_QUEUE_MODE=immediate opencode

Programmatic (via LLM)

The plugin exposes a queue tool that the LLM can invoke directly:

  • "Set queue mode to hold"
  • "Check queue status"
  • "Switch to immediate mode"

How It Works

Hold Mode

When in hold mode:

  1. Incoming messages are intercepted by the chat.message hook
  2. Message parts are converted and stored in a per-session queue
  3. Text parts are marked as ignored to hide them from the current run
  4. When the session becomes idle (session.status or session.idle events), queued messages are drained in order via client.session.prompt()

Immediate Mode

When in immediate mode:

  1. Messages pass through without modification
  2. Any existing queued messages are drained when switching from hold to immediate

API

Tool: queue

| Action | Description | |--------|-------------| | status | Returns current mode, queue size, and session busy state | | hold | Sets mode to hold (queue messages) | | immediate | Sets mode to immediate and drains any queued messages |

Events Handled

  • session.status - Tracks busy/idle state, drains queue when idle
  • session.idle - Alternative idle detection, drains queue

Hooks Used

  • chat.message - Intercepts messages in hold mode, queues them, marks text as ignored

Limitations

  • Best-effort queueing: OpenCode does not yet allow plugins to fully defer message creation. The plugin hides text content but non-text attachments may still be sent.
  • Global mode: The mode is global across all sessions. Per-session mode could be added if needed.
  • Plugin scope: Queued messages are lost if OpenCode restarts.

Links

License

MIT