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-agent-pulse

v0.2.0

Published

OpenCode TUI plugin that live-displays running subagents in the sidebar with busy/idle status, elapsed time, and click-through to the sub-session context.

Readme

opencode-agent-pulse

An OpenCode TUI plugin that live-displays running subagents (sub-agents/tasks) in the sidebar — name, owning agent, busy/idle status, and elapsed time. Coexists with oh-my-opencode-slim (OMO-Slim) without interfering.

Features

  • TUI only (OpenCode has no webview/activityBar; Web/desktop is unsupported).
  • Data sources: session.created (identify sub-sessions via properties.info.parentID) + session.status (busy/idle/retry) + message.part.updated (task tool part determines completion) + session.deleted / session.error.
  • Collapsible sidebar section: a small / arrow in the header toggles it on click, matching the built-in MCP/TODO sections (collapse state is driven by a solid signal for reactive re-rendering, same as the built-in sections).
  • Click-through: left-click a row to jump into that sub-session's context view.
  • Notifications (see below): subagent-batch completion, main-session turn completion, and interview waits (question / permission), each independently toggleable, with an optional "only when unfocused" gate and Windows Action Center toast support.
  • Internationalization: notification messages and the section title are localized — English (en, default) and Simplified Chinese (zh).
  • Multi-plugin stacking: only uses the sidebar_content slot (order: 950, after OMO-Slim's 900) and never touches the single-winner slots sidebar_title / sidebar_footer.

Installation

bun install
bun run build   # produces dist/index.js and dist/tui.js

Registering with OpenCode (user config directory ~/.config/opencode)

  1. Add the dependency in ~/.config/opencode/package.json (choose one):

    "opencode-agent-pulse": "file:<absolute path to this project>"

    Then run bun install (or use bun link).

  2. Add the package name to the "plugin": [...] array in opencode.json:

    "plugin": ["opencode-agent-pulse"]
  3. Also add it to the "plugin": [...] array in tui.json (matches OMO-Slim's dual registration; if exports["./tui"] already takes effect, the entry in tui.json can be removed).

  4. Restart opencode.

Notifications

The plugin can notify when a whole batch of subagents finishes and/or when the main session completes a turn. On Windows it posts a real Action Center toast via node-notifier (Windows Terminal cannot show api.attention.notify notifications — OSC 99/DEC 1004 unsupported, issue #35055); on other platforms it uses the built-in api.attention.notify with the done/subagent_done sounds.

Both notifications are enabled by default and can be toggled via plugin options (tuple form in the plugin array):

// opencode.json and/or tui.json
"plugin": [
  "oh-my-opencode-slim",
  ["opencode-agent-pulse", { "notifications": { "subagents": true, "mainSession": false } }]
]

| Option | Default | Effect | |---|---|---| | notifications.subagents | true | Notify when all delegated subagents of a batch have finished | | notifications.mainSession | true | Notify when the main (top-level) session finishes a conversation turn | | notifications.interview | true | Notify when the main session is blocked waiting for user input (question / permission approval) | | notifications.onlyWhenUnfocused | false | Only send notifications while the terminal window is unfocused (suppresses them while you are watching). On non-Windows terminals it relies on DEC 1004 focus reporting via the renderer. On Windows, where DEC 1004 blur events are unreliable, it instead checks the Win32 foreground window (GetForegroundWindow) against the plugin's process ancestry — the terminal is focused when the foreground window belongs to an ancestor process. When focus cannot be determined (Win32 unavailable), notifications are sent as usual so nothing is silently lost | | locale | "en" | Language for user-facing strings (notification messages + sidebar section title). Supported values: "en" and "zh" (Simplified Chinese) | | sidebar.showFocus | false | Show a small diagnostic line in the sidebar section with the current focus state (focus[backend] ●focused / ○blurred fg=<pid>) — handy for verifying the onlyWhenUnfocused gate |

Set the language with the top-level locale option (it applies to both notifications and the sidebar title):

["opencode-agent-pulse", { "locale": "zh" }]   // Chinese notifications + sidebar title

Usage

After starting opencode, trigger a subagent delegation (/agent or the Task tool) and the "Subagents" section appears in the sidebar, showing each subagent's agent, status (busy/idle/retry/done), and elapsed time in real time. Click the section header to collapse/expand it.

Project structure

├── package.json      # exports: "." -> server plugin, "./tui" -> TUI plugin
├── tsconfig.json     # strict + @opentui/solid JSX config
├── src/
│   ├── index.ts      # server plugin (placeholder; TUI side already subscribes, no duplicate state)
│   ├── tui.ts        # TUI plugin: sidebar_content slot + session event subscriptions
│   ├── notification.ts  # notification dispatch (non-Windows built-in vs Windows node-notifier toast)
│   ├── i18n.ts       # locale strings ("en" / "zh")
│   └── windows-focus.ts  # Windows-only foreground-window focus detection (bun:ffi + PowerShell fallback)
└── dist/             # bun build output

Notes

  • The TUI plugin module only does default export { id, tui }; it does not export server from the same module (the loader rejects it).
  • Rendering follows the same approach as OMO-Slim: local box/text helper functions (wrapping @opentui/solid's createElement/insert/setProp), so no JSX/babel plugin is needed; the build uses --external @opentui/core --external @opentui/solid --external solid-js to reuse the instances provided by the host runtime (solid-js provides createSignal, ensuring the same reactive runtime is shared with the host's @opentui/solid).
  • Windows notification delivery: api.attention.notify on Windows Terminal only plays a sound without showing a system notification (OSC 99/DEC 1004 unsupported, issue #35055). To still post a real Action Center toast on Windows, this plugin routes through node-notifier (which uses the bundled SnoreToast.exe) — see notification.ts.