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

koishi-plugin-dialogue-view

v1.0.0

Published

独立网页只读 / 密钥编辑 dialogue 教学库(默认端口 5145)

Readme

koishi-plugin-dialogue-view

独立网页查看 / 编辑 koishi dialogue 教学库。默认只读,需要密钥才能修改。

功能

  • 提供一个独立网页(默认端口 5145),只读浏览 dialogue 表全部内容。
  • 支持按关键词(触发词 / 回答 / 原文)搜索、按 flag 类型过滤、分页。
  • 修改权限:权限 authority > authThreshold(默认 3,即 authority≥4)的用户私聊 bot 发送「我要改」,bot 会回一串专属密钥。
  • 在网页点「编辑模式」粘贴该密钥即可进入编辑(行内编辑 / 新增 / 删除)。
  • 一个密钥有效期 keyTtl 小时(默认 1,可配置),过期自动失效。
  • 所有修改操作记录到 dialogue_view_log 表(用户、密钥、时间、动作、目标 id、摘要),bot 日志也会打印。

配置

| 配置项 | 默认 | 说明 | | --- | --- | --- | | port | 5145 | 网页监听端口 | | host | 0.0.0.0 | 监听地址(0.0.0.0 允许局域网其他设备访问) | | authThreshold | 3 | 获取修改密钥需 authority > 该值 | | keyTtl | 1 | 修改密钥有效期(小时) | | pageSize | 50 | 每页条数 | | title | dialogue 教学库查看器 | 网页标题 |

使用流程

  1. 启动后访问 http://<本机IP>:5145/(默认只读)。
  2. 有修改权限的用户私聊 bot:我要改 → 收到密钥(如 a946bd33…)。
  3. 网页点「编辑模式」,粘贴密钥 → 出现「编辑 / 删除」按钮与「+新增」。
  4. 修改会自动写回数据库并记日志;密钥过期后需重新私聊获取。

安全说明

  • 网页本身对能访问该端口的人只读开放(不鉴权)。
  • 任何写入(增 / 改 / 删)都必须携带有效密钥,密钥仅发放给权限 > 阈值的用户,且有效期有限。
  • 若端口暴露到公网,建议配合防火墙 / 反代限制访问范围。

开发

# 类型检查
tsc --noEmit -p tsconfig.json
# 打包到 lib/index.js
node_modules/@esbuild/win32-x64/esbuild.exe src/index.ts --bundle --platform=node --format=cjs --external:koishi --charset=utf8 --outfile=lib/index.js