dsh-dsml-guard

Strips DSML markers that leak into assistant prose, and resumes a turn when a "continue" genuinely helps — a marker-only leak that produced no output, a single-reply output token cap (max-tokens), or an error the host's own retry policy never covers; codes the host already retries inside the step (EMPTY_RESPONSE, SERVER, TIMEOUT, TRANSPORT) are handed to it by default, and setting skipHostRetriedCodes: false restores the plugin's own resume. Codes upstream miscategorises are split by message text, and consecutive resumes stop at 3 until a normal reply resets them; quota, rate-limit, auth and context-window errors, and user aborts, never resume. Requires DSH 0.2.1-rc.2 or newer, below 0.3.0, and Node 20 or newer.

Overview

Strips DSML markers that leak into assistant prose, and resumes a turn when a "continue" genuinely helps — a marker-only leak that produced no output, a single-reply output token cap (max-tokens), or an error the host's own retry policy never covers; codes the host already retries inside the step (EMPTY_RESPONSE, SERVER, TIMEOUT, TRANSPORT) are handed to it by default, and setting skipHostRetriedCodes: false restores the plugin's own resume. Codes upstream miscategorises are split by message text, and consecutive resumes stop at 3 until a normal reply resets them; quota, rate-limit, auth and context-window errors, and user aborts, never resume. Requires DSH 0.2.1-rc.2 or newer, below 0.3.0, and Node 20 or newer.

Installation

Install from npm

dsh plugin --profile web add dsh-dsml-guard

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

Install from GitHub

dsh plugin --profile web add github:Jessicaisleep/dsh-dsml-guard

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.