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-chatluna-livingmemory

v0.2.1

Published

ChatLuna plugin example

Downloads

1,509

Readme

koishi-plugin-chatluna-livingmemory

适用于 ChatLuna 的长期记忆插件。

让 Bot 以第一人称的叙事记忆,记录下与你共度的时光。

功能

  • 标准 ChatLuna 会话在请求中的用户消息末尾注入记忆快照
  • character(伪装)插件通过预设中的 {living_memory} 变量注入记忆快照
  • 按预设(preset)分区保存记忆,支持同一预设跨会话共享长期记忆
  • 异步进行记忆检索与召回,并把召回结果写入记忆快照,供下一轮对话使用
  • 异步进行记忆总结与存储,将对话转化为符合预设角色风格的第一人称叙事记忆
  • 提供独立的记忆整理流程,用于合并相似记忆、归档过时记忆和减少重复项
  • 提供 Koishi Console WebUI,方便手动查看、创建、编辑、删除记忆和快照

安装方式

在线安装

在 Koishi 的插件市场中搜索 chatluna-livingmemory,并选择添加。

本地开发

  1. 在本地 Koishi 项目的根目录中克隆仓库:
yarn clone https://github.com/Procyon-Nan/koishi-plugin-chatluna-livingmemory.git
  1. 在本地 Koishi 项目的根目录中构建:
yarn build chatluna-livingmemory

使用

  1. 在 Koishi 中启用 koishi-plugin-chatluna-livingmemory

  2. 配置模型:

| 模型类型 | 用途 | 是否必需 | | --- | --- | --- | | LLM 模型 | 从对话中提取记忆 | 必需 | | Dream LLM 模型 | 进行 Dream 记忆整理与合并决策 | 必需 | | 召回查询改写 LLM 模型 | 在召回前改写检索查询 | 可选 | | 嵌入模型 | 进行记忆向量化检索 | 可选 | | Reranker 模型 | 对召回结果重排序 | 可选 |

参考测试组合:

  • LLM 模型:gemma4:31b
  • Embedding 模型:bce-embedding-base_v1
  • Reranker 模型:bce-reranker-base_v1
  1. 对于 ChatLuna 主插件,在插件配置中开启 开启记忆快照注入。开启后,会在当前用户消息之后自动注入最近一次成功召回的记忆快照

  2. 对于 Character(伪装)插件,需要在 Character 的预设文件 input 中写入变量以进行记忆快照的注入,例如:

input: |
    # 你的记忆
    {living_memory}
  1. 在 Koishi Console 侧边栏进入 livingmemory WebUI,进行记忆的查看和管理。

记忆隔离机制

记忆条目仅依照预设隔离,群聊和私聊之间不进行长期记忆隔离。

预设召回使用的记忆快照依照会话隔离:

| 接入方式 | 长期记忆分区 | 快照隔离方式 | | --- | --- | --- | | ChatLuna 主插件 | 原始 preset 名 | conversationId | | Character(伪装) | 预设名(Character) | private:{userId}group:{guildId} 形式的 sessionKey |

这意味着:同一预设在不同会话中会共享长期记忆,但每个会话会使用各自的记忆快照,避免召回结果直接串到其他会话。