@treedy/lsp-mcp 0.2.6 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -3
- package/dist/index.js +1589 -85
- package/dist/index.js.map +3 -3
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -50,7 +50,12 @@ git_diagnostics
|
|
|
50
50
|
Use these directly; language is inferred from file/path:
|
|
51
51
|
|
|
52
52
|
- Navigation: `hover`, `definition`, `implementation`, `type_definition`, `call_hierarchy`, `type_hierarchy`, `document_highlight`, `selection_range`, `folding_range`, `document_link`, `linked_editing_range`, `semantic_tokens`, `moniker`, `references`, `peek_definition`, `workspace_symbol`
|
|
53
|
+
- `type_hierarchy`, `semantic_tokens`, `linked_editing_range`, and `inlay_hint_resolve` use strict backend methods when available, otherwise return explicit `fallback_used=true` + `approximate=true` results.
|
|
53
54
|
- Hinting: `inlay_hints`, `inlay_hint_resolve`, `read_file_with_hints`
|
|
55
|
+
- Composite semantic workflow: `semantic_navigate` (optional search -> definition -> references -> read_file_with_hints)
|
|
56
|
+
- `mode='deep'` (default) runs full workflow; `mode='fast'` skips heavy hint reads unless explicitly requested
|
|
57
|
+
- `strategy='balanced'|'definition_first'|'references_first'` controls step ordering for latency/recall tradeoffs
|
|
58
|
+
- Incremental diagnostics: `diagnostics_delta` (delta vs previous diagnostics snapshot)
|
|
54
59
|
- Editing support: `completions`, `signature_help`, `prepare_rename`, `rename`, `code_action`, `run_code_action`, `code_lens`
|
|
55
60
|
- Analysis: `diagnostics`, `git_diagnostics`, `symbols`, `search`, `summarize_file`, `read_file_with_hints`, `project_structure`
|
|
56
61
|
- Sync/edit loop: `update_document`
|
|
@@ -64,8 +69,13 @@ For large repos, use preview arguments to reduce token usage:
|
|
|
64
69
|
|
|
65
70
|
- `search` / `workspace_symbol`: `preview_limit` or `page_size` (default `200`), plus `cursor` for next page
|
|
66
71
|
- `diagnostics`: `preview_limit` or `page_size` (default `200`), `summary_only` (default `false`), plus `cursor`
|
|
72
|
+
- `diagnostics_delta`: `preview_limit`/`page_size` plus optional `severity`, `source`, `hotspot_limit` filters, and `cursor` for paged change items
|
|
73
|
+
- Returns `delta.file_summary[]` and `delta.top_hotspots[]` for per-file triage in large workspaces
|
|
67
74
|
- `doctor`: `page_size` (default `50`) plus `cursor` for long environment reports
|
|
68
75
|
- `doctor`: set `check_latest_versions=true` to probe registry latest version drift (slower, network-dependent)
|
|
76
|
+
- `doctor`: use `capability_snapshot_id` to reuse probed capability matrix and skip repeated backend capability probing
|
|
77
|
+
- Strict semantic errors include structured `recovery_plan[]` (`type`, `tool`, `args`, `command`) and cost fields: `latency_ms`, `result_size`, `truncated`, `cursor_available`
|
|
78
|
+
- Semantic responses include `confidence` and `confidence_reason` for fallback/approximation awareness
|
|
69
79
|
- `project_structure`: `max_depth` (default `3`), `max_entries` (default `300`)
|
|
70
80
|
- `summarize_file`: `max_symbols` (default `200`)
|
|
71
81
|
- `read_file_with_hints`: `start_line` (default `1`), `max_lines` (default `300`)
|
|
@@ -76,6 +86,40 @@ Paged responses include:
|
|
|
76
86
|
- `next`: ready-to-call arguments for the next page (via `expand_result`)
|
|
77
87
|
- Cursors are signed and expire automatically (TTL-based) for safer paging.
|
|
78
88
|
|
|
89
|
+
Strict semantic error shape (example):
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"error": "LANGUAGE_WORKSPACE_REQUIRED",
|
|
94
|
+
"error_code": "LANGUAGE_WORKSPACE_REQUIRED",
|
|
95
|
+
"tool": "hover",
|
|
96
|
+
"strict_mode": true,
|
|
97
|
+
"resolved_language": "typescript",
|
|
98
|
+
"resolved_workspace": null,
|
|
99
|
+
"next_step": "Call switch_workspace_for_language(language='typescript', path='/abs/project/root') before using semantic tools.",
|
|
100
|
+
"recovery_plan": [
|
|
101
|
+
{
|
|
102
|
+
"step": 1,
|
|
103
|
+
"action": "set_language_workspace",
|
|
104
|
+
"type": "tool_call",
|
|
105
|
+
"tool": "switch_workspace_for_language",
|
|
106
|
+
"args": {
|
|
107
|
+
"language": "typescript",
|
|
108
|
+
"path": "/abs/project/root"
|
|
109
|
+
},
|
|
110
|
+
"command": "switch_workspace_for_language(language='typescript', path='/abs/project/root')",
|
|
111
|
+
"reason": "Semantic tools require an explicit per-language workspace mapping."
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"latency_ms": null,
|
|
115
|
+
"result_size": 0,
|
|
116
|
+
"cursor_available": false,
|
|
117
|
+
"truncated": false,
|
|
118
|
+
"confidence": 0.25,
|
|
119
|
+
"confidence_reason": "Strict workspace precondition failed; no semantic result available."
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
79
123
|
### Language-specific tools
|
|
80
124
|
|
|
81
125
|
- Python-only: `python_move`, `python_change_signature`, `python_function_signature`
|
|
@@ -89,7 +133,15 @@ Paged responses include:
|
|
|
89
133
|
- In mixed-language monorepos, semantic tools require language workspace mapping (set via `switch_workspace_for_language` or `discover_language_workspaces(..., apply=true)`).
|
|
90
134
|
- `doctor` now includes `workspaceDependencyChecks.language_workspace_discovery` with suggested per-language workspace commands.
|
|
91
135
|
- `doctor` includes `backendPackageDrift` to show installed backend version vs latest policy and upgrade next steps.
|
|
92
|
-
- `doctor` includes `backendVersionSummary` (
|
|
136
|
+
- `doctor` includes `backendVersionSummary` (stable schema with `schema_version`, `counts`, `by_language`, `lookup_stats`) for quick LLM triage.
|
|
137
|
+
- `doctor` includes `workspaceDependencyChecks.python_bundled_runtime` in bundled mode, with optional executable probe results when `probe_backends=true`.
|
|
138
|
+
- `doctor` includes `benchmarkInsights` from the latest benchmark report (`.tmp/benchmark-latest.json` by default) for runtime budget recommendations.
|
|
139
|
+
- If baseline exists (`.tmp/benchmark-baseline.json` by default), `benchmarkInsights.trend` includes regression/improvement deltas.
|
|
140
|
+
- If benchmark cases include `*_cold` and `*_warm` pairs, `benchmarkInsights.warmup` summarizes warm-start deltas.
|
|
141
|
+
- `doctor` includes `llmSemanticDefaults` with ready-to-use parameter presets for:
|
|
142
|
+
- `semantic_navigate` (`mode`, `strategy`, `page_size`, `reference_preview`, `hint_max_lines`)
|
|
143
|
+
- `diagnostics_delta` (`page_size`, `preview_limit`, `hotspot_limit`)
|
|
144
|
+
- plus `rationale[]` explaining why these defaults were chosen
|
|
93
145
|
|
|
94
146
|
Example fields exposed for client/LLM orchestration:
|
|
95
147
|
|
|
@@ -122,6 +174,30 @@ Example fields exposed for client/LLM orchestration:
|
|
|
122
174
|
"next_step": "No action needed.",
|
|
123
175
|
"latest_next_step": "Installed version matches latest policy."
|
|
124
176
|
}
|
|
177
|
+
},
|
|
178
|
+
"backendVersionSummary": {
|
|
179
|
+
"schema_version": 1,
|
|
180
|
+
"check_latest_versions": true,
|
|
181
|
+
"lookup_stats": {
|
|
182
|
+
"schema_version": 1,
|
|
183
|
+
"enabled": true,
|
|
184
|
+
"cache_ttl_ms": 300000,
|
|
185
|
+
"requested": 3,
|
|
186
|
+
"cache_hits": 2,
|
|
187
|
+
"inflight_hits": 0,
|
|
188
|
+
"executed": 1,
|
|
189
|
+
"succeeded": 1,
|
|
190
|
+
"failed": 0,
|
|
191
|
+
"skipped": 0
|
|
192
|
+
},
|
|
193
|
+
"counts": {
|
|
194
|
+
"languages": 3,
|
|
195
|
+
"below_minimum": 0,
|
|
196
|
+
"outdated": 0,
|
|
197
|
+
"policy_drift": 0,
|
|
198
|
+
"bundled_static": 0,
|
|
199
|
+
"unknown_latest": 0
|
|
200
|
+
}
|
|
125
201
|
}
|
|
126
202
|
}
|
|
127
203
|
```
|
|
@@ -168,12 +244,15 @@ When `LSP_MCP_AUTO_UPDATE=true`:
|
|
|
168
244
|
- Lean mode (default): backend packages are fetched when first used (`LSP_MCP_BACKEND_RUNTIME_MODE=registry`).
|
|
169
245
|
- Bundled mode: set `LSP_MCP_BACKEND_RUNTIME_MODE=bundled` or `LSP_MCP_REQUIRE_BUNDLED_BACKENDS=true`.
|
|
170
246
|
- Required host tools:
|
|
171
|
-
|
|
172
|
-
|
|
247
|
+
- TypeScript/Vue/Pyright backends: `node` + `npx`
|
|
248
|
+
- Python backend: `uv` (or `uvx`)
|
|
173
249
|
- Vue semantic features additionally require project-local deps in the Vue workspace:
|
|
174
250
|
- `typescript`
|
|
175
251
|
- `@vue/language-server`
|
|
176
252
|
- Use `doctor` to get structured dependency checks and install commands.
|
|
253
|
+
- Optional benchmark paths:
|
|
254
|
+
- `LSP_MCP_BENCHMARK_REPORT_PATH` (default `.tmp/benchmark-latest.json`)
|
|
255
|
+
- `LSP_MCP_BENCHMARK_BASELINE_PATH` (default `.tmp/benchmark-baseline.json`)
|
|
177
256
|
|
|
178
257
|
## Better Out-of-Box Experience (Recommended)
|
|
179
258
|
|
|
@@ -189,6 +268,11 @@ When `LSP_MCP_AUTO_UPDATE=true`:
|
|
|
189
268
|
# Install deps
|
|
190
269
|
bun install
|
|
191
270
|
|
|
271
|
+
# Machine-readable benchmark report
|
|
272
|
+
bun run benchmark:report
|
|
273
|
+
# Optional trend diff (compare with .tmp/benchmark-baseline.json)
|
|
274
|
+
bun run benchmark:diff
|
|
275
|
+
|
|
192
276
|
# Build local dist/ (lean default, no bundled backends)
|
|
193
277
|
bun run build
|
|
194
278
|
|