gitnexus 1.4.0 → 1.4.1
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 +194 -214
- package/dist/cli/ai-context.d.ts +1 -2
- package/dist/cli/ai-context.js +90 -117
- package/dist/cli/analyze.d.ts +0 -2
- package/dist/cli/analyze.js +2 -20
- package/dist/cli/index.js +25 -17
- package/dist/cli/setup.js +19 -17
- package/dist/core/augmentation/engine.js +20 -20
- package/dist/core/embeddings/embedding-pipeline.js +26 -26
- package/dist/core/graph/types.d.ts +2 -5
- package/dist/core/ingestion/ast-cache.js +2 -3
- package/dist/core/ingestion/call-processor.d.ts +5 -5
- package/dist/core/ingestion/call-processor.js +258 -173
- package/dist/core/ingestion/cluster-enricher.js +16 -16
- package/dist/core/ingestion/entry-point-scoring.d.ts +1 -2
- package/dist/core/ingestion/entry-point-scoring.js +22 -81
- package/dist/core/ingestion/framework-detection.d.ts +1 -5
- package/dist/core/ingestion/framework-detection.js +8 -39
- package/dist/core/ingestion/heritage-processor.d.ts +4 -13
- package/dist/core/ingestion/heritage-processor.js +28 -92
- package/dist/core/ingestion/import-processor.d.ts +19 -17
- package/dist/core/ingestion/import-processor.js +695 -170
- package/dist/core/ingestion/parsing-processor.d.ts +10 -1
- package/dist/core/ingestion/parsing-processor.js +177 -41
- package/dist/core/ingestion/pipeline.js +26 -49
- package/dist/core/ingestion/process-processor.js +1 -2
- package/dist/core/ingestion/symbol-table.d.ts +1 -12
- package/dist/core/ingestion/symbol-table.js +12 -19
- package/dist/core/ingestion/tree-sitter-queries.d.ts +11 -11
- package/dist/core/ingestion/tree-sitter-queries.js +485 -590
- package/dist/core/ingestion/utils.d.ts +0 -67
- package/dist/core/ingestion/utils.js +9 -692
- package/dist/core/ingestion/workers/parse-worker.d.ts +3 -20
- package/dist/core/ingestion/workers/parse-worker.js +345 -84
- package/dist/core/ingestion/workers/worker-pool.js +0 -8
- package/dist/core/kuzu/csv-generator.js +3 -19
- package/dist/core/kuzu/kuzu-adapter.js +19 -14
- package/dist/core/kuzu/schema.d.ts +3 -3
- package/dist/core/kuzu/schema.js +288 -303
- package/dist/core/search/bm25-index.js +6 -7
- package/dist/core/search/hybrid-search.js +3 -3
- package/dist/core/wiki/diagrams.d.ts +27 -0
- package/dist/core/wiki/diagrams.js +163 -0
- package/dist/core/wiki/generator.d.ts +50 -2
- package/dist/core/wiki/generator.js +548 -49
- package/dist/core/wiki/graph-queries.d.ts +42 -0
- package/dist/core/wiki/graph-queries.js +276 -97
- package/dist/core/wiki/html-viewer.js +192 -192
- package/dist/core/wiki/llm-client.js +73 -11
- package/dist/core/wiki/prompts.d.ts +52 -8
- package/dist/core/wiki/prompts.js +200 -86
- package/dist/mcp/core/kuzu-adapter.d.ts +3 -1
- package/dist/mcp/core/kuzu-adapter.js +44 -13
- package/dist/mcp/local/local-backend.js +128 -128
- package/dist/mcp/resources.js +42 -42
- package/dist/mcp/server.js +19 -18
- package/dist/mcp/tools.js +104 -103
- package/hooks/claude/gitnexus-hook.cjs +155 -238
- package/hooks/claude/pre-tool-use.sh +79 -79
- package/hooks/claude/session-start.sh +42 -42
- package/package.json +96 -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/cli/lazy-action.d.ts +0 -6
- package/dist/cli/lazy-action.js +0 -18
- package/dist/cli/skill-gen.d.ts +0 -26
- package/dist/cli/skill-gen.js +0 -549
- package/dist/core/ingestion/constants.d.ts +0 -16
- package/dist/core/ingestion/constants.js +0 -16
- package/dist/core/ingestion/export-detection.d.ts +0 -18
- package/dist/core/ingestion/export-detection.js +0 -230
- package/dist/core/ingestion/language-config.d.ts +0 -46
- package/dist/core/ingestion/language-config.js +0 -167
- package/dist/core/ingestion/mro-processor.d.ts +0 -45
- package/dist/core/ingestion/mro-processor.js +0 -369
- package/dist/core/ingestion/named-binding-extraction.d.ts +0 -61
- package/dist/core/ingestion/named-binding-extraction.js +0 -363
- package/dist/core/ingestion/resolvers/csharp.d.ts +0 -22
- package/dist/core/ingestion/resolvers/csharp.js +0 -109
- package/dist/core/ingestion/resolvers/go.d.ts +0 -19
- package/dist/core/ingestion/resolvers/go.js +0 -42
- package/dist/core/ingestion/resolvers/index.d.ts +0 -16
- package/dist/core/ingestion/resolvers/index.js +0 -11
- package/dist/core/ingestion/resolvers/jvm.d.ts +0 -23
- package/dist/core/ingestion/resolvers/jvm.js +0 -87
- package/dist/core/ingestion/resolvers/php.d.ts +0 -15
- package/dist/core/ingestion/resolvers/php.js +0 -35
- package/dist/core/ingestion/resolvers/rust.d.ts +0 -15
- package/dist/core/ingestion/resolvers/rust.js +0 -73
- package/dist/core/ingestion/resolvers/standard.d.ts +0 -28
- package/dist/core/ingestion/resolvers/standard.js +0 -145
- package/dist/core/ingestion/resolvers/utils.d.ts +0 -33
- package/dist/core/ingestion/resolvers/utils.js +0 -120
- package/dist/core/ingestion/symbol-resolver.d.ts +0 -32
- package/dist/core/ingestion/symbol-resolver.js +0 -83
- package/dist/core/ingestion/type-env.d.ts +0 -27
- package/dist/core/ingestion/type-env.js +0 -86
- package/dist/core/ingestion/type-extractors/c-cpp.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/c-cpp.js +0 -60
- package/dist/core/ingestion/type-extractors/csharp.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/csharp.js +0 -89
- package/dist/core/ingestion/type-extractors/go.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/go.js +0 -105
- package/dist/core/ingestion/type-extractors/index.d.ts +0 -21
- package/dist/core/ingestion/type-extractors/index.js +0 -29
- package/dist/core/ingestion/type-extractors/jvm.d.ts +0 -3
- package/dist/core/ingestion/type-extractors/jvm.js +0 -121
- package/dist/core/ingestion/type-extractors/php.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/php.js +0 -31
- package/dist/core/ingestion/type-extractors/python.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/python.js +0 -41
- package/dist/core/ingestion/type-extractors/rust.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/rust.js +0 -39
- package/dist/core/ingestion/type-extractors/shared.d.ts +0 -17
- package/dist/core/ingestion/type-extractors/shared.js +0 -97
- package/dist/core/ingestion/type-extractors/swift.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/swift.js +0 -43
- package/dist/core/ingestion/type-extractors/types.d.ts +0 -14
- package/dist/core/ingestion/type-extractors/types.js +0 -1
- package/dist/core/ingestion/type-extractors/typescript.d.ts +0 -2
- package/dist/core/ingestion/type-extractors/typescript.js +0 -46
- package/dist/mcp/compatible-stdio-transport.d.ts +0 -25
- package/dist/mcp/compatible-stdio-transport.js +0 -200
|
@@ -1,45 +1,4 @@
|
|
|
1
|
-
import type Parser from 'tree-sitter';
|
|
2
1
|
import { SupportedLanguages } from '../../config/supported-languages.js';
|
|
3
|
-
/** Tree-sitter AST node. Re-exported for use across ingestion modules. */
|
|
4
|
-
export type SyntaxNode = Parser.SyntaxNode;
|
|
5
|
-
/**
|
|
6
|
-
* Ordered list of definition capture keys for tree-sitter query matches.
|
|
7
|
-
* Used to extract the definition node from a capture map.
|
|
8
|
-
*/
|
|
9
|
-
export declare const DEFINITION_CAPTURE_KEYS: readonly ["definition.function", "definition.class", "definition.interface", "definition.method", "definition.struct", "definition.enum", "definition.namespace", "definition.module", "definition.trait", "definition.impl", "definition.type", "definition.const", "definition.static", "definition.typedef", "definition.macro", "definition.union", "definition.property", "definition.record", "definition.delegate", "definition.annotation", "definition.constructor", "definition.template"];
|
|
10
|
-
/** Extract the definition node from a tree-sitter query capture map. */
|
|
11
|
-
export declare const getDefinitionNodeFromCaptures: (captureMap: Record<string, any>) => any | null;
|
|
12
|
-
/**
|
|
13
|
-
* Node types that represent function/method definitions across languages.
|
|
14
|
-
* Used to find the enclosing function for a call site.
|
|
15
|
-
*/
|
|
16
|
-
export declare const FUNCTION_NODE_TYPES: Set<string>;
|
|
17
|
-
/**
|
|
18
|
-
* Node types for standard function declarations that need C/C++ declarator handling.
|
|
19
|
-
* Used by extractFunctionName to determine how to extract the function name.
|
|
20
|
-
*/
|
|
21
|
-
export declare const FUNCTION_DECLARATION_TYPES: Set<string>;
|
|
22
|
-
/**
|
|
23
|
-
* Built-in function/method names that should not be tracked as call targets.
|
|
24
|
-
* Covers JS/TS, Python, Kotlin, C/C++, PHP, Swift standard library functions.
|
|
25
|
-
*/
|
|
26
|
-
export declare const BUILT_IN_NAMES: Set<string>;
|
|
27
|
-
/** Check if a name is a built-in function or common noise that should be filtered out */
|
|
28
|
-
export declare const isBuiltInOrNoise: (name: string) => boolean;
|
|
29
|
-
/** AST node types that represent a class-like container (for HAS_METHOD edge extraction) */
|
|
30
|
-
export declare const CLASS_CONTAINER_TYPES: Set<string>;
|
|
31
|
-
export declare const CONTAINER_TYPE_TO_LABEL: Record<string, string>;
|
|
32
|
-
/** Walk up AST to find enclosing class/struct/interface/impl, return its generateId or null.
|
|
33
|
-
* For Go method_declaration nodes, extracts receiver type (e.g. `func (u *User) Save()` → User struct). */
|
|
34
|
-
export declare const findEnclosingClassId: (node: any, filePath: string) => string | null;
|
|
35
|
-
/**
|
|
36
|
-
* Extract function name and label from a function_definition or similar AST node.
|
|
37
|
-
* Handles C/C++ qualified_identifier (ClassName::MethodName) and other language patterns.
|
|
38
|
-
*/
|
|
39
|
-
export declare const extractFunctionName: (node: any) => {
|
|
40
|
-
funcName: string | null;
|
|
41
|
-
label: string;
|
|
42
|
-
};
|
|
43
2
|
/**
|
|
44
3
|
* Yield control to the event loop so spinners/progress can render.
|
|
45
4
|
* Call periodically in hot loops to prevent UI freezes.
|
|
@@ -54,29 +13,3 @@ export declare const findSiblingChild: (parent: any, siblingType: string, childT
|
|
|
54
13
|
* Map file extension to SupportedLanguage enum
|
|
55
14
|
*/
|
|
56
15
|
export declare const getLanguageFromFilename: (filename: string) => SupportedLanguages | null;
|
|
57
|
-
export interface MethodSignature {
|
|
58
|
-
parameterCount: number | undefined;
|
|
59
|
-
returnType: string | undefined;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Extract parameter count and return type text from an AST method/function node.
|
|
63
|
-
* Works across languages by looking for common AST patterns.
|
|
64
|
-
*/
|
|
65
|
-
export declare const extractMethodSignature: (node: SyntaxNode | null | undefined) => MethodSignature;
|
|
66
|
-
/**
|
|
67
|
-
* Count direct arguments for a call expression across common tree-sitter grammars.
|
|
68
|
-
* Returns undefined when the argument container cannot be located cheaply.
|
|
69
|
-
*/
|
|
70
|
-
export declare const countCallArguments: (callNode: SyntaxNode | null | undefined) => number | undefined;
|
|
71
|
-
type CallForm = 'free' | 'member' | 'constructor';
|
|
72
|
-
/**
|
|
73
|
-
* Infer whether a captured call site is a free call, member call, or constructor.
|
|
74
|
-
* Returns undefined if the form cannot be determined.
|
|
75
|
-
*
|
|
76
|
-
* Works by inspecting the AST structure between callNode (@call) and nameNode (@call.name).
|
|
77
|
-
* No tree-sitter query changes needed — the distinction is in the node types.
|
|
78
|
-
*/
|
|
79
|
-
export declare const inferCallForm: (callNode: SyntaxNode, nameNode: SyntaxNode) => CallForm | undefined;
|
|
80
|
-
export declare const extractReceiverName: (nameNode: SyntaxNode) => string | undefined;
|
|
81
|
-
export declare const isVerboseIngestionEnabled: () => boolean;
|
|
82
|
-
export {};
|