会话与记忆 · v0.5.19
dsh-thoughtdag
本目录是 ThoughtDAG 的 DeepSeek Harness 插件,以 dsh-thoughtdag 为名发布到 npm;其版本跟随应用版本,内嵌的 ThoughtDAG 构建即本目录树中的这一份。
作者原文(英文)
This directory is the DeepSeek Harness plugin of ThoughtDAG, published to npm as dsh-thoughtdag; its version follows the app's, and the ThoughtDAG build it embeds is the one in this tree.
简介取自插件 README 开头,由 DeepSeek 模型翻译,仅供参考。
安装命令
dsh plugin --profile web add dsh-thoughtdag@0.5.19
已试装 · 层已挂载
已在一个隔离的 profile 里真装过:包能装上,并且插件层挂载成功。这一条是实测结果,不是作者的声明。
检测报告
能力清单
- 可执行外部程序
spawns-processes高关注5 处命中lib/runtime/agents/claude.cjs:11const { spawn, execFile } = require('node:child_process');lib/runtime/agents/codex.cjs:11const { spawn } = require('node:child_process');lib/runtime/agents/pi.cjs:16const { spawn, execFile } = require('node:child_process');lib/runtime/terminal.cjs:10const { spawn } = require('node:child_process');- 看它调用哪些程序。调用本机已有的工具是常见做法。
- 写入文件
writes-files需留意19 处命中lib/runtime/backup-write.cjs:51await mkdir(dirname(target), { recursive: true });lib/runtime/backup-write.cjs:52await writeFile(target, json, 'utf8');lib/runtime/agents/claude.cjs:131await fsp.mkdir(cwd, { recursive: true });lib/runtime/agents/codex.cjs:299await fsp.mkdir(cwd, { recursive: true });- 看写入位置。写自己的配置目录是正常的,写系统目录不是。
- 发起网络请求
network需留意17 处命中lib/client.js:86fetch('/thoughtdag/api/version').then(r => (r.ok ? r.json() : null)).then(j => { if (j && typeof j.version === 'string')……p/assets/http-bridge-BnYAV4lB.js:1import{I as f}from"./index-BH9ozg79.js";async function y(p){if(window.desktopAgents)return!0;const r=p.replace(/\/+$/,""…dist-app/assets/index-aOSCk5D-.js:12`).replace(/^\n+/,"").replace(/\n+$/,"")}let c=A;for(let h=0;h<3&&c;h++){const b=c.parentElement;if(!b||b.tagName==="BOD…dist-app/assets/index-aOSCk5D-.js:35</div>`:""}`.trim()}}w.ConversationExtractor=A},3055(at,w,I){Object.defineProperty(w,"__esModule",{value:!0}),w.BbcodeDa…- 看请求发往哪些域名。发往作者自己的后端是常见做法。
- 动态执行代码
dynamic-code需留意9 处命中dist-app/assets/index-BmwffA_p.js:12`;var o;try{o=new Function(a,"_",i)}catch(h){throw h.source=i,h}var u=function(h){return o.call(this,h,Ae)};return u.sou…dist-app/assets/index-BmwffA_p.js:53`);return this._settledValue()},c=n.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0},i=n.prototype.…dist-app/assets/index-BmwffA_p.js:57`.replace(/Index/g,d))},g=function(d){return new Function("promise","holder",`dist-app/assets/index-BmwffA_p.js:105`;return A=A.replace(/\[TheName\]/g,C).replace(/\[TheTotal\]/g,d).replace(/\[ThePassedArguments\]/g,E).replace(/\[ThePro…- 看 eval / new Function 的入参来自哪里。常量字符串和用户输入是两回事。
- 可终止进程
kills-processes需留意1 处命中lib/why.mjs:2489process.kill(holder.pid, 0);- 看它终止的是自己启动的进程,还是按名字匹配到的任意进程。
- 客户端可疑脚本
client-side-risk需留意1 处命中- client.js: innerHTML + postMessage
- 浏览器侧代码能改你看到的界面。确认改动范围符合插件用途。
- 读取文件
reads-files一般40 处命中lib/runtime/agents/claude.cjs:62const lines = (await fsp.readFile(file, 'utf8')).split('\n');lib/runtime/agents/claude.cjs:73try { const s = JSON.parse(await fsp.readFile(path.join(os.homedir(), '.claude', 'settings.json'), 'utf8')); return type…lib/runtime/agents/claude.cjs:85const dirs = await fsp.readdir(PROJECTS_DIR, { withFileTypes: true });lib/runtime/agents/claude.cjs:101const raw = JSON.parse(await fsp.readFile(path.join(cwd, '.thoughtdag', 'guard.json'), 'utf8'));- 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
- 读取环境变量
reads-env一般26 处命中lib/runtime/agents/claude.cjs:142const IDLE = Number(process.env.TD_AGENT_IDLE_MS) || 10 * 60 * 1000;lib/runtime/agents/codex.cjs:75const SERVER_IDLE_MS = Number(process.env.TD_AGENT_IDLE_MS) || 10 * 60 * 1000;lib/runtime/agents/codex.cjs:134const home = process.env.CODEX_HOME || path.join(os.homedir(), '.codex');lib/runtime/agents/codex.cjs:309const IDLE = Number(process.env.TD_AGENT_IDLE_MS) || 10 * 60 * 1000;- 环境变量里常混有密钥。看它是否把整个 env 都读走。
- 动态加载模块
dynamic-import一般21 处命中…app/assets/canonical-bSxBmsm7.js:2import{c as _,b as y,_ as k,p as D,r as O,g as R,a as K,u as C,h as Q,s as z,j as $,k as W,f as V,l as Y,m as Z,t as tt,…dist-app/assets/index-YWyx765g.js:2import{_ as e}from"./index-BH9ozg79.js";async function S(s){const{claudeCodeSessionConversation:i}=await e(async()=>{con…dist-app/assets/index-YWyx765g.js:3`);n=w.pop()??"";for(const l of w)r.feedLine(l),a.feedLine(l),c.feedLine(l),o.feedLine(l)}return n&&(r.feedLine(n),a.fee…lib/index.js:87const { writeBackup, BackupRequestError } = require(resolve(__dirname, 'runtime', 'backup-write.cjs'))- 动态导入本身无害,但会让依赖关系难以静态审阅。
- 接触凭据或密钥
credentials一般6 处命中lib/index.js:601out.push({ name, baseURL, apiKey: typeof p?.apiKey === 'string' ? p.apiKey : '', models })lib/index.js:653const headers = { 'content-type': 'application/json', ...(provider.apiKey ? { authorization: `Bearer ${provider.apiKey}`…lib/index.js:1255const r = await fetch(`${baseURL}/models`, { headers: body?.apiKey ? { authorization: `Bearer ${body.apiKey}` } : {}, si…- 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
逐条扫描明细
| 能力 | 标识 | 关注度 | 命中次数 |
|---|---|---|---|
| 可执行外部程序 | spawns-processes | 高关注 | 5 |
| 写入文件 | writes-files | 需留意 | 19 |
| 发起网络请求 | network | 需留意 | 17 |
| 动态执行代码 | dynamic-code | 需留意 | 9 |
| 可终止进程 | kills-processes | 需留意 | 1 |
| 客户端可疑脚本 | client-side-risk | 需留意 | 1 |
| 读取文件 | reads-files | 一般 | 40 |
| 读取环境变量 | reads-env | 一般 | 26 |
| 动态加载模块 | dynamic-import | 一般 | 21 |
| 接触凭据或密钥 | credentials | 一般 | 6 |
这份报告的口径
扫描读的是包里的源码,全程不执行第三方代码。 本次读了 40 个文件,扫描于 2026-10-16。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。
可信度
- 0没有可扣分的项
认证等级 L3
- L0静态结构与契约✓sha512-XKbPSYKwEGNs3iKC… 与本地 tarball 复算一致,补丁与入口齐备
- L1配置组合与依赖图✓跨包无 entry id 冲突,插入模块可解析,目录内 peer 满足
- L2隔离沙箱冒烟✓隔离 profile 安装成功,1.8s,层已挂载;宿主带它启动(booted)
- L3运行时健康监控✓抽样会话内未观测到外部进程 / 越界写 / 外连(2 个事件)
评分口径与作者信息
从 100 分开始按规则扣减:fail −20 / major −10 / warn −5 / minor −2;star 数、下载量、LLM 输出都不参与评分
- 维护者
- chatchan92
- 仓库
- https://github.com/chenxiachan/thoughtdag
- 许可
- MIT
- 最后发布
- 2026-10-14
- 周下载
- 1.2k
- star
- 627
扫描状态:已扫描。能力是事实,不是缺陷; 周下载与 star 只作参考,不参与评分。
认证等级只回答四件事:包本身是否完整可解析(L0)、能不能与别的插件组合(L1)、隔离环境里装不装得上并起得来(L2)、抽样运行时有没有异常(L3)。依赖漏洞、仓库存活、下载量都不参与评级,只作为独立信号标注。可信 ≠ 无漏洞,上架 ≠ 推荐。
| DSH peer 依赖 | 10 个cordisdsh-agentdsh-api-session-controllerdsh-attachmentdsh-client-connectiondsh-client-modulesdsh-host-webserverdsh-llmdsh-sessiondsh-web均为 @deepseek-ai/ 下的包 |
|---|---|
| Node 要求 | ^22.19.0 || >=24.0.0 |
| 第三方依赖 | 0 个(纯自包含) |
| bundle patch | ./cordis.patch.yml |
| 依赖安全公告 | 已查询全部依赖,没有匹配到已公开的安全公告(含 DSH 框架包在内的 @deepseek-ai/* 不作查询——那是运行时自己的问题,不是插件的。) |
元数据
| 主页 | https://github.com/chenxiachan/thoughtdag/tree/main/dsh#readme |
|---|---|
| 仓库最近提交 | 2026-10-15 |
| 仓库创建 | 2026-02-17 |
DSH