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

@huiliyi37/dsh-command-memory

v0.8.0

Published

Human-facing /remember and /memory slash commands over the optional memory service

Readme

@huiliyi37/dsh-command-memory

English | 中文

基于可选的 memory 服务提供面向用户的 /remember/memory 命令。设计约定:Agent Note。该插件通过 ctx.commands 注册这两个命令,因此组合中的每个命令适配器——包括 Web 斜杠菜单——都能发现并执行它们,无需模型轮次。TUI 拥有自己的注册表条目,不挂载本插件。

memory 服务是可选的:插件只注入 commands,并在处理器执行时通过 ctx.reflect.get('memory', false) 解析 memory。未装配 memory 插件的组合仍会列出这两个命令;此时每次调用都以下方的不可用文本结算,因此命令发现不会对未挂载的后端撒谎。

命令约定

| 输入 | 结果 | |---|---| | /remember <text> | 保存一条 global 作用域、来源为 user 的条目,然后返回 已保存记忆: <id>。 | | /remember(空输入) | 用法: /remember <text>:不保存任何内容。 | | /memory | 列出全部条目,每行一条 - <id>: <text>;存储为空时返回 暂无记忆。 | | /memory delete <id> | 删除该条目,然后返回 已删除记忆: <id>(id 不存在时是服务的幂等空操作)。 | | /memory delete(缺 id) | 用法: /memory delete <id>。 | | /memory <其他内容> | 用法: /memory [delete <id>]。 | | 任一命令,但未装配 memory 插件 | ⚠ memory 服务不可用(未加载 memory 插件)。 |

列表输出是纯文本,面向没有浏览器界面的命令适配器:每条条目内的空白字符折叠为单个空格,超过 80 字符的文本以 截断,使命令卡片内容保持确定。每次完成的调用都会记录执行器所属的纯日志事件对 command/run / command/done;两者都不进入模型历史。

组合

生产方只注入 commands。挂载命令注册表、本插件,以及可选的 memory 服务:

- id: commands
  name: '@huiliyi37/dsh-commands'
- id: memory
  name: '@huiliyi37/dsh-memory'
- id: command-memory
  name: '@huiliyi37/dsh-command-memory'

发货 Web bundle 挂 Markdown memory 服务和本插件。dsh-base 与 TUI bundle 不挂;TUI 把 /remember/memory 留在自己的私有注册表里。发货 Web bundle 不挂 dsh-tool-memorydsh-adaptive-memory,因此已保存条目先落盘,直到宿主再加消费方。

模型体验

用户 /remember/memory 控制

模型看到什么

斜杠输入与直接结果绝不会进入模型请求。已保存的条目只有在记忆消费方——dsh-tool-memorymemory_save / memory_search 工具或 dsh-adaptive-memory 的 STM 快照——注入时才会进入后续请求。

Token 影响

命令生命周期不会增加模型 token:command/run / command/done 事件对是纯日志,保存的 Markdown 条目驻留在 .dsh/memory/global.md 中,直到某个消费方渲染它。

KV Cache 影响

命令发现与簿记不会影响缓存。保存或删除的条目只会通过上述消费方界面、按它们各自的缓存规则改变后续请求的前缀。

已知限制与暂缓事项

  • 纯文本列表:裸 /memory 每行打印一条 - <id>: <text>,空白折叠且上限 80 字符;TUI 的交互式记忆浏览器没有命令适配器对应物。
  • 仅限 global 作用域/remember 始终以 scope: 'global' 且无标签保存,与 TUI 命令一致;其他作用域仍是编程接口 memory.save() 的路径。
  • 删除无确认/memory delete <id> 立即生效;由于服务的删除是幂等的,未知 id 也以成功结算。
  • 发货 Web 没有模型消费方/remember 写入 .dsh/memory/global.md;Web 模型只有在宿主再挂 dsh-tool-memorydsh-adaptive-memory 之后才会看到该条目。