gitnexus 1.5.1 → 1.5.3
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/cli/wiki.js +15 -44
- package/dist/config/supported-languages.d.ts +1 -1
- package/dist/config/supported-languages.js +1 -1
- package/dist/core/graph/types.d.ts +2 -2
- package/dist/core/ingestion/call-processor.js +1 -1
- package/dist/core/ingestion/cobol-processor.js +1 -1
- package/dist/core/ingestion/entry-point-scoring.d.ts +1 -1
- package/dist/core/ingestion/entry-point-scoring.js +1 -1
- package/dist/core/ingestion/field-extractor.d.ts +1 -1
- package/dist/core/ingestion/field-extractors/configs/c-cpp.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/csharp.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/dart.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/go.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/helpers.d.ts +5 -1
- package/dist/core/ingestion/field-extractors/configs/helpers.js +13 -3
- package/dist/core/ingestion/field-extractors/configs/jvm.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/php.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/python.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/ruby.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/rust.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/swift.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/typescript-javascript.js +1 -1
- package/dist/core/ingestion/field-extractors/generic.d.ts +1 -1
- package/dist/core/ingestion/field-extractors/typescript.d.ts +1 -1
- package/dist/core/ingestion/field-extractors/typescript.js +1 -1
- package/dist/core/ingestion/field-types.d.ts +1 -1
- package/dist/core/ingestion/framework-detection.d.ts +1 -1
- package/dist/core/ingestion/framework-detection.js +1 -1
- package/dist/core/ingestion/heritage-processor.d.ts +1 -1
- package/dist/core/ingestion/heritage-processor.js +1 -1
- package/dist/core/ingestion/import-processor.js +1 -1
- package/dist/core/ingestion/import-resolvers/csharp.js +1 -1
- package/dist/core/ingestion/import-resolvers/dart.js +1 -1
- package/dist/core/ingestion/import-resolvers/go.js +1 -1
- package/dist/core/ingestion/import-resolvers/jvm.js +1 -1
- package/dist/core/ingestion/import-resolvers/python.js +1 -1
- package/dist/core/ingestion/import-resolvers/rust.js +1 -1
- package/dist/core/ingestion/import-resolvers/standard.d.ts +1 -1
- package/dist/core/ingestion/import-resolvers/standard.js +1 -1
- package/dist/core/ingestion/language-provider.d.ts +2 -2
- package/dist/core/ingestion/languages/c-cpp.js +1 -1
- package/dist/core/ingestion/languages/cobol.js +1 -1
- package/dist/core/ingestion/languages/csharp.js +1 -1
- package/dist/core/ingestion/languages/dart.js +1 -1
- package/dist/core/ingestion/languages/go.js +1 -1
- package/dist/core/ingestion/languages/index.d.ts +1 -1
- package/dist/core/ingestion/languages/index.js +1 -1
- package/dist/core/ingestion/languages/java.js +1 -1
- package/dist/core/ingestion/languages/kotlin.js +1 -1
- package/dist/core/ingestion/languages/php.js +1 -1
- package/dist/core/ingestion/languages/python.js +1 -1
- package/dist/core/ingestion/languages/ruby.js +1 -1
- package/dist/core/ingestion/languages/rust.js +1 -1
- package/dist/core/ingestion/languages/swift.js +1 -1
- package/dist/core/ingestion/languages/typescript.js +5 -1
- package/dist/core/ingestion/method-extractors/configs/csharp.js +1 -1
- package/dist/core/ingestion/method-extractors/configs/jvm.js +1 -1
- package/dist/core/ingestion/method-extractors/configs/typescript-javascript.d.ts +3 -0
- package/dist/core/ingestion/method-extractors/configs/typescript-javascript.js +261 -0
- package/dist/core/ingestion/method-types.d.ts +1 -1
- package/dist/core/ingestion/mro-processor.d.ts +1 -1
- package/dist/core/ingestion/parsing-processor.js +1 -1
- package/dist/core/ingestion/pipeline.d.ts +1 -1
- package/dist/core/ingestion/pipeline.js +1 -1
- package/dist/core/ingestion/process-processor.js +1 -1
- package/dist/core/ingestion/symbol-table.d.ts +1 -1
- package/dist/core/ingestion/tree-sitter-queries.d.ts +3 -3
- package/dist/core/ingestion/tree-sitter-queries.js +17 -1
- package/dist/core/ingestion/type-env.d.ts +2 -2
- package/dist/core/ingestion/utils/ast-helpers.d.ts +1 -1
- package/dist/core/ingestion/utils/ast-helpers.js +7 -0
- package/dist/core/ingestion/workers/parse-worker.d.ts +2 -2
- package/dist/core/ingestion/workers/parse-worker.js +2 -2
- package/dist/core/lbug/schema.d.ts +2 -2
- package/dist/core/lbug/schema.js +1 -1
- package/dist/core/tree-sitter/parser-loader.d.ts +1 -1
- package/dist/core/tree-sitter/parser-loader.js +1 -1
- package/dist/core/wiki/html-viewer.js +6 -4
- package/dist/core/wiki/llm-client.js +4 -6
- package/dist/server/api.js +1 -1
- package/package.json +3 -3
- package/scripts/build.js +4 -0
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* This allows LLMs to write natural Cypher queries like:
|
|
9
9
|
* MATCH (f:Function)-[r:CodeRelation {type: 'CALLS'}]->(g:Function) RETURN f, g
|
|
10
10
|
*/
|
|
11
|
-
import { NODE_TABLES, REL_TABLE_NAME, REL_TYPES, EMBEDDING_TABLE_NAME } from '
|
|
11
|
+
import { NODE_TABLES, REL_TABLE_NAME, REL_TYPES, EMBEDDING_TABLE_NAME } from '../../_shared/index.js';
|
|
12
12
|
export { NODE_TABLES, REL_TABLE_NAME, REL_TYPES, EMBEDDING_TABLE_NAME };
|
|
13
|
-
export type { NodeTableName, RelType } from '
|
|
13
|
+
export type { NodeTableName, RelType } from '../../_shared/index.js';
|
|
14
14
|
export declare const FILE_SCHEMA = "\nCREATE NODE TABLE File (\n id STRING,\n name STRING,\n filePath STRING,\n content STRING,\n PRIMARY KEY (id)\n)";
|
|
15
15
|
export declare const FOLDER_SCHEMA = "\nCREATE NODE TABLE Folder (\n id STRING,\n name STRING,\n filePath STRING,\n PRIMARY KEY (id)\n)";
|
|
16
16
|
export declare const FUNCTION_SCHEMA = "\nCREATE NODE TABLE Function (\n id STRING,\n name STRING,\n filePath STRING,\n startLine INT64,\n endLine INT64,\n isExported BOOLEAN,\n content STRING,\n description STRING,\n PRIMARY KEY (id)\n)";
|
package/dist/core/lbug/schema.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* MATCH (f:Function)-[r:CodeRelation {type: 'CALLS'}]->(g:Function) RETURN f, g
|
|
10
10
|
*/
|
|
11
11
|
// Import from shared package (single source of truth) — used in DDL templates below
|
|
12
|
-
import { NODE_TABLES, REL_TABLE_NAME, REL_TYPES, EMBEDDING_TABLE_NAME } from '
|
|
12
|
+
import { NODE_TABLES, REL_TABLE_NAME, REL_TYPES, EMBEDDING_TABLE_NAME } from '../../_shared/index.js';
|
|
13
13
|
// Re-export so downstream consumers keep the same import path
|
|
14
14
|
export { NODE_TABLES, REL_TABLE_NAME, REL_TYPES, EMBEDDING_TABLE_NAME };
|
|
15
15
|
// ============================================================================
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Parser from 'tree-sitter';
|
|
2
|
-
import { SupportedLanguages } from '
|
|
2
|
+
import { SupportedLanguages } from '../../_shared/index.js';
|
|
3
3
|
export declare const isLanguageAvailable: (language: SupportedLanguages) => boolean;
|
|
4
4
|
export declare const loadParser: () => Promise<Parser>;
|
|
5
5
|
export declare const loadLanguage: (language: SupportedLanguages, filePath?: string) => Promise<void>;
|
|
@@ -11,7 +11,7 @@ import Rust from 'tree-sitter-rust';
|
|
|
11
11
|
import PHP from 'tree-sitter-php';
|
|
12
12
|
import Ruby from 'tree-sitter-ruby';
|
|
13
13
|
import { createRequire } from 'node:module';
|
|
14
|
-
import { SupportedLanguages } from '
|
|
14
|
+
import { SupportedLanguages } from '../../_shared/index.js';
|
|
15
15
|
// tree-sitter-swift and tree-sitter-dart are optionalDependencies — may not be installed
|
|
16
16
|
const _require = createRequire(import.meta.url);
|
|
17
17
|
let Swift = null;
|
|
@@ -49,10 +49,12 @@ function esc(text) {
|
|
|
49
49
|
.replace(/"/g, '"');
|
|
50
50
|
}
|
|
51
51
|
function buildHTML(projectName, moduleTree, pages, meta) {
|
|
52
|
-
// Embed data as JSON inside the HTML
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
const
|
|
52
|
+
// Embed data as JSON inside the HTML.
|
|
53
|
+
// Escape </script> sequences so they don't prematurely close the <script> tag.
|
|
54
|
+
const escScript = (s) => s.replace(/<\//g, '<\\/');
|
|
55
|
+
const pagesJSON = escScript(JSON.stringify(pages));
|
|
56
|
+
const treeJSON = escScript(JSON.stringify(moduleTree));
|
|
57
|
+
const metaJSON = escScript(JSON.stringify(meta));
|
|
56
58
|
const parts = [];
|
|
57
59
|
// ── Head ──
|
|
58
60
|
parts.push('<!DOCTYPE html>');
|
|
@@ -103,12 +103,10 @@ export async function callLLM(prompt, config, systemPrompt, options) {
|
|
|
103
103
|
model: config.model,
|
|
104
104
|
messages,
|
|
105
105
|
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
else {
|
|
111
|
-
body.max_tokens = config.maxTokens;
|
|
106
|
+
// max_tokens is deprecated; use max_completion_tokens for all models
|
|
107
|
+
body.max_completion_tokens = config.maxTokens;
|
|
108
|
+
// Only send temperature for non-Azure providers — some Azure models reject non-default values
|
|
109
|
+
if (!reasoning && !azure && config.temperature !== undefined) {
|
|
112
110
|
body.temperature = config.temperature;
|
|
113
111
|
}
|
|
114
112
|
if (useStream)
|
package/dist/server/api.js
CHANGED
|
@@ -15,7 +15,7 @@ import { createRequire } from 'node:module';
|
|
|
15
15
|
import { loadMeta, listRegisteredRepos, getStoragePath } from '../storage/repo-manager.js';
|
|
16
16
|
import { executeQuery, executePrepared, executeWithReusedStatement, closeLbug, withLbugDb, } from '../core/lbug/lbug-adapter.js';
|
|
17
17
|
import { isWriteQuery } from '../mcp/core/lbug-adapter.js';
|
|
18
|
-
import { NODE_TABLES } from '
|
|
18
|
+
import { NODE_TABLES } from '../_shared/index.js';
|
|
19
19
|
import { searchFTSFromLbug } from '../core/search/bm25-index.js';
|
|
20
20
|
import { hybridSearch } from '../core/search/hybrid-search.js';
|
|
21
21
|
// Embedding imports are lazy (dynamic import) to avoid loading onnxruntime-node
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gitnexus",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
|
|
5
5
|
"author": "Abhigyan Patwari",
|
|
6
6
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"test:integration": "vitest run test/integration",
|
|
47
47
|
"test:watch": "vitest",
|
|
48
48
|
"test:coverage": "vitest run --coverage",
|
|
49
|
-
"prepare": "
|
|
50
|
-
"prepack": "
|
|
49
|
+
"prepare": "node scripts/build.js",
|
|
50
|
+
"prepack": "node scripts/build.js"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@huggingface/transformers": "^3.0.0",
|
package/scripts/build.js
CHANGED
|
@@ -66,4 +66,8 @@ function walk(dir, extensions, cb) {
|
|
|
66
66
|
|
|
67
67
|
walk(DIST, ['.js', '.d.ts'], rewriteFile);
|
|
68
68
|
|
|
69
|
+
// ── 5. Make CLI entry executable ────────────────────────────────────
|
|
70
|
+
const cliEntry = path.join(DIST, 'cli', 'index.js');
|
|
71
|
+
if (fs.existsSync(cliEntry)) fs.chmodSync(cliEntry, 0o755);
|
|
72
|
+
|
|
69
73
|
console.log(`[build] done — rewrote ${rewritten} files.`);
|