dsh-lens-lite
Post-edit diagnostics for DeepSeek Harness: runs configured type-checkers and linters after a successful write/edit and feeds the findings back to the model as tool-result context
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ben7am1n/dsh-lens-lite说明文档
阅读完整 README ↗dsh-lens-lite
Post-edit diagnostics for DeepSeek Harness.
After a file-mutating tool succeeds, this plugin runs the checkers you configured for that file's extension and attaches their output to the same tool result as model-visible context. The next model request therefore already carries the type errors or lint findings the edit introduced, instead of the model discovering them a few turns later.
dsh-lsp covers semantic navigation (definition, references, hover). It does not surface diagnostics, and nothing in the shipped harness runs a type-checker after an edit. This plugin fills that gap.
Install
dsh plugin --profile web add dsh-lens-lite
Then override the row in your profile's cordis.patch.yml with the checkers your toolchain actually has (the shipped row has none — see Configuration).
How it behaves
- Runs only after a successful call to a watched tool (
write,edit,str_replace_editorby default). - Takes the edited path from the tool's canonical
pathvalue — the path the filesystem backend actually resolved — and falls back to thefile_pathargument for tools that declare no such value. - Runs every checker claiming that file's extension, concurrently.
- Attaches nothing when every checker exits with a configured clean code and prints nothing.
- Never vetoes and never rewrites a call. It delegates the
tools/post-executewaterfall first and only folds context onto whatever decision came back, preserving every downstream context's own source and metadata. - Skips linting entirely when a downstream listener blocked the call — that blocked call is already the feedback the model must react to.
- Honours the tool call's cancellation signal, and terminates a checker's whole process tree when its own timeout expires.
Findings arrive as a notice-form plugin context, so the transcript shows a collapsed one-line summary rather than a wall of compiler output.
Configuration
Every deployment-varying value is a config field. The plugin ships no built-in commands: which checkers exist is a property of your toolchain, not of this package.
- id: lens-lite
name: dsh-lens-lite
config:
tools: [write, edit, str_replace_editor]
maxDiagnosticChars: 4000
checkers:
- name: tsc
extensions: ['.ts', '.tsx']
argv: ['npx', '--no-install', 'tsc', '--noEmit']
cwd: '.'
timeoutMs: 60000
- name: eslint
extensions: ['.ts', '.tsx', '.js', '.jsx']
argv: ['npx', '--no-install', 'eslint', '--format', 'compact', '{file}']
cleanExitCodes: [0]
- name: ruff
extensions: ['.py']
argv: ['ruff', 'check', '--output-format', 'concise', '{file}']
- name: go-vet
extensions: ['.go']
argv: ['go', 'vet', '{dir}']
streams: [stderr]