# DeepSeek Harness Tavern Renderer Specification ## 1. Scope and source lock This plugin reproduces the message-display subset requested for DeepSeek Harness. It does not copy SillyTavern's character editor, prompt construction, slash-command runtime, lorebook, extension manager, or backend. The reverse-engineered source snapshots are fixed so later upstream changes cannot silently change this specification: - SillyTavern `SillyTavern/SillyTavern` commit `8172dcd0ee672d3cd9a5e5f7af134f91a45cd2b8` (working tree reports version 1.18.0). - DeepSeek Harness `deepseek-ai/DeepSeek-Harness` commit `47f943859bef60e4160492346772ded9b24f765a`. - The 0.4.0 regex display subset additionally uses SillyTavern 1.19.0 release commit `06bde939fb1e9c4c8d8641d810f0a916b5bce127`, with the rules below superseding the earlier regex description. Native Session/depth and reasoning contracts use DSH rc.5 source `b830ec950faba0a46dda564be3e2d854afed94f1`. Paths and line numbers below refer to those commits. The current Harness adapter was separately verified against shipped npm `0.2.1-rc.2` and `0.2.1-rc.3` hosts on 2026-10-23: `ui-chat` owns the session-scoped keyed node slot and `chat` locale. Images use the public `conversation.images.content` Factory with the owner-provided authorized `loadImage`. Web and Desktop share this client contract. V4 Session log replay, Profile plugin settings, preset plugin bundles, and Remote transport remain host concerns. ## 2. SillyTavern display pipeline `public/script.js:1753` defines `messageFormatting()`. For ordinary displayed chat text its relevant order is: 1. The first character message may run `substituteParams()` (`public/script.js:1761`). 2. Prompt-bias text is removed. 3. Display regex scripts run through `getRegexedString(..., { isMarkdown: true })` (`public/script.js:1809`). 4. Optional generated-Markdown repairs, HTML-tag encoding, quote wrapping, and TeX compatibility transforms run. 5. Showdown converts Markdown to HTML (`public/script.js:521-537`, `1816-1891`). 6. Optional character-name prefixes are removed. 7. `