feat(lspmesh): LSP aggregator + MCP server (packages/ai/lspmesh)#2036
Merged
Conversation
…on-death, and mtime sync.
…symbol seed-and-fan, and find_*.
…es/find_implementations.
…ses. The bin parses argv with node:util parseArgs (built-in; extensible for future flags) into lsp or mcp modes plus a --root override, --help, and --version. Internal imports now use @/ path aliases (wired in tsconfig + vite/vitest) instead of relative .js specifiers, and the version constant is centralized in version.ts.
…ey surfaced. Integration suite spawns the real typescript, tailwind, and biome backends against a fixture workspace (typescript symlinked in, since typescript-language-server requires it in the workspace) plus a parity check against the commerce repo, with a dedicated vitest config so unit runs stay fast. Fixes found by running them: workspaceSymbol now polls until the seeded tsserver project finishes indexing (it returned empty otherwise); request() and a respawned client's initialize no longer leak unhandled rejections when a backend is disposed mid-flight; and registry.init now logs a backend that fails to start instead of failing silently. The fixture workspace is excluded from the repo's biome via biome.json.
…I category. Ships the package's own overview + configuration guides (mirrored into the site), adds an "AI" category to _categories.json keyed ai/lspmesh, and points package.json homepage at the generated docs page like the other public packages. tsconfig.typedoc maps the @/ alias so TypeDoc resolves lspmesh's imports and emits its API reference.
…ymbols + the ts/tailwind LSP plugins. Commerce now runs lspmesh from the workspace dist build for both LSP and MCP: the lspmesh@commerce-plugins plugin is enabled and typescript-lsp + tailwind-lsp-adapter are disabled (lspmesh fronts all three backends), and the old lsp-symbols.mjs MCP server is deleted. CLAUDE.md points at lspmesh. Gated on the parity integration test, which matches the old lsp-symbols behavior on this repo.
… from package.json. package.json sits at the published 0.0.0 so the changeset bumps it to 0.0.1 on release; the version is injected into the build from package.json so --version and the MCP server version never drift. release.yml already publishes via npm OIDC trusted publishing (no token), so only the npmjs.com trusted-publisher setup for lspmesh remains.
Contributor
Coverage Report
File Coverage |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #2036 +/- ##
==========================================
+ Coverage 83.41% 83.69% +0.28%
==========================================
Files 677 692 +15
Lines 15267 15609 +342
Branches 4522 4591 +69
==========================================
+ Hits 12735 13064 +329
- Misses 2532 2545 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…mid-write. Disposing a backend kills its child process, so an in-flight sendNotification write to the now-dead stdin rejects with EPIPE or ERR_STREAM_DESTROYED; fire-and-forget notifications had no catch, surfacing as unhandled rejections in CI's full test run. Notifications now go through a #notify helper that guards the dead flag and swallows the write rejection, and the stdin/stdout streams plus the connection get no-op error sinks so a killed pipe never bubbles up.
Extracts the LSP request logic into a testable createLspHandlers factory and the CLI dispatch into an injectable run(), then unit-tests the engine find_* methods, the LSP handlers, the CLI dispatch, and buildMcpServer. The remaining thin stdio-transport bootstraps (startLspServer/startMcpServer/the bin entry) are exercised by the integration suite and marked v8-ignore. Package line coverage ~96%.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates
.claude/mcp/lsp-symbols.mjsintolspmesh— a published TypeScript package atpackages/ai/lspmesh: a dual-protocol LSP aggregator that fronts multiple language servers (TypeScript + Tailwind + Biome) behind one endpoint, plus by-name MCP search tools.Spec/plan:
.specs/2026-06-16-lspmesh-lsp-aggregator/.What it is
lspmesh lsp(LSP server, Claude Code op set) andlspmesh mcp(MCP server).util.parseArgs.workspace/symbolseeds viagit grep+ polls until tsserver indexes;find_symbol/find_references/find_implementationsunion over every definition, tagged withdefinedAt.@modelcontextprotocol/sdk+vscode-jsonrpc/vscode-languageserver. TS-only,@/path aliases, version injected frompackage.json.Carry-over hardening (from lsp-symbols)
Request timeouts, dead-backend respawn, mtime-aware
didChange, seed ordering + basename boost, definition-shaped ranking, multi-definition union.Tests
Packaging / consolidation
lspmesh@0.0.0stub); changeset bumps to 0.0.1 via the existing OIDC trusted-publishingrelease.yml.typescript-lsp+tailwind-lsp-adapterplugins disabled;lsp-symbols.mjsremoved; CLAUDE.md updated.Gates (all green)
lint·typecheck· 42 unit ·build:packages· integration 4/4 ·docs:gen:check.Follow-up (owner)
lspmesh(repo +release.yml) before the 0.0.1 release. (done per author)