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-tmux-callback

v0.1.4

Published

OpenCode plugin that turns tmux task observer callbacks into visible TUI session updates.

Downloads

53

Readme

opencode-tmux-callback

OpenCode plugin that converts tmux-task observer callbacks into visible session updates inside TUI / serve-hosted sessions.

It solves the "main session launched a tmux task, but cannot tell whether it is running, stalled, blocked, failed, or done" gap without adding network RPC between the main session and the tmux worker.

What It Does

  • injects TMUX_TASK_NOTIFY_SCRIPT into shell / bash tool executions automatically
  • creates a per-session notify script that observer sidecars can call
  • appends callback events into a project-local inbox under .opencode/tmux-task-callback/
  • watches that inbox inside the OpenCode process
  • injects visible callback messages back into the originating session

The underlying status source remains the filesystem:

  • tmux-observer.state.json
  • tmux-observer.final.json
  • tmux-observer.events.jsonl

This plugin only turns those facts into an active callback channel for the session host.

Installation

Add it to your OpenCode config:

{
  "plugin": [
    "[email protected]"
  ]
}

Callback Flow

main session shell tool
  -> plugin shell.env injects TMUX_TASK_NOTIFY_SCRIPT
  -> tmux observer calls notify script on status transition
  -> notify script appends JSONL event to project inbox
  -> plugin watcher consumes inbox event
  -> plugin injects callback into the same session

Default Message Policy

  • running: visible callback note via session/:id/message with noReply: true
  • done, blocked, failed, stalled(含 stall=suspect): actionable callback via session/:id/prompt_async

Actionable callbacks intentionally trigger a fresh model round so the main session can immediately inspect the callback's run_dir and continue handling, instead of only showing a queued note. stalled:suspect 也会触发自动处理,因为“疑似卡住”本身就是需要宿主会话立即判断的异常事件。

当项目同时安装 opencode-tool-livenessopencode-stability-guard 时,actionable callback 还会附带 .opencode/tool-liveness/{state,guard}.json 的摘要,帮助主会话在进入 run_dir 前先看到最近错误、孤儿 pending 和最近恢复动作。

Files Written

  • <project>/.opencode/tmux-task-callback/events.jsonl
  • <project>/.opencode/tmux-task-callback/notify/<session-id>.sh

Compatibility

This plugin is host-side only. It works with:

  • root-repo TUI sessions that offload to tmux -> gpt-supervisor
  • serve-hosted sessions where the session remains alive after offload

Heartbeat runner flows can continue to use wake-runner.sh; both mechanisms can coexist because they share the same observer callback instruction format:

  • tmux task running(...)
  • tmux task stalled(...)
  • tmux task failed(...)
  • tmux task blocked(...)
  • tmux task done(...)