@harness-engineering/cli 1.16.0 → 1.18.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/agents/skills/claude-code/harness-roadmap-pilot/SKILL.md +204 -0
- package/dist/agents/skills/claude-code/harness-roadmap-pilot/skill.yaml +52 -0
- package/dist/agents/skills/codex/harness-roadmap-pilot/SKILL.md +204 -0
- package/dist/agents/skills/codex/harness-roadmap-pilot/skill.yaml +52 -0
- package/dist/agents/skills/cursor/harness-roadmap-pilot/SKILL.md +204 -0
- package/dist/agents/skills/cursor/harness-roadmap-pilot/skill.yaml +52 -0
- package/dist/agents/skills/gemini-cli/harness-roadmap-pilot/SKILL.md +204 -0
- package/dist/agents/skills/gemini-cli/harness-roadmap-pilot/skill.yaml +52 -0
- package/dist/agents/skills/package.json +5 -5
- package/dist/{agents-md-VYDFPIRW.js → agents-md-DUYNKHJZ.js} +1 -1
- package/dist/{architecture-K5HSRBGB.js → architecture-UBO5KKUV.js} +2 -2
- package/dist/bin/harness-mcp.js +13 -12
- package/dist/bin/harness.js +18 -15
- package/dist/{check-phase-gate-5AS6SXL6.js → check-phase-gate-OSHN2AEL.js} +3 -3
- package/dist/{chunk-JOP2NDNB.js → chunk-2DMIQ35P.js} +151 -79
- package/dist/{chunk-TF6ZLHJV.js → chunk-5FM64G6D.js} +2 -2
- package/dist/{chunk-5ZXHMCPL.js → chunk-ABQUCXRE.js} +2 -1
- package/dist/{chunk-AV6KMDO5.js → chunk-APNPXLB2.js} +4 -4
- package/dist/{chunk-FTMXDOR6.js → chunk-CZZXE6BL.js} +1 -1
- package/dist/{chunk-SFRGPAK6.js → chunk-GWXP3JVA.js} +3 -3
- package/dist/{chunk-SHYWICGA.js → chunk-OA3MOZGG.js} +22 -22
- package/dist/{chunk-RWZPHW4H.js → chunk-OHZVGIPE.js} +9 -9
- package/dist/{chunk-C7DTKLPW.js → chunk-QSRRBNLY.js} +8 -8
- package/dist/{chunk-QDF7COPQ.js → chunk-TG7IUJ3J.js} +1 -1
- package/dist/{chunk-DNDBFIZN.js → chunk-TZIHFNEG.js} +7 -7
- package/dist/{chunk-ZJMU7MEV.js → chunk-UX3JHYEA.js} +1 -1
- package/dist/{chunk-ALFKNAZW.js → chunk-VF23UTNB.js} +545 -36
- package/dist/{chunk-7MJAPE3Z.js → chunk-YLN34N65.js} +1 -0
- package/dist/{chunk-OCDDCGDE.js → chunk-ZA2I7S3E.js} +20 -1
- package/dist/{ci-workflow-CRWU723U.js → ci-workflow-FJZMNZPT.js} +1 -1
- package/dist/{dist-4LPXJYVZ.js → dist-MF5BK5AD.js} +19 -1
- package/dist/{dist-B26DFXMP.js → dist-U7EAO6T2.js} +110 -60
- package/dist/{docs-4JRHTLUZ.js → docs-WZHW4N4P.js} +3 -3
- package/dist/{engine-3G3VIM6L.js → engine-VS6ZJ2VZ.js} +2 -2
- package/dist/{entropy-G6CZ2A6P.js → entropy-FCIGJIIT.js} +2 -2
- package/dist/{feedback-QYKQ65HB.js → feedback-O3FYTZIE.js} +1 -1
- package/dist/{generate-agent-definitions-SAAOAPT4.js → generate-agent-definitions-EYG263XD.js} +1 -1
- package/dist/{graph-loader-2M2HXDQI.js → graph-loader-KMHDQYDT.js} +1 -1
- package/dist/index.d.ts +70 -11
- package/dist/index.js +15 -15
- package/dist/{loader-VCOK3PF7.js → loader-B4XWX4K6.js} +1 -1
- package/dist/{mcp-YENEPHBW.js → mcp-DVVUODN7.js} +12 -12
- package/dist/{performance-UBCFI2UP.js → performance-NMJDV6HF.js} +3 -3
- package/dist/{review-pipeline-IQAVCWAX.js → review-pipeline-MSEJWTKM.js} +1 -1
- package/dist/{runtime-PYFFIESU.js → runtime-YHVLJNPG.js} +1 -1
- package/dist/{security-ZDADTPYW.js → security-HTDKKGMX.js} +1 -1
- package/dist/{validate-VRTUHALQ.js → validate-SPSTH2YW.js} +2 -2
- package/dist/{validate-cross-check-4Y6NHNK3.js → validate-cross-check-YTDWIMFI.js} +1 -1
- package/package.json +21 -21
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-3WGJMBKH.js";
|
|
5
5
|
import {
|
|
6
6
|
ArchConfigSchema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VF23UTNB.js";
|
|
8
8
|
import {
|
|
9
9
|
Err,
|
|
10
10
|
Ok
|
|
@@ -163,6 +163,22 @@ var IntegrationsConfigSchema = z.object({
|
|
|
163
163
|
/** Integrations the user does not want doctor to suggest */
|
|
164
164
|
dismissed: z.array(z.string()).default([])
|
|
165
165
|
});
|
|
166
|
+
var TrackerConfigSchema = z.object({
|
|
167
|
+
/** Tracker kind — currently only 'github' is supported */
|
|
168
|
+
kind: z.literal("github"),
|
|
169
|
+
/** Repository in "owner/repo" format */
|
|
170
|
+
repo: z.string().optional(),
|
|
171
|
+
/** Labels auto-applied to synced issues for filtering */
|
|
172
|
+
labels: z.array(z.string()).optional(),
|
|
173
|
+
/** Maps roadmap status -> external status */
|
|
174
|
+
statusMap: z.record(z.enum(["backlog", "planned", "in-progress", "done", "blocked"]), z.string()),
|
|
175
|
+
/** Maps external status (optionally with label) -> roadmap status */
|
|
176
|
+
reverseStatusMap: z.record(z.string(), z.string()).optional()
|
|
177
|
+
});
|
|
178
|
+
var RoadmapConfigSchema = z.object({
|
|
179
|
+
/** External tracker sync settings */
|
|
180
|
+
tracker: TrackerConfigSchema.optional()
|
|
181
|
+
});
|
|
166
182
|
var HarnessConfigSchema = z.object({
|
|
167
183
|
/** Configuration schema version */
|
|
168
184
|
version: z.literal(1),
|
|
@@ -229,6 +245,8 @@ var HarnessConfigSchema = z.object({
|
|
|
229
245
|
/** Override the tier of specific skills (e.g., promote a Tier 3 skill to Tier 2) */
|
|
230
246
|
tierOverrides: z.record(z.string(), z.number().int().min(1).max(3)).default({})
|
|
231
247
|
}).optional(),
|
|
248
|
+
/** Roadmap sync and tracker integration settings */
|
|
249
|
+
roadmap: RoadmapConfigSchema.optional(),
|
|
232
250
|
/** How often (in ms) to check for CLI updates */
|
|
233
251
|
updateCheckInterval: z.number().int().min(0).optional()
|
|
234
252
|
});
|
|
@@ -287,6 +305,7 @@ function resolveConfig(configPath) {
|
|
|
287
305
|
}
|
|
288
306
|
|
|
289
307
|
export {
|
|
308
|
+
TrackerConfigSchema,
|
|
290
309
|
findConfigFile,
|
|
291
310
|
loadConfig,
|
|
292
311
|
resolveConfig
|
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
ForbiddenImportCollector,
|
|
44
44
|
GateConfigSchema,
|
|
45
45
|
GateResultSchema,
|
|
46
|
+
GitHubIssuesSyncAdapter,
|
|
46
47
|
HandoffSchema,
|
|
47
48
|
HarnessStateSchema,
|
|
48
49
|
InteractionTypeSchema,
|
|
@@ -64,6 +65,7 @@ import {
|
|
|
64
65
|
RuleRegistry,
|
|
65
66
|
SECURITY_DESCRIPTOR,
|
|
66
67
|
STALENESS_WARNING_DAYS,
|
|
68
|
+
STATUS_RANK,
|
|
67
69
|
SecurityConfigSchema,
|
|
68
70
|
SecurityScanner,
|
|
69
71
|
SharableBoundaryConfigSchema,
|
|
@@ -97,6 +99,7 @@ import {
|
|
|
97
99
|
archiveLearnings,
|
|
98
100
|
archiveSession,
|
|
99
101
|
archiveStream,
|
|
102
|
+
assignFeature,
|
|
100
103
|
buildDependencyGraph,
|
|
101
104
|
buildExclusionSet,
|
|
102
105
|
buildSnapshot,
|
|
@@ -161,6 +164,7 @@ import {
|
|
|
161
164
|
formatGitHubSummary,
|
|
162
165
|
formatOutline,
|
|
163
166
|
formatTerminalOutput,
|
|
167
|
+
fullSync,
|
|
164
168
|
generateAgentsMap,
|
|
165
169
|
generateSuggestions,
|
|
166
170
|
getActionEmitter,
|
|
@@ -178,6 +182,7 @@ import {
|
|
|
178
182
|
injectionRules,
|
|
179
183
|
insecureDefaultsRules,
|
|
180
184
|
isDuplicateFinding,
|
|
185
|
+
isRegression,
|
|
181
186
|
isSmallSuggestion,
|
|
182
187
|
isUpdateCheckEnabled,
|
|
183
188
|
listActiveSessions,
|
|
@@ -231,6 +236,7 @@ import {
|
|
|
231
236
|
resetParserCache,
|
|
232
237
|
resolveFileToLayer,
|
|
233
238
|
resolveModelTier,
|
|
239
|
+
resolveReverseStatus,
|
|
234
240
|
resolveRuleSeverity,
|
|
235
241
|
resolveSessionDir,
|
|
236
242
|
resolveStreamPath,
|
|
@@ -251,6 +257,7 @@ import {
|
|
|
251
257
|
saveStreamIndex,
|
|
252
258
|
scanForInjection,
|
|
253
259
|
scopeContext,
|
|
260
|
+
scoreRoadmapCandidates,
|
|
254
261
|
searchSymbols,
|
|
255
262
|
secretRules,
|
|
256
263
|
serializeRoadmap,
|
|
@@ -259,7 +266,9 @@ import {
|
|
|
259
266
|
shouldRunCheck,
|
|
260
267
|
spawnBackgroundCheck,
|
|
261
268
|
syncConstraintNodes,
|
|
269
|
+
syncFromExternal,
|
|
262
270
|
syncRoadmap,
|
|
271
|
+
syncToExternal,
|
|
263
272
|
tagUncitedFindings,
|
|
264
273
|
touchStream,
|
|
265
274
|
trackAction,
|
|
@@ -282,7 +291,7 @@ import {
|
|
|
282
291
|
writeSessionSummary,
|
|
283
292
|
writeTaint,
|
|
284
293
|
xssRules
|
|
285
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-VF23UTNB.js";
|
|
286
295
|
import {
|
|
287
296
|
Err,
|
|
288
297
|
Ok,
|
|
@@ -337,6 +346,7 @@ export {
|
|
|
337
346
|
ForbiddenImportCollector,
|
|
338
347
|
GateConfigSchema,
|
|
339
348
|
GateResultSchema,
|
|
349
|
+
GitHubIssuesSyncAdapter,
|
|
340
350
|
HandoffSchema,
|
|
341
351
|
HarnessStateSchema,
|
|
342
352
|
InteractionTypeSchema,
|
|
@@ -361,6 +371,7 @@ export {
|
|
|
361
371
|
SESSION_SECTION_NAMES,
|
|
362
372
|
STALENESS_WARNING_DAYS,
|
|
363
373
|
STANDARD_COGNITIVE_MODES,
|
|
374
|
+
STATUS_RANK,
|
|
364
375
|
SecurityConfigSchema,
|
|
365
376
|
SecurityScanner,
|
|
366
377
|
SharableBoundaryConfigSchema,
|
|
@@ -394,6 +405,7 @@ export {
|
|
|
394
405
|
archiveLearnings,
|
|
395
406
|
archiveSession,
|
|
396
407
|
archiveStream,
|
|
408
|
+
assignFeature,
|
|
397
409
|
buildDependencyGraph,
|
|
398
410
|
buildExclusionSet,
|
|
399
411
|
buildSnapshot,
|
|
@@ -458,6 +470,7 @@ export {
|
|
|
458
470
|
formatGitHubSummary,
|
|
459
471
|
formatOutline,
|
|
460
472
|
formatTerminalOutput,
|
|
473
|
+
fullSync,
|
|
461
474
|
generateAgentsMap,
|
|
462
475
|
generateSuggestions,
|
|
463
476
|
getActionEmitter,
|
|
@@ -477,6 +490,7 @@ export {
|
|
|
477
490
|
isDuplicateFinding,
|
|
478
491
|
isErr,
|
|
479
492
|
isOk,
|
|
493
|
+
isRegression,
|
|
480
494
|
isSmallSuggestion,
|
|
481
495
|
isUpdateCheckEnabled,
|
|
482
496
|
listActiveSessions,
|
|
@@ -530,6 +544,7 @@ export {
|
|
|
530
544
|
resetParserCache,
|
|
531
545
|
resolveFileToLayer,
|
|
532
546
|
resolveModelTier,
|
|
547
|
+
resolveReverseStatus,
|
|
533
548
|
resolveRuleSeverity,
|
|
534
549
|
resolveSessionDir,
|
|
535
550
|
resolveStreamPath,
|
|
@@ -550,6 +565,7 @@ export {
|
|
|
550
565
|
saveStreamIndex,
|
|
551
566
|
scanForInjection,
|
|
552
567
|
scopeContext,
|
|
568
|
+
scoreRoadmapCandidates,
|
|
553
569
|
searchSymbols,
|
|
554
570
|
secretRules,
|
|
555
571
|
serializeRoadmap,
|
|
@@ -558,7 +574,9 @@ export {
|
|
|
558
574
|
shouldRunCheck,
|
|
559
575
|
spawnBackgroundCheck,
|
|
560
576
|
syncConstraintNodes,
|
|
577
|
+
syncFromExternal,
|
|
561
578
|
syncRoadmap,
|
|
579
|
+
syncToExternal,
|
|
562
580
|
tagUncitedFindings,
|
|
563
581
|
touchStream,
|
|
564
582
|
trackAction,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// ../graph/dist/index.mjs
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import loki from "lokijs";
|
|
4
3
|
import { readFile, writeFile, mkdir, access } from "fs/promises";
|
|
5
4
|
import { join } from "path";
|
|
6
5
|
import * as fs from "fs/promises";
|
|
@@ -149,28 +148,38 @@ function safeMerge(target, source) {
|
|
|
149
148
|
}
|
|
150
149
|
}
|
|
151
150
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
});
|
|
162
|
-
this.edges = this.db.addCollection("edges", {
|
|
163
|
-
indices: ["from", "to", "type"]
|
|
164
|
-
});
|
|
151
|
+
function edgeKey(from, to, type) {
|
|
152
|
+
return `${from}\0${to}\0${type}`;
|
|
153
|
+
}
|
|
154
|
+
function addToIndex(index, key, edge) {
|
|
155
|
+
const list = index.get(key);
|
|
156
|
+
if (list) {
|
|
157
|
+
list.push(edge);
|
|
158
|
+
} else {
|
|
159
|
+
index.set(key, [edge]);
|
|
165
160
|
}
|
|
161
|
+
}
|
|
162
|
+
function removeFromIndex(index, key, edge) {
|
|
163
|
+
const list = index.get(key);
|
|
164
|
+
if (!list) return;
|
|
165
|
+
const idx = list.indexOf(edge);
|
|
166
|
+
if (idx !== -1) list.splice(idx, 1);
|
|
167
|
+
if (list.length === 0) index.delete(key);
|
|
168
|
+
}
|
|
169
|
+
var GraphStore = class {
|
|
170
|
+
nodeMap = /* @__PURE__ */ new Map();
|
|
171
|
+
edgeMap = /* @__PURE__ */ new Map();
|
|
172
|
+
// keyed by from\0to\0type
|
|
173
|
+
edgesByFrom = /* @__PURE__ */ new Map();
|
|
174
|
+
edgesByTo = /* @__PURE__ */ new Map();
|
|
175
|
+
edgesByType = /* @__PURE__ */ new Map();
|
|
166
176
|
// --- Node operations ---
|
|
167
177
|
addNode(node) {
|
|
168
|
-
const existing = this.
|
|
178
|
+
const existing = this.nodeMap.get(node.id);
|
|
169
179
|
if (existing) {
|
|
170
180
|
safeMerge(existing, node);
|
|
171
|
-
this.nodes.update(existing);
|
|
172
181
|
} else {
|
|
173
|
-
this.
|
|
182
|
+
this.nodeMap.set(node.id, { ...node });
|
|
174
183
|
}
|
|
175
184
|
}
|
|
176
185
|
batchAddNodes(nodes) {
|
|
@@ -179,44 +188,44 @@ var GraphStore = class {
|
|
|
179
188
|
}
|
|
180
189
|
}
|
|
181
190
|
getNode(id) {
|
|
182
|
-
const
|
|
183
|
-
if (!
|
|
184
|
-
return
|
|
191
|
+
const node = this.nodeMap.get(id);
|
|
192
|
+
if (!node) return null;
|
|
193
|
+
return { ...node };
|
|
185
194
|
}
|
|
186
195
|
findNodes(query) {
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
196
|
+
const results = [];
|
|
197
|
+
for (const node of this.nodeMap.values()) {
|
|
198
|
+
if (query.type !== void 0 && node.type !== query.type) continue;
|
|
199
|
+
if (query.name !== void 0 && node.name !== query.name) continue;
|
|
200
|
+
if (query.path !== void 0 && node.path !== query.path) continue;
|
|
201
|
+
results.push({ ...node });
|
|
202
|
+
}
|
|
203
|
+
return results;
|
|
192
204
|
}
|
|
193
205
|
removeNode(id) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
const edgesToRemove = this.edges.find({
|
|
199
|
-
$or: [{ from: id }, { to: id }]
|
|
200
|
-
});
|
|
206
|
+
this.nodeMap.delete(id);
|
|
207
|
+
const fromEdges = this.edgesByFrom.get(id) ?? [];
|
|
208
|
+
const toEdges = this.edgesByTo.get(id) ?? [];
|
|
209
|
+
const edgesToRemove = /* @__PURE__ */ new Set([...fromEdges, ...toEdges]);
|
|
201
210
|
for (const edge of edgesToRemove) {
|
|
202
|
-
this.
|
|
211
|
+
this.removeEdgeInternal(edge);
|
|
203
212
|
}
|
|
204
213
|
}
|
|
205
214
|
// --- Edge operations ---
|
|
206
215
|
addEdge(edge) {
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
to: edge.to,
|
|
210
|
-
type: edge.type
|
|
211
|
-
});
|
|
216
|
+
const key = edgeKey(edge.from, edge.to, edge.type);
|
|
217
|
+
const existing = this.edgeMap.get(key);
|
|
212
218
|
if (existing) {
|
|
213
219
|
if (edge.metadata) {
|
|
214
220
|
safeMerge(existing, edge);
|
|
215
|
-
this.edges.update(existing);
|
|
216
221
|
}
|
|
217
222
|
return;
|
|
218
223
|
}
|
|
219
|
-
|
|
224
|
+
const copy = { ...edge };
|
|
225
|
+
this.edgeMap.set(key, copy);
|
|
226
|
+
addToIndex(this.edgesByFrom, edge.from, copy);
|
|
227
|
+
addToIndex(this.edgesByTo, edge.to, copy);
|
|
228
|
+
addToIndex(this.edgesByType, edge.type, copy);
|
|
220
229
|
}
|
|
221
230
|
batchAddEdges(edges) {
|
|
222
231
|
for (const edge of edges) {
|
|
@@ -224,22 +233,38 @@ var GraphStore = class {
|
|
|
224
233
|
}
|
|
225
234
|
}
|
|
226
235
|
getEdges(query) {
|
|
227
|
-
|
|
228
|
-
if (query.from !== void 0
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
236
|
+
let candidates;
|
|
237
|
+
if (query.from !== void 0 && query.to !== void 0 && query.type !== void 0) {
|
|
238
|
+
const edge = this.edgeMap.get(edgeKey(query.from, query.to, query.type));
|
|
239
|
+
return edge ? [{ ...edge }] : [];
|
|
240
|
+
} else if (query.from !== void 0) {
|
|
241
|
+
candidates = this.edgesByFrom.get(query.from) ?? [];
|
|
242
|
+
} else if (query.to !== void 0) {
|
|
243
|
+
candidates = this.edgesByTo.get(query.to) ?? [];
|
|
244
|
+
} else if (query.type !== void 0) {
|
|
245
|
+
candidates = this.edgesByType.get(query.type) ?? [];
|
|
246
|
+
} else {
|
|
247
|
+
candidates = this.edgeMap.values();
|
|
248
|
+
}
|
|
249
|
+
const results = [];
|
|
250
|
+
for (const edge of candidates) {
|
|
251
|
+
if (query.from !== void 0 && edge.from !== query.from) continue;
|
|
252
|
+
if (query.to !== void 0 && edge.to !== query.to) continue;
|
|
253
|
+
if (query.type !== void 0 && edge.type !== query.type) continue;
|
|
254
|
+
results.push({ ...edge });
|
|
255
|
+
}
|
|
256
|
+
return results;
|
|
232
257
|
}
|
|
233
258
|
getNeighbors(nodeId, direction = "both") {
|
|
234
259
|
const neighborIds = /* @__PURE__ */ new Set();
|
|
235
260
|
if (direction === "outbound" || direction === "both") {
|
|
236
|
-
const outEdges = this.
|
|
261
|
+
const outEdges = this.edgesByFrom.get(nodeId) ?? [];
|
|
237
262
|
for (const edge of outEdges) {
|
|
238
263
|
neighborIds.add(edge.to);
|
|
239
264
|
}
|
|
240
265
|
}
|
|
241
266
|
if (direction === "inbound" || direction === "both") {
|
|
242
|
-
const inEdges = this.
|
|
267
|
+
const inEdges = this.edgesByTo.get(nodeId) ?? [];
|
|
243
268
|
for (const edge of inEdges) {
|
|
244
269
|
neighborIds.add(edge.from);
|
|
245
270
|
}
|
|
@@ -253,20 +278,23 @@ var GraphStore = class {
|
|
|
253
278
|
}
|
|
254
279
|
// --- Counts ---
|
|
255
280
|
get nodeCount() {
|
|
256
|
-
return this.
|
|
281
|
+
return this.nodeMap.size;
|
|
257
282
|
}
|
|
258
283
|
get edgeCount() {
|
|
259
|
-
return this.
|
|
284
|
+
return this.edgeMap.size;
|
|
260
285
|
}
|
|
261
286
|
// --- Clear ---
|
|
262
287
|
clear() {
|
|
263
|
-
this.
|
|
264
|
-
this.
|
|
288
|
+
this.nodeMap.clear();
|
|
289
|
+
this.edgeMap.clear();
|
|
290
|
+
this.edgesByFrom.clear();
|
|
291
|
+
this.edgesByTo.clear();
|
|
292
|
+
this.edgesByType.clear();
|
|
265
293
|
}
|
|
266
294
|
// --- Persistence ---
|
|
267
295
|
async save(dirPath) {
|
|
268
|
-
const allNodes = this.
|
|
269
|
-
const allEdges = this.
|
|
296
|
+
const allNodes = Array.from(this.nodeMap.values()).map((n) => ({ ...n }));
|
|
297
|
+
const allEdges = Array.from(this.edgeMap.values()).map((e) => ({ ...e }));
|
|
270
298
|
await saveGraph(dirPath, allNodes, allEdges);
|
|
271
299
|
}
|
|
272
300
|
async load(dirPath) {
|
|
@@ -274,17 +302,25 @@ var GraphStore = class {
|
|
|
274
302
|
if (!data) return false;
|
|
275
303
|
this.clear();
|
|
276
304
|
for (const node of data.nodes) {
|
|
277
|
-
this.
|
|
305
|
+
this.nodeMap.set(node.id, { ...node });
|
|
278
306
|
}
|
|
279
307
|
for (const edge of data.edges) {
|
|
280
|
-
|
|
308
|
+
const copy = { ...edge };
|
|
309
|
+
const key = edgeKey(edge.from, edge.to, edge.type);
|
|
310
|
+
this.edgeMap.set(key, copy);
|
|
311
|
+
addToIndex(this.edgesByFrom, edge.from, copy);
|
|
312
|
+
addToIndex(this.edgesByTo, edge.to, copy);
|
|
313
|
+
addToIndex(this.edgesByType, edge.type, copy);
|
|
281
314
|
}
|
|
282
315
|
return true;
|
|
283
316
|
}
|
|
284
317
|
// --- Internal ---
|
|
285
|
-
|
|
286
|
-
const
|
|
287
|
-
|
|
318
|
+
removeEdgeInternal(edge) {
|
|
319
|
+
const key = edgeKey(edge.from, edge.to, edge.type);
|
|
320
|
+
this.edgeMap.delete(key);
|
|
321
|
+
removeFromIndex(this.edgesByFrom, edge.from, edge);
|
|
322
|
+
removeFromIndex(this.edgesByTo, edge.to, edge);
|
|
323
|
+
removeFromIndex(this.edgesByType, edge.type, edge);
|
|
288
324
|
}
|
|
289
325
|
};
|
|
290
326
|
function cosineSimilarity(a, b) {
|
|
@@ -361,11 +397,11 @@ var VectorStore = class _VectorStore {
|
|
|
361
397
|
return store;
|
|
362
398
|
}
|
|
363
399
|
};
|
|
364
|
-
function
|
|
400
|
+
function edgeKey2(e) {
|
|
365
401
|
return `${e.from}|${e.to}|${e.type}`;
|
|
366
402
|
}
|
|
367
403
|
function addEdge(state, edge) {
|
|
368
|
-
const key =
|
|
404
|
+
const key = edgeKey2(edge);
|
|
369
405
|
if (!state.edgeSet.has(key)) {
|
|
370
406
|
state.edgeSet.add(key);
|
|
371
407
|
state.resultEdges.push(edge);
|
|
@@ -537,6 +573,7 @@ var CodeIngestor = class {
|
|
|
537
573
|
constructor(store) {
|
|
538
574
|
this.store = store;
|
|
539
575
|
}
|
|
576
|
+
store;
|
|
540
577
|
async ingest(rootDir) {
|
|
541
578
|
const start = Date.now();
|
|
542
579
|
const errors = [];
|
|
@@ -924,6 +961,8 @@ var GitIngestor = class {
|
|
|
924
961
|
this.store = store;
|
|
925
962
|
this.gitRunner = gitRunner;
|
|
926
963
|
}
|
|
964
|
+
store;
|
|
965
|
+
gitRunner;
|
|
927
966
|
async ingest(rootDir) {
|
|
928
967
|
const start = Date.now();
|
|
929
968
|
const errors = [];
|
|
@@ -1100,6 +1139,7 @@ var TopologicalLinker = class {
|
|
|
1100
1139
|
constructor(store) {
|
|
1101
1140
|
this.store = store;
|
|
1102
1141
|
}
|
|
1142
|
+
store;
|
|
1103
1143
|
link() {
|
|
1104
1144
|
let edgesAdded = 0;
|
|
1105
1145
|
const files = this.store.findNodes({ type: "file" });
|
|
@@ -1188,6 +1228,7 @@ var KnowledgeIngestor = class {
|
|
|
1188
1228
|
constructor(store) {
|
|
1189
1229
|
this.store = store;
|
|
1190
1230
|
}
|
|
1231
|
+
store;
|
|
1191
1232
|
async ingestADRs(adrDir) {
|
|
1192
1233
|
const start = Date.now();
|
|
1193
1234
|
const errors = [];
|
|
@@ -1430,6 +1471,7 @@ var SyncManager = class {
|
|
|
1430
1471
|
this.store = store;
|
|
1431
1472
|
this.metadataPath = path4.join(graphDir, "sync-metadata.json");
|
|
1432
1473
|
}
|
|
1474
|
+
store;
|
|
1433
1475
|
registrations = /* @__PURE__ */ new Map();
|
|
1434
1476
|
metadataPath;
|
|
1435
1477
|
registerConnector(connector, config) {
|
|
@@ -2012,6 +2054,7 @@ var GraphEntropyAdapter = class {
|
|
|
2012
2054
|
constructor(store) {
|
|
2013
2055
|
this.store = store;
|
|
2014
2056
|
}
|
|
2057
|
+
store;
|
|
2015
2058
|
/**
|
|
2016
2059
|
* Find all `documents` edges and classify them as stale or missing-target.
|
|
2017
2060
|
*
|
|
@@ -2150,6 +2193,7 @@ var GraphComplexityAdapter = class {
|
|
|
2150
2193
|
constructor(store) {
|
|
2151
2194
|
this.store = store;
|
|
2152
2195
|
}
|
|
2196
|
+
store;
|
|
2153
2197
|
/**
|
|
2154
2198
|
* Compute complexity hotspots by combining cyclomatic complexity with change frequency.
|
|
2155
2199
|
*
|
|
@@ -2235,6 +2279,7 @@ var GraphCouplingAdapter = class {
|
|
|
2235
2279
|
constructor(store) {
|
|
2236
2280
|
this.store = store;
|
|
2237
2281
|
}
|
|
2282
|
+
store;
|
|
2238
2283
|
/**
|
|
2239
2284
|
* Compute coupling data for all file nodes in the graph.
|
|
2240
2285
|
*
|
|
@@ -2302,6 +2347,7 @@ var GraphAnomalyAdapter = class {
|
|
|
2302
2347
|
constructor(store) {
|
|
2303
2348
|
this.store = store;
|
|
2304
2349
|
}
|
|
2350
|
+
store;
|
|
2305
2351
|
detect(options) {
|
|
2306
2352
|
const threshold = options?.threshold != null && options.threshold > 0 ? options.threshold : DEFAULT_THRESHOLD;
|
|
2307
2353
|
const requestedMetrics = options?.metrics ?? [...DEFAULT_METRICS];
|
|
@@ -3444,6 +3490,7 @@ var GraphConstraintAdapter = class {
|
|
|
3444
3490
|
constructor(store) {
|
|
3445
3491
|
this.store = store;
|
|
3446
3492
|
}
|
|
3493
|
+
store;
|
|
3447
3494
|
computeDependencyGraph() {
|
|
3448
3495
|
const fileNodes = this.store.findNodes({ type: "file" });
|
|
3449
3496
|
const nodes = fileNodes.map((n) => n.path ?? n.id);
|
|
@@ -3584,6 +3631,7 @@ var DesignIngestor = class {
|
|
|
3584
3631
|
constructor(store) {
|
|
3585
3632
|
this.store = store;
|
|
3586
3633
|
}
|
|
3634
|
+
store;
|
|
3587
3635
|
async ingestTokens(tokensPath) {
|
|
3588
3636
|
const start = Date.now();
|
|
3589
3637
|
const content = await readFileOrNull(tokensPath);
|
|
@@ -3654,6 +3702,7 @@ var DesignConstraintAdapter = class {
|
|
|
3654
3702
|
constructor(store) {
|
|
3655
3703
|
this.store = store;
|
|
3656
3704
|
}
|
|
3705
|
+
store;
|
|
3657
3706
|
checkForHardcodedColors(source, file, strictness) {
|
|
3658
3707
|
const severity = this.mapSeverity(strictness);
|
|
3659
3708
|
const tokenNodes = this.store.findNodes({ type: "design_token" });
|
|
@@ -3735,6 +3784,7 @@ var GraphFeedbackAdapter = class {
|
|
|
3735
3784
|
constructor(store) {
|
|
3736
3785
|
this.store = store;
|
|
3737
3786
|
}
|
|
3787
|
+
store;
|
|
3738
3788
|
computeImpactData(changedFiles) {
|
|
3739
3789
|
const affectedTests = [];
|
|
3740
3790
|
const affectedDocs = [];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
checkDocsDefinition,
|
|
3
3
|
handleCheckDocs
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-QSRRBNLY.js";
|
|
5
|
+
import "./chunk-ZA2I7S3E.js";
|
|
6
6
|
import "./chunk-IDZNPTYD.js";
|
|
7
7
|
import "./chunk-W6Y7ZW3Y.js";
|
|
8
8
|
import "./chunk-3WGJMBKH.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-VF23UTNB.js";
|
|
10
10
|
import "./chunk-ERS5EVUZ.js";
|
|
11
11
|
export {
|
|
12
12
|
checkDocsDefinition,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
detectEntropyDefinition,
|
|
3
3
|
handleDetectEntropy
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-APNPXLB2.js";
|
|
5
5
|
import "./chunk-IDZNPTYD.js";
|
|
6
6
|
import "./chunk-W6Y7ZW3Y.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-VF23UTNB.js";
|
|
8
8
|
import "./chunk-ERS5EVUZ.js";
|
|
9
9
|
export {
|
|
10
10
|
detectEntropyDefinition,
|
package/dist/{generate-agent-definitions-SAAOAPT4.js → generate-agent-definitions-EYG263XD.js}
RENAMED
|
@@ -7,7 +7,7 @@ import "./chunk-KET4QQZB.js";
|
|
|
7
7
|
import "./chunk-CJDVBBPB.js";
|
|
8
8
|
import "./chunk-N5G5QMS3.js";
|
|
9
9
|
import "./chunk-3WGJMBKH.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-VF23UTNB.js";
|
|
11
11
|
import "./chunk-ERS5EVUZ.js";
|
|
12
12
|
export {
|
|
13
13
|
createGenerateAgentDefinitionsCommand,
|