@jamesaphoenix/tx-core 0.4.3 → 0.4.5
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/db.d.ts.map +1 -1
- package/dist/db.js +8 -2
- package/dist/db.js.map +1 -1
- package/dist/layer.d.ts +3 -3
- package/dist/services/auto-sync-service.d.ts +1 -1
- package/dist/services/cycle-scan-service.d.ts.map +1 -1
- package/dist/services/cycle-scan-service.js +6 -2
- package/dist/services/cycle-scan-service.js.map +1 -1
- package/dist/services/learning-service.d.ts +1 -1
- package/dist/services/orchestrator-service.d.ts +1 -1
- package/dist/services/orchestrator-service.d.ts.map +1 -1
- package/dist/services/orchestrator-service.js +14 -13
- package/dist/services/orchestrator-service.js.map +1 -1
- package/dist/services/retriever-service.d.ts +2 -2
- package/dist/services/sync-service.d.ts.map +1 -1
- package/dist/services/sync-service.js +9 -8
- package/dist/services/sync-service.js.map +1 -1
- package/dist/services/task-service.d.ts.map +1 -1
- package/dist/services/task-service.js +3 -2
- package/dist/services/task-service.js.map +1 -1
- package/dist/services/worker-process.d.ts +1 -1
- package/dist/services/worker-process.d.ts.map +1 -1
- package/dist/services/worker-process.js +9 -2
- package/dist/services/worker-process.js.map +1 -1
- package/dist/worker/run-worker.d.ts +1 -1
- package/package.json +1 -1
- package/dist/mappers/anchor.d.ts +0 -28
- package/dist/mappers/anchor.d.ts.map +0 -1
- package/dist/mappers/anchor.js +0 -105
- package/dist/mappers/anchor.js.map +0 -1
- package/dist/mappers/candidate.d.ts +0 -25
- package/dist/mappers/candidate.d.ts.map +0 -1
- package/dist/mappers/candidate.js +0 -83
- package/dist/mappers/candidate.js.map +0 -1
- package/dist/mappers/edge.d.ts +0 -19
- package/dist/mappers/edge.d.ts.map +0 -1
- package/dist/mappers/edge.js +0 -81
- package/dist/mappers/edge.js.map +0 -1
- package/dist/repo/anchor-repo.d.ts +0 -52
- package/dist/repo/anchor-repo.d.ts.map +0 -1
- package/dist/repo/anchor-repo.js +0 -245
- package/dist/repo/anchor-repo.js.map +0 -1
- package/dist/repo/candidate-repo.d.ts +0 -16
- package/dist/repo/candidate-repo.d.ts.map +0 -1
- package/dist/repo/candidate-repo.js +0 -164
- package/dist/repo/candidate-repo.js.map +0 -1
- package/dist/repo/compaction-repo.d.ts +0 -41
- package/dist/repo/compaction-repo.d.ts.map +0 -1
- package/dist/repo/compaction-repo.js +0 -84
- package/dist/repo/compaction-repo.js.map +0 -1
- package/dist/repo/edge-repo.d.ts +0 -26
- package/dist/repo/edge-repo.d.ts.map +0 -1
- package/dist/repo/edge-repo.js +0 -258
- package/dist/repo/edge-repo.js.map +0 -1
- package/dist/services/anchor-service.d.ts +0 -147
- package/dist/services/anchor-service.d.ts.map +0 -1
- package/dist/services/anchor-service.js +0 -540
- package/dist/services/anchor-service.js.map +0 -1
- package/dist/services/anchor-verification.d.ts +0 -102
- package/dist/services/anchor-verification.d.ts.map +0 -1
- package/dist/services/anchor-verification.js +0 -817
- package/dist/services/anchor-verification.js.map +0 -1
- package/dist/services/ast-grep-service.d.ts +0 -58
- package/dist/services/ast-grep-service.d.ts.map +0 -1
- package/dist/services/ast-grep-service.js +0 -427
- package/dist/services/ast-grep-service.js.map +0 -1
- package/dist/services/candidate-extractor-service.d.ts +0 -56
- package/dist/services/candidate-extractor-service.d.ts.map +0 -1
- package/dist/services/candidate-extractor-service.js +0 -365
- package/dist/services/candidate-extractor-service.js.map +0 -1
- package/dist/services/compaction-service.d.ts +0 -105
- package/dist/services/compaction-service.d.ts.map +0 -1
- package/dist/services/compaction-service.js +0 -369
- package/dist/services/compaction-service.js.map +0 -1
- package/dist/services/edge-service.d.ts +0 -78
- package/dist/services/edge-service.d.ts.map +0 -1
- package/dist/services/edge-service.js +0 -158
- package/dist/services/edge-service.js.map +0 -1
- package/dist/services/feedback-tracker.d.ts +0 -64
- package/dist/services/feedback-tracker.d.ts.map +0 -1
- package/dist/services/feedback-tracker.js +0 -110
- package/dist/services/feedback-tracker.js.map +0 -1
- package/dist/services/graph-expansion.d.ts +0 -158
- package/dist/services/graph-expansion.d.ts.map +0 -1
- package/dist/services/graph-expansion.js +0 -487
- package/dist/services/graph-expansion.js.map +0 -1
- package/dist/services/promotion-service.d.ts +0 -67
- package/dist/services/promotion-service.d.ts.map +0 -1
- package/dist/services/promotion-service.js +0 -151
- package/dist/services/promotion-service.js.map +0 -1
- package/dist/services/swarm-verification.d.ts +0 -104
- package/dist/services/swarm-verification.d.ts.map +0 -1
- package/dist/services/swarm-verification.js +0 -406
- package/dist/services/swarm-verification.js.map +0 -1
|
@@ -1,487 +0,0 @@
|
|
|
1
|
-
import { Context, Effect, Layer } from "effect";
|
|
2
|
-
import { EdgeService } from "./edge-service.js";
|
|
3
|
-
import { LearningRepository } from "../repo/learning-repo.js";
|
|
4
|
-
import { AnchorRepository } from "../repo/anchor-repo.js";
|
|
5
|
-
import { ValidationError } from "../errors.js";
|
|
6
|
-
import { EDGE_TYPES } from "@jamesaphoenix/tx-types";
|
|
7
|
-
export class GraphExpansionService extends Context.Tag("GraphExpansionService")() {
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Noop implementation that returns seeds without expansion.
|
|
11
|
-
* Used when graph expansion is disabled or for testing.
|
|
12
|
-
*/
|
|
13
|
-
export const GraphExpansionServiceNoop = Layer.succeed(GraphExpansionService, {
|
|
14
|
-
expand: (seeds) => Effect.succeed({
|
|
15
|
-
seeds: seeds.map(s => ({
|
|
16
|
-
learning: s.learning,
|
|
17
|
-
hops: 0,
|
|
18
|
-
decayedScore: s.score,
|
|
19
|
-
path: [s.learning.id],
|
|
20
|
-
sourceEdge: null,
|
|
21
|
-
edgeWeight: null
|
|
22
|
-
})),
|
|
23
|
-
expanded: [],
|
|
24
|
-
all: seeds.map(s => ({
|
|
25
|
-
learning: s.learning,
|
|
26
|
-
hops: 0,
|
|
27
|
-
decayedScore: s.score,
|
|
28
|
-
path: [s.learning.id],
|
|
29
|
-
sourceEdge: null,
|
|
30
|
-
edgeWeight: null
|
|
31
|
-
})),
|
|
32
|
-
stats: {
|
|
33
|
-
seedCount: seeds.length,
|
|
34
|
-
expandedCount: 0,
|
|
35
|
-
maxDepthReached: 0,
|
|
36
|
-
nodesVisited: seeds.length,
|
|
37
|
-
maxNodesReached: false
|
|
38
|
-
}
|
|
39
|
-
}),
|
|
40
|
-
expandFromFiles: (files) => Effect.succeed({
|
|
41
|
-
anchored: [],
|
|
42
|
-
expanded: [],
|
|
43
|
-
all: [],
|
|
44
|
-
stats: {
|
|
45
|
-
inputFileCount: files.length,
|
|
46
|
-
anchoredCount: 0,
|
|
47
|
-
expandedCount: 0,
|
|
48
|
-
maxDepthReached: 0,
|
|
49
|
-
filesVisited: files.length
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
/**
|
|
54
|
-
* Default expansion options.
|
|
55
|
-
*/
|
|
56
|
-
const DEFAULT_OPTIONS = {
|
|
57
|
-
depth: 2,
|
|
58
|
-
decayFactor: 0.7,
|
|
59
|
-
maxNodes: 100,
|
|
60
|
-
direction: "both",
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Type guard to check if edgeTypes is a simple array (backwards compatibility).
|
|
64
|
-
*/
|
|
65
|
-
const isSimpleEdgeTypeArray = (edgeTypes) => {
|
|
66
|
-
if (edgeTypes === undefined)
|
|
67
|
-
return true;
|
|
68
|
-
return Array.isArray(edgeTypes);
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* Validate an EdgeTypeFilter for conflicting include/exclude entries.
|
|
72
|
-
* Returns a ValidationError if the same edge type appears in both include and exclude.
|
|
73
|
-
*/
|
|
74
|
-
const validateEdgeTypeFilter = (filter, context = "edgeTypes") => Effect.gen(function* () {
|
|
75
|
-
const { include, exclude, perHop } = filter;
|
|
76
|
-
// Check for overlapping types in include and exclude
|
|
77
|
-
if (include && exclude) {
|
|
78
|
-
const includeSet = new Set(include);
|
|
79
|
-
const overlap = exclude.filter(t => includeSet.has(t));
|
|
80
|
-
if (overlap.length > 0) {
|
|
81
|
-
return yield* Effect.fail(new ValidationError({
|
|
82
|
-
reason: `${context}: conflicting filters - edge types appear in both include and exclude: ${overlap.join(", ")}`
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
// Recursively validate perHop filters
|
|
87
|
-
if (perHop) {
|
|
88
|
-
for (const [hop, hopFilter] of Object.entries(perHop)) {
|
|
89
|
-
yield* validateEdgeTypeFilter(hopFilter, `${context}.perHop[${hop}]`);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
/**
|
|
94
|
-
* Resolve EdgeTypeFilter to an array of edge types for a specific hop.
|
|
95
|
-
* Returns undefined if all edge types should be traversed.
|
|
96
|
-
*/
|
|
97
|
-
const resolveEdgeTypesForHop = (filter, hop) => {
|
|
98
|
-
// Simple array or undefined - pass through
|
|
99
|
-
if (isSimpleEdgeTypeArray(filter)) {
|
|
100
|
-
return filter;
|
|
101
|
-
}
|
|
102
|
-
// Check for hop-specific override
|
|
103
|
-
const hopFilter = filter.perHop?.[hop];
|
|
104
|
-
if (hopFilter) {
|
|
105
|
-
// Recursively resolve (perHop filters don't have perHop themselves typically)
|
|
106
|
-
return resolveEdgeTypesForHop(hopFilter, hop);
|
|
107
|
-
}
|
|
108
|
-
// Apply include/exclude from base filter
|
|
109
|
-
const { include, exclude } = filter;
|
|
110
|
-
if (include && include.length > 0) {
|
|
111
|
-
return include;
|
|
112
|
-
}
|
|
113
|
-
if (exclude && exclude.length > 0) {
|
|
114
|
-
// Return all edge types except excluded ones
|
|
115
|
-
return EDGE_TYPES.filter(t => !exclude.includes(t));
|
|
116
|
-
}
|
|
117
|
-
// No filtering - return undefined to traverse all
|
|
118
|
-
return undefined;
|
|
119
|
-
};
|
|
120
|
-
/**
|
|
121
|
-
* Validate expansion options.
|
|
122
|
-
*/
|
|
123
|
-
const validateOptions = (options) => Effect.gen(function* () {
|
|
124
|
-
const depth = options.depth ?? DEFAULT_OPTIONS.depth;
|
|
125
|
-
const decayFactor = options.decayFactor ?? DEFAULT_OPTIONS.decayFactor;
|
|
126
|
-
const maxNodes = options.maxNodes ?? DEFAULT_OPTIONS.maxNodes;
|
|
127
|
-
if (depth < 0) {
|
|
128
|
-
return yield* Effect.fail(new ValidationError({
|
|
129
|
-
reason: `Expansion depth must be >= 0, got: ${depth}`
|
|
130
|
-
}));
|
|
131
|
-
}
|
|
132
|
-
if (depth > 10) {
|
|
133
|
-
return yield* Effect.fail(new ValidationError({
|
|
134
|
-
reason: `Expansion depth must be <= 10, got: ${depth}`
|
|
135
|
-
}));
|
|
136
|
-
}
|
|
137
|
-
if (decayFactor <= 0 || decayFactor > 1) {
|
|
138
|
-
return yield* Effect.fail(new ValidationError({
|
|
139
|
-
reason: `Decay factor must be in (0, 1], got: ${decayFactor}`
|
|
140
|
-
}));
|
|
141
|
-
}
|
|
142
|
-
if (maxNodes < 1) {
|
|
143
|
-
return yield* Effect.fail(new ValidationError({
|
|
144
|
-
reason: `Max nodes must be >= 1, got: ${maxNodes}`
|
|
145
|
-
}));
|
|
146
|
-
}
|
|
147
|
-
// Validate EdgeTypeFilter if provided
|
|
148
|
-
if (options.edgeTypes && !isSimpleEdgeTypeArray(options.edgeTypes)) {
|
|
149
|
-
yield* validateEdgeTypeFilter(options.edgeTypes);
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
export const GraphExpansionServiceLive = Layer.effect(GraphExpansionService, Effect.gen(function* () {
|
|
153
|
-
const edgeService = yield* EdgeService;
|
|
154
|
-
const learningRepo = yield* LearningRepository;
|
|
155
|
-
const anchorRepo = yield* AnchorRepository;
|
|
156
|
-
return {
|
|
157
|
-
expand: (seeds, options = {}) => Effect.gen(function* () {
|
|
158
|
-
// Validate options
|
|
159
|
-
yield* validateOptions(options);
|
|
160
|
-
const depth = options.depth ?? DEFAULT_OPTIONS.depth;
|
|
161
|
-
const decayFactor = options.decayFactor ?? DEFAULT_OPTIONS.decayFactor;
|
|
162
|
-
const maxNodes = options.maxNodes ?? DEFAULT_OPTIONS.maxNodes;
|
|
163
|
-
const edgeTypeFilter = options.edgeTypes;
|
|
164
|
-
// Map direction option to findNeighbors terminology
|
|
165
|
-
const directionOpt = options.direction ?? DEFAULT_OPTIONS.direction;
|
|
166
|
-
const findDirection = directionOpt === "outbound" ? "outgoing"
|
|
167
|
-
: directionOpt === "inbound" ? "incoming"
|
|
168
|
-
: "both";
|
|
169
|
-
// Handle empty seeds
|
|
170
|
-
if (seeds.length === 0) {
|
|
171
|
-
return {
|
|
172
|
-
seeds: [],
|
|
173
|
-
expanded: [],
|
|
174
|
-
all: [],
|
|
175
|
-
stats: {
|
|
176
|
-
seedCount: 0,
|
|
177
|
-
expandedCount: 0,
|
|
178
|
-
maxDepthReached: 0,
|
|
179
|
-
nodesVisited: 0,
|
|
180
|
-
maxNodesReached: false,
|
|
181
|
-
},
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
// Track visited learning IDs to prevent cycles
|
|
185
|
-
const visited = new Set();
|
|
186
|
-
// Convert seeds to ExpandedLearning format
|
|
187
|
-
const seedLearnings = seeds.map((seed) => {
|
|
188
|
-
visited.add(seed.learning.id);
|
|
189
|
-
return {
|
|
190
|
-
learning: seed.learning,
|
|
191
|
-
hops: 0,
|
|
192
|
-
decayedScore: seed.score,
|
|
193
|
-
path: [seed.learning.id],
|
|
194
|
-
sourceEdge: null,
|
|
195
|
-
edgeWeight: null,
|
|
196
|
-
};
|
|
197
|
-
});
|
|
198
|
-
// If depth is 0, just return seeds
|
|
199
|
-
if (depth === 0) {
|
|
200
|
-
return {
|
|
201
|
-
seeds: seedLearnings,
|
|
202
|
-
expanded: [],
|
|
203
|
-
all: seedLearnings,
|
|
204
|
-
stats: {
|
|
205
|
-
seedCount: seedLearnings.length,
|
|
206
|
-
expandedCount: 0,
|
|
207
|
-
maxDepthReached: 0,
|
|
208
|
-
nodesVisited: seedLearnings.length,
|
|
209
|
-
maxNodesReached: seedLearnings.length >= maxNodes,
|
|
210
|
-
},
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
let frontier = seeds.map((seed) => ({
|
|
214
|
-
learningId: seed.learning.id,
|
|
215
|
-
score: seed.score,
|
|
216
|
-
path: [seed.learning.id],
|
|
217
|
-
}));
|
|
218
|
-
const expanded = [];
|
|
219
|
-
let maxDepthReached = 0;
|
|
220
|
-
let maxNodesReached = false;
|
|
221
|
-
const totalNodes = () => seedLearnings.length + expanded.length;
|
|
222
|
-
// BFS traversal
|
|
223
|
-
for (let currentHop = 1; currentHop <= depth; currentHop++) {
|
|
224
|
-
if (frontier.length === 0)
|
|
225
|
-
break;
|
|
226
|
-
if (totalNodes() >= maxNodes) {
|
|
227
|
-
maxNodesReached = true;
|
|
228
|
-
break;
|
|
229
|
-
}
|
|
230
|
-
const nextFrontier = [];
|
|
231
|
-
for (const node of frontier) {
|
|
232
|
-
if (totalNodes() >= maxNodes) {
|
|
233
|
-
maxNodesReached = true;
|
|
234
|
-
break;
|
|
235
|
-
}
|
|
236
|
-
// Find neighbors bidirectionally (per PRD-016 resolved question #1)
|
|
237
|
-
// Resolve edge types for this specific hop (supports per-hop overrides)
|
|
238
|
-
const edgeTypesForHop = resolveEdgeTypesForHop(edgeTypeFilter, currentHop);
|
|
239
|
-
const neighbors = yield* edgeService.findNeighbors("learning", String(node.learningId), {
|
|
240
|
-
depth: 1,
|
|
241
|
-
direction: findDirection,
|
|
242
|
-
edgeTypes: edgeTypesForHop,
|
|
243
|
-
});
|
|
244
|
-
// Filter to only learning neighbors and process
|
|
245
|
-
const learningNeighbors = neighbors.filter((n) => n.nodeType === "learning");
|
|
246
|
-
for (const neighbor of learningNeighbors) {
|
|
247
|
-
if (totalNodes() >= maxNodes) {
|
|
248
|
-
maxNodesReached = true;
|
|
249
|
-
break;
|
|
250
|
-
}
|
|
251
|
-
const neighborId = parseInt(neighbor.nodeId, 10);
|
|
252
|
-
if (isNaN(neighborId))
|
|
253
|
-
continue;
|
|
254
|
-
if (visited.has(neighborId))
|
|
255
|
-
continue;
|
|
256
|
-
visited.add(neighborId);
|
|
257
|
-
// Fetch the learning to include in results
|
|
258
|
-
const learning = yield* learningRepo.findById(neighborId);
|
|
259
|
-
if (!learning)
|
|
260
|
-
continue;
|
|
261
|
-
// Calculate decayed score: parentScore * edgeWeight * decayFactor
|
|
262
|
-
const newScore = node.score * neighbor.weight * decayFactor;
|
|
263
|
-
const newPath = [...node.path, learning.id];
|
|
264
|
-
expanded.push({
|
|
265
|
-
learning,
|
|
266
|
-
hops: currentHop,
|
|
267
|
-
decayedScore: newScore,
|
|
268
|
-
path: newPath,
|
|
269
|
-
sourceEdge: neighbor.edgeType,
|
|
270
|
-
edgeWeight: neighbor.weight,
|
|
271
|
-
});
|
|
272
|
-
maxDepthReached = currentHop;
|
|
273
|
-
// Add to next frontier for further expansion
|
|
274
|
-
nextFrontier.push({
|
|
275
|
-
learningId: learning.id,
|
|
276
|
-
score: newScore,
|
|
277
|
-
path: newPath,
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
frontier = nextFrontier;
|
|
282
|
-
}
|
|
283
|
-
// Sort expanded by decayed score (highest first)
|
|
284
|
-
expanded.sort((a, b) => b.decayedScore - a.decayedScore);
|
|
285
|
-
// Enforce maxNodes limit on total (seeds + expanded)
|
|
286
|
-
const expandedLimit = Math.max(0, maxNodes - seedLearnings.length);
|
|
287
|
-
const limitedExpanded = expanded.slice(0, expandedLimit);
|
|
288
|
-
if (expanded.length > expandedLimit)
|
|
289
|
-
maxNodesReached = true;
|
|
290
|
-
const all = [...seedLearnings, ...limitedExpanded];
|
|
291
|
-
return {
|
|
292
|
-
seeds: seedLearnings,
|
|
293
|
-
expanded: limitedExpanded,
|
|
294
|
-
all,
|
|
295
|
-
stats: {
|
|
296
|
-
seedCount: seedLearnings.length,
|
|
297
|
-
expandedCount: limitedExpanded.length,
|
|
298
|
-
maxDepthReached,
|
|
299
|
-
nodesVisited: visited.size,
|
|
300
|
-
maxNodesReached,
|
|
301
|
-
},
|
|
302
|
-
};
|
|
303
|
-
}),
|
|
304
|
-
expandFromFiles: (files, options = {}) => Effect.gen(function* () {
|
|
305
|
-
// Validate options
|
|
306
|
-
const depth = options.depth ?? DEFAULT_OPTIONS.depth;
|
|
307
|
-
const decayFactor = options.decayFactor ?? DEFAULT_OPTIONS.decayFactor;
|
|
308
|
-
const maxNodes = options.maxNodes ?? DEFAULT_OPTIONS.maxNodes;
|
|
309
|
-
if (depth < 0) {
|
|
310
|
-
return yield* Effect.fail(new ValidationError({
|
|
311
|
-
reason: `Expansion depth must be >= 0, got: ${depth}`
|
|
312
|
-
}));
|
|
313
|
-
}
|
|
314
|
-
if (depth > 10) {
|
|
315
|
-
return yield* Effect.fail(new ValidationError({
|
|
316
|
-
reason: `Expansion depth must be <= 10, got: ${depth}`
|
|
317
|
-
}));
|
|
318
|
-
}
|
|
319
|
-
if (decayFactor <= 0 || decayFactor > 1) {
|
|
320
|
-
return yield* Effect.fail(new ValidationError({
|
|
321
|
-
reason: `Decay factor must be in (0, 1], got: ${decayFactor}`
|
|
322
|
-
}));
|
|
323
|
-
}
|
|
324
|
-
if (maxNodes < 1) {
|
|
325
|
-
return yield* Effect.fail(new ValidationError({
|
|
326
|
-
reason: `Max nodes must be >= 1, got: ${maxNodes}`
|
|
327
|
-
}));
|
|
328
|
-
}
|
|
329
|
-
// Handle empty files input
|
|
330
|
-
if (files.length === 0) {
|
|
331
|
-
return {
|
|
332
|
-
anchored: [],
|
|
333
|
-
expanded: [],
|
|
334
|
-
all: [],
|
|
335
|
-
stats: {
|
|
336
|
-
inputFileCount: 0,
|
|
337
|
-
anchoredCount: 0,
|
|
338
|
-
expandedCount: 0,
|
|
339
|
-
maxDepthReached: 0,
|
|
340
|
-
filesVisited: 0,
|
|
341
|
-
},
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
// Track visited files and learnings to prevent duplicates
|
|
345
|
-
const visitedFiles = new Set(files);
|
|
346
|
-
const visitedLearningIds = new Set();
|
|
347
|
-
// Step 1: Find learnings ANCHORED_TO the input files (hop 0)
|
|
348
|
-
const anchoredLearnings = [];
|
|
349
|
-
for (const filePath of files) {
|
|
350
|
-
const anchors = yield* anchorRepo.findByFilePath(filePath);
|
|
351
|
-
// Filter to only valid anchors
|
|
352
|
-
const validAnchors = anchors.filter(a => a.status === "valid");
|
|
353
|
-
for (const anchor of validAnchors) {
|
|
354
|
-
if (visitedLearningIds.has(anchor.learningId))
|
|
355
|
-
continue;
|
|
356
|
-
visitedLearningIds.add(anchor.learningId);
|
|
357
|
-
const learning = yield* learningRepo.findById(anchor.learningId);
|
|
358
|
-
if (!learning)
|
|
359
|
-
continue;
|
|
360
|
-
anchoredLearnings.push({
|
|
361
|
-
learning,
|
|
362
|
-
sourceFile: filePath,
|
|
363
|
-
hops: 0,
|
|
364
|
-
decayedScore: 1.0, // Base score for directly anchored learnings
|
|
365
|
-
sourceEdge: "ANCHORED_TO",
|
|
366
|
-
edgeWeight: null,
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
// If depth is 0, just return anchored learnings
|
|
371
|
-
if (depth === 0) {
|
|
372
|
-
const limitedAnchored = anchoredLearnings.slice(0, maxNodes);
|
|
373
|
-
return {
|
|
374
|
-
anchored: limitedAnchored,
|
|
375
|
-
expanded: [],
|
|
376
|
-
all: limitedAnchored,
|
|
377
|
-
stats: {
|
|
378
|
-
inputFileCount: files.length,
|
|
379
|
-
anchoredCount: limitedAnchored.length,
|
|
380
|
-
expandedCount: 0,
|
|
381
|
-
maxDepthReached: 0,
|
|
382
|
-
filesVisited: files.length,
|
|
383
|
-
},
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
let frontier = files.map(f => ({
|
|
387
|
-
filePath: f,
|
|
388
|
-
score: 1.0,
|
|
389
|
-
}));
|
|
390
|
-
const expandedLearnings = [];
|
|
391
|
-
let maxDepthReached = 0;
|
|
392
|
-
const totalLearnings = () => anchoredLearnings.length + expandedLearnings.length;
|
|
393
|
-
// BFS traversal through file relationships
|
|
394
|
-
for (let currentHop = 1; currentHop <= depth; currentHop++) {
|
|
395
|
-
if (frontier.length === 0)
|
|
396
|
-
break;
|
|
397
|
-
if (totalLearnings() >= maxNodes)
|
|
398
|
-
break;
|
|
399
|
-
const nextFrontier = [];
|
|
400
|
-
for (const node of frontier) {
|
|
401
|
-
if (totalLearnings() >= maxNodes)
|
|
402
|
-
break;
|
|
403
|
-
// Find related files via IMPORTS and CO_CHANGES_WITH edges
|
|
404
|
-
// Note: For file nodes, nodeType is "file" and nodeId is the file path
|
|
405
|
-
const neighbors = yield* edgeService.findNeighbors("file", node.filePath, {
|
|
406
|
-
depth: 1,
|
|
407
|
-
direction: "both",
|
|
408
|
-
edgeTypes: ["IMPORTS", "CO_CHANGES_WITH"],
|
|
409
|
-
});
|
|
410
|
-
// Filter to only file neighbors
|
|
411
|
-
const fileNeighbors = neighbors.filter((n) => n.nodeType === "file");
|
|
412
|
-
for (const neighbor of fileNeighbors) {
|
|
413
|
-
if (totalLearnings() >= maxNodes)
|
|
414
|
-
break;
|
|
415
|
-
const relatedFilePath = neighbor.nodeId;
|
|
416
|
-
if (visitedFiles.has(relatedFilePath))
|
|
417
|
-
continue;
|
|
418
|
-
visitedFiles.add(relatedFilePath);
|
|
419
|
-
// Calculate decayed score for this hop
|
|
420
|
-
const hopScore = node.score * neighbor.weight * decayFactor;
|
|
421
|
-
// Find learnings anchored to this related file
|
|
422
|
-
const anchors = yield* anchorRepo.findByFilePath(relatedFilePath);
|
|
423
|
-
const validAnchors = anchors.filter(a => a.status === "valid");
|
|
424
|
-
for (const anchor of validAnchors) {
|
|
425
|
-
if (totalLearnings() >= maxNodes)
|
|
426
|
-
break;
|
|
427
|
-
if (visitedLearningIds.has(anchor.learningId))
|
|
428
|
-
continue;
|
|
429
|
-
visitedLearningIds.add(anchor.learningId);
|
|
430
|
-
const learning = yield* learningRepo.findById(anchor.learningId);
|
|
431
|
-
if (!learning)
|
|
432
|
-
continue;
|
|
433
|
-
expandedLearnings.push({
|
|
434
|
-
learning,
|
|
435
|
-
sourceFile: relatedFilePath,
|
|
436
|
-
hops: currentHop,
|
|
437
|
-
decayedScore: hopScore,
|
|
438
|
-
sourceEdge: neighbor.edgeType,
|
|
439
|
-
edgeWeight: neighbor.weight,
|
|
440
|
-
});
|
|
441
|
-
maxDepthReached = currentHop;
|
|
442
|
-
}
|
|
443
|
-
// Add to next frontier for further expansion
|
|
444
|
-
nextFrontier.push({
|
|
445
|
-
filePath: relatedFilePath,
|
|
446
|
-
score: hopScore,
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
frontier = nextFrontier;
|
|
451
|
-
}
|
|
452
|
-
// Sort expanded by decayed score (highest first)
|
|
453
|
-
expandedLearnings.sort((a, b) => b.decayedScore - a.decayedScore);
|
|
454
|
-
// Enforce maxNodes limit
|
|
455
|
-
const totalAvailable = anchoredLearnings.length + expandedLearnings.length;
|
|
456
|
-
let limitedAnchored = anchoredLearnings;
|
|
457
|
-
let limitedExpanded = expandedLearnings;
|
|
458
|
-
if (totalAvailable > maxNodes) {
|
|
459
|
-
// Prioritize anchored learnings, then fill with expanded
|
|
460
|
-
if (anchoredLearnings.length >= maxNodes) {
|
|
461
|
-
limitedAnchored = anchoredLearnings.slice(0, maxNodes);
|
|
462
|
-
limitedExpanded = [];
|
|
463
|
-
}
|
|
464
|
-
else {
|
|
465
|
-
const remainingSlots = maxNodes - anchoredLearnings.length;
|
|
466
|
-
limitedExpanded = expandedLearnings.slice(0, remainingSlots);
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
// Combine all and sort by decayedScore
|
|
470
|
-
const all = [...limitedAnchored, ...limitedExpanded];
|
|
471
|
-
all.sort((a, b) => b.decayedScore - a.decayedScore);
|
|
472
|
-
return {
|
|
473
|
-
anchored: limitedAnchored,
|
|
474
|
-
expanded: limitedExpanded,
|
|
475
|
-
all,
|
|
476
|
-
stats: {
|
|
477
|
-
inputFileCount: files.length,
|
|
478
|
-
anchoredCount: limitedAnchored.length,
|
|
479
|
-
expandedCount: limitedExpanded.length,
|
|
480
|
-
maxDepthReached,
|
|
481
|
-
filesVisited: visitedFiles.size,
|
|
482
|
-
},
|
|
483
|
-
};
|
|
484
|
-
}),
|
|
485
|
-
};
|
|
486
|
-
}));
|
|
487
|
-
//# sourceMappingURL=graph-expansion.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graph-expansion.js","sourceRoot":"","sources":["../../src/services/graph-expansion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,WAAW,EAA0B,MAAM,mBAAmB,CAAA;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAiB,eAAe,EAAE,MAAM,cAAc,CAAA;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAkIpD,MAAM,OAAO,qBAAsB,SAAQ,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,EA+B5E;CAAG;AAEN;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,CAAC,OAAO,CACpD,qBAAqB,EACrB;IACE,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAChB,MAAM,CAAC,OAAO,CAAC;QACb,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACrB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,IAAI,EAAE,CAAC;YACP,YAAY,EAAE,CAAC,CAAC,KAAK;YACrB,IAAI,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;YACrB,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,IAAI;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CAAC,CAAA;gBAC9D,CAAC;YACH,CAAC;YAED,uCAAuC;YACvC,MAAM,GAAG,GAAG,CAAC,GAAG,eAAe,EAAE,GAAG,eAAe,CAAC,CAAA;YACpD,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,YAAY,CAAC,CAAA;YAEnD,OAAO;gBACL,QAAQ,EAAE,eAAe;gBACzB,QAAQ,EAAE,eAAe;gBACzB,GAAG;gBACH,KAAK,EAAE;oBACL,cAAc,EAAE,KAAK,CAAC,MAAM;oBAC5B,aAAa,EAAE,eAAe,CAAC,MAAM;oBACrC,aAAa,EAAE,eAAe,CAAC,MAAM;oBACrC,eAAe;oBACf,YAAY,EAAE,YAAY,CAAC,IAAI;iBAChC;aACF,CAAA;QACH,CAAC,CAAC;KACL,CAAA;AACH,CAAC,CAAC,CACH,CAAA"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { Context, Effect, Layer } from "effect";
|
|
2
|
-
import { CandidateNotFoundError, DatabaseError, ValidationError } from "../errors.js";
|
|
3
|
-
import { CandidateRepository } from "../repo/candidate-repo.js";
|
|
4
|
-
import { LearningService } from "./learning-service.js";
|
|
5
|
-
import { EdgeService } from "./edge-service.js";
|
|
6
|
-
import type { LearningCandidate, CandidateFilter, CandidateId, Learning } from "@jamesaphoenix/tx-types";
|
|
7
|
-
/**
|
|
8
|
-
* Result of promoting a candidate to the learnings table.
|
|
9
|
-
*/
|
|
10
|
-
export interface PromotionResult {
|
|
11
|
-
/** The updated candidate with promoted status */
|
|
12
|
-
readonly candidate: LearningCandidate;
|
|
13
|
-
/** The newly created learning */
|
|
14
|
-
readonly learning: Learning;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Result of auto-promotion batch operation.
|
|
18
|
-
*/
|
|
19
|
-
export interface AutoPromoteResult {
|
|
20
|
-
/** Number of candidates auto-promoted */
|
|
21
|
-
readonly promoted: number;
|
|
22
|
-
/** Number of candidates skipped (already processed or low confidence) */
|
|
23
|
-
readonly skipped: number;
|
|
24
|
-
/** Number of candidates that failed to promote */
|
|
25
|
-
readonly failed: number;
|
|
26
|
-
/** IDs of promoted learnings */
|
|
27
|
-
readonly learningIds: readonly number[];
|
|
28
|
-
}
|
|
29
|
-
declare const PromotionService_base: Context.TagClass<PromotionService, "PromotionService", {
|
|
30
|
-
/**
|
|
31
|
-
* List candidates matching the given filter.
|
|
32
|
-
* Supports filtering by status, confidence, category, and pagination.
|
|
33
|
-
*/
|
|
34
|
-
readonly list: (filter: CandidateFilter) => Effect.Effect<readonly LearningCandidate[], DatabaseError>;
|
|
35
|
-
/**
|
|
36
|
-
* Promote a candidate to the learnings table.
|
|
37
|
-
* Creates a new learning and updates the candidate status to 'promoted'.
|
|
38
|
-
*/
|
|
39
|
-
readonly promote: (id: CandidateId) => Effect.Effect<PromotionResult, CandidateNotFoundError | DatabaseError>;
|
|
40
|
-
/**
|
|
41
|
-
* Reject a candidate with a reason.
|
|
42
|
-
* Updates the candidate status to 'rejected' and stores the rejection reason.
|
|
43
|
-
*/
|
|
44
|
-
readonly reject: (id: CandidateId, reason: string) => Effect.Effect<LearningCandidate, CandidateNotFoundError | ValidationError | DatabaseError>;
|
|
45
|
-
/**
|
|
46
|
-
* Auto-promote high-confidence candidates.
|
|
47
|
-
* Promotes all pending candidates with 'high' confidence level.
|
|
48
|
-
* Uses 'auto' as the reviewer identifier.
|
|
49
|
-
*/
|
|
50
|
-
readonly autoPromote: () => Effect.Effect<AutoPromoteResult, DatabaseError>;
|
|
51
|
-
/**
|
|
52
|
-
* Get all pending candidates awaiting review.
|
|
53
|
-
* Convenience method equivalent to list({ status: 'pending' }).
|
|
54
|
-
*/
|
|
55
|
-
readonly getPending: () => Effect.Effect<readonly LearningCandidate[], DatabaseError>;
|
|
56
|
-
}>;
|
|
57
|
-
/**
|
|
58
|
-
* PromotionService manages the lifecycle of learning candidates,
|
|
59
|
-
* including listing, promoting to learnings, rejecting, and auto-promotion.
|
|
60
|
-
*
|
|
61
|
-
* @see PRD-015 for the knowledge promotion pipeline
|
|
62
|
-
*/
|
|
63
|
-
export declare class PromotionService extends PromotionService_base {
|
|
64
|
-
}
|
|
65
|
-
export declare const PromotionServiceLive: Layer.Layer<PromotionService, never, LearningService | CandidateRepository | EdgeService>;
|
|
66
|
-
export {};
|
|
67
|
-
//# sourceMappingURL=promotion-service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promotion-service.d.ts","sourceRoot":"","sources":["../../src/services/promotion-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,QAAQ,EACT,MAAM,yBAAyB,CAAA;AAEhC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAA;IACrC,iCAAiC;IACjC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,yEAAyE;IACzE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,kDAAkD;IAClD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,gCAAgC;IAChC,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,C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