v0.4.3
Release notes – v0.4.3
Release date: 2026-03-19
Summary
LSP client fixes so indexing produces symbol nodes and edges (Package, PartDef, IN_DOCUMENT, IN_PACKAGE). Adds optional LSP notification handling, MCP fallback when LSP returns no symbols, a dedicated lsp/ setup, index-and-map script, and documentation.
Changes
LSP client
- stdio: Server must be started with
--stdio; spawn and init updated accordingly. - Windows: Use
cmd /c node ... --stdioso the LSP server runs correctly on Windows. - Initialize: Send
hierarchicalDocumentSymbolSupport: trueandworkspaceFoldersso the server returns document symbols. - Response handling: Support both
DocumentSymbol[]andSymbolInformation[]; normalize flat lists usingcontainerNamefor parent/IN_PACKAGE. - Symbol kinds: Map LSP
SymbolKind(numeric) to graph labels whendetailis missing; add MCP-style kind strings in mapping. - Robustness: Reject on stdout close/error and process exit; 30s timeout per request; skip malformed JSON and server notifications until the matching response.
- Notifications: Optional handler for LSP notifications (e.g.
window/logMessage). SetDEBUG_LSP_NOTIFICATIONS=1to log to stderr.
MCP fallback
- When LSP returns no symbols for a document, the indexer calls MCP
getSymbols(one shared MCP client per index run). - If
SYSMLLSP_SERVER_PATHis unset, only MCP is used.
Scripts and tooling
scripts/index-and-map.mjs— Index a path then generategraph-map.md. Usage:node scripts/index-and-map.mjs [path](default:test/fixtures/sysml).scripts/debug-lsp-symbols.mjs— Print raw and normalized LSP document symbols for debugging.scripts/compare-mcp-vs-lsp-symbols.mjs— Compare MCP vs LSP symbol output for a file.lsp/— Dedicated folder with its ownpackage.jsonfor sysml-v2-lsp;lsp/test-server.mjsruns a minimal stdio test (initialize → documentSymbol).
Documentation
- docs/MCP_INTERACTION_GUIDE.md — LSP vs MCP, index-and-map flow, “why no edges,” optional MCP fallback, Kuzu notes.
- docs/MCP_CLIENT_TEMPLATE_ANALYSIS.md — Analysis of MCP client template (transports, SDK usage, patterns).
- docs/PLAN.md — Phases 1–4 (test/verify, notifications, retry/errors, validation/docs).
- docs/SKILL_DESIGN_PATTERNS.md, docs/TOOLS.md — Design and tool reference.
- AGENTS.md, CLAUDE.md — Project context for AI assistants.
Map output
graph-map.md— Generated bynpm run generate-mapor as the second step ofindex-and-map. Shows Documents, nodes by label (Package, PartDef, Action, etc.), and Interconnection (edges: IN_DOCUMENT, IN_PACKAGE).
Upgrade
npm installthennpm run build. If the LSP is inlsp/, runnpm installinlsp/as well (or use rootnode_modulesand set SYSMLLSP_SERVER_PATH if needed).- On Windows, if install fails on LSP postinstall:
npm install --ignore-scriptsthennpm run build; point to a built LSP via SYSMLLSP_SERVER_PATH. - Indexing writes to the storage root (default
~/.sysmledgraph). Use SYSMEDGRAPH_STORAGE_ROOT to override. Only one process should open the same Kuzu DB at a time (see docs/MCP-AND-KUZU.md).
Known issues
- CLI may exit with a non-zero or crash (e.g. Windows access violation) after successful indexing during teardown; graph data is written correctly. Workaround: use a temp storage root for a full index-and-map run, then run
generate-mapwith the same root.