lsp implementation
Module ownership
The plugin keeps project-root discovery in src/paths.ts, alongside canonical path and containment checks. LspManager calls projectRootForFile(path, boundary) before acquiring a server; discovery chooses the nearest marker within the permitted boundary. If no marker exists, it uses that boundary or the file's own directory. It never replaces an absent boundary with the daemon's working directory.
src/manager.ts owns acquisition, diagnostics queues, cancellation, crash budgets, idle eviction and unconfirmed closing attempts. Its diagnostic and intelligence outcomes share one failure-reason type, with no-response reserved for diagnostic checks. src/format.ts renders those outcomes and the raw location, hover and symbol results for src/tools.ts and src/afterEdit.ts. Diagnostic and intelligence explanations retain their distinct wording; diagnostics show up to 20 entries, locations and workspace symbols up to 30, and document symbols up to 50 per level.
src/client.ts owns the protocol, document versions and the document LRU cache. Both diagnostic checks and intelligence requests use its private document preparation operation, which creates the next version and invalidates the previous confirmed verdict without pushing that document. Diagnostics register their waiter before sending didOpen or didChange; intelligence requests send the prepared document before their request. Unchanged confirmed diagnostics and unchanged intelligence documents retain their separate cache checks. New documents evict the oldest idle entry and send didClose; active diagnostic documents remain protected until their checks settle.
Process integration verification
The real TypeScript runner-death integration test requires an existing installation selected with ELOWEN_LSP_DIR. Run tests/lspProcessLifetime.test.ts with that variable set after building this plugin; it checks semantic diagnostic 2322 and the exit of every captured descendant. Without an explicitly selected installation, that integration test is not run. The dependency-free process-group test always runs.