浏览全部

模型与账号 · v0.6.11

dsh-chat-cost

github.com/igormel81/dsh-chat-cost

能力以 shell 执行命令可执行外部程序含混淆或编码代码

DeepSeek Harness(dsh)Web UI 中每个聊天都会实时显示 token 成本:包括聊天本身、其子代理以及整个会话树,价格来自内置的多提供商目录,并以仅追加的 JSONL 成本日志写入你的项目……

作者原文(英文)

Live token cost for every chat in the DeepSeek Harness (dsh) Web UI: the chat itself, its subagents and the whole session tree, priced from a bundled multi-provider catalog, with an append-only JSONL cost log written into your project…

简介取自插件 README 开头,由 DeepSeek 模型翻译,仅供参考。

anthropicbudgetbudgetingcache-readcache-writeclaudecordiscost
认证 L3已扫描 ✓健康 S/100周下载 499
8 项能力
许可
MIT
发布
2026-09-22
维护者
igoruan
插件 ID
1594

安装命令

dsh plugin --profile web add dsh-chat-cost@0.6.11

已试装 · 层已挂载

已在一个隔离的 profile 里真装过:包能装上,并且插件层挂载成功。这一条是实测结果,不是作者的声明。

检测报告

关注度高。命中了不少能力模式,其中可能有需要留意的。逐条看下面的清单。
2高关注4需留意2一般16未命中
高关注需留意一般

能力清单

  • 以 shell 执行命令shell-exec高关注4 处命中
    • scripts/reconcile.mjs:94const listing = execFileSync('unzip', ['-Z1', target], { encoding: 'utf8' }).trim().split('\n')
    • scripts/reconcile.mjs:108return readCsv(execFileSync('unzip', ['-p', archive.zip, name], { encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 }))
    • scripts/reconcile.mjs:129return execFileSync('zstd', ['-dc', file], { encoding: 'utf8', maxBuffer: 512 * 1024 * 1024 })
    • test/reconcile.test.mjs:96const stdout = execFileSync('node', [SCRIPT, ...args], { encoding: 'utf8' })
    • 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
  • 可执行外部程序spawns-processes高关注3 处命中
    • scripts/prose-check.mjs:35import { spawnSync } from 'node:child_process'
    • scripts/reconcile.mjs:36import { execFileSync } from 'node:child_process'
    • test/reconcile.test.mjs:12import { execFileSync } from 'node:child_process'
    • 看它调用哪些程序。调用本机已有的工具是常见做法。
  • 含混淆或编码代码obfuscated-code需留意34 处命中
    • lib/client.js:137title: "token \u8d39\u7528\u4f30\u7b97\uff08\u5185\u7f6e\u4f9b\u5e94\u5546\u4ef7\u683c\u76ee\u5f55\uff09",
    • lib/client.js:143unpriced: (count) => "\u6709 " + count + " \u4e2a\u4f1a\u8bdd\u5728\u76ee\u5f55\u4e2d\u6ca1\u6709\u4ef7\u683c\uff0c\u672…
    • lib/client.js:150planDeferred: (count) => count + " \u4e2a\u5355\u5143\u672a\u80fd\u7eb3\u5165\u9884\u7b97",
    • lib/client.js:152savings: (usd) => "\u6539\u7528\u8db3\u591f\u4fbf\u5b9c\u7684\u6a21\u578b\u53ef\u7701 $" + usd,
    • 混淆本身不是恶意,但公开源码里出现大段混淆值得问一句为什么。
  • 写入文件writes-files需留意24 处命中
    • lib/log.js:175await mkdir(dir, { recursive: true })
    • lib/log.js:178await appendFile(file, payload, 'utf8')
    • lib/log.js:218await writeFile(file, prefix + entry + '\n', 'utf8')
    • lib/plan.js:38await mkdir(dirname(file), { recursive: true })
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 发起网络请求network需留意2 处命中
    • lib/client.js:64entry.inflight = window.fetch(SUMMARY_PATH + "?sessionId=" + encodeURIComponent(entry.sessionId) + "&language=" + langua…
    • scripts/build-prices.mjs:65const response = await fetch(SOURCE, { headers: { 'user-agent': 'dsh-chat-cost price snapshot' } })
    • 看请求发往哪些域名。发往作者自己的后端是常见做法。
  • 动态执行代码dynamic-code需留意2 处命中
    • test/client.test.mjs:19new Function('window', source)(window)
    • test/widget.test.mjs:37new Function('window', 'document', source)(window, document)
    • 看 eval / new Function 的入参来自哪里。常量字符串和用户输入是两回事。
  • 读取文件reads-files一般67 处命中
    • lib/index.js:52catalog = JSON.parse(readFileSync(file, 'utf8'))
    • lib/index.js:683logPath = existsSync(file) ? file : null
    • lib/log.js:211text = await readFile(file, 'utf8')
    • lib/log.js:403text = await readFile(path, 'utf8')
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 动态加载模块dynamic-import一般11 处命中
    • lib/log.js:170const { mkdir, appendFile } = await import('node:fs/promises')
    • lib/log.js:171const { join } = await import('node:path')
    • lib/log.js:187const { stat } = await import('node:fs/promises')
    • lib/log.js:188const { join } = await import('node:path')
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
能力标识关注度命中次数
以 shell 执行命令shell-exec高关注4
可执行外部程序spawns-processes高关注3
含混淆或编码代码obfuscated-code需留意34
写入文件writes-files需留意24
发起网络请求network需留意2
动态执行代码dynamic-code需留意2
读取文件reads-files一般67
动态加载模块dynamic-import一般11

这份报告的口径

扫描读的是包里的源码,全程不执行第三方代码。 本次读了 42 个文件,扫描于 2026-10-15。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。

可信度

100 健康分 S 扣分项下方逐条附证据
  • 0没有可扣分的项

认证等级 L3

  • L0静态结构与契约✓sha512-Cr1ODCXDQZBqcGHB… 与本地 tarball 复算一致,补丁与入口齐备
  • L1配置组合与依赖图✓跨包无 entry id 冲突,插入模块可解析,目录内 peer 满足
  • L2隔离沙箱冒烟✓隔离 profile 安装成功,2.6s,层已挂载;宿主带它启动(booted)
  • L3运行时健康监控✓抽样会话内未观测到外部进程 / 越界写 / 外连(2 个事件)
评分口径与作者信息

从 100 分开始按规则扣减:fail −20 / major −10 / warn −5 / minor −2;star 数、下载量、LLM 输出都不参与评分

维护者
igoruan
仓库
https://github.com/igormel81/dsh-chat-cost
许可
MIT
最后发布
2026-09-22
周下载
499
star
1

扫描状态:已扫描。能力是事实,不是缺陷; 周下载与 star 只作参考,不参与评分。

认证等级只回答四件事:包本身是否完整可解析(L0)、能不能与别的插件组合(L1)、隔离环境里装不装得上并起得来(L2)、抽样运行时有没有异常(L3)。依赖漏洞、仓库存活、下载量都不参与评级,只作为独立信号标注。可信 ≠ 无漏洞,上架 ≠ 推荐。

Node 要求>=20
第三方依赖0 个(纯自包含)
bundle patch./cordis.patch.yml
依赖安全公告已查询全部依赖,没有匹配到已公开的安全公告(含 DSH 框架包在内的 @deepseek-ai/* 不作查询——那是运行时自己的问题,不是插件的。)

元数据

主页https://github.com/igormel81/dsh-chat-cost#readme
仓库最近提交2026-09-22
仓库创建2026-09-12

返回首页