ghagga-core 2.5.0 → 2.6.0
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 +1 -1
- package/dist/agents/consensus.d.ts +16 -0
- package/dist/agents/consensus.d.ts.map +1 -1
- package/dist/agents/consensus.js +57 -33
- package/dist/agents/consensus.js.map +1 -1
- package/dist/agents/diagnostic.d.ts +55 -0
- package/dist/agents/diagnostic.d.ts.map +1 -0
- package/dist/agents/diagnostic.js +143 -0
- package/dist/agents/diagnostic.js.map +1 -0
- package/dist/agents/prompts.d.ts +6 -4
- package/dist/agents/prompts.d.ts.map +1 -1
- package/dist/agents/prompts.js +110 -24
- package/dist/agents/prompts.js.map +1 -1
- package/dist/agents/simple.d.ts +7 -0
- package/dist/agents/simple.d.ts.map +1 -1
- package/dist/agents/simple.js +32 -18
- package/dist/agents/simple.js.map +1 -1
- package/dist/agents/workflow.d.ts +28 -1
- package/dist/agents/workflow.d.ts.map +1 -1
- package/dist/agents/workflow.js +112 -45
- package/dist/agents/workflow.js.map +1 -1
- package/dist/enhance/enhance.d.ts.map +1 -1
- package/dist/enhance/enhance.js +16 -4
- package/dist/enhance/enhance.js.map +1 -1
- package/dist/format.d.ts +47 -1
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +175 -3
- package/dist/format.js.map +1 -1
- package/dist/graph/blast-radius.d.ts +57 -0
- package/dist/graph/blast-radius.d.ts.map +1 -0
- package/dist/graph/blast-radius.js +145 -0
- package/dist/graph/blast-radius.js.map +1 -0
- package/dist/graph/builder.d.ts +50 -0
- package/dist/graph/builder.d.ts.map +1 -0
- package/dist/graph/builder.js +210 -0
- package/dist/graph/builder.js.map +1 -0
- package/dist/graph/extractors/go.d.ts +9 -0
- package/dist/graph/extractors/go.d.ts.map +1 -0
- package/dist/graph/extractors/go.js +78 -0
- package/dist/graph/extractors/go.js.map +1 -0
- package/dist/graph/extractors/index.d.ts +22 -0
- package/dist/graph/extractors/index.d.ts.map +1 -0
- package/dist/graph/extractors/index.js +37 -0
- package/dist/graph/extractors/index.js.map +1 -0
- package/dist/graph/extractors/java.d.ts +9 -0
- package/dist/graph/extractors/java.d.ts.map +1 -0
- package/dist/graph/extractors/java.js +80 -0
- package/dist/graph/extractors/java.js.map +1 -0
- package/dist/graph/extractors/javascript.d.ts +9 -0
- package/dist/graph/extractors/javascript.d.ts.map +1 -0
- package/dist/graph/extractors/javascript.js +204 -0
- package/dist/graph/extractors/javascript.js.map +1 -0
- package/dist/graph/extractors/python.d.ts +9 -0
- package/dist/graph/extractors/python.d.ts.map +1 -0
- package/dist/graph/extractors/python.js +103 -0
- package/dist/graph/extractors/python.js.map +1 -0
- package/dist/graph/extractors/rust.d.ts +9 -0
- package/dist/graph/extractors/rust.d.ts.map +1 -0
- package/dist/graph/extractors/rust.js +115 -0
- package/dist/graph/extractors/rust.js.map +1 -0
- package/dist/graph/extractors/types.d.ts +31 -0
- package/dist/graph/extractors/types.d.ts.map +1 -0
- package/dist/graph/extractors/types.js +9 -0
- package/dist/graph/extractors/types.js.map +1 -0
- package/dist/graph/extractors/typescript.d.ts +9 -0
- package/dist/graph/extractors/typescript.d.ts.map +1 -0
- package/dist/graph/extractors/typescript.js +151 -0
- package/dist/graph/extractors/typescript.js.map +1 -0
- package/dist/graph/index.d.ts +15 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +14 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/loader.d.ts +43 -0
- package/dist/graph/loader.d.ts.map +1 -0
- package/dist/graph/loader.js +104 -0
- package/dist/graph/loader.js.map +1 -0
- package/dist/graph/schema.d.ts +113 -0
- package/dist/graph/schema.d.ts.map +1 -0
- package/dist/graph/schema.js +144 -0
- package/dist/graph/schema.js.map +1 -0
- package/dist/health/trends.js +1 -1
- package/dist/health/trends.js.map +1 -1
- package/dist/index.d.ts +20 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/memory/sqlite.js +4 -4
- package/dist/memory/sqlite.js.map +1 -1
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/pipeline.js +291 -42
- package/dist/pipeline.js.map +1 -1
- package/dist/providers/cli-bridge.d.ts +136 -0
- package/dist/providers/cli-bridge.d.ts.map +1 -0
- package/dist/providers/cli-bridge.js +457 -0
- package/dist/providers/cli-bridge.js.map +1 -0
- package/dist/providers/fallback.d.ts +8 -0
- package/dist/providers/fallback.d.ts.map +1 -1
- package/dist/providers/fallback.js +24 -8
- package/dist/providers/fallback.js.map +1 -1
- package/dist/providers/gateway.d.ts +40 -0
- package/dist/providers/gateway.d.ts.map +1 -0
- package/dist/providers/gateway.js +52 -0
- package/dist/providers/gateway.js.map +1 -0
- package/dist/providers/generate-fn.d.ts +62 -0
- package/dist/providers/generate-fn.d.ts.map +1 -0
- package/dist/providers/generate-fn.js +84 -0
- package/dist/providers/generate-fn.js.map +1 -0
- package/dist/providers/index.d.ts +5 -0
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +53 -0
- package/dist/providers/index.js.map +1 -1
- package/dist/tools/plugins/index.d.ts +2 -0
- package/dist/tools/plugins/index.d.ts.map +1 -1
- package/dist/tools/plugins/index.js +7 -0
- package/dist/tools/plugins/index.js.map +1 -1
- package/dist/tools/plugins/zizmor.d.ts +22 -0
- package/dist/tools/plugins/zizmor.d.ts.map +1 -0
- package/dist/tools/plugins/zizmor.js +112 -0
- package/dist/tools/plugins/zizmor.js.map +1 -0
- package/dist/tools/resolve.js +1 -1
- package/dist/tools/resolve.js.map +1 -1
- package/dist/tools/types.d.ts +1 -1
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/types.d.ts +54 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +21 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/concurrency.d.ts +29 -0
- package/dist/utils/concurrency.d.ts.map +1 -0
- package/dist/utils/concurrency.js +40 -0
- package/dist/utils/concurrency.js.map +1 -0
- package/dist/utils/context-levels.d.ts +113 -0
- package/dist/utils/context-levels.d.ts.map +1 -0
- package/dist/utils/context-levels.js +255 -0
- package/dist/utils/context-levels.js.map +1 -0
- package/dist/utils/diff.d.ts +25 -0
- package/dist/utils/diff.d.ts.map +1 -1
- package/dist/utils/diff.js +28 -0
- package/dist/utils/diff.js.map +1 -1
- package/dist/utils/llm-timeout.d.ts +38 -0
- package/dist/utils/llm-timeout.d.ts.map +1 -0
- package/dist/utils/llm-timeout.js +76 -0
- package/dist/utils/llm-timeout.js.map +1 -0
- package/dist/utils/path-protection.d.ts +59 -0
- package/dist/utils/path-protection.d.ts.map +1 -0
- package/dist/utils/path-protection.js +136 -0
- package/dist/utils/path-protection.js.map +1 -0
- package/dist/utils/token-budget.d.ts +34 -1
- package/dist/utils/token-budget.d.ts.map +1 -1
- package/dist/utils/token-budget.js +108 -3
- package/dist/utils/token-budget.js.map +1 -1
- package/package.json +21 -19
- package/LICENSE +0 -21
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript Extractor
|
|
3
|
+
*
|
|
4
|
+
* Regex-based extractor for TypeScript/TSX files.
|
|
5
|
+
* Handles ES module imports/exports including type-only imports.
|
|
6
|
+
*/
|
|
7
|
+
// ─── Import Patterns ────────────────────────────────────────────
|
|
8
|
+
/** import { x, y } from 'module' — also handles `import type { x } from 'module'` */
|
|
9
|
+
const NAMED_IMPORT_RE = /import\s+(?:type\s+)?{([^}]+)}\s+from\s+['"]([^'"]+)['"]/g;
|
|
10
|
+
/** import x from 'module' — default import */
|
|
11
|
+
const DEFAULT_IMPORT_RE = /import\s+(\w+)\s+from\s+['"]([^'"]+)['"]/g;
|
|
12
|
+
/** import * as x from 'module' — namespace import */
|
|
13
|
+
const NAMESPACE_IMPORT_RE = /import\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]/g;
|
|
14
|
+
/** import 'module' — side-effect import */
|
|
15
|
+
const SIDE_EFFECT_IMPORT_RE = /import\s+['"]([^'"]+)['"]/g;
|
|
16
|
+
/** import x, { y, z } from 'module' — mixed default + named */
|
|
17
|
+
const MIXED_IMPORT_RE = /import\s+(\w+)\s*,\s*{([^}]+)}\s+from\s+['"]([^'"]+)['"]/g;
|
|
18
|
+
// ─── Export Patterns ────────────────────────────────────────────
|
|
19
|
+
/** export function x() / export async function x() */
|
|
20
|
+
const EXPORT_FUNCTION_RE = /export\s+(?:async\s+)?function\s+(\w+)/g;
|
|
21
|
+
/** export class x */
|
|
22
|
+
const EXPORT_CLASS_RE = /export\s+class\s+(\w+)/g;
|
|
23
|
+
/** export const/let/var x */
|
|
24
|
+
const EXPORT_VARIABLE_RE = /export\s+(?:const|let|var)\s+(\w+)/g;
|
|
25
|
+
/** export type x / export interface x */
|
|
26
|
+
const EXPORT_TYPE_RE = /export\s+(?:type|interface)\s+(\w+)/g;
|
|
27
|
+
/** export default */
|
|
28
|
+
const EXPORT_DEFAULT_RE = /export\s+default\s+(?:function\s+(\w+)|class\s+(\w+)|(\w+))/g;
|
|
29
|
+
/** export { x, y, z } — re-exports or named exports */
|
|
30
|
+
const EXPORT_NAMED_RE = /export\s+{([^}]+)}/g;
|
|
31
|
+
/** export default (anonymous) — export default function() {}, export default class {} */
|
|
32
|
+
const EXPORT_DEFAULT_ANON_RE = /export\s+default\s+(?:function|class)\s*[({]/g;
|
|
33
|
+
// ─── Extractor ──────────────────────────────────────────────────
|
|
34
|
+
export const typescriptExtractor = {
|
|
35
|
+
language: 'typescript',
|
|
36
|
+
extensions: ['.ts', '.tsx'],
|
|
37
|
+
extractImports(content) {
|
|
38
|
+
const imports = [];
|
|
39
|
+
const seen = new Set();
|
|
40
|
+
// Mixed default + named: import x, { y, z } from 'module'
|
|
41
|
+
for (const match of content.matchAll(MIXED_IMPORT_RE)) {
|
|
42
|
+
const defaultName = match[1];
|
|
43
|
+
const namedPart = match[2];
|
|
44
|
+
const source = match[3];
|
|
45
|
+
const symbols = [
|
|
46
|
+
defaultName,
|
|
47
|
+
...namedPart
|
|
48
|
+
.split(',')
|
|
49
|
+
.map((s) => s.trim().replace(/\s+as\s+\w+/, ''))
|
|
50
|
+
.filter(Boolean),
|
|
51
|
+
];
|
|
52
|
+
const key = `${source}:${symbols.sort().join(',')}`;
|
|
53
|
+
if (!seen.has(key)) {
|
|
54
|
+
seen.add(key);
|
|
55
|
+
imports.push({ source, symbols });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// Named imports: import { x, y } from 'module'
|
|
59
|
+
for (const match of content.matchAll(NAMED_IMPORT_RE)) {
|
|
60
|
+
const symbols = match[1]
|
|
61
|
+
?.split(',')
|
|
62
|
+
.map((s) => s.trim().replace(/\s+as\s+\w+/, ''))
|
|
63
|
+
.filter(Boolean);
|
|
64
|
+
const source = match[2];
|
|
65
|
+
const key = `${source}:named`;
|
|
66
|
+
if (!seen.has(key)) {
|
|
67
|
+
seen.add(key);
|
|
68
|
+
imports.push({ source, symbols });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// Default imports: import x from 'module'
|
|
72
|
+
for (const match of content.matchAll(DEFAULT_IMPORT_RE)) {
|
|
73
|
+
const name = match[1];
|
|
74
|
+
const source = match[2];
|
|
75
|
+
const key = `${source}:default`;
|
|
76
|
+
if (!seen.has(key)) {
|
|
77
|
+
seen.add(key);
|
|
78
|
+
imports.push({ source, symbols: [name] });
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// Namespace imports: import * as x from 'module'
|
|
82
|
+
for (const match of content.matchAll(NAMESPACE_IMPORT_RE)) {
|
|
83
|
+
const name = match[1];
|
|
84
|
+
const source = match[2];
|
|
85
|
+
const key = `${source}:namespace`;
|
|
86
|
+
if (!seen.has(key)) {
|
|
87
|
+
seen.add(key);
|
|
88
|
+
imports.push({ source, symbols: [name] });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// Side-effect imports: import 'module'
|
|
92
|
+
for (const match of content.matchAll(SIDE_EFFECT_IMPORT_RE)) {
|
|
93
|
+
const source = match[1];
|
|
94
|
+
const key = `${source}:side-effect`;
|
|
95
|
+
if (!seen.has(key)) {
|
|
96
|
+
seen.add(key);
|
|
97
|
+
imports.push({ source, symbols: [] });
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return imports;
|
|
101
|
+
},
|
|
102
|
+
extractExports(content) {
|
|
103
|
+
const exports = [];
|
|
104
|
+
const seen = new Set();
|
|
105
|
+
function add(name, kind) {
|
|
106
|
+
if (!seen.has(name)) {
|
|
107
|
+
seen.add(name);
|
|
108
|
+
exports.push({ name, kind });
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// export default (named)
|
|
112
|
+
for (const match of content.matchAll(EXPORT_DEFAULT_RE)) {
|
|
113
|
+
const name = match[1] ?? match[2] ?? match[3];
|
|
114
|
+
if (name)
|
|
115
|
+
add(name, 'default');
|
|
116
|
+
}
|
|
117
|
+
// export default (anonymous)
|
|
118
|
+
for (const _match of content.matchAll(EXPORT_DEFAULT_ANON_RE)) {
|
|
119
|
+
if (!seen.has('default'))
|
|
120
|
+
add('default', 'default');
|
|
121
|
+
}
|
|
122
|
+
// export function
|
|
123
|
+
for (const match of content.matchAll(EXPORT_FUNCTION_RE)) {
|
|
124
|
+
add(match[1], 'function');
|
|
125
|
+
}
|
|
126
|
+
// export class
|
|
127
|
+
for (const match of content.matchAll(EXPORT_CLASS_RE)) {
|
|
128
|
+
add(match[1], 'class');
|
|
129
|
+
}
|
|
130
|
+
// export const/let/var
|
|
131
|
+
for (const match of content.matchAll(EXPORT_VARIABLE_RE)) {
|
|
132
|
+
add(match[1], 'variable');
|
|
133
|
+
}
|
|
134
|
+
// export type/interface
|
|
135
|
+
for (const match of content.matchAll(EXPORT_TYPE_RE)) {
|
|
136
|
+
add(match[1], 'type');
|
|
137
|
+
}
|
|
138
|
+
// export { x, y, z }
|
|
139
|
+
for (const match of content.matchAll(EXPORT_NAMED_RE)) {
|
|
140
|
+
const names = match[1]
|
|
141
|
+
?.split(',')
|
|
142
|
+
.map((s) => s.trim().replace(/\s+as\s+\w+/, ''))
|
|
143
|
+
.filter(Boolean);
|
|
144
|
+
for (const name of names) {
|
|
145
|
+
add(name, 'variable'); // Can't determine kind from re-export
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return exports;
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=typescript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../src/graph/extractors/typescript.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,mEAAmE;AAEnE,qFAAqF;AACrF,MAAM,eAAe,GAAG,2DAA2D,CAAC;AAEpF,8CAA8C;AAC9C,MAAM,iBAAiB,GAAG,2CAA2C,CAAC;AAEtE,qDAAqD;AACrD,MAAM,mBAAmB,GAAG,qDAAqD,CAAC;AAElF,2CAA2C;AAC3C,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAE3D,+DAA+D;AAC/D,MAAM,eAAe,GAAG,2DAA2D,CAAC;AAEpF,mEAAmE;AAEnE,sDAAsD;AACtD,MAAM,kBAAkB,GAAG,yCAAyC,CAAC;AAErE,qBAAqB;AACrB,MAAM,eAAe,GAAG,yBAAyB,CAAC;AAElD,6BAA6B;AAC7B,MAAM,kBAAkB,GAAG,qCAAqC,CAAC;AAEjE,yCAAyC;AACzC,MAAM,cAAc,GAAG,sCAAsC,CAAC;AAE9D,qBAAqB;AACrB,MAAM,iBAAiB,GAAG,8DAA8D,CAAC;AAEzF,uDAAuD;AACvD,MAAM,eAAe,GAAG,qBAAqB,CAAC;AAE9C,yFAAyF;AACzF,MAAM,sBAAsB,GAAG,+CAA+C,CAAC;AAE/E,mEAAmE;AAEnE,MAAM,CAAC,MAAM,mBAAmB,GAAc;IAC5C,QAAQ,EAAE,YAAY;IACtB,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;IAE3B,cAAc,CAAC,OAAe;QAC5B,M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CAAC;gBACzB,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,sCAAsC;YAC/D,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graph module barrel export.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all public types, interfaces, constants, and functions
|
|
5
|
+
* from the graph subsystem.
|
|
6
|
+
*/
|
|
7
|
+
export type { BlastRadiusMetadata, DependencyGraph, GraphLoader, GraphMetadata, GraphNode, SupportedLanguage, } from './schema.js';
|
|
8
|
+
export { DEFAULT_TRAVERSAL_DEPTH, EXCLUDED_DIRS, GRAPH_STALE_DAYS, GRAPH_VERSION, isGraphStale, isTestFile, LANGUAGE_EXTENSIONS, MAX_BLAST_RADIUS_FILES, MAX_GRAPH_SIZE_BYTES, TEST_FILE_PATTERNS, validateGraph, validateMetadata, } from './schema.js';
|
|
9
|
+
export type { BlastRadiusOptions, BlastRadiusResult } from './blast-radius.js';
|
|
10
|
+
export { buildReverseIndex, computeBlastRadius } from './blast-radius.js';
|
|
11
|
+
export { GitHubApiGraphLoader, NullGraphLoader, PreloadedGraphLoader } from './loader.js';
|
|
12
|
+
export type { ExportInfo, Extractor, ImportInfo } from './extractors/index.js';
|
|
13
|
+
export { getExtractor } from './extractors/index.js';
|
|
14
|
+
export { buildGraph, buildGraphIncremental, detectLanguage, resolveImportPath } from './builder.js';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/graph/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,YAAY,EACV,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,aAAa,EACb,SAAS,EACT,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAIrB,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAI1E,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAI1F,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graph module barrel export.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all public types, interfaces, constants, and functions
|
|
5
|
+
* from the graph subsystem.
|
|
6
|
+
*/
|
|
7
|
+
export { DEFAULT_TRAVERSAL_DEPTH, EXCLUDED_DIRS, GRAPH_STALE_DAYS, GRAPH_VERSION, isGraphStale, isTestFile, LANGUAGE_EXTENSIONS, MAX_BLAST_RADIUS_FILES, MAX_GRAPH_SIZE_BYTES, TEST_FILE_PATTERNS, validateGraph, validateMetadata, } from './schema.js';
|
|
8
|
+
export { buildReverseIndex, computeBlastRadius } from './blast-radius.js';
|
|
9
|
+
// ─── Graph Loaders ──────────────────────────────────────────────
|
|
10
|
+
export { GitHubApiGraphLoader, NullGraphLoader, PreloadedGraphLoader } from './loader.js';
|
|
11
|
+
export { getExtractor } from './extractors/index.js';
|
|
12
|
+
// ─── Graph Builder ──────────────────────────────────────────────
|
|
13
|
+
export { buildGraph, buildGraphIncremental, detectLanguage, resolveImportPath } from './builder.js';
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/graph/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAKrB,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE1E,mEAAmE;AAEnE,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAK1F,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,mEAAmE;AAEnE,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graph Loaders
|
|
3
|
+
*
|
|
4
|
+
* Implementations of the GraphLoader interface for different environments:
|
|
5
|
+
* - GitHubApiGraphLoader: fetches from ghagga/graph orphan branch via GitHub API
|
|
6
|
+
* - NullGraphLoader: always returns null (used when blast-radius is disabled)
|
|
7
|
+
* - PreloadedGraphLoader: wraps an already-fetched graph (used by SaaS for early fetch)
|
|
8
|
+
*/
|
|
9
|
+
import { type DependencyGraph, type GraphLoader, type GraphMetadata } from './schema.js';
|
|
10
|
+
/**
|
|
11
|
+
* Fetches the dependency graph from a GitHub repository's ghagga/graph orphan branch.
|
|
12
|
+
*
|
|
13
|
+
* Uses the GitHub Contents API with `Accept: application/vnd.github.raw` to get
|
|
14
|
+
* the raw JSON without base64 encoding.
|
|
15
|
+
*/
|
|
16
|
+
export declare class GitHubApiGraphLoader implements GraphLoader {
|
|
17
|
+
private readonly owner;
|
|
18
|
+
private readonly repo;
|
|
19
|
+
private readonly token;
|
|
20
|
+
constructor(owner: string, repo: string, token: string);
|
|
21
|
+
load(): Promise<DependencyGraph | null>;
|
|
22
|
+
loadMetadata(): Promise<GraphMetadata | null>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A no-op loader that always returns null.
|
|
26
|
+
* Used when blast-radius is disabled or no graph source is available.
|
|
27
|
+
*/
|
|
28
|
+
export declare class NullGraphLoader implements GraphLoader {
|
|
29
|
+
load(): Promise<DependencyGraph | null>;
|
|
30
|
+
loadMetadata(): Promise<GraphMetadata | null>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A loader that wraps a pre-fetched graph and optional metadata.
|
|
34
|
+
* Used by the SaaS server when the graph is fetched early (before pipeline).
|
|
35
|
+
*/
|
|
36
|
+
export declare class PreloadedGraphLoader implements GraphLoader {
|
|
37
|
+
private readonly graph;
|
|
38
|
+
private readonly metadata?;
|
|
39
|
+
constructor(graph: DependencyGraph, metadata?: (GraphMetadata | null) | undefined);
|
|
40
|
+
load(): Promise<DependencyGraph | null>;
|
|
41
|
+
loadMetadata(): Promise<GraphMetadata | null>;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/graph/loader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,aAAa,EAGnB,MAAM,aAAa,CAAC;AAIrB;;;;;GAKG;AACH,qBAAa,oBAAqB,YAAW,WAAW;IAEpD,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAFL,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM;IAG1B,IAAI,IAAI,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAuBvC,YAAY,IAAI,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;CAqBpD;AAID;;;GAGG;AACH,qBAAa,eAAgB,YAAW,WAAW;IAC3C,IAAI,IAAI,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAIvC,YAAY,IAAI,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;CAGpD;AAID;;;GAGG;AACH,qBAAa,oBAAqB,YAAW,WAAW;IAEpD,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBADT,KAAK,EAAE,eAAe,EACtB,QAAQ,CAAC,GAAE,aAAa,GAAG,IAAI,aAAA;IAG5C,IAAI,IAAI,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAIvC,YAAY,IAAI,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;CAGpD"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graph Loaders
|
|
3
|
+
*
|
|
4
|
+
* Implementations of the GraphLoader interface for different environments:
|
|
5
|
+
* - GitHubApiGraphLoader: fetches from ghagga/graph orphan branch via GitHub API
|
|
6
|
+
* - NullGraphLoader: always returns null (used when blast-radius is disabled)
|
|
7
|
+
* - PreloadedGraphLoader: wraps an already-fetched graph (used by SaaS for early fetch)
|
|
8
|
+
*/
|
|
9
|
+
import { validateGraph, validateMetadata, } from './schema.js';
|
|
10
|
+
// ─── GitHub API Graph Loader ────────────────────────────────────
|
|
11
|
+
/**
|
|
12
|
+
* Fetches the dependency graph from a GitHub repository's ghagga/graph orphan branch.
|
|
13
|
+
*
|
|
14
|
+
* Uses the GitHub Contents API with `Accept: application/vnd.github.raw` to get
|
|
15
|
+
* the raw JSON without base64 encoding.
|
|
16
|
+
*/
|
|
17
|
+
export class GitHubApiGraphLoader {
|
|
18
|
+
owner;
|
|
19
|
+
repo;
|
|
20
|
+
token;
|
|
21
|
+
constructor(owner, repo, token) {
|
|
22
|
+
this.owner = owner;
|
|
23
|
+
this.repo = repo;
|
|
24
|
+
this.token = token;
|
|
25
|
+
}
|
|
26
|
+
async load() {
|
|
27
|
+
try {
|
|
28
|
+
const url = `https://api.github.com/repos/${this.owner}/${this.repo}/contents/.ghagga/graph.json?ref=ghagga/graph`;
|
|
29
|
+
const response = await fetch(url, {
|
|
30
|
+
headers: {
|
|
31
|
+
Authorization: `Bearer ${this.token}`,
|
|
32
|
+
Accept: 'application/vnd.github.raw',
|
|
33
|
+
'X-GitHub-Api-Version': '2022-11-28',
|
|
34
|
+
},
|
|
35
|
+
signal: AbortSignal.timeout(5_000),
|
|
36
|
+
});
|
|
37
|
+
if (response.status === 404)
|
|
38
|
+
return null;
|
|
39
|
+
if (!response.ok)
|
|
40
|
+
return null;
|
|
41
|
+
const json = await response.json();
|
|
42
|
+
return validateGraph(json);
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
// Network error, timeout, parse error — all return null
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async loadMetadata() {
|
|
50
|
+
try {
|
|
51
|
+
const url = `https://api.github.com/repos/${this.owner}/${this.repo}/contents/.ghagga/metadata.json?ref=ghagga/graph`;
|
|
52
|
+
const response = await fetch(url, {
|
|
53
|
+
headers: {
|
|
54
|
+
Authorization: `Bearer ${this.token}`,
|
|
55
|
+
Accept: 'application/vnd.github.raw',
|
|
56
|
+
'X-GitHub-Api-Version': '2022-11-28',
|
|
57
|
+
},
|
|
58
|
+
signal: AbortSignal.timeout(5_000),
|
|
59
|
+
});
|
|
60
|
+
if (response.status === 404)
|
|
61
|
+
return null;
|
|
62
|
+
if (!response.ok)
|
|
63
|
+
return null;
|
|
64
|
+
const json = await response.json();
|
|
65
|
+
return validateMetadata(json);
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// ─── Null Graph Loader ──────────────────────────────────────────
|
|
73
|
+
/**
|
|
74
|
+
* A no-op loader that always returns null.
|
|
75
|
+
* Used when blast-radius is disabled or no graph source is available.
|
|
76
|
+
*/
|
|
77
|
+
export class NullGraphLoader {
|
|
78
|
+
async load() {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
async loadMetadata() {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// ─── Preloaded Graph Loader ─────────────────────────────────────
|
|
86
|
+
/**
|
|
87
|
+
* A loader that wraps a pre-fetched graph and optional metadata.
|
|
88
|
+
* Used by the SaaS server when the graph is fetched early (before pipeline).
|
|
89
|
+
*/
|
|
90
|
+
export class PreloadedGraphLoader {
|
|
91
|
+
graph;
|
|
92
|
+
metadata;
|
|
93
|
+
constructor(graph, metadata) {
|
|
94
|
+
this.graph = graph;
|
|
95
|
+
this.metadata = metadata;
|
|
96
|
+
}
|
|
97
|
+
async load() {
|
|
98
|
+
return this.graph;
|
|
99
|
+
}
|
|
100
|
+
async loadMetadata() {
|
|
101
|
+
return this.metadata ?? null;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/graph/loader.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAIL,aAAa,EACb,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,mEAAmE;AAEnE;;;;;GAKG;AACH,MAAM,OAAO,oBAAoB;IAEZ;IACA;IACA;IAHnB,YACmB,KAAa,EACb,IAAY,EACZ,KAAa;QAFb,UAAK,GAAL,KAAK,CAAQ;QACb,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAQ;IAC7B,CAAC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;YAE9B,MAAM,IAAI,GAAY,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YAC5C,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAED,mEAAmE;AAEnE;;;GAGG;AACH,MAAM,OAAO,eAAe;IAC1B,KAAK,CAAC,IAAI;QACR,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,mEAAmE;AAEnE;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAEZ;IACA;IAFnB,YACmB,KAAsB,EACtB,QAA+B;QAD/B,UAAK,GAAL,KAAK,CAAiB;QACtB,aAAQ,GAAR,QAAQ,CAAuB;IAC/C,CAAC;IAEJ,KAAK,CAAC,IAAI;QACR,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dependency Graph Schema & Types
|
|
3
|
+
*
|
|
4
|
+
* Defines the core data structures for the blast-radius feature:
|
|
5
|
+
* - DependencyGraph: the file-level import/export/call graph
|
|
6
|
+
* - GraphMetadata: indexing metadata (commit, timestamp, stats)
|
|
7
|
+
* - BlastRadiusMetadata: per-review blast-radius summary
|
|
8
|
+
* - Validation functions for runtime type checking
|
|
9
|
+
* - Constants for limits, patterns, and language support
|
|
10
|
+
*/
|
|
11
|
+
export type SupportedLanguage = 'typescript' | 'javascript' | 'python' | 'go' | 'java' | 'rust';
|
|
12
|
+
export interface DependencyGraph {
|
|
13
|
+
/** Schema version for forward compatibility */
|
|
14
|
+
version: number;
|
|
15
|
+
/** Base path for all relative file paths */
|
|
16
|
+
rootDir: string;
|
|
17
|
+
/** File nodes keyed by relative path */
|
|
18
|
+
nodes: Record<string, GraphNode>;
|
|
19
|
+
}
|
|
20
|
+
export interface GraphNode {
|
|
21
|
+
/** SHA-256 hash of file content (for incremental indexing) */
|
|
22
|
+
hash: string;
|
|
23
|
+
/** Detected language */
|
|
24
|
+
language: SupportedLanguage;
|
|
25
|
+
/** Relative paths of files this file imports from */
|
|
26
|
+
imports: string[];
|
|
27
|
+
/** Exported symbol names (for cross-reference) */
|
|
28
|
+
exports: string[];
|
|
29
|
+
/** Cross-file function/method calls */
|
|
30
|
+
calls: Array<{
|
|
31
|
+
target: string;
|
|
32
|
+
symbol: string;
|
|
33
|
+
}>;
|
|
34
|
+
/** True if file matches test patterns */
|
|
35
|
+
isTest: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface GraphMetadata {
|
|
38
|
+
/** Full SHA of the commit that was last indexed */
|
|
39
|
+
lastIndexedCommit: string;
|
|
40
|
+
/** ISO 8601 timestamp */
|
|
41
|
+
lastIndexedAt: string;
|
|
42
|
+
/** Must match graph.version */
|
|
43
|
+
schemaVersion: number;
|
|
44
|
+
/** Total nodes in the graph */
|
|
45
|
+
fileCount: number;
|
|
46
|
+
/** Languages present */
|
|
47
|
+
languages: string[];
|
|
48
|
+
/** Indexing duration in milliseconds */
|
|
49
|
+
indexDurationMs: number;
|
|
50
|
+
}
|
|
51
|
+
export interface BlastRadiusMetadata {
|
|
52
|
+
/** Whether blast-radius was enabled for this review */
|
|
53
|
+
enabled: boolean;
|
|
54
|
+
/** Whether a dependency graph was available */
|
|
55
|
+
graphAvailable: boolean;
|
|
56
|
+
/** Total files in the diff */
|
|
57
|
+
totalFiles: number;
|
|
58
|
+
/** Files after blast-radius filtering */
|
|
59
|
+
blastRadiusFiles: number;
|
|
60
|
+
/** Reason for falling back to full diff (when applicable) */
|
|
61
|
+
fallbackReason?: string;
|
|
62
|
+
/** Whether the graph was stale (>7 days old) */
|
|
63
|
+
graphStale?: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface GraphLoader {
|
|
66
|
+
/** Load the dependency graph. Returns null if unavailable. */
|
|
67
|
+
load(): Promise<DependencyGraph | null>;
|
|
68
|
+
/** Load graph metadata. Returns null if unavailable. */
|
|
69
|
+
loadMetadata(): Promise<GraphMetadata | null>;
|
|
70
|
+
}
|
|
71
|
+
/** Current graph schema version */
|
|
72
|
+
export declare const GRAPH_VERSION = 1;
|
|
73
|
+
/** Maximum graph.json size in bytes (5 MB) */
|
|
74
|
+
export declare const MAX_GRAPH_SIZE_BYTES: number;
|
|
75
|
+
/** Maximum files in a blast-radius result before falling back to full diff */
|
|
76
|
+
export declare const MAX_BLAST_RADIUS_FILES = 50;
|
|
77
|
+
/** Default BFS traversal depth for reverse dependency lookup */
|
|
78
|
+
export declare const DEFAULT_TRAVERSAL_DEPTH = 3;
|
|
79
|
+
/** Number of days after which a graph is considered stale */
|
|
80
|
+
export declare const GRAPH_STALE_DAYS = 7;
|
|
81
|
+
/** Regex patterns that identify test files across supported languages */
|
|
82
|
+
export declare const TEST_FILE_PATTERNS: RegExp[];
|
|
83
|
+
/** Directories excluded from graph indexing */
|
|
84
|
+
export declare const EXCLUDED_DIRS: Set<string>;
|
|
85
|
+
/** Map from file extension to supported language */
|
|
86
|
+
export declare const LANGUAGE_EXTENSIONS: Record<string, SupportedLanguage>;
|
|
87
|
+
/**
|
|
88
|
+
* Check if a file path matches any known test file pattern.
|
|
89
|
+
* Tests against the basename (last segment) of the path.
|
|
90
|
+
*/
|
|
91
|
+
export declare function isTestFile(filePath: string): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Validate a parsed JSON value as a DependencyGraph.
|
|
94
|
+
* Returns the typed graph if valid, null otherwise.
|
|
95
|
+
*
|
|
96
|
+
* Checks:
|
|
97
|
+
* - Is an object with version, rootDir, nodes
|
|
98
|
+
* - version matches GRAPH_VERSION
|
|
99
|
+
* - rootDir is a string
|
|
100
|
+
* - nodes is a Record<string, GraphNode> with required fields
|
|
101
|
+
*/
|
|
102
|
+
export declare function validateGraph(json: unknown): DependencyGraph | null;
|
|
103
|
+
/**
|
|
104
|
+
* Validate a parsed JSON value as GraphMetadata.
|
|
105
|
+
* Returns the typed metadata if valid, null otherwise.
|
|
106
|
+
*/
|
|
107
|
+
export declare function validateMetadata(json: unknown): GraphMetadata | null;
|
|
108
|
+
/**
|
|
109
|
+
* Check if a graph's metadata indicates it is stale.
|
|
110
|
+
* A graph is stale if it was last indexed more than GRAPH_STALE_DAYS ago.
|
|
111
|
+
*/
|
|
112
|
+
export declare function isGraphStale(metadata: GraphMetadata): boolean;
|
|
113
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/graph/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAIhG,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAEhB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAEhB,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,SAAS;IACxB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IAEb,wBAAwB;IACxB,QAAQ,EAAE,iBAAiB,CAAC;IAE5B,qDAAqD;IACrD,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB,kDAAkD;IAClD,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB,uCAAuC;IACvC,KAAK,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAEjD,yCAAyC;IACzC,MAAM,EAAE,OAAO,CAAC;CACjB;AAID,MAAM,W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,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAWjE,CAAC;AAIF;;;GAGG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGpD;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI,CA2BnE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,aAAa,GAAG,IAAI,CAapE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAM7D"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dependency Graph Schema & Types
|
|
3
|
+
*
|
|
4
|
+
* Defines the core data structures for the blast-radius feature:
|
|
5
|
+
* - DependencyGraph: the file-level import/export/call graph
|
|
6
|
+
* - GraphMetadata: indexing metadata (commit, timestamp, stats)
|
|
7
|
+
* - BlastRadiusMetadata: per-review blast-radius summary
|
|
8
|
+
* - Validation functions for runtime type checking
|
|
9
|
+
* - Constants for limits, patterns, and language support
|
|
10
|
+
*/
|
|
11
|
+
// ─── Constants ──────────────────────────────────────────────────
|
|
12
|
+
/** Current graph schema version */
|
|
13
|
+
export const GRAPH_VERSION = 1;
|
|
14
|
+
/** Maximum graph.json size in bytes (5 MB) */
|
|
15
|
+
export const MAX_GRAPH_SIZE_BYTES = 5 * 1024 * 1024;
|
|
16
|
+
/** Maximum files in a blast-radius result before falling back to full diff */
|
|
17
|
+
export const MAX_BLAST_RADIUS_FILES = 50;
|
|
18
|
+
/** Default BFS traversal depth for reverse dependency lookup */
|
|
19
|
+
export const DEFAULT_TRAVERSAL_DEPTH = 3;
|
|
20
|
+
/** Number of days after which a graph is considered stale */
|
|
21
|
+
export const GRAPH_STALE_DAYS = 7;
|
|
22
|
+
/** Regex patterns that identify test files across supported languages */
|
|
23
|
+
export const TEST_FILE_PATTERNS = [
|
|
24
|
+
/\.test\.[jt]sx?$/,
|
|
25
|
+
/\.spec\.[jt]sx?$/,
|
|
26
|
+
/^test_.*\.py$/,
|
|
27
|
+
/_test\.go$/,
|
|
28
|
+
/Test\.java$/,
|
|
29
|
+
/_test\.rs$/,
|
|
30
|
+
];
|
|
31
|
+
/** Directories excluded from graph indexing */
|
|
32
|
+
export const EXCLUDED_DIRS = new Set([
|
|
33
|
+
'node_modules',
|
|
34
|
+
'vendor',
|
|
35
|
+
'.git',
|
|
36
|
+
'__pycache__',
|
|
37
|
+
'target',
|
|
38
|
+
'build',
|
|
39
|
+
'dist',
|
|
40
|
+
'.next',
|
|
41
|
+
'.turbo',
|
|
42
|
+
]);
|
|
43
|
+
/** Map from file extension to supported language */
|
|
44
|
+
export const LANGUAGE_EXTENSIONS = {
|
|
45
|
+
'.ts': 'typescript',
|
|
46
|
+
'.tsx': 'typescript',
|
|
47
|
+
'.js': 'javascript',
|
|
48
|
+
'.jsx': 'javascript',
|
|
49
|
+
'.mjs': 'javascript',
|
|
50
|
+
'.cjs': 'javascript',
|
|
51
|
+
'.py': 'python',
|
|
52
|
+
'.go': 'go',
|
|
53
|
+
'.java': 'java',
|
|
54
|
+
'.rs': 'rust',
|
|
55
|
+
};
|
|
56
|
+
// ─── Utility Functions ──────────────────────────────────────────
|
|
57
|
+
/**
|
|
58
|
+
* Check if a file path matches any known test file pattern.
|
|
59
|
+
* Tests against the basename (last segment) of the path.
|
|
60
|
+
*/
|
|
61
|
+
export function isTestFile(filePath) {
|
|
62
|
+
const basename = filePath.split('/').pop() ?? filePath;
|
|
63
|
+
return TEST_FILE_PATTERNS.some((pattern) => pattern.test(basename));
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Validate a parsed JSON value as a DependencyGraph.
|
|
67
|
+
* Returns the typed graph if valid, null otherwise.
|
|
68
|
+
*
|
|
69
|
+
* Checks:
|
|
70
|
+
* - Is an object with version, rootDir, nodes
|
|
71
|
+
* - version matches GRAPH_VERSION
|
|
72
|
+
* - rootDir is a string
|
|
73
|
+
* - nodes is a Record<string, GraphNode> with required fields
|
|
74
|
+
*/
|
|
75
|
+
export function validateGraph(json) {
|
|
76
|
+
if (!json || typeof json !== 'object')
|
|
77
|
+
return null;
|
|
78
|
+
const obj = json;
|
|
79
|
+
// Check required top-level fields
|
|
80
|
+
if (typeof obj.version !== 'number')
|
|
81
|
+
return null;
|
|
82
|
+
if (obj.version !== GRAPH_VERSION)
|
|
83
|
+
return null;
|
|
84
|
+
if (typeof obj.rootDir !== 'string')
|
|
85
|
+
return null;
|
|
86
|
+
if (!obj.nodes || typeof obj.nodes !== 'object')
|
|
87
|
+
return null;
|
|
88
|
+
// Validate nodes structure (spot-check — not exhaustive for perf)
|
|
89
|
+
const nodes = obj.nodes;
|
|
90
|
+
for (const [key, value] of Object.entries(nodes)) {
|
|
91
|
+
if (typeof key !== 'string')
|
|
92
|
+
return null;
|
|
93
|
+
if (!value || typeof value !== 'object')
|
|
94
|
+
return null;
|
|
95
|
+
const node = value;
|
|
96
|
+
if (typeof node.hash !== 'string')
|
|
97
|
+
return null;
|
|
98
|
+
if (typeof node.language !== 'string')
|
|
99
|
+
return null;
|
|
100
|
+
if (!Array.isArray(node.imports))
|
|
101
|
+
return null;
|
|
102
|
+
if (!Array.isArray(node.exports))
|
|
103
|
+
return null;
|
|
104
|
+
if (!Array.isArray(node.calls))
|
|
105
|
+
return null;
|
|
106
|
+
if (typeof node.isTest !== 'boolean')
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
return json;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Validate a parsed JSON value as GraphMetadata.
|
|
113
|
+
* Returns the typed metadata if valid, null otherwise.
|
|
114
|
+
*/
|
|
115
|
+
export function validateMetadata(json) {
|
|
116
|
+
if (!json || typeof json !== 'object')
|
|
117
|
+
return null;
|
|
118
|
+
const obj = json;
|
|
119
|
+
if (typeof obj.lastIndexedCommit !== 'string')
|
|
120
|
+
return null;
|
|
121
|
+
if (typeof obj.lastIndexedAt !== 'string')
|
|
122
|
+
return null;
|
|
123
|
+
if (typeof obj.schemaVersion !== 'number')
|
|
124
|
+
return null;
|
|
125
|
+
if (typeof obj.fileCount !== 'number')
|
|
126
|
+
return null;
|
|
127
|
+
if (!Array.isArray(obj.languages))
|
|
128
|
+
return null;
|
|
129
|
+
if (typeof obj.indexDurationMs !== 'number')
|
|
130
|
+
return null;
|
|
131
|
+
return json;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Check if a graph's metadata indicates it is stale.
|
|
135
|
+
* A graph is stale if it was last indexed more than GRAPH_STALE_DAYS ago.
|
|
136
|
+
*/
|
|
137
|
+
export function isGraphStale(metadata) {
|
|
138
|
+
const lastIndexed = new Date(metadata.lastIndexedAt);
|
|
139
|
+
const now = new Date();
|
|
140
|
+
const diffMs = now.getTime() - lastIndexed.getTime();
|
|
141
|
+
const diffDays = diffMs / (1000 * 60 * 60 * 24);
|
|
142
|
+
return diffDays > GRAPH_STALE_DAYS;
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/graph/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA2FH,mEAAmE;AAEnE,mCAAmC;AACnC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAE/B,8CAA8C;AAC9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAEzC,gEAAgE;AAChE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAEzC,6DAA6D;AAC7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC,yEAAyE;AACzE,MAAM,CAAC,MAAM,kBAAkB,GAAa;IA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