lsp-intelligence 0.1.0

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.
Files changed (99) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +250 -0
  3. package/dist/engine/DocumentManager.d.ts +20 -0
  4. package/dist/engine/DocumentManager.js +73 -0
  5. package/dist/engine/DocumentManager.js.map +1 -0
  6. package/dist/engine/LspEngine.d.ts +50 -0
  7. package/dist/engine/LspEngine.js +339 -0
  8. package/dist/engine/LspEngine.js.map +1 -0
  9. package/dist/engine/positions.d.ts +31 -0
  10. package/dist/engine/positions.js +55 -0
  11. package/dist/engine/positions.js.map +1 -0
  12. package/dist/engine/types.d.ts +61 -0
  13. package/dist/engine/types.js +33 -0
  14. package/dist/engine/types.js.map +1 -0
  15. package/dist/format/markdown.d.ts +5 -0
  16. package/dist/format/markdown.js +90 -0
  17. package/dist/format/markdown.js.map +1 -0
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.js +87 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/tools/composites/batchQuery.d.ts +1 -0
  22. package/dist/tools/composites/batchQuery.js +40 -0
  23. package/dist/tools/composites/batchQuery.js.map +1 -0
  24. package/dist/tools/composites/explainError.d.ts +1 -0
  25. package/dist/tools/composites/explainError.js +56 -0
  26. package/dist/tools/composites/explainError.js.map +1 -0
  27. package/dist/tools/composites/findTestFiles.d.ts +1 -0
  28. package/dist/tools/composites/findTestFiles.js +57 -0
  29. package/dist/tools/composites/findTestFiles.js.map +1 -0
  30. package/dist/tools/composites/impactTrace.d.ts +1 -0
  31. package/dist/tools/composites/impactTrace.js +149 -0
  32. package/dist/tools/composites/impactTrace.js.map +1 -0
  33. package/dist/tools/composites/inspectSymbol.d.ts +1 -0
  34. package/dist/tools/composites/inspectSymbol.js +60 -0
  35. package/dist/tools/composites/inspectSymbol.js.map +1 -0
  36. package/dist/tools/composites/semanticDiff.d.ts +1 -0
  37. package/dist/tools/composites/semanticDiff.js +135 -0
  38. package/dist/tools/composites/semanticDiff.js.map +1 -0
  39. package/dist/tools/context/gatherContext.d.ts +1 -0
  40. package/dist/tools/context/gatherContext.js +153 -0
  41. package/dist/tools/context/gatherContext.js.map +1 -0
  42. package/dist/tools/context/outline.d.ts +1 -0
  43. package/dist/tools/context/outline.js +56 -0
  44. package/dist/tools/context/outline.js.map +1 -0
  45. package/dist/tools/live/autoImport.d.ts +1 -0
  46. package/dist/tools/live/autoImport.js +123 -0
  47. package/dist/tools/live/autoImport.js.map +1 -0
  48. package/dist/tools/live/findUnusedExports.d.ts +1 -0
  49. package/dist/tools/live/findUnusedExports.js +69 -0
  50. package/dist/tools/live/findUnusedExports.js.map +1 -0
  51. package/dist/tools/live/liveDiagnostics.d.ts +1 -0
  52. package/dist/tools/live/liveDiagnostics.js +38 -0
  53. package/dist/tools/live/liveDiagnostics.js.map +1 -0
  54. package/dist/tools/primitives/callHierarchy.d.ts +1 -0
  55. package/dist/tools/primitives/callHierarchy.js +61 -0
  56. package/dist/tools/primitives/callHierarchy.js.map +1 -0
  57. package/dist/tools/primitives/completions.d.ts +1 -0
  58. package/dist/tools/primitives/completions.js +31 -0
  59. package/dist/tools/primitives/completions.js.map +1 -0
  60. package/dist/tools/primitives/diagnostics.d.ts +1 -0
  61. package/dist/tools/primitives/diagnostics.js +32 -0
  62. package/dist/tools/primitives/diagnostics.js.map +1 -0
  63. package/dist/tools/primitives/documentSymbols.d.ts +1 -0
  64. package/dist/tools/primitives/documentSymbols.js +42 -0
  65. package/dist/tools/primitives/documentSymbols.js.map +1 -0
  66. package/dist/tools/primitives/fileExports.d.ts +1 -0
  67. package/dist/tools/primitives/fileExports.js +69 -0
  68. package/dist/tools/primitives/fileExports.js.map +1 -0
  69. package/dist/tools/primitives/fileImports.d.ts +1 -0
  70. package/dist/tools/primitives/fileImports.js +58 -0
  71. package/dist/tools/primitives/fileImports.js.map +1 -0
  72. package/dist/tools/primitives/findImplementations.d.ts +1 -0
  73. package/dist/tools/primitives/findImplementations.js +36 -0
  74. package/dist/tools/primitives/findImplementations.js.map +1 -0
  75. package/dist/tools/primitives/findReferences.d.ts +1 -0
  76. package/dist/tools/primitives/findReferences.js +42 -0
  77. package/dist/tools/primitives/findReferences.js.map +1 -0
  78. package/dist/tools/primitives/gotoDefinition.d.ts +1 -0
  79. package/dist/tools/primitives/gotoDefinition.js +37 -0
  80. package/dist/tools/primitives/gotoDefinition.js.map +1 -0
  81. package/dist/tools/primitives/gotoTypeDefinition.d.ts +1 -0
  82. package/dist/tools/primitives/gotoTypeDefinition.js +35 -0
  83. package/dist/tools/primitives/gotoTypeDefinition.js.map +1 -0
  84. package/dist/tools/primitives/hover.d.ts +1 -0
  85. package/dist/tools/primitives/hover.js +37 -0
  86. package/dist/tools/primitives/hover.js.map +1 -0
  87. package/dist/tools/primitives/rename.d.ts +1 -0
  88. package/dist/tools/primitives/rename.js +56 -0
  89. package/dist/tools/primitives/rename.js.map +1 -0
  90. package/dist/tools/primitives/typeHierarchy.d.ts +1 -0
  91. package/dist/tools/primitives/typeHierarchy.js +49 -0
  92. package/dist/tools/primitives/typeHierarchy.js.map +1 -0
  93. package/dist/tools/primitives/workspaceSymbols.d.ts +1 -0
  94. package/dist/tools/primitives/workspaceSymbols.js +32 -0
  95. package/dist/tools/primitives/workspaceSymbols.js.map +1 -0
  96. package/dist/tools/registry.d.ts +19 -0
  97. package/dist/tools/registry.js +19 -0
  98. package/dist/tools/registry.js.map +1 -0
  99. package/package.json +39 -0
