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

dsh-global-memory

v0.1.1

Published

DSH 全局记忆插件:侧边栏「全局记忆」页,直接查看/编辑 ~/.dsh/AGENTS.md 与 ~/.dsh/memory/*.md。Host 半边注册 /api/dsh-memory 路由(回环限制),client 半边注入侧边栏入口与中心面板。热插拔挂载,不改 DSH 源码。

Readme

dsh-global-memory

npm 包名即目录名;曾用名 dsh-memory(因 npm 重名改为 dsh-global-memory,host 路由仍为 /api/dsh-memory/*)。

DSH 全局记忆插件:在 dsh Web GUI 侧边栏加「全局记忆」入口,中心面板直接查看/编辑:

  • ~/.dsh/AGENTS.md —— 全局指令(每个会话自动注入)
  • ~/.dsh/memory/*.md —— 跨会话动态记忆(prefs / projects / decisions / facts / memory 等)

能力

  • 文件列表:标题、路径、大小、修改时间;缺失文件显示「不存在(保存时创建)」。
  • 编辑器:等宽字体 textarea,⌘/Ctrl+S 保存;未保存标记;切换前确认。
  • 新建记忆文件:面板内 DOM 对话框输入文件名(自动加 .md 后缀,仅限 [A-Za-z0-9][A-Za-z0-9._-]*,防目录穿越);不用原生 window.prompt/alert/confirm (DSH Web GUI 环境下不可靠,会静默失败——曾导致「新建无反应」)。
  • 操作条:刷新/新建/保存/关闭 位于面板底部(顶部只留标题,右侧留空—— 避免与其他插件固定在视口右上角的按钮重叠,如 dsh-better-sidebar)。
  • 主题:全部配色引用 DSH 官方 --dsw-alias-* / --dsw-specific-* token,自动跟随 DSH 亮/暗主题(body[data-ds-dark-theme]),无需手动切换。
  • Host 路由 /api/dsh-memory/files|file(GET 列表/读取,PUT 写入),全部:
    • 回环信任围栏(socket 地址 + Host 头 + same-origin 标记);
    • 文件 key 白名单解析,永远走不出 memory 目录;
    • 原子写入(temp + rename),内容上限 1 MiB,权限 0600。

文件

  • lib/index.js —— host 半边(路由)
  • lib/client.js —— 浏览器半边(侧边栏入口 + 面板)
  • test/smoke.mjs —— host 路由冒烟测试(node test/smoke.mjs

挂载

见仓库根 README。