Skip to content

Commit c06b1da

Browse files
committed
Release v0.4.3: LSP client fixes, notification handler, MCP fallback, index-and-map, docs
Made-with: Cursor
1 parent 4ede0d1 commit c06b1da

2 files changed

Lines changed: 54 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sysmledgraph",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"description": "Path-only SysML indexer: knowledge graph (Kuzu), MCP server (query, context, impact, rename, cypher), CLI (analyze, list, clean)",
55
"type": "module",
66
"main": "dist/src/index.js",

release-notes-v0.4.3.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Release notes – v0.4.3
2+
3+
**Release date:** 2026-03-19
4+
5+
## Summary
6+
7+
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.
8+
9+
## Changes
10+
11+
### LSP client
12+
13+
- **stdio:** Server must be started with `--stdio`; spawn and init updated accordingly.
14+
- **Windows:** Use `cmd /c node ... --stdio` so the LSP server runs correctly on Windows.
15+
- **Initialize:** Send `hierarchicalDocumentSymbolSupport: true` and `workspaceFolders` so the server returns document symbols.
16+
- **Response handling:** Support both `DocumentSymbol[]` and `SymbolInformation[]`; normalize flat lists using `containerName` for parent/IN_PACKAGE.
17+
- **Symbol kinds:** Map LSP `SymbolKind` (numeric) to graph labels when `detail` is missing; add MCP-style kind strings in mapping.
18+
- **Robustness:** Reject on stdout close/error and process exit; 30s timeout per request; skip malformed JSON and server notifications until the matching response.
19+
- **Notifications:** Optional handler for LSP notifications (e.g. `window/logMessage`). Set `DEBUG_LSP_NOTIFICATIONS=1` to log to stderr.
20+
21+
### MCP fallback
22+
23+
- When LSP returns no symbols for a document, the indexer calls MCP `getSymbols` (one shared MCP client per index run).
24+
- If `SYSMLLSP_SERVER_PATH` is unset, only MCP is used.
25+
26+
### Scripts and tooling
27+
28+
- **`scripts/index-and-map.mjs`** — Index a path then generate `graph-map.md`. Usage: `node scripts/index-and-map.mjs [path]` (default: `test/fixtures/sysml`).
29+
- **`scripts/debug-lsp-symbols.mjs`** — Print raw and normalized LSP document symbols for debugging.
30+
- **`scripts/compare-mcp-vs-lsp-symbols.mjs`** — Compare MCP vs LSP symbol output for a file.
31+
- **`lsp/`** — Dedicated folder with its own `package.json` for sysml-v2-lsp; `lsp/test-server.mjs` runs a minimal stdio test (initialize → documentSymbol).
32+
33+
### Documentation
34+
35+
- **docs/MCP_INTERACTION_GUIDE.md** — LSP vs MCP, index-and-map flow, “why no edges,” optional MCP fallback, Kuzu notes.
36+
- **docs/MCP_CLIENT_TEMPLATE_ANALYSIS.md** — Analysis of MCP client template (transports, SDK usage, patterns).
37+
- **docs/PLAN.md** — Phases 1–4 (test/verify, notifications, retry/errors, validation/docs).
38+
- **docs/SKILL_DESIGN_PATTERNS.md**, **docs/TOOLS.md** — Design and tool reference.
39+
- **AGENTS.md**, **CLAUDE.md** — Project context for AI assistants.
40+
41+
### Map output
42+
43+
- **`graph-map.md`** — Generated by `npm run generate-map` or as the second step of `index-and-map`. Shows Documents, nodes by label (Package, PartDef, Action, etc.), and Interconnection (edges: IN_DOCUMENT, IN_PACKAGE).
44+
45+
## Upgrade
46+
47+
- `npm install` then `npm run build`. If the LSP is in `lsp/`, run `npm install` in `lsp/` as well (or use root `node_modules` and set **SYSMLLSP_SERVER_PATH** if needed).
48+
- On Windows, if install fails on LSP postinstall: `npm install --ignore-scripts` then `npm run build`; point to a built LSP via **SYSMLLSP_SERVER_PATH**.
49+
- 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).
50+
51+
## Known issues
52+
53+
- 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-map` with the same root.

0 commit comments

Comments
 (0)