ghagga-core 3.2.0 → 3.4.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/dist/acp/adapter.d.ts.map +1 -1
- package/dist/acp/adapter.js +8 -1
- package/dist/acp/adapter.js.map +1 -1
- package/dist/agents/consensus.d.ts +2 -2
- package/dist/agents/consensus.d.ts.map +1 -1
- package/dist/agents/consensus.js +13 -5
- package/dist/agents/consensus.js.map +1 -1
- package/dist/agents/fan-out-lenses.d.ts +33 -2
- package/dist/agents/fan-out-lenses.d.ts.map +1 -1
- package/dist/agents/fan-out-lenses.js +245 -8
- package/dist/agents/fan-out-lenses.js.map +1 -1
- package/dist/agents/issue-code-discovery.d.ts +58 -0
- package/dist/agents/issue-code-discovery.d.ts.map +1 -0
- package/dist/agents/issue-code-discovery.js +144 -0
- package/dist/agents/issue-code-discovery.js.map +1 -0
- package/dist/agents/issue-triage.d.ts +153 -0
- package/dist/agents/issue-triage.d.ts.map +1 -0
- package/dist/agents/issue-triage.js +279 -0
- package/dist/agents/issue-triage.js.map +1 -0
- package/dist/agents/prompts.d.ts +50 -1
- package/dist/agents/prompts.d.ts.map +1 -1
- package/dist/agents/prompts.js +142 -2
- package/dist/agents/prompts.js.map +1 -1
- package/dist/agents/simple.d.ts.map +1 -1
- package/dist/agents/simple.js +1 -1
- package/dist/agents/simple.js.map +1 -1
- package/dist/agents/voice-validation.d.ts +34 -0
- package/dist/agents/voice-validation.d.ts.map +1 -0
- package/dist/agents/voice-validation.js +64 -0
- package/dist/agents/voice-validation.js.map +1 -0
- package/dist/agents/workflow.d.ts.map +1 -1
- package/dist/agents/workflow.js +8 -0
- package/dist/agents/workflow.js.map +1 -1
- package/dist/critique/critique.js +1 -1
- package/dist/critique/critique.js.map +1 -1
- package/dist/critique/prompts.d.ts +1 -1
- package/dist/critique/prompts.d.ts.map +1 -1
- package/dist/critique/prompts.js +1 -1
- package/dist/enhance/prompt.d.ts +1 -1
- package/dist/enhance/prompt.d.ts.map +1 -1
- package/dist/explanation.d.ts +69 -0
- package/dist/explanation.d.ts.map +1 -0
- package/dist/explanation.js +16 -0
- package/dist/explanation.js.map +1 -0
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +1 -0
- package/dist/format.js.map +1 -1
- package/dist/graph/builder.d.ts +13 -1
- package/dist/graph/builder.d.ts.map +1 -1
- package/dist/graph/builder.js +305 -6
- package/dist/graph/builder.js.map +1 -1
- package/dist/graph/call-chain.d.ts +27 -0
- package/dist/graph/call-chain.d.ts.map +1 -1
- package/dist/graph/call-chain.js +113 -18
- package/dist/graph/call-chain.js.map +1 -1
- package/dist/graph/changed-symbols.d.ts +57 -0
- package/dist/graph/changed-symbols.d.ts.map +1 -0
- package/dist/graph/changed-symbols.js +123 -0
- package/dist/graph/changed-symbols.js.map +1 -0
- package/dist/graph/extractors/index.d.ts +3 -3
- package/dist/graph/extractors/index.d.ts.map +1 -1
- package/dist/graph/extractors/index.js +2 -2
- package/dist/graph/extractors/index.js.map +1 -1
- package/dist/graph/extractors/javascript.d.ts.map +1 -1
- package/dist/graph/extractors/javascript.js +89 -3
- package/dist/graph/extractors/javascript.js.map +1 -1
- package/dist/graph/extractors/rust.d.ts.map +1 -1
- package/dist/graph/extractors/rust.js +7 -2
- package/dist/graph/extractors/rust.js.map +1 -1
- package/dist/graph/extractors/types.d.ts +7 -1
- package/dist/graph/extractors/types.d.ts.map +1 -1
- package/dist/graph/extractors/typescript.d.ts.map +1 -1
- package/dist/graph/extractors/typescript.js +95 -4
- package/dist/graph/extractors/typescript.js.map +1 -1
- package/dist/graph/index.d.ts +8 -3
- package/dist/graph/index.d.ts.map +1 -1
- package/dist/graph/index.js +4 -2
- package/dist/graph/index.js.map +1 -1
- package/dist/graph/loader.d.ts +29 -0
- package/dist/graph/loader.d.ts.map +1 -1
- package/dist/graph/loader.js +70 -1
- package/dist/graph/loader.js.map +1 -1
- package/dist/graph/narrow-symbols.d.ts +73 -0
- package/dist/graph/narrow-symbols.d.ts.map +1 -0
- package/dist/graph/narrow-symbols.js +195 -0
- package/dist/graph/narrow-symbols.js.map +1 -0
- package/dist/graph/schema.d.ts +117 -4
- package/dist/graph/schema.d.ts.map +1 -1
- package/dist/graph/schema.js +67 -3
- package/dist/graph/schema.js.map +1 -1
- package/dist/graph/scip/builder.d.ts +64 -0
- package/dist/graph/scip/builder.d.ts.map +1 -0
- package/dist/graph/scip/builder.js +268 -0
- package/dist/graph/scip/builder.js.map +1 -0
- package/dist/graph/scip/merge.d.ts +66 -0
- package/dist/graph/scip/merge.d.ts.map +1 -0
- package/dist/graph/scip/merge.js +98 -0
- package/dist/graph/scip/merge.js.map +1 -0
- package/dist/index.d.ts +16 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/memory/decay.d.ts +40 -0
- package/dist/memory/decay.d.ts.map +1 -1
- package/dist/memory/decay.js +57 -0
- package/dist/memory/decay.js.map +1 -1
- package/dist/memory/engram.d.ts.map +1 -1
- package/dist/memory/engram.js +15 -3
- package/dist/memory/engram.js.map +1 -1
- package/dist/memory/search.d.ts +157 -0
- package/dist/memory/search.d.ts.map +1 -1
- package/dist/memory/search.js +420 -0
- package/dist/memory/search.js.map +1 -1
- package/dist/memory/sqlite.d.ts.map +1 -1
- package/dist/memory/sqlite.js +11 -3
- package/dist/memory/sqlite.js.map +1 -1
- package/dist/pipeline/execute.d.ts.map +1 -1
- package/dist/pipeline/execute.js +14 -0
- package/dist/pipeline/execute.js.map +1 -1
- package/dist/pipeline/prepare-graph.d.ts +23 -1
- package/dist/pipeline/prepare-graph.d.ts.map +1 -1
- package/dist/pipeline/prepare-graph.js +119 -3
- package/dist/pipeline/prepare-graph.js.map +1 -1
- package/dist/pipeline/prepare.d.ts.map +1 -1
- package/dist/pipeline/prepare.js +2 -0
- package/dist/pipeline/prepare.js.map +1 -1
- package/dist/providers/cli-bridge.d.ts +13 -11
- package/dist/providers/cli-bridge.d.ts.map +1 -1
- package/dist/providers/cli-bridge.js +156 -40
- package/dist/providers/cli-bridge.js.map +1 -1
- package/dist/providers/explanation-generate-fn.d.ts +28 -0
- package/dist/providers/explanation-generate-fn.d.ts.map +1 -0
- package/dist/providers/explanation-generate-fn.js +122 -0
- package/dist/providers/explanation-generate-fn.js.map +1 -0
- package/dist/types.d.ts +64 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -1
- package/package.json +15 -13
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SCIP → DependencyGraph Mapper
|
|
3
|
+
*
|
|
4
|
+
* Builds a v1 DependencyGraph from a parsed SCIP `Index` (as produced by
|
|
5
|
+
* `scip-go` and other SCIP-conformant indexers). Pure function: no
|
|
6
|
+
* filesystem access — the caller supplies the already-parsed Index (or
|
|
7
|
+
* raw bytes, via `parseScipIndex`).
|
|
8
|
+
*
|
|
9
|
+
* Unlike the regex-based `buildGraph()` (../builder.ts), this mapper
|
|
10
|
+
* resolves cross-file references by SCIP symbol identity rather than
|
|
11
|
+
* import-statement string matching, which lets it follow full
|
|
12
|
+
* module-path references a regex extractor cannot (e.g. Go's
|
|
13
|
+
* `example.com/module/pkg` import form).
|
|
14
|
+
*
|
|
15
|
+
* Algorithm:
|
|
16
|
+
* Pass A: build `symbolId -> definingDocPath` from every non-local
|
|
17
|
+
* symbol defined in each document (via `Document.symbols` and
|
|
18
|
+
* Definition-role occurrences).
|
|
19
|
+
* Pass B: for each document, for each non-definition (reference)
|
|
20
|
+
* occurrence, resolve `occ.symbol` through the Pass A map. If
|
|
21
|
+
* it resolves to a *different* in-index document, record that
|
|
22
|
+
* document's path as an import. Symbols with no entry in the
|
|
23
|
+
* map (external/stdlib symbols, e.g. those only present in
|
|
24
|
+
* `Index.externalSymbols`) are dropped — no edge is produced.
|
|
25
|
+
*
|
|
26
|
+
* `calls` is always `[]` in v1 (parity with the regex baseline — call-graph
|
|
27
|
+
* extraction is out of scope here). `SymbolInformation.relationships`
|
|
28
|
+
* (implements/type-definition/etc.) are intentionally ignored: v1 only
|
|
29
|
+
* models reference-based edges.
|
|
30
|
+
*
|
|
31
|
+
* Pass B additionally accumulates `importSymbols` (see schema.ts):
|
|
32
|
+
* alongside `importSet.add(targetPath)`, resolved reference occurrences are
|
|
33
|
+
* grouped into `Map<targetPath, Set<symbolId>>`, DEDUPED BY `occ.symbol`
|
|
34
|
+
* IDENTITY (not by rendered displayName — two distinct symbols that happen
|
|
35
|
+
* to render the same display name must stay as two separate entries). The
|
|
36
|
+
* displayName (from Pass A's `displayNameMap`, falling back to the raw
|
|
37
|
+
* symbol id) is only resolved at emit time.
|
|
38
|
+
*/
|
|
39
|
+
import { createHash } from 'node:crypto';
|
|
40
|
+
import { fromBinary } from '@bufbuild/protobuf';
|
|
41
|
+
import { IndexSchema, SymbolRole, } from '@scip-code/scip';
|
|
42
|
+
import { detectLanguage } from '../builder.js';
|
|
43
|
+
import { GRAPH_VERSION, isTestFile, } from '../schema.js';
|
|
44
|
+
// ─── Parsing ────────────────────────────────────────────────────
|
|
45
|
+
/**
|
|
46
|
+
* Parse raw SCIP index bytes (the contents of an `index.scip` file)
|
|
47
|
+
* into a typed `Index` message.
|
|
48
|
+
*/
|
|
49
|
+
export function parseScipIndex(bytes) {
|
|
50
|
+
return fromBinary(IndexSchema, bytes);
|
|
51
|
+
}
|
|
52
|
+
// ─── Helpers ────────────────────────────────────────────────────
|
|
53
|
+
/**
|
|
54
|
+
* SCIP marks symbols scoped to a single document/scope with a `local `
|
|
55
|
+
* prefix (e.g. `local 0`). These can never be referenced cross-document,
|
|
56
|
+
* so they're excluded from both the definition map and exports.
|
|
57
|
+
*/
|
|
58
|
+
function isLocalSymbol(symbolId) {
|
|
59
|
+
return symbolId.startsWith('local ');
|
|
60
|
+
}
|
|
61
|
+
function hasRole(roles, role) {
|
|
62
|
+
return (roles & role) !== 0;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* D6 (LANDMINE): convert SCIP's 0-based, end-EXCLUSIVE line convention to
|
|
66
|
+
* the graph's 1-based INCLUSIVE convention. `endChar === 0` means line
|
|
67
|
+
* `scipEndLine` holds no in-range content (the range ends exactly at the
|
|
68
|
+
* start of that line) — so the last inclusive 1-based line is `scipEndLine`
|
|
69
|
+
* itself, not `scipEndLine + 1`.
|
|
70
|
+
*/
|
|
71
|
+
function convertRange(scipStartLine, scipEndLine, endChar) {
|
|
72
|
+
const start1 = scipStartLine + 1;
|
|
73
|
+
const end1 = endChar > 0 ? scipEndLine + 1 : scipEndLine;
|
|
74
|
+
return [start1, end1];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* D2: capture a Definition occurrence's full-body enclosing range.
|
|
78
|
+
* Priority order (per the SCIP proto doc): `typedEnclosingRange` (java's
|
|
79
|
+
* `multiLineEnclosingRange`/`singleLineEnclosingRange` oneof — the newer
|
|
80
|
+
* form) takes precedence when set, else the deprecated flat
|
|
81
|
+
* `enclosingRange` (`[startLine, startChar, endLine, endChar]` — the only
|
|
82
|
+
* form go/ts/rust indexers in the wild emit today). Neither present →
|
|
83
|
+
* `undefined` — the caller must NOT fabricate a range; that symbol's
|
|
84
|
+
* changes simply go unattributed downstream.
|
|
85
|
+
*/
|
|
86
|
+
function extractEnclosingRange(occ) {
|
|
87
|
+
const typed = occ.typedEnclosingRange;
|
|
88
|
+
if (typed.case === 'multiLineEnclosingRange') {
|
|
89
|
+
return convertRange(typed.value.startLine, typed.value.endLine, typed.value.endCharacter);
|
|
90
|
+
}
|
|
91
|
+
if (typed.case === 'singleLineEnclosingRange') {
|
|
92
|
+
return convertRange(typed.value.line, typed.value.line, typed.value.endCharacter);
|
|
93
|
+
}
|
|
94
|
+
if (occ.enclosingRange.length === 4) {
|
|
95
|
+
const [startLine, , endLine, endChar] = occ.enclosingRange;
|
|
96
|
+
return convertRange(startLine, endLine, endChar);
|
|
97
|
+
}
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
/** Map a SCIP `Document.language` string to a ghagga `SupportedLanguage`. */
|
|
101
|
+
const SCIP_LANGUAGE_MAP = {
|
|
102
|
+
go: 'go',
|
|
103
|
+
typescript: 'typescript',
|
|
104
|
+
javascript: 'javascript',
|
|
105
|
+
python: 'python',
|
|
106
|
+
java: 'java',
|
|
107
|
+
rust: 'rust',
|
|
108
|
+
kotlin: 'kotlin',
|
|
109
|
+
csharp: 'csharp',
|
|
110
|
+
'c#': 'csharp',
|
|
111
|
+
php: 'php',
|
|
112
|
+
};
|
|
113
|
+
function scipLanguageToSupported(docLanguage, relativePath) {
|
|
114
|
+
const normalized = docLanguage.toLowerCase();
|
|
115
|
+
return SCIP_LANGUAGE_MAP[normalized] ?? detectLanguage(relativePath);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Compute a stable hash for a document node. SCIP indexers typically omit
|
|
119
|
+
* `Document.text` (it's optional and not included by default), so we fall
|
|
120
|
+
* back to hashing the sorted list of symbols defined in the document —
|
|
121
|
+
* stable across re-runs of the same indexer against unchanged source.
|
|
122
|
+
*/
|
|
123
|
+
function hashDocument(doc) {
|
|
124
|
+
if (doc.text) {
|
|
125
|
+
return createHash('sha256').update(doc.text).digest('hex');
|
|
126
|
+
}
|
|
127
|
+
const symbolIds = doc.symbols
|
|
128
|
+
.map((s) => s.symbol)
|
|
129
|
+
.filter((s) => s && !isLocalSymbol(s))
|
|
130
|
+
.sort();
|
|
131
|
+
return createHash('sha256').update(symbolIds.join('\n')).digest('hex');
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Build a complete DependencyGraph from a parsed SCIP Index.
|
|
135
|
+
*
|
|
136
|
+
* @param index - Parsed SCIP Index (see `parseScipIndex`)
|
|
137
|
+
* @param opts - Optional hooks (see `BuildGraphFromScipOptions`)
|
|
138
|
+
* @returns Complete v1 DependencyGraph
|
|
139
|
+
*/
|
|
140
|
+
export function buildGraphFromScip(index, opts) {
|
|
141
|
+
const rootDir = index.metadata?.projectRoot ?? '';
|
|
142
|
+
const nodes = {};
|
|
143
|
+
// Pass A: symbolId -> definingDocPath, from every non-local symbol
|
|
144
|
+
// defined in each document (Document.symbols is authoritative per the
|
|
145
|
+
// SCIP proto: "Symbols that are defined within this document").
|
|
146
|
+
const definitionMap = new Map();
|
|
147
|
+
// symbolId -> displayName, used at Pass-B emit time to render a
|
|
148
|
+
// human-readable name for `importSymbols`. Only set when the indexer
|
|
149
|
+
// supplies a non-empty displayName; falls back to the raw symbol id.
|
|
150
|
+
const displayNameMap = new Map();
|
|
151
|
+
// docPath -> (displayName -> [startLine, endLine]), 1-based inclusive
|
|
152
|
+
// (D6). Populated from Definition-occurrence enclosingRange/
|
|
153
|
+
// typedEnclosingRange (D2), keyed the SAME way as `exports`/
|
|
154
|
+
// `importSymbols` (D1) so downstream diff-line attribution can compare
|
|
155
|
+
// against those spaces directly. Emitted into `GraphNode.symbolRanges`
|
|
156
|
+
// once all documents are scanned (see the node-init loop below).
|
|
157
|
+
const rangesByDoc = new Map();
|
|
158
|
+
for (const doc of index.documents) {
|
|
159
|
+
for (const symInfo of doc.symbols) {
|
|
160
|
+
if (!symInfo.symbol || isLocalSymbol(symInfo.symbol))
|
|
161
|
+
continue;
|
|
162
|
+
if (!definitionMap.has(symInfo.symbol)) {
|
|
163
|
+
definitionMap.set(symInfo.symbol, doc.relativePath);
|
|
164
|
+
}
|
|
165
|
+
if (symInfo.displayName && !displayNameMap.has(symInfo.symbol)) {
|
|
166
|
+
displayNameMap.set(symInfo.symbol, symInfo.displayName);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
// Reinforce with Definition-role occurrences, in case an indexer
|
|
170
|
+
// omits some defined symbols from Document.symbols. Also the capture
|
|
171
|
+
// point for symbolRanges (D2).
|
|
172
|
+
for (const occ of doc.occurrences) {
|
|
173
|
+
if (!occ.symbol || isLocalSymbol(occ.symbol))
|
|
174
|
+
continue;
|
|
175
|
+
if (!hasRole(occ.symbolRoles, SymbolRole.Definition))
|
|
176
|
+
continue;
|
|
177
|
+
if (!definitionMap.has(occ.symbol)) {
|
|
178
|
+
definitionMap.set(occ.symbol, doc.relativePath);
|
|
179
|
+
}
|
|
180
|
+
const range = extractEnclosingRange(occ);
|
|
181
|
+
if (range) {
|
|
182
|
+
const displayName = displayNameMap.get(occ.symbol) || occ.symbol;
|
|
183
|
+
let ranges = rangesByDoc.get(doc.relativePath);
|
|
184
|
+
if (!ranges) {
|
|
185
|
+
ranges = {};
|
|
186
|
+
rangesByDoc.set(doc.relativePath, ranges);
|
|
187
|
+
}
|
|
188
|
+
const existing = ranges[displayName];
|
|
189
|
+
// D1: displayName collision (e.g. overloads) — union of
|
|
190
|
+
// min-start..max-end rather than overwriting.
|
|
191
|
+
ranges[displayName] = existing
|
|
192
|
+
? [Math.min(existing[0], range[0]), Math.max(existing[1], range[1])]
|
|
193
|
+
: range;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
// Initialize nodes with exports derived from Document.symbols.
|
|
198
|
+
for (const doc of index.documents) {
|
|
199
|
+
const language = scipLanguageToSupported(doc.language, doc.relativePath);
|
|
200
|
+
if (!language) {
|
|
201
|
+
opts?.onUnmappedDoc?.(doc.relativePath, doc.language);
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
const exportsSet = new Set();
|
|
205
|
+
for (const symInfo of doc.symbols) {
|
|
206
|
+
if (!symInfo.symbol || isLocalSymbol(symInfo.symbol))
|
|
207
|
+
continue;
|
|
208
|
+
exportsSet.add(symInfo.displayName || symInfo.symbol);
|
|
209
|
+
}
|
|
210
|
+
nodes[doc.relativePath] = {
|
|
211
|
+
hash: hashDocument(doc),
|
|
212
|
+
language,
|
|
213
|
+
imports: [],
|
|
214
|
+
exports: Array.from(exportsSet),
|
|
215
|
+
calls: [],
|
|
216
|
+
isTest: isTestFile(doc.relativePath),
|
|
217
|
+
};
|
|
218
|
+
const ranges = rangesByDoc.get(doc.relativePath);
|
|
219
|
+
if (ranges && Object.keys(ranges).length > 0) {
|
|
220
|
+
const node = nodes[doc.relativePath];
|
|
221
|
+
if (node)
|
|
222
|
+
node.symbolRanges = ranges;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
// Pass B: resolve reference occurrences to import edges.
|
|
226
|
+
for (const doc of index.documents) {
|
|
227
|
+
const node = nodes[doc.relativePath];
|
|
228
|
+
if (!node)
|
|
229
|
+
continue;
|
|
230
|
+
const importSet = new Set();
|
|
231
|
+
// targetPath -> Set<occ.symbol> — deduped by SYMBOL IDENTITY, not by
|
|
232
|
+
// displayName (the explicit fix for the 3vr dedup-by-displayName bug
|
|
233
|
+
// on the abandoned calls[] branch).
|
|
234
|
+
const symbolIdsByTarget = new Map();
|
|
235
|
+
for (const occ of doc.occurrences) {
|
|
236
|
+
if (!occ.symbol || isLocalSymbol(occ.symbol))
|
|
237
|
+
continue;
|
|
238
|
+
// Only reference occurrences (not the symbol's own definition) can
|
|
239
|
+
// introduce an edge.
|
|
240
|
+
if (hasRole(occ.symbolRoles, SymbolRole.Definition))
|
|
241
|
+
continue;
|
|
242
|
+
const targetPath = definitionMap.get(occ.symbol);
|
|
243
|
+
if (!targetPath || targetPath === doc.relativePath)
|
|
244
|
+
continue;
|
|
245
|
+
importSet.add(targetPath);
|
|
246
|
+
let ids = symbolIdsByTarget.get(targetPath);
|
|
247
|
+
if (!ids) {
|
|
248
|
+
ids = new Set();
|
|
249
|
+
symbolIdsByTarget.set(targetPath, ids);
|
|
250
|
+
}
|
|
251
|
+
ids.add(occ.symbol);
|
|
252
|
+
}
|
|
253
|
+
node.imports = Array.from(importSet);
|
|
254
|
+
if (symbolIdsByTarget.size > 0) {
|
|
255
|
+
const importSymbols = {};
|
|
256
|
+
for (const [targetPath, symbolIds] of symbolIdsByTarget) {
|
|
257
|
+
importSymbols[targetPath] = Array.from(symbolIds, (id) => displayNameMap.get(id) ?? id);
|
|
258
|
+
}
|
|
259
|
+
node.importSymbols = importSymbols;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return {
|
|
263
|
+
version: GRAPH_VERSION,
|
|
264
|
+
rootDir,
|
|
265
|
+
nodes,
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
//# sourceMappingURL=builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../../src/graph/scip/builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAGL,WAAW,EAEX,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAEL,aAAa,EAEb,UAAU,GAEX,MAAM,cAAc,CAAC;AAEtB,mEAAmE;AAEnE;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAiB;IAC9C,OAAO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AACxC,CAAC;AAED,mEAAmE;AAEnE;;;;GAIG;AACH,SAAS,aAAa,CAAC,QAAgB;IACrC,OAAO,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC;AAED,SAAS,OAAO,CAAC,KAAa,EAAE,IAAgB;IAC9C,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED;;;;;;GAMG;AACH,SAAS,YAAY,CACnB,aAAqB,EACrB,WAAmB,EACnB,OAAe;IAEf,MAAM,MAAM,GAAG,aAAa,GAAG,CAAC,CAAC;IACjC,MAAM,IAAI,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IACzD,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC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CAAC;YACjD,IAAI,CAAC,UAAU,IAAI,UAAU,KAAK,GAAG,CAAC,YAAY;gBAAE,SAAS;YAC7D,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAE1B,IAAI,GAAG,GAAG,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC5C,IAAI,CAAC,GAAG,EAAE,CAAC;gBACT,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;gBAChB,iBAAiB,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;YACzC,CAAC;YACD,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACtB,CAAC;QACD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAErC,IAAI,iBAAiB,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YAC/B,MAAM,aAAa,GAA6B,EAAE,CAAC;YACnD,KAAK,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,iBAAiB,EAAE,CAAC;gBACxD,aAAa,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;YAC1F,CAAC;YACD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACrC,CAAC;IACH,CAAC;IAED,OAAO;QACL,OAAO,EAAE,aAAa;QACtB,OAAO;QACP,KAAK;KACN,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-`.scip` merge (D4).
|
|
3
|
+
*
|
|
4
|
+
* Merges 2+ parsed SCIP `Index` objects (one per successfully-run
|
|
5
|
+
* per-{language,marker-directory} indexer run) into a single `Index` before
|
|
6
|
+
* ONE `buildGraphFromScip` call. Pure/testable: no filesystem or console
|
|
7
|
+
* access — the dispatcher (`index-cmd.ts`) is responsible for logging
|
|
8
|
+
* `duplicatePaths`.
|
|
9
|
+
*
|
|
10
|
+
* `buildGraphFromScip` only reads `Index.documents` and
|
|
11
|
+
* `Index.metadata.projectRoot`, so the merge:
|
|
12
|
+
* - for each input, POSIX-joins its `pathPrefix` (the marker directory,
|
|
13
|
+
* repo-relative) onto every document's own `relativePath` BEFORE the
|
|
14
|
+
* `byPath` insert — each indexer emits paths relative to the `dir` it
|
|
15
|
+
* ran in, so this makes every document key repo-relative, matching
|
|
16
|
+
* `buildGraphFromScip`'s node keys (which blast-radius/review match
|
|
17
|
+
* against git-diff paths)
|
|
18
|
+
* - keeps the FIRST input's `metadata` (arbitrary but stable choice —
|
|
19
|
+
* all indexers run against the same repoPath, so `projectRoot` should
|
|
20
|
+
* already agree)
|
|
21
|
+
* - drops `externalSymbols` (unused by the mapper)
|
|
22
|
+
*
|
|
23
|
+
* Collision policy: after prefixing, a `duplicatePath` is a GENUINE
|
|
24
|
+
* same-subdirectory collision (real signal) — not a cross-subdir false
|
|
25
|
+
* positive, since two different marker directories now produce distinct
|
|
26
|
+
* keys even when their bare filenames match (e.g. two `main.py`). Warn +
|
|
27
|
+
* last-registry-order wins — the merge stays pure, so it reports
|
|
28
|
+
* `duplicatePaths` for the caller to log rather than logging itself.
|
|
29
|
+
*
|
|
30
|
+
* Path-escape guard: `posix.join(prefix, relativePath)` RESOLVES `..`
|
|
31
|
+
* segments. An indexer emitting a `relativePath` containing `..` (only
|
|
32
|
+
* `scip-typescript` is known to do this from a subdir cwd, which is why
|
|
33
|
+
* `collapseTypescriptPairs` avoids per-subdir TS runs — but every other
|
|
34
|
+
* per-subdir indexer has no such guard) could otherwise produce a merged
|
|
35
|
+
* document key that escapes the marker directory / repo-relative root,
|
|
36
|
+
* silently mis-keying or overwriting an unrelated graph node. Any document
|
|
37
|
+
* whose joined path escapes the repo-relative root (starts with `..` after
|
|
38
|
+
* normalization, or is absolute) is SKIPPED — not inserted — and reported
|
|
39
|
+
* via `escapedPaths` for the caller to warn about. Skip+warn, not clamp: an
|
|
40
|
+
* escaping path means that document's own metadata is untrustworthy.
|
|
41
|
+
*/
|
|
42
|
+
import type { Index } from '@scip-code/scip';
|
|
43
|
+
export interface MergeScipIndexesResult {
|
|
44
|
+
index: Index;
|
|
45
|
+
duplicatePaths: string[];
|
|
46
|
+
/**
|
|
47
|
+
* Documents dropped because their prefixed path escaped the
|
|
48
|
+
* repo-relative root (e.g. an indexer-emitted `relativePath` with `..`
|
|
49
|
+
* segments resolving outside the marker directory). Never inserted into
|
|
50
|
+
* `index.documents` — the caller should warn about these.
|
|
51
|
+
*/
|
|
52
|
+
escapedPaths: string[];
|
|
53
|
+
}
|
|
54
|
+
/** One successfully-run indexer's parsed output, plus its source marker directory. */
|
|
55
|
+
export interface MergeScipIndexesInput {
|
|
56
|
+
index: Index;
|
|
57
|
+
/**
|
|
58
|
+
* The marker directory this index was produced from, relative to repo
|
|
59
|
+
* root (POSIX or OS-native — normalized here). `''` (or `'.'`, as
|
|
60
|
+
* produced by `path.relative(repoPath, repoPath)`) means repo root: no
|
|
61
|
+
* prefixing applied.
|
|
62
|
+
*/
|
|
63
|
+
pathPrefix: string;
|
|
64
|
+
}
|
|
65
|
+
export declare function mergeScipIndexes(inputs: MergeScipIndexesInput[]): MergeScipIndexesResult;
|
|
66
|
+
//# sourceMappingURL=merge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/graph/scip/merge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAIH,OAAO,KAAK,EAAY,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAGvD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,sFAAsF;AACtF,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,KAAK,CAAC;IACb;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AA8BD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,sBAAsB,CA8BxF"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-`.scip` merge (D4).
|
|
3
|
+
*
|
|
4
|
+
* Merges 2+ parsed SCIP `Index` objects (one per successfully-run
|
|
5
|
+
* per-{language,marker-directory} indexer run) into a single `Index` before
|
|
6
|
+
* ONE `buildGraphFromScip` call. Pure/testable: no filesystem or console
|
|
7
|
+
* access — the dispatcher (`index-cmd.ts`) is responsible for logging
|
|
8
|
+
* `duplicatePaths`.
|
|
9
|
+
*
|
|
10
|
+
* `buildGraphFromScip` only reads `Index.documents` and
|
|
11
|
+
* `Index.metadata.projectRoot`, so the merge:
|
|
12
|
+
* - for each input, POSIX-joins its `pathPrefix` (the marker directory,
|
|
13
|
+
* repo-relative) onto every document's own `relativePath` BEFORE the
|
|
14
|
+
* `byPath` insert — each indexer emits paths relative to the `dir` it
|
|
15
|
+
* ran in, so this makes every document key repo-relative, matching
|
|
16
|
+
* `buildGraphFromScip`'s node keys (which blast-radius/review match
|
|
17
|
+
* against git-diff paths)
|
|
18
|
+
* - keeps the FIRST input's `metadata` (arbitrary but stable choice —
|
|
19
|
+
* all indexers run against the same repoPath, so `projectRoot` should
|
|
20
|
+
* already agree)
|
|
21
|
+
* - drops `externalSymbols` (unused by the mapper)
|
|
22
|
+
*
|
|
23
|
+
* Collision policy: after prefixing, a `duplicatePath` is a GENUINE
|
|
24
|
+
* same-subdirectory collision (real signal) — not a cross-subdir false
|
|
25
|
+
* positive, since two different marker directories now produce distinct
|
|
26
|
+
* keys even when their bare filenames match (e.g. two `main.py`). Warn +
|
|
27
|
+
* last-registry-order wins — the merge stays pure, so it reports
|
|
28
|
+
* `duplicatePaths` for the caller to log rather than logging itself.
|
|
29
|
+
*
|
|
30
|
+
* Path-escape guard: `posix.join(prefix, relativePath)` RESOLVES `..`
|
|
31
|
+
* segments. An indexer emitting a `relativePath` containing `..` (only
|
|
32
|
+
* `scip-typescript` is known to do this from a subdir cwd, which is why
|
|
33
|
+
* `collapseTypescriptPairs` avoids per-subdir TS runs — but every other
|
|
34
|
+
* per-subdir indexer has no such guard) could otherwise produce a merged
|
|
35
|
+
* document key that escapes the marker directory / repo-relative root,
|
|
36
|
+
* silently mis-keying or overwriting an unrelated graph node. Any document
|
|
37
|
+
* whose joined path escapes the repo-relative root (starts with `..` after
|
|
38
|
+
* normalization, or is absolute) is SKIPPED — not inserted — and reported
|
|
39
|
+
* via `escapedPaths` for the caller to warn about. Skip+warn, not clamp: an
|
|
40
|
+
* escaping path means that document's own metadata is untrustworthy.
|
|
41
|
+
*/
|
|
42
|
+
import { posix } from 'node:path';
|
|
43
|
+
import { create } from '@bufbuild/protobuf';
|
|
44
|
+
import { IndexSchema } from '@scip-code/scip';
|
|
45
|
+
/** Convert any OS-native separators to POSIX `/`. */
|
|
46
|
+
function toPosixPath(p) {
|
|
47
|
+
return p.split('\\').join('/');
|
|
48
|
+
}
|
|
49
|
+
/** Normalize a pathPrefix: POSIX-ify, and treat `.`/`''` as "no prefix". */
|
|
50
|
+
function normalizePrefix(prefix) {
|
|
51
|
+
const posixPrefix = toPosixPath(prefix);
|
|
52
|
+
return posixPrefix === '.' ? '' : posixPrefix;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Merge multiple parsed SCIP indexes into one, disambiguating each
|
|
56
|
+
* document's path by the marker directory it was produced from.
|
|
57
|
+
*
|
|
58
|
+
* @param inputs - `{index, pathPrefix}` pairs, one per successfully-run
|
|
59
|
+
* indexer, in the order they should be merged (last wins on path
|
|
60
|
+
* collision after prefixing).
|
|
61
|
+
*/
|
|
62
|
+
/**
|
|
63
|
+
* Whether `p` (already `posix.join`-resolved) escapes the repo-relative
|
|
64
|
+
* root: it resolves to an absolute path, or its first segment is `..`
|
|
65
|
+
* (meaning the join climbed above the root it started from).
|
|
66
|
+
*/
|
|
67
|
+
function escapesRoot(p) {
|
|
68
|
+
return posix.isAbsolute(p) || p === '..' || p.startsWith('../');
|
|
69
|
+
}
|
|
70
|
+
export function mergeScipIndexes(inputs) {
|
|
71
|
+
const byPath = new Map();
|
|
72
|
+
const duplicatePaths = [];
|
|
73
|
+
const escapedPaths = [];
|
|
74
|
+
for (const { index, pathPrefix } of inputs) {
|
|
75
|
+
const normalizedPrefix = normalizePrefix(pathPrefix);
|
|
76
|
+
for (const doc of index.documents) {
|
|
77
|
+
const relativePath = toPosixPath(doc.relativePath);
|
|
78
|
+
const prefixedPath = normalizedPrefix
|
|
79
|
+
? posix.join(normalizedPrefix, relativePath)
|
|
80
|
+
: relativePath;
|
|
81
|
+
if (escapesRoot(prefixedPath)) {
|
|
82
|
+
escapedPaths.push(prefixedPath);
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if (byPath.has(prefixedPath)) {
|
|
86
|
+
duplicatePaths.push(prefixedPath);
|
|
87
|
+
}
|
|
88
|
+
byPath.set(prefixedPath, { ...doc, relativePath: prefixedPath });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const merged = create(IndexSchema, {
|
|
92
|
+
metadata: inputs[0]?.index.metadata,
|
|
93
|
+
documents: Array.from(byPath.values()),
|
|
94
|
+
externalSymbols: [],
|
|
95
|
+
});
|
|
96
|
+
return { index: merged, duplicatePaths, escapedPaths };
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=merge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../src/graph/scip/merge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;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CAAC;gBAC9B,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBAChC,SAAS;YACX,CAAC;YACD,IAAI,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;gBAC7B,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACpC,CAAC;YACD,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,GAAG,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE;QACjC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ;QACnC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACtC,eAAe,EAAE,EAAE;KACpB,CAAC,CAAC;IAEH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC;AACzD,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* This module re-exports the pipeline entry point and all public types.
|
|
6
6
|
*/
|
|
7
7
|
export { reviewPipeline } from './pipeline.js';
|
|
8
|
-
export type { ConsensusStance, ConsensusVote, FindingSeverity, FindingSource, Hypothesis, HypothesisConfidence, ListObservationsOptions, LLMProvider, MemoryObservation, MemoryObservationDetail, MemoryObservationRow, MemoryStats, MemoryStorage, ObservationType, ProgressCallback, ProgressEvent, ProviderChainEntry, ReviewContext, ReviewFinding, ReviewInput, ReviewLevel, ReviewMetadata, ReviewMode, ReviewResult, ReviewSettings, ReviewStatus, SaaSProvider, StaticAnalysisResult, ToolResult, ToolStatus, WorkflowSpecialist, } from './types.js';
|
|
8
|
+
export type { ConsensusStance, ConsensusVote, FindingLedgerStatus, FindingSeverity, FindingSource, Hypothesis, HypothesisConfidence, ListObservationsOptions, LLMProvider, MemoryObservation, MemoryObservationDetail, MemoryObservationRow, MemoryStats, MemoryStorage, ObservationType, ProgressCallback, ProgressEvent, ProviderChainEntry, ReviewContext, ReviewFinding, ReviewInput, ReviewLevel, ReviewMetadata, ReviewMode, ReviewResult, ReviewSettings, ReviewStatus, SaaSProvider, StaticAnalysisResult, ToolResult, ToolStatus, WorkflowSpecialist, } from './types.js';
|
|
9
9
|
export { runAuditReport } from './agents/audit.js';
|
|
10
10
|
export type { AuditInput, AuditResult, AuditStatus } from './types.js';
|
|
11
11
|
export type { DiagnosticReviewInput } from './agents/diagnostic.js';
|
|
12
12
|
export { parseHypotheses, runDiagnosticReview } from './agents/diagnostic.js';
|
|
13
13
|
export type { FanOutReviewInput, LensValidationResult, ReviewLens, } from './agents/fan-out-lenses.js';
|
|
14
|
-
export { DEFAULT_LENSES, getAllLenses, getLens, LENS_ACCESSIBILITY, LENS_ERROR_HANDLING, LENS_PERFORMANCE, LENS_SECURITY, LENS_TYPING, loadLensesFromDir, mergeFindings, registerLens, resetLensRegistry, runFanOutReview, validateLens, } from './agents/fan-out-lenses.js';
|
|
14
|
+
export { DEFAULT_LENSES, getAllLenses, getLens, LENS_ACCESSIBILITY, LENS_ERROR_HANDLING, LENS_PERFORMANCE, LENS_SECURITY, LENS_TYPING, loadLensesFromDir, mergeFindings, registerLens, resetLensRegistry, runFanOutReview, stampFindingLedger, validateLens, } from './agents/fan-out-lenses.js';
|
|
15
15
|
export type { Contradiction, DecayConfig, MemoryBranch, MemorySnapshot, MergeResult, VersioningConfig, } from './types.js';
|
|
16
|
-
export { DEFAULT_DECAY_CONFIG, DEFAULT_MODELS, DEFAULT_SETTINGS, DEFAULT_VERSIONING_CONFIG, } from './types.js';
|
|
16
|
+
export { DEFAULT_DECAY_CONFIG, DEFAULT_MODELS, DEFAULT_SETTINGS, DEFAULT_VERSIONING_CONFIG, FINDING_LEDGER_STATUS, } from './types.js';
|
|
17
17
|
export type { ContextLevel, ProgressiveContextInput, ProgressiveContextOutput, } from './utils/context-levels.js';
|
|
18
18
|
export { buildProgressiveContext, chooseContextLevel, collectAllFindings, collectToolNames, estimateTokens, formatMemoryContextL0, formatMemoryContextL1, formatStaticContextL0, formatStaticContextL1, } from './utils/context-levels.js';
|
|
19
19
|
export type { DiffFile, FilterDiffResult } from './utils/diff.js';
|
|
@@ -22,21 +22,29 @@ export type { PathProtectionResult } from './utils/path-protection.js';
|
|
|
22
22
|
export { applyPathProtection, REDACT_PATTERNS, REDACTED_CONTENT, ZERO_ACCESS_PATTERNS, } from './utils/path-protection.js';
|
|
23
23
|
export { detectStacks } from './utils/stack-detect.js';
|
|
24
24
|
export { calculateRateSchedule, calculateTokenBudget, getContextWindow, } from './utils/token-budget.js';
|
|
25
|
+
export { resolveGenerateTextFns, resolvePrimaryProvider } from './pipeline/providers.js';
|
|
25
26
|
export type { CLIBridgeOptions, CLIToolName } from './providers/cli-bridge.js';
|
|
26
27
|
export { CLIConfigurationError, generateViaCLI, getAvailableCLIs, OPENCODE_ENV_BY_PREFIX, sanitizeErrorMessage, } from './providers/cli-bridge.js';
|
|
28
|
+
export { createExplanationOllamaGenerateFn, type ExplanationGenerateResult, type ExplanationGenerateTextFn, generateExplanation, resolveExplanationGenerateFn, } from './providers/explanation-generate-fn.js';
|
|
27
29
|
export type { GatewayOptions, GatewayResponse } from './providers/gateway.js';
|
|
28
30
|
export { generateViaGateway } from './providers/gateway.js';
|
|
29
31
|
export type { ChainValidationResult, GatewayModelEntry, GatewayProviderStatus, } from './providers/gateway-discovery.js';
|
|
30
32
|
export { fetchGatewayModels, fetchGatewayProviders, validateProviderChain, } from './providers/gateway-discovery.js';
|
|
31
33
|
export type { GenerateResult, GenerateTextFn } from './providers/generate-fn.js';
|
|
32
34
|
export { createCLIBridgeGenerateFn, createGatewayGenerateFn, createOllamaGenerateFn, } from './providers/generate-fn.js';
|
|
35
|
+
export { discoverCodePaths, discoverSearchTerms } from './agents/issue-code-discovery.js';
|
|
36
|
+
export type { IssueClassification, IssueComment, IssueTriageInput, IssueTriageResult, IssueTriageSource, } from './agents/issue-triage.js';
|
|
37
|
+
export { DEFAULT_CLASSIFICATION, DEFAULT_CONFIDENCE, ISSUE_CLASSIFICATIONS, runIssueTriage, } from './agents/issue-triage.js';
|
|
38
|
+
export { ISSUE_TRIAGE_SYSTEM } from './agents/prompts.js';
|
|
33
39
|
export { fingerprintContext, fingerprintFinding, formatNegativeExamplesPrompt, } from './negative.js';
|
|
34
40
|
export { formatMemoryContext } from './memory/context.js';
|
|
35
41
|
export { detectContradictions } from './memory/contradiction.js';
|
|
36
|
-
export { computeStrength, decayPhase } from './memory/decay.js';
|
|
42
|
+
export { computeStrength, decayPhase, normalizeBm25Relevance, normalizeRankRelevance, } from './memory/decay.js';
|
|
37
43
|
export { EngramMemoryStorage } from './memory/engram.js';
|
|
38
44
|
export { createProjectPageIndex, type PageContextRequest, type PageContextResponse, PageDirection, type ProjectPageChunk, ProjectPageIndexService, } from './memory/pageindex/index.js';
|
|
39
45
|
export { stripPrivateData } from './memory/privacy.js';
|
|
46
|
+
export type { IssueDedupMatch, IssueDedupResult } from './memory/search.js';
|
|
47
|
+
export { buildIssueSearchQuery, DEDUP_SCORE_THRESHOLD, findIssueDuplicates, ISSUE_TRIAGE_OBSERVATION_TYPE, } from './memory/search.js';
|
|
40
48
|
export { SqliteMemoryStorage, type SqliteMemoryStorageOptions } from './memory/sqlite.js';
|
|
41
49
|
export { BranchExistsError, BranchNotFoundError, MemoryVersioning, ProtectedBranchError, SnapshotExistsError, SnapshotNotFoundError, } from './memory/versioning.js';
|
|
42
50
|
export type { FileStats, FormatReviewCommentOptions } from './format.js';
|
|
@@ -52,8 +60,8 @@ export type { EnhancedReviewFinding, EnhanceInput, EnhanceMetadata, EnhanceResul
|
|
|
52
60
|
export { enhanceFindings, mergeEnhanceResult } from './enhance/index.js';
|
|
53
61
|
export type { RecursiveReviewConfig, RecursiveReviewInput, RecursiveReviewReport, RegressionFinding, ReReviewInput, ReReviewResult, SuggestionPatch, VirtualPatchResult, } from './recursive/index.js';
|
|
54
62
|
export { applyVirtualPatches, buildPatchContext, DEFAULT_RECURSIVE_CONFIG, extractPatches, recursiveReview, runReReview, } from './recursive/index.js';
|
|
55
|
-
export type { BlastRadiusMetadata, BlastRadiusOptions, BlastRadiusResult, DependencyGraph, ExportInfo, Extractor, GraphLoader, GraphMetadata, GraphNode, ImportInfo, SupportedLanguage, } from './graph/index.js';
|
|
56
|
-
export { buildGraph, buildGraphIncremental, buildReverseIndex, computeBlastRadius, DEFAULT_TRAVERSAL_DEPTH, detectLanguage, EXCLUDED_DIRS, GitHubApiGraphLoader, GRAPH_STALE_DAYS, GRAPH_VERSION, getExtractor, isGraphStale, isTestFile, LANGUAGE_EXTENSIONS, MAX_BLAST_RADIUS_FILES, MAX_GRAPH_SIZE_BYTES, NullGraphLoader, PreloadedGraphLoader, resolveImportPath, TEST_FILE_PATTERNS, validateGraph, validateMetadata, } from './graph/index.js';
|
|
63
|
+
export type { BlastRadiusMetadata, BlastRadiusOptions, BlastRadiusResult, BuildGraphFromScipOptions, DependencyGraph, ExportInfo, Extractor, FilesystemGraphLoaderOptions, GraphLoader, GraphMetadata, GraphNode, ImportInfo, Index, MergeScipIndexesInput, MergeScipIndexesResult, RegexSupportedLanguage, ScipOnlyLanguage, SupportedLanguage, } from './graph/index.js';
|
|
64
|
+
export { buildGraph, buildGraphFromScip, buildGraphIncremental, buildReverseIndex, computeBlastRadius, DEFAULT_TRAVERSAL_DEPTH, detectLanguage, EXCLUDED_DIRS, FilesystemGraphLoader, GitHubApiGraphLoader, GRAPH_STALE_DAYS, GRAPH_VERSION, getExtractor, isGraphStale, isTestFile, LANGUAGE_EXTENSIONS, MAX_BLAST_RADIUS_FILES, MAX_GRAPH_SIZE_BYTES, mergeScipIndexes, NullGraphLoader, PreloadedGraphLoader, parseScipIndex, REGEX_SUPPORTED_LANGUAGES, resolveImportPath, SCIP_ONLY_LANGUAGES, TEST_FILE_PATTERNS, validateGraph, validateMetadata, } from './graph/index.js';
|
|
57
65
|
export type { HealthHistoryEntry, HealthRecommendation, HealthScore, HealthTrend, } from './health/index.js';
|
|
58
66
|
export { computeHealthScore, computeTrend, formatTopIssues, generateRecommendations, getScoreColor, loadHistory, SEVERITY_WEIGHTS, saveHistory, } from './health/index.js';
|
|
59
67
|
export type { ExploitabilityDetail, ExploitabilityLabel } from './exploitability/index.js';
|
|
@@ -98,4 +106,6 @@ export type { AgreementLevel, CrossModelConfig, CrossModelFinding, CrossModelInp
|
|
|
98
106
|
export { computeSimilarity, DEFAULT_CROSS_MODEL_CONFIG, matchFindings, runCrossModelReview, } from './critique/index.js';
|
|
99
107
|
export type { BM25Params, IndexSnapshot, SearchDocument, SearchDocumentSource, SearchOptions, SearchResult, TermPosting, TermStats, } from './search/index.js';
|
|
100
108
|
export { SearchEngine, SearchIndexer, STOP_WORDS, tokenize } from './search/index.js';
|
|
109
|
+
export type { AnsweredExplanationOutcome, ExplanationIdentity, ExplanationMetadata, ExplanationOutcome, ExplanationOutcomeKind, ExplanationRequest, ExplanationSnapshot, ExplanationSnapshotFile, NonAnswerExplanationOutcome, } from './explanation.js';
|
|
110
|
+
export { EXPLANATION_OUTCOME } from './explanation.js';
|
|
101
111
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAI/C,YAAY,EACV,eAAe,EACf,aAAa,EACb,eAAe,EACf,aAAa,EAEb,UAAU,EACV,oBAAoB,EACpB,uBAAuB,EACvB,WAAW,EACX,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACpB,WAAW,EACX,aAAa,EAEb,eAAe,EAEf,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,aAAa,EAEb,WAAW,EACX,WAAW,EACX,cAAc,EACd,UAAU,EAEV,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,YAAY,EAEZ,oBAAoB,EACpB,UAAU,EACV,UAAU,EAEV,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAIvE,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAI9E,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,UAAU,GACX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,cAAc,EACd,YAAY,EACZ,OAAO,EACP,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,YAAY,GACb,MAAM,4BAA4B,CAAC;AAIpC,YAAY,EACV,aAAa,EACb,WAAW,EACX,YAAY,EACZ,cAAc,EACd,WAAW,EACX,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAI/C,YAAY,EACV,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,aAAa,EAEb,UAAU,EACV,oBAAoB,EACpB,uBAAuB,EACvB,WAAW,EACX,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,EACpB,WAAW,EACX,aAAa,EAEb,eAAe,EAEf,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,aAAa,EAEb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─── Audit Agent ────────────────────────────────────────────────
|
|
10
10
|
export { runAuditReport } from './agents/audit.js';
|
|
11
11
|
export { parseHypotheses, runDiagnosticReview } from './agents/diagnostic.js';
|
|
12
|
-
export { DEFAULT_LENSES, getAllLenses, getLens, LENS_ACCESSIBILITY, LENS_ERROR_HANDLING, LENS_PERFORMANCE, LENS_SECURITY, LENS_TYPING, loadLensesFromDir, mergeFindings, registerLens, resetLensRegistry, runFanOutReview, validateLens, } from './agents/fan-out-lenses.js';
|
|
13
|
-
export { DEFAULT_DECAY_CONFIG, DEFAULT_MODELS, DEFAULT_SETTINGS, DEFAULT_VERSIONING_CONFIG, } from './types.js';
|
|
12
|
+
export { DEFAULT_LENSES, getAllLenses, getLens, LENS_ACCESSIBILITY, LENS_ERROR_HANDLING, LENS_PERFORMANCE, LENS_SECURITY, LENS_TYPING, loadLensesFromDir, mergeFindings, registerLens, resetLensRegistry, runFanOutReview, stampFindingLedger, validateLens, } from './agents/fan-out-lenses.js';
|
|
13
|
+
export { DEFAULT_DECAY_CONFIG, DEFAULT_MODELS, DEFAULT_SETTINGS, DEFAULT_VERSIONING_CONFIG, FINDING_LEDGER_STATUS, } from './types.js';
|
|
14
14
|
export { buildProgressiveContext, chooseContextLevel, collectAllFindings, collectToolNames, estimateTokens, formatMemoryContextL0, formatMemoryContextL1, formatStaticContextL0, formatStaticContextL1, } from './utils/context-levels.js';
|
|
15
15
|
export { filterDiffFiles, filterIgnoredFiles, parseDiffFiles, truncateDiff } from './utils/diff.js';
|
|
16
16
|
export { applyPathProtection, REDACT_PATTERNS, REDACTED_CONTENT, ZERO_ACCESS_PATTERNS, } from './utils/path-protection.js';
|
|
17
17
|
export { detectStacks } from './utils/stack-detect.js';
|
|
18
18
|
export { calculateRateSchedule, calculateTokenBudget, getContextWindow, } from './utils/token-budget.js';
|
|
19
|
+
// ─── Providers (for direct model access) ────────────────────────
|
|
20
|
+
// Provider-chain → GenerateTextFn resolution. Exported so out-of-pipeline
|
|
21
|
+
// callers (e.g. the server issue-analysis worker) can resolve a backend from a
|
|
22
|
+
// ReviewInput-shaped object and inject the resulting GenerateTextFn into agents
|
|
23
|
+
// the SAME way the review pipeline's execute step does (pipeline/execute.ts).
|
|
24
|
+
export { resolveGenerateTextFns, resolvePrimaryProvider } from './pipeline/providers.js';
|
|
19
25
|
export { CLIConfigurationError, generateViaCLI, getAvailableCLIs, OPENCODE_ENV_BY_PREFIX, sanitizeErrorMessage, } from './providers/cli-bridge.js';
|
|
26
|
+
export { createExplanationOllamaGenerateFn, generateExplanation, resolveExplanationGenerateFn, } from './providers/explanation-generate-fn.js';
|
|
20
27
|
export { generateViaGateway } from './providers/gateway.js';
|
|
21
28
|
export { fetchGatewayModels, fetchGatewayProviders, validateProviderChain, } from './providers/gateway-discovery.js';
|
|
22
29
|
export { createCLIBridgeGenerateFn, createGatewayGenerateFn, createOllamaGenerateFn, } from './providers/generate-fn.js';
|
|
30
|
+
// ─── Issue-Triage Agent (issue-triage feature) ──────────────────
|
|
31
|
+
export { discoverCodePaths, discoverSearchTerms } from './agents/issue-code-discovery.js';
|
|
32
|
+
export { DEFAULT_CLASSIFICATION, DEFAULT_CONFIDENCE, ISSUE_CLASSIFICATIONS, runIssueTriage, } from './agents/issue-triage.js';
|
|
33
|
+
export { ISSUE_TRIAGE_SYSTEM } from './agents/prompts.js';
|
|
23
34
|
// ─── Negative Examples ──────────────────────────────────────────
|
|
24
35
|
export { fingerprintContext, fingerprintFinding, formatNegativeExamplesPrompt, } from './negative.js';
|
|
25
36
|
// ─── Memory (for custom memory integrations) ────────────────────
|
|
26
37
|
export { formatMemoryContext } from './memory/context.js';
|
|
27
38
|
export { detectContradictions } from './memory/contradiction.js';
|
|
28
|
-
export { computeStrength, decayPhase } from './memory/decay.js';
|
|
39
|
+
export { computeStrength, decayPhase, normalizeBm25Relevance, normalizeRankRelevance, } from './memory/decay.js';
|
|
29
40
|
export { EngramMemoryStorage } from './memory/engram.js';
|
|
30
41
|
export { createProjectPageIndex, PageDirection, ProjectPageIndexService, } from './memory/pageindex/index.js';
|
|
31
42
|
export { stripPrivateData } from './memory/privacy.js';
|
|
43
|
+
export { buildIssueSearchQuery, DEDUP_SCORE_THRESHOLD, findIssueDuplicates, ISSUE_TRIAGE_OBSERVATION_TYPE, } from './memory/search.js';
|
|
32
44
|
export { SqliteMemoryStorage } from './memory/sqlite.js';
|
|
33
45
|
export { BranchExistsError, BranchNotFoundError, MemoryVersioning, ProtectedBranchError, SnapshotExistsError, SnapshotNotFoundError, } from './memory/versioning.js';
|
|
34
46
|
export { buildStatsBar, categorizeFiles, FILE_CATEGORIES, formatFileCategorySummary, formatReviewComment, REVIEW_COMMENT_MARKER, SEVERITY_EMOJI, STATUS_EMOJI, } from './format.js';
|
|
@@ -38,7 +50,7 @@ export { buildSarif } from './sarif/index.js';
|
|
|
38
50
|
export { buildChecklistContext, countActiveChecks, DEFAULT_CHECKLIST, DEFAULT_DIMENSIONS, resolveChecklistConfig, SEVERITY_MULTIPLIER, scoreFindings, } from './checklist/index.js';
|
|
39
51
|
export { enhanceFindings, mergeEnhanceResult } from './enhance/index.js';
|
|
40
52
|
export { applyVirtualPatches, buildPatchContext, DEFAULT_RECURSIVE_CONFIG, extractPatches, recursiveReview, runReReview, } from './recursive/index.js';
|
|
41
|
-
export { buildGraph, buildGraphIncremental, buildReverseIndex, computeBlastRadius, DEFAULT_TRAVERSAL_DEPTH, detectLanguage, EXCLUDED_DIRS, GitHubApiGraphLoader, GRAPH_STALE_DAYS, GRAPH_VERSION, getExtractor, isGraphStale, isTestFile, LANGUAGE_EXTENSIONS, MAX_BLAST_RADIUS_FILES, MAX_GRAPH_SIZE_BYTES, NullGraphLoader, PreloadedGraphLoader, resolveImportPath, TEST_FILE_PATTERNS, validateGraph, validateMetadata, } from './graph/index.js';
|
|
53
|
+
export { buildGraph, buildGraphFromScip, buildGraphIncremental, buildReverseIndex, computeBlastRadius, DEFAULT_TRAVERSAL_DEPTH, detectLanguage, EXCLUDED_DIRS, FilesystemGraphLoader, GitHubApiGraphLoader, GRAPH_STALE_DAYS, GRAPH_VERSION, getExtractor, isGraphStale, isTestFile, LANGUAGE_EXTENSIONS, MAX_BLAST_RADIUS_FILES, MAX_GRAPH_SIZE_BYTES, mergeScipIndexes, NullGraphLoader, PreloadedGraphLoader, parseScipIndex, REGEX_SUPPORTED_LANGUAGES, resolveImportPath, SCIP_ONLY_LANGUAGES, TEST_FILE_PATTERNS, validateGraph, validateMetadata, } from './graph/index.js';
|
|
42
54
|
export { computeHealthScore, computeTrend, formatTopIssues, generateRecommendations, getScoreColor, loadHistory, SEVERITY_WEIGHTS, saveHistory, } from './health/index.js';
|
|
43
55
|
export { analyzeExploitability, checkReachability, extractVulnPackages, findEntryPoints, tracePackageImports, } from './exploitability/index.js';
|
|
44
56
|
export { buildCodeIntelContext, McpCodeIntelClient } from './code-intel/index.js';
|
|
@@ -62,4 +74,5 @@ export { ACPAdapter, ACPTaskStore, resetTaskCounter } from './acp/index.js';
|
|
|
62
74
|
export { applyCritique, DEFAULT_DUAL_CRITIQUE_CONFIG, parseCritiqueResponse, runDualCritique, } from './critique/index.js';
|
|
63
75
|
export { computeSimilarity, DEFAULT_CROSS_MODEL_CONFIG, matchFindings, runCrossModelReview, } from './critique/index.js';
|
|
64
76
|
export { SearchEngine, SearchIndexer, STOP_WORDS, tokenize } from './search/index.js';
|
|
77
|
+
export { EXPLANATION_OUTCOME } from './explanation.js';
|
|
65
78
|
//# sourceMappingURL=index.js.map
|