插件目录 / UI & Skins / dsh-task-estimator
dsh-task-estimator
已验证 · 实测可装 0x250-t
功能简介
DeepSeek Harness (DSH) plugin: live task completion time, token & per-model cost estimator in the session header, with LLM-powered PERT estimates. / DSH 插件:会话标题栏实时任务耗时、token 与花费估算。
可用 — 实测通过,早期项目
DeepSeek Harness (DSH) plugin: live task completion time, token & per-model cost estimator in the session header, with LLM-powered PERT estimates. / DSH 插件:会话标题栏实时任务耗时、token 与花费估算。 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-task-estimator
v1.1.1 — 修复 client 加载:factory 内定义
module全局(浏览器 ESM 运行时无module,否则 client 半区启动报错)
🤖 由 DeepSeek Harness 辅助开发 · Built with DeepSeek Harness
DSH 插件:会话标题栏任务估算窗口——预计剩余时间、token 用量与按模型花费估算(≈CNY),支持 LLM 智能估算。
Session-header task estimator for the DeepSeek Harness web GUI: estimated remaining time, token usage and per-model cost (≈CNY), with an optional LLM-powered estimate.
功能 Features
- 启发式估算 Heuristic estimate:基于会话投影(
sessionStats/tokenUsage/goal)实时计算——已用轮次/token/耗时、平均每轮、预计剩余(近 5 轮趋势外推 + 置信区间)、预计完成时刻 - 花费估算 Cost estimate:按会话日志重放 token 用量,按「模型 × 时段」(legacy/peak/offPeak,北京时间)增量计价,返回汇总 + 按模型明细(模型 / token / 花费),价格随生效日期自动切换
- AI 估算 LLM estimate:用会话当前模型做轻量补全,输出 PERT 三点估算(乐观/最可能/悲观剩余分钟 + 期望值)、剩余轮数/token、任务复杂度分档(XS~XL)、METR 可靠性警告(估算超过模型 p80 阈值时建议拆分任务)
- 本轮预计 Per-round estimate:agent 思考中(「Deep diving...」状态行)时,在该行右侧注入「本轮预计 ≈ X」——以近 5 轮 LLM 耗时趋势(趋势不可用时取全程平均)预估本轮对话所需时长,随每轮节奏变化自动刷新
- 交互 Interaction:悬停显示、移开 0.3s 后 0.5s 线性淡出、点击固定(再次点击任意位置关闭)、
Alt+E切换、触屏自动降级、面板内点击不退出、内容超高可滚动 - 设置 Settings:价格表可编辑(legacy 档,峰谷倍率自动派生)、刷新间隔自定义(分钟,支持小数)、恢复默认、固定状态持久化(localStorage)、价格生效日程(本地/北京日期、当前价格时段、新价格生效日)
安装 Install
bundle 插件,安装后重启 web:
dsh plugin --profile web add github:0x250-t/dsh-task-estimator#v1.1.0
或本地目录(先 npm run build):
cd dsh-task-estimator
dsh plugin --profile web add .
使用 Usage
- 悬停会话标题栏右侧的估算按钮(
⏱ 剩余 X · Y tok · ≈¥Z)查看明细 - 点击按钮固定面板;再次点击任意位置关闭
- AI 估算:展开「AI 估算」区块 → 点击「开始估算」(也可设置自动刷新间隔)
- 设置:展开「设置」区块 → 编辑价格/间隔 → 保存;「恢复默认」一键还原
- agent 思考中(「Deep diving...」状态行):右侧会显示「本轮预计 ≈ X」,即对当前这轮对话耗时的实时预估
算法说明 Algorithm
- PERT:
E = (O + 4M + P) / 6,区间[O, P],顺序异常时排序降级 - METR:估算期望超过模型 p80 可靠性阈值(flash 约 60 分钟 / pro 约 90 分钟)时提示拆分任务
- 任务分档:按轮次 / 工具调用数 / 用户消息量归为 XS~XL
- 参考:agent-estimate(github.com/kiloloop/agent-estimate)、codex-eta(pypi.org/project/codex-eta)
隐私 Privacy
- 全部状态为进程内存,无任何持久化
- 无 API key / 密钥 / 密码硬编码;无网络外发(除 AI 估算时对已配置模型的一次调用)
- 价格表为内置参考值,可在设置中修改
构建 Build
npm install # 安装 esbuild(devDependency)
npm run build # 构建 lib/client.js + 语法检查
License
MIT
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-task-estimator」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:0x250-t/dsh-task-estimator Headless(CLI)profile:
dsh plugin --profile headless add github:0x250-t/dsh-task-estimator 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。