@harness-engineering/cli 1.25.5 → 1.25.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/{agents-md-COWXFHR5.js → agents-md-QPO3H5HX.js} +3 -3
- package/dist/{architecture-EYPG4ZMC.js → architecture-IJLXRHZA.js} +4 -4
- package/dist/{assess-project-JQPEVJIA.js → assess-project-QU6XIVJK.js} +1 -1
- package/dist/bin/harness-mcp.js +16 -15
- package/dist/bin/harness.js +26 -25
- package/dist/business-knowledge-6RHYJOB3.js +7 -0
- package/dist/{check-phase-gate-AJRMDGYW.js → check-phase-gate-TNY64AOS.js} +4 -4
- package/dist/{chunk-HWLHJSJQ.js → chunk-2DF6OZLG.js} +2 -2
- package/dist/{chunk-2OIPQMU5.js → chunk-AS5DQT4S.js} +9 -9
- package/dist/{chunk-YFIALHGI.js → chunk-D3XL2FLX.js} +5 -5
- package/dist/{chunk-4NK7Z3BP.js → chunk-E5Z6NTTQ.js} +1 -1
- package/dist/{chunk-KWQTMJ3B.js → chunk-FRDS4XGD.js} +1 -1
- package/dist/{chunk-KXUCIAM4.js → chunk-G5SNXUIK.js} +1 -1
- package/dist/{chunk-2TFT7XRX.js → chunk-GVNT2YC7.js} +9 -9
- package/dist/{chunk-UI6NWJJK.js → chunk-IQO7IINR.js} +1 -1
- package/dist/{chunk-ZYYVDA5K.js → chunk-IT2KORSK.js} +1 -1
- package/dist/{chunk-2X42NMPD.js → chunk-JJQ3TW2E.js} +227 -109
- package/dist/{chunk-BOQRTARD.js → chunk-JPZY7ZQX.js} +1 -1
- package/dist/{chunk-24ZGGCIW.js → chunk-K35D7HF3.js} +1 -1
- package/dist/{chunk-KDHZAL4B.js → chunk-K533WNZG.js} +38 -2
- package/dist/{chunk-WN6YIQ66.js → chunk-KVJZQ2MV.js} +1 -1
- package/dist/{chunk-Q6ZEUMOF.js → chunk-LTCEV7VF.js} +3 -3
- package/dist/{chunk-BVRWLK5U.js → chunk-LXPRO2FH.js} +2 -2
- package/dist/{chunk-2X336Q7J.js → chunk-MCDCZMKN.js} +1 -1
- package/dist/{chunk-UB6NZNJJ.js → chunk-MLOGYWLY.js} +2 -2
- package/dist/{chunk-K2SON7TI.js → chunk-NKQEMWGT.js} +333 -121
- package/dist/{chunk-PVRKHUTA.js → chunk-PCOU2UXU.js} +8 -8
- package/dist/chunk-RC5ZY3EV.js +82 -0
- package/dist/{chunk-2OM5TA56.js → chunk-SZ3Q4XEO.js} +212 -183
- package/dist/{chunk-5R2LFUU3.js → chunk-TQRCODRJ.js} +1 -1
- package/dist/{chunk-KVK3KAFQ.js → chunk-XVJRFP7W.js} +6 -6
- package/dist/{chunk-JD4FGVHH.js → chunk-YRBNAHH4.js} +4 -4
- package/dist/{chunk-KHMKAC6E.js → chunk-ZIYLIYN4.js} +115 -103
- package/dist/{ci-workflow-35KBJC2U.js → ci-workflow-FJYRFZYQ.js} +3 -3
- package/dist/{dist-RADHOOXG.js → dist-HPWNWCT6.js} +3 -1
- package/dist/{dist-UMONICND.js → dist-ZV6GO6FA.js} +2 -2
- package/dist/{docs-T5J2AJH6.js → docs-7DW3DI4Z.js} +4 -4
- package/dist/{engine-KWHV2LUX.js → engine-P7EE2IWO.js} +3 -3
- package/dist/{entropy-GEBHWBPR.js → entropy-HCXRTDFU.js} +3 -3
- package/dist/{feedback-I4QPE3RI.js → feedback-Y4FYN3NR.js} +1 -1
- package/dist/{generate-agent-definitions-3XNR77ET.js → generate-agent-definitions-3EHPIWBO.js} +4 -4
- package/dist/{graph-loader-JHQVQRUS.js → graph-loader-KXVS3YK3.js} +1 -1
- package/dist/index.d.ts +14 -8
- package/dist/index.js +26 -25
- package/dist/{loader-MN2CZXPG.js → loader-SKHF3JVV.js} +3 -3
- package/dist/{mcp-XSU77BZY.js → mcp-MWYIPDQU.js} +16 -15
- package/dist/{performance-7I5MCEFP.js → performance-ADWH5NJY.js} +4 -4
- package/dist/{review-pipeline-PWPKJXSN.js → review-pipeline-TLKE5OQD.js} +3 -3
- package/dist/{runtime-ZYEFJSGS.js → runtime-7LYAW7GU.js} +3 -3
- package/dist/{scan-MPJ6JHUY.js → scan-BGJ7TLLV.js} +1 -1
- package/dist/{security-OVTGS7DL.js → security-5XWINYVB.js} +1 -1
- package/dist/{validate-ACIP5BUO.js → validate-BFFHYHY7.js} +4 -4
- package/dist/{validate-cross-check-OWITNCHN.js → validate-cross-check-GQX7OVCR.js} +3 -3
- package/package.json +5 -5
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
findConfigFile,
|
|
9
9
|
loadConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TQRCODRJ.js";
|
|
11
11
|
import {
|
|
12
12
|
init_dist
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZIYLIYN4.js";
|
|
14
14
|
import {
|
|
15
15
|
Ok
|
|
16
16
|
} from "./chunk-RL4VMEXL.js";
|
|
@@ -35,7 +35,7 @@ var checkPerformanceDefinition = {
|
|
|
35
35
|
};
|
|
36
36
|
async function handleCheckPerformance(input) {
|
|
37
37
|
try {
|
|
38
|
-
const { EntropyAnalyzer } = await import("./dist-
|
|
38
|
+
const { EntropyAnalyzer } = await import("./dist-ZV6GO6FA.js");
|
|
39
39
|
const typeFilter = input.type ?? "all";
|
|
40
40
|
const projectPath = sanitizePath(input.path);
|
|
41
41
|
let entryPoints;
|
|
@@ -58,10 +58,10 @@ async function handleCheckPerformance(input) {
|
|
|
58
58
|
});
|
|
59
59
|
let graphOptions;
|
|
60
60
|
try {
|
|
61
|
-
const { loadGraphStore } = await import("./graph-loader-
|
|
61
|
+
const { loadGraphStore } = await import("./graph-loader-KXVS3YK3.js");
|
|
62
62
|
const store = await loadGraphStore(projectPath);
|
|
63
63
|
if (store) {
|
|
64
|
-
const { GraphComplexityAdapter, GraphCouplingAdapter } = await import("./dist-
|
|
64
|
+
const { GraphComplexityAdapter, GraphCouplingAdapter } = await import("./dist-HPWNWCT6.js");
|
|
65
65
|
const complexityAdapter = new GraphComplexityAdapter(store);
|
|
66
66
|
const couplingAdapter = new GraphCouplingAdapter(store);
|
|
67
67
|
graphOptions = {
|
|
@@ -98,7 +98,7 @@ var getPerfBaselinesDefinition = {
|
|
|
98
98
|
};
|
|
99
99
|
async function handleGetPerfBaselines(input) {
|
|
100
100
|
try {
|
|
101
|
-
const { BaselineManager } = await import("./dist-
|
|
101
|
+
const { BaselineManager } = await import("./dist-ZV6GO6FA.js");
|
|
102
102
|
const manager = new BaselineManager(sanitizePath(input.path));
|
|
103
103
|
const baselines = manager.load();
|
|
104
104
|
return resultToMcpResponse(
|
|
@@ -146,7 +146,7 @@ var updatePerfBaselinesDefinition = {
|
|
|
146
146
|
};
|
|
147
147
|
async function handleUpdatePerfBaselines(input) {
|
|
148
148
|
try {
|
|
149
|
-
const { BaselineManager } = await import("./dist-
|
|
149
|
+
const { BaselineManager } = await import("./dist-ZV6GO6FA.js");
|
|
150
150
|
const manager = new BaselineManager(sanitizePath(input.path));
|
|
151
151
|
manager.save(input.results, input.commitHash);
|
|
152
152
|
const updated = manager.load();
|
|
@@ -176,7 +176,7 @@ var getCriticalPathsDefinition = {
|
|
|
176
176
|
};
|
|
177
177
|
async function handleGetCriticalPaths(input) {
|
|
178
178
|
try {
|
|
179
|
-
const { CriticalPathResolver } = await import("./dist-
|
|
179
|
+
const { CriticalPathResolver } = await import("./dist-ZV6GO6FA.js");
|
|
180
180
|
const resolver = new CriticalPathResolver(sanitizePath(input.path));
|
|
181
181
|
const result = await resolver.resolve();
|
|
182
182
|
return resultToMcpResponse(Ok(result));
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// src/mcp/resources/business-knowledge.ts
|
|
2
|
+
import * as fs from "fs/promises";
|
|
3
|
+
import * as path from "path";
|
|
4
|
+
async function getBusinessKnowledgeResource(projectRoot) {
|
|
5
|
+
const knowledgeDir = path.join(projectRoot, "docs", "knowledge");
|
|
6
|
+
let files;
|
|
7
|
+
try {
|
|
8
|
+
files = await findMarkdownFiles(knowledgeDir);
|
|
9
|
+
} catch {
|
|
10
|
+
return JSON.stringify({ domains: {}, totalFiles: 0, totalDomains: 0 });
|
|
11
|
+
}
|
|
12
|
+
const domains = {};
|
|
13
|
+
for (const filePath of files) {
|
|
14
|
+
try {
|
|
15
|
+
const raw = await fs.readFile(filePath, "utf-8");
|
|
16
|
+
const parsed = parseFrontmatter(raw);
|
|
17
|
+
if (!parsed) continue;
|
|
18
|
+
const { frontmatter, body } = parsed;
|
|
19
|
+
const titleMatch = body.match(/^#\s+(.+)$/m);
|
|
20
|
+
const name = titleMatch ? titleMatch[1].trim() : path.basename(filePath, ".md");
|
|
21
|
+
const relPath = path.relative(projectRoot, filePath).replaceAll("\\", "/");
|
|
22
|
+
const entry = {
|
|
23
|
+
type: frontmatter.type,
|
|
24
|
+
name,
|
|
25
|
+
domain: frontmatter.domain,
|
|
26
|
+
path: relPath,
|
|
27
|
+
...frontmatter.tags && { tags: frontmatter.tags }
|
|
28
|
+
};
|
|
29
|
+
if (!domains[frontmatter.domain]) {
|
|
30
|
+
domains[frontmatter.domain] = [];
|
|
31
|
+
}
|
|
32
|
+
domains[frontmatter.domain].push(entry);
|
|
33
|
+
} catch {
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return JSON.stringify({
|
|
37
|
+
domains,
|
|
38
|
+
totalFiles: Object.values(domains).reduce((sum, entries) => sum + entries.length, 0),
|
|
39
|
+
totalDomains: Object.keys(domains).length
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async function findMarkdownFiles(dir) {
|
|
43
|
+
const results = [];
|
|
44
|
+
const entries = await fs.readdir(dir, { withFileTypes: true });
|
|
45
|
+
for (const entry of entries) {
|
|
46
|
+
const fullPath = path.join(dir, entry.name);
|
|
47
|
+
if (entry.isDirectory()) {
|
|
48
|
+
results.push(...await findMarkdownFiles(fullPath));
|
|
49
|
+
} else if (entry.isFile() && entry.name.endsWith(".md")) {
|
|
50
|
+
results.push(fullPath);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return results;
|
|
54
|
+
}
|
|
55
|
+
function parseFrontmatter(raw) {
|
|
56
|
+
const match = raw.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
|
|
57
|
+
if (!match) return null;
|
|
58
|
+
const yamlBlock = match[1];
|
|
59
|
+
const body = match[2];
|
|
60
|
+
const fm = {};
|
|
61
|
+
for (const line of yamlBlock.split("\n")) {
|
|
62
|
+
const kvMatch = line.match(/^(\w+):\s*(.+)$/);
|
|
63
|
+
if (!kvMatch) continue;
|
|
64
|
+
const key = kvMatch[1];
|
|
65
|
+
const value = kvMatch[2].trim();
|
|
66
|
+
if (value.startsWith("[") && value.endsWith("]")) {
|
|
67
|
+
fm[key] = value.slice(1, -1).split(",").map((s) => s.trim());
|
|
68
|
+
} else {
|
|
69
|
+
fm[key] = value;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (!fm.type || typeof fm.type !== "string") return null;
|
|
73
|
+
if (!fm.domain || typeof fm.domain !== "string") return null;
|
|
74
|
+
return {
|
|
75
|
+
frontmatter: fm,
|
|
76
|
+
body
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
getBusinessKnowledgeResource
|
|
82
|
+
};
|