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

@jacklika/dsh-memory-anchor

v0.1.0-alpha.6

Published

Keeps the memory-recall/capture discipline in front of the model for every prompt, and appends a mechanical per-turn summary to the vault on turn/end via the session/event feed.

Readme

@jacklika/dsh-memory-anchor

让"先查记忆再行动、结束后入库"的纪律在每轮 prompt 中恒在。vault 约定沉淀在 memory-vault skill 里,但 skill 只在模型主动加载时才生效。本插件以动态运行时上下文(ctx.systemPrompt.context)贡献一小段恒在提醒,Harness 每轮组装 prompt 都会重新渲染,压缩后仍然存在。

诚实边界:召回无法自动化 —— 插件不会替模型检索 vault。但入库可以:Harness 以 Cordis 事件形式发布会话事件流(session/event,携带 turn/start、tool/call、tool/result、assistant/message、turn/end),dsh-workspace-changes 正是靠它快照每轮。autoCapture 开启(默认)时,插件在 turn/end 以会话自己的 agent 之名、经工具注册表把一段机械式回合摘要派发给 wiki_write,因此记忆套件的 scope、queue、git 三层观察到的自动写入与模型发起的写入完全一致。该摘要是启发式记账(工具名、短摘录),不是模型整理的笔记 —— 持久结论仍需显式 memory_capture/wiki_write。

自动入库

每个有可观测活动的回合会在 captureNotePrefix 下追加一节(默认 shared/notes/auto-capture/,即 shared/notes/auto-capture/<sessionId>.md)。前缀以 / 结尾时按目录拼接;否则保留扁平旧格式 <prefix>-<sessionId>.md。

  • 空闲回合(无工具调用、无消息)不写;
  • 未挂载 wiki_write 的部署不写;会话没有可派发的活 agent 时同样不写;
  • 会话 id 在成为文件名前经过清洗(sess:abc/1 → 默认前缀下为 shared/notes/auto-capture/sess-abc-1.md);
  • 这些笔记对 memory_recall 隐藏——memory-curator 用锚定匹配排除自动入库命名空间(以及扁平的 auto-capture-*.md 旧命名),仅名字前缀相同的策展笔记照常返回;
  • 重复的 turn/end(宿主重试或事件流重放)只会入库一次:回合在派发摘要前就被注销;下一次 turn/start 照常开启新回合;
  • 写入会带着该 agent 重新走 ctx.tools.execute,因此 memory-scope 的命名空间、memory-queue 的串行化、memory-git 的自动提交都能看到它;
  • 注册表拒绝的 wiki_write(mode: 'ptc' 下插件发起的调用没有 parent token,会折叠成 UNKNOWN_TOOL)按 debug 记录,视为部署事实而非故障;其他失败记 warn,且绝不抛进会话事件流。

配置

- name: '@jacklika/dsh-memory-anchor'
  config:
    contextName: 'memory-anchor:discipline'   # 默认
    order: 135                                # 在 Harness 110-120 与 todo-anchor 130 之后
    recallReminder: true                      # 「先查记忆再作答」一行
    captureReminder: true                     # 「结束后记录结论」一行
    recallText: '...'                         # 两行文案均可完全覆盖
    captureText: '...'
    vaultHint: true                           # 允许出现 Vault 句
    autoCapture: true                         # turn/end 时追加回合摘要
    captureNotePrefix: 'shared/notes/auto-capture/'  # 默认;去掉末尾斜杠则保留扁平旧格式
    excerptChars: 200                         # 摘要中每条消息的摘录上限
  • 两个提醒都关闭时贡献渲染为 '',Harness 会整体丢弃 —— prompt 中不留痕迹。
  • Vault 句("The Vault is the persistent record of this workspace.")只在 vaultHint 开启且 wiki_write 或 memory_capture 确实注册时出现,未装记忆套件的部署不会看到指向不存在工具的提示。
  • 贡献与 session/event 监听器随插件的 Loader fiber 一起卸载。