dsh-mneme
v0.8.16
市场与管理
可执行外部程序以 shell 执行命令写入文件
认证 L3已扫描 ✓健康 S/100周下载 2.4k
`dsh-mneme` 是一个 DeepSeek Harness (DSH) 插件,为 Agent 提供持久的跨会话记忆能力。它借鉴了 Claude 的 **Dream 机制** 与 cc-haha / Claude Code 的 **autoDream** 记忆巩固功能——不仅**存储**记忆,还会**自动巩固**(去重、合并、冲突裁决、摘要生成),让记忆库越用越精炼。完整溯源与致谢见文末「🙏 致谢」。
作者原文(英文)
Cross-session memory plugin for DeepSeek Harness with autoDream consolidation: SQLite store, Markdown mirrors, 9 model tools, automatic injection, session summarization, user profile/rules, custom slash commands, vector (semantic) search, and a Web GUI pa
中文简介由 DeepSeek 模型翻译,仅供参考。
源仓库没有任何提交 仓库存在但是空的,没有源码可看。npm 上的包仍然可以安装,但作者没有公开对应源码。
检测报告
关注度高。命中了不少能力模式,其中可能有需要留意的。逐条看下面的清单。
2高关注5需留意4一般13未命中
高关注需留意一般
能力清单
- 可执行外部程序
spawns-processes高关注9 处命中lib/bootstrap.js:11import { execFile } from "node:child_process";src/bootstrap.js:11import { execFile } from "node:child_process";test/bootstrap.test.js:7import { execFileSync } from "node:child_process";test/client.test.js:6import { spawnSync } from "node:child_process";- 看它调用哪些程序。调用本机已有的工具是常见做法。
- 以 shell 执行命令
shell-exec高关注7 处命中test/bootstrap.test.js:38execFileSync("git", ["init"], { cwd: root, stdio: "ignore" });test/bootstrap.test.js:39execFileSync("git", ["-C", root, "config", "user.email", "t@t.local"]);test/bootstrap.test.js:40execFileSync("git", ["-C", root, "config", "user.name", "tester"]);test/bootstrap.test.js:41execFileSync("git", ["-C", root, "add", "-A"]);- 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
- 写入文件
writes-files需留意258 处命中lib/runtime/adopt.js:47mkdirSync(dest, { recursive: true });lib/runtime/adopt.js:52mkdirSync(join(dest, ".."), { recursive: true });lib/runtime/adopt.js:64copyFileSync(full, dest);lib/runtime/adopt.js:72mkdirSync(destDir, { recursive: true });- 看写入位置。写自己的配置目录是正常的,写系统目录不是。
- 发起网络请求
network需留意138 处命中scripts/benchmark-recall.js:213if (r.recall < 1) console.log(` expected ⊇ ${r.expected.join(", ")} got: ${r.got.join(", ") || "—"}`);scripts/benchmark-recall.js:214if (r.forbiddenHit > 0) console.log(` forbidden hit ×${r.forbiddenHit}: ${r.got.filter((id) => r.forbidden.includes(id))…scripts/benchmark-recall.js:230if (r.recall < 1) console.log(` expected ⊇ ${r.expected.join(", ")} got: ${r.got.join(", ") || "—"}`);scripts/benchmark-recall.js:231if (r.forbiddenHit > 0) console.log(` forbidden hit ×${r.forbiddenHit}: ${r.got.filter((id) => r.forbidden.includes(id))…- 看请求发往哪些域名。发往作者自己的后端是常见做法。
- 运行时改写自身配置
modifies-own-manifest需留意4 处命中test/bootstrap.test.js:20writeFileSync(join(root, "package.json"), JSON.stringify({test/runtime-closure.test.js:168writeFileSync(join(outside, "package.json"), JSON.stringify({ name: "outside-only-pkg", version: "1.0.0" }));- 运行时改写自身配置会让下次启动的行为和你看过的源码不一致。
- 启动伪终端
spawns-pty需留意2 处命中- 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
- 动态执行代码
dynamic-code需留意1 处命中test/client.test.js:1144const makeStore = new Function("apiFetch", "setInterval", "clearInterval",- 看 eval / new Function 的入参来自哪里。常量字符串和用户输入是两回事。
- 读取文件
reads-files一般198 处命中lib/runtime/adopt.js:36for (const entry of readdirSync(src, { withFileTypes: true })) {lib/runtime/adopt.js:68stats.bytes += statSync(full).size;lib/runtime/adopt.js:111if (existsSync(dir) && !overwrite) {lib/runtime/adopt.js:131if (existsSync(dir)) rmSync(dir, { recursive: true, force: true });- 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
- 接触凭据或密钥
credentials一般33 处命中lib/api.js:809const incoming = typeof body.apiKey === "string" ? body.apiKey.trim() : "";lib/api.js:812? (prev?.apiKey ?? "")lib/api.js:820sendJson(res, 200, { config: { ...cfg, apiKey: maskApiKey(cfg.apiKey) } });lib/api.js:824sendJson(res, 200, { config: { ...cfg, apiKey: maskApiKey(cfg.apiKey) } });- 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
- 读取环境变量
reads-env一般18 处命中scripts/benchmark-embed.js:60const env = process.env;scripts/benchmark-rerank.js:57const env = process.env;test/mcp-stdio.test.js:43env: { ...process.env, ...env },lib/serve.js:189runtimeDir: process.env.DSH_MNEME_RUNTIME_DIR || "", // :348(空=defaultRuntimeDir;取件/加载同源)- 环境变量里常混有密钥。看它是否把整个 env 都读走。
- 动态加载模块
dynamic-import一般13 处命中scripts/benchmark-embed.js:4// 的延迟与吞吐。src/local-embedder.js 可能尚在开发,这里用 await import() 动态scripts/benchmark-embed.js:120mod = await import("../src/local-embedder.js");scripts/benchmark-rerank.js:5// await import() 动态加载,失败时打印友好错误而非崩溃。scripts/benchmark-rerank.js:101mod = await import("../src/reranker.js");- 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
| 能力 | 标识 | 关注度 | 命中次数 |
|---|---|---|---|
| 可执行外部程序 | spawns-processes | 高关注 | 9 |
| 以 shell 执行命令 | shell-exec | 高关注 | 7 |
| 写入文件 | writes-files | 需留意 | 258 |
| 发起网络请求 | network | 需留意 | 138 |
| 运行时改写自身配置 | modifies-own-manifest | 需留意 | 4 |
| 启动伪终端 | spawns-pty | 需留意 | 2 |
| 动态执行代码 | dynamic-code | 需留意 | 1 |
| 读取文件 | reads-files | 一般 | 198 |
| 接触凭据或密钥 | credentials | 一般 | 33 |
| 读取环境变量 | reads-env | 一般 | 18 |
| 动态加载模块 | dynamic-import | 一般 | 13 |
这份报告的口径
扫描读的是包里的源码,全程不执行第三方代码。 本次读了 277 个文件,扫描于 2026-10-15。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。
依赖安全公告
已查询这个插件声明的全部依赖,没有匹配到已公开的安全公告。(含 DSH 框架包在内的 @deepseek-ai/* 不作查询——那是运行时自己的问题,不是插件的。)