backpack-ontology 0.7.6 → 0.7.7
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/core/backpack.d.ts +7 -0
- package/dist/core/backpack.d.ts.map +1 -1
- package/dist/core/backpack.js +17 -0
- package/dist/core/backpack.js.map +1 -1
- package/dist/core/signal-detectors.d.ts +12 -0
- package/dist/core/signal-detectors.d.ts.map +1 -0
- package/dist/core/signal-detectors.js +591 -0
- package/dist/core/signal-detectors.js.map +1 -0
- package/dist/core/signal-store.d.ts +23 -0
- package/dist/core/signal-store.d.ts.map +1 -0
- package/dist/core/signal-store.js +179 -0
- package/dist/core/signal-store.js.map +1 -0
- package/dist/core/signal-types.d.ts +71 -0
- package/dist/core/signal-types.d.ts.map +1 -0
- package/dist/core/signal-types.js +12 -0
- package/dist/core/signal-types.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +5 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/signal-tools.d.ts +4 -0
- package/dist/mcp/tools/signal-tools.d.ts.map +1 -0
- package/dist/mcp/tools/signal-tools.js +295 -0
- package/dist/mcp/tools/signal-tools.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// Signal detectors — content-aware, contextual descriptions.
|
|
3
|
+
//
|
|
4
|
+
// Every signal description names actual entities, properties,
|
|
5
|
+
// and relationships from the graph. No generic messages.
|
|
6
|
+
// ============================================================
|
|
7
|
+
// --- Helpers ---
|
|
8
|
+
function nodeLabel(node) {
|
|
9
|
+
for (const v of Object.values(node.properties)) {
|
|
10
|
+
if (typeof v === "string" && v.length > 0)
|
|
11
|
+
return v;
|
|
12
|
+
}
|
|
13
|
+
return node.id;
|
|
14
|
+
}
|
|
15
|
+
function makeSignalId(kind, ...parts) {
|
|
16
|
+
return `${kind}:${[...parts].sort().join(",")}`;
|
|
17
|
+
}
|
|
18
|
+
function normalizeType(t) {
|
|
19
|
+
return t.toLowerCase().replace(/[-_\s]+/g, "");
|
|
20
|
+
}
|
|
21
|
+
/** Join labels with Oxford comma: "A, B, and C" */
|
|
22
|
+
function listLabels(nodes, max) {
|
|
23
|
+
const labels = nodes.slice(0, max).map(nodeLabel);
|
|
24
|
+
const remaining = nodes.length - max;
|
|
25
|
+
if (labels.length === 1)
|
|
26
|
+
return `"${labels[0]}"`;
|
|
27
|
+
if (labels.length === 2)
|
|
28
|
+
return `"${labels[0]}" and "${labels[1]}"`;
|
|
29
|
+
let str = labels.map((l) => `"${l}"`).join(", ");
|
|
30
|
+
if (remaining > 0)
|
|
31
|
+
str += `, and ${remaining} more`;
|
|
32
|
+
return str;
|
|
33
|
+
}
|
|
34
|
+
/** Extract a notable property value from a node (cost, revenue, etc) */
|
|
35
|
+
function notableProperty(node) {
|
|
36
|
+
for (const [key, val] of Object.entries(node.properties)) {
|
|
37
|
+
const k = key.toLowerCase();
|
|
38
|
+
if (typeof val === "number" && (k.includes("cost") || k.includes("revenue") || k.includes("amount") || k.includes("price") || k.includes("fee") || k.includes("budget"))) {
|
|
39
|
+
return `${key}: ${val}`;
|
|
40
|
+
}
|
|
41
|
+
if (typeof val === "string" && val.length > 0 && val.length < 100 && (k.includes("priority") || k.includes("status") || k.includes("severity") || k.includes("impact"))) {
|
|
42
|
+
return `${key}: ${val}`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
const PROBLEM_TYPES = new Set([
|
|
48
|
+
"painpoint", "pain", "problem", "risk", "riskfactor", "weakness",
|
|
49
|
+
"challenge", "threat", "constraint", "issue", "blocker", "gap",
|
|
50
|
+
"vulnerability", "concern",
|
|
51
|
+
]);
|
|
52
|
+
const SOLUTION_TYPES = new Set([
|
|
53
|
+
"opportunity", "recommendation", "strength", "mitigation",
|
|
54
|
+
"solution", "strategy", "action", "initiative", "improvement",
|
|
55
|
+
"fix", "proposal",
|
|
56
|
+
]);
|
|
57
|
+
function isProblemType(type) {
|
|
58
|
+
return PROBLEM_TYPES.has(normalizeType(type));
|
|
59
|
+
}
|
|
60
|
+
function isSolutionType(type) {
|
|
61
|
+
return SOLUTION_TYPES.has(normalizeType(type));
|
|
62
|
+
}
|
|
63
|
+
const IMPORTANCE_KEYS = ["cost", "revenue", "budget", "amount", "price",
|
|
64
|
+
"priority", "deadline", "risk", "impact", "value", "salary", "fee"];
|
|
65
|
+
// --- Per-graph detectors ---
|
|
66
|
+
export const typeRatioDetector = {
|
|
67
|
+
kind: "type_ratio_imbalance",
|
|
68
|
+
category: "structural",
|
|
69
|
+
detect({ data, graphName }, sensitivity) {
|
|
70
|
+
const { nodes } = data;
|
|
71
|
+
if (nodes.length < 5)
|
|
72
|
+
return [];
|
|
73
|
+
const problems = nodes.filter((n) => isProblemType(n.type));
|
|
74
|
+
const solutions = nodes.filter((n) => isSolutionType(n.type));
|
|
75
|
+
if (problems.length === 0 && solutions.length === 0)
|
|
76
|
+
return [];
|
|
77
|
+
if (problems.length >= 3 && solutions.length === 0) {
|
|
78
|
+
const problemLabels = listLabels(problems, 5);
|
|
79
|
+
return [{
|
|
80
|
+
id: makeSignalId("type_ratio_imbalance", graphName, "no_solutions"),
|
|
81
|
+
kind: "type_ratio_imbalance",
|
|
82
|
+
category: "structural",
|
|
83
|
+
severity: "high",
|
|
84
|
+
title: `${problems.length} problems but no solutions or opportunities`,
|
|
85
|
+
description: `Problems identified: ${problemLabels}. None of these have corresponding opportunity, recommendation, or mitigation nodes. What actions address these? Consider adding solution-type nodes and connecting them to the problems they solve.`,
|
|
86
|
+
evidenceNodeIds: problems.map((n) => n.id),
|
|
87
|
+
evidenceDocIds: [],
|
|
88
|
+
graphNames: [graphName],
|
|
89
|
+
score: problems.length,
|
|
90
|
+
tags: [],
|
|
91
|
+
}];
|
|
92
|
+
}
|
|
93
|
+
if (problems.length === 0 || solutions.length === 0)
|
|
94
|
+
return [];
|
|
95
|
+
const ratio = problems.length / solutions.length;
|
|
96
|
+
const threshold = 3 - sensitivity * 2;
|
|
97
|
+
if (ratio >= threshold) {
|
|
98
|
+
// Find problems with no edge to any solution node
|
|
99
|
+
const solutionIds = new Set(solutions.map((n) => n.id));
|
|
100
|
+
const unaddressed = problems.filter((p) => {
|
|
101
|
+
return !data.edges.some((e) => (e.sourceId === p.id && solutionIds.has(e.targetId)) ||
|
|
102
|
+
(e.targetId === p.id && solutionIds.has(e.sourceId)));
|
|
103
|
+
});
|
|
104
|
+
const problemLabels = listLabels(problems, 4);
|
|
105
|
+
const solutionLabels = listLabels(solutions, 3);
|
|
106
|
+
const unaddressedLabels = unaddressed.length > 0
|
|
107
|
+
? ` Specifically, ${listLabels(unaddressed, 3)} ${unaddressed.length === 1 ? "has" : "have"} no connection to any solution node.`
|
|
108
|
+
: "";
|
|
109
|
+
return [{
|
|
110
|
+
id: makeSignalId("type_ratio_imbalance", graphName),
|
|
111
|
+
kind: "type_ratio_imbalance",
|
|
112
|
+
category: "structural",
|
|
113
|
+
severity: ratio >= 4 ? "high" : "medium",
|
|
114
|
+
title: `${problems.length} problems vs ${solutions.length} solutions — gap in coverage`,
|
|
115
|
+
description: `Problems: ${problemLabels}. Solutions: ${solutionLabels}.${unaddressedLabels}`,
|
|
116
|
+
evidenceNodeIds: [...problems.map((n) => n.id), ...solutions.map((n) => n.id)],
|
|
117
|
+
evidenceDocIds: [],
|
|
118
|
+
graphNames: [graphName],
|
|
119
|
+
score: ratio,
|
|
120
|
+
tags: [],
|
|
121
|
+
}];
|
|
122
|
+
}
|
|
123
|
+
return [];
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
export const missingRelationshipsDetector = {
|
|
127
|
+
kind: "missing_relationships",
|
|
128
|
+
category: "structural",
|
|
129
|
+
detect({ data, graphName }, sensitivity) {
|
|
130
|
+
const { nodes, edges } = data;
|
|
131
|
+
if (nodes.length < 6)
|
|
132
|
+
return [];
|
|
133
|
+
const typeCounts = new Map();
|
|
134
|
+
for (const n of nodes) {
|
|
135
|
+
if (!typeCounts.has(n.type))
|
|
136
|
+
typeCounts.set(n.type, []);
|
|
137
|
+
typeCounts.get(n.type).push(n);
|
|
138
|
+
}
|
|
139
|
+
const significantTypes = [...typeCounts.entries()]
|
|
140
|
+
.filter(([, ns]) => ns.length >= 2)
|
|
141
|
+
.map(([t]) => t);
|
|
142
|
+
if (significantTypes.length < 2)
|
|
143
|
+
return [];
|
|
144
|
+
const typePairs = new Map();
|
|
145
|
+
for (const e of edges) {
|
|
146
|
+
const srcNode = nodes.find((n) => n.id === e.sourceId);
|
|
147
|
+
const tgtNode = nodes.find((n) => n.id === e.targetId);
|
|
148
|
+
if (!srcNode || !tgtNode || srcNode.type === tgtNode.type)
|
|
149
|
+
continue;
|
|
150
|
+
const key = [srcNode.type, tgtNode.type].sort().join("|");
|
|
151
|
+
typePairs.set(key, (typePairs.get(key) ?? 0) + 1);
|
|
152
|
+
}
|
|
153
|
+
const signals = [];
|
|
154
|
+
for (let i = 0; i < significantTypes.length; i++) {
|
|
155
|
+
for (let j = i + 1; j < significantTypes.length; j++) {
|
|
156
|
+
const key = [significantTypes[i], significantTypes[j]].sort().join("|");
|
|
157
|
+
if (typePairs.has(key))
|
|
158
|
+
continue;
|
|
159
|
+
const typeA = significantTypes[i];
|
|
160
|
+
const typeB = significantTypes[j];
|
|
161
|
+
const groupA = typeCounts.get(typeA);
|
|
162
|
+
const groupB = typeCounts.get(typeB);
|
|
163
|
+
const minCount = Math.max(2, Math.round(3 - sensitivity * 2));
|
|
164
|
+
if (groupA.length < minCount || groupB.length < minCount)
|
|
165
|
+
continue;
|
|
166
|
+
if (groupA.length + groupB.length < 5)
|
|
167
|
+
continue;
|
|
168
|
+
const labelsA = listLabels(groupA, 3);
|
|
169
|
+
const labelsB = listLabels(groupB, 3);
|
|
170
|
+
signals.push({
|
|
171
|
+
id: makeSignalId("missing_relationships", graphName, typeA, typeB),
|
|
172
|
+
kind: "missing_relationships",
|
|
173
|
+
category: "structural",
|
|
174
|
+
severity: "medium",
|
|
175
|
+
title: `No connections between "${typeA}" and "${typeB}"`,
|
|
176
|
+
description: `${typeA} nodes (${labelsA}) and ${typeB} nodes (${labelsB}) have no edges between them. Do any of these ${typeA} entities relate to these ${typeB} entities? If so, those relationships are missing from the graph.`,
|
|
177
|
+
evidenceNodeIds: [
|
|
178
|
+
...groupA.slice(0, 3).map((n) => n.id),
|
|
179
|
+
...groupB.slice(0, 3).map((n) => n.id),
|
|
180
|
+
],
|
|
181
|
+
evidenceDocIds: [],
|
|
182
|
+
graphNames: [graphName],
|
|
183
|
+
score: (groupA.length + groupB.length) * 0.5,
|
|
184
|
+
tags: [],
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return signals.sort((a, b) => b.score - a.score).slice(0, 5);
|
|
189
|
+
},
|
|
190
|
+
};
|
|
191
|
+
export const propertyCompletenessDetector = {
|
|
192
|
+
kind: "property_completeness",
|
|
193
|
+
category: "structural",
|
|
194
|
+
detect({ data, graphName }, sensitivity) {
|
|
195
|
+
const { nodes } = data;
|
|
196
|
+
if (nodes.length < 6)
|
|
197
|
+
return [];
|
|
198
|
+
const typeCounts = new Map();
|
|
199
|
+
for (const n of nodes) {
|
|
200
|
+
if (!typeCounts.has(n.type))
|
|
201
|
+
typeCounts.set(n.type, []);
|
|
202
|
+
typeCounts.get(n.type).push(n);
|
|
203
|
+
}
|
|
204
|
+
const signals = [];
|
|
205
|
+
for (const [type, group] of typeCounts) {
|
|
206
|
+
if (group.length < 3)
|
|
207
|
+
continue;
|
|
208
|
+
const propCounts = new Map();
|
|
209
|
+
for (const node of group) {
|
|
210
|
+
for (const key of Object.keys(node.properties)) {
|
|
211
|
+
propCounts.set(key, (propCounts.get(key) ?? 0) + 1);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
for (const [prop, count] of propCounts) {
|
|
215
|
+
const missing = group.length - count;
|
|
216
|
+
const coverage = count / group.length;
|
|
217
|
+
const coverageThreshold = 0.5 + (1 - sensitivity) * 0.3;
|
|
218
|
+
if (coverage >= coverageThreshold && missing >= 1 && coverage < 1) {
|
|
219
|
+
const missingNodes = group.filter((n) => !(prop in n.properties));
|
|
220
|
+
const completeNodes = group.filter((n) => prop in n.properties);
|
|
221
|
+
const missingLabels = listLabels(missingNodes, 3);
|
|
222
|
+
// Show example values from complete nodes
|
|
223
|
+
const exampleValues = [];
|
|
224
|
+
for (const cn of completeNodes.slice(0, 2)) {
|
|
225
|
+
const val = cn.properties[prop];
|
|
226
|
+
if (val !== undefined && val !== null && String(val).length < 60) {
|
|
227
|
+
exampleValues.push(`${nodeLabel(cn)}: "${val}"`);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
const exampleStr = exampleValues.length > 0
|
|
231
|
+
? ` Other ${type} nodes have this property (${exampleValues.join("; ")}).`
|
|
232
|
+
: "";
|
|
233
|
+
signals.push({
|
|
234
|
+
id: makeSignalId("property_completeness", graphName, type, prop),
|
|
235
|
+
kind: "property_completeness",
|
|
236
|
+
category: "structural",
|
|
237
|
+
severity: missing >= 3 ? "medium" : "low",
|
|
238
|
+
title: `${missing} of ${group.length} "${type}" nodes missing "${prop}"`,
|
|
239
|
+
description: `${missingLabels} ${missing === 1 ? "is" : "are"} missing the "${prop}" property that ${count} other "${type}" nodes have.${exampleStr}`,
|
|
240
|
+
evidenceNodeIds: missingNodes.map((n) => n.id),
|
|
241
|
+
evidenceDocIds: [],
|
|
242
|
+
graphNames: [graphName],
|
|
243
|
+
score: missing,
|
|
244
|
+
tags: [],
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return signals.sort((a, b) => b.score - a.score).slice(0, 5);
|
|
250
|
+
},
|
|
251
|
+
};
|
|
252
|
+
export const underconnectedImportantDetector = {
|
|
253
|
+
kind: "underconnected_important",
|
|
254
|
+
category: "structural",
|
|
255
|
+
detect({ data, graphName }, sensitivity) {
|
|
256
|
+
const { nodes, edges } = data;
|
|
257
|
+
if (nodes.length < 5)
|
|
258
|
+
return [];
|
|
259
|
+
const degreeMap = new Map();
|
|
260
|
+
for (const n of nodes)
|
|
261
|
+
degreeMap.set(n.id, 0);
|
|
262
|
+
for (const e of edges) {
|
|
263
|
+
degreeMap.set(e.sourceId, (degreeMap.get(e.sourceId) ?? 0) + 1);
|
|
264
|
+
degreeMap.set(e.targetId, (degreeMap.get(e.targetId) ?? 0) + 1);
|
|
265
|
+
}
|
|
266
|
+
const avgDegree = [...degreeMap.values()].reduce((a, b) => a + b, 0) / nodes.length || 1;
|
|
267
|
+
const signals = [];
|
|
268
|
+
for (const node of nodes) {
|
|
269
|
+
const degree = degreeMap.get(node.id) ?? 0;
|
|
270
|
+
if (degree >= avgDegree * 0.5)
|
|
271
|
+
continue;
|
|
272
|
+
const importantProps = [];
|
|
273
|
+
for (const key of Object.keys(node.properties)) {
|
|
274
|
+
const k = key.toLowerCase();
|
|
275
|
+
if (IMPORTANCE_KEYS.some((ik) => k.includes(ik))) {
|
|
276
|
+
importantProps.push(key);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
const nt = normalizeType(node.type);
|
|
280
|
+
if (isProblemType(node.type) || isSolutionType(node.type) ||
|
|
281
|
+
nt.includes("decision") || nt.includes("deadline") || nt.includes("budget")) {
|
|
282
|
+
importantProps.push(node.type);
|
|
283
|
+
}
|
|
284
|
+
if (importantProps.length === 0)
|
|
285
|
+
continue;
|
|
286
|
+
const label = nodeLabel(node);
|
|
287
|
+
const notable = notableProperty(node);
|
|
288
|
+
const notableStr = notable ? ` It has ${notable}.` : "";
|
|
289
|
+
// Find what few connections it does have
|
|
290
|
+
const connectedLabels = [];
|
|
291
|
+
for (const e of edges) {
|
|
292
|
+
if (e.sourceId === node.id || e.targetId === node.id) {
|
|
293
|
+
const otherId = e.sourceId === node.id ? e.targetId : e.sourceId;
|
|
294
|
+
const other = nodes.find((n) => n.id === otherId);
|
|
295
|
+
if (other)
|
|
296
|
+
connectedLabels.push(`"${nodeLabel(other)}" (${e.type})`);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
const connectionStr = connectedLabels.length > 0
|
|
300
|
+
? ` Currently connected to: ${connectedLabels.slice(0, 3).join(", ")}.`
|
|
301
|
+
: " Currently has no connections at all.";
|
|
302
|
+
signals.push({
|
|
303
|
+
id: makeSignalId("underconnected_important", node.id),
|
|
304
|
+
kind: "underconnected_important",
|
|
305
|
+
category: "structural",
|
|
306
|
+
severity: degree === 0 ? "high" : "medium",
|
|
307
|
+
title: `"${label}" (${node.type}) looks important but has ${degree === 0 ? "no" : "only " + degree} connection${degree !== 1 ? "s" : ""}`,
|
|
308
|
+
description: `"${label}" is a ${node.type} node with properties suggesting importance (${importantProps.join(", ")}).${notableStr}${connectionStr} What else does this entity relate to, depend on, or affect?`,
|
|
309
|
+
evidenceNodeIds: [node.id],
|
|
310
|
+
evidenceDocIds: [],
|
|
311
|
+
graphNames: [graphName],
|
|
312
|
+
score: importantProps.length + (1 / (degree + 1)),
|
|
313
|
+
tags: [],
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
return signals.sort((a, b) => b.score - a.score).slice(0, 5);
|
|
317
|
+
},
|
|
318
|
+
};
|
|
319
|
+
export const disconnectedIslandsDetector = {
|
|
320
|
+
kind: "disconnected_island",
|
|
321
|
+
category: "structural",
|
|
322
|
+
detect({ data, graphName }, sensitivity) {
|
|
323
|
+
const { nodes, edges } = data;
|
|
324
|
+
if (nodes.length < 6)
|
|
325
|
+
return [];
|
|
326
|
+
const adj = new Map();
|
|
327
|
+
for (const n of nodes)
|
|
328
|
+
adj.set(n.id, []);
|
|
329
|
+
for (const e of edges) {
|
|
330
|
+
adj.get(e.sourceId)?.push(e.targetId);
|
|
331
|
+
adj.get(e.targetId)?.push(e.sourceId);
|
|
332
|
+
}
|
|
333
|
+
const comp = new Map();
|
|
334
|
+
let compId = 0;
|
|
335
|
+
for (const n of nodes) {
|
|
336
|
+
if (comp.has(n.id))
|
|
337
|
+
continue;
|
|
338
|
+
const queue = [n.id];
|
|
339
|
+
while (queue.length > 0) {
|
|
340
|
+
const cur = queue.pop();
|
|
341
|
+
if (comp.has(cur))
|
|
342
|
+
continue;
|
|
343
|
+
comp.set(cur, compId);
|
|
344
|
+
for (const nb of adj.get(cur) ?? []) {
|
|
345
|
+
if (!comp.has(nb))
|
|
346
|
+
queue.push(nb);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
compId++;
|
|
350
|
+
}
|
|
351
|
+
const clusters = new Map();
|
|
352
|
+
for (const node of nodes) {
|
|
353
|
+
const c = comp.get(node.id) ?? 0;
|
|
354
|
+
if (!clusters.has(c))
|
|
355
|
+
clusters.set(c, []);
|
|
356
|
+
clusters.get(c).push(node);
|
|
357
|
+
}
|
|
358
|
+
if (clusters.size <= 1)
|
|
359
|
+
return [];
|
|
360
|
+
let largestSize = 0;
|
|
361
|
+
for (const group of clusters.values()) {
|
|
362
|
+
if (group.length > largestSize)
|
|
363
|
+
largestSize = group.length;
|
|
364
|
+
}
|
|
365
|
+
const signals = [];
|
|
366
|
+
const minIslandSize = Math.max(2, Math.round(4 - sensitivity * 3));
|
|
367
|
+
for (const [, group] of clusters) {
|
|
368
|
+
if (group.length === largestSize)
|
|
369
|
+
continue;
|
|
370
|
+
if (group.length < minIslandSize)
|
|
371
|
+
continue;
|
|
372
|
+
const types = [...new Set(group.map((n) => n.type))];
|
|
373
|
+
const labels = listLabels(group, 4);
|
|
374
|
+
signals.push({
|
|
375
|
+
id: makeSignalId("disconnected_island", ...group.map((n) => n.id)),
|
|
376
|
+
kind: "disconnected_island",
|
|
377
|
+
category: "structural",
|
|
378
|
+
severity: group.length >= 5 ? "high" : "medium",
|
|
379
|
+
title: `${group.length} disconnected nodes: ${group.slice(0, 3).map(nodeLabel).join(", ")}`,
|
|
380
|
+
description: `These nodes (${labels}) are types ${types.join(", ")} but have no path to the rest of the graph. They're an island. Should they connect to existing nodes? If they're related to the main graph, add edges to bridge them in.`,
|
|
381
|
+
evidenceNodeIds: group.map((n) => n.id),
|
|
382
|
+
evidenceDocIds: [],
|
|
383
|
+
graphNames: [graphName],
|
|
384
|
+
score: group.length,
|
|
385
|
+
tags: [],
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
return signals;
|
|
389
|
+
},
|
|
390
|
+
};
|
|
391
|
+
// --- Cross-cutting detectors ---
|
|
392
|
+
export const crossGraphEntityDetector = {
|
|
393
|
+
kind: "cross_graph_entity",
|
|
394
|
+
category: "structural",
|
|
395
|
+
detect({ graphs }, sensitivity) {
|
|
396
|
+
if (graphs.length < 2)
|
|
397
|
+
return [];
|
|
398
|
+
const labelMap = new Map();
|
|
399
|
+
for (const { data, graphName } of graphs) {
|
|
400
|
+
for (const node of data.nodes) {
|
|
401
|
+
const label = nodeLabel(node).toLowerCase().trim();
|
|
402
|
+
if (label.length < 3)
|
|
403
|
+
continue;
|
|
404
|
+
if (!labelMap.has(label))
|
|
405
|
+
labelMap.set(label, []);
|
|
406
|
+
labelMap.get(label).push({ graphName, nodeId: node.id, type: node.type, label: nodeLabel(node) });
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
const signals = [];
|
|
410
|
+
for (const [, appearances] of labelMap) {
|
|
411
|
+
const uniqueGraphs = [...new Set(appearances.map((a) => a.graphName))];
|
|
412
|
+
if (uniqueGraphs.length < 2)
|
|
413
|
+
continue;
|
|
414
|
+
const minGraphs = sensitivity >= 0.5 ? 2 : 3;
|
|
415
|
+
if (uniqueGraphs.length < minGraphs)
|
|
416
|
+
continue;
|
|
417
|
+
const types = [...new Set(appearances.map((a) => a.type))];
|
|
418
|
+
const nodeIds = appearances.map((a) => a.nodeId);
|
|
419
|
+
const displayLabel = appearances[0].label;
|
|
420
|
+
// Build a per-graph context string
|
|
421
|
+
const perGraph = uniqueGraphs.map((g) => {
|
|
422
|
+
const inGraph = appearances.filter((a) => a.graphName === g);
|
|
423
|
+
return `in "${g}" as ${inGraph.map((a) => a.type).join("/")}`;
|
|
424
|
+
});
|
|
425
|
+
signals.push({
|
|
426
|
+
id: makeSignalId("cross_graph_entity", ...nodeIds),
|
|
427
|
+
kind: "cross_graph_entity",
|
|
428
|
+
category: "structural",
|
|
429
|
+
severity: uniqueGraphs.length >= 3 ? "high" : "medium",
|
|
430
|
+
title: `"${displayLabel}" appears across ${uniqueGraphs.length} graphs`,
|
|
431
|
+
description: `"${displayLabel}" exists ${perGraph.join(", ")}. ${types.length > 1 ? `It's typed differently across graphs (${types.join(" vs ")}), which may indicate inconsistent modeling.` : "This entity bridges domains — insights from one graph may apply to the other."}`,
|
|
432
|
+
evidenceNodeIds: nodeIds,
|
|
433
|
+
evidenceDocIds: [],
|
|
434
|
+
graphNames: uniqueGraphs,
|
|
435
|
+
score: uniqueGraphs.length + appearances.length * 0.5,
|
|
436
|
+
tags: [],
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
return signals.sort((a, b) => b.score - a.score).slice(0, 15);
|
|
440
|
+
},
|
|
441
|
+
};
|
|
442
|
+
export const kbGraphGapDetector = {
|
|
443
|
+
kind: "kb_graph_gap",
|
|
444
|
+
category: "structural",
|
|
445
|
+
detect({ graphs, docs }, sensitivity) {
|
|
446
|
+
if (docs.length === 0)
|
|
447
|
+
return [];
|
|
448
|
+
const graphNames = new Set(graphs.map((g) => g.graphName));
|
|
449
|
+
const allLabels = new Map();
|
|
450
|
+
for (const { data, graphName } of graphs) {
|
|
451
|
+
for (const node of data.nodes) {
|
|
452
|
+
const label = nodeLabel(node).toLowerCase().trim();
|
|
453
|
+
if (label.length >= 3) {
|
|
454
|
+
allLabels.set(label, { graphName, nodeId: node.id });
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
const signals = [];
|
|
459
|
+
for (const doc of docs) {
|
|
460
|
+
const sourceGraphs = doc.sourceGraphs ?? [];
|
|
461
|
+
const tags = doc.tags ?? [];
|
|
462
|
+
const title = doc.title ?? "";
|
|
463
|
+
const docId = doc.id ?? "";
|
|
464
|
+
if (sourceGraphs.length === 0 && tags.length > 0) {
|
|
465
|
+
const matchingGraphs = [];
|
|
466
|
+
const matchedTags = [];
|
|
467
|
+
for (const tag of tags) {
|
|
468
|
+
const t = tag.toLowerCase();
|
|
469
|
+
if (graphNames.has(t)) {
|
|
470
|
+
matchingGraphs.push(t);
|
|
471
|
+
matchedTags.push(tag);
|
|
472
|
+
}
|
|
473
|
+
const labelMatch = allLabels.get(t);
|
|
474
|
+
if (labelMatch && !matchingGraphs.includes(labelMatch.graphName)) {
|
|
475
|
+
matchingGraphs.push(labelMatch.graphName);
|
|
476
|
+
matchedTags.push(tag);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
if (matchingGraphs.length > 0) {
|
|
480
|
+
signals.push({
|
|
481
|
+
id: makeSignalId("kb_graph_gap", docId, ...matchingGraphs),
|
|
482
|
+
kind: "kb_graph_gap",
|
|
483
|
+
category: "structural",
|
|
484
|
+
severity: "medium",
|
|
485
|
+
title: `KB doc "${title}" not linked to matching graphs`,
|
|
486
|
+
description: `"${title}" has tags (${matchedTags.join(", ")}) that match content in ${matchingGraphs.join(", ")}, but the document has no sourceGraphs set. Linking it would let the graph and document cross-reference each other and improve search.`,
|
|
487
|
+
evidenceNodeIds: [],
|
|
488
|
+
evidenceDocIds: [docId],
|
|
489
|
+
graphNames: matchingGraphs,
|
|
490
|
+
score: matchingGraphs.length + 1,
|
|
491
|
+
tags: [],
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
for (const sg of sourceGraphs) {
|
|
496
|
+
if (!graphNames.has(sg)) {
|
|
497
|
+
signals.push({
|
|
498
|
+
id: makeSignalId("kb_graph_gap", docId, sg),
|
|
499
|
+
kind: "kb_graph_gap",
|
|
500
|
+
category: "structural",
|
|
501
|
+
severity: "low",
|
|
502
|
+
title: `"${title}" references missing graph "${sg}"`,
|
|
503
|
+
description: `Document "${title}" lists "${sg}" as a source graph, but no graph named "${sg}" exists in this backpack. It may have been deleted, renamed, or moved to another backpack.`,
|
|
504
|
+
evidenceNodeIds: [],
|
|
505
|
+
evidenceDocIds: [docId],
|
|
506
|
+
graphNames: [sg],
|
|
507
|
+
score: 1,
|
|
508
|
+
tags: [],
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
return signals.sort((a, b) => b.score - a.score).slice(0, 10);
|
|
514
|
+
},
|
|
515
|
+
};
|
|
516
|
+
export const coverageAsymmetryDetector = {
|
|
517
|
+
kind: "coverage_asymmetry",
|
|
518
|
+
category: "structural",
|
|
519
|
+
detect({ graphs }, sensitivity) {
|
|
520
|
+
if (graphs.length < 2)
|
|
521
|
+
return [];
|
|
522
|
+
const labelToGraphs = new Map();
|
|
523
|
+
const graphTypes = new Map();
|
|
524
|
+
for (const { data, graphName } of graphs) {
|
|
525
|
+
const types = new Map();
|
|
526
|
+
for (const node of data.nodes) {
|
|
527
|
+
if (!types.has(node.type))
|
|
528
|
+
types.set(node.type, []);
|
|
529
|
+
types.get(node.type).push(node);
|
|
530
|
+
const label = nodeLabel(node).toLowerCase().trim();
|
|
531
|
+
if (label.length >= 3) {
|
|
532
|
+
if (!labelToGraphs.has(label))
|
|
533
|
+
labelToGraphs.set(label, new Set());
|
|
534
|
+
labelToGraphs.get(label).add(graphName);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
graphTypes.set(graphName, types);
|
|
538
|
+
}
|
|
539
|
+
const relatedPairs = new Set();
|
|
540
|
+
for (const [, gs] of labelToGraphs) {
|
|
541
|
+
if (gs.size < 2)
|
|
542
|
+
continue;
|
|
543
|
+
const arr = [...gs];
|
|
544
|
+
for (let i = 0; i < arr.length; i++) {
|
|
545
|
+
for (let j = i + 1; j < arr.length; j++) {
|
|
546
|
+
relatedPairs.add([arr[i], arr[j]].sort().join("|"));
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
const signals = [];
|
|
551
|
+
for (const pair of relatedPairs) {
|
|
552
|
+
const [g1, g2] = pair.split("|");
|
|
553
|
+
const types1 = graphTypes.get(g1) ?? new Map();
|
|
554
|
+
const types2 = graphTypes.get(g2) ?? new Map();
|
|
555
|
+
for (const [type, nodesInG1] of types1) {
|
|
556
|
+
const nodesInG2 = types2.get(type);
|
|
557
|
+
if (nodesInG1.length >= 3 && !nodesInG2) {
|
|
558
|
+
const exampleLabels = listLabels(nodesInG1, 3);
|
|
559
|
+
signals.push({
|
|
560
|
+
id: makeSignalId("coverage_asymmetry", g1, g2, type),
|
|
561
|
+
kind: "coverage_asymmetry",
|
|
562
|
+
category: "structural",
|
|
563
|
+
severity: "low",
|
|
564
|
+
title: `"${type}" covered in "${g1}" but absent from related graph "${g2}"`,
|
|
565
|
+
description: `"${g1}" has ${nodesInG1.length} "${type}" nodes (${exampleLabels}) but "${g2}" — which shares entities with "${g1}" — has none. If both domains involve ${type} entities, this gap might mean incomplete coverage in "${g2}".`,
|
|
566
|
+
evidenceNodeIds: nodesInG1.slice(0, 3).map((n) => n.id),
|
|
567
|
+
evidenceDocIds: [],
|
|
568
|
+
graphNames: [g1, g2],
|
|
569
|
+
score: nodesInG1.length * 0.5,
|
|
570
|
+
tags: [],
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
return signals.sort((a, b) => b.score - a.score).slice(0, 10);
|
|
576
|
+
},
|
|
577
|
+
};
|
|
578
|
+
// --- Registry ---
|
|
579
|
+
export const GRAPH_DETECTORS = [
|
|
580
|
+
typeRatioDetector,
|
|
581
|
+
missingRelationshipsDetector,
|
|
582
|
+
propertyCompletenessDetector,
|
|
583
|
+
underconnectedImportantDetector,
|
|
584
|
+
disconnectedIslandsDetector,
|
|
585
|
+
];
|
|
586
|
+
export const CROSS_CUTTING_DETECTORS = [
|
|
587
|
+
crossGraphEntityDetector,
|
|
588
|
+
kbGraphGapDetector,
|
|
589
|
+
coverageAsymmetryDetector,
|
|
590
|
+
];
|
|
591
|
+
//# sourceMappingURL=signal-detectors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signal-detectors.js","sourceRoot":"","sources":["../../src/core/signal-detectors.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,6DAA6D;AAC7D,EAAE;AACF,8DAA8D;AAC9D,yDAAyD;AACzD,+DAA+D;AAY/D,kBAAkB;AAElB,SAAS,SAAS,CAAC,IAAU;IAC3B,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/C,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,IAAI,CAAC,EAAE,CAAC;AACjB,CAAC;AAED,SAAS,YAAY,CAAC,IAAY,EAAE,GAAG,KAAe;IACpD,OAAO,GAAG,IAAI,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAClD,CAAC;AAED,SAAS,aAAa,CAAC,CAAS;IAC9B,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AACjD,CAAC;AAED,mDAAmD;AACnD,SAAS,UAAU,CAAC,KAAa,EAAE,GAAW;IAC5C,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC;IACrC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC;IACjD,IAAI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AiB,EAAE,oCAAoC,EAAE,GAAG;wBAC3E,WAAW,EAAE,IAAI,EAAE,SAAS,SAAS,CAAC,MAAM,KAAK,IAAI,YAAY,aAAa,UAAU,EAAE,mCAAmC,EAAE,yCAAyC,IAAI,0DAA0D,EAAE,IAAI;wBAC5O,eAAe,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAO,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;wBAC7D,cAAc,EAAE,EAAE;wBAClB,UAAU,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;wBACpB,KAAK,EAAE,SAAS,CAAC,MAAM,GAAG,GAAG;wBAC7B,IAAI,EAAE,EAAE;qBACT,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChE,CAAC;CACF,CAAC;AAEF,mBAAmB;AAEnB,MAAM,CAAC,MAAM,eAAe,GAA0B;IACpD,iBAAiB;IACjB,4BAA4B;IAC5B,4BAA4B;IAC5B,+BAA+B;IAC/B,2BAA2B;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAiC;IACnE,wBAAwB;IACxB,kBAAkB;IAClB,yBAAyB;CAC1B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { LearningGraphData } from "./types.js";
|
|
2
|
+
import type { KBDocumentMeta } from "./document-store.js";
|
|
3
|
+
import type { SignalFile, SignalConfig, SignalResult, SignalKind } from "./signal-types.js";
|
|
4
|
+
export declare class SignalStore {
|
|
5
|
+
private filePath;
|
|
6
|
+
constructor(backpackPath: string);
|
|
7
|
+
load(): Promise<SignalFile>;
|
|
8
|
+
list(opts?: {
|
|
9
|
+
graph?: string;
|
|
10
|
+
kind?: SignalKind;
|
|
11
|
+
severity?: string;
|
|
12
|
+
query?: string;
|
|
13
|
+
}): Promise<SignalResult>;
|
|
14
|
+
detect(graphs: {
|
|
15
|
+
name: string;
|
|
16
|
+
data: LearningGraphData;
|
|
17
|
+
}[], docs: KBDocumentMeta[]): Promise<SignalResult>;
|
|
18
|
+
dismiss(signalId: string): Promise<void>;
|
|
19
|
+
configure(update: Partial<SignalConfig>): Promise<SignalConfig>;
|
|
20
|
+
private enrichTags;
|
|
21
|
+
save(file: SignalFile): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=signal-store.d.ts.map
|