gitnexus 1.3.6 → 1.3.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.
Files changed (47) hide show
  1. package/dist/cli/ai-context.js +77 -23
  2. package/dist/cli/analyze.js +0 -5
  3. package/dist/cli/eval-server.d.ts +7 -0
  4. package/dist/cli/eval-server.js +16 -7
  5. package/dist/cli/index.js +2 -20
  6. package/dist/cli/mcp.js +2 -0
  7. package/dist/cli/setup.js +6 -1
  8. package/dist/config/supported-languages.d.ts +1 -0
  9. package/dist/config/supported-languages.js +1 -0
  10. package/dist/core/ingestion/call-processor.d.ts +5 -1
  11. package/dist/core/ingestion/call-processor.js +78 -0
  12. package/dist/core/ingestion/framework-detection.d.ts +1 -0
  13. package/dist/core/ingestion/framework-detection.js +49 -2
  14. package/dist/core/ingestion/import-processor.js +90 -39
  15. package/dist/core/ingestion/parsing-processor.d.ts +12 -1
  16. package/dist/core/ingestion/parsing-processor.js +92 -51
  17. package/dist/core/ingestion/pipeline.js +21 -2
  18. package/dist/core/ingestion/process-processor.js +0 -1
  19. package/dist/core/ingestion/tree-sitter-queries.d.ts +1 -0
  20. package/dist/core/ingestion/tree-sitter-queries.js +80 -0
  21. package/dist/core/ingestion/utils.d.ts +5 -0
  22. package/dist/core/ingestion/utils.js +20 -0
  23. package/dist/core/ingestion/workers/parse-worker.d.ts +11 -0
  24. package/dist/core/ingestion/workers/parse-worker.js +473 -51
  25. package/dist/core/kuzu/csv-generator.d.ts +4 -0
  26. package/dist/core/kuzu/csv-generator.js +23 -9
  27. package/dist/core/kuzu/kuzu-adapter.js +9 -3
  28. package/dist/core/tree-sitter/parser-loader.d.ts +1 -0
  29. package/dist/core/tree-sitter/parser-loader.js +3 -0
  30. package/dist/mcp/core/kuzu-adapter.d.ts +4 -3
  31. package/dist/mcp/core/kuzu-adapter.js +79 -16
  32. package/dist/mcp/local/local-backend.d.ts +13 -0
  33. package/dist/mcp/local/local-backend.js +148 -105
  34. package/dist/mcp/server.js +26 -11
  35. package/dist/storage/git.js +4 -1
  36. package/dist/storage/repo-manager.js +16 -2
  37. package/hooks/claude/gitnexus-hook.cjs +28 -8
  38. package/hooks/claude/pre-tool-use.sh +2 -1
  39. package/package.json +11 -3
  40. package/dist/cli/claude-hooks.d.ts +0 -22
  41. package/dist/cli/claude-hooks.js +0 -97
  42. package/dist/cli/view.d.ts +0 -13
  43. package/dist/cli/view.js +0 -59
  44. package/dist/core/graph/html-graph-viewer.d.ts +0 -15
  45. package/dist/core/graph/html-graph-viewer.js +0 -542
  46. package/dist/core/graph/html-graph-viewer.test.d.ts +0 -1
  47. package/dist/core/graph/html-graph-viewer.test.js +0 -67
@@ -4,6 +4,11 @@ import { SupportedLanguages } from '../../config/supported-languages.js';
4
4
  * Call periodically in hot loops to prevent UI freezes.
5
5
  */
6
6
  export declare const yieldToEventLoop: () => Promise<void>;
7
+ /**
8
+ * Find a child of `childType` within a sibling node of `siblingType`.
9
+ * Used for Kotlin AST traversal where visibility_modifier lives inside a modifiers sibling.
10
+ */
11
+ export declare const findSiblingChild: (parent: any, siblingType: string, childType: string) => any | null;
7
12
  /**
8
13
  * Map file extension to SupportedLanguage enum
9
14
  */
@@ -4,6 +4,23 @@ import { SupportedLanguages } from '../../config/supported-languages.js';
4
4
  * Call periodically in hot loops to prevent UI freezes.
5
5
  */
6
6
  export const yieldToEventLoop = () => new Promise(resolve => setImmediate(resolve));
7
+ /**
8
+ * Find a child of `childType` within a sibling node of `siblingType`.
9
+ * Used for Kotlin AST traversal where visibility_modifier lives inside a modifiers sibling.
10
+ */
11
+ export const findSiblingChild = (parent, siblingType, childType) => {
12
+ for (let i = 0; i < parent.childCount; i++) {
13
+ const sibling = parent.child(i);
14
+ if (sibling?.type === siblingType) {
15
+ for (let j = 0; j < sibling.childCount; j++) {
16
+ const child = sibling.child(j);
17
+ if (child?.type === childType)
18
+ return child;
19
+ }
20
+ }
21
+ }
22
+ return null;
23
+ };
7
24
  /**
8
25
  * Map file extension to SupportedLanguage enum
9
26
  */
@@ -40,6 +57,9 @@ export const getLanguageFromFilename = (filename) => {
40
57
  // Rust
41
58
  if (filename.endsWith('.rs'))
42
59
  return SupportedLanguages.Rust;
60
+ // Kotlin
61
+ if (filename.endsWith('.kt') || filename.endsWith('.kts'))
62
+ return SupportedLanguages.Kotlin;
43
63
  // PHP (all common extensions)
44
64
  if (filename.endsWith('.php') || filename.endsWith('.phtml') ||
45
65
  filename.endsWith('.php3') || filename.endsWith('.php4') ||
@@ -45,6 +45,16 @@ export interface ExtractedHeritage {
45
45
  /** 'extends' | 'implements' | 'trait-impl' */
46
46
  kind: string;
47
47
  }
48
+ export interface ExtractedRoute {
49
+ filePath: string;
50
+ httpMethod: string;
51
+ routePath: string | null;
52
+ controllerName: string | null;
53
+ methodName: string | null;
54
+ middleware: string[];
55
+ prefix: string | null;
56
+ lineNumber: number;
57
+ }
48
58
  export interface ParseWorkerResult {
49
59
  nodes: ParsedNode[];
50
60
  relationships: ParsedRelationship[];
@@ -52,6 +62,7 @@ export interface ParseWorkerResult {
52
62
  imports: ExtractedImport[];
53
63
  calls: ExtractedCall[];
54
64
  heritage: ExtractedHeritage[];
65
+ routes: ExtractedRoute[];
55
66
  fileCount: number;
56
67
  }
57
68
  export interface ParseWorkerInput {