@treedy/lsp-mcp 0.2.6 → 0.2.7

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 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,14 @@ 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` (counts + per-language concise status + latest lookup stats) for quick LLM triage.
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
+ - `doctor` includes `llmSemanticDefaults` with ready-to-use parameter presets for:
141
+ - `semantic_navigate` (`mode`, `strategy`, `page_size`, `reference_preview`, `hint_max_lines`)
142
+ - `diagnostics_delta` (`page_size`, `preview_limit`, `hotspot_limit`)
143
+ - plus `rationale[]` explaining why these defaults were chosen
93
144
 
94
145
  Example fields exposed for client/LLM orchestration:
95
146
 
@@ -122,6 +173,30 @@ Example fields exposed for client/LLM orchestration:
122
173
  "next_step": "No action needed.",
123
174
  "latest_next_step": "Installed version matches latest policy."
124
175
  }
176
+ },
177
+ "backendVersionSummary": {
178
+ "schema_version": 1,
179
+ "check_latest_versions": true,
180
+ "lookup_stats": {
181
+ "schema_version": 1,
182
+ "enabled": true,
183
+ "cache_ttl_ms": 300000,
184
+ "requested": 3,
185
+ "cache_hits": 2,
186
+ "inflight_hits": 0,
187
+ "executed": 1,
188
+ "succeeded": 1,
189
+ "failed": 0,
190
+ "skipped": 0
191
+ },
192
+ "counts": {
193
+ "languages": 3,
194
+ "below_minimum": 0,
195
+ "outdated": 0,
196
+ "policy_drift": 0,
197
+ "bundled_static": 0,
198
+ "unknown_latest": 0
199
+ }
125
200
  }
126
201
  }
127
202
  ```
@@ -168,12 +243,15 @@ When `LSP_MCP_AUTO_UPDATE=true`:
168
243
  - Lean mode (default): backend packages are fetched when first used (`LSP_MCP_BACKEND_RUNTIME_MODE=registry`).
169
244
  - Bundled mode: set `LSP_MCP_BACKEND_RUNTIME_MODE=bundled` or `LSP_MCP_REQUIRE_BUNDLED_BACKENDS=true`.
170
245
  - Required host tools:
171
- - TypeScript/Vue/Pyright backends: `node` + `npx`
172
- - Python backend: `uv` (or `uvx`)
246
+ - TypeScript/Vue/Pyright backends: `node` + `npx`
247
+ - Python backend: `uv` (or `uvx`)
173
248
  - Vue semantic features additionally require project-local deps in the Vue workspace:
174
249
  - `typescript`
175
250
  - `@vue/language-server`
176
251
  - Use `doctor` to get structured dependency checks and install commands.
252
+ - Optional benchmark paths:
253
+ - `LSP_MCP_BENCHMARK_REPORT_PATH` (default `.tmp/benchmark-latest.json`)
254
+ - `LSP_MCP_BENCHMARK_BASELINE_PATH` (default `.tmp/benchmark-baseline.json`)
177
255
 
178
256
  ## Better Out-of-Box Experience (Recommended)
179
257
 
@@ -189,6 +267,11 @@ When `LSP_MCP_AUTO_UPDATE=true`:
189
267
  # Install deps
190
268
  bun install
191
269
 
270
+ # Machine-readable benchmark report
271
+ bun run benchmark:report
272
+ # Optional trend diff (compare with .tmp/benchmark-baseline.json)
273
+ bun run benchmark:diff
274
+
192
275
  # Build local dist/ (lean default, no bundled backends)
193
276
  bun run build
194
277