@vohongtho.infotech/code-intel 0.1.4 → 0.2.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.
package/dist/index.d.ts CHANGED
@@ -171,7 +171,17 @@ interface PipelineContext {
171
171
  workspaceRoot: string;
172
172
  graph: KnowledgeGraph;
173
173
  filePaths: string[];
174
+ /** Shared file content cache — populated by parse phase, reused by resolve phase (eliminates double I/O) */
175
+ fileCache?: Map<string, string>;
176
+ /** Per-file sorted symbol index for O(1) enclosing-function lookup — built by parse phase */
177
+ fileFunctionIndex?: Map<string, {
178
+ id: string;
179
+ startLine: number;
180
+ endLine: number | undefined;
181
+ }[]>;
174
182
  onProgress?: (phase: string, message: string) => void;
183
+ /** Per-phase progress callback — called with (phase, done, total) for each processed item */
184
+ onPhaseProgress?: (phase: string, done: number, total: number) => void;
175
185
  verbose?: boolean;
176
186
  }
177
187
  interface Phase {
@@ -265,8 +275,8 @@ declare class DbManager {
265
275
  get isOpen(): boolean;
266
276
  }
267
277
 
268
- declare function createMcpServer(graph: KnowledgeGraph, repoName: string): Server;
269
- declare function startMcpStdio(graph: KnowledgeGraph, repoName: string): Promise<void>;
278
+ declare function createMcpServer(graph: KnowledgeGraph, repoName: string, workspaceRoot?: string): Server;
279
+ declare function startMcpStdio(graph: KnowledgeGraph, repoName: string, workspaceRoot?: string): Promise<void>;
270
280
 
271
281
  declare function createApp(graph: KnowledgeGraph, repoName: string, workspaceRoot?: string): express.Application;
272
282
  declare function startHttpServer(graph: KnowledgeGraph, repoName: string, port?: number, workspaceRoot?: string): void;
@@ -292,6 +302,7 @@ declare function removeRepo(repoPath: string): void;
292
302
 
293
303
  interface IndexMetadata {
294
304
  indexedAt: string;
305
+ indexVersion?: string;
295
306
  commitHash?: string;
296
307
  stats: {
297
308
  nodes: number;