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-subagent-memory

v1.1.4

Published

Subagent-scoped memory for DeepSeek Harness: memory_add/list/get tools for a delegated child's own notes, a cascade delete when the child settles, an adjacency-checked service API (ctx.agentMemory read/write/summary) for the delegating parent or other hos

Downloads

1,061

Readme

Agent Memory(子代理记忆)

给子代理用的工作记忆——单一职责:没有全局仓库、没有跨会话库。

能力

被动(子代理自己用):memory_add / memory_list / memory_get 三个工具,只能读写调用者自己会话的记忆。

主动(委派方或宿主插件):ctx.agentMemory 服务 API:

| 方法 | 签名 | 说明 | |---|---|---| | read | read(childId, callerId, {tag?}) | 读某子代理的记忆条目 | | write | await write(childId, callerId, {title, content, tags?}) | 往某子代理记忆里写一条 | | summary | summary(childId, callerId) | 紧凑文本摘要,供委派方注入提示 |

API 安全(邻接校验):调用者只能触碰自己直接父级的子会话记忆——sessions.get(child).header.parentSession 必须等于 callerId(或 callerId === childId 自省);未物化会话、非父子关系一律拒绝。

级联清理:子代理结束(subagent/end)时自动删除其全部记忆。

能力发现:向 dsh-compat-layer 的能力注册表声明 agentMemory(v2),其他插件可自动匹配发现,无需硬依赖本包。

界面(1.1.0 新增)

  • 记忆查看器:插件页 → 本插件行(plugins.row.config)里的只读为主视图,按 ownerSession 分组展示脱敏快照(标题/标签/长度/时间,不含正文)。每条可删除,但先弹确认;删除只是写一条请求到 volatile 字段 deleteRequestJson,由宿主执行并复用同一套邻接校验(_assertAdjacent)——浏览器侧无法绕开、也无法放宽权限。
  • 可发现入口:settings.general.item 摘要行(id subagent-memory),打开「设置 → 通用」即可见:子代理记忆:N 条 / M 个子代理。

存储

插件自身的 volatile 设置命名空间 agent-memory(官方运行时可变偏好管线),无需文件、无自定义协议。宿主另写两个 volatile 字段:snapshotJson(脱敏快照)与 deleteRequestJson(删除请求)。

配套

与 dsh-subagent-pro 自动匹配:装了本包后 subagent-pro 会多出一个 subagent_memory 工具(读某个子代理的记忆摘要);不装则没有该工具,双方互不影响。

安装

桌面端:插件 → 添加插件 → 输入包名 dsh-subagent-memory(或本地路径安装 tgz)。

English

Narrow, subagent-scoped memory: three tools for a delegated child's own notes, an adjacency-checked service API (read / write / summary) for the delegating parent, cascade deletion when the child settles, capability discovery through dsh-compat-layer, plus a read-mostly browser viewer over a desensitized snapshot (delete is a host-executed, adjacency-checked request) and a Settings -> General summary row.

License: MIT. Author: jd962.