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

chatluna-plugin-livingdiary

v0.1.0

Published

让机器人在 QQ 空间记录和分享日常。

Readme

chatluna-plugin-livingdiary

让机器人在 QQ 空间记录和分享日常。可以用命令读动态、发说说,也可以让对话中的机器人帮你发布。

使用

在插件配置的 allowUserIds 中填入可以操作空间的 QQ 号。登录态取自实例中已上线的 OneBot 或 Milky 机器人;有多个账号时,用 selfId 指定要使用的空间。

| 命令 | 用途 | | --- | --- | | qzone.status | 查看空间登录态、最近一次日记的结果和自动互动的运行情况 | | qzone.feeds 3 | 读取机器人最近 3 条动态 | | qzone.feeds 3 -t 123456 | 读取指定 QQ 号的可见动态 | | qzone.publish 今天下雨了 | 发布到机器人的空间;同一条消息可附最多 9 张图片,也可以只发图 | | qzone.digest | 根据今天的记忆写日记;模型决定发布时会直接发到空间 |

开启 enablePublishTool 后,「工具」页会列出 qzone_publish。把自己的 QQ 号填入 allowUserIds,就可以在对话里让机器人发说说,例如「把这张照片发到空间,配文写『雨停了』」。发布时检查本次请求者本人的权限;白名单为空时无人可发。

如果提示无法确认是否发布成功,先用 qzone.feeds 核对,以免重复发布。

每日日记

启用 LivingMemory,在 LivingDiary 配置中选择空间预设(personaPresetId)和写日记的模型(mainModel)。白名单用户可以发送 qzone.digest 立即写一篇。想让机器人自己按时写,就打开 enableDailyDigest,并设置 digestTime(默认服务器本地时间 23:50)。

机器人以所选预设的口吻写作,参考这个预设从今天零点到任务开始时新建、且仍然活跃的记忆。编辑旧记忆不会改变创建日期;Dream 合并或拆分生成的新条目按新条目的创建日期计算。默认最多使用最近 100 条,可通过 digestMemoryLimit 调整。当日没有记忆,或模型认为没有值得分享的内容,就跳过发布。

在 WebUI 里翻日记

打开 LivingDiary → 日记,点击书本左侧的「预设」便签,翻到扉页选择预设,即可从最近一篇往前翻,也可以指定日期。写好的日记先存入实例数据库,再发到 QQ 空间;发布失败仍可阅读,同一天写的多篇也会分别保留。左页是日记正文,右页是写这篇时交给模型的全部记忆原文。

在「插件配置」中可以直接设置空间账号、白名单、日记和自动互动;「插件使用指南」介绍如何写第一篇日记,以及各项设置和发布状态的含义。

自动评论和回复

在插件配置中选择空间人设(personaPresetId)和互动模型(subModel)。在「自动互动」的 interactionAllowUserIds 中填写希望机器人互动的 QQ 号。这份名单独立于命令白名单;默认名单为空,机器人不会主动互动。自动互动不需要 LivingMemory。

| 想让机器人做什么 | 怎么配置 | | --- | --- | | 主动评论好友新发的动态 | 开启 enableFriendPostComment,模型会根据动态内容决定评论或跳过。 | | 回复自己空间下的新评论 | 将 interactionMonitorPostLimit 设为大于 0 的数,默认关注 10 条动态。机器人在好友动态下发过一级评论时,也会跟进该评论线程里的新回复。 | | 只评论新动态,不跟进回复 | 开启好友动态评论,把 interactionMonitorPostLimit 设为 0。 | | 允许与所有可见用户互动 | 关闭 enableInteractionWhitelist。 |

机器人上线后先记住已有的动态和评论,从下一轮开始处理新增内容。插件重启时重新建立起点,不补发停机期间的评论。默认每 60 分钟检查一次,每轮最多发起 5 次评论或回复,可分别调整 interactionPollIntervalMinutes 和 interactionMaxWritesPerRound。用 qzone.status 可以查看待处理数量、已受理和结果待核对的写入次数。

如果希望机器人看懂动态配图,可以选择支持图片输入的互动模型;使用纯文本互动模型时,也可以为 ChatLuna 的 @vision 角色配置读图模型。每次互动最多读取 9 张托管在 QQ 空间图片域名下的配图,单张上限 15 MiB,合计 45 MiB。GIF 按需抽帧,视频、音频和文件只提供类型、名称等信息。

构建

在插件目录运行 yarn build。

调试页面时,保持模板项目的 yarn start 运行,在另一个终端进入 LivingDiary 目录执行 yarn dev。保存 client/ 下的改动后,已打开的 WebUI 会自动更新。这个命令只监听前端。

发布

更新 package.json 中的版本号后,在插件目录运行 npm run pub。脚本会清理旧产物、重新构建,并将该版本发布到 npm 公共仓库。