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,21 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Full-Text Search via
|
|
2
|
+
* Full-Text Search via LadybugDB FTS
|
|
3
3
|
*
|
|
4
|
-
* Uses
|
|
4
|
+
* Uses LadybugDB's built-in full-text search indexes for keyword-based search.
|
|
5
5
|
* Always reads from the database (no cached state to drift).
|
|
6
6
|
*/
|
|
7
|
-
import { queryFTS } from '../
|
|
7
|
+
import { queryFTS } from '../lbug/lbug-adapter.js';
|
|
8
8
|
/**
|
|
9
9
|
* Execute a single FTS query via a custom executor (for MCP connection pool).
|
|
10
|
-
* Returns the same shape as core queryFTS.
|
|
10
|
+
* Returns the same shape as core queryFTS (from LadybugDB adapter).
|
|
11
11
|
*/
|
|
12
12
|
async function queryFTSViaExecutor(executor, tableName, indexName, query, limit) {
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
// Escape single quotes and backslashes to prevent Cypher injection
|
|
14
|
+
const escapedQuery = query.replace(/\\/g, '\\\\').replace(/'/g, "''");
|
|
15
|
+
const cypher = `
|
|
16
|
+
CALL QUERY_FTS_INDEX('${tableName}', '${indexName}', '${escapedQuery}', conjunctive := false)
|
|
17
|
+
RETURN node, score
|
|
18
|
+
ORDER BY score DESC
|
|
19
|
+
LIMIT ${limit}
|
|
19
20
|
`;
|
|
20
21
|
try {
|
|
21
22
|
const rows = await executor(cypher);
|
|
@@ -33,7 +34,7 @@ async function queryFTSViaExecutor(executor, tableName, indexName, query, limit)
|
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
36
|
-
* Search using
|
|
37
|
+
* Search using LadybugDB's built-in FTS (always fresh, reads from disk)
|
|
37
38
|
*
|
|
38
39
|
* Queries multiple node tables (File, Function, Class, Method) in parallel
|
|
39
40
|
* and merges results by filePath, summing scores for the same file.
|
|
@@ -43,13 +44,13 @@ async function queryFTSViaExecutor(executor, tableName, indexName, query, limit)
|
|
|
43
44
|
* @param repoId - If provided, queries will be routed via the MCP connection pool
|
|
44
45
|
* @returns Ranked search results from FTS indexes
|
|
45
46
|
*/
|
|
46
|
-
export const
|
|
47
|
+
export const searchFTSFromLbug = async (query, limit = 20, repoId) => {
|
|
47
48
|
let fileResults, functionResults, classResults, methodResults, interfaceResults;
|
|
48
49
|
if (repoId) {
|
|
49
50
|
// Use MCP connection pool via dynamic import
|
|
50
|
-
// IMPORTANT:
|
|
51
|
-
//
|
|
52
|
-
const { executeQuery } = await import('../../mcp/core/
|
|
51
|
+
// IMPORTANT: FTS queries run sequentially to avoid connection contention.
|
|
52
|
+
// The MCP pool supports multiple connections, but FTS is best run serially.
|
|
53
|
+
const { executeQuery } = await import('../../mcp/core/lbug-adapter.js');
|
|
53
54
|
const executor = (cypher) => executeQuery(repoId, cypher);
|
|
54
55
|
fileResults = await queryFTSViaExecutor(executor, 'File', 'file_fts', query, limit);
|
|
55
56
|
functionResults = await queryFTSViaExecutor(executor, 'Function', 'function_fts', query, limit);
|
|
@@ -58,7 +59,7 @@ export const searchFTSFromKuzu = async (query, limit = 20, repoId) => {
|
|
|
58
59
|
interfaceResults = await queryFTSViaExecutor(executor, 'Interface', 'interface_fts', query, limit);
|
|
59
60
|
}
|
|
60
61
|
else {
|
|
61
|
-
// Use core
|
|
62
|
+
// Use core lbug adapter (CLI / pipeline context) — also sequential for safety
|
|
62
63
|
fileResults = await queryFTS('File', 'file_fts', query, limit, false).catch(() => []);
|
|
63
64
|
functionResults = await queryFTS('Function', 'function_fts', query, limit, false).catch(() => []);
|
|
64
65
|
classResults = await queryFTS('Class', 'class_fts', query, limit, false).catch(() => []);
|
|
@@ -33,7 +33,7 @@ export interface HybridSearchResult {
|
|
|
33
33
|
export declare const mergeWithRRF: (bm25Results: BM25SearchResult[], semanticResults: SemanticSearchResult[], limit?: number) => HybridSearchResult[];
|
|
34
34
|
/**
|
|
35
35
|
* Check if hybrid search is available
|
|
36
|
-
*
|
|
36
|
+
* LadybugDB FTS is always available once the database is initialized.
|
|
37
37
|
* Semantic search is optional - hybrid works with just FTS if embeddings aren't ready.
|
|
38
38
|
*/
|
|
39
39
|
export declare const isHybridSearchReady: () => boolean;
|
|
@@ -43,7 +43,7 @@ export declare const isHybridSearchReady: () => boolean;
|
|
|
43
43
|
export declare const formatHybridResults: (results: HybridSearchResult[]) => string;
|
|
44
44
|
/**
|
|
45
45
|
* Execute BM25 + semantic search and merge with RRF.
|
|
46
|
-
* Uses
|
|
46
|
+
* Uses LadybugDB FTS for always-fresh BM25 results (no cached data).
|
|
47
47
|
* The semanticSearch function is injected to keep this module environment-agnostic.
|
|
48
48
|
*/
|
|
49
49
|
export declare const hybridSearch: (query: string, limit: number, executeQuery: (cypher: string) => Promise<any[]>, semanticSearch: (executeQuery: (cypher: string) => Promise<any[]>, query: string, k?: number) => Promise<SemanticSearchResult[]>) => Promise<HybridSearchResult[]>;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* This is the same approach used by Elasticsearch, Pinecone, and other
|
|
8
8
|
* production search systems.
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
10
|
+
import { searchFTSFromLbug } from './bm25-index.js';
|
|
11
11
|
/**
|
|
12
12
|
* RRF constant - standard value used in the literature
|
|
13
13
|
* Higher values give more weight to lower-ranked results
|
|
@@ -80,11 +80,11 @@ export const mergeWithRRF = (bm25Results, semanticResults, limit = 10) => {
|
|
|
80
80
|
};
|
|
81
81
|
/**
|
|
82
82
|
* Check if hybrid search is available
|
|
83
|
-
*
|
|
83
|
+
* LadybugDB FTS is always available once the database is initialized.
|
|
84
84
|
* Semantic search is optional - hybrid works with just FTS if embeddings aren't ready.
|
|
85
85
|
*/
|
|
86
86
|
export const isHybridSearchReady = () => {
|
|
87
|
-
return true; // FTS is always available via
|
|
87
|
+
return true; // FTS is always available via LadybugDB when DB is open
|
|
88
88
|
};
|
|
89
89
|
/**
|
|
90
90
|
* Format hybrid results for LLM consumption
|
|
@@ -98,21 +98,21 @@ export const formatHybridResults = (results) => {
|
|
|
98
98
|
const location = r.startLine ? ` (lines ${r.startLine}-${r.endLine})` : '';
|
|
99
99
|
const label = r.label ? `${r.label}: ` : 'File: ';
|
|
100
100
|
const name = r.name || r.filePath.split('/').pop() || r.filePath;
|
|
101
|
-
return `[${i + 1}] ${label}${name}
|
|
102
|
-
File: ${r.filePath}${location}
|
|
103
|
-
Found by: ${sources}
|
|
101
|
+
return `[${i + 1}] ${label}${name}
|
|
102
|
+
File: ${r.filePath}${location}
|
|
103
|
+
Found by: ${sources}
|
|
104
104
|
Relevance: ${r.score.toFixed(4)}`;
|
|
105
105
|
});
|
|
106
106
|
return `Found ${results.length} results:\n\n${formatted.join('\n\n')}`;
|
|
107
107
|
};
|
|
108
108
|
/**
|
|
109
109
|
* Execute BM25 + semantic search and merge with RRF.
|
|
110
|
-
* Uses
|
|
110
|
+
* Uses LadybugDB FTS for always-fresh BM25 results (no cached data).
|
|
111
111
|
* The semanticSearch function is injected to keep this module environment-agnostic.
|
|
112
112
|
*/
|
|
113
113
|
export const hybridSearch = async (query, limit, executeQuery, semanticSearch) => {
|
|
114
|
-
// Use
|
|
115
|
-
const bm25Results = await
|
|
114
|
+
// Use LadybugDB FTS for always-fresh BM25 results
|
|
115
|
+
const bm25Results = await searchFTSFromLbug(query, limit);
|
|
116
116
|
const semanticResults = await semanticSearch(executeQuery, query, limit);
|
|
117
117
|
return mergeWithRRF(bm25Results, semanticResults, limit);
|
|
118
118
|
};
|
|
@@ -8,8 +8,8 @@ import CPP from 'tree-sitter-cpp';
|
|
|
8
8
|
import CSharp from 'tree-sitter-c-sharp';
|
|
9
9
|
import Go from 'tree-sitter-go';
|
|
10
10
|
import Rust from 'tree-sitter-rust';
|
|
11
|
-
import Kotlin from 'tree-sitter-kotlin';
|
|
12
11
|
import PHP from 'tree-sitter-php';
|
|
12
|
+
import Ruby from 'tree-sitter-ruby';
|
|
13
13
|
import { createRequire } from 'node:module';
|
|
14
14
|
import { SupportedLanguages } from '../../config/supported-languages.js';
|
|
15
15
|
// tree-sitter-swift is an optionalDependency — may not be installed
|
|
@@ -19,6 +19,12 @@ try {
|
|
|
19
19
|
Swift = _require('tree-sitter-swift');
|
|
20
20
|
}
|
|
21
21
|
catch { }
|
|
22
|
+
// tree-sitter-kotlin is an optionalDependency — may not be installed
|
|
23
|
+
let Kotlin = null;
|
|
24
|
+
try {
|
|
25
|
+
Kotlin = _require('tree-sitter-kotlin');
|
|
26
|
+
}
|
|
27
|
+
catch { }
|
|
22
28
|
let parser = null;
|
|
23
29
|
const languageMap = {
|
|
24
30
|
[SupportedLanguages.JavaScript]: JavaScript,
|
|
@@ -31,8 +37,9 @@ const languageMap = {
|
|
|
31
37
|
[SupportedLanguages.CSharp]: CSharp,
|
|
32
38
|
[SupportedLanguages.Go]: Go,
|
|
33
39
|
[SupportedLanguages.Rust]: Rust,
|
|
34
|
-
[SupportedLanguages.Kotlin]: Kotlin,
|
|
40
|
+
...(Kotlin ? { [SupportedLanguages.Kotlin]: Kotlin } : {}),
|
|
35
41
|
[SupportedLanguages.PHP]: PHP.php_only,
|
|
42
|
+
[SupportedLanguages.Ruby]: Ruby,
|
|
36
43
|
...(Swift ? { [SupportedLanguages.Swift]: Swift } : {}),
|
|
37
44
|
};
|
|
38
45
|
export const isLanguageAvailable = (language) => language in languageMap;
|
|
@@ -17,8 +17,6 @@ export interface WikiOptions {
|
|
|
17
17
|
apiKey?: string;
|
|
18
18
|
maxTokensPerModule?: number;
|
|
19
19
|
concurrency?: number;
|
|
20
|
-
/** Human-readable repo name (e.g. "owner/repo") for the overview title. Falls back to directory basename. */
|
|
21
|
-
repoName?: string;
|
|
22
20
|
}
|
|
23
21
|
export interface WikiMeta {
|
|
24
22
|
fromCommit: string;
|
|
@@ -38,15 +36,14 @@ export declare class WikiGenerator {
|
|
|
38
36
|
private repoPath;
|
|
39
37
|
private storagePath;
|
|
40
38
|
private wikiDir;
|
|
41
|
-
private
|
|
39
|
+
private lbugPath;
|
|
42
40
|
private llmConfig;
|
|
43
41
|
private maxTokensPerModule;
|
|
44
42
|
private concurrency;
|
|
45
43
|
private options;
|
|
46
44
|
private onProgress;
|
|
47
45
|
private failedModules;
|
|
48
|
-
|
|
49
|
-
constructor(repoPath: string, storagePath: string, kuzuPath: string, llmConfig: LLMConfig, options?: WikiOptions, onProgress?: ProgressCallback);
|
|
46
|
+
constructor(repoPath: string, storagePath: string, lbugPath: string, llmConfig: LLMConfig, options?: WikiOptions, onProgress?: ProgressCallback);
|
|
50
47
|
private lastPercent;
|
|
51
48
|
/**
|
|
52
49
|
* Create streaming options that report LLM progress to the progress bar.
|
|
@@ -69,33 +66,13 @@ export declare class WikiGenerator {
|
|
|
69
66
|
*/
|
|
70
67
|
private parseGroupingResponse;
|
|
71
68
|
/**
|
|
72
|
-
* Fallback grouping
|
|
73
|
-
* otherwise groups by top-level directory.
|
|
69
|
+
* Fallback grouping by top-level directory when LLM parsing fails.
|
|
74
70
|
*/
|
|
75
71
|
private fallbackGrouping;
|
|
76
72
|
/**
|
|
77
73
|
* Split a large module into sub-modules by subdirectory.
|
|
78
74
|
*/
|
|
79
75
|
private splitBySubdirectory;
|
|
80
|
-
/**
|
|
81
|
-
* Split a large module into sub-modules using community data.
|
|
82
|
-
* Falls back to subdirectory splitting if community data doesn't help.
|
|
83
|
-
*/
|
|
84
|
-
private splitByCommunity;
|
|
85
|
-
/**
|
|
86
|
-
* Build a registry mapping module slugs to their names and exported symbols.
|
|
87
|
-
*/
|
|
88
|
-
private buildModuleRegistry;
|
|
89
|
-
/**
|
|
90
|
-
* Validate and fix cross-reference links in generated markdown.
|
|
91
|
-
* Rewrites invalid slug references using fuzzy matching.
|
|
92
|
-
*/
|
|
93
|
-
private validateAndFixCrossReferences;
|
|
94
|
-
/**
|
|
95
|
-
* Extract the overview summary from a generated page.
|
|
96
|
-
* Uses structured markers when available, falls back to heuristics.
|
|
97
|
-
*/
|
|
98
|
-
private extractSummary;
|
|
99
76
|
/**
|
|
100
77
|
* Generate a leaf module page from source code + graph data.
|
|
101
78
|
*/
|
|
@@ -106,31 +83,8 @@ export declare class WikiGenerator {
|
|
|
106
83
|
private generateParentPage;
|
|
107
84
|
private generateOverview;
|
|
108
85
|
private incrementalUpdate;
|
|
109
|
-
/**
|
|
110
|
-
* Purge deleted files from module metadata and tree.
|
|
111
|
-
* Removes orphaned modules that lost all files.
|
|
112
|
-
*/
|
|
113
|
-
private purgeDeletedFiles;
|
|
114
|
-
/**
|
|
115
|
-
* Assign new files to existing modules using call-graph neighbor analysis.
|
|
116
|
-
* Falls back to "Other" if no neighbors found.
|
|
117
|
-
*/
|
|
118
|
-
private assignNewFilesToModules;
|
|
119
|
-
/**
|
|
120
|
-
* Sync new file assignments into both moduleFiles and moduleTree.
|
|
121
|
-
*/
|
|
122
|
-
private syncNewFilesToTree;
|
|
123
86
|
private getCurrentCommit;
|
|
124
|
-
|
|
125
|
-
* Parse git diff --name-status output into structured entries.
|
|
126
|
-
*/
|
|
127
|
-
private parseNameStatusOutput;
|
|
128
|
-
/**
|
|
129
|
-
* Get changed files with their status (Added, Modified, Deleted).
|
|
130
|
-
* Handles renames as Delete + Add.
|
|
131
|
-
* Detects shallow clones and attempts to unshallow if needed.
|
|
132
|
-
*/
|
|
133
|
-
private getChangedFilesWithStatus;
|
|
87
|
+
private getChangedFiles;
|
|
134
88
|
private readSourceFiles;
|
|
135
89
|
private truncateSource;
|
|
136
90
|
private estimateModuleTokens;
|
|
@@ -148,8 +102,6 @@ export declare class WikiGenerator {
|
|
|
148
102
|
*/
|
|
149
103
|
private runParallel;
|
|
150
104
|
private findNodeBySlug;
|
|
151
|
-
/** Set of all slugs assigned so far — used to prevent collisions. */
|
|
152
|
-
private assignedSlugs;
|
|
153
105
|
private slugify;
|
|
154
106
|
private fileExists;
|
|
155
107
|
private loadWikiMeta;
|