gitnexus 1.4.1 → 1.4.6
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 +215 -194
- package/dist/cli/ai-context.d.ts +2 -1
- package/dist/cli/ai-context.js +117 -90
- package/dist/cli/analyze.d.ts +2 -0
- package/dist/cli/analyze.js +57 -30
- package/dist/cli/augment.js +1 -1
- package/dist/cli/eval-server.d.ts +1 -1
- package/dist/cli/eval-server.js +14 -6
- package/dist/cli/index.js +18 -25
- package/dist/cli/lazy-action.d.ts +6 -0
- package/dist/cli/lazy-action.js +18 -0
- package/dist/cli/mcp.js +1 -1
- package/dist/cli/setup.js +42 -32
- package/dist/cli/skill-gen.d.ts +26 -0
- package/dist/cli/skill-gen.js +549 -0
- package/dist/cli/status.js +13 -4
- package/dist/cli/tool.d.ts +3 -2
- package/dist/cli/tool.js +48 -13
- package/dist/cli/wiki.js +2 -2
- package/dist/config/ignore-service.d.ts +25 -0
- package/dist/config/ignore-service.js +76 -0
- package/dist/config/supported-languages.d.ts +1 -0
- package/dist/config/supported-languages.js +1 -1
- package/dist/core/augmentation/engine.js +99 -72
- package/dist/core/embeddings/embedder.d.ts +1 -1
- package/dist/core/embeddings/embedder.js +1 -1
- package/dist/core/embeddings/embedding-pipeline.d.ts +3 -3
- package/dist/core/embeddings/embedding-pipeline.js +74 -47
- package/dist/core/embeddings/types.d.ts +1 -1
- package/dist/core/graph/types.d.ts +5 -2
- package/dist/core/ingestion/ast-cache.js +3 -2
- package/dist/core/ingestion/call-processor.d.ts +5 -7
- package/dist/core/ingestion/call-processor.js +430 -283
- package/dist/core/ingestion/call-routing.d.ts +53 -0
- package/dist/core/ingestion/call-routing.js +108 -0
- package/dist/core/ingestion/cluster-enricher.js +16 -16
- package/dist/core/ingestion/constants.d.ts +16 -0
- package/dist/core/ingestion/constants.js +16 -0
- package/dist/core/ingestion/entry-point-scoring.d.ts +2 -1
- package/dist/core/ingestion/entry-point-scoring.js +94 -24
- package/dist/core/ingestion/export-detection.d.ts +18 -0
- package/dist/core/ingestion/export-detection.js +231 -0
- package/dist/core/ingestion/filesystem-walker.js +4 -3
- package/dist/core/ingestion/framework-detection.d.ts +5 -1
- package/dist/core/ingestion/framework-detection.js +48 -8
- package/dist/core/ingestion/heritage-processor.d.ts +13 -5
- package/dist/core/ingestion/heritage-processor.js +109 -55
- package/dist/core/ingestion/import-processor.d.ts +16 -20
- package/dist/core/ingestion/import-processor.js +202 -696
- package/dist/core/ingestion/language-config.d.ts +46 -0
- package/dist/core/ingestion/language-config.js +167 -0
- package/dist/core/ingestion/mro-processor.d.ts +45 -0
- package/dist/core/ingestion/mro-processor.js +369 -0
- package/dist/core/ingestion/named-binding-extraction.d.ts +61 -0
- package/dist/core/ingestion/named-binding-extraction.js +363 -0
- package/dist/core/ingestion/parsing-processor.d.ts +3 -11
- package/dist/core/ingestion/parsing-processor.js +85 -181
- package/dist/core/ingestion/pipeline.d.ts +5 -1
- package/dist/core/ingestion/pipeline.js +192 -116
- package/dist/core/ingestion/process-processor.js +2 -1
- package/dist/core/ingestion/resolution-context.d.ts +53 -0
- package/dist/core/ingestion/resolution-context.js +132 -0
- package/dist/core/ingestion/resolvers/csharp.d.ts +22 -0
- package/dist/core/ingestion/resolvers/csharp.js +109 -0
- package/dist/core/ingestion/resolvers/go.d.ts +19 -0
- package/dist/core/ingestion/resolvers/go.js +42 -0
- package/dist/core/ingestion/resolvers/index.d.ts +18 -0
- package/dist/core/ingestion/resolvers/index.js +13 -0
- package/dist/core/ingestion/resolvers/jvm.d.ts +23 -0
- package/dist/core/ingestion/resolvers/jvm.js +87 -0
- package/dist/core/ingestion/resolvers/php.d.ts +15 -0
- package/dist/core/ingestion/resolvers/php.js +35 -0
- package/dist/core/ingestion/resolvers/python.d.ts +19 -0
- package/dist/core/ingestion/resolvers/python.js +52 -0
- package/dist/core/ingestion/resolvers/ruby.d.ts +12 -0
- package/dist/core/ingestion/resolvers/ruby.js +15 -0
- package/dist/core/ingestion/resolvers/rust.d.ts +15 -0
- package/dist/core/ingestion/resolvers/rust.js +73 -0
- package/dist/core/ingestion/resolvers/standard.d.ts +28 -0
- package/dist/core/ingestion/resolvers/standard.js +123 -0
- package/dist/core/ingestion/resolvers/utils.d.ts +33 -0
- package/dist/core/ingestion/resolvers/utils.js +122 -0
- package/dist/core/ingestion/symbol-table.d.ts +21 -1
- package/dist/core/ingestion/symbol-table.js +40 -12
- package/dist/core/ingestion/tree-sitter-queries.d.ts +12 -11
- package/dist/core/ingestion/tree-sitter-queries.js +642 -485
- package/dist/core/ingestion/type-env.d.ts +49 -0
- package/dist/core/ingestion/type-env.js +611 -0
- package/dist/core/ingestion/type-extractors/c-cpp.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/c-cpp.js +385 -0
- package/dist/core/ingestion/type-extractors/csharp.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/csharp.js +383 -0
- package/dist/core/ingestion/type-extractors/go.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/go.js +467 -0
- package/dist/core/ingestion/type-extractors/index.d.ts +22 -0
- package/dist/core/ingestion/type-extractors/index.js +31 -0
- package/dist/core/ingestion/type-extractors/jvm.d.ts +3 -0
- package/dist/core/ingestion/type-extractors/jvm.js +681 -0
- package/dist/core/ingestion/type-extractors/php.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/php.js +549 -0
- package/dist/core/ingestion/type-extractors/python.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/python.js +406 -0
- package/dist/core/ingestion/type-extractors/ruby.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/ruby.js +389 -0
- package/dist/core/ingestion/type-extractors/rust.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/rust.js +449 -0
- package/dist/core/ingestion/type-extractors/shared.d.ts +133 -0
- package/dist/core/ingestion/type-extractors/shared.js +703 -0
- package/dist/core/ingestion/type-extractors/swift.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/swift.js +137 -0
- package/dist/core/ingestion/type-extractors/types.d.ts +127 -0
- package/dist/core/ingestion/type-extractors/types.js +1 -0
- package/dist/core/ingestion/type-extractors/typescript.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/typescript.js +494 -0
- package/dist/core/ingestion/utils.d.ts +98 -0
- package/dist/core/ingestion/utils.js +1064 -9
- package/dist/core/ingestion/workers/parse-worker.d.ts +38 -4
- package/dist/core/ingestion/workers/parse-worker.js +251 -359
- package/dist/core/ingestion/workers/worker-pool.js +8 -0
- package/dist/core/{kuzu → lbug}/csv-generator.d.ts +1 -1
- package/dist/core/{kuzu → lbug}/csv-generator.js +20 -4
- package/dist/core/{kuzu/kuzu-adapter.d.ts → lbug/lbug-adapter.d.ts} +19 -19
- package/dist/core/{kuzu/kuzu-adapter.js → lbug/lbug-adapter.js} +82 -82
- package/dist/core/{kuzu → lbug}/schema.d.ts +4 -4
- package/dist/core/{kuzu → lbug}/schema.js +304 -289
- package/dist/core/search/bm25-index.d.ts +4 -4
- package/dist/core/search/bm25-index.js +17 -16
- package/dist/core/search/hybrid-search.d.ts +2 -2
- package/dist/core/search/hybrid-search.js +9 -9
- package/dist/core/tree-sitter/parser-loader.js +9 -2
- package/dist/core/wiki/generator.d.ts +4 -52
- package/dist/core/wiki/generator.js +53 -552
- package/dist/core/wiki/graph-queries.d.ts +4 -46
- package/dist/core/wiki/graph-queries.js +103 -282
- package/dist/core/wiki/html-viewer.js +192 -192
- package/dist/core/wiki/llm-client.js +11 -73
- package/dist/core/wiki/prompts.d.ts +8 -52
- package/dist/core/wiki/prompts.js +86 -200
- package/dist/mcp/compatible-stdio-transport.d.ts +25 -0
- package/dist/mcp/compatible-stdio-transport.js +200 -0
- package/dist/mcp/core/{kuzu-adapter.d.ts → lbug-adapter.d.ts} +7 -9
- package/dist/mcp/core/{kuzu-adapter.js → lbug-adapter.js} +77 -79
- package/dist/mcp/local/local-backend.d.ts +7 -6
- package/dist/mcp/local/local-backend.js +176 -147
- package/dist/mcp/resources.js +42 -42
- package/dist/mcp/server.js +18 -19
- package/dist/mcp/tools.js +103 -104
- package/dist/server/api.js +12 -12
- package/dist/server/mcp-http.d.ts +1 -1
- package/dist/server/mcp-http.js +1 -1
- package/dist/storage/repo-manager.d.ts +20 -2
- package/dist/storage/repo-manager.js +55 -1
- package/dist/types/pipeline.d.ts +1 -1
- package/hooks/claude/gitnexus-hook.cjs +238 -155
- package/hooks/claude/pre-tool-use.sh +79 -79
- package/hooks/claude/session-start.sh +42 -42
- package/package.json +99 -96
- package/scripts/patch-tree-sitter-swift.cjs +74 -74
- package/skills/gitnexus-cli.md +82 -82
- package/skills/gitnexus-debugging.md +89 -89
- package/skills/gitnexus-exploring.md +78 -78
- package/skills/gitnexus-guide.md +64 -64
- package/skills/gitnexus-impact-analysis.md +97 -97
- package/skills/gitnexus-pr-review.md +163 -163
- package/skills/gitnexus-refactoring.md +121 -121
- package/vendor/leiden/index.cjs +355 -355
- package/vendor/leiden/utils.cjs +392 -392
- package/dist/core/wiki/diagrams.d.ts +0 -27
- package/dist/core/wiki/diagrams.js +0 -163
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { SupportedLanguages } from '../../../config/supported-languages.js';
|
|
2
|
+
import type { ConstructorBinding } from '../type-env.js';
|
|
1
3
|
interface ParsedNode {
|
|
2
4
|
id: string;
|
|
3
5
|
label: string;
|
|
@@ -6,18 +8,20 @@ interface ParsedNode {
|
|
|
6
8
|
filePath: string;
|
|
7
9
|
startLine: number;
|
|
8
10
|
endLine: number;
|
|
9
|
-
language:
|
|
11
|
+
language: SupportedLanguages;
|
|
10
12
|
isExported: boolean;
|
|
11
13
|
astFrameworkMultiplier?: number;
|
|
12
14
|
astFrameworkReason?: string;
|
|
13
15
|
description?: string;
|
|
16
|
+
parameterCount?: number;
|
|
17
|
+
returnType?: string;
|
|
14
18
|
};
|
|
15
19
|
}
|
|
16
20
|
interface ParsedRelationship {
|
|
17
21
|
id: string;
|
|
18
22
|
sourceId: string;
|
|
19
23
|
targetId: string;
|
|
20
|
-
type: 'DEFINES';
|
|
24
|
+
type: 'DEFINES' | 'HAS_METHOD';
|
|
21
25
|
confidence: number;
|
|
22
26
|
reason: string;
|
|
23
27
|
}
|
|
@@ -26,23 +30,46 @@ interface ParsedSymbol {
|
|
|
26
30
|
name: string;
|
|
27
31
|
nodeId: string;
|
|
28
32
|
type: string;
|
|
33
|
+
parameterCount?: number;
|
|
34
|
+
returnType?: string;
|
|
35
|
+
ownerId?: string;
|
|
29
36
|
}
|
|
30
37
|
export interface ExtractedImport {
|
|
31
38
|
filePath: string;
|
|
32
39
|
rawImportPath: string;
|
|
33
|
-
language:
|
|
40
|
+
language: SupportedLanguages;
|
|
41
|
+
/** Named bindings from the import (e.g., import {User as U} → [{local:'U', exported:'User'}]) */
|
|
42
|
+
namedBindings?: {
|
|
43
|
+
local: string;
|
|
44
|
+
exported: string;
|
|
45
|
+
}[];
|
|
34
46
|
}
|
|
35
47
|
export interface ExtractedCall {
|
|
36
48
|
filePath: string;
|
|
37
49
|
calledName: string;
|
|
38
50
|
/** generateId of enclosing function, or generateId('File', filePath) for top-level */
|
|
39
51
|
sourceId: string;
|
|
52
|
+
argCount?: number;
|
|
53
|
+
/** Discriminates free function calls from member/constructor calls */
|
|
54
|
+
callForm?: 'free' | 'member' | 'constructor';
|
|
55
|
+
/** Simple identifier of the receiver for member calls (e.g., 'user' in user.save()) */
|
|
56
|
+
receiverName?: string;
|
|
57
|
+
/** Resolved type name of the receiver (e.g., 'User' for user.save() when user: User) */
|
|
58
|
+
receiverTypeName?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Chained call names when the receiver is itself a call expression.
|
|
61
|
+
* For `svc.getUser().save()`, the `save` ExtractedCall gets receiverCallChain = ['getUser']
|
|
62
|
+
* with receiverName = 'svc'. The chain is ordered outermost-last, e.g.:
|
|
63
|
+
* `a.b().c().d()` → calledName='d', receiverCallChain=['b','c'], receiverName='a'
|
|
64
|
+
* Length is capped at MAX_CHAIN_DEPTH (3).
|
|
65
|
+
*/
|
|
66
|
+
receiverCallChain?: string[];
|
|
40
67
|
}
|
|
41
68
|
export interface ExtractedHeritage {
|
|
42
69
|
filePath: string;
|
|
43
70
|
className: string;
|
|
44
71
|
parentName: string;
|
|
45
|
-
/** 'extends' | 'implements' | 'trait-impl' */
|
|
72
|
+
/** 'extends' | 'implements' | 'trait-impl' | 'include' | 'extend' | 'prepend' */
|
|
46
73
|
kind: string;
|
|
47
74
|
}
|
|
48
75
|
export interface ExtractedRoute {
|
|
@@ -55,6 +82,11 @@ export interface ExtractedRoute {
|
|
|
55
82
|
prefix: string | null;
|
|
56
83
|
lineNumber: number;
|
|
57
84
|
}
|
|
85
|
+
/** Constructor bindings keyed by filePath for cross-file type resolution */
|
|
86
|
+
export interface FileConstructorBindings {
|
|
87
|
+
filePath: string;
|
|
88
|
+
bindings: ConstructorBinding[];
|
|
89
|
+
}
|
|
58
90
|
export interface ParseWorkerResult {
|
|
59
91
|
nodes: ParsedNode[];
|
|
60
92
|
relationships: ParsedRelationship[];
|
|
@@ -63,6 +95,8 @@ export interface ParseWorkerResult {
|
|
|
63
95
|
calls: ExtractedCall[];
|
|
64
96
|
heritage: ExtractedHeritage[];
|
|
65
97
|
routes: ExtractedRoute[];
|
|
98
|
+
constructorBindings: FileConstructorBindings[];
|
|
99
|
+
skippedLanguages: Record<string, number>;
|
|
66
100
|
fileCount: number;
|
|
67
101
|
}
|
|
68
102
|
export interface ParseWorkerInput {
|