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

@ulthon/ul-opencode-event

v0.1.54

Published

OpenCode notification plugin - sends notifications via email, DingTalk, or Feishu when session events occur

Readme

@ulthon/ul-opencode-event

Never miss an OpenCode notification, even when you're away from your desk.

OpenCode multi-channel notification plugin that keeps you informed wherever you are. Get notified when tasks complete or errors occur via email, DingTalk, or Feishu.

Why ul-opencode-event?

  • Remote Development Friendly - Get notified when your AI coding agent finishes a task
  • Multi-Channel Support - SMTP email, DingTalk robot, Feishu robot, with more planned
  • Real-time Alerts - Immediate notifications on session idle or error events
  • Easy Configuration - Simple JSON config with template variables

Roadmap

| Channel | Status | Description | |---------|--------|-------------| | SMTP (Email) | Available | Email notifications via any SMTP server | | DingTalk | Available | DingTalk robot notifications | | Feishu | Available | Feishu robot notifications | | Webhook | Planned | HTTP webhook for custom integrations | | Telegram | Planned | Telegram bot notifications | | Slack | Planned | Slack incoming webhooks | | WeChat Work | Planned | Enterprise WeChat |

Have a channel request? Open an issue on our Gitee repo!

Quick Start

npm install @ulthon/ul-opencode-event
cp node_modules/@ulthon/ul-opencode-event/examples/ul-opencode-event.json ./
# Edit config with your SMTP credentials
npx @ulthon/ul-opencode-event test

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

{ "plugin": ["@ulthon/ul-opencode-event"] }

Configuration

File Locations

  1. Project-level: .opencode/ul-opencode-event.json or ./ul-opencode-event.json
  2. Global: ~/.config/opencode/ul-opencode-event.json

Project-level config overrides global (channels merged by name). Custom variables can be added via the top-level customVariables field, see Configuration for details.

Minimal SMTP Example

{
  "channels": [{
    "type": "smtp",
    "enabled": true,
    "name": "My Email",
    "config": {
      "host": "smtp.qq.com",
      "port": 465,
      "secure": true,
      "auth": { "user": "[email protected]", "pass": "your-app-password" }
    },
    "recipients": ["[email protected]"],
    "events": { "idle": true, "error": true }
  }]
}

Common SMTP Servers

| Provider | Host | Port | Auth | |----------|------|------|------| | QQ Mail | smtp.qq.com | 465 | Authorization code | | 163 Mail | smtp.163.com | 465 | Authorization code | | Gmail | smtp.gmail.com | 587 | App Password | | Outlook | smtp.office365.com | 587 | Password |

For QQ/163 use the authorization code, not login password. For Gmail use an App Password with 2FA.

Other Channels

Events

| Event | Default | Description | |-------|---------|-------------| | created | false | When a new session starts | | idle | true | When a session completes | | error | true | When a session encounters an error |

Template Variables

| Variable | Description | Events | |----------|-------------|--------| | {{eventType}} | Event type (created, idle, error) | All | | {{timestamp}} | ISO 8601 timestamp | All | | {{projectName}} | Project short name | All | | {{projectPath}} | Project full path | All | | {{sessionId}} | Session ID | All | | {{message}} | Completion message | idle | | {{duration}} | Task duration | idle | | {{error}} | Error message | error | | {{hostname}} | Machine hostname | All | | {{localIP}} | Local IP address | All | | {{pluginVersion}} | Plugin version | All | | {{osPlatform}} | OS platform (win32, darwin, linux) | All |

Full variable list (68+ variables) including system info and custom variables: see Configuration - Template Variables

See Configuration - Templates for customization details.

CLI Tool

npx @ulthon/ul-opencode-event test              # Test all channels
npx @ulthon/ul-opencode-event test --channel "My Email"  # Test specific channel
npx @ulthon/ul-opencode-event test --no-send     # Verify connection only

Documentation

Configuration & Usage

| Document | Description | |----------|-------------| | Configuration | Config file locations, merge rules, events | | SMTP Channel | Email configuration, IPv4/IPv6, FAQ | | DingTalk Channel | Configuration, @mentions, FAQ | | Feishu Channel | Configuration, card format, FAQ | | Template Configuration | Template variables and customization | | Channel Development | Developing new notification channels |

Architecture

| Document | Description | |----------|-------------| | Event Data Flow | Event processing pipeline, token data flow |

Known Issues

| Document | Description | |----------|-------------| | Token Zero on Mid-Event | question/status events show Token(0/...) (fixed in v0.1.45) |

Troubleshooting

  • Wrong password: Use authorization code for QQ/163, App Password for Gmail
  • Wrong port: Use 465 for SSL, 587 for STARTTLS
  • No notifications: Check enabled: true, event types, and config file location
  • IPv4/IPv6: Both supported; if IPv6 unstable, set localAddress to "0.0.0.0"
  • Token shows 0: Known issue on mid-event notifications (question/status), see Token Zero on Mid-Event
  • Debug mode: UL_OPENCODE_EVENT_DEBUG=1 npx @ulthon/ul-opencode-event test

Local Development

npm run build && node dist/cli.js test
# Or: npm link && npx @ulthon/ul-opencode-event test

License

MIT