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

@amaster.ai/pi-channels

v0.1.2-beta.2

Published

Pi extension for native messaging channels including Feishu, WeCom, and webhooks.

Readme

@amaster.ai/pi-channels

Pi extension for native messaging channels.

This package follows the same extension shape as the open-source @e9n/pi-channels package: it registers a notify tool, channel events, route aliases, and an optional chat bridge that turns incoming channel messages into pi prompts.

It does not depend on @e9n/pi-channels at runtime. That package is published as a standalone extension source package with the older @mariozechner/* peer namespace and Slack/Telegram dependencies. This package keeps the same channel contract while targeting this repo's @earendil-works/* API surface and native Feishu/WeCom adapters.

Channels

  • feishu - Native Feishu/Lark app messaging backed by the official @larksuiteoapi/node-sdk. Supports outgoing text messages, WebSocket events by default, and HTTP event callbacks as a fallback.
  • wecom - Native WeCom self-built app messaging. Supports outgoing text messages, appchat messages, encrypted HTTP callbacks for text messages, token caching, request timeouts, and actionable API errors such as trusted-IP failures.
  • webhook - Generic outgoing HTTP requests.

Example

{
  "pi-channels": {
    "adapters": {
      "feishu": {
        "type": "feishu",
        "appId": "${FEISHU_APP_ID}",
        "appSecret": "${FEISHU_APP_SECRET}",
        "eventMode": "websocket",
        "respondToMentionsOnly": true
      },
      "wecom": {
        "type": "wecom",
        "corpId": "${WECOM_CORP_ID}",
        "agentId": "${WECOM_AGENT_ID}",
        "secret": "${WECOM_SECRET}",
        "timeoutMs": 15000,
        "token": "${WECOM_CALLBACK_TOKEN}",
        "encodingAesKey": "${WECOM_ENCODING_AES_KEY}",
        "incoming": {
          "enabled": true,
          "port": 8788,
          "path": "/wecom/events"
        }
      }
    },
    "routes": {
      "ops": {
        "adapter": "feishu",
        "recipient": "oc_xxx"
      }
    },
    "bridge": {
      "enabled": true
    }
  }
}

Feishu modes

WebSocket is the default and recommended mode because it does not require a public callback URL:

{
  "type": "feishu",
  "appId": "${FEISHU_APP_ID}",
  "appSecret": "${FEISHU_APP_SECRET}",
  "eventMode": "websocket",
  "respondToMentionsOnly": true,
  "allowedChatIds": ["oc_xxx"]
}

Use HTTP callback mode when the deployment already exposes a Feishu event URL. The SDK handles challenge responses, token verification, and encrypted event payloads:

{
  "type": "feishu",
  "appId": "${FEISHU_APP_ID}",
  "appSecret": "${FEISHU_APP_SECRET}",
  "eventMode": "http",
  "verificationToken": "${FEISHU_VERIFICATION_TOKEN}",
  "encryptKey": "${FEISHU_ENCRYPT_KEY}",
  "botOpenId": "ou_xxx",
  "incoming": {
    "port": 8787,
    "path": "/feishu/events"
  }
}

Set "eventMode": "off" for outgoing-only usage.

Tool

notify(action: "send", adapter: "ops", text: "hello")
notify(action: "list")
notify(action: "test", adapter: "ops")

For Feishu, recipients default to chat_id. Prefix the recipient to override the receive id type:

chat_id:oc_xxx
open_id:ou_xxx
user_id:abc123
email:[email protected]

For WeCom, recipients default to touser. Prefix the recipient to send to parties or tags. Prefix with chat: or appchat: to use the WeCom appchat API:

user:zhangsan
party:2
tag:7
appchat:chat-id

If WeCom returns 60020 not allow to access from your ip, the adapter raises a typed WeComApiError with category ip_whitelist. Configure the trusted IP in the WeCom console, or run pi behind a fixed egress proxy that is allowed by the enterprise.

Events

  • channel:send
  • channel:receive
  • channel:register
  • channel:remove
  • channel:list

Commands

/channel list
/channel bridge on
/channel bridge off
/channel bridge status