@veewo/gitnexus 1.4.9 → 1.4.11-rc
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/benchmark/u2-e2e/live-evidence-validator.d.ts +19 -0
- package/dist/benchmark/u2-e2e/live-evidence-validator.js +87 -0
- package/dist/benchmark/u2-e2e/live-evidence-validator.test.d.ts +1 -0
- package/dist/benchmark/u2-e2e/live-evidence-validator.test.js +33 -0
- package/dist/benchmark/u2-e2e/neonspark-full-e2e.js +23 -4
- package/dist/benchmark/u2-e2e/reload-v1-acceptance-runner.d.ts +38 -0
- package/dist/benchmark/u2-e2e/reload-v1-acceptance-runner.js +206 -0
- package/dist/benchmark/u2-e2e/reload-v1-acceptance-runner.test.d.ts +1 -0
- package/dist/benchmark/u2-e2e/reload-v1-acceptance-runner.test.js +72 -0
- package/dist/benchmark/u2-e2e/report.d.ts +1 -0
- package/dist/benchmark/u2-e2e/report.js +2 -0
- package/dist/benchmark/u2-e2e/retrieval-runner.d.ts +34 -0
- package/dist/benchmark/u2-e2e/retrieval-runner.js +95 -5
- package/dist/benchmark/u2-e2e/retrieval-runner.test.js +161 -2
- package/dist/cli/ai-context.js +32 -1
- package/dist/cli/ai-context.test.js +10 -0
- package/dist/cli/analyze-summary.d.ts +1 -0
- package/dist/cli/analyze-summary.js +21 -0
- package/dist/cli/analyze-summary.test.js +7 -1
- package/dist/cli/analyze.js +3 -10
- package/dist/cli/eval-server.js +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/setup.js +9 -0
- package/dist/cli/setup.test.js +2 -0
- package/dist/cli/tool.d.ts +2 -0
- package/dist/cli/tool.js +2 -0
- package/dist/core/ingestion/pipeline.js +24 -3
- package/dist/core/ingestion/process-processor.d.ts +6 -0
- package/dist/core/ingestion/process-processor.js +188 -7
- package/dist/core/ingestion/unity-lifecycle-config.d.ts +5 -0
- package/dist/core/ingestion/unity-lifecycle-config.js +25 -0
- package/dist/core/ingestion/unity-lifecycle-synthetic-calls.d.ts +26 -0
- package/dist/core/ingestion/unity-lifecycle-synthetic-calls.js +384 -0
- package/dist/core/ingestion/unity-lifecycle-synthetic-calls.test.d.ts +1 -0
- package/dist/core/ingestion/unity-lifecycle-synthetic-calls.test.js +541 -0
- package/dist/core/ingestion/unity-resource-processor.test.js +81 -0
- package/dist/core/lbug/csv-generator.js +11 -1
- package/dist/core/lbug/fallback-relationship-replay.d.ts +21 -0
- package/dist/core/lbug/fallback-relationship-replay.js +39 -0
- package/dist/core/lbug/fallback-relationship-replay.test.d.ts +1 -0
- package/dist/core/lbug/fallback-relationship-replay.test.js +25 -0
- package/dist/core/lbug/lbug-adapter.d.ts +5 -0
- package/dist/core/lbug/lbug-adapter.js +22 -23
- package/dist/core/lbug/schema.d.ts +2 -2
- package/dist/core/lbug/schema.js +9 -0
- package/dist/core/lbug/schema.test.js +1 -0
- package/dist/mcp/local/local-backend.d.ts +1 -1
- package/dist/mcp/local/local-backend.js +339 -50
- package/dist/mcp/local/local-backend.unity-merge.test.js +1 -1
- package/dist/mcp/local/process-confidence.d.ts +19 -0
- package/dist/mcp/local/process-confidence.js +29 -0
- package/dist/mcp/local/process-confidence.test.d.ts +1 -0
- package/dist/mcp/local/process-confidence.test.js +36 -0
- package/dist/mcp/local/process-evidence.d.ts +28 -0
- package/dist/mcp/local/process-evidence.js +65 -0
- package/dist/mcp/local/process-evidence.test.d.ts +1 -0
- package/dist/mcp/local/process-evidence.test.js +56 -0
- package/dist/mcp/local/runtime-chain-evidence.d.ts +7 -0
- package/dist/mcp/local/runtime-chain-evidence.js +13 -0
- package/dist/mcp/local/runtime-chain-evidence.test.d.ts +1 -0
- package/dist/mcp/local/runtime-chain-evidence.test.js +24 -0
- package/dist/mcp/local/runtime-chain-verify.d.ts +37 -0
- package/dist/mcp/local/runtime-chain-verify.js +221 -0
- package/dist/mcp/local/runtime-chain-verify.test.d.ts +1 -0
- package/dist/mcp/local/runtime-chain-verify.test.js +56 -0
- package/dist/mcp/local/unity-process-confidence-config.d.ts +1 -0
- package/dist/mcp/local/unity-process-confidence-config.js +4 -0
- package/dist/mcp/local/unity-runtime-chain-verify-config.d.ts +1 -0
- package/dist/mcp/local/unity-runtime-chain-verify-config.js +10 -0
- package/dist/mcp/local/unity-runtime-hydration.d.ts +50 -0
- package/dist/mcp/local/unity-runtime-hydration.js +323 -0
- package/dist/mcp/local/unity-runtime-hydration.test.d.ts +1 -0
- package/dist/mcp/local/unity-runtime-hydration.test.js +108 -0
- package/dist/mcp/resources.js +12 -2
- package/dist/mcp/tools.js +32 -0
- package/package.json +1 -1
- package/skills/_shared/unity-runtime-process-contract.md +38 -0
- package/skills/gitnexus-cli.md +16 -0
- package/skills/gitnexus-debugging.md +6 -0
- package/skills/gitnexus-exploring.md +6 -0
- package/skills/gitnexus-guide.md +4 -0
- package/skills/gitnexus-impact-analysis.md +6 -0
- package/skills/gitnexus-pr-review.md +5 -0
- package/skills/gitnexus-refactoring.md +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface FallbackInsertStats {
|
|
2
|
+
attempted: number;
|
|
3
|
+
succeeded: number;
|
|
4
|
+
failed: number;
|
|
5
|
+
}
|
|
6
|
+
export interface ReplayFallbackInsert {
|
|
7
|
+
fromId: string;
|
|
8
|
+
toId: string;
|
|
9
|
+
fromLabel: string;
|
|
10
|
+
toLabel: string;
|
|
11
|
+
relType: string;
|
|
12
|
+
confidence: number;
|
|
13
|
+
reason: string;
|
|
14
|
+
step: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ReplayFallbackOptions {
|
|
17
|
+
validTables: Set<string>;
|
|
18
|
+
getNodeLabel: (id: string) => string;
|
|
19
|
+
insertRelationship: (input: ReplayFallbackInsert) => Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
export declare function replayFallbackRelationships(validRelLines: string[], options: ReplayFallbackOptions): Promise<FallbackInsertStats>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const FALLBACK_REL_LINE_RE = /"([^"]*)","([^"]*)","([^"]*)",([0-9.]+),"([^"]*)",([0-9-]+)/;
|
|
2
|
+
export async function replayFallbackRelationships(validRelLines, options) {
|
|
3
|
+
const stats = {
|
|
4
|
+
attempted: 0,
|
|
5
|
+
succeeded: 0,
|
|
6
|
+
failed: 0,
|
|
7
|
+
};
|
|
8
|
+
for (let i = 1; i < validRelLines.length; i++) {
|
|
9
|
+
const line = validRelLines[i];
|
|
10
|
+
const match = line.match(FALLBACK_REL_LINE_RE);
|
|
11
|
+
if (!match) {
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
const [, fromId, toId, relType, confidenceStr, reason, stepStr] = match;
|
|
15
|
+
const fromLabel = options.getNodeLabel(fromId);
|
|
16
|
+
const toLabel = options.getNodeLabel(toId);
|
|
17
|
+
if (!options.validTables.has(fromLabel) || !options.validTables.has(toLabel)) {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
stats.attempted += 1;
|
|
21
|
+
try {
|
|
22
|
+
await options.insertRelationship({
|
|
23
|
+
fromId,
|
|
24
|
+
toId,
|
|
25
|
+
fromLabel,
|
|
26
|
+
toLabel,
|
|
27
|
+
relType,
|
|
28
|
+
confidence: Number.parseFloat(confidenceStr) || 1.0,
|
|
29
|
+
reason,
|
|
30
|
+
step: Number.parseInt(stepStr, 10) || 0,
|
|
31
|
+
});
|
|
32
|
+
stats.succeeded += 1;
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
stats.failed += 1;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return stats;
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { replayFallbackRelationships } from './fallback-relationship-replay.js';
|
|
4
|
+
test('replayFallbackRelationships returns attempted/succeeded/failed for mixed insert outcomes', async () => {
|
|
5
|
+
const validRelLines = [
|
|
6
|
+
'"from","to","type","confidence","reason","step"',
|
|
7
|
+
'"Class:A","File:A","UNITY_RESOURCE_SUMMARY",1,"ok",0',
|
|
8
|
+
'"Class:B","File:B","UNITY_RESOURCE_SUMMARY",1,"ok",0',
|
|
9
|
+
'"Class:C","File:C","UNITY_RESOURCE_SUMMARY",1,"ok",0',
|
|
10
|
+
];
|
|
11
|
+
const stats = await replayFallbackRelationships(validRelLines, {
|
|
12
|
+
validTables: new Set(['Class', 'File']),
|
|
13
|
+
getNodeLabel: (id) => id.split(':')[0] || '',
|
|
14
|
+
insertRelationship: async ({ fromId }) => {
|
|
15
|
+
if (fromId === 'Class:B') {
|
|
16
|
+
throw new Error('simulated insert failure');
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
assert.deepEqual(stats, {
|
|
21
|
+
attempted: 3,
|
|
22
|
+
succeeded: 2,
|
|
23
|
+
failed: 1,
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -16,6 +16,11 @@ export declare const loadGraphToLbug: (graph: KnowledgeGraph, repoPath: string,
|
|
|
16
16
|
insertedRels: number;
|
|
17
17
|
skippedRels: number;
|
|
18
18
|
warnings: string[];
|
|
19
|
+
fallbackInsertStats: {
|
|
20
|
+
attempted: number;
|
|
21
|
+
succeeded: number;
|
|
22
|
+
failed: number;
|
|
23
|
+
};
|
|
19
24
|
}>;
|
|
20
25
|
/**
|
|
21
26
|
* Insert a single node to LadybugDB
|
|
@@ -5,6 +5,7 @@ import path from 'path';
|
|
|
5
5
|
import lbug from '@ladybugdb/core';
|
|
6
6
|
import { NODE_TABLES, REL_TABLE_NAME, SCHEMA_QUERIES, EMBEDDING_TABLE_NAME, } from './schema.js';
|
|
7
7
|
import { streamAllCSVsToDisk } from './csv-generator.js';
|
|
8
|
+
import { replayFallbackRelationships } from './fallback-relationship-replay.js';
|
|
8
9
|
let db = null;
|
|
9
10
|
let conn = null;
|
|
10
11
|
let currentDbPath = null;
|
|
@@ -197,6 +198,11 @@ export const loadGraphToLbug = async (graph, repoPath, storagePath, onProgress)
|
|
|
197
198
|
});
|
|
198
199
|
const insertedRels = totalValidRels;
|
|
199
200
|
const warnings = [];
|
|
201
|
+
let fallbackInsertStats = {
|
|
202
|
+
attempted: 0,
|
|
203
|
+
succeeded: 0,
|
|
204
|
+
failed: 0,
|
|
205
|
+
};
|
|
200
206
|
if (insertedRels > 0) {
|
|
201
207
|
log(`Loading edges: ${insertedRels.toLocaleString()} across ${relsByPair.size} types`);
|
|
202
208
|
let pairIdx = 0;
|
|
@@ -234,7 +240,7 @@ export const loadGraphToLbug = async (graph, repoPath, storagePath, onProgress)
|
|
|
234
240
|
}
|
|
235
241
|
if (failedPairLines.length > 0) {
|
|
236
242
|
log(`Inserting ${failedPairEdges} edges individually (missing schema pairs)`);
|
|
237
|
-
await fallbackRelationshipInserts([relHeader, ...failedPairLines], validTables, getNodeLabel);
|
|
243
|
+
fallbackInsertStats = await fallbackRelationshipInserts([relHeader, ...failedPairLines], validTables, getNodeLabel);
|
|
238
244
|
}
|
|
239
245
|
}
|
|
240
246
|
// Cleanup all CSVs
|
|
@@ -262,7 +268,7 @@ export const loadGraphToLbug = async (graph, repoPath, storagePath, onProgress)
|
|
|
262
268
|
await fs.rmdir(csvDir);
|
|
263
269
|
}
|
|
264
270
|
catch { }
|
|
265
|
-
return { success: true, insertedRels, skippedRels, warnings };
|
|
271
|
+
return { success: true, insertedRels, skippedRels, warnings, fallbackInsertStats };
|
|
266
272
|
};
|
|
267
273
|
// LadybugDB default ESCAPE is '\' (backslash), but our CSV uses RFC 4180 escaping ("" for literal quotes).
|
|
268
274
|
// Source code content is full of backslashes which confuse the auto-detection.
|
|
@@ -281,35 +287,28 @@ const escapeTableName = (table) => {
|
|
|
281
287
|
};
|
|
282
288
|
/** Fallback: insert relationships one-by-one if COPY fails */
|
|
283
289
|
const fallbackRelationshipInserts = async (validRelLines, validTables, getNodeLabel) => {
|
|
284
|
-
if (!conn)
|
|
285
|
-
return
|
|
290
|
+
if (!conn) {
|
|
291
|
+
return {
|
|
292
|
+
attempted: 0,
|
|
293
|
+
succeeded: 0,
|
|
294
|
+
failed: 0,
|
|
295
|
+
};
|
|
296
|
+
}
|
|
286
297
|
const escapeLabel = (label) => {
|
|
287
298
|
return BACKTICK_TABLES.has(label) ? `\`${label}\`` : label;
|
|
288
299
|
};
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
if (!match)
|
|
294
|
-
continue;
|
|
295
|
-
const [, fromId, toId, relType, confidenceStr, reason, stepStr] = match;
|
|
296
|
-
const fromLabel = getNodeLabel(fromId);
|
|
297
|
-
const toLabel = getNodeLabel(toId);
|
|
298
|
-
if (!validTables.has(fromLabel) || !validTables.has(toLabel))
|
|
299
|
-
continue;
|
|
300
|
-
const confidence = parseFloat(confidenceStr) || 1.0;
|
|
301
|
-
const step = parseInt(stepStr) || 0;
|
|
300
|
+
return replayFallbackRelationships(validRelLines, {
|
|
301
|
+
validTables,
|
|
302
|
+
getNodeLabel,
|
|
303
|
+
insertRelationship: async ({ fromId, toId, fromLabel, toLabel, relType, confidence, reason, step }) => {
|
|
302
304
|
const esc = (s) => s.replace(/'/g, "''").replace(/\\/g, '\\\\').replace(/\n/g, '\\n').replace(/\r/g, '\\r');
|
|
303
305
|
await conn.query(`
|
|
304
306
|
MATCH (a:${escapeLabel(fromLabel)} {id: '${esc(fromId)}' }),
|
|
305
307
|
(b:${escapeLabel(toLabel)} {id: '${esc(toId)}' })
|
|
306
308
|
CREATE (a)-[:${REL_TABLE_NAME} {type: '${esc(relType)}', confidence: ${confidence}, reason: '${esc(reason)}', step: ${step}}]->(b)
|
|
307
309
|
`);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// skip
|
|
311
|
-
}
|
|
312
|
-
}
|
|
310
|
+
},
|
|
311
|
+
});
|
|
313
312
|
};
|
|
314
313
|
/** Tables with isExported column (TypeScript/JS-native types) */
|
|
315
314
|
const TABLES_WITH_EXPORTED = new Set(['Function', 'Class', 'Interface', 'Method', 'CodeElement']);
|
|
@@ -325,7 +324,7 @@ const getCopyQuery = (table, filePath) => {
|
|
|
325
324
|
return `COPY ${t}(id, label, heuristicLabel, keywords, description, enrichedBy, cohesion, symbolCount) FROM "${filePath}" ${COPY_CSV_OPTS}`;
|
|
326
325
|
}
|
|
327
326
|
if (table === 'Process') {
|
|
328
|
-
return `COPY ${t}(id, label, heuristicLabel, processType, stepCount, communities, entryPointId, terminalId) FROM "${filePath}" ${COPY_CSV_OPTS}`;
|
|
327
|
+
return `COPY ${t}(id, label, heuristicLabel, processType, processSubtype, runtimeChainConfidence, sourceReasons, sourceConfidences, stepCount, communities, entryPointId, terminalId) FROM "${filePath}" ${COPY_CSV_OPTS}`;
|
|
329
328
|
}
|
|
330
329
|
if (table === 'Method') {
|
|
331
330
|
return `COPY ${t}(id, name, filePath, startLine, endLine, isExported, content, description, parameterCount, returnType) FROM "${filePath}" ${COPY_CSV_OPTS}`;
|
|
@@ -22,7 +22,7 @@ export declare const INTERFACE_SCHEMA = "\nCREATE NODE TABLE Interface (\n id S
|
|
|
22
22
|
export declare const METHOD_SCHEMA = "\nCREATE NODE TABLE Method (\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 parameterCount INT32,\n returnType STRING,\n PRIMARY KEY (id)\n)";
|
|
23
23
|
export declare const CODE_ELEMENT_SCHEMA = "\nCREATE NODE TABLE CodeElement (\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)";
|
|
24
24
|
export declare const COMMUNITY_SCHEMA = "\nCREATE NODE TABLE Community (\n id STRING,\n label STRING,\n heuristicLabel STRING,\n keywords STRING[],\n description STRING,\n enrichedBy STRING,\n cohesion DOUBLE,\n symbolCount INT32,\n PRIMARY KEY (id)\n)";
|
|
25
|
-
export declare const PROCESS_SCHEMA = "\nCREATE NODE TABLE Process (\n id STRING,\n label STRING,\n heuristicLabel STRING,\n processType STRING,\n stepCount INT32,\n communities STRING[],\n entryPointId STRING,\n terminalId STRING,\n PRIMARY KEY (id)\n)";
|
|
25
|
+
export declare const PROCESS_SCHEMA = "\nCREATE NODE TABLE Process (\n id STRING,\n label STRING,\n heuristicLabel STRING,\n processType STRING,\n processSubtype STRING,\n runtimeChainConfidence STRING,\n sourceReasons STRING[],\n sourceConfidences DOUBLE[],\n stepCount INT32,\n communities STRING[],\n entryPointId STRING,\n terminalId STRING,\n PRIMARY KEY (id)\n)";
|
|
26
26
|
export declare const STRUCT_SCHEMA: string;
|
|
27
27
|
export declare const ENUM_SCHEMA: string;
|
|
28
28
|
export declare const MACRO_SCHEMA: string;
|
|
@@ -41,7 +41,7 @@ export declare const ANNOTATION_SCHEMA: string;
|
|
|
41
41
|
export declare const CONSTRUCTOR_SCHEMA: string;
|
|
42
42
|
export declare const TEMPLATE_SCHEMA: string;
|
|
43
43
|
export declare const MODULE_SCHEMA: string;
|
|
44
|
-
export declare const RELATION_SCHEMA = "\nCREATE REL TABLE CodeRelation (\n FROM File TO File,\n FROM File TO Folder,\n FROM File TO Function,\n FROM File TO Class,\n FROM File TO Interface,\n FROM File TO Method,\n FROM File TO CodeElement,\n FROM File TO `Struct`,\n FROM File TO `Enum`,\n FROM File TO `Macro`,\n FROM File TO `Typedef`,\n FROM File TO `Union`,\n FROM File TO `Namespace`,\n FROM File TO `Trait`,\n FROM File TO `Impl`,\n FROM File TO `TypeAlias`,\n FROM File TO `Const`,\n FROM File TO `Static`,\n FROM File TO `Property`,\n FROM File TO `Record`,\n FROM File TO `Delegate`,\n FROM File TO `Annotation`,\n FROM File TO `Constructor`,\n FROM File TO `Template`,\n FROM File TO `Module`,\n FROM Folder TO Folder,\n FROM Folder TO File,\n FROM Function TO Function,\n FROM Function TO Method,\n FROM Function TO Class,\n FROM Function TO Community,\n FROM Function TO `Macro`,\n FROM Function TO `Struct`,\n FROM Function TO `Template`,\n FROM Function TO `Enum`,\n FROM Function TO `Namespace`,\n FROM Function TO `TypeAlias`,\n FROM Function TO `Module`,\n FROM Function TO `Impl`,\n FROM Function TO Interface,\n FROM Function TO `Constructor`,\n FROM Function TO `Const`,\n FROM Function TO `Typedef`,\n FROM Function TO `Union`,\n FROM Function TO `Property`,\n FROM Class TO Method,\n FROM Class TO Function,\n FROM Class TO Class,\n FROM Class TO Interface,\n FROM Class TO Community,\n FROM Class TO `Template`,\n FROM Class TO `TypeAlias`,\n FROM Class TO `Struct`,\n FROM Class TO `Enum`,\n FROM Class TO `Annotation`,\n FROM Class TO `Constructor`,\n FROM Class TO `Trait`,\n FROM Class TO `Macro`,\n FROM Class TO `Impl`,\n FROM Class TO `Union`,\n FROM Class TO `Namespace`,\n FROM Class TO `Typedef`,\n FROM Class TO `Property`,\n FROM Method TO Function,\n FROM Method TO Method,\n FROM Method TO Class,\n FROM Method TO Community,\n FROM Method TO `Template`,\n FROM Method TO `Struct`,\n FROM Method TO `TypeAlias`,\n FROM Method TO `Enum`,\n FROM Method TO `Macro`,\n FROM Method TO `Namespace`,\n FROM Method TO `Module`,\n FROM Method TO `Impl`,\n FROM Method TO Interface,\n FROM Method TO `Constructor`,\n FROM Method TO `Property`,\n FROM `Template` TO `Template`,\n FROM `Template` TO Function,\n FROM `Template` TO Method,\n FROM `Template` TO Class,\n FROM `Template` TO `Struct`,\n FROM `Template` TO `TypeAlias`,\n FROM `Template` TO `Enum`,\n FROM `Template` TO `Macro`,\n FROM `Template` TO Interface,\n FROM `Template` TO `Constructor`,\n FROM `Module` TO `Module`,\n FROM CodeElement TO Community,\n FROM Interface TO Community,\n FROM Interface TO Function,\n FROM Interface TO Method,\n FROM Interface TO Class,\n FROM Interface TO Interface,\n FROM Interface TO `TypeAlias`,\n FROM Interface TO `Struct`,\n FROM Interface TO `Constructor`,\n FROM Interface TO `Property`,\n FROM `Struct` TO Community,\n FROM `Struct` TO `Trait`,\n FROM `Struct` TO `Struct`,\n FROM `Struct` TO Class,\n FROM `Struct` TO `Enum`,\n FROM `Struct` TO Function,\n FROM `Struct` TO Method,\n FROM `Struct` TO Interface,\n FROM `Struct` TO `Constructor`,\n FROM `Struct` TO `Property`,\n FROM `Enum` TO `Enum`,\n FROM `Enum` TO Community,\n FROM `Enum` TO Class,\n FROM `Enum` TO Interface,\n FROM `Macro` TO Community,\n FROM `Macro` TO Function,\n FROM `Macro` TO Method,\n FROM `Module` TO Function,\n FROM `Module` TO Method,\n FROM `Typedef` TO Community,\n FROM `Union` TO Community,\n FROM `Namespace` TO Community,\n FROM `Namespace` TO `Struct`,\n FROM `Trait` TO Method,\n FROM `Trait` TO `Constructor`,\n FROM `Trait` TO `Property`,\n FROM `Trait` TO Community,\n FROM `Impl` TO Method,\n FROM `Impl` TO `Constructor`,\n FROM `Impl` TO `Property`,\n FROM `Impl` TO Community,\n FROM `Impl` TO `Trait`,\n FROM `Impl` TO `Struct`,\n FROM `Impl` TO `Impl`,\n FROM `TypeAlias` TO Community,\n FROM `TypeAlias` TO `Trait`,\n FROM `TypeAlias` TO Class,\n FROM `Const` TO Community,\n FROM `Static` TO Community,\n FROM `Property` TO Community,\n FROM `Record` TO Method,\n FROM `Record` TO `Constructor`,\n FROM `Record` TO `Property`,\n FROM `Record` TO Community,\n FROM `Delegate` TO Community,\n FROM `Annotation` TO Community,\n FROM `Constructor` TO Community,\n FROM `Constructor` TO Interface,\n FROM `Constructor` TO Class,\n FROM `Constructor` TO Method,\n FROM `Constructor` TO Function,\n FROM `Constructor` TO `Constructor`,\n FROM `Constructor` TO `Struct`,\n FROM `Constructor` TO `Macro`,\n FROM `Constructor` TO `Template`,\n FROM `Constructor` TO `TypeAlias`,\n FROM `Constructor` TO `Enum`,\n FROM `Constructor` TO `Annotation`,\n FROM `Constructor` TO `Impl`,\n FROM `Constructor` TO `Namespace`,\n FROM `Constructor` TO `Module`,\n FROM `Constructor` TO `Property`,\n FROM `Constructor` TO `Typedef`,\n FROM `Template` TO Community,\n FROM `Module` TO Community,\n FROM Function TO Process,\n FROM Method TO Process,\n FROM Class TO Process,\n FROM Interface TO Process,\n FROM `Struct` TO Process,\n FROM `Constructor` TO Process,\n FROM `Module` TO Process,\n FROM `Macro` TO Process,\n FROM `Impl` TO Process,\n FROM `Typedef` TO Process,\n FROM `TypeAlias` TO Process,\n FROM `Enum` TO Process,\n FROM `Union` TO Process,\n FROM `Namespace` TO Process,\n FROM `Trait` TO Process,\n FROM `Const` TO Process,\n FROM `Static` TO Process,\n FROM `Property` TO Process,\n FROM `Record` TO Process,\n FROM `Delegate` TO Process,\n FROM `Annotation` TO Process,\n FROM `Template` TO Process,\n FROM CodeElement TO Process,\n type STRING,\n confidence DOUBLE,\n reason STRING,\n step INT32\n)";
|
|
44
|
+
export declare const RELATION_SCHEMA = "\nCREATE REL TABLE CodeRelation (\n FROM File TO File,\n FROM File TO Folder,\n FROM File TO Function,\n FROM File TO Class,\n FROM File TO Interface,\n FROM File TO Method,\n FROM File TO CodeElement,\n FROM File TO `Struct`,\n FROM File TO `Enum`,\n FROM File TO `Macro`,\n FROM File TO `Typedef`,\n FROM File TO `Union`,\n FROM File TO `Namespace`,\n FROM File TO `Trait`,\n FROM File TO `Impl`,\n FROM File TO `TypeAlias`,\n FROM File TO `Const`,\n FROM File TO `Static`,\n FROM File TO `Property`,\n FROM File TO `Record`,\n FROM File TO `Delegate`,\n FROM File TO `Annotation`,\n FROM File TO `Constructor`,\n FROM File TO `Template`,\n FROM File TO `Module`,\n FROM Folder TO Folder,\n FROM Folder TO File,\n FROM Function TO Function,\n FROM Function TO Method,\n FROM Function TO Class,\n FROM Function TO Community,\n FROM Function TO `Macro`,\n FROM Function TO `Struct`,\n FROM Function TO `Template`,\n FROM Function TO `Enum`,\n FROM Function TO `Namespace`,\n FROM Function TO `TypeAlias`,\n FROM Function TO `Module`,\n FROM Function TO `Impl`,\n FROM Function TO Interface,\n FROM Function TO `Constructor`,\n FROM Function TO `Const`,\n FROM Function TO `Typedef`,\n FROM Function TO `Union`,\n FROM Function TO `Property`,\n FROM Class TO Method,\n FROM Class TO Function,\n FROM Class TO File,\n FROM Class TO Class,\n FROM Class TO Interface,\n FROM Class TO Community,\n FROM Class TO `Template`,\n FROM Class TO `TypeAlias`,\n FROM Class TO `Struct`,\n FROM Class TO `Enum`,\n FROM Class TO `Annotation`,\n FROM Class TO `Constructor`,\n FROM Class TO `Trait`,\n FROM Class TO `Macro`,\n FROM Class TO `Impl`,\n FROM Class TO `Union`,\n FROM Class TO `Namespace`,\n FROM Class TO `Typedef`,\n FROM Class TO `Property`,\n FROM Class TO `Delegate`,\n FROM Method TO Function,\n FROM Method TO Method,\n FROM Method TO Class,\n FROM Method TO Community,\n FROM Method TO `Template`,\n FROM Method TO `Struct`,\n FROM Method TO `TypeAlias`,\n FROM Method TO `Enum`,\n FROM Method TO `Macro`,\n FROM Method TO `Namespace`,\n FROM Method TO `Module`,\n FROM Method TO `Impl`,\n FROM Method TO Interface,\n FROM Method TO `Constructor`,\n FROM Method TO `Property`,\n FROM Method TO `Delegate`,\n FROM `Template` TO `Template`,\n FROM `Template` TO Function,\n FROM `Template` TO Method,\n FROM `Template` TO Class,\n FROM `Template` TO `Struct`,\n FROM `Template` TO `TypeAlias`,\n FROM `Template` TO `Enum`,\n FROM `Template` TO `Macro`,\n FROM `Template` TO Interface,\n FROM `Template` TO `Constructor`,\n FROM `Module` TO `Module`,\n FROM CodeElement TO Community,\n FROM Interface TO Community,\n FROM Interface TO Function,\n FROM Interface TO Method,\n FROM Interface TO Class,\n FROM Interface TO Interface,\n FROM Interface TO `TypeAlias`,\n FROM Interface TO `Struct`,\n FROM Interface TO `Constructor`,\n FROM Interface TO `Property`,\n FROM `Struct` TO Community,\n FROM `Struct` TO `Trait`,\n FROM `Struct` TO `Struct`,\n FROM `Struct` TO Class,\n FROM `Struct` TO `Enum`,\n FROM `Struct` TO Function,\n FROM `Struct` TO Method,\n FROM `Struct` TO Interface,\n FROM `Struct` TO `Constructor`,\n FROM `Struct` TO `Property`,\n FROM `Enum` TO `Enum`,\n FROM `Enum` TO Community,\n FROM `Enum` TO Class,\n FROM `Enum` TO Interface,\n FROM `Macro` TO Community,\n FROM `Macro` TO Function,\n FROM `Macro` TO Method,\n FROM `Module` TO Function,\n FROM `Module` TO Method,\n FROM `Typedef` TO Community,\n FROM `Union` TO Community,\n FROM `Namespace` TO Community,\n FROM `Namespace` TO `Struct`,\n FROM `Trait` TO Method,\n FROM `Trait` TO `Constructor`,\n FROM `Trait` TO `Property`,\n FROM `Trait` TO Community,\n FROM `Impl` TO Method,\n FROM `Impl` TO `Constructor`,\n FROM `Impl` TO `Property`,\n FROM `Impl` TO Community,\n FROM `Impl` TO `Trait`,\n FROM `Impl` TO `Struct`,\n FROM `Impl` TO `Impl`,\n FROM `TypeAlias` TO Community,\n FROM `TypeAlias` TO `Trait`,\n FROM `TypeAlias` TO Class,\n FROM `Const` TO Community,\n FROM `Static` TO Community,\n FROM `Property` TO Community,\n FROM `Property` TO Class,\n FROM `Property` TO Interface,\n FROM `Record` TO Method,\n FROM `Record` TO `Constructor`,\n FROM `Record` TO `Property`,\n FROM `Record` TO Community,\n FROM `Delegate` TO Community,\n FROM `Annotation` TO Community,\n FROM `Constructor` TO Community,\n FROM `Constructor` TO Interface,\n FROM `Constructor` TO Class,\n FROM `Constructor` TO Method,\n FROM `Constructor` TO Function,\n FROM `Constructor` TO `Constructor`,\n FROM `Constructor` TO `Struct`,\n FROM `Constructor` TO `Macro`,\n FROM `Constructor` TO `Template`,\n FROM `Constructor` TO `TypeAlias`,\n FROM `Constructor` TO `Enum`,\n FROM `Constructor` TO `Annotation`,\n FROM `Constructor` TO `Impl`,\n FROM `Constructor` TO `Namespace`,\n FROM `Constructor` TO `Module`,\n FROM `Constructor` TO `Property`,\n FROM `Constructor` TO `Typedef`,\n FROM `Template` TO Community,\n FROM `Module` TO Community,\n FROM Function TO Process,\n FROM Method TO Process,\n FROM Class TO Process,\n FROM Interface TO Process,\n FROM `Struct` TO Process,\n FROM `Constructor` TO Process,\n FROM `Module` TO Process,\n FROM `Macro` TO Process,\n FROM `Impl` TO Process,\n FROM `Typedef` TO Process,\n FROM `TypeAlias` TO Process,\n FROM `Enum` TO Process,\n FROM `Union` TO Process,\n FROM `Namespace` TO Process,\n FROM `Trait` TO Process,\n FROM `Const` TO Process,\n FROM `Static` TO Process,\n FROM `Property` TO Process,\n FROM `Record` TO Process,\n FROM `Delegate` TO Process,\n FROM `Annotation` TO Process,\n FROM `Template` TO Process,\n FROM CodeElement TO Process,\n type STRING,\n confidence DOUBLE,\n reason STRING,\n step INT32\n)";
|
|
45
45
|
export declare const EMBEDDING_SCHEMA = "\nCREATE NODE TABLE CodeEmbedding (\n nodeId STRING,\n embedding FLOAT[384],\n PRIMARY KEY (nodeId)\n)";
|
|
46
46
|
/**
|
|
47
47
|
* Create vector index for semantic search
|
package/dist/core/lbug/schema.js
CHANGED
|
@@ -131,6 +131,10 @@ CREATE NODE TABLE Process (
|
|
|
131
131
|
label STRING,
|
|
132
132
|
heuristicLabel STRING,
|
|
133
133
|
processType STRING,
|
|
134
|
+
processSubtype STRING,
|
|
135
|
+
runtimeChainConfidence STRING,
|
|
136
|
+
sourceReasons STRING[],
|
|
137
|
+
sourceConfidences DOUBLE[],
|
|
134
138
|
stepCount INT32,
|
|
135
139
|
communities STRING[],
|
|
136
140
|
entryPointId STRING,
|
|
@@ -224,6 +228,7 @@ CREATE REL TABLE ${REL_TABLE_NAME} (
|
|
|
224
228
|
FROM Function TO \`Property\`,
|
|
225
229
|
FROM Class TO Method,
|
|
226
230
|
FROM Class TO Function,
|
|
231
|
+
FROM Class TO File,
|
|
227
232
|
FROM Class TO Class,
|
|
228
233
|
FROM Class TO Interface,
|
|
229
234
|
FROM Class TO Community,
|
|
@@ -240,6 +245,7 @@ CREATE REL TABLE ${REL_TABLE_NAME} (
|
|
|
240
245
|
FROM Class TO \`Namespace\`,
|
|
241
246
|
FROM Class TO \`Typedef\`,
|
|
242
247
|
FROM Class TO \`Property\`,
|
|
248
|
+
FROM Class TO \`Delegate\`,
|
|
243
249
|
FROM Method TO Function,
|
|
244
250
|
FROM Method TO Method,
|
|
245
251
|
FROM Method TO Class,
|
|
@@ -255,6 +261,7 @@ CREATE REL TABLE ${REL_TABLE_NAME} (
|
|
|
255
261
|
FROM Method TO Interface,
|
|
256
262
|
FROM Method TO \`Constructor\`,
|
|
257
263
|
FROM Method TO \`Property\`,
|
|
264
|
+
FROM Method TO \`Delegate\`,
|
|
258
265
|
FROM \`Template\` TO \`Template\`,
|
|
259
266
|
FROM \`Template\` TO Function,
|
|
260
267
|
FROM \`Template\` TO Method,
|
|
@@ -316,6 +323,8 @@ CREATE REL TABLE ${REL_TABLE_NAME} (
|
|
|
316
323
|
FROM \`Const\` TO Community,
|
|
317
324
|
FROM \`Static\` TO Community,
|
|
318
325
|
FROM \`Property\` TO Community,
|
|
326
|
+
FROM \`Property\` TO Class,
|
|
327
|
+
FROM \`Property\` TO Interface,
|
|
319
328
|
FROM \`Record\` TO Method,
|
|
320
329
|
FROM \`Record\` TO \`Constructor\`,
|
|
321
330
|
FROM \`Record\` TO \`Property\`,
|
|
@@ -5,6 +5,7 @@ test('RELATION_SCHEMA includes audited fallback pairs for Property/Delegate link
|
|
|
5
5
|
const requiredPairs = [
|
|
6
6
|
'FROM Method TO `Delegate`',
|
|
7
7
|
'FROM Class TO `Property`',
|
|
8
|
+
'FROM Class TO File',
|
|
8
9
|
'FROM `Constructor` TO `Property`',
|
|
9
10
|
'FROM Function TO `Property`',
|
|
10
11
|
'FROM `Property` TO Class',
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* LadybugDB connections are opened lazily per repo on first query.
|
|
7
7
|
*/
|
|
8
8
|
import type { ResolvedUnityBinding } from '../../core/unity/resolver.js';
|
|
9
|
-
import type
|
|
9
|
+
import { type UnityContextPayload, type UnityHydrationMeta } from './unity-enrichment.js';
|
|
10
10
|
import { type RegistryEntry } from '../../storage/repo-manager.js';
|
|
11
11
|
/**
|
|
12
12
|
* Quick test-file detection for filtering impact results.
|