dsh-muv-engine
Manifest validMUV engine for DeepSeek Harness: runs the regex_scripts from a character card against model output, tracks variables, renders a status bar, expands macros and LaTeX, and styles tagged code blocks such
⚙️ dsh-muv-engine
DSH 原生 MUV 引擎 —— 酒馆伴生插件。
🔗 依赖 dsh-muv-table,配合 dsh-tavern-v2 使用。
是什么
替代 MagVarUpdate 的 DSH 原生实现,v0.3.0 起融合了 dsh-visual-render:
🎮 变量与状态
- 正则引擎:执行角色卡
regex_scripts,实时替换 LLM 输出 - 变量追踪:跨对话轮次追踪变量状态,自动提取
<UpdateVariable>块 - 状态栏渲染:提取
<StatusPlaceHolderImpl/>的 HTML,iframe 沙箱渲染
🎲 宏展开
聊天输入框内直接写宏,按 Enter 自动展开后发送给 AI:
{[random::去酒楼::去坊市::去洞府]} → 每次随机选一个
{[pick::宝箱::灵石x50::剑谱::丹药]} → 固定结果,缓存为「宝箱」
{[roll::2d6+3]} → 掷 2d6 加 3 调整值
- 支持调整值:
{[roll::1d20+5]}、{[roll::3d6-1]} - pick 缓存可用
_tavernRerollPick('key')重抽(浏览器控制台) - 控制台调试:
_tavernExpandMacros('...')/_tavernListPicks()
🏷️ 标签渲染
AI 输出自动美化(_tavernRenderTags 钩子),支持转义形态(<标签>):
| 标签 | 效果 |
|---|---|
| <speech> | 斜体灰色对白 |
| <action> | 绿色斜体动作 |
| <thought> / <thinking> | 紫色斜体内心 |
| <char> / <character> | 金色粗体角色名 |
| <dialogue> | 蓝色左边框 |
| <赏令接取> ~ <自由开局> | 独立配色游戏卡片(金/紫/青/蓝/青绿/橙) |
| <Drama> | 暗红渐变戏剧卡片(含 .mys 内容区样式) |
| <choices> | 选项按钮(按行解析,支持 A、/1./•/无前缀) |
| <style> | 自动剥离(世界书模板 CSS 不展示) |
| <inventory> / <背包> / <skill> | 折叠列表卡片 |
| <quote> / <引用> | 引用块 |
🖼️ visual 代码块渲染(融合 dsh-visual-render)
聊天里 ```visual 代码块自动渲染为沙箱 HTML 界面:
- 信纸 / 终端 / 报纸 / 手机 / 浏览器组件
options代码块 → 可点击剧情选项按钮aside代码块 → 淡色旁白scene代码块 → 场景标题卡- iframe
sandbox隔离,安全运行
🌠 LaTeX 渲染
\(...\) 公式自动渲染(含 array/fcolorbox/colorbox/textcolor/rule 等)。
安装
dsh plugin --profile web add dsh-muv-engine
API 端点
| 端点 | 方法 | 功能 |
|------|------|------|
| /api/muv-engine/expand-macros | POST | 服务端展开宏(random/pick/roll) |
| /api/muv-engine/reroll-pick | POST | 清除 pick 缓存 |
| /api/muv-engine/apply-regex | POST | 对文本执行正则脚本 |
| /api/muv-engine/apply-regex-card | POST | 从卡片 JSON 执行正则 |
| /api/muv-engine/state | GET/POST | 获取/更新变量状态 |
| /api/muv-engine/extract | POST | 提取 <initvar> 并生成 MUV 块 |
| /api/muv-engine/generate | POST | 编辑后生成 MUV 块 |
| /api/muv-engine/status-bar | POST | 提取状态栏 HTML |
协议
PolyForm-Noncommercial-Copyleft-1.0.0 — 详见 LICENSE
Similar plugins
MUV variable table editor for DeepSeek Harness: a tree view of the variables being tracked, a macro test panel for random, pick and roll, a dice shortcut bar and pick-cache management. Companion plugi
★ 0
dsh plugin --profile web add dsh-muv-tableA developer toolkit for the DeepSeek Harness (DSH) web console: a real multi-tab PTY terminal docked under the composer plus an AI-output file browser sidebar with syntax highlighting, Markdown render
★ 0
↓ 138/wk
dsh plugin --profile web add dsh-devpanelby HaoyueQin
DeepSeek Harness web plugin: inline +N −M diff badges on edit/write tool rows and a per-turn file change summary card. Scroll-windowed diffs, PTC/code-dispatch fallback, undo — no git required.
★ 7
MIT
TypeScript
Sep 10, 2026
dsh plugin --profile web add dsh-diff-statby adrianleb
A persistent, responsive tmux control-mode cockpit for DeepSeek Harness Web.
★ 0
MIT
TypeScript
Sep 1, 2026
dsh plugin --profile web add dsh-tmux-ccSession change-review for DeepSeek Harness: tracks write/edit tool calls and renders VS Code-style side-by-side diffs via diff2html, auto-following the theme, with subagent aggregation and one-click r
★ 0
dsh plugin --profile web add dsh-diff-reviewby jiuge2467
现代化 DeepSeek Harness (DSH) 全栈增强工作台 · 多源 MCP 可视化调试中枢 · 视觉思考引擎 · 灵动极客伴侣
★ 12
MIT
TypeScript
Aug 16, 2026
dsh plugin --profile web add @deepseek-ai/dsh-base