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

@costrict/notify

v1.0.7

Published

Multi-channel notification plugin for CoStrict - supports system desktop, Bark, and WeChat Work notifications

Downloads

448

Readme

CoStrict-System-Notify

Desktop notification plugin for CoStrict.

Features

Monitors human intervention events and sends notifications via multiple channels when:

  • Permission requests - Tool execution requires user permission
  • Question asked - AI needs user input
  • Session idle - AI waiting for user input

Notification Channels

System Notification (Default Enabled)

Desktop notifications using node-notifier - works across Windows, macOS, and Linux.

Bark Notification

Push notifications via Bark service (iOS/macOS).

WeChat Work Webhook (Default Disabled)

Push notifications via WeChat Work (企微) webhook service.

Configuration

Configure notification channels using environment variables:

# Enable/disable notification channels
NOTIFY_ENABLE_SYSTEM=false   # System notification (default: false, set to true to enable)
NOTIFY_ENABLE_BARK=false     # Bark notification (default: false)
NOTIFY_ENABLE_WECOM=false    # WeChat Work notification (default: false)

# Bark configuration (required if Bark enabled)
BARK_URL="https://api.day.app/YOUR_BARK_KEY"

# WeChat Work configuration (required if WeChat Work enabled)
# Option 1: Full webhook URL
WECOM_WEBHOOK_URL="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY"

# Option 2: Just the KEY (URL will use default base)
WECOM_WEBHOOK_KEY="YOUR_KEY"

Examples

Enable system notifications:

export NOTIFY_ENABLE_SYSTEM=true

Enable Bark notifications:

export NOTIFY_ENABLE_BARK=true
export BARK_URL="https://api.day.app/YOUR_BARK_KEY"

Enable multiple channels:

export NOTIFY_ENABLE_SYSTEM=true
export NOTIFY_ENABLE_BARK=true
export BARK_URL="https://api.day.app/YOUR_BARK_KEY"

Enable WeChat Work notifications (with KEY only):

export NOTIFY_ENABLE_WECOM=true
export WECOM_WEBHOOK_KEY="YOUR_KEY"

Enable WeChat Work notifications (with full URL):

export NOTIFY_ENABLE_WECOM=true
export WECOM_WEBHOOK_URL="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY"

Enable all channels:

export NOTIFY_ENABLE_SYSTEM=true
export NOTIFY_ENABLE_BARK=true
export NOTIFY_ENABLE_WECOM=true
export BARK_URL="https://api.day.app/YOUR_BARK_KEY"
export WECOM_WEBHOOK_KEY="YOUR_KEY"

Architecture

The plugin implements a single hook:

  • intervention.required hook - Receives notification events and displays desktop notifications

The filtering logic for idle events (main session vs sub-agent) is handled by the TDD plugin which triggers this hook. This plugin simply displays whatever notifications it receives.

Installation

Add to CoStrict Config

Add to your ~/.config/costrict/config.json:

{
  "plugin": ["@costrict/notify"]
}

Build Plugin

cd D:/DEV/costrict-notify
bun install

No build step required - pure JavaScript implementation.

Configuration Template

Copy .env.example to create your own environment configuration:

cp .env.example .env
# Edit .env with your notification settings

Project Structure

costrict-notify/
├── src/
│   └── index.js          # Main plugin code with multi-channel support
├── package.json          # Dependencies and scripts
├── .env.example          # Environment configuration template
├── .gitignore           # Git ignore rules
├── LICENSE              # MIT License
└── README.md            # This file

Notification Details

Permission Notification

  • Trigger: intervention.required hook (type: "permission")
  • Title: "需要权限"
  • Message: Permission request message

Question Notification

  • Trigger: intervention.required hook (type: "question")
  • Title: "问题"
  • Message: First question text

Idle Notification

  • Trigger: intervention.required hook (type: "idle")
  • Title: "会话空闲"
  • Message: "AI 正在等待您的输入"
  • Filtered: Only for main sessions (handled by TDD plugin)

Technical Details

  • Uses node-notifier v10.0.1 for cross-platform desktop notifications
  • Supports multiple notification channels (System, Bark, WeChat Work)
  • Configurable via environment variables
  • Implements intervention.required hook
  • Pure JavaScript - no build step required
  • Compatible with CoStrict plugin system
  • Smart filtering delegated to TDD plugin

License

MIT