Add diagnosticsOnly?: boolean to ServerConfig. When set, the server is
excluded from pickServer() (hover/definition/references/completion/
documentSymbol) but still included in pickDiagnosticServers() for
lsp_diagnostics and auto-check.
Mark oxlint as diagnosticsOnly: true — it now contributes diagnostics
alongside typescript-language-server without interfering with navigation
or completion tools.
Move all server matching logic to the extension/CLI side. The daemon no
longer calls pickServer() — it receives an explicit serverId (or
serverIds[] for diagnostics) and uses it directly for cache lookup and
server spawning.
Key changes:
- request op requires serverId: string
- diagnostics op requires serverIds: string[] — daemon fans out in
parallel via Promise.allSettled and returns grouped map
- formatDiagnostics() handles grouped results with per-server headers
when multiple servers contribute (single-server omits header)
- CLI picks servers locally before calling daemon helpers
- New pickDiagnosticServers() in extension returns all available,
non-disabled servers matching the file extension
This makes multi-server diagnostics (e.g., typescript-language-server +
oxlint) work naturally — the extension decides which servers to query,
the daemon just executes.
Extract isOnPath() to shared src/util.ts so both the daemon (client.ts)
and extension (root.ts) can use it. Add isServerAvailable() with a
per-process cache to pickServer(), skipping servers whose binary isn't
on PATH before sending requests to the daemon.
This avoids wasted daemon round-trips for missing binaries and sets up
for upcoming multi-server diagnostics fan-out.
Add a limit parameter to formatDiagnostics (default 20 for explicit
lsp_diagnostics calls, 10 for auto-check after edit/write). When
truncated, a summary line indicates how many more diagnostics exist.
Narrow `unknown` types with explicit casts before `in` operator checks
to avoid "Type '{}' may represent a primitive value" errors. Also fix
getActiveTools() which returns string[] (not object[]), removing the
unnecessary .map((t) => t.name). Brings index.ts to zero diagnostics.
Resolve 47 of 52 LSP diagnostics: module-not-found errors for
@mariozechner/pi-coding-agent and typebox, plus cascading implicit-any
errors on callback parameters. Both packages are available on npm and
provided at runtime by pi.
Move pickServer() into the try-catch in runLsp() so UnsupportedExtensionError
is caught directly. Add message-based fallback in both runLsp() and
runDiagnostics() to handle daemon-wrapped errors that come through as plain
Error instances rather than the original typed exception.
This eliminates spurious 'No LSP server registered' warnings during auto-check
after edit/write on files without LSP support (e.g. .md, .txt, .sh).
Add /lsp-servers, /lsp-disable, /lsp-enable, and /lsp-destroy TUI commands.
Disabled servers are tracked in-memory per-extension-instance; the shared
daemon is never mutated by disable/enable. When all servers are disabled,
LSP tools are removed from the active tool set so the LLM won't attempt them.
Also adds a destroy_server daemon operation that kills running LspClient
entries by server ID or all entries.