description: "The stdio language-server provider for ctx.lsp: configured server commands, extension mappings, and bounded transient-open queries, for users and maintainers composing local code navigation."
English | 中文
Use dsh-lsp-stdio to give agents definitions, references, implementations, and hover from explicitly configured local language servers. It maps file extensions to language identifiers, starts one server per workspace on demand, and reads each queried file afresh without retaining document state between queries. Language-server processes and source reads share the mounted filesystem and subprocess environment. The package does not install servers or provide a sandbox: deployments supply commands, mappings, and any required confinement. Queries are serialized per server and workspace, while different workspaces can run in parallel.
Mount this provider when a deployment has local language servers — for example typescript-language-server — and wants the harness to navigate code through them. It needs filesystem and subprocess providers for the same execution world, plus the dsh-lsp seam and, for model access, dsh-tool-lsp.
The servers record maps each stable provider id to one server command. The provider resolves every executable at load after credential scrubbing, so a bad entry prevents every provider from registering; processes launch lazily on the first matching query.
- name: '@deepseek-ai/dsh-fs-local'
- name: '@deepseek-ai/dsh-subprocess-local'
- name: '@deepseek-ai/dsh-lsp'
- name: '@deepseek-ai/dsh-lsp-stdio'
config:
servers:
typescript:
command: typescript-language-server
args: ['--stdio']
extensionToLanguage:
'.ts': typescript
- name: '@deepseek-ai/dsh-tool-lsp'
| Field | Default | Meaning |
|---|---|---|
command |
required | Executable to spawn — absolute, or resolved on the child PATH at load; launched without a shell |
extensionToLanguage |
required | Lowercase leading-dot extension → LSP language id (e.g. { '.ts': 'typescript' }) |
args |
[] |
Arguments passed to the executable |
env |
{} |
Extra env merged over the credential-scrubbed ambient env; variables matching KEY/PASSWORD/SECRET/TOKEN and all DSH_* names are not forwarded |
initializationOptions |
null |
Static initialize options forwarded to the server |
configuration |
null |
Static answer to every workspace/configuration item |
maxMessageBytes |
16000000 |
Largest single framed message accepted from the server |
maxStderrBytes |
1000000 |
Largest stderr tail retained for diagnostics |
maxDocumentBytes |
4000000 |
Largest source file this host opens |
shutdownTimeoutMs |
5000 |
Graceful shutdown/exit budget before escalation |
killGraceMs |
2000 |
Request-cancel and SIGTERM→SIGKILL escalation grace |
servers must contain at least one entry with non-empty ids; timer budgets must be positive integers within Node's timer range, and byte caps must be positive. The generated configuration catalog is the exhaustive source for every accepted field.
On the first query for a workspace, the provider launches one server process for that workspace and keeps it pooled. Each query reads the current source through ctx.fs, opens it in the server (textDocument/didOpen), runs the requested operation, and closes it — so the server always sees current text and no document state persists between calls. Queries to one server and workspace run one at a time; different workspaces run in parallel. If the pooled process fails before or during a read-only query, the provider retries that query once on a fresh process.
A successful navigation returns normalized locations, and hover returns normalized text or a no-hover notice; empty results are successful no-result responses. The query fails when the server does not support the operation or the transient open/close synchronization (LSP_UNSUPPORTED_OPERATION), when the source is missing, non-regular, non-UTF-8, oversized, or outside the canonical workspace (rejected before the server starts), or when the server returns a malformed payload (LSP_MALFORMED_RESPONSE). A hard-killed harness leaves servers running until they exit on their own — graceful shutdown happens only through service disposal.
This provider trusts its configured server and adds no sandbox confinement; the server receives the filesystem and process authority of the mounted execution world. It rejects query sources that are missing, non-regular, non-UTF-8, oversized, or canonically outside the workspace before server startup. Result locations may point outside the workspace, but an external path can never become a query source. Mount filesystem and subprocess providers for the same execution world — a split-world composition is invalid.
Read these pages when the package-level contract is not enough. They move from the shared navigation model to the seam and the tool.
LspError codes.Indirectly, through dsh-tool-lsp, which surfaces this provider's normalized results while this host contributes no prompt or schema itself.
No direct invalidation; dsh-tool-lsp owns request-prefix changes.
These limits define when the provider is a poor fit or needs special operational care. They are current package constraints, not a task backlog.
None) are unsupported even if closed-document queries would work; the pinned TypeScript e2e establishes one compatibility floor, not a cross-language claim.initialize.processId: null removes server-side client-PID monitoring, so servers are cleaned only by graceful service disposal; a SIGKILL'd harness leaves them running until they exit on their own.