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

@dcrays/dcgchat-test

v0.3.15

Published

OpenClaw channel plugin for 书灵墨宝 (WebSocket)

Readme

OpenClaw 书灵墨宝 插件

连接 OpenClaw 与 书灵墨宝 产品的通道插件。

架构

┌──────────┐      WebSocket       ┌──────────────┐      WebSocket      ┌─────────────────────┐
│ Web 前端 │  ←───────────────→   │  公司后端服务  │  ←───────────────→  │ OpenClaw(工作电脑) │
└──────────┘                      └──────────────┘   (OpenClaw 主动连)   └─────────────────────┘
  • OpenClaw 插件主动连接后端的 WebSocket 服务(不需要公网 IP)
  • 后端收到用户消息后转发给 OpenClaw,OpenClaw 回复后发回后端

快速开始

1. 安装插件

pnpm openclaw plugins install -l /path/to/openclaw-dcgchat

2. 配置

openclaw config set channels.dcgchat.enabled true
openclaw config set channels.dcgchat.wsUrl "ws://your-backend:8080/openclaw/ws"

3. 启动

pnpm openclaw gateway

消息协议(MVP)

下行:后端 → OpenClaw(用户消息)

{ "type": "message", "userId": "user_001", "text": "你好" }

上行:OpenClaw → 后端(Agent 回复)

{ "type": "reply", "userId": "user_001", "text": "你好!有什么可以帮你的?" }

配置项

| 配置键 | 类型 | 说明 | |--------|------|------| | channels.dcgchat.enabled | boolean | 是否启用 | | channels.dcgchat.wsUrl | string | 后端 WebSocket 地址 |

开发

# 安装依赖
pnpm install

# 类型检查
pnpm typecheck

文件结构

  • index.ts - 插件入口
  • src/channel.ts - ChannelPlugin 定义
  • src/runtime.ts - 插件 runtime
  • src/types.ts - 类型定义
  • src/monitor.ts - WebSocket 连接与断线重连
  • src/bot.ts - 消息处理与 Agent 调用

后续迭代

  • [ ] Token 认证
  • [ ] 流式输出
  • [ ] Typing 指示
  • [ ] messageId 去重
  • [ ] 错误消息类型