@harness-engineering/cli 1.21.0 → 1.22.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.
Files changed (107) hide show
  1. package/dist/agents/skills/claude-code/cleanup-dead-code/skill.yaml +3 -0
  2. package/dist/agents/skills/claude-code/detect-doc-drift/skill.yaml +5 -0
  3. package/dist/agents/skills/claude-code/enforce-architecture/skill.yaml +13 -0
  4. package/dist/agents/skills/claude-code/harness-code-review/skill.yaml +5 -0
  5. package/dist/agents/skills/claude-code/harness-codebase-cleanup/skill.yaml +5 -0
  6. package/dist/agents/skills/claude-code/harness-debugging/skill.yaml +5 -0
  7. package/dist/agents/skills/claude-code/harness-dependency-health/skill.yaml +9 -0
  8. package/dist/agents/skills/claude-code/harness-hotspot-detector/skill.yaml +9 -0
  9. package/dist/agents/skills/claude-code/harness-integrity/skill.yaml +5 -0
  10. package/dist/agents/skills/claude-code/harness-perf/skill.yaml +3 -0
  11. package/dist/agents/skills/claude-code/harness-refactoring/skill.yaml +9 -0
  12. package/dist/agents/skills/claude-code/harness-security-scan/skill.yaml +3 -0
  13. package/dist/agents/skills/claude-code/harness-soundness-review/skill.yaml +5 -0
  14. package/dist/agents/skills/claude-code/harness-supply-chain-audit/skill.yaml +3 -0
  15. package/dist/agents/skills/claude-code/harness-tdd/skill.yaml +3 -0
  16. package/dist/agents/skills/codex/cleanup-dead-code/skill.yaml +3 -0
  17. package/dist/agents/skills/codex/detect-doc-drift/skill.yaml +5 -0
  18. package/dist/agents/skills/codex/enforce-architecture/skill.yaml +13 -0
  19. package/dist/agents/skills/codex/harness-code-review/skill.yaml +5 -0
  20. package/dist/agents/skills/codex/harness-codebase-cleanup/skill.yaml +5 -0
  21. package/dist/agents/skills/codex/harness-debugging/skill.yaml +5 -0
  22. package/dist/agents/skills/codex/harness-dependency-health/skill.yaml +9 -0
  23. package/dist/agents/skills/codex/harness-hotspot-detector/skill.yaml +9 -0
  24. package/dist/agents/skills/codex/harness-integrity/skill.yaml +5 -0
  25. package/dist/agents/skills/codex/harness-perf/skill.yaml +3 -0
  26. package/dist/agents/skills/codex/harness-refactoring/skill.yaml +9 -0
  27. package/dist/agents/skills/codex/harness-security-scan/skill.yaml +3 -0
  28. package/dist/agents/skills/codex/harness-soundness-review/skill.yaml +5 -0
  29. package/dist/agents/skills/codex/harness-supply-chain-audit/skill.yaml +3 -0
  30. package/dist/agents/skills/codex/harness-tdd/skill.yaml +3 -0
  31. package/dist/agents/skills/cursor/cleanup-dead-code/skill.yaml +3 -0
  32. package/dist/agents/skills/cursor/detect-doc-drift/skill.yaml +5 -0
  33. package/dist/agents/skills/cursor/enforce-architecture/skill.yaml +13 -0
  34. package/dist/agents/skills/cursor/harness-code-review/skill.yaml +5 -0
  35. package/dist/agents/skills/cursor/harness-codebase-cleanup/skill.yaml +5 -0
  36. package/dist/agents/skills/cursor/harness-debugging/skill.yaml +5 -0
  37. package/dist/agents/skills/cursor/harness-dependency-health/skill.yaml +9 -0
  38. package/dist/agents/skills/cursor/harness-hotspot-detector/skill.yaml +9 -0
  39. package/dist/agents/skills/cursor/harness-integrity/skill.yaml +5 -0
  40. package/dist/agents/skills/cursor/harness-perf/skill.yaml +3 -0
  41. package/dist/agents/skills/cursor/harness-refactoring/skill.yaml +9 -0
  42. package/dist/agents/skills/cursor/harness-security-scan/skill.yaml +3 -0
  43. package/dist/agents/skills/cursor/harness-soundness-review/skill.yaml +5 -0
  44. package/dist/agents/skills/cursor/harness-supply-chain-audit/skill.yaml +3 -0
  45. package/dist/agents/skills/cursor/harness-tdd/skill.yaml +3 -0
  46. package/dist/agents/skills/gemini-cli/cleanup-dead-code/skill.yaml +3 -0
  47. package/dist/agents/skills/gemini-cli/detect-doc-drift/skill.yaml +5 -0
  48. package/dist/agents/skills/gemini-cli/enforce-architecture/skill.yaml +13 -0
  49. package/dist/agents/skills/gemini-cli/harness-code-review/skill.yaml +5 -0
  50. package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/skill.yaml +5 -0
  51. package/dist/agents/skills/gemini-cli/harness-debugging/skill.yaml +5 -0
  52. package/dist/agents/skills/gemini-cli/harness-dependency-health/skill.yaml +9 -0
  53. package/dist/agents/skills/gemini-cli/harness-hotspot-detector/skill.yaml +9 -0
  54. package/dist/agents/skills/gemini-cli/harness-integrity/skill.yaml +5 -0
  55. package/dist/agents/skills/gemini-cli/harness-perf/skill.yaml +3 -0
  56. package/dist/agents/skills/gemini-cli/harness-refactoring/skill.yaml +9 -0
  57. package/dist/agents/skills/gemini-cli/harness-security-scan/skill.yaml +3 -0
  58. package/dist/agents/skills/gemini-cli/harness-soundness-review/skill.yaml +5 -0
  59. package/dist/agents/skills/gemini-cli/harness-supply-chain-audit/skill.yaml +3 -0
  60. package/dist/agents/skills/gemini-cli/harness-tdd/skill.yaml +3 -0
  61. package/dist/{agents-md-TDTLYAQU.js → agents-md-PM7LO74M.js} +2 -1
  62. package/dist/{architecture-NANP4XPE.js → architecture-OVOCDTI6.js} +3 -2
  63. package/dist/assess-project-R2OZIDDS.js +9 -0
  64. package/dist/bin/harness-mcp.js +15 -13
  65. package/dist/bin/harness.js +21 -19
  66. package/dist/{check-phase-gate-I4NQOCSU.js → check-phase-gate-7JQ6EW5R.js} +4 -3
  67. package/dist/{chunk-M6TIO6NF.js → chunk-2PAPHA77.js} +1 -1
  68. package/dist/chunk-5FBWWMY2.js +293 -0
  69. package/dist/{chunk-YF5ROTWR.js → chunk-5QTWFO24.js} +8 -8
  70. package/dist/{chunk-CZZXE6BL.js → chunk-ASS5TD2Y.js} +1 -1
  71. package/dist/{chunk-L6LTNZQZ.js → chunk-B4WHXHF7.js} +1 -1
  72. package/dist/{chunk-TMSGI27F.js → chunk-DJEBBENF.js} +967 -385
  73. package/dist/{chunk-H6LXAH66.js → chunk-DXYOAQQC.js} +1 -1
  74. package/dist/{chunk-UVJFBKCX.js → chunk-FSLFBLYW.js} +7 -7
  75. package/dist/{chunk-SZ5TGZMI.js → chunk-GRJ7A4WT.js} +17 -2
  76. package/dist/{chunk-WXI5ONCU.js → chunk-IK5GSLW6.js} +4 -4
  77. package/dist/{chunk-SPUK5W4W.js → chunk-J7W4LTRK.js} +2 -2
  78. package/dist/{chunk-7G2ZUTZA.js → chunk-PUOMFNRO.js} +26 -3
  79. package/dist/{chunk-HKUX2X7O.js → chunk-SE4YPMLH.js} +9 -1
  80. package/dist/{chunk-UEKQ5G3V.js → chunk-SOTTK27D.js} +459 -37
  81. package/dist/{chunk-LRG3B43J.js → chunk-T5QWCVGK.js} +1 -1
  82. package/dist/{dist-U7EAO6T2.js → chunk-TEZI27SA.js} +401 -60
  83. package/dist/{chunk-YZYBQZVL.js → chunk-U44JNY3Y.js} +1539 -587
  84. package/dist/{chunk-HUDEBSR2.js → chunk-W6MPLFXU.js} +3 -3
  85. package/dist/{chunk-6GEYPBDU.js → chunk-ZEIEUCZL.js} +9 -9
  86. package/dist/{ci-workflow-Z4IUJBZL.js → ci-workflow-OTTEERPF.js} +2 -1
  87. package/dist/{create-skill-NDXQSTIK.js → create-skill-U3XCFRZN.js} +2 -2
  88. package/dist/dist-IA6XYKNO.js +92 -0
  89. package/dist/{dist-KV2ICL5X.js → dist-LCR2IO7U.js} +56 -3
  90. package/dist/{docs-2PCZVSGB.js → docs-CHAYSGOP.js} +4 -3
  91. package/dist/{engine-EOXMI5MD.js → engine-4MY2U5RZ.js} +2 -1
  92. package/dist/{entropy-VGXXBIGX.js → entropy-AKSZG7G5.js} +3 -2
  93. package/dist/{feedback-VTSPL3O7.js → feedback-QGCSW7SB.js} +1 -1
  94. package/dist/{generate-agent-definitions-QICSCGXB.js → generate-agent-definitions-KU6X2UQN.js} +2 -1
  95. package/dist/{graph-loader-KMHDQYDT.js → graph-loader-FJN4H7Y4.js} +1 -1
  96. package/dist/index.d.ts +58 -2
  97. package/dist/index.js +27 -23
  98. package/dist/{loader-7S4FYAPP.js → loader-AV5XEMER.js} +2 -1
  99. package/dist/{mcp-DF25USTE.js → mcp-LWHVQRG7.js} +15 -13
  100. package/dist/{performance-RV4DUMFI.js → performance-ETZVXXGQ.js} +4 -3
  101. package/dist/{review-pipeline-7KQJB4SI.js → review-pipeline-3ZS3GJSP.js} +1 -1
  102. package/dist/{runtime-XKOHGGRC.js → runtime-KQTJRK3H.js} +2 -1
  103. package/dist/{security-NLWTMK3G.js → security-LJCLZES6.js} +1 -1
  104. package/dist/{skill-executor-XEVDGXUM.js → skill-executor-2BZQLHYN.js} +2 -2
  105. package/dist/{validate-VHFE6J6O.js → validate-4IA5RPEX.js} +3 -2
  106. package/dist/{validate-cross-check-PFRKABCS.js → validate-cross-check-VX2BAHQI.js} +2 -1
  107. package/package.json +4 -4
