dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Cyber wooden fish (muyu) plugin for DeepSeek Harness: every agent tool call earns merit, failed calls count as tribulations, with a merit ledger and real-time I-Ching coin divination (金钱卦). Fully local, zero runtime dependencies.
赛博木鱼 / Cyber Wooden Fish —— 电子木鱼赛博修仙,agent 干活即修行。
dsh-cyber-muyu 是 DeepSeek Harness (dsh) 的赛博木鱼插件:agent 每成功调用一次工具就敲一声木鱼、攒一分功德,报错算「渡劫」,一轮对话收工有连击;木鱼旁边还挂着一支金钱卦,摇六次铜钱当场起卦。功德簿同时是一份 agent 工作量与失败率统计。
A cyber wooden-fish (muyu) plugin for DeepSeek Harness. Every tool call the agent makes strikes the fish and earns merit, failed calls count as tribulations, and a finished turn rings a closing combo. Alongside it sits a real-time I-Ching coin divination (金钱卦) cast with three coins and six tosses. The merit ledger doubles as a lightweight workload and failure-rate report for your agent.
金钱卦是中国传统文化的趣味演绎,结果仅供娱乐,工程决策请理性判断。 Coin divination here is a cultural toy, not a prediction service. Important decisions still deserve real analysis.
| 特性 | 说明 |
|---|---|
| 悬浮木鱼 | 网页端常驻一枚可拖动的赛博木鱼,点「敲一下」即 +1 功德,配合成音效与飘字反馈。 |
| 自动敲击 | agent 每成功调用一次工具自动敲一下(成功 / 失败音色不同);一轮对话结束有收尾连击,Todo 全部完成与起卦同样计入功德。 |
| 功德簿 | 设置页展示今日 / 累计功德、工具调用次数、渡劫(报错)次数、连击与修行成就,同时是一份 agent 工作量与失败率统计。 |
| 金钱占卦 | 点「籤」以三枚铜钱摇六次实时起卦,完整呈现本卦、动爻、变卦、互卦、体用生克、解卦与工程宜忌。不是预写签文库随机抽签,每一次都是现场演算。 |
| 模型工具 | muyu_strike(让 agent 自己敲木鱼)与 muyu_oracle(让 agent 按金钱卦为你起卦,结果同步在卷轴中展开)。 |
| 纯本地 | 功德与卦象历史只存于本机 dsh storageDomain;起卦是本地数学计算,不请求任何外部 API、不联网、不消耗模型额度。 |
| 零运行时依赖 | 宿主端与浏览器端均为纯 JavaScript,npm install 只服务于构建与测试。 |
| 界面预览 | Screenshots |
|---|---|
| 悬浮木鱼 | 摇卦过程 |
| 卦象结果卷轴 | 设置页 · 功德簿 |
| 卦象历史 | 木鱼特写 |
前置要求:dsh(DeepSeek Harness)+ Node.js ≥ 22.5,使用 web profile。
dsh plugin --profile web add github:yang101and/dsh-cyber-muyu
安装后重启 dsh Web 使插件生效,页面角落会出现悬浮木鱼。
卸载:
dsh plugin --profile web remove dsh-cyber-muyu
| 操作 | 效果 |
|---|---|
| 点悬浮木鱼 | 手动敲击,功德 +1,播放动画与音效。 |
| 点「籤」 | 打开金钱卦卷轴,摇六次铜钱实时起卦,卦象落在卷轴中。 |
| 打开设置页 | 查看功德簿(今日 / 累计功德、工具调用、渡劫次数、连击、修行成就)与卦象历史,并调整各项设置。 |
muyu_strike —— 敲一声木鱼,为当前工作积攒功德,并在网页端播放敲击动画与声音。
| 参数 | 类型 | 说明 |
|---|---|---|
reason | string | 这一声为何而敲(心愿 / 庆祝 / 安慰),≤ 60 字,显示在木鱼飘字旁。可省略。 |
times | integer | 连击次数 1–9,默认 1。 |
muyu_oracle —— 按金钱卦实时起卦,返回完整卦象。
| 参数 | 类型 | 说明 |
|---|---|---|
question | string | 所问之事,≤ 200 字。可省略;问题字数会记入占验背景。 |
毫秒级合批与冷却,避免 agent 高频调用把木鱼敲成机关枪:
| 事件 | 表现 | 合批 / 冷却 |
|---|---|---|
| 工具调用成功 | 常规木鱼声 | 1.2 s 内合批,单次最多 8 声 |
| 工具调用失败 | 渡劫音色 | 1.6 s 内合批,单次最多 3 声 |
| 一轮对话结束 | 轻敲一声 | 1.5 s 冷却 |
| Todo 全部完成 | 收工三连击 | 每会话 5 分钟冷却 |
| 深夜(23:00–05:00)干活 | 深夜修行提醒 | 每晚一次 |
此外还有一层令牌桶限流(4 秒补满 12 声),兜住子 agent 风暴。
插件实现的是民间通行的文王六十四卦金钱课(六爻金钱卦),全部计算在 src/divination.js,可单测复现:
src/lunar.js,1900–2100 历表),连同问题字数、六掷钱数记入卷轴底部的占验背景。设置页可直接调整,也可通过 GET / POST /dsh-cyber-muyu/api/config 读写。
| 键 | 默认值 | 说明 |
|---|---|---|
enabled | true | 总开关。 |
volume | 0.6 | 音量,取值 0–1。 |
autoStrike | true | agent 事件自动敲击。 |
soundAuto | true | 自动事件是否发声;关闭后只播放动画。 |
corner | "bottom-right" | 悬浮木鱼位置:bottom-right / bottom-left / top-right / top-left。 |
showMeritPill | true | 木鱼旁显示今日功德气泡。 |
nightGuard | true | 深夜修行提醒。 |
categories | 全部 true | 分类开关:tool-ok / tool-fail / turn / finale。 |
所有路由挂在 /dsh-cyber-muyu/api 之下,并沿用 dsh 的信任栅栏:connection.requestRejection 的 Host / Origin 校验加浏览器认证。
| 方法 | 路径 | 说明 |
|---|---|---|
GET | /stream | SSE 事件流,推送 strike / achievement / oracle / night 事件。 |
GET | /state | 当前配置、功德簿摘要与最近 10 条卦象。 |
POST | /strike | 手动敲击,body {"times":1,"reason":"..."}。 |
POST | /oracle | 起卦,body {"question":"...","coins":[[2,3,2], ...]};coins 为浏览器摇卦动画的六掷结果,省略则由服务端随机。 |
GET / POST | /config | 读取 / 写入配置。 |
POST | /reset | 重置功德簿与卦象历史,body {"confirm":"reset"}。 |
dsh_cyber_muyu),不上传。POST /dsh-cyber-muyu/api/reset(body {"confirm":"reset"}),或停止 dsh 后删除对应 storage 文件。npm install # 无运行时依赖,仅为构建与测试
npm run check # 语法检查(host + client 全部源文件)
npm test # 单元测试(禅修内核 / 农历 / 起卦引擎,41 用例)
npm run build:client # 零依赖拼接构建 client/bundle.js
client/bundle.js 由 scripts/build-client.mjs 生成,请勿手动修改。
用 --patch 把工作树叠加进本地 dsh(不写入 profile,不影响已安装插件):
cp cordis.dev.example.yml cordis.dev.yml
# 编辑 cordis.dev.yml,把 name 改成本仓库 src/index.js 的绝对路径
dsh --profile web --patch ./cordis.dev.yml --port 3180 --no-open
cordis.dev.yml 含本机绝对路径,已在 .gitignore 中,不会发布。
本项目以 MIT 许可证 发布。
黑白极简木鱼的造型语言受以下项目启发,木鱼图形为本项目自绘 SVG:
农历换算表(src/lunar.js)数据源自 jjonline/calendar.js,原始数据为香港天文台公开历表。
第三方声明详见 NOTICE。