rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:kelingfeng9/dshcj
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
两个面向 DeepSeek Harness Web 客户端(0.2.x,桌面版内置的 Web UI)的插件。它们都是纯客户端 UI 插件,宿主侧只有一个空的 apply(),用来让 Loader 拥有插件条目并把客户端 bundle 注入 window.__DSH_BOOT__。
公开索引:https://kelingfeng9.github.io/dshcj/index.json · 落地页:https://kelingfeng9.github.io/dshcj/
| 插件 | 作用 | 入口 |
|---|---|---|
dsh-plugin-token-cost |
实时 Token 计量、按模块拆分、按 DeepSeek 官方 API 定价动态计算人民币费用 | 会话标题栏 ¥0.0401 |
dsh-plugin-live-think |
实时思考工作视图、逐步回放、英文思考自动翻译成中文 | 会话标题栏 思考 2 |
dsh-plugin-token-cost标题栏的胶囊按钮显示当前会话的估算费用,生成中会带绿色脉冲点;点击打开右侧面板。
余额 ¥12.34;面板顶部显示账户余额(充值钱包 + 赠送钱包)、更新时间和刷新按钮。通过宿主 ctx.remote.account.getBalance 读取平台账户,页面加载、面板打开后每 30 秒、以及每轮结束时刷新。usage 到达后立即以真实值替换。≈ 标记估算值。价格来自 DeepSeek API 官方“模型 & 价格”页(人民币 / 百万 tokens,2026-11 抓取):
| 模型 | 输入·缓存命中 | 输入·缓存未命中 | 输出 |
|---|---|---|---|
| DeepSeek-V4.1-Flash-1017 | 0.02(空闲)/ 0.04(高峰) | 1 / 2 | 4 / 8 |
| DeepSeek-V4-Pro-0813 | 0.15 / 0.30 | 4.5 / 9.0 | 13.5 / 27.0 |
09:00–12:00、14:00–18:00;其余时间与周末为半价。自动 → 高峰 → 空闲 之间切换,用于中国法定节假日(插件不内置节假日表)。reasoningTokens,会在“输出”磁贴下单独显示。tokenUsage、contextBreakdown、contextPressure 三个 session projection;account Remote(ctx.remote.account.getBalance),浏览器只提交客户端版本、语言和时区偏移,不接触凭据;assistant-step 的 usage(按 turn/step、模型路由、事件时间);assistant-step.blocks 中已到达的文本按中英字符混合比例估算。dsh-plugin-live-think点击标题栏 思考 N 打开一个常驻右侧的思考工作视图,工作过程中可以一直开着。
思考 … 折叠行展开后,正文同样自动译成中文,并在顶部提供“看原文 / 机翻 / 重试”。折叠时的一行预览仍保留模型原始英文(聊天行没有暴露摘要插槽),展开后即为中文。1× / 2× / 4× 调速;回放使用中文译文(若已翻译)并保留原文入口。https://kelingfeng9.github.io/dshcj/index.json;Token Cost / Live Think 并安装。索引使用固定 commit 的 Git 源,不需要 npm;安装后 bundle 会自动插入自己的 Loader 行。如果之前装过同名的本地开发版,先执行下面的卸载,避免两套按钮。
开发者也可以直接挂载公开 bundle(不经过 Discover):
node tools/install.mjs --profile desktop --market。 它使用dist/packages/dsh-plugin-*,代码与公开 v0.1.0 相同,但 Plugins 页面不会把它列为市场安装项。
本地开发版使用内部名 dsh-token-cost / dsh-live-think,市场版是 dsh-plugin-token-cost / dsh-plugin-live-think,两者不要同时安装。
克隆仓库后,安装脚本会把两个包软链接进 profile 的 node_modules,并在 cordis.patch.yml 末尾追加一段带标记的 insert 配置:
cd dshcj
node tools/install.mjs --profile desktop
脚本会:
~/.dsh/profiles/<profile>/cordis.patch.yml;node_modules/dsh-token-cost、node_modules/dsh-live-think 两个软链接;# >>> dsh-local-plugins 块(幂等,可重复运行)。安装后刷新页面即可。 DSH 会热重载 profile 的 cordis.patch.yml,客户端启动图会在下一次页面请求时重新生成;刷新后会话标题栏会出现 ¥… 和 思考 两个按钮。若你的版本没有监听 profile 补丁(刷新后仍不出现),再退出并重新打开 DeepSeek Harness。
卸载:
node tools/install.mjs --profile desktop --uninstall
DSH 没有官方商店;市场是自定义索引源。本仓库已经准备好发布结构:
node tools/build-publish.mjs # dist/packages/dsh-plugin-*(可发布的 bundle)
MARKET_COMMIT=<40位commit> node tools/build-market-index.mjs # market/index.json + docs/index.json
公开索引默认使用 Git 源(固定 commit + 子目录),不需要 npm 账号;也可以改成 npm 源。
发布名是 dsh-plugin-token-cost / dsh-plugin-live-think(dsh-token-cost 在 npm 已被占用)。
把 docs/ 托管到 GitHub Pages,在 Plugins → Discover 添加索引 URL 即可。
完整步骤、npm 可选路径、Git 源和上架检查见 PUBLISHING.md。
市场安装的 bundle 会自动插入自己的 Loader 行;如果之前用
tools/install.mjs装了本地版,先执行node tools/install.mjs --profile desktop --uninstall,避免旧名和新名两套按钮同时出现。
dsh-plugins/
├── packages/ # 本地开发包(名字给本机 profile 用)
│ ├── dsh-token-cost/
│ └── dsh-live-think/
├── dist/packages/ # 构建出的市场 bundle(发布名)
│ ├── dsh-plugin-token-cost/
│ └── dsh-plugin-live-think/
├── market/ # format 1 索引 + 图标(托管的静态站点根)
├── tools/
│ ├── install.mjs # 本地幂等安装/卸载
│ ├── build-publish.mjs # 源码 → 可发布 bundle
│ ├── build-market-index.mjs # 生成 market/index.json
│ └── extract-runtime.js # 从 app.asar 抽取 0.2.1 运行时,用于隔离验证
├── docs/ # GitHub Pages 市场索引(index.json + icons)
├── PUBLISHING.md # 发布到 npm/Git + Discover 的完整步骤
└── LICENSE
两个插件在独立的 0.2.1 Web profile 上做过端到端验证(真实账号、真实流式生成、真实 usage、真实翻译):
# 1. 从已安装的 app.asar 抽取同版本运行时(约 200MB)
node tools/extract-runtime.js ./.dsh-lab/runtime
# 2. 首次启动会创建 profile
cd ./.dsh-lab
DSH_HOME="$PWD/home" node runtime/dsh/node_modules/@deepseek-ai/dsh/lib/bin.js --profile web --port 6099
# 3. 把插件装进这个测试 profile(另一个终端)
cd dshcj
node tools/install.mjs --profile web --dsh-home ./.dsh-lab/home
account Remote 不可用,面板会显示“API Key 模式,余额请在控制台查看”;余额刷新有最长约 30 秒的延迟,且可能落后于实际计费。reasoningTokens,此时“输出”磁贴显示“含推理与回答”。window.__ModuleLoader__.load({id, factory})),无需构建步骤,直接由宿主的 /plugins 路由提供。ctx.slots.inject('conversation.session.header.actions', ...) 把按钮注册进 Chat 的会话标题栏;useChat / useSession / useProjection 是 slot 标准 kit 提供的响应式数据源。exports.inject = ['slots', 'locale'],因此会等待槽位与词典服务就绪;槽位由 ui-conversation 声明,数据由 ui-chat 提供,卸载任一上游插件都不会让本插件崩溃(按钮不渲染)。body[data-ds-dark-theme] 切换亮/暗色,不依赖固定的深色背景。CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek。