dsh-liketavern
Manifest valid★ 228A DeepSeek Harness (dsh) plugin — turns dsh web into a SillyTavern-style roleplay frontend: character cards, prompt presets, lorebooks, personas, BM25 long-term memory, world-state deltas, and rollbac
dsh-liketavern
Use character cards, world books, and long-term memory to start Tavern-style roleplay within dsh web on DeepSeek Harness.
v0.2.5 · Compatible with dsh 0.1.5-rc.2 · Node.js ≥ 24
English | Chinese
Import SillyTavern character cards and prompt presets to manage settings, advance the story, regenerate, and switch branches within the same dsh session. Regular conversations use dsh's model configuration and agent runtime; the interface follows the host's operating conventions and defaults to the host language.
Built-in EJS prompt templates, partial Tavern Helper interfaces, and optional native MVU. Third-party cards may or may not work directly depending on which APIs they rely on; see the compatibility notes below.
Installation
Prerequisites
| Item | Requirement |
|---|---|
| Node.js | Version 24 or later; current development and CI use Node 24 |
| dsh CLI / host | 0.1.5-rc.2 — this plugin's host dependency is locked to this version |
| pnpm | Installed and available in the terminal, used by dsh plugin to manage plugin dependencies |
| Model | Model configured in dsh and able to hold a normal conversation |
If you are using dsh for the first time, see the official documentation and run dsh web once to complete the configuration. The web profile is automatically initialized on first launch or when a plugin is installed.
Install
In a terminal, pin to a release tag:
dsh plugin --profile web add github:Amakurai/dsh-liketavern#v0.2.5
dsh plugin --profile web list --depth 0
Once dsh-liketavern appears in the list, stop the running dsh instance, then start it again:
dsh web
This repository ships with a compiled lib/, so no build is required for a standard install. The plugin is automatically added to the web profile as a bundle; see the official Packaging and Installing Plugins documentation for details on the install mechanism.
Installer Package
Download dsh-liketavern-0.2.5.tgz from the v0.2.5 Release, then run the following in the directory containing the file:
dsh plugin --profile web add ./dsh-liketavern-0.2.5.tgz
Restart dsh web after installation. The release includes a SHA256SUMS.txt that can be used to verify the downloaded file.
Upgrading
First verify the host version in the changelog, stop dsh and back up data, then run the target version's install command. Upgrades reuse the existing data directory; see Data & Backups for full scope.
GitHub URLs without #版本标签 follow the repo's default branch. To pin content, use a release tag or specific commit. Before upgrading the dsh host, confirm a corresponding plugin version exists.
Getting Started
- Prepare a character card. In dsh settings, go to "Tavern → Characters" to import PNG / JSON, or create a character. On import, choose whether to accept the card's embedded world book.
- Start a new scenario. Create a new conversation, select "Tavern Mode", then pick a character card. New conversations don't auto-bind a default character; "Import / Create Character" in an empty list also opens the management page.
- Choose a greeting. If multiple greetings exist, switch with left/right buttons, then click "Start Conversation"; cards without greetings accept direct input.
- Adjust settings. Click the character entry at the top of the conversation to select prompt presets, personas, and world books for this session. Shared assets are managed in Tavern settings; personas are on the "User" page.
- Continue or modify the story. Use the action bar next to AI replies to regenerate, edit, revert, continue, or AI-reply; same-floor branches switch via
‹ n/m ›.
Scripts and MVU: Global, preset, and character scripts are managed under "Tavern → Settings → Scripts"; you can edit, toggle, and view runtime errors. For cards needing auto-MVU, also check "Enable native MVU auto-update" in the character config at the top of the conversation and save; keep the conversation page open at runtime.
UI language: Defaults to following the host (Chinese host shows Chinese, all others show English). You can pin it to Chinese or English via "Tavern → Settings → UI → UI Language"; the choice is saved immediately and affects only the plugin interface.
Tool calling: Tavern uses dsh native PTC. When settings suffice, the model roleplays directly; for lookups or notes, it makes one run_code call with merged operations, independent queries can run in parallel, and only necessary results return. Writes still go through the current scenario's floor transaction. After updates, restart dsh to load plugin-hosted Tavern presets; self-hosted instances must provide codeRuntime, same as stock PTC mode.
Features
| Feature | Current Capabilities |
|---|---|
| Character cards | Import V1 / V2 / V3 PNG and JSON character cards; export PNG / JSON; supports recoverable trash and reference-protected permanent deletion; multiple greetings, embedded world books, regex and HTML interactive cards |
| Presets and personas | Import, edit, and export ST prompt presets; personas provide {{user}} name and description; data is validated at all read/write entry points for presets and personas |
| World books and world state | Global, character, and conversation-level world books; keyword-triggered and always-on entries; a scenario change layer records new, changed, and invalidated facts |
| Long-term memory | BM25 retrieval with time decay, read/written by the model on demand; when capacity is exceeded, auto-summarization happens in idle phases, preserving a searchable archive source |
| Scenario branches | Regenerating, editing, and reverting create independent sub-conversations, undoing affected memory, variables, and other scenario state while preserving the original conversation |
| EJS templates | Conditionals, loops, async expressions, scenario and message variables, JSON / YAML initial values, JSON Patch, Zod, Lodash, Faker, and world-book decorators |
| Interactive cards and scripts | Sandbox card UIs, three types of script libraries, persistent scenario variables, same-page/same-scenario events, world-book read/write, message edit / delete / swipe, and display refresh |
| Native MVU | Optional auto-initialization and variable updates after normal replies, with failed tasks kept for retry; restricted adaptation of character regex-declared status bar placeholders |
| Proxy replies and continuation | AI proxy replies generate user dialogue and copy it to the clipboard; continuation keeps generating along the current conversation |
The model can invoke 7 tools on demand: memory search / write / update, world-book entry read, world-state update, asset list / read. Plain roleplay replies directly; tools are used only when settings are missing or confirmed facts need to be recorded.
Editor warns on unsaved edits and restores drafts; UI adapts to narrow screens. Mobile fit of third-party cards depends on the card's own layout.
Compatibility
Third-Party Cards, Templates, and Scripts
- Tavern Helper provides partial compatibility interfaces. Variables, script libraries, world books, and various message operations are supported;
generate/generateRaw, message insertion and rotation, history pagination, and cross-page events are still to be adapted. Full interface and examples: Tavern Helper compatibility notes. - EJS templates are built in. Cards using the supported interfaces do not need to install ST-Prompt-Template separately; host differences in prompt placement, history handling, etc. are covered in Prompt template notes.
- MVU support has boundaries. The pure official MVU import path can be adapted to the native executor; custom frameworks keep their original code; the classic schema and the
BEFORE_MESSAGE_UPDATEbody-update hook are still to be adapted. The current UI has no dedicated variable schema editor entry. - Interactive cards run in an isolated iframe. Main-page DOM,
parent.TavernHelper,parent.$, or Node access are not provided. Network requests and external scripts are restricted by default; trusted domains can be configured under "Settings → Cards & Data"; images and fonts load per existing policy. - Script options are not sent automatically. Text options published by background scripts are filled into the current input draft after the user clicks; AI proxy replies still use the clipboard and require manual pasting.
Prompts, Sampling, and Floor Operations
| Item | Actual Behavior |
|---|---|
| Sampling parameters | temperature, maxTokens, stop, and the model's published thinking tiers take effect; top_p and penalty coefficients are recorded only. When the host locks thinking off, the plugin cannot force it on |
| Prompt preview | "Recent host request" shows the actually captured request (before adapter transformation); other tabs are recomputed ST simulations and do not represent the actual in-model messages |
| Regex and positions | Live rendering uses output/render; input/send, prompt/assemble, prompt/send history rewrites are used only for simulation and proxy replies. Static depth content goes into the stable prompt segment; dynamic @D and author notes go into per-turn context |
| Rewrites and deletions | Floor edits, reverts, regenerations, and script message deletions are implemented via branches, with the original conversation preserved. Editing AI body text undoes that floor and subsequent derived facts without automatically re-extracting or triggering a reply |
| Rollback scope | Rollback covers plugin scenario state; tool side effects outside the scenario workspace are not undone by floor operations |
Data & Backups
Plugin data lives in $DSH_HOME/dsh-tavern/. Without DSH_HOME set, the default is ~/.dsh/dsh-tavern/ (%USERPROFILE%\.dsh\dsh-tavern\ on Windows). Host chat logs and settings are stored in other dsh directories; a full migration or upgrade backup should copy the entire DSH_HOME after stopping dsh.
Character assets shared, scenario state isolated. Cards, presets, scripts for a character are reusable; each scenario/branch stores its own memory, world changes, notes, chat world book, variables, rollback log. New scenarios copy the character's initial state; changing "Initial State" only affects later scenarios. Multiple host processes on one data dir not supported.
| Save Method | What It Contains | How to Restore / Notes |
|---|---|---|
| Interactive card variable backup | Saved variables for the current scenario; variable data up to 1 MiB | In "Settings → Cards & Data", select the character and scenario, then export or paste a backup to restore; does not include message bodies, character cards, script assets, or form input not yet written to variables |
| Edit draft persistence | Unsaved edits to characters, presets, world books, user, regex, memory, and settings | After "Draft persisted" appears, refreshing or reopening the editor in the same browser tab restores it; you still must click save to apply. Single-draft limit 2 MiB |
| Full directory backup | Plugin data plus host sessions, settings, etc. | Back up the entire DSH_HOME after stopping dsh; the variable export above does not replace a full backup |
Drafts live in editor-drafts/ under the plugin data dir; the browser keeps only a random tab ID. Recovery isn't guaranteed after closing the tab or disabling storage; a failed stash keeps page content with retry, explicit discard clears it. Preview interactive data is transient, never written to real scenarios.
Legacy shared state copies into standalone scenarios on first open; original dir kept. Mixed multi-branch facts can't auto-split—check migration results. Auto-summarization may miss details; original sources kept. Abnormal replies don't trigger archiving. Branches use disk; no auto-cleanup.
FAQ
No Tavern mode or settings entry after install? First verify the host is 0.1.5-rc.2 with dsh --version, then check the install target with dsh plugin --profile web list --depth 0. Restart dsh web and create a new conversation; if it still doesn't appear, check the plugin loading errors in the terminal.
Card displays, but buttons, scripts, or MVU don't work? In "Settings → Scripts", verify that the script and its containing folder are enabled and saved, and review the current conversation's runtime diagnostics. MVU also requires the in-conversation auto-update option to be on and the page kept open. For cards that depend on parent-window objects or unimplemented interfaces, check dependencies per the compatibility notes.
Want to inspect the data directory without modifying any files? In an installed environment run dsh plugin --profile web exec dsh-tavern-doctor (or npm run doctor from the source repo); add --json for machine-readable output. The report provides only version, directory status, character/scenario/WAL counts, and fixed issue codes — it does not output real paths, asset names, IDs, bodies, or tokens, and offers no repair parameters.
pnpm reports a blocked build script? This plugin ships compiled artifacts; first check which specific dependency the error refers to. For plugin source build issues, try the Release installer package instead; host dependency build requirements still follow dsh's prompts — check the allowBuilds configuration in the corresponding profile's pnpm-workspace.yaml.
When reporting issues, please provide the plugin and dsh versions, the steps to reproduce, the relevant error, and a minimal reproduction with private content removed. You can submit via GitHub Issues.
Docs
| Doc | Contents |
|---|---|
| Changelog | Version changes and host correspondence |
| Tavern Helper compatibility notes | Card UI, scripts, variables, world books, messages, and MVU interfaces |
| Prompt template notes | EJS, macros, decorators, and examples |
| Architecture notes | Scenario isolation, branch rollback, memory, and prompt channels |
| Host compatibility record | Verified host behaviors and upgrade checks |
| Dependency security record | Security updates, remaining Showdown warnings, and isolation boundaries |
| Development conventions | Code boundaries, testing, and delivery requirements |
Development
Under Node 24, run from the repository root:
npm ci
npm run build
npm test
npm pack --dry-run
lib/ is a deliverable committed to Git; after changing src/, rebuild and commit in sync. npm pack builds first; the published package contains only compiled artifacts, plugin config, presets, and release notes. Tests use hand-crafted factory data; real cards, conversations, or memory are never committed.
本地挂载与调试
First run dsh web once to initialize the profile, then mount the repository at $DSH_HOME/profiles/node_modules/dsh-liketavern. The examples below use the default ~/.dsh; replace the path when using a custom DSH_HOME. Use a dedicated development data directory to avoid the installed release package shadowing the local mount.
# Windows(PowerShell,在仓库根目录执行)
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.dsh\profiles\node_modules" | Out-Null
New-Item -ItemType Junction -Path "$env:USERPROFILE\.dsh\profiles\node_modules\dsh-liketavern" -Target (Get-Location).Path
# macOS / Linux(在仓库根目录执行)
mkdir -p ~/.dsh/profiles/node_modules
ln -s "$(pwd)" ~/.dsh/profiles/node_modules/dsh-liketavern
After mounting, run npm run dev, which starts with dsh web --patch ./cordis.patch.yml. After code changes, run npm run build first, then restart the dev instance to verify.
src/
├── core/ 纯函数:提示词、世界书、正则、宏、BM25、兼容数据处理
├── state/ 文件存储:角色资产、剧情工作区、记忆与回滚日志
├── node/ 宿主编排:配置、服务、管线、楼层、工具与维护
├── client/ React 界面:管理页、会话操作、交互卡与脚本运行器
├── index.ts 宿主入口
├── agent.ts agent 入口
└── remote.ts 前后端业务契约
License
Comments
Loading…
Similar plugins
by LingyeSoul
DSH plugin: SillyTavern-compatible roleplay workspace with Character Card V2/V3/PNG import, World Info lore engine, presets, swipes, chat editing and streaming LLM generation. Official bundle, install
★ 15
↓ 1.6k/wk
GPL-3.0
JavaScript
Aug 17, 2026
dsh plugin --profile web add dsh-tavernRole-play plugin for DeepSeek Harness: imports SillyTavern character cards (JSON/PNG) and world books (lorebooks), binds DSH skills to a character, and registers the combination as a native agent pres
★ 0
dsh plugin --profile web add dsh-bardby TritiumWang
Request-level one-time prompt injection without further context pollution. SillyTavern-style UI and data compatibility, keyword/regex/constant triggers, and a lore_lookup tool for on-demand searching.
★ 3
MIT
JavaScript
Sep 6, 2026
dsh plugin --profile web add dsh-universal-worldbookby chen731215-dev
DeepSeek Harness Tavern Plugin - character card roleplay, worldbook management, preset switching, dark theme, memory summary, relationship graph, PolyForm-Noncommercial-Copyleft-1.0.0
★ 56
↓ 1.6k/wk
NOASSERTION
JavaScript
Oct 17, 2026
dsh plugin --profile web add dsh-tavernby hutao562
DeepSeek Harness plugin: a sidebar tab that takes over the whole page with another DSH instance's Web GUI, plus a remote session-state badge. 在侧边栏顶部加一个「远程」标签,整页切到另一台主机上的 DSH。
★ 0
↓ 289/wk
MIT
JavaScript
Sep 11, 2026
dsh plugin --profile web add dsh-remote-dshby XCNXNXNX
DeepSeek Harness 的「便携酒馆」插件:RPG 式 SillyTavern V2/V3 角色卡生成器 + 酒馆角色扮演聊天。支持世界书、角色卡 JSON/PNG 导入导出、面板主题与本地音乐。独立插件,仅依赖官方 @deepseek-ai SDK。
★ 24
↓ 75/wk
MIT
TypeScript
Oct 3, 2026
dsh plugin --profile web add dsh-portable-tavern