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

@jshsakura/opencode-telegram-bot-plugin

v1.1.6

Published

OpenCode plugin for Telegram notifications - get notified when tasks complete, respond to permission requests via Telegram

Readme

@jshsakura/opencode-telegram-bot-plugin

OpenCode plugin that sends smart Telegram notifications — only what matters, beautifully formatted.

Features

  • 🔔 Permission request handling with inline buttons (Allow / Always / Reject)
  • Smart idle notifications — shows whether the session completed or is waiting for your input
  • 📊 Session summary with file change stats and expandable file list
  • 📋 Todo completion summaries
  • Error notifications — filtered to only show real errors (not aborts or subagent noise)
  • 🤫 Subagent noise filtering — background/unnamed sessions are silently ignored
  • 🌐 Multi-language support (Korean, English)
  • 🔁 Duplicate notification prevention with configurable TTL
  • 409 Conflict safe — multiple OpenCode instances don't fight over polling

Installation

npm install -g @jshsakura/opencode-telegram-bot-plugin

Update

npm update -g @jshsakura/opencode-telegram-bot-plugin

After updating, restart OpenCode.

Setup

1. Create a Telegram Bot

  1. Message @BotFather on Telegram
  2. Send /newbot and follow the instructions
  3. Copy the bot token

2. Get Your Chat ID

  1. Send any message to your bot
  2. Open: https://api.telegram.org/bot<TOKEN>/getUpdates
  3. Find "chat":{"id":123456789} — that's your chat ID

3. Set Environment Variables

export OPENCODE_TELEGRAM_BOT_TOKEN="your-bot-token"
export OPENCODE_TELEGRAM_CHAT_ID="your-chat-id"

Note: This plugin uses the OPENCODE_TELEGRAM_ prefix to avoid conflicts with other Telegram plugins (e.g. Claude Code's TELEGRAM_BOT_TOKEN).

4. Add to OpenCode Global Config

Add to ~/.config/opencode/opencode.json:

{
  "plugin": [
    "@jshsakura/opencode-telegram-bot-plugin"
  ]
}

5. Restart OpenCode

opencode

Configuration

| Variable | Description | Default | |----------|-------------|---------| | OPENCODE_TELEGRAM_BOT_TOKEN | Your Telegram bot token (required) | - | | OPENCODE_TELEGRAM_CHAT_ID | Your Telegram chat ID (required) | - | | OPENCODE_TELEGRAM_LANGUAGE | Language for notifications (ko or en) | ko | | OPENCODE_TELEGRAM_NOTIFY_SESSION | Session idle notifications | true | | OPENCODE_TELEGRAM_NOTIFY_PERMISSION | Permission request notifications | true | | OPENCODE_TELEGRAM_NOTIFY_TODO | Todo completion notifications | true | | OPENCODE_TELEGRAM_NOTIFY_SUBTASK | Subtask start notifications | true | | OPENCODE_TELEGRAM_NOTIFY_ERROR | Error notifications | true | | OPENCODE_TELEGRAM_NOTIFY_FILE_LIST | Expandable file list in session summary | true | | OPENCODE_TELEGRAM_DEDUP_ENABLED | Enable duplicate notification filtering | true | | OPENCODE_TELEGRAM_DEDUP_TTL_MS | Deduplication TTL in milliseconds | 300000 (5 min) |

Noise Filtering (v1.1.0+)

The plugin automatically suppresses notifications from:

  • Subagents — sessions with titles like (@explore subagent), (@oracle subagent) etc.
  • Unnamed background sessions — sessions where the title is just a raw session ID (ses_xxxx)
  • Generic errorsThe operation was aborted. and Model not found: errors are silently dropped
  • Todo completions from subagent/background sessions are also suppressed (v1.1.4+)
  • Subtask notifications from subagent sessions or with subagent-style agent names are also suppressed (v1.1.4+)

This keeps your Telegram clean when using multi-agent workflows like Oh My OpenCode.

Idle Notification Debounce (v1.1.2+)

Idle notifications are delayed 15 seconds before being sent. If the session goes busy again within that window (e.g. due to system-reminder injections), the notification is cancelled.

This prevents rapid idle→busy→idle cycles from spamming your Telegram.

Smart Wait Detection (v1.1.0+)

When a session goes idle, the plugin checks if there are unfinished todos:

  • Unfinished todos remaining⏳ 사용자 입력을 기다리고 있습니다 — you need to act
  • All todos done✨ 작업 완료 및 사용자 대기 — clean completion

No extra LLM calls or API requests — uses already-received todo event data.

Notification Filtering

Control which notifications you receive:

export OPENCODE_TELEGRAM_NOTIFY_SESSION="false"     # Disable session idle
export OPENCODE_TELEGRAM_NOTIFY_FILE_LIST="false"   # Disable file list
export OPENCODE_TELEGRAM_NOTIFY_TODO="false"        # Disable todo summaries
export OPENCODE_TELEGRAM_NOTIFY_SUBTASK="false"     # Disable subtask notifications
export OPENCODE_TELEGRAM_NOTIFY_ERROR="false"       # Disable errors (not recommended)

Permission notifications cannot be disabled as they require your response.

Deduplication

Prevents duplicate notifications within a time window:

export OPENCODE_TELEGRAM_DEDUP_ENABLED="true"
export OPENCODE_TELEGRAM_DEDUP_TTL_MS="600000"   # 10 minutes

Notification Reference

| Event | Notification | |-------|-------------| | Task completes (waiting for input) | ⏳ Waiting for user input | | Task completes (all done) | ✨ Task completed | | Permission needed | 🔔 Permission Request (with buttons) | | All todos done | 📋 All Tasks Complete | | Error occurred | ❌ Error (real errors only) |

License

MIT