ben7am1n/dsh-lens-lite1

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

AI 分析

核心用途是在 AI 修改代码后自动运行 tsc、eslint 等工具进行语法和类型检查。适合代码编写任务,能让 Agent 及时发现并修正代码错误。

パッケージ
dsh-lens-lite
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/08/13

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ben7am1n/dsh-lens-lite

ドキュメント

README 全文を読む ↗

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]

Checker fields

FieldDefaultMeaning
name— (required)Label shown to the model above this checker's output
extensions— (required)Lowercase, leading-dot extensions this checker claims
argv— (required)Executable + arguments. argv[0] resolves against the subprocess provider's scrubbed PATH. Never shell-interpreted
cwd.Working directory, resolved against the harness process directory (your workspace root)
timeoutMs30000Wall-clock bound; the process tree is terminated when it expires
graceMs2000SIGTERM→SIGKILL grace for that termination
maxOutputBytes65536In-memory cap per collected stream; overflow keeps the tail
cleanExitCodes[0]Exit codes meaning "no findings"
streams[stdout, stderr]Which streams carry findings, in concatenation order

argv entries support three placeholders, substituted per run:

PlaceholderValue
{file}Absolute path of the edited file
{relFile}That path relative to cwd
{dir}Its containing directory

Plugin fields

FieldDefaultMeaning
tools[write, edit, str_replace_editor]Tool names whose successful results are inspected
checkers[]Checkers, all consulted; empty means the plugin does nothing (it says so once at load)
maxDiagnosticChars4000Cap on model-visible diagnostic text per result; overflow keeps the head, because the first error is usually the cause of the rest