GooDAnDReaDY/dsh-dsml-artifact-guard

A fail-open stream interceptor that strips leaked DSML protocol closing tags out of the assistant's visible text before they reach the user.

The README describes the problem this solves: when interacting with certain upstream model providers or API gateways, raw DSML (DeepSeek Markup Language) tool-invocation protocol tags can leak into the assistant's visible text stream, polluting the chat bubble and breaking Markdown rendering. @goodandready/dsh-dsml-artifact-guard is a lightweight, host-only runtime stream interceptor that cleans those terminal artifacts in real time before they reach the user. Its README lists four design points: synchronous stream contract preservation (interceptors must return an AsyncIterable, not a Promise), a split-chunk buffer pipeline with a 96-byte sliding buffer so tags split across deltas still match, 100% fail-open safety so legitimate text is never dropped, and targeted provider/model scoping so other traffic passes through with zero overhead.

Coding & Development ★ 3
View on GitHub ↗

Install

dsh plugin --profile web add @goodandready/dsh-dsml-artifact-guard

Copied verbatim from the README's install block. The README's audit mode emits ctx.logger.info(...) diagnostics without modifying the user-visible stream; the default mode strips the leaked tags.

Compatibility

The README's badges state Node 20+ and the DSH plugin topic. It is a host-only runtime stream interceptor, so it processes the assistant's output stream inside the harness rather than requiring a client half.

Details

FAQ

Could it delete legitimate text?
The README states a 100% fail-open design: it never drops legitimate user or assistant text, and discussions about DSML syntax are preserved intact.
Does it process every model's output?
No. The README says it scopes processing to the provider and model configurations that exhibit tag leakage, passing other traffic through with zero overhead.

Alternatives

030611/dsh-context-provenance · 23swccp/dsh-undo · 121103qwq/dsh-vision-sidecar

More plugins in Coding & Development

Browse more in Coding & Development

Guides for Coding & Development plugins