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

@xiaokuc/ysbot

v0.2.4

Published

YSbot core: plugin runtime, task scheduler, curiosity bus and protocol bridge.

Readme

YSbot Core

YSbot Core 是一个插件化机器人运行时框架,用于调度事件、任务、好奇心、插件和协议桥。

安装

npm install @xiaokuc/ysbot

快速开始

Windows 可以直接双击:

run.bat

或者使用命令行启动器:

npm run cli

也可以直接启动核心:

npm start

查看环境、插件和协议探测结果:

node cli.js --list

配置

复制配置模板:

Copy-Item docs\.env.example .env

主要配置:

  • ONEBOT_WS_URL:外部协议端 WebSocket 地址
  • MANAGEMENT_HOST / MANAGEMENT_PORT:管理服务器地址
  • MANAGEMENT_USER / MANAGEMENT_PASSWORD:管理登录凭据
  • CURIOSITY_INTERVAL_MS:好奇心调度周期
  • YSBOT_PLUGIN_DIR:插件目录
  • YSBOT_PLUGIN_CACHE_DIR:插件缓存目录
  • YSBOT_DATA_DIR:数据目录
  • YSBOT_SECRETS_DIR:插件密钥目录
  • YSBOT_PLUGIN_DATA_DIR:插件数据目录

插件

YSbot Core 支持插件目录和 .plg 插件包。

插件类型:

  • motivation:注入动机
  • capability:调用外部 API
  • protocol:接入协议端
  • action:执行 QQ 动作
  • feedback:消费反馈
  • policy:影响决策
  • system:管理核心

插件开发规范见:

docs/plugin-dev-guide.md

权限

Core 内置基础 PermissionService,插件可以通过 ctx.permissions 声明和执行权限规则。

plugin.json 的 permissions 支持:

  • adminOnly:仅管理员可用
  • enabledGroups / disabledGroups:群白名单 / 黑名单
  • allowedUsers / blockedUsers:用户白名单 / 黑名单
  • requiredRoles:必需角色

管理端身份和 QQ 用户身份分离,权限覆盖只能由管理端身份修改。

协议

YSbot Core 不内置 OneBot / SnowLuma 实现,通过协议插件接入。

协议插件需要提供:

  • init(ctx)
  • connect()
  • send(action, params)
  • dispose()

License

YSbot Core 使用 MIT License。

Copyright (c) 2026 xiaokuc666