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

opencode-wait-plugin

v0.1.1

Published

OpenCode plugin that holds /wait prompts until the session is idle.

Readme

opencode-wait-plugin

OpenCode plugin that adds a server-side /wait <message> command.

/wait holds a prompt outside the transcript while the current session is busy, then releases it only after the current assistant turn reaches idle. This is intentionally different from OpenCode's built-in QUEUED display, where queued messages are already saved and can be picked up by the next backend loop step.

Install

Use OpenCode's plugin installer:

opencode plugin opencode-wait-plugin --global

The package contains both server and TUI plugin targets. OpenCode loads server plugins from opencode.json[c] and TUI plugins from tui.json[c], so both entries are required:

  • the server plugin implements the reliable /wait queue
  • the TUI plugin adds slash autocomplete, a dialog, and local WAITING display for prompts submitted through the helper

If you need to pin a version:

opencode plugin [email protected] --global --force

Manual opencode.jsonc entry:

{
  "plugin": [["opencode-wait-plugin", { "enabled": true, "releaseTimeout": 15000 }]]
}

Manual tui.jsonc entry:

{
  "plugin": [["opencode-wait-plugin", { "enabled": true }]],
  "plugin_enabled": {
    "wait.plugin.tui": true
  }
}

Restart OpenCode after installing or updating the plugin.

Usage

In a session prompt:

/wait summarize the result after this turn finishes

Behavior:

  • /wait <message> while idle sends <message> immediately.
  • /wait <message> while busy stores the prompt in an in-memory FIFO for that session.
  • Only one waiting prompt is released per full assistant turn.
  • The server refreshes current session status when a /wait prompt is submitted, so it still waits correctly if it missed an earlier busy event.
  • Waiting messages are not persisted. Restarting OpenCode drops in-memory waiting state.

The TUI helper can be selected from slash autocomplete. If the prompt is empty, it opens a small dialog. If the prompt already contains text, it prefixes that text with /wait and submits it. Prompts submitted this way are shown in the sidebar under Waiting and as WAITING N beside the prompt until the saved text part appears in the transcript.

Local Development

bun install
bun run typecheck
bun run test
bun run build
npm pack --dry-run

For local OpenCode testing, build first and point both config files at the package root:

opencode.jsonc:

{
  "plugin": [["file:///home/tim/projects/wait_plugin", { "enabled": true, "releaseTimeout": 15000 }]]
}

tui.jsonc:

{
  "plugin": [["file:///home/tim/projects/wait_plugin", { "enabled": true }]],
  "plugin_enabled": {
    "wait.plugin.tui": true
  }
}

This repo includes .opencode/opencode.jsonc and .opencode/tui.json with those local package-root entries.

Manual Acceptance

This repo also includes .opencode/commands/wait-loop.md, which adds a /wait-loop command for manual acceptance testing. The command keeps the assistant turn busy across six separate tool-call checkpoints so normal queued messages would have chances to enter the loop.

  1. Start /wait-loop in OpenCode.
  2. Submit /wait first waiting message.
  3. Submit /wait second waiting message.
  4. Confirm neither message appears in the transcript while the current turn is busy.
  5. Confirm the first appears only after the current turn becomes idle.
  6. Confirm the second appears only after the first waiting prompt's assistant turn finishes.

Release

CI runs tests, typecheck, build, and npm pack --dry-run from the repo root.

opencode-wait-plugin must exist on npm before trusted publishing can be configured. Bootstrap the package once with an interactive npm login:

npm login --registry https://registry.npmjs.org
bun run typecheck
bun test
bun run build
npm publish --access public --tag latest --registry https://registry.npmjs.org

Then configure the trusted publisher:

npm trust github opencode-wait-plugin --repo timrichardson/wait_plugin --file release.yml --registry https://registry.npmjs.org

Equivalent npm website settings:

  • Publisher: GitHub Actions
  • Organization or user: timrichardson
  • Repository: wait_plugin
  • Workflow filename: release.yml
  • Environment name: leave blank

After trusted publishing is configured, releases publish to https://registry.npmjs.org when a stable v* tag matches package.json version:

git tag v0.1.2
git push origin v0.1.2

The release workflow uses npm trusted publishing with GitHub Actions OIDC and creates a GitHub release after npm publish succeeds.

Limits

  • The queue is process-local and in-memory.
  • The TUI Waiting display is local to prompts submitted through the plugin helper. Directly typing /wait <message> and pressing Enter still uses the reliable server queue, but OpenCode does not expose a plugin pre-submit hook for the TUI to mark that raw submission before it leaves the prompt.
  • The TUI helper cannot preserve every prompt detail in dialog/fallback submissions; direct prompt submissions through the normal prompt preserve the current prompt context.