seek://map/dsh-lsp-diagnostics
dsh-lsp-diagnostics — Real-time LSP Diagnostics for DSH Agents
#lsp #diagnostics #developer-experience #typescript #python
TL;DR
Per its README, dsh-lsp-diagnostics brings real-time LSP diagnostics to dsh agents, closing the edit → diagnostics → fix loop: the model edits a file and immediately sees what broke. Ships lsp_diagnostics / lsp_workspace_errors / lsp_hover tools plus an auto-injected per-edit delta; TypeScript/JavaScript and Python are supported, Rust deferred. Maintained by lemonxiny55; published on npm.
dsh-lsp-diagnostics gives a dsh agent the feedback loop an IDE gives a human: the model edits a file through the harness and immediately sees what broke — file:line:col, error code, message — via the `lsp_diagnostics` / `lsp_workspace_errors` / `lsp_hover` tools or an auto-injected per-edit delta that never dumps the whole workspace. TypeScript/JavaScript and Python are supported via npm-installable servers, a crashing server degrades gracefully instead of respawn-looping, and every surface is capped to guard token cost.
Facts
- install
- npx @deepseek-ai/dsh plugin --profile web add dsh-lsp-diagnostics
- license
- MIT
- note
- README 自述 harness 处于开发者预览,上游插件 API 可能有破坏性变更;LSP 服务器须自装于 PATH,本插件按设计不捆绑任何服务器。
Key points
- Per its README, the model gets lsp_diagnostics (current diagnostics for a single file or all files the servers have seen, severity-filtered and capped — call it right after editing a file), lsp_workspace_errors (the what-is-broken-right-now workspace view) and lsp_hover (type/signature info at a position, optional helper)
- Optional auto-injected section: after the model writes/edits a file through the harness, the plugin subscribes to the fs/observed event, refreshes the file on its language server, and injects only the new/changed diagnostics introduced by that edit — never the whole workspace; stale deltas expire per sectionTtlMs, and autoInject: false disables the section in favor of the tools alone
- Languages: TypeScript/JavaScript via typescript-language-server and Python via pyright-langserver — both npm-installable, no Python runtime, no native binaries; Rust (rust-analyzer being a native binary) is deliberately deferred, and servers.ts is the seam where further servers plug in
- Lifecycle and cost guards: servers spawn lazily; a crashed server is restarted with its open documents replayed, another crash marks the language degraded with a clear message instead of a respawn loop; tool output and the injected section are both hard-capped by maxDiagnostics, and the injected view is a per-edit delta
- Per its README, install requires dsh (any install path), Node ≥ 22 and the LSP servers on PATH — npm i -g typescript-language-server typescript and npm i -g pyright; a missing server is reported with the exact install command, and no servers are bundled by design
- Limitations the README states plainly: lsp_workspace_errors covers files the servers have seen this session (standard LSP open-file semantics, not a whole-repo batch scan); out-of-band edits outside the harness go unobserved until a tool is called; the harness is a developer preview with breaking upstream API changes expected. The npm package dsh-lsp-diagnostics is published — this site's registry check on 2026-09-15 read latest as 0.1.1
FAQ
How is this different from IDE diagnostics?
The consumer differs: per its README, the diagnostics are written for the model — after editing a file it immediately gets file:line:col + code + message and fixes it, closing the edit → diagnostics → fix loop; the README calls this Cursor's killer feature brought to dsh agents. execute returns canonical JSON (severity, range, code, message, source); the compact table is just the rendered view.
Do I have to install the language servers myself?
Yes. The README is explicit that servers must be on PATH (or overridden per server via serverPath) and that the plugin bundles none by design; the TypeScript/JavaScript and Python servers are npm-installable (npm i -g typescript-language-server typescript, npm i -g pyright) — no Python runtime, no native binaries. A missing server is reported with the exact install command.
Does auto-injection dump the whole workspace's diagnostics into the prompt?
No. Per its README, only the delta new or changed by that edit is injected, bounded by the maxDiagnostics hard cap and the sectionTtlMs expiry; autoInject: false turns the section off entirely in favor of tool calls. lsp_workspace_errors likewise covers only files the servers have seen this session — standard LSP open-file semantics, not a whole-repo batch scan.
Does it support Rust or other languages?
Not yet. Per its README, Rust (rust-analyzer being a native binary) is deliberately deferred; servers.ts is the seam where further servers plug in (command, args, install hint), and the languages config boots only the typescript / javascript / python servers by default, with TS and JS sharing a server.
Official references
- docsRepository ↗
- docsREADME (English) ↗
- docsnpm package page ↗