AI Agent Hub
Back to plugins
🧩

dsh-dsml-artifact-guard

admin-security Updated 2026.09.04

Run the following command in DeepSeek Harness:

dsh plugin install GooDAnDReaDY/dsh-dsml-artifact-guard

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install GooDAnDReaDY/dsh-dsml-artifact-guard in your terminal to install the plugin into DeepSeek Harness, source code available at https://github.com/GooDAnDReaDY/dsh-dsml-artifact-guard; after installation, restart the instance and set providerId and modelId in settings.yaml to activate tag sanitization.

About this plugin

When routing through certain upstream model providers or API gateways, raw DSML tool-invocation closing tags can leak into the assistant-visible text stream. These stray artifacts pollute the chat bubble, trigger Markdown rendering glitches, and may confuse downstream agents or break clipboard exports. dsh-dsml-artifact-guard is a lightweight, host-only stream interceptor for DeepSeek Harness that strips these terminal tags in real time before they reach the user interface, leaving legitimate conversation content completely untouched.\n\nThe plugin is built around four design pillars: it strictly honors the Cordis synchronous stream-hook contract so that an accidental asynchronous wrap never crashes the dispatcher with a TypeError; it maintains a 96-byte sliding buffer to reliably catch protocol fragments split across TCP or WebSocket deltas; it enforces a 100 percent fail-open policy, guaranteeing that genuine prose about DSML syntax, tool-call deltas, and usage tokens are never removed or delayed; and it scopes processing to specific providerId and modelId pairs, passing all unrelated traffic through with zero overhead. Three runtime modes are available: sanitize (default, strips tags and logs the count removed), audit (emits diagnostic logs without altering the visible stream), and disabled (full bypass).\n\nThis plugin is aimed at DeepSeek Harness administrators and developers who encounter tag leakage when connecting to particular upstream providers. No gateway reconfiguration or upstream code changes are needed-enabling the guard in your local harness instance is enough to restore a clean chat surface and keep downstream pipelines free of protocol noise.

Use Cases

  • Upstream model providers leaking raw DSML closing tags into the assistant text stream
  • Split-chunk protocol fragments causing Markdown rendering glitches or chat bubble pollution
  • Downstream agents or clipboard exports failing to parse due to residual protocol artifacts

Best For

  • Cluster administrators running DeepSeek Harness against specific upstream providers
  • LLM platform developers troubleshooting protocol tag leakage in streamed output
  • Teams managing multi-provider inference pipelines that need clean downstream data