@@ -0,0 +1,339 @@
1
+ import { spawn, execSync } from 'child_process';
2
+ import * as fs from 'fs';
3
+ import * as path from 'path';
4
+ import { createMessageConnection, StreamMessageReader, StreamMessageWriter, } from 'vscode-jsonrpc/node.js';
5
+ import { DocumentManager } from './DocumentManager.js';
6
+ import { pathToUri, uriToPath } from './positions.js';
7
+ import { LspError, LspErrorCode, SKIP_DIRS, DEFAULT_TIMEOUTS } from './types.js';
8
+ export class LspEngine {
9
+ connection = null;
10
+ process = null;
11
+ capabilities = null;
12
+ _ready;
13
+ _resolveReady;
14
+ _rejectReady;
15
+ docManager = new DocumentManager();
16
+ workspaceRoot;
17
+ gitAvailable = false;
18
+ constructor(workspaceRoot) {
19
+ this.workspaceRoot = workspaceRoot;
20
+ this._ready = new Promise((resolve, reject) => {
21
+ this._resolveReady = resolve;
22
+ this._rejectReady = reject;
23
+ });
24
+ }
25
+ async initialize() {
26
+ try {
27
+ // Check git availability
28
+ try {
29
+ execSync('git rev-parse --is-inside-work-tree', { cwd: this.workspaceRoot, stdio: 'pipe' });
30
+ this.gitAvailable = true;
31
+ }
32
+ catch {
33
+ this.gitAvailable = false;
34
+ }
35
+ // Spawn typescript-language-server — prefer bundled binary, fall back to global
36
+ const tslsBin = this.resolveBinary('typescript-language-server');
37
+ this.process = spawn(tslsBin, ['--stdio'], {
38
+ stdio: ['pipe', 'pipe', 'pipe'],
39
+ cwd: this.workspaceRoot,
40
+ });
41
+ if (!this.process.stdout || !this.process.stdin) {
42
+ throw new LspError(LspErrorCode.SERVER_CRASHED, 'Failed to spawn typescript-language-server');
43
+ }
44
+ this.process.stderr?.on('data', () => { }); // suppress stderr
45
+ this.process.on('exit', (code) => {
46
+ console.error(`[lsp-intelligence] TSServer exited with code ${code}`);
47
+ this.connection = null;
48
+ });
49
+ // Create JSON-RPC connection
50
+ this.connection = createMessageConnection(new StreamMessageReader(this.process.stdout), new StreamMessageWriter(this.process.stdin));
51
+ this.connection.listen();
52
+ // LSP initialize handshake
53
+ const result = await this.connection.sendRequest('initialize', {
54
+ processId: process.pid,
55
+ rootUri: pathToUri(this.workspaceRoot),
56
+ capabilities: {
57
+ textDocument: {
58
+ synchronization: { dynamicRegistration: false, didSave: true },
59
+ hover: { contentFormat: ['markdown', 'plaintext'] },
60
+ definition: {},
61
+ typeDefinition: {},
62
+ implementation: {},
63
+ references: {},
64
+ documentSymbol: { hierarchicalDocumentSymbolSupport: true },
65
+ rename: { prepareSupport: true },
66
+ publishDiagnostics: { relatedInformation: true },
67
+ callHierarchy: {},
68
+ completion: { completionItem: { snippetSupport: false } },
69
+ codeAction: {},
70
+ },
71
+ workspace: {
72
+ workspaceFolders: true,
73
+ symbol: {},
74
+ },
75
+ },
76
+ workspaceFolders: [{ uri: pathToUri(this.workspaceRoot), name: 'workspace' }],
77
+ initializationOptions: this.buildInitOptions(),
78
+ });
79
+ this.capabilities = result.capabilities;
80
+ this.connection.sendNotification('initialized', {});
81
+ // Handle diagnostics push
82
+ this.connection.onNotification('textDocument/publishDiagnostics', (params) => {
83
+ this.docManager.cacheDiagnostics(params.uri, params.diagnostics);
84
+ });
85
+ // Preopen all monorepo packages (non-blocking — resolve ready immediately after)
86
+ await this.preopenPackages();
87
+ // Resolve ready as soon as didOpen notifications are sent.
88
+ // TSServer indexes incrementally — queries retry if needed.
89
+ this._resolveReady();
90
+ }
91
+ catch (err) {
92
+ this._rejectReady(err instanceof Error ? err : new Error(String(err)));
93
+ throw err;
94
+ }
95
+ }
96
+ /**
97
+ * Send an LSP request. Waits for engine to be ready first.
98
+ */
99
+ async request(method, params, timeoutMs) {
100
+ await this._ready;
101
+ if (!this.connection) {
102
+ throw new LspError(LspErrorCode.NOT_READY, 'LSP connection not available');
103
+ }
104
+ const timeout = timeoutMs ?? DEFAULT_TIMEOUTS.primitive;
105
+ const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new LspError(LspErrorCode.TIMEOUT, `${method} timed out after ${timeout}ms`)), timeout));
106
+ return Promise.race([
107
+ this.connection.sendRequest(method, params),
108
+ timeoutPromise,
109
+ ]);
110
+ }
111
+ /**
112
+ * Ensure a file is open and return its URI + content.
113
+ */
114
+ async prepareFile(filePath) {
115
+ await this._ready;
116
+ if (!this.connection)
117
+ throw new LspError(LspErrorCode.NOT_READY, 'LSP connection not available');
118
+ const content = await this.docManager.ensureOpen(filePath, this.connection);
119
+ return { uri: pathToUri(filePath), content };
120
+ }
121
+ /**
122
+ * Resolve a symbol name to a file position using workspace/symbol.
123
+ */
124
+ async resolveSymbol(name, fileHint) {
125
+ await this._ready;
126
+ // Retry up to 5 times with short delays — index builds incrementally
127
+ let symbols = null;
128
+ for (let attempt = 0; attempt < 5; attempt++) {
129
+ symbols = await this.request('workspace/symbol', { query: name });
130
+ if (symbols && symbols.length > 0)
131
+ break;
132
+ if (attempt < 4)
133
+ await new Promise((r) => setTimeout(r, 300));
134
+ }
135
+ if (!symbols || symbols.length === 0) {
136
+ throw new LspError(LspErrorCode.SYMBOL_NOT_FOUND, `No symbol found matching "${name}"`, 'Try a more specific name or use file_path + line + column instead.');
137
+ }
138
+ // Priority: exact match > file hint match > first result
139
+ let best = symbols[0];
140
+ for (const sym of symbols) {
141
+ if (sym.name === name) {
142
+ if (fileHint && uriToPath(sym.location.uri).includes(fileHint)) {
143
+ best = sym;
144
+ break;
145
+ }
146
+ best = sym;
147
+ }
148
+ }
149
+ // workspace/symbol returns range.start at the declaration keyword (e.g. "export"),
150
+ // but hover/references need the cursor on the actual symbol name.
151
+ // Read the line and find the exact column of the symbol name.
152
+ const uri = best.location.uri;
153
+ let position = best.location.range.start;
154
+ try {
155
+ const filePath = uriToPath(uri);
156
+ if (this.connection) {
157
+ const content = await this.docManager.ensureOpen(filePath, this.connection);
158
+ const lines = content.split('\n');
159
+ const line = lines[position.line];
160
+ if (line) {
161
+ const nameIndex = line.indexOf(best.name);
162
+ if (nameIndex >= 0) {
163
+ position = { line: position.line, character: nameIndex };
164
+ }
165
+ }
166
+ }
167
+ }
168
+ catch { }
169
+ return { uri, position, name: best.name };
170
+ }
171
+ /**
172
+ * Discover monorepo packages and open one file per package.
173
+ */
174
+ async preopenPackages() {
175
+ const packageDirs = this.discoverWorkspacePackages();
176
+ if (packageDirs.length === 0)
177
+ return;
178
+ const openPromises = [];
179
+ for (const pkgDir of packageDirs) {
180
+ const filesToOpen = [];
181
+ // Prefer index.ts / index.tsx in src/ (main exports)
182
+ for (const indexFile of ['src/index.ts', 'src/index.tsx', 'index.ts', 'index.tsx']) {
183
+ const candidate = path.join(pkgDir, indexFile);
184
+ if (fs.existsSync(candidate)) {
185
+ filesToOpen.push(candidate);
186
+ break;
187
+ }
188
+ }
189
+ // Also open any first .ts file if no index found
190
+ if (filesToOpen.length === 0) {
191
+ const srcDir = path.join(pkgDir, 'src');
192
+ const searchDir = fs.existsSync(srcDir) ? srcDir : pkgDir;
193
+ const tsFile = this.findFirstTsFile(searchDir);
194
+ if (tsFile)
195
+ filesToOpen.push(tsFile);
196
+ }
197
+ for (const tsFile of filesToOpen) {
198
+ if (this.connection) {
199
+ openPromises.push(this.docManager.ensureOpen(tsFile, this.connection).then(() => { }));
200
+ }
201
+ }
202
+ }
203
+ await Promise.all(openPromises);
204
+ // Wait until TSServer has indexed at least one project (poll, max 15s)
205
+ const pollStart = Date.now();
206
+ while (Date.now() - pollStart < 15000) {
207
+ try {
208
+ const result = await this.connection.sendRequest('workspace/symbol', { query: 'a' });
209
+ if (Array.isArray(result) && result.length > 0)
210
+ break;
211
+ }
212
+ catch { }
213
+ await new Promise((r) => setTimeout(r, 500));
214
+ }
215
+ }
216
+ /**
217
+ * Discover workspace packages from any monorepo structure.
218
+ * Supports: packages/, apps/, libs/, pnpm-workspace.yaml, lerna.json, rush.json
219
+ */
220
+ discoverWorkspacePackages() {
221
+ const dirs = [];
222
+ // Common monorepo directory conventions
223
+ const conventionDirs = ['packages', 'apps', 'libs', 'modules', 'services'];
224
+ for (const dir of conventionDirs) {
225
+ const candidate = path.join(this.workspaceRoot, dir);
226
+ if (fs.existsSync(candidate) && fs.statSync(candidate).isDirectory()) {
227
+ for (const entry of fs.readdirSync(candidate)) {
228
+ const pkgDir = path.join(candidate, entry);
229
+ if (fs.statSync(pkgDir).isDirectory() && !entry.startsWith('.')) {
230
+ dirs.push(pkgDir);
231
+ }
232
+ }
233
+ }
234
+ }
235
+ // If no convention dirs found, check for workspace config files
236
+ if (dirs.length === 0) {
237
+ try {
238
+ // pnpm-workspace.yaml
239
+ const pnpmWs = path.join(this.workspaceRoot, 'pnpm-workspace.yaml');
240
+ if (fs.existsSync(pnpmWs)) {
241
+ const content = fs.readFileSync(pnpmWs, 'utf-8');
242
+ const globs = content.match(/- ['"]?([^'":\n]+)/g);
243
+ if (globs) {
244
+ for (const glob of globs) {
245
+ const pattern = glob.replace(/- ['"]?/, '').replace(/['"]$/, '').replace('/*', '');
246
+ const dir = path.join(this.workspaceRoot, pattern);
247
+ if (fs.existsSync(dir) && fs.statSync(dir).isDirectory()) {
248
+ for (const entry of fs.readdirSync(dir)) {
249
+ const pkgDir = path.join(dir, entry);
250
+ if (fs.statSync(pkgDir).isDirectory() && !entry.startsWith('.')) {
251
+ dirs.push(pkgDir);
252
+ }
253
+ }
254
+ }
255
+ }
256
+ }
257
+ }
258
+ // package.json workspaces field
259
+ const rootPkg = path.join(this.workspaceRoot, 'package.json');
260
+ if (dirs.length === 0 && fs.existsSync(rootPkg)) {
261
+ const pkg = JSON.parse(fs.readFileSync(rootPkg, 'utf-8'));
262
+ const workspaces = Array.isArray(pkg.workspaces)
263
+ ? pkg.workspaces
264
+ : pkg.workspaces?.packages ?? [];
265
+ for (const ws of workspaces) {
266
+ const pattern = ws.replace('/*', '');
267
+ const dir = path.join(this.workspaceRoot, pattern);
268
+ if (fs.existsSync(dir) && fs.statSync(dir).isDirectory()) {
269
+ for (const entry of fs.readdirSync(dir)) {
270
+ const pkgDir = path.join(dir, entry);
271
+ if (fs.statSync(pkgDir).isDirectory() && !entry.startsWith('.')) {
272
+ dirs.push(pkgDir);
273
+ }
274
+ }
275
+ }
276
+ }
277
+ }
278
+ }
279
+ catch { }
280
+ }
281
+ return [...new Set(dirs)];
282
+ }
283
+ /**
284
+ * Build initializationOptions for typescript-language-server.
285
+ * Points tsserver.path to the consumer's TypeScript if available.
286
+ */
287
+ buildInitOptions() {
288
+ const consumerTsPath = path.join(this.workspaceRoot, 'node_modules', 'typescript', 'lib');
289
+ if (fs.existsSync(consumerTsPath)) {
290
+ return { tsserver: { path: consumerTsPath } };
291
+ }
292
+ return {};
293
+ }
294
+ /**
295
+ * Resolve a binary — check bundled node_modules/.bin first, then global PATH.
296
+ */
297
+ resolveBinary(name) {
298
+ // Check our own node_modules/.bin (bundled dependency)
299
+ const localBin = path.resolve(import.meta.dirname, '..', '..', 'node_modules', '.bin', name);
300
+ if (fs.existsSync(localBin))
301
+ return localBin;
302
+ // Fall back to global PATH
303
+ return name;
304
+ }
305
+ findFirstTsFile(dir, depth = 0) {
306
+ if (depth > 4)
307
+ return null;
308
+ try {
309
+ for (const entry of fs.readdirSync(dir)) {
310
+ if (SKIP_DIRS.has(entry))
311
+ continue;
312
+ const full = path.join(dir, entry);
313
+ const stat = fs.statSync(full);
314
+ if (stat.isDirectory()) {
315
+ const found = this.findFirstTsFile(full, depth + 1);
316
+ if (found)
317
+ return found;
318
+ }
319
+ else if (entry.endsWith('.ts') || entry.endsWith('.tsx')) {
320
+ return full;
321
+ }
322
+ }
323
+ }
324
+ catch { }
325
+ return null;
326
+ }
327
+ async shutdown() {
328
+ if (this.connection) {
329
+ try {
330
+ await this.connection.sendRequest('shutdown');
331
+ this.connection.sendNotification('exit');
332
+ }
333
+ catch { }
334
+ this.connection.dispose();
335
+ }
336
+ this.process?.kill();
337
+ }
338
+ }
339
+ //# sourceMappingURL=LspEngine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LspEngine.js","sourceRoot":"","sources":["../../src/engine/LspEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAqB,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,GAEpB,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,QAAQ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BAC1B,CAAC;qBAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;oBAC3D,OAAO,IAAI,CAAC;gBACd,CAAC;YACH,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,IAAI,CAAC;gBACH,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;gBAC9C,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;YAC3C,CAAC;YAAC,MAAM,CAAC,CAAA,CAAC;YACV,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;QAC5B,CAAC;QACD,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,31 @@
1
+ import type { Position } from 'vscode-languageserver-protocol';
2
+ /**
3
+ * Convert 1-indexed line/column (Claude-facing) to 0-indexed LSP Position.
4
+ */
5
+ export declare function toPosition(line1: number, col1: number, content?: string): Position;
6
+ /**
7
+ * Convert 0-indexed LSP Position to 1-indexed (Claude-facing).
8
+ */
9
+ export declare function fromPosition(pos: Position): {
10
+ line: number;
11
+ column: number;
12
+ };
13
+ /**
14
+ * Convert an absolute file path to a file:// URI.
15
+ */
16
+ export declare function pathToUri(filePath: string): string;
17
+ /**
18
+ * Convert a file:// URI to an absolute file path.
19
+ */
20
+ export declare function uriToPath(uri: string): string;
21
+ /**
22
+ * Get the containing package name from a file path.
23
+ * Works with any monorepo layout: packages/, apps/, libs/, modules/, services/
24
+ * E.g., "/repo/packages/core/src/foo.ts" → "core"
25
+ * E.g., "/repo/apps/web/src/foo.ts" → "web"
26
+ */
27
+ export declare function getPackageName(filePath: string): string | null;
28
+ /**
29
+ * Shorten a file path relative to the workspace root.
30
+ */
31
+ export declare function relativePath(filePath: string, workspaceRoot: string): string;
@@ -0,0 +1,55 @@
1
+ import { LspError, LspErrorCode } from './types.js';
2
+ /**
3
+ * Convert 1-indexed line/column (Claude-facing) to 0-indexed LSP Position.
4
+ */
5
+ export function toPosition(line1, col1, content) {
6
+ const line = line1 - 1;
7
+ const character = col1 - 1;
8
+ if (line < 0 || character < 0) {
9
+ throw new LspError(LspErrorCode.FILE_NOT_FOUND, `Invalid position: line ${line1}, column ${col1} (must be >= 1)`);
10
+ }
11
+ return { line, character };
12
+ }
13
+ /**
14
+ * Convert 0-indexed LSP Position to 1-indexed (Claude-facing).
15
+ */
16
+ export function fromPosition(pos) {
17
+ return { line: pos.line + 1, column: pos.character + 1 };
18
+ }
19
+ /**
20
+ * Convert an absolute file path to a file:// URI.
21
+ */
22
+ export function pathToUri(filePath) {
23
+ if (filePath.startsWith('file://'))
24
+ return filePath;
25
+ return `file://${filePath}`;
26
+ }
27
+ /**
28
+ * Convert a file:// URI to an absolute file path.
29
+ */
30
+ export function uriToPath(uri) {
31
+ if (uri.startsWith('file://'))
32
+ return decodeURIComponent(uri.slice(7));
33
+ return uri;
34
+ }
35
+ /**
36
+ * Get the containing package name from a file path.
37
+ * Works with any monorepo layout: packages/, apps/, libs/, modules/, services/
38
+ * E.g., "/repo/packages/core/src/foo.ts" → "core"
39
+ * E.g., "/repo/apps/web/src/foo.ts" → "web"
40
+ */
41
+ export function getPackageName(filePath) {
42
+ const match = filePath.match(/\/(packages|apps|libs|modules|services)\/([^/]+)\//);
43
+ return match ? match[2] : null;
44
+ }
45
+ /**
46
+ * Shorten a file path relative to the workspace root.
47
+ */
48
+ export function relativePath(filePath, workspaceRoot) {
49
+ const resolved = uriToPath(filePath);
50
+ if (resolved.startsWith(workspaceRoot)) {
51
+ return resolved.slice(workspaceRoot.length + 1);
52
+ }
53
+ return resolved;
54
+ }
55
+ //# sourceMappingURL=positions.js.map
@@ -0,0 +1 @@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OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,aAAqB;IAClE,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IACrC,IAAI,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QACvC,OAAO,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,61 @@
1
+ import type { Diagnostic, Location, Position } from 'vscode-languageserver-protocol';
2
+ export declare enum LspErrorCode {
3
+ NOT_READY = "NOT_READY",
4
+ TIMEOUT = "TIMEOUT",
5
+ SYMBOL_NOT_FOUND = "SYMBOL_NOT_FOUND",
6
+ FILE_NOT_FOUND = "FILE_NOT_FOUND",
7
+ CAPABILITY_MISSING = "CAPABILITY_MISSING",
8
+ SERVER_CRASHED = "SERVER_CRASHED",
9
+ GIT_UNAVAILABLE = "GIT_UNAVAILABLE"
10
+ }
11
+ export declare class LspError extends Error {
12
+ code: LspErrorCode;
13
+ suggestion?: string | undefined;
14
+ constructor(code: LspErrorCode, message: string, suggestion?: string | undefined);
15
+ }
16
+ export interface SymbolInput {
17
+ input_type: 'symbol';
18
+ symbol: string;
19
+ file_path?: string;
20
+ }
21
+ export interface PositionInput {
22
+ input_type: 'position';
23
+ file_path: string;
24
+ line: number;
25
+ column: number;
26
+ }
27
+ export type SymbolOrPosition = SymbolInput | PositionInput;
28
+ export type Verbosity = 'summary' | 'normal' | 'detailed';
29
+ export interface ResolvedLocation {
30
+ uri: string;
31
+ position: Position;
32
+ name?: string;
33
+ }
34
+ export interface ReferenceResult {
35
+ uri: string;
36
+ range: {
37
+ start: Position;
38
+ end: Position;
39
+ };
40
+ kind?: 'definition' | 'import' | 'call' | 'type_annotation' | 're_export' | 'other';
41
+ context?: string;
42
+ }
43
+ export interface ImpactNode {
44
+ uri: string;
45
+ position: Position;
46
+ name: string;
47
+ depth: number;
48
+ references: Location[];
49
+ isTypeAlias: boolean;
50
+ }
51
+ export interface DiagnosticEntry {
52
+ uri: string;
53
+ diagnostics: Diagnostic[];
54
+ }
55
+ export declare const SKIP_DIRS: Set<string>;
56
+ export declare const DEFAULT_TIMEOUTS: {
57
+ readonly primitive: 10000;
58
+ readonly composite: 20000;
59
+ readonly context: 30000;
60
+ readonly live: 10000;
61
+ };
@@ -0,0 +1,33 @@
1
+ // --- Error types ---
2
+ export var LspErrorCode;
3
+ (function (LspErrorCode) {
4
+ LspErrorCode["NOT_READY"] = "NOT_READY";
5
+ LspErrorCode["TIMEOUT"] = "TIMEOUT";
6
+ LspErrorCode["SYMBOL_NOT_FOUND"] = "SYMBOL_NOT_FOUND";
7
+ LspErrorCode["FILE_NOT_FOUND"] = "FILE_NOT_FOUND";
8
+ LspErrorCode["CAPABILITY_MISSING"] = "CAPABILITY_MISSING";
9
+ LspErrorCode["SERVER_CRASHED"] = "SERVER_CRASHED";
10
+ LspErrorCode["GIT_UNAVAILABLE"] = "GIT_UNAVAILABLE";
11
+ })(LspErrorCode || (LspErrorCode = {}));
12
+ export class LspError extends Error {
13
+ code;
14
+ suggestion;
15
+ constructor(code, message, suggestion) {
16
+ super(message);
17
+ this.code = code;
18
+ this.suggestion = suggestion;
19
+ this.name = 'LspError';
20
+ }
21
+ }
22
+ // --- Constants ---
23
+ export const SKIP_DIRS = new Set([
24
+ 'node_modules', 'dist', 'es', '.cache', '.git',
25
+ '__pycache__', '.next', '.turbo', 'coverage',
26
+ ]);
27
+ export const DEFAULT_TIMEOUTS = {
28
+ primitive: 10_000,
29
+ composite: 20_000,
30
+ context: 30_000,
31
+ live: 10_000,
32
+ };
33
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/engine/types.ts"],"names":[],"mappings":"AAEA,sBAAsB;AAEtB,MAAM,CAAN,IAAY,YAQX;AARD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,mCAAmB,CAAA;IACnB,qDAAqC,CAAA;IACrC,iDAAiC,CAAA;IACjC,yDAAyC,CAAA;IACzC,iDAAiC,CAAA;IACjC,mDAAmC,CAAA;AACrC,CAAC,EARW,YAAY,KAAZ,YAAY,QAQvB;AAED,MAAM,OAAO,QAAS,SAAQ,KAAK;IAExB;IAEA;IAHT,YACS,IAAkB,EACzB,OAAe,EACR,UAAmB;QAE1B,KAAK,CAAC,OAAO,CAAC,CAAC;QAJR,SAAI,GAAJ,IAAI,CAAc;QAElB,eAAU,GAAV,UAAU,CAAS;QAG1B,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF;AAkDD,oBAAoB;AAEpB,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IAC/B,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM;IAC9C,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU;CAC7C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,MAAM;IACjB,OAAO,EAAE,MAAM;IACf,IAAI,EAAE,MAAM;CACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Location, Hover } from 'vscode-languageserver-protocol';
2
+ import type { Verbosity } from '../engine/types.js';
3
+ export declare function formatReferences(locations: Location[] | null, workspaceRoot: string, verbosity?: Verbosity): string;
4
+ export declare function formatDefinitions(locations: Location | Location[] | null, workspaceRoot: string): string;
5
+ export declare function formatHover(hover: Hover | null): string;
@@ -0,0 +1,90 @@
1
+ import { fromPosition, uriToPath, relativePath } from '../engine/positions.js';
2
+ import * as fs from 'fs';
3
+ export function formatReferences(locations, workspaceRoot, verbosity = 'normal') {
4
+ if (!locations || locations.length === 0)
5
+ return 'No references found.';
6
+ // Group by file
7
+ const byFile = new Map();
8
+ for (const loc of locations) {
9
+ const file = uriToPath(loc.uri);
10
+ const existing = byFile.get(file) ?? [];
11
+ existing.push(loc);
12
+ byFile.set(file, existing);
13
+ }
14
+ const totalFiles = byFile.size;
15
+ const totalRefs = locations.length;
16
+ const summary = `${totalRefs} references across ${totalFiles} files`;
17
+ if (verbosity === 'summary')
18
+ return summary;
19
+ const lines = [`# References\n\n${summary}\n`];
20
+ for (const [file, refs] of [...byFile.entries()].sort()) {
21
+ const rel = relativePath(file, workspaceRoot);
22
+ lines.push(`## ${rel} (${refs.length})\n`);
23
+ for (const ref of refs.sort((a, b) => a.range.start.line - b.range.start.line)) {
24
+ const pos = fromPosition(ref.range.start);
25
+ if (verbosity === 'detailed') {
26
+ const context = getContextLines(file, ref.range.start.line, 1);
27
+ lines.push(`### L${pos.line}\n\`\`\`\n${context}\n\`\`\`\n`);
28
+ }
29
+ else {
30
+ const context = getLineContent(file, ref.range.start.line);
31
+ lines.push(`- L${pos.line}: \`${context.trim()}\``);
32
+ }
33
+ }
34
+ lines.push('');
35
+ }
36
+ return lines.join('\n');
37
+ }
38
+ export function formatDefinitions(locations, workspaceRoot) {
39
+ if (!locations)
40
+ return 'No definition found.';
41
+ const locs = Array.isArray(locations) ? locations : [locations];
42
+ if (locs.length === 0)
43
+ return 'No definition found.';
44
+ const lines = ['# Definition\n'];
45
+ for (const loc of locs) {
46
+ const rel = relativePath(uriToPath(loc.uri), workspaceRoot);
47
+ const pos = fromPosition(loc.range.start);
48
+ const context = getContextLines(uriToPath(loc.uri), loc.range.start.line, 2);
49
+ lines.push(`**${rel}:${pos.line}**\n\`\`\`\n${context}\n\`\`\`\n`);
50
+ }
51
+ return lines.join('\n');
52
+ }
53
+ export function formatHover(hover) {
54
+ if (!hover)
55
+ return 'No hover information available.';
56
+ const contents = hover.contents;
57
+ if (typeof contents === 'string')
58
+ return contents;
59
+ if ('kind' in contents)
60
+ return contents.value;
61
+ if ('language' in contents)
62
+ return `\`\`\`${contents.language}\n${contents.value}\n\`\`\``;
63
+ return String(contents);
64
+ }
65
+ function getLineContent(filePath, line0) {
66
+ try {
67
+ const content = fs.readFileSync(filePath, 'utf-8');
68
+ const lines = content.split('\n');
69
+ return lines[line0] ?? '';
70
+ }
71
+ catch {
72
+ return '';
73
+ }
74
+ }
75
+ function getContextLines(filePath, line0, context) {
76
+ try {
77
+ const content = fs.readFileSync(filePath, 'utf-8');
78
+ const lines = content.split('\n');
79
+ const start = Math.max(0, line0 - context);
80
+ const end = Math.min(lines.length - 1, line0 + context);
81
+ return lines
82
+ .slice(start, end + 1)
83
+ .map((l, i) => `${start + i + 1}| ${l}`)
84
+ .join('\n');
85
+ }
86
+ catch {
87
+ return '';
88
+ }
89
+ }
90
+ //# sourceMappingURL=markdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown.js","sourceRoot":"","sources":["../../src/format/markdown.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE/E,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,MAAM,UAAU,gBAAgB,CAC9B,SAA4B,EAC5B,aAAqB,EACrB,YAAuB,QAAQ;IAE/B,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,sBAAsB,CAAC;IAExE,gBAAgB;IAChB,MAAM,MAAM,GAAG,IAAI,GAAG,EAAsB,CAAC;IAC7C,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE,CAAC;QAC5B,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACxC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,MAAM,CAAC,GAAG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