@@ -1,12 +1,13 @@
1
1
  import {
2
2
  checkDependenciesDefinition,
3
3
  handleCheckDependencies
4
- } from "./chunk-HUDEBSR2.js";
4
+ } from "./chunk-W6MPLFXU.js";
5
5
  import "./chunk-H7Y5CKTM.js";
6
6
  import "./chunk-IDZNPTYD.js";
7
7
  import "./chunk-W6Y7ZW3Y.js";
8
- import "./chunk-YZYBQZVL.js";
8
+ import "./chunk-U44JNY3Y.js";
9
9
  import "./chunk-ERS5EVUZ.js";
10
+ import "./chunk-TEZI27SA.js";
10
11
  export {
11
12
  checkDependenciesDefinition,
12
13
  handleCheckDependencies
@@ -0,0 +1,9 @@
1
+ import {
2
+ assessProjectDefinition,
3
+ handleAssessProject
4
+ } from "./chunk-5FBWWMY2.js";
5
+ import "./chunk-W6Y7ZW3Y.js";
6
+ export {
7
+ assessProjectDefinition,
8
+ handleAssessProject
9
+ };
@@ -1,26 +1,28 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  startServer
4
- } from "../chunk-TMSGI27F.js";
5
- import "../chunk-WXI5ONCU.js";
6
- import "../chunk-UVJFBKCX.js";
7
- import "../chunk-6GEYPBDU.js";
8
- import "../chunk-H6LXAH66.js";
9
- import "../chunk-L6LTNZQZ.js";
4
+ } from "../chunk-DJEBBENF.js";
5
+ import "../chunk-IK5GSLW6.js";
6
+ import "../chunk-FSLFBLYW.js";
7
+ import "../chunk-ZEIEUCZL.js";
8
+ import "../chunk-DXYOAQQC.js";
9
+ import "../chunk-B4WHXHF7.js";
10
+ import "../chunk-5FBWWMY2.js";
10
11
  import "../chunk-CJDVBBPB.js";
11
- import "../chunk-SPUK5W4W.js";
12
- import "../chunk-CZZXE6BL.js";
13
- import "../chunk-HUDEBSR2.js";
12
+ import "../chunk-J7W4LTRK.js";
13
+ import "../chunk-ASS5TD2Y.js";
14
+ import "../chunk-W6MPLFXU.js";
14
15
  import "../chunk-H7Y5CKTM.js";
15
- import "../chunk-YF5ROTWR.js";
16
- import "../chunk-SZ5TGZMI.js";
16
+ import "../chunk-5QTWFO24.js";
17
+ import "../chunk-GRJ7A4WT.js";
17
18
  import "../chunk-IDZNPTYD.js";
18
19
  import "../chunk-W6Y7ZW3Y.js";
19
20
  import "../chunk-N5G5QMS3.js";
20
21
  import "../chunk-3WGJMBKH.js";
21
- import "../chunk-HKUX2X7O.js";
22
- import "../chunk-YZYBQZVL.js";
22
+ import "../chunk-SE4YPMLH.js";
23
+ import "../chunk-U44JNY3Y.js";
23
24
  import "../chunk-ERS5EVUZ.js";
25
+ import "../chunk-TEZI27SA.js";
24
26
 
25
27
  // src/bin/harness-mcp.ts
26
28
  import "dotenv/config";
@@ -2,56 +2,58 @@
2
2
  import {
3
3
  createProgram,
4
4
  printFirstRunWelcome
5
- } from "../chunk-UEKQ5G3V.js";
5
+ } from "../chunk-SOTTK27D.js";
6
+ import "../chunk-OD3S2NHN.js";
6
7
  import "../chunk-SD3SQOZ2.js";
7
- import "../chunk-7G2ZUTZA.js";
8
+ import "../chunk-PUOMFNRO.js";
8
9
  import "../chunk-6KWBH4EO.js";
10
+ import "../chunk-YLN34N65.js";
9
11
  import "../chunk-YQ6KC6TE.js";
10
12
  import "../chunk-TRAPF4IX.js";
11
- import "../chunk-M6TIO6NF.js";
13
+ import "../chunk-2PAPHA77.js";
12
14
  import "../chunk-TEFCFC4H.js";
13
- import "../chunk-LRG3B43J.js";
15
+ import "../chunk-T5QWCVGK.js";
14
16
  import "../chunk-EBJQ6N4M.js";
15
17
  import "../chunk-DBSOCI3G.js";
16
18
  import "../chunk-FIAPHX37.js";
17
19
  import "../chunk-KET4QQZB.js";
18
- import "../chunk-OD3S2NHN.js";
19
- import "../chunk-TMSGI27F.js";
20
- import "../chunk-WXI5ONCU.js";
21
- import "../chunk-UVJFBKCX.js";
22
- import "../chunk-6GEYPBDU.js";
23
- import "../chunk-H6LXAH66.js";
24
- import "../chunk-L6LTNZQZ.js";
20
+ import "../chunk-DJEBBENF.js";
21
+ import "../chunk-IK5GSLW6.js";
22
+ import "../chunk-FSLFBLYW.js";
23
+ import "../chunk-ZEIEUCZL.js";
24
+ import "../chunk-DXYOAQQC.js";
25
+ import "../chunk-B4WHXHF7.js";
26
+ import "../chunk-5FBWWMY2.js";
25
27
  import "../chunk-CJDVBBPB.js";
26
- import "../chunk-SPUK5W4W.js";
27
- import "../chunk-CZZXE6BL.js";
28
- import "../chunk-HUDEBSR2.js";
28
+ import "../chunk-J7W4LTRK.js";
29
+ import "../chunk-ASS5TD2Y.js";
30
+ import "../chunk-W6MPLFXU.js";
29
31
  import "../chunk-H7Y5CKTM.js";
30
- import "../chunk-YF5ROTWR.js";
32
+ import "../chunk-5QTWFO24.js";
31
33
  import {
32
34
  findConfigFile,
33
35
  loadConfig
34
- } from "../chunk-SZ5TGZMI.js";
36
+ } from "../chunk-GRJ7A4WT.js";
35
37
  import "../chunk-IDZNPTYD.js";
36
38
  import "../chunk-W6Y7ZW3Y.js";
37
39
  import "../chunk-N5G5QMS3.js";
38
40
  import {
39
41
  handleError
40
42
  } from "../chunk-3WGJMBKH.js";
41
- import "../chunk-HKUX2X7O.js";
43
+ import "../chunk-SE4YPMLH.js";
42
44
  import {
43
45
  CLI_VERSION
44
46
  } from "../chunk-BM3PWGXQ.js";
45
47
  import "../chunk-GZKSBLQL.js";
46
- import "../chunk-YLN34N65.js";
47
48
  import {
48
49
  getUpdateNotification,
49
50
  isUpdateCheckEnabled,
50
51
  readCheckState,
51
52
  shouldRunCheck,
52
53
  spawnBackgroundCheck
53
- } from "../chunk-YZYBQZVL.js";
54
+ } from "../chunk-U44JNY3Y.js";
54
55
  import "../chunk-ERS5EVUZ.js";
56
+ import "../chunk-TEZI27SA.js";
55
57
 
56
58
  // src/bin/harness.ts
57
59
  import "dotenv/config";
@@ -1,12 +1,13 @@
1
1
  import {
2
2
  createCheckPhaseGateCommand,
3
3
  runCheckPhaseGate
4
- } from "./chunk-7G2ZUTZA.js";
4
+ } from "./chunk-PUOMFNRO.js";
5
5
  import "./chunk-EBJQ6N4M.js";
6
- import "./chunk-SZ5TGZMI.js";
6
+ import "./chunk-GRJ7A4WT.js";
7
7
  import "./chunk-3WGJMBKH.js";
8
- import "./chunk-YZYBQZVL.js";
8
+ import "./chunk-U44JNY3Y.js";
9
9
  import "./chunk-ERS5EVUZ.js";
10
+ import "./chunk-TEZI27SA.js";
10
11
  export {
11
12
  createCheckPhaseGateCommand,
12
13
  runCheckPhaseGate
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-N5G5QMS3.js";
4
4
  import {
5
5
  SkillMetadataSchema
6
- } from "./chunk-HKUX2X7O.js";
6
+ } from "./chunk-SE4YPMLH.js";
7
7
 
8
8
  // src/persona/skill-executor.ts
9
9
  import * as fs from "fs";
@@ -0,0 +1,293 @@
1
+ import {
2
+ sanitizePath
3
+ } from "./chunk-W6Y7ZW3Y.js";
4
+
5
+ // src/mcp/tools/assess-project.ts
6
+ var assessProjectDefinition = {
7
+ name: "assess_project",
8
+ description: "Run all project health checks in parallel and return a unified report. Checks: validate, dependencies, docs, entropy, security, performance, lint.",
9
+ inputSchema: {
10
+ type: "object",
11
+ properties: {
12
+ path: { type: "string", description: "Path to project root" },
13
+ checks: {
14
+ type: "array",
15
+ items: {
16
+ type: "string",
17
+ enum: ["validate", "deps", "docs", "entropy", "security", "perf", "lint"]
18
+ },
19
+ description: "Which checks to run (default: all)"
20
+ },
21
+ mode: {
22
+ type: "string",
23
+ enum: ["summary", "detailed"],
24
+ description: "Response density. Default: summary"
25
+ }
26
+ },
27
+ required: ["path"]
28
+ }
29
+ };
30
+ async function handleAssessProject(input) {
31
+ const start = Date.now();
32
+ let projectPath;
33
+ try {
34
+ projectPath = sanitizePath(input.path);
35
+ } catch (error) {
36
+ return {
37
+ content: [
38
+ {
39
+ type: "text",
40
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`
41
+ }
42
+ ],
43
+ isError: true
44
+ };
45
+ }
46
+ const checksToRun = new Set(
47
+ input.checks ?? ["validate", "deps", "docs", "entropy", "security", "perf", "lint"]
48
+ );
49
+ const mode = input.mode ?? "summary";
50
+ let validateResult = null;
51
+ if (checksToRun.has("validate")) {
52
+ try {
53
+ const { handleValidateProject } = await import("./validate-4IA5RPEX.js");
54
+ const result = await handleValidateProject({ path: projectPath });
55
+ const first = result.content[0];
56
+ const parsed = first ? JSON.parse(first.text) : {};
57
+ validateResult = {
58
+ name: "validate",
59
+ passed: parsed.valid === true,
60
+ issueCount: parsed.errors?.length ?? 0,
61
+ ...parsed.errors?.length > 0 ? { topIssue: parsed.errors[0] } : {},
62
+ ...mode === "detailed" ? { detailed: parsed } : {}
63
+ };
64
+ } catch (error) {
65
+ validateResult = {
66
+ name: "validate",
67
+ passed: false,
68
+ issueCount: 1,
69
+ topIssue: error instanceof Error ? error.message : String(error)
70
+ };
71
+ }
72
+ }
73
+ const parallelChecks = [];
74
+ if (checksToRun.has("deps")) {
75
+ parallelChecks.push(
76
+ (async () => {
77
+ try {
78
+ const { handleCheckDependencies } = await import("./architecture-OVOCDTI6.js");
79
+ const result = await handleCheckDependencies({ path: projectPath });
80
+ const first = result.content[0];
81
+ const parsed = first ? JSON.parse(first.text) : {};
82
+ const violations = parsed.violations ?? [];
83
+ return {
84
+ name: "deps",
85
+ passed: !result.isError && violations.length === 0,
86
+ issueCount: violations.length,
87
+ ...violations.length > 0 ? { topIssue: violations[0]?.message ?? String(violations[0]) } : {},
88
+ ...mode === "detailed" ? { detailed: parsed } : {}
89
+ };
90
+ } catch (error) {
91
+ return {
92
+ name: "deps",
93
+ passed: false,
94
+ issueCount: 1,
95
+ topIssue: error instanceof Error ? error.message : String(error)
96
+ };
97
+ }
98
+ })()
99
+ );
100
+ }
101
+ if (checksToRun.has("docs")) {
102
+ parallelChecks.push(
103
+ (async () => {
104
+ try {
105
+ const { handleCheckDocs } = await import("./docs-CHAYSGOP.js");
106
+ const result = await handleCheckDocs({ path: projectPath, scope: "coverage" });
107
+ const first = result.content[0];
108
+ const parsed = first ? JSON.parse(first.text) : {};
109
+ const undocumented = parsed.undocumented ?? parsed.files?.undocumented ?? [];
110
+ return {
111
+ name: "docs",
112
+ passed: !result.isError,
113
+ issueCount: Array.isArray(undocumented) ? undocumented.length : 0,
114
+ ...Array.isArray(undocumented) && undocumented.length > 0 ? { topIssue: `Undocumented: ${undocumented[0]}` } : {},
115
+ ...mode === "detailed" ? { detailed: parsed } : {}
116
+ };
117
+ } catch (error) {
118
+ return {
119
+ name: "docs",
120
+ passed: false,
121
+ issueCount: 1,
122
+ topIssue: error instanceof Error ? error.message : String(error)
123
+ };
124
+ }
125
+ })()
126
+ );
127
+ }
128
+ if (checksToRun.has("entropy")) {
129
+ parallelChecks.push(
130
+ (async () => {
131
+ try {
132
+ const { handleDetectEntropy } = await import("./entropy-AKSZG7G5.js");
133
+ const result = await handleDetectEntropy({ path: projectPath, type: "all" });
134
+ const first = result.content[0];
135
+ const parsed = first ? JSON.parse(first.text) : {};
136
+ const issues = (parsed.drift?.staleReferences?.length ?? 0) + (parsed.drift?.missingTargets?.length ?? 0) + (parsed.deadCode?.unusedImports?.length ?? 0) + (parsed.deadCode?.unusedExports?.length ?? 0) + (parsed.patterns?.violations?.length ?? 0);
137
+ return {
138
+ name: "entropy",
139
+ passed: !("isError" in result && result.isError) && issues === 0,
140
+ issueCount: issues,
141
+ ...issues > 0 ? { topIssue: "Entropy detected -- run detect_entropy for details" } : {},
142
+ ...mode === "detailed" ? { detailed: parsed } : {}
143
+ };
144
+ } catch (error) {
145
+ return {
146
+ name: "entropy",
147
+ passed: false,
148
+ issueCount: 1,
149
+ topIssue: error instanceof Error ? error.message : String(error)
150
+ };
151
+ }
152
+ })()
153
+ );
154
+ }
155
+ if (checksToRun.has("security")) {
156
+ parallelChecks.push(
157
+ (async () => {
158
+ try {
159
+ const { handleRunSecurityScan } = await import("./security-LJCLZES6.js");
160
+ const result = await handleRunSecurityScan({ path: projectPath });
161
+ const first = result.content[0];
162
+ const parsed = first ? JSON.parse(first.text) : {};
163
+ const findings = parsed.findings ?? [];
164
+ const errorCount = findings.filter(
165
+ (f) => f.severity === "error"
166
+ ).length;
167
+ return {
168
+ name: "security",
169
+ passed: !result.isError && errorCount === 0,
170
+ issueCount: findings.length,
171
+ ...findings.length > 0 ? {
172
+ topIssue: `${findings[0]?.rule ?? findings[0]?.type ?? "finding"}: ${findings[0]?.message ?? ""}`
173
+ } : {},
174
+ ...mode === "detailed" ? { detailed: parsed } : {}
175
+ };
176
+ } catch (error) {
177
+ return {
178
+ name: "security",
179
+ passed: false,
180
+ issueCount: 1,
181
+ topIssue: error instanceof Error ? error.message : String(error)
182
+ };
183
+ }
184
+ })()
185
+ );
186
+ }
187
+ if (checksToRun.has("perf")) {
188
+ parallelChecks.push(
189
+ (async () => {
190
+ try {
191
+ const { handleCheckPerformance } = await import("./performance-ETZVXXGQ.js");
192
+ const result = await handleCheckPerformance({ path: projectPath });
193
+ if ("isError" in result && result.isError) {
194
+ const msg = result.content[0]?.text ?? "Performance check failed";
195
+ return { name: "perf", passed: false, issueCount: 1, topIssue: msg };
196
+ }
197
+ const first = result.content[0];
198
+ let parsed = {};
199
+ try {
200
+ parsed = first ? JSON.parse(first.text) : {};
201
+ } catch {
202
+ return {
203
+ name: "perf",
204
+ passed: false,
205
+ issueCount: 1,
206
+ topIssue: first?.text ?? "Invalid perf output"
207
+ };
208
+ }
209
+ const issues = parsed.violations?.length ?? parsed.issues?.length ?? 0;
210
+ return {
211
+ name: "perf",
212
+ passed: issues === 0,
213
+ issueCount: issues,
214
+ ...issues > 0 ? { topIssue: "Performance issues detected" } : {},
215
+ ...mode === "detailed" ? { detailed: parsed } : {}
216
+ };
217
+ } catch (error) {
218
+ return {
219
+ name: "perf",
220
+ passed: false,
221
+ issueCount: 1,
222
+ topIssue: error instanceof Error ? error.message : String(error)
223
+ };
224
+ }
225
+ })()
226
+ );
227
+ }
228
+ if (checksToRun.has("lint")) {
229
+ parallelChecks.push(
230
+ (async () => {
231
+ try {
232
+ const { execFileSync } = await import("child_process");
233
+ const output = execFileSync("npx", ["turbo", "run", "lint", "--force"], {
234
+ cwd: projectPath,
235
+ encoding: "utf-8",
236
+ timeout: 6e4,
237
+ stdio: ["pipe", "pipe", "pipe"]
238
+ });
239
+ return {
240
+ name: "lint",
241
+ passed: true,
242
+ issueCount: 0,
243
+ ...mode === "detailed" ? { detailed: output } : {}
244
+ };
245
+ } catch (error) {
246
+ const stderr = error && typeof error === "object" && "stderr" in error ? String(error.stderr) : "";
247
+ const stdout = error && typeof error === "object" && "stdout" in error ? String(error.stdout) : "";
248
+ const combined = (stderr + "\n" + stdout).trim();
249
+ const errorMatch = combined.match(/(\d+) error/);
250
+ const issueCount = errorMatch?.[1] ? parseInt(errorMatch[1], 10) : 1;
251
+ const firstError = combined.split("\n").find((line) => line.includes("error"));
252
+ return {
253
+ name: "lint",
254
+ passed: false,
255
+ issueCount,
256
+ topIssue: firstError?.trim() ?? (error instanceof Error ? error.message : String(error)),
257
+ ...mode === "detailed" ? { detailed: combined } : {}
258
+ };
259
+ }
260
+ })()
261
+ );
262
+ }
263
+ const parallelResults = await Promise.all(parallelChecks);
264
+ const allChecks = [];
265
+ if (validateResult) allChecks.push(validateResult);
266
+ allChecks.push(...parallelResults);
267
+ const healthy = allChecks.every((c) => c.passed);
268
+ const assessedIn = Date.now() - start;
269
+ if (mode === "summary") {
270
+ const summaryChecks = allChecks.map(({ detailed: _d, ...rest }) => rest);
271
+ return {
272
+ content: [
273
+ {
274
+ type: "text",
275
+ text: JSON.stringify({ healthy, checks: summaryChecks, assessedIn })
276
+ }
277
+ ]
278
+ };
279
+ }
280
+ return {
281
+ content: [
282
+ {
283
+ type: "text",
284
+ text: JSON.stringify({ healthy, checks: allChecks, assessedIn })
285
+ }
286
+ ]
287
+ };
288
+ }
289
+
290
+ export {
291
+ assessProjectDefinition,
292
+ handleAssessProject
293
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  findConfigFile,
3
3
  loadConfig
4
- } from "./chunk-SZ5TGZMI.js";
4
+ } from "./chunk-GRJ7A4WT.js";
5
5
  import {
6
6
  resultToMcpResponse
7
7
  } from "./chunk-IDZNPTYD.js";
@@ -46,18 +46,18 @@ async function handleCheckDocs(input) {
46
46
  const projectPath = sanitizePath(input.path);
47
47
  const scope = input.scope ?? "coverage";
48
48
  if (scope === "integrity") {
49
- const { validateKnowledgeMap } = await import("./dist-KV2ICL5X.js");
49
+ const { validateKnowledgeMap } = await import("./dist-LCR2IO7U.js");
50
50
  const result2 = await validateKnowledgeMap(projectPath);
51
51
  return resultToMcpResponse(result2);
52
52
  }
53
53
  if (scope === "all") {
54
- const { checkDocCoverage: checkDocCoverage2, validateKnowledgeMap } = await import("./dist-KV2ICL5X.js");
54
+ const { checkDocCoverage: checkDocCoverage2, validateKnowledgeMap } = await import("./dist-LCR2IO7U.js");
55
55
  const domain2 = input.domain ?? "src";
56
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-KMHDQYDT.js");
56
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-FJN4H7Y4.js");
57
57
  const store2 = await loadGraphStore2(projectPath);
58
58
  let graphCoverage2;
59
59
  if (store2) {
60
- const { Assembler } = await import("./dist-U7EAO6T2.js");
60
+ const { Assembler } = await import("./dist-IA6XYKNO.js");
61
61
  const assembler = new Assembler(store2);
62
62
  const report = assembler.checkCoverage();
63
63
  graphCoverage2 = {
@@ -90,13 +90,13 @@ async function handleCheckDocs(input) {
90
90
  }
91
91
  return resultToMcpResponse(Ok({ coverage, integrity }));
92
92
  }
93
- const { checkDocCoverage } = await import("./dist-KV2ICL5X.js");
93
+ const { checkDocCoverage } = await import("./dist-LCR2IO7U.js");
94
94
  const domain = input.domain ?? "src";
95
- const { loadGraphStore } = await import("./graph-loader-KMHDQYDT.js");
95
+ const { loadGraphStore } = await import("./graph-loader-FJN4H7Y4.js");
96
96
  const store = await loadGraphStore(projectPath);
97
97
  let graphCoverage;
98
98
  if (store) {
99
- const { Assembler } = await import("./dist-U7EAO6T2.js");
99
+ const { Assembler } = await import("./dist-IA6XYKNO.js");
100
100
  const assembler = new Assembler(store);
101
101
  const report = assembler.checkCoverage();
102
102
  graphCoverage = {
@@ -15,7 +15,7 @@ function evictIfNeeded() {
15
15
  }
16
16
  }
17
17
  async function doLoadGraphStore(projectRoot) {
18
- const { GraphStore } = await import("./dist-U7EAO6T2.js");
18
+ const { GraphStore } = await import("./dist-IA6XYKNO.js");
19
19
  const graphDir = path.join(projectRoot, ".harness", "graph");
20
20
  const store = new GraphStore();
21
21
  const loaded = await store.load(graphDir);
@@ -45,7 +45,7 @@ var runCodeReviewDefinition = {
45
45
  };
46
46
  async function handleRunCodeReview(input) {
47
47
  try {
48
- const { parseDiff, runReviewPipeline } = await import("./dist-KV2ICL5X.js");
48
+ const { parseDiff, runReviewPipeline } = await import("./dist-LCR2IO7U.js");
49
49
  const parseResult = parseDiff(input.diff);
50
50
  if (!parseResult.ok) {
51
51
  return {