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

@zzerx/dsh-plugin-memory

v0.4.3

Published

dsh 记忆与进化插件:跨会话记住你的偏好与项目习惯(全局 / 项目双作用域),自动注入、自动整理,设置面板一级「记忆」分区可视化管理。

Readme

@zzerx/dsh-plugin-memory

dsh 的记忆插件:跨会话记住你的偏好、身份与项目决策,对话越多它越懂你。记忆只存在本地。入口是设置面板里的一级「记忆」分区。

记忆面板

安装

dsh plugin --profile <你的 profile 名> add @zzerx/dsh-plugin-memory

能做什么

| 能力 | 说明 | |---|---| | 自动形成记忆 | 开关打开后,每轮对话结束时用模型提炼值得长期记住的内容(偏好、身份、项目决策、经验),自动入库;用的模型可在面板里指定(缺省跟随会话自己的模型)。 | | 后台模型可选 | 面板「高级 · 后台模型与自动提炼」里从 dsh 已配置的模型里挑一个,专跑记忆的两条后台流程(对话提炼、写入判定)—— 例如用便宜快的小模型提炼、用强模型判定。留空 = 跟随会话默认。 | | 全局 / 项目双作用域 | 普适的东西(语气、格式、身份、职业)进全局;只对某个工作区成立的进项目(以工作区目录为键)。 | | 开场自动注入 | 新会话开局把「全局 + 当前工作区」的高重要性记忆注入,不必每次重新提醒。 | | 管理记忆 | 查看、编辑、置顶、归档、删除、移动作用域;每条可开详情(分类 / 重要性 / 来源 / 时间 / 标签 / 来源会话)。 | | 导入其他 AI 的记忆 | 内置一段提示词,复制到别的 AI 里整理出个人画像,把结果粘回来即可按分类拆条入库。 | | 原文留档 | 原始文本先落盘再抽条目:模型抽不出来、调用失败都不丢原文,之后可以对同一份原文重抽。 | | 整理(进化) | 同作用域 + 同分类 + 同标题的重复条目合并,保留信息最完整的一条。 | | 实体与关联 | 写记忆时声明实体(项目 / 工具 / 人 / 概念),共享同一实体的记忆自动连成「相关」;关系本身有信息量时可显式连边。 | | 记忆图谱 | 一张可拖动、可缩放的关系图:节点是记忆与实体,连线是它们之间真实存在的关系。可在全局 / 项目之间切换、悬停看细节、点节点开详情。 | | 别名 | 同一条记忆的别的说法写进 aliases,之后用别名当标题写入会自动并进那一条,不长出重复条目。 | | 不丢也不重 | 写入时先看附近有没有同一条:像到一定程度直接并入,疑似重复会给你提醒,必要时让模型判一次「新增 / 并入 / 跳过」;判定失败一律退化成新建。 | | 9 个模型工具 | 让 agent 自己存取记忆与连线(见下)。 |

agent 工具

| 工具 | 用途 | |---|---| | memory_save / memory_search / memory_list | 保存(可带 summary / aliases / entities)、搜索、列举 | | memory_update / memory_archive / memory_delete / memory_move | 修改、归档(可恢复)、删除、改作用域 | | memory_entity | 落实体(项目 / 工具 / 人 / 组织 / 概念)、按关键字列出、删实体(连同它的边) | | memory_link | 连一条有语义的边、断边、看某条记忆的全部关联 |

作用域由模型判定,判错了可以在面板里改,也可以让模型用 memory_move 改。

设置与数据

  • 开关在 dsh 设置 → 记忆 里,改完即时生效。
  • 「后台模型」列的是 dsh 当前已配置且可路由的模型(按 provider 分组);配的模型之后被删掉也不会锁死设置页 —— 调用失败照旧 fail-safe(提炼记一条失败审计、判定退化成新建)。
  • 记忆条目、原文留档、后台调用记录、实体与边都只存在本地;归档是软隐藏(不进注入与列表,可恢复),删除才是真删。
  • 面板「沉淀」里可以看原文留档与每次后台模型调用(用途 / 模型 / 耗时 / 抽出的条目数 / 失败原因)。

已知边界

  • 不替代会话日志:只存「值得跨会话记住」的精炼知识。
  • 不做向量检索:检索仍是子串匹配(标题 / 正文 / 摘要 / 别名 / 标签),语义去重靠相似度阈值加一次模型判定,不是向量召回。
  • 自动提炼是一次额外模型调用:拿不到模型路由、流失败、JSON 非法都只降级为「这次没记」,绝不影响对话;面板指定的后台模型不可用时同样如此。
  • 项目维度的键是工作区目录路径:改目录名等于换项目。
  • 图谱要能画 canvas:运行环境拿不到 2D 画布时,图谱弹窗只给一句说明,其余功能不受影响。
  • 与其他记忆插件互斥:撞名(例如 dsh-mneme)时本插件硬锁:不注册工具、不注入、不自动提炼,并在面板顶部提示;停用另一个并重启即自动解锁。

开发

pnpm --filter @zzerx/dsh-plugin-memory build      # lib/index.js + lib/client.js + lib/types
pnpm --filter @zzerx/dsh-plugin-memory typecheck

License

MIT