Freshness gate for the agent's test, typecheck, lint and build claims: each verification run becomes a receipt on tools/post-execute, file edits are tracked, and on agent/turn-stopping a claim whose latest receipt is stale, failed or has no readable result steers one more step naming the receipt and the files edited since.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-plugin-stalegreen
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:pavangupta352/stalegreen#path:/dsh-plugin-stalegreen
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
English | 中文
The stalegreen freshness gate as a DeepSeek Harness plugin. Verification runs (pytest, pnpm test, tsc, eslint, cargo test, next build and about eighty others) become receipts, file edits become edit events, and when the agent ends a turn with "all tests pass", "tsc is clean" or "the build succeeds", the claim is checked against the latest receipt of that category:
| Evidence | Verdict | What happens |
|---|---|---|
| Passing run, no edits since | FRESH | the turn ends |
| Passing run, files changed since | STALE | one more step, with the receipt and the edited files |
| Failing run | FAILED | one more step |
| Run whose result was hidden by a pipe or a suffix | MASKED | one more step, asking for an unmasked rerun |
| No run at all | NONE | the turn ends (strict mode: one more step) |
DeepSeek Harness's own goal system says it has no independent evaluator. This plugin is one: deterministic, local, and citing a receipt for every verdict. Zero tokens, zero network, zero telemetry.
Install
dsh plugin add dsh-plugin-stalegreen
The package is on npm and listed in awesome-dsh-plugin. The bundle inserts one plugin row, stalegreen, into the profile. Options go on that row in the profile's cordis.patch.yml:
- id: stalegreen
config:
policy: advisory # record verdicts, never steer
mode: strict # deny masked verification commands
The receipts, edit events and verdicts live under ~/.stalegreen/sessions/<session id>/, the same store the stalegreen CLI reads: npx stalegreen check shows the last session's claims and evidence, npx stalegreen receipt r-0017 a run's receipt and log tail.
How it hooks in
tools/pre-execute: a verification command gets a pending receipt; in strict mode a masked one (| tail -5,|| true,2>/dev/null) is denied with the instruction to run it without the pipe. The harness's pre-execute waterfall cannot rewrite a call, so unlike the Claude Code and Codex hooks nothing is rewritten here; the bash tool keeps the full output of a long run in a file, which limits what a pipe can hide.tools/post-execute: the bash tool's output becomes a receipt, using the runner's own summary line and the[exit code: N]marker;edit,writeandstr_replace_editorcalls become edit events.agent/turn-stopping: the last assistant message is read for green claims. A stale, failed or masked claim steers one more step with a message such as:
stalegreen: "all tests pass" is stale. Receipt r-0017 (`pnpm test`, 41 passed, 14:02:11) predates 3 later edits:
src/routes/pay.ts (14:05:40), src/lib/hold.ts (14:06:02), src/lib/hold.test.ts (14:06:31)
Rerun `pnpm test` and report the result, or state explicitly that the tests were not rerun after these edits.
A category is steered at most once per turn, so the agent can never be trapped.
What it is not
Not a judge of intent: it checks whether the evidence behind a claim is fresh and complete. Not a replacement for the runner's judgement: a pass is the runner's own summary, never an inference from silence alone.
License
MIT. Copyright (c) 2026 Pavan Gupta.
Links
More in this category
yjh051108/dsh-routing-suite★ 6997
One repository, three parts: a runtime injector for DSH plugin packages (inject, hot-reload, unload, promote a dev staging tool to the front, route self-heal, plus a settings-page plugin manager that lists, unloads and drags folders in to internalize), a task-aware reasoning-mode router agent preset (router-standard / router-spec / router-react), and a graded two-level task protocol whose six tools (commit_star, lock_stage, revise_do, edit_plan, mark_task, redteam_verdict) pin task state to disk. The injector implementation ships in-tree, so the install carries its own behaviour rather than a dependency list.
strukto-ai/mirage#dsh★ 3696
Swaps the filesystem and bash providers for a mirage virtual workspace: file tools and shell commands run over mounted resources (RAM, S3, Redis, Slack, Gmail, Notion, Postgres) instead of the host disk, with per-mount read/write/exec modes, per-command sandbox routing (monty, pyodide, quickjs in process; docker, e2b, daytona remote), and installed CLIs (git, gh, slack, linear, ntn, gws, or one you register) as head words in the virtual terminal.
first-fluke/oh-my-agent#dsh★ 1344
Runs project OMA checks before and after tool execution and when a turn tries to finish. Installs its OMA CLI dependency and initializes unconfigured projects on first use. Requires Node.js 22+; initial setup needs network access and project write access.
hust-open-atom-club/oh-dsh★ 322
Community distribution: TUI, desktop, and Web UI as one bundle with layered installation.
weijiafu14/pi2dsh★ 217
Pi Host ABI compatibility engine: after one install, unmodified Pi extensions from npm mount as native DSH plugins with `dsh plugin add <pi-package>`. Verified end to end on stock DSH with pi-mcp-adapter (full MCP manager: OAuth, resources, prompts, MCP Apps, elicitation, sampling), @tintinweb/pi-subagents, pi-code, pi-hermes-memory and pi-background-tasks; `pi2dsh inspect` reports a package's compatibility before installing.
Fishquito7/dsh-skill-mcp-panel★ 207
Manages DSH skills and MCP servers from the web settings: skill cards with hot enable/disable, workspace scopes, groups, batch migration and drag-and-drop import, plus stdio/HTTP MCP CRUD with connection tests, secret redaction and the unified dsh-panel CLI.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.