dsh-chess-xq-plugin
Manifest validCelestial Chess: A Chinese Chess human-vs-AI mini-game. The AI plays black, Lia delivers witty live dialogue, with undo/save/difficulty adjustment.
dsh-chess-xq-plugin
DeepSeek Harness(DSH)WebUI 的中国象棋人机对战插件「天界象棋」:阁下执红先手,本天使(AI)执黑。 规则引擎 + 阿尔法-贝塔搜索(带位置估值表),移植自本地早期项目 chess-xq(中国象棋)并接线台词。
功能特性
- 输入框工具行左端「♟ 象棋」小开关打开浮窗面板(标题可拖拽移动,位置记忆:拖到哪下次还在哪)
- 落子记录在棋盘右侧(同一浮窗面板内:棋盘左、落子记录右,最新一手在最上面,走子实时刷新)
- 完整中国象棋规则:走法生成 / 将军 / 将死 / 困毙(和棋)/ 飞将判定,红先黑后
- AI 执黑:alpha-beta 搜索(默认深度 3),AI 思考时面板有转圈提示和「本天使思考中…」
- 莉娅有活台词:开局 / 将军 / 被将军 / 吃子 / 首杀 / 兑子 / 兵过河 / 残局 / 昏招 / 悔棋 / 胜负 / 和棋
各场景随机台词(移植自 chess-xq 的
lines.ts,原 web 版定义了但没接线,本插件接进对局事件) - 可悔棋(撤回一整轮:阁下 + AI)、保存 / 读取 / 删除存档(localStorage,FEN 格式)
- 设置页可调 AI 难度(1~4 层搜索)
AI 侧工具(模型可用)
| 工具 | 作用 |
|---|---|
chess_talk | 往对局面板发一句话(提示/鼓励/吐槽),显示在棋盘旁气泡里 |
chess_state | 查当前对局:轮到谁 / 状态 / 步数 / 最后一步 / 本天使最近台词 |
chess_new_game | 开一局新棋(重置棋盘,重新执红先行) |
对局里本天使说过的台词也会进 host 队列,chess_state 能看到——聊天里她知道自己下棋时说了什么。
安装
# 从源码目录安装
dsh plugin --profile web add <插件目录>
# 或从打包好的 tgz 安装(可移植,不依赖源目录存活)
dsh plugin --profile web add dsh-chess-xq-plugin-0.1.0.tgz
安装后重启 WebUI 生效。dsh 请替换为你安装的 DSH CLI 调用方式。
打包
一键交付(重建 client → 语法自检 → 插件自检 → 打包 → git 提交,做减法):
# deliver-plugin.mjs 在 dsh-plugin-dev skill 的 scripts/ 下(请替换为你本地的路径)
node <你的 dsh-plugin-dev skill 路径>/scripts/deliver-plugin.mjs dsh-chess-xq [--version x.y.z] [--commit "消息"]
产物 dsh-chess-xq-plugin-<版本>.tgz 输出到你的插件分发目录。
配置
- 持久化到
$DSH_HOME/dsh-chess-xq-config.json(AI 深度),跨重启恢复 - 无 Config schema、无 settings namespace 依赖,安装即用
- 存档在浏览器 localStorage(
dsh-chess-xq-saves),换浏览器/清缓存会丢
架构
- Host 半(
index.js入口 +host/):index.js只做组装(一次 apply 一份状态 → 注册路由/工具);host/config.js配置持久化、host/state.js可变状态(消息/命令队列 + 对局报告快照)、host/routes.js路由/dsh-chess/*(state / report / cmd / config)、host/tools.js三个 AI 工具 - Client 半(
client.js产物 +client/src/源码 +client/build.mjs打包):types.js(常量)/engine.js(规则引擎)/ai.js(alpha-beta + PST)/lines.js(台词池)/core.js(共享状态 + 对局状态机 + host 通信)/board.js(SVG 棋盘)/panel.js(浮窗面板)/ui.js(入口开关 + 设置页)/entry.js(槽位编排);conversation.input.left入口开关 +shell.overlay浮窗面板 +settings.section难度设置; 1s 轮询拉消息/命令/配置 - 零第三方依赖(host 只用 node 内置模块,client 打包也是 node 内置 fs),无 Config schema,安装即用
开发
DSH client bundle 是单文件直出(无构建步骤、require 无相对路径),所以 client 源码按功能拆到
client/src/,改源码后必须重跑打包生成产物:
node client/build.mjs
刷新页面即生效(client 半热重建);host 半(host/、index.js)改动需重启 WebUI。
姊妹仓库
同族的其它 DSH 插件(各一个独立仓库):
- dsh-liya-skin —— 皮肤:壁纸(缩略图选择 + 透明度滑条)+ 星月皮肤层(星带 / 星轨 / 标题栏徽标),素材自备
- dsh-liya-ui —— UI 润色:统一加大圆角,radius 可在原生设置页调(4–48)
- dsh-character-emote —— 角色立绘表情:多角色 + 流式情绪自动判定 + 拖拽缩放,素材自备
- dsh-liya-workspace —— 工作区档案速览:FILE-MAP 摘要 / memory·records·diary 统计 / 最近日记
- dsh-liya-archives —— 归档会话抽屉:侧边栏「已归档 (n)」入口,一键恢复 / 复制为新会话 / 移回侧边栏
- dsh-puzzle —— 莉娅拼图:滑块拼图小游戏,agent 可发话 / 换图 / 看进度
- dsh-dist-manager —— 插件分发目录(dist/)管理:自动归档旧版本 + WebUI 管理页
许可
双许可——文档与代码分开:
- 代码(
index.js、host/、client/、client.js):MIT —— 拿去用、改、再发,保留版权声明即可。 - 文档(本 README 的正文):CC BY 4.0 —— 可以自由使用、改编、连商用都行,但要署名(莉娅 / @feverZHONG)并注明来源。
两份许可的全文:LICENSE(MIT)/LICENSE-DOCS(CC BY 4.0)。
莉娅(@feverZHONG)· 宇宙美好记录官
Comments
Loading…
From the same category
by ccch1mneyyy
DSH 官方公众号收录的 TUI 补位插件:Claude Code 风,鲸鱼顶栏/实时状态/流式思考/双击 Esc 回滚/上下文进度+TPS。npm 一键装。 DSH official WeChat featured TUI plugin — Claude Code style: whale bar, live status, streaming thoughts, double-Esc rol
★ 4.3k
↓ 10.9k/wk
MIT
TypeScript
Oct 11, 2026
dsh plugin --profile terminal add @deepseek-harness-tui/dsh-tuiby strukto-ai
The World's First Virtual Terminal for AI Agents
★ 3.7k
↓ 355/wk
Apache-2.0
TypeScript
Oct 11, 2026
dsh plugin --profile agent add @struktoai/mirage-dshby bowenliang123
The best DeepSeek Harness plugin for context insight and management, with context dashboard / browser / sidebar and context command, for context statistics, composition, breakdown, evolution details,
★ 2k
↓ 34.4k/wk
Apache-2.0
TypeScript
Oct 11, 2026
dsh plugin --profile web add dsh-contextby huiliyi37
官方 DeepSeek Harness 的交互式终端 UI 插件:自研 ANSI 极简交互渲染、流式 Markdown/工具卡、16+ 主题、slash 命令与选择器、输入历史与本地偏好持久化、LSP 诊断、memory记忆,很丝滑的开发体验。
★ 287
↓ 462/wk
Apache-2.0
TypeScript
Sep 30, 2026
dsh plugin --profile terminal add @huiliyi37/dsh-tianshu-tuiby Hilbert-beinghappy
面向 DeepSeek Harness 的 Claude Code 风格终端界面,支持 Windows、macOS 与 Linux,兼容透明终端、VS Code 主题和自定义配色。
★ 197
↓ 108/wk
MIT
TypeScript
Oct 1, 2026
dsh plugin --profile web add seekttyby T-Auto
deepseek-harness Plugin Access and Implementation Standards / deepseek-harness交互生态插件规范与实施标准
★ 83
MIT
JavaScript
Oct 10, 2026