@harness-engineering/cli 4.0.1 → 4.2.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-autopilot/SKILL.md +40 -8
- package/dist/agents/skills/claude-code/harness-catalog-retrospective/SKILL.md +124 -0
- package/dist/agents/skills/claude-code/harness-catalog-retrospective/skill.yaml +48 -0
- package/dist/agents/skills/claude-code/harness-execution/SKILL.md +13 -0
- package/dist/agents/skills/claude-code/harness-parallel-agents/SKILL.md +3 -0
- package/dist/agents/skills/claude-code/harness-planning/SKILL.md +3 -1
- package/dist/agents/skills/claude-code/pre-merge-brief/SKILL.md +86 -0
- package/dist/agents/skills/claude-code/pre-merge-brief/skill.yaml +67 -0
- package/dist/agents/skills/codex/harness-autopilot/SKILL.md +40 -8
- package/dist/agents/skills/codex/harness-catalog-retrospective/SKILL.md +124 -0
- package/dist/agents/skills/codex/harness-catalog-retrospective/skill.yaml +48 -0
- package/dist/agents/skills/codex/harness-execution/SKILL.md +13 -0
- package/dist/agents/skills/codex/harness-parallel-agents/SKILL.md +3 -0
- package/dist/agents/skills/codex/harness-planning/SKILL.md +3 -1
- package/dist/agents/skills/codex/pre-merge-brief/SKILL.md +86 -0
- package/dist/agents/skills/codex/pre-merge-brief/skill.yaml +67 -0
- package/dist/agents/skills/cursor/harness-autopilot/SKILL.md +40 -8
- package/dist/agents/skills/cursor/harness-catalog-retrospective/SKILL.md +124 -0
- package/dist/agents/skills/cursor/harness-catalog-retrospective/skill.yaml +48 -0
- package/dist/agents/skills/cursor/harness-execution/SKILL.md +13 -0
- package/dist/agents/skills/cursor/harness-parallel-agents/SKILL.md +3 -0
- package/dist/agents/skills/cursor/harness-planning/SKILL.md +3 -1
- package/dist/agents/skills/cursor/pre-merge-brief/SKILL.md +86 -0
- package/dist/agents/skills/cursor/pre-merge-brief/skill.yaml +67 -0
- package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +40 -8
- package/dist/agents/skills/gemini-cli/harness-catalog-retrospective/SKILL.md +124 -0
- package/dist/agents/skills/gemini-cli/harness-catalog-retrospective/skill.yaml +48 -0
- package/dist/agents/skills/gemini-cli/harness-execution/SKILL.md +13 -0
- package/dist/agents/skills/gemini-cli/harness-parallel-agents/SKILL.md +3 -0
- package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +3 -1
- package/dist/agents/skills/gemini-cli/pre-merge-brief/SKILL.md +86 -0
- package/dist/agents/skills/gemini-cli/pre-merge-brief/skill.yaml +67 -0
- package/dist/{agents-md-VJLYEH2S.js → agents-md-BK2UPKUC.js} +4 -4
- package/dist/analyzer-XRCV63KC-6T2Z32XC.js +26 -0
- package/dist/{architecture-YQH2NYXY.js → architecture-7PNQZOWV.js} +5 -5
- package/dist/{assess-project-KOTAPAHD.js → assess-project-2QPCNN7N.js} +5 -3
- package/dist/bin/harness-mcp.js +15 -15
- package/dist/bin/harness.js +26 -26
- package/dist/{check-phase-gate-CHU2E3OU.js → check-phase-gate-RZUSDB3O.js} +5 -5
- package/dist/{chunk-MMLQPHZ5.js → chunk-33OU3LYX.js} +380 -15
- package/dist/{chunk-XAVMTAUT.js → chunk-6STDKKAM.js} +19 -3
- package/dist/{chunk-I3CGCZJF.js → chunk-BJDT3VGQ.js} +6 -6
- package/dist/{chunk-M7F2PPN3.js → chunk-D5YCPIK6.js} +2 -2
- package/dist/{chunk-SDMV4QHM.js → chunk-DBCC7KIW.js} +25 -7
- package/dist/{chunk-E5EW5HVJ.js → chunk-DVG6DDX6.js} +1 -1
- package/dist/{chunk-4VXFZSYF.js → chunk-DW6HE5DH.js} +2 -2
- package/dist/{chunk-7PJCK7UE.js → chunk-E5KJOUHI.js} +7 -7
- package/dist/{chunk-6SCYTIF4.js → chunk-HU7NS7JA.js} +32 -7
- package/dist/{chunk-36GQREOE.js → chunk-HUC73DZC.js} +3 -3
- package/dist/{chunk-EYMOPFSD.js → chunk-J5MFNKE7.js} +2 -2
- package/dist/{chunk-JPVOI7GP.js → chunk-J7H5I4FO.js} +2 -2
- package/dist/{chunk-RG3TNIUB.js → chunk-K5R2I37T.js} +208 -97
- package/dist/{chunk-AAUY53CC.js → chunk-KHL6WFRL.js} +2 -2
- package/dist/{chunk-OQ6KOQEV.js → chunk-KYFXXEK3.js} +3 -3
- package/dist/{chunk-5RSXUAMN.js → chunk-MHHISNS2.js} +2 -2
- package/dist/{chunk-GHBFNLV2.js → chunk-RRCS27GT.js} +1531 -1175
- package/dist/{chunk-6YFHUIGT.js → chunk-RZTLXZHJ.js} +59 -21
- package/dist/{chunk-AX5KGRM6.js → chunk-SI4O2W4H.js} +2 -2
- package/dist/{chunk-BDGTZRZ6.js → chunk-UEXQMI6K.js} +56 -44
- package/dist/{chunk-7TIJXWG3.js → chunk-V2GJE5J5.js} +3 -3
- package/dist/{chunk-T746REAE.js → chunk-VC2B275U.js} +2 -2
- package/dist/{chunk-SEA2PFVI.js → chunk-XACP5P2J.js} +2 -2
- package/dist/{chunk-UWVMJEUJ.js → chunk-YTJIRQON.js} +2 -2
- package/dist/{chunk-YANR2RL7.js → chunk-ZIJABBGZ.js} +2 -2
- package/dist/{ci-workflow-HO4WKGNG.js → ci-workflow-LGN7LHHO.js} +4 -4
- package/dist/{dist-ICW4QUEW.js → dist-FBBADRYS.js} +3 -1
- package/dist/{dist-6D2F2J57.js → dist-LE5AU7FR.js} +19 -3
- package/dist/{docs-FP47JONV.js → docs-3BTPSHKE.js} +5 -5
- package/dist/{engine-YUA6IYOG.js → engine-GWGU4AMH.js} +4 -4
- package/dist/{entropy-DBW2INZU.js → entropy-35XURODP.js} +7 -4
- package/dist/{feedback-BPHADTRQ.js → feedback-NDGZZ37W.js} +1 -1
- package/dist/{generate-agent-definitions-KPVGBGDY.js → generate-agent-definitions-PYZ3E7SP.js} +5 -5
- package/dist/hooks/sentinel-pre.js +15 -138
- package/dist/index.d.ts +61 -0
- package/dist/index.js +25 -25
- package/dist/{loader-QOJQ6NZM.js → loader-QK2OJXKB.js} +4 -4
- package/dist/{mcp-ZPX6O767.js → mcp-Z5YMV7TA.js} +15 -15
- package/dist/{performance-FXYTGJGQ.js → performance-VAYOYPVK.js} +5 -5
- package/dist/{review-pipeline-2TFQ5OAE.js → review-pipeline-UETEOWSS.js} +4 -4
- package/dist/{runtime-XK6ZCHKE.js → runtime-J7KFACTK.js} +4 -4
- package/dist/{security-4W2P5ZGI.js → security-6AIUZXF5.js} +1 -1
- package/dist/{state-events-ECQAIZLU.js → state-events-XQPHGLG5.js} +4 -4
- package/dist/{validate-64KTEGIE.js → validate-ON7YMVLY.js} +5 -5
- package/dist/{validate-cross-check-J5PVGICB.js → validate-cross-check-HKKQA7K5.js} +4 -4
- package/package.json +8 -7
- package/dist/analyzer-V633GUHY-OV335HGM.js +0 -26
|
@@ -5,30 +5,30 @@ import {
|
|
|
5
5
|
handleCreateSelfReview,
|
|
6
6
|
handleRequestPeerReview,
|
|
7
7
|
requestPeerReviewDefinition
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KYFXXEK3.js";
|
|
9
9
|
import {
|
|
10
10
|
getSecurityTrendsDefinition,
|
|
11
11
|
handleGetSecurityTrends,
|
|
12
12
|
handleRunSecurityScan,
|
|
13
13
|
runSecurityScanDefinition
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D5YCPIK6.js";
|
|
15
15
|
import {
|
|
16
16
|
handleRunCodeReview,
|
|
17
17
|
runCodeReviewDefinition,
|
|
18
18
|
sortFindingsBySeverity
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-J5MFNKE7.js";
|
|
20
20
|
import {
|
|
21
21
|
assessProjectDefinition,
|
|
22
22
|
handleAssessProject
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HU7NS7JA.js";
|
|
24
24
|
import {
|
|
25
25
|
checkDocsDefinition,
|
|
26
26
|
handleCheckDocs
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-BJDT3VGQ.js";
|
|
28
28
|
import {
|
|
29
29
|
detectEntropyDefinition,
|
|
30
30
|
handleDetectEntropy
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-DBCC7KIW.js";
|
|
32
32
|
import {
|
|
33
33
|
checkPerformanceDefinition,
|
|
34
34
|
getCriticalPathsDefinition,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
handleGetPerfBaselines,
|
|
39
39
|
handleUpdatePerfBaselines,
|
|
40
40
|
updatePerfBaselinesDefinition
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-E5KJOUHI.js";
|
|
42
42
|
import {
|
|
43
43
|
getBusinessKnowledgeResource
|
|
44
44
|
} from "./chunk-IOW3MW2K.js";
|
|
@@ -57,17 +57,17 @@ import {
|
|
|
57
57
|
import {
|
|
58
58
|
handleValidateProject,
|
|
59
59
|
validateToolDefinition
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-HUC73DZC.js";
|
|
61
61
|
import {
|
|
62
62
|
checkDependenciesDefinition,
|
|
63
63
|
handleCheckDependencies
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-J7H5I4FO.js";
|
|
65
65
|
import {
|
|
66
66
|
resultToMcpResponse
|
|
67
67
|
} from "./chunk-RC3OI5NK.js";
|
|
68
68
|
import {
|
|
69
69
|
resolveProjectConfig
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-XACP5P2J.js";
|
|
71
71
|
import {
|
|
72
72
|
sanitizePath
|
|
73
73
|
} from "./chunk-W6Y7ZW3Y.js";
|
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
findConfigFile,
|
|
94
94
|
loadConfig,
|
|
95
95
|
resolveConfig
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-6STDKKAM.js";
|
|
97
97
|
import {
|
|
98
98
|
logger
|
|
99
99
|
} from "./chunk-EBJQ6N4M.js";
|
|
@@ -129,14 +129,14 @@ import {
|
|
|
129
129
|
scanForInjection,
|
|
130
130
|
serializeEnvelope,
|
|
131
131
|
writeTaint
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-33OU3LYX.js";
|
|
133
133
|
import {
|
|
134
134
|
Err,
|
|
135
135
|
INDEXED_FILE_KINDS,
|
|
136
136
|
INSIGHTS_KEYS,
|
|
137
137
|
Ok,
|
|
138
138
|
init_dist
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-UEXQMI6K.js";
|
|
140
140
|
|
|
141
141
|
// src/mcp/server.ts
|
|
142
142
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
@@ -745,7 +745,7 @@ async function handleInsightsSummary(input) {
|
|
|
745
745
|
const skip = Array.isArray(input.skip) ? input.skip.filter(
|
|
746
746
|
(k) => typeof k === "string" && INSIGHTS_KEYS.includes(k)
|
|
747
747
|
) : void 0;
|
|
748
|
-
const { composeInsights } = await import("./dist-
|
|
748
|
+
const { composeInsights } = await import("./dist-LE5AU7FR.js");
|
|
749
749
|
const report = await composeInsights(projectPath, {
|
|
750
750
|
...skip && skip.length > 0 && { skip }
|
|
751
751
|
});
|
|
@@ -921,7 +921,7 @@ ${skippedMsg}`
|
|
|
921
921
|
async function handleInitProject(input) {
|
|
922
922
|
const i = input;
|
|
923
923
|
try {
|
|
924
|
-
const { TemplateEngine } = await import("./engine-
|
|
924
|
+
const { TemplateEngine } = await import("./engine-GWGU4AMH.js");
|
|
925
925
|
const engine = new TemplateEngine(resolveTemplatesDir());
|
|
926
926
|
const safePath = sanitizePath(i.path);
|
|
927
927
|
const detected = tryDetectFramework(engine, safePath, i);
|
|
@@ -943,7 +943,7 @@ var listPersonasDefinition = {
|
|
|
943
943
|
inputSchema: { type: "object", properties: {} }
|
|
944
944
|
};
|
|
945
945
|
async function handleListPersonas() {
|
|
946
|
-
const { listPersonas } = await import("./loader-
|
|
946
|
+
const { listPersonas } = await import("./loader-QK2OJXKB.js");
|
|
947
947
|
const result = listPersonas(resolvePersonasDir());
|
|
948
948
|
return resultToMcpResponse(result);
|
|
949
949
|
}
|
|
@@ -967,10 +967,10 @@ async function handleGeneratePersonaArtifacts(input) {
|
|
|
967
967
|
if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.name)) {
|
|
968
968
|
return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.name}`)));
|
|
969
969
|
}
|
|
970
|
-
const { loadPersona } = await import("./loader-
|
|
971
|
-
const { generateRuntime } = await import("./runtime-
|
|
972
|
-
const { generateAgentsMd } = await import("./agents-md-
|
|
973
|
-
const { generateCIWorkflow } = await import("./ci-workflow-
|
|
970
|
+
const { loadPersona } = await import("./loader-QK2OJXKB.js");
|
|
971
|
+
const { generateRuntime } = await import("./runtime-J7KFACTK.js");
|
|
972
|
+
const { generateAgentsMd } = await import("./agents-md-BK2UPKUC.js");
|
|
973
|
+
const { generateCIWorkflow } = await import("./ci-workflow-LGN7LHHO.js");
|
|
974
974
|
const personasDir = resolvePersonasDir();
|
|
975
975
|
const filePath = path4.join(personasDir, `${input.name}.yaml`);
|
|
976
976
|
if (!filePath.startsWith(personasDir)) {
|
|
@@ -1025,7 +1025,7 @@ async function handleRunPersona(input) {
|
|
|
1025
1025
|
if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.persona)) {
|
|
1026
1026
|
return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.persona}`)));
|
|
1027
1027
|
}
|
|
1028
|
-
const { loadPersona } = await import("./loader-
|
|
1028
|
+
const { loadPersona } = await import("./loader-QK2OJXKB.js");
|
|
1029
1029
|
const { runPersona } = await import("./runner-AAEF2TXY.js");
|
|
1030
1030
|
const { executeSkill } = await import("./skill-executor-BGUCAVBU.js");
|
|
1031
1031
|
const personasDir = resolvePersonasDir();
|
|
@@ -1548,7 +1548,7 @@ async function handleRunSkill(input) {
|
|
|
1548
1548
|
}
|
|
1549
1549
|
if (input.path) {
|
|
1550
1550
|
const projectPath = sanitizePath(input.path);
|
|
1551
|
-
const { readHarnessState, isEmptyHarnessState } = await import("./state-events-
|
|
1551
|
+
const { readHarnessState, isEmptyHarnessState } = await import("./state-events-XQPHGLG5.js");
|
|
1552
1552
|
const stateResult = await readHarnessState(projectPath);
|
|
1553
1553
|
if (stateResult.ok && !isEmptyHarnessState(stateResult.value)) {
|
|
1554
1554
|
const stateContent = JSON.stringify(stateResult.value, null, 2);
|
|
@@ -1747,7 +1747,7 @@ import * as path11 from "path";
|
|
|
1747
1747
|
async function autoSyncRoadmap(projectPath) {
|
|
1748
1748
|
try {
|
|
1749
1749
|
if (!roadmapSourceExists(projectPath)) return;
|
|
1750
|
-
const { syncRoadmap, applySyncChanges } = await import("./dist-
|
|
1750
|
+
const { syncRoadmap, applySyncChanges } = await import("./dist-LE5AU7FR.js");
|
|
1751
1751
|
const store = resolveRoadmapStore({ projectRoot: projectPath });
|
|
1752
1752
|
const loaded = await store.load();
|
|
1753
1753
|
if (!loaded.ok) return;
|
|
@@ -1778,7 +1778,7 @@ async function triggerExternalSync(projectPath) {
|
|
|
1778
1778
|
console.warn("[roadmap-sync] GITHUB_TOKEN not found \u2014 external sync skipped");
|
|
1779
1779
|
return;
|
|
1780
1780
|
}
|
|
1781
|
-
const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-
|
|
1781
|
+
const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-LE5AU7FR.js");
|
|
1782
1782
|
const adapter = new GitHubIssuesSyncAdapter({
|
|
1783
1783
|
token,
|
|
1784
1784
|
config: trackerConfig
|
|
@@ -1898,14 +1898,14 @@ var manageStateDefinition = {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
};
|
|
1900
1900
|
async function handleShow(projectPath, input) {
|
|
1901
|
-
const { readHarnessState } = await import("./state-events-
|
|
1901
|
+
const { readHarnessState } = await import("./state-events-XQPHGLG5.js");
|
|
1902
1902
|
return resultToMcpResponse(
|
|
1903
1903
|
await readHarnessState(projectPath, { stream: input.stream, session: input.session })
|
|
1904
1904
|
);
|
|
1905
1905
|
}
|
|
1906
1906
|
async function handleLearn(projectPath, input) {
|
|
1907
1907
|
if (!input.learning) return mcpError("Error: learning is required for learn action");
|
|
1908
|
-
const { appendLearning } = await import("./dist-
|
|
1908
|
+
const { appendLearning } = await import("./dist-LE5AU7FR.js");
|
|
1909
1909
|
const result = await appendLearning(
|
|
1910
1910
|
projectPath,
|
|
1911
1911
|
input.learning,
|
|
@@ -1920,7 +1920,7 @@ async function handleLearn(projectPath, input) {
|
|
|
1920
1920
|
async function handleFailure(projectPath, input) {
|
|
1921
1921
|
if (!input.description) return mcpError("Error: description is required for failure action");
|
|
1922
1922
|
if (!input.failureType) return mcpError("Error: failureType is required for failure action");
|
|
1923
|
-
const { appendFailure } = await import("./dist-
|
|
1923
|
+
const { appendFailure } = await import("./dist-LE5AU7FR.js");
|
|
1924
1924
|
const result = await appendFailure(
|
|
1925
1925
|
projectPath,
|
|
1926
1926
|
input.description,
|
|
@@ -1939,13 +1939,13 @@ async function handleFailure(projectPath, input) {
|
|
|
1939
1939
|
return resultToMcpResponse(Ok({ recorded: true }));
|
|
1940
1940
|
}
|
|
1941
1941
|
async function handleArchive(projectPath, input) {
|
|
1942
|
-
const { archiveFailures } = await import("./dist-
|
|
1942
|
+
const { archiveFailures } = await import("./dist-LE5AU7FR.js");
|
|
1943
1943
|
const result = await archiveFailures(projectPath, input.stream, input.session);
|
|
1944
1944
|
if (!result.ok) return resultToMcpResponse(result);
|
|
1945
1945
|
return resultToMcpResponse(Ok({ archived: true }));
|
|
1946
1946
|
}
|
|
1947
1947
|
async function handleReset(projectPath, input) {
|
|
1948
|
-
const { eventSourcing } = await import("./dist-
|
|
1948
|
+
const { eventSourcing } = await import("./dist-LE5AU7FR.js");
|
|
1949
1949
|
const result = await eventSourcing.resetEventLog(projectPath, {
|
|
1950
1950
|
stream: input.stream,
|
|
1951
1951
|
session: input.session
|
|
@@ -1954,7 +1954,7 @@ async function handleReset(projectPath, input) {
|
|
|
1954
1954
|
return resultToMcpResponse(Ok({ reset: true }));
|
|
1955
1955
|
}
|
|
1956
1956
|
async function handleGate(projectPath, input) {
|
|
1957
|
-
const { runMechanicalGate } = await import("./dist-
|
|
1957
|
+
const { runMechanicalGate } = await import("./dist-LE5AU7FR.js");
|
|
1958
1958
|
const result = await runMechanicalGate(projectPath);
|
|
1959
1959
|
if (result.ok) {
|
|
1960
1960
|
await emitSkillEvent(projectPath, {
|
|
@@ -1974,7 +1974,7 @@ async function handleGate(projectPath, input) {
|
|
|
1974
1974
|
}
|
|
1975
1975
|
async function handleSaveHandoff(projectPath, input) {
|
|
1976
1976
|
if (!input.handoff) return mcpError("Error: handoff is required for save-handoff action");
|
|
1977
|
-
const { saveHandoff } = await import("./dist-
|
|
1977
|
+
const { saveHandoff } = await import("./dist-LE5AU7FR.js");
|
|
1978
1978
|
const result = await saveHandoff(
|
|
1979
1979
|
projectPath,
|
|
1980
1980
|
input.handoff,
|
|
@@ -1996,7 +1996,7 @@ async function handleSaveHandoff(projectPath, input) {
|
|
|
1996
1996
|
return resultToMcpResponse(Ok({ saved: true }));
|
|
1997
1997
|
}
|
|
1998
1998
|
async function handleLoadHandoff(projectPath, input) {
|
|
1999
|
-
const { loadHandoff } = await import("./dist-
|
|
1999
|
+
const { loadHandoff } = await import("./dist-LE5AU7FR.js");
|
|
2000
2000
|
return resultToMcpResponse(await loadHandoff(projectPath, input.stream, input.session));
|
|
2001
2001
|
}
|
|
2002
2002
|
async function handleAppendEntry(projectPath, input) {
|
|
@@ -2004,7 +2004,7 @@ async function handleAppendEntry(projectPath, input) {
|
|
|
2004
2004
|
if (!input.authorSkill) return mcpError("Error: authorSkill is required for append_entry action");
|
|
2005
2005
|
if (!input.content) return mcpError("Error: content is required for append_entry action");
|
|
2006
2006
|
if (input.session) {
|
|
2007
|
-
const { appendSessionEntry } = await import("./dist-
|
|
2007
|
+
const { appendSessionEntry } = await import("./dist-LE5AU7FR.js");
|
|
2008
2008
|
const result = await appendSessionEntry(
|
|
2009
2009
|
projectPath,
|
|
2010
2010
|
input.session,
|
|
@@ -2018,7 +2018,7 @@ async function handleAppendEntry(projectPath, input) {
|
|
|
2018
2018
|
return mcpError("Error: session is required for non-decisions sections");
|
|
2019
2019
|
}
|
|
2020
2020
|
const { randomUUID: randomUUID10 } = await import("crypto");
|
|
2021
|
-
const { emitCoreEvent } = await import("./state-events-
|
|
2021
|
+
const { emitCoreEvent } = await import("./state-events-XQPHGLG5.js");
|
|
2022
2022
|
const r = await emitCoreEvent(
|
|
2023
2023
|
projectPath,
|
|
2024
2024
|
{
|
|
@@ -2036,7 +2036,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
|
|
|
2036
2036
|
if (!input.entryId) return mcpError("Error: entryId is required for update_entry_status action");
|
|
2037
2037
|
if (!input.newStatus)
|
|
2038
2038
|
return mcpError("Error: newStatus is required for update_entry_status action");
|
|
2039
|
-
const { updateSessionEntryStatus } = await import("./dist-
|
|
2039
|
+
const { updateSessionEntryStatus } = await import("./dist-LE5AU7FR.js");
|
|
2040
2040
|
const result = await updateSessionEntryStatus(
|
|
2041
2041
|
projectPath,
|
|
2042
2042
|
input.session,
|
|
@@ -2046,7 +2046,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
|
|
|
2046
2046
|
);
|
|
2047
2047
|
if (result.ok && input.section === "decisions" && input.newStatus === "resolved") {
|
|
2048
2048
|
try {
|
|
2049
|
-
const { emitApprovalResolved } = await import("./state-events-
|
|
2049
|
+
const { emitApprovalResolved } = await import("./state-events-XQPHGLG5.js");
|
|
2050
2050
|
await emitApprovalResolved(projectPath, input.entryId, input.newStatus, {
|
|
2051
2051
|
stream: input.stream
|
|
2052
2052
|
});
|
|
@@ -2058,7 +2058,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
|
|
|
2058
2058
|
async function handleReadSection(projectPath, input) {
|
|
2059
2059
|
if (!input.session) return mcpError("Error: session is required for read_section action");
|
|
2060
2060
|
if (!input.section) return mcpError("Error: section is required for read_section action");
|
|
2061
|
-
const { readSessionSection } = await import("./dist-
|
|
2061
|
+
const { readSessionSection } = await import("./dist-LE5AU7FR.js");
|
|
2062
2062
|
const result = await readSessionSection(
|
|
2063
2063
|
projectPath,
|
|
2064
2064
|
input.session,
|
|
@@ -2068,13 +2068,13 @@ async function handleReadSection(projectPath, input) {
|
|
|
2068
2068
|
}
|
|
2069
2069
|
async function handleReadSections(projectPath, input) {
|
|
2070
2070
|
if (!input.session) return mcpError("Error: session is required for read_sections action");
|
|
2071
|
-
const { readSessionSections } = await import("./dist-
|
|
2071
|
+
const { readSessionSections } = await import("./dist-LE5AU7FR.js");
|
|
2072
2072
|
const result = await readSessionSections(projectPath, input.session);
|
|
2073
2073
|
return resultToMcpResponse(result);
|
|
2074
2074
|
}
|
|
2075
2075
|
async function handleArchiveSession(projectPath, input) {
|
|
2076
2076
|
if (!input.session) return mcpError("Error: session is required for archive_session action");
|
|
2077
|
-
const { archiveSession } = await import("./dist-
|
|
2077
|
+
const { archiveSession } = await import("./dist-LE5AU7FR.js");
|
|
2078
2078
|
const { buildArchiveHooks } = await import("@harness-engineering/orchestrator");
|
|
2079
2079
|
const hooks = buildArchiveHooks({ projectPath });
|
|
2080
2080
|
const result = await archiveSession(projectPath, input.session, { hooks });
|
|
@@ -2117,7 +2117,7 @@ async function handlePhaseComplete(projectPath, input) {
|
|
|
2117
2117
|
async function handleTaskTransition(projectPath, input) {
|
|
2118
2118
|
if (!input.taskId) return mcpError("Error: taskId is required for task-transition action");
|
|
2119
2119
|
if (!input.toLane) return mcpError("Error: toLane is required for task-transition action");
|
|
2120
|
-
const { eventSourcing } = await import("./dist-
|
|
2120
|
+
const { eventSourcing } = await import("./dist-LE5AU7FR.js");
|
|
2121
2121
|
const scope = { stream: input.stream, session: input.session };
|
|
2122
2122
|
if (input.dependsOn) {
|
|
2123
2123
|
const reg = await eventSourcing.registerTask(projectPath, input.taskId, input.dependsOn, scope);
|
|
@@ -2181,7 +2181,7 @@ var listStreamsDefinition = {
|
|
|
2181
2181
|
};
|
|
2182
2182
|
async function handleListStreams(input) {
|
|
2183
2183
|
try {
|
|
2184
|
-
const { listStreams, loadStreamIndex } = await import("./dist-
|
|
2184
|
+
const { listStreams, loadStreamIndex } = await import("./dist-LE5AU7FR.js");
|
|
2185
2185
|
const projectPath = sanitizePath(input.path);
|
|
2186
2186
|
const indexResult = await loadStreamIndex(projectPath);
|
|
2187
2187
|
const streamsResult = await listStreams(projectPath);
|
|
@@ -2219,7 +2219,7 @@ var checkPhaseGateDefinition = {
|
|
|
2219
2219
|
};
|
|
2220
2220
|
async function handleCheckPhaseGate(input) {
|
|
2221
2221
|
try {
|
|
2222
|
-
const { runCheckPhaseGate } = await import("./check-phase-gate-
|
|
2222
|
+
const { runCheckPhaseGate } = await import("./check-phase-gate-RZUSDB3O.js");
|
|
2223
2223
|
const result = await runCheckPhaseGate({ cwd: sanitizePath(input.path) });
|
|
2224
2224
|
if (result.ok) {
|
|
2225
2225
|
return { content: [{ type: "text", text: JSON.stringify(result.value) }] };
|
|
@@ -2275,7 +2275,7 @@ async function handleValidateCrossCheck(input) {
|
|
|
2275
2275
|
};
|
|
2276
2276
|
}
|
|
2277
2277
|
try {
|
|
2278
|
-
const { runCrossCheck } = await import("./validate-cross-check-
|
|
2278
|
+
const { runCrossCheck } = await import("./validate-cross-check-HKKQA7K5.js");
|
|
2279
2279
|
const specsDir = path12.resolve(projectPath, input.specsDir ?? "docs/specs");
|
|
2280
2280
|
if (!specsDir.startsWith(projectPath)) {
|
|
2281
2281
|
return {
|
|
@@ -3098,8 +3098,8 @@ async function handleGenerateSlashCommands(input) {
|
|
|
3098
3098
|
// src/mcp/resources/state.ts
|
|
3099
3099
|
async function getStateResource(projectRoot) {
|
|
3100
3100
|
try {
|
|
3101
|
-
const { migrateToStreams } = await import("./dist-
|
|
3102
|
-
const { readHarnessState } = await import("./state-events-
|
|
3101
|
+
const { migrateToStreams } = await import("./dist-LE5AU7FR.js");
|
|
3102
|
+
const { readHarnessState } = await import("./state-events-XQPHGLG5.js");
|
|
3103
3103
|
await migrateToStreams(projectRoot);
|
|
3104
3104
|
const result = await readHarnessState(projectRoot);
|
|
3105
3105
|
if (result.ok) {
|
|
@@ -3132,7 +3132,7 @@ function graphNotFoundError() {
|
|
|
3132
3132
|
content: [
|
|
3133
3133
|
{
|
|
3134
3134
|
type: "text",
|
|
3135
|
-
text: "No graph found. Run `harness scan` or use `ingest_source` tool first."
|
|
3135
|
+
text: "No graph found. Run `harness graph scan` or use `ingest_source` tool first."
|
|
3136
3136
|
}
|
|
3137
3137
|
],
|
|
3138
3138
|
isError: true
|
|
@@ -4048,7 +4048,7 @@ async function getGraphResource(projectRoot) {
|
|
|
4048
4048
|
if (!store) {
|
|
4049
4049
|
return JSON.stringify({
|
|
4050
4050
|
status: "no_graph",
|
|
4051
|
-
message: "No knowledge graph found. Run harness scan to build one."
|
|
4051
|
+
message: "No knowledge graph found. Run harness graph scan to build one."
|
|
4052
4052
|
});
|
|
4053
4053
|
}
|
|
4054
4054
|
const lastScanTimestamp = await readLastScanTimestamp(projectRoot);
|
|
@@ -4119,7 +4119,7 @@ var generateAgentDefinitionsDefinition = {
|
|
|
4119
4119
|
}
|
|
4120
4120
|
};
|
|
4121
4121
|
async function handleGenerateAgentDefinitions(input) {
|
|
4122
|
-
const { generateAgentDefinitions } = await import("./generate-agent-definitions-
|
|
4122
|
+
const { generateAgentDefinitions } = await import("./generate-agent-definitions-PYZ3E7SP.js");
|
|
4123
4123
|
const platforms = input.platform === "all" || !input.platform ? ["claude-code", "gemini-cli"] : [input.platform];
|
|
4124
4124
|
const results = generateAgentDefinitions({
|
|
4125
4125
|
platforms: [...platforms],
|
|
@@ -4527,8 +4527,8 @@ function buildFeatureFromInput(input) {
|
|
|
4527
4527
|
}
|
|
4528
4528
|
async function handleAdd2(projectPath, input, deps) {
|
|
4529
4529
|
const { Ok: Ok2 } = deps;
|
|
4530
|
-
const
|
|
4531
|
-
if (
|
|
4530
|
+
const validationError2 = validateAddFields(input);
|
|
4531
|
+
if (validationError2) return validationError2;
|
|
4532
4532
|
if (!roadmapSourceExists(projectPath)) return roadmapNotFoundError();
|
|
4533
4533
|
const result = await loadRoadmap(projectPath);
|
|
4534
4534
|
if (!result.ok) return resultToMcpResponse(result);
|
|
@@ -4836,8 +4836,8 @@ async function handleManageRoadmap(input) {
|
|
|
4836
4836
|
release,
|
|
4837
4837
|
promoteFeature,
|
|
4838
4838
|
groomRoadmap
|
|
4839
|
-
} = await import("./dist-
|
|
4840
|
-
const { Ok: Ok2 } = await import("./dist-
|
|
4839
|
+
} = await import("./dist-LE5AU7FR.js");
|
|
4840
|
+
const { Ok: Ok2 } = await import("./dist-FBBADRYS.js");
|
|
4841
4841
|
const projectPath = projectPathPre;
|
|
4842
4842
|
const deps = {
|
|
4843
4843
|
parseRoadmap,
|
|
@@ -5280,7 +5280,7 @@ async function handleTransition(validInput, projectPath, id) {
|
|
|
5280
5280
|
const transition = transitionResult.data;
|
|
5281
5281
|
const prompt = renderTransition(transition);
|
|
5282
5282
|
try {
|
|
5283
|
-
const { saveHandoff } = await import("./dist-
|
|
5283
|
+
const { saveHandoff } = await import("./dist-LE5AU7FR.js");
|
|
5284
5284
|
await saveHandoff(
|
|
5285
5285
|
projectPath,
|
|
5286
5286
|
{
|
|
@@ -5361,7 +5361,7 @@ async function handleEmitInteraction(input) {
|
|
|
5361
5361
|
}
|
|
5362
5362
|
async function recordInteraction(projectPath, id, type, decision, stream) {
|
|
5363
5363
|
try {
|
|
5364
|
-
const { emitCoreEvent, emitUserInputCaptured, emitApprovalRequested } = await import("./state-events-
|
|
5364
|
+
const { emitCoreEvent, emitUserInputCaptured, emitApprovalRequested } = await import("./state-events-XQPHGLG5.js");
|
|
5365
5365
|
await emitCoreEvent(
|
|
5366
5366
|
projectPath,
|
|
5367
5367
|
{
|
|
@@ -5522,10 +5522,10 @@ async function handleGatherContext(input) {
|
|
|
5522
5522
|
input.include ?? ["state", "learnings", "handoff", "graph", "validation", "businessKnowledge"]
|
|
5523
5523
|
);
|
|
5524
5524
|
const errors = [];
|
|
5525
|
-
const statePromise = includeSet.has("state") ? import("./state-events-
|
|
5525
|
+
const statePromise = includeSet.has("state") ? import("./state-events-XQPHGLG5.js").then(
|
|
5526
5526
|
(m) => m.readHarnessState(projectPath, { session: input.session })
|
|
5527
5527
|
) : Promise.resolve(null);
|
|
5528
|
-
const learningsPromise = includeSet.has("learnings") ? import("./dist-
|
|
5528
|
+
const learningsPromise = includeSet.has("learnings") ? import("./dist-LE5AU7FR.js").then(
|
|
5529
5529
|
(core) => core.loadBudgetedLearnings(projectPath, {
|
|
5530
5530
|
intent: input.intent,
|
|
5531
5531
|
tokenBudget: input.learningsBudget ?? 1e3,
|
|
@@ -5534,7 +5534,7 @@ async function handleGatherContext(input) {
|
|
|
5534
5534
|
...input.depth !== void 0 && { depth: input.depth }
|
|
5535
5535
|
})
|
|
5536
5536
|
) : Promise.resolve(null);
|
|
5537
|
-
const handoffPromise = includeSet.has("handoff") ? import("./dist-
|
|
5537
|
+
const handoffPromise = includeSet.has("handoff") ? import("./dist-LE5AU7FR.js").then(
|
|
5538
5538
|
(core) => core.loadHandoff(projectPath, void 0, input.session)
|
|
5539
5539
|
) : Promise.resolve(null);
|
|
5540
5540
|
const graphPromise = includeSet.has("graph") ? (async () => {
|
|
@@ -5578,15 +5578,15 @@ async function handleGatherContext(input) {
|
|
|
5578
5578
|
context: contextBlocks
|
|
5579
5579
|
};
|
|
5580
5580
|
})() : Promise.resolve(null);
|
|
5581
|
-
const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-
|
|
5581
|
+
const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-LE5AU7FR.js").then(
|
|
5582
5582
|
(core) => core.readSessionSections(projectPath, input.session)
|
|
5583
5583
|
) : Promise.resolve(null);
|
|
5584
5584
|
const shouldIncludeEvents = input.includeEvents !== void 0 ? input.includeEvents : includeSet.has("events") || !!input.session && !input.include;
|
|
5585
|
-
const eventsPromise = shouldIncludeEvents ? import("./state-events-
|
|
5585
|
+
const eventsPromise = shouldIncludeEvents ? import("./state-events-XQPHGLG5.js").then(
|
|
5586
5586
|
(m) => m.readAuditTimeline(projectPath, { session: input.session })
|
|
5587
5587
|
) : Promise.resolve(null);
|
|
5588
5588
|
const validationPromise = includeSet.has("validation") ? (async () => {
|
|
5589
|
-
const { handleValidateProject: handleValidateProject2 } = await import("./validate-
|
|
5589
|
+
const { handleValidateProject: handleValidateProject2 } = await import("./validate-ON7YMVLY.js");
|
|
5590
5590
|
const result = await handleValidateProject2({ path: projectPath });
|
|
5591
5591
|
const first = result.content[0];
|
|
5592
5592
|
return first ? JSON.parse(first.text) : null;
|
|
@@ -5689,7 +5689,7 @@ async function handleGatherContext(input) {
|
|
|
5689
5689
|
};
|
|
5690
5690
|
if (input.session) {
|
|
5691
5691
|
try {
|
|
5692
|
-
const core = await import("./dist-
|
|
5692
|
+
const core = await import("./dist-LE5AU7FR.js");
|
|
5693
5693
|
core.updateSessionIndex(
|
|
5694
5694
|
projectPath,
|
|
5695
5695
|
input.session,
|
|
@@ -5887,7 +5887,7 @@ async function handleReviewChanges(input) {
|
|
|
5887
5887
|
}
|
|
5888
5888
|
}
|
|
5889
5889
|
async function runQuickReview(projectPath, diff, diffLines, downgraded, offset, limit) {
|
|
5890
|
-
const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-
|
|
5890
|
+
const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-NDGZZ37W.js");
|
|
5891
5891
|
const result = await handleAnalyzeDiff2({ diff, path: projectPath });
|
|
5892
5892
|
const firstContent = result.content[0];
|
|
5893
5893
|
if (!firstContent) throw new Error("Empty analyze_diff response");
|
|
@@ -5922,7 +5922,7 @@ function extractFileCount(diffParsed) {
|
|
|
5922
5922
|
return files?.length ?? 0;
|
|
5923
5923
|
}
|
|
5924
5924
|
async function runStandardReview(projectPath, diff, diffLines, downgraded, offset, limit) {
|
|
5925
|
-
const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-
|
|
5925
|
+
const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-NDGZZ37W.js");
|
|
5926
5926
|
const [diffResult, reviewResult] = await Promise.all([
|
|
5927
5927
|
handleAnalyzeDiff2({ diff, path: projectPath }),
|
|
5928
5928
|
handleCreateSelfReview2({ path: projectPath, diff })
|
|
@@ -5957,7 +5957,7 @@ async function runStandardReview(projectPath, diff, diffLines, downgraded, offse
|
|
|
5957
5957
|
};
|
|
5958
5958
|
}
|
|
5959
5959
|
async function runDeepReview(projectPath, diff, diffLines, _downgraded, offset, limit) {
|
|
5960
|
-
const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-
|
|
5960
|
+
const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-UETEOWSS.js");
|
|
5961
5961
|
const result = await handleRunCodeReview2({
|
|
5962
5962
|
path: projectPath,
|
|
5963
5963
|
diff,
|
|
@@ -6174,6 +6174,85 @@ async function handlePredictConflicts(input) {
|
|
|
6174
6174
|
}
|
|
6175
6175
|
}
|
|
6176
6176
|
|
|
6177
|
+
// src/mcp/tools/parallelization.ts
|
|
6178
|
+
var planParallelizationDefinition = {
|
|
6179
|
+
name: "plan_parallelization",
|
|
6180
|
+
description: "Plan safe parallel execution for a set of plan tasks. Builds a task DAG from dependsOn plus file/owns overlap, wave-groups it, annotates each wave with conflict severity and a firing decision, and returns a ParallelizationPlan (waves, serialized, cyclic, narration).",
|
|
6181
|
+
inputSchema: {
|
|
6182
|
+
type: "object",
|
|
6183
|
+
properties: {
|
|
6184
|
+
path: { type: "string", description: "Path to project root" },
|
|
6185
|
+
tasks: {
|
|
6186
|
+
type: "array",
|
|
6187
|
+
items: {
|
|
6188
|
+
type: "object",
|
|
6189
|
+
properties: {
|
|
6190
|
+
id: { type: "string" },
|
|
6191
|
+
files: { type: "array", items: { type: "string" } },
|
|
6192
|
+
dependsOn: { type: "array", items: { type: "string" } },
|
|
6193
|
+
owns: { type: "array", items: { type: "string" } }
|
|
6194
|
+
},
|
|
6195
|
+
required: ["id", "files"]
|
|
6196
|
+
},
|
|
6197
|
+
minItems: 1,
|
|
6198
|
+
description: "Plan tasks. Each has id, files, and optional dependsOn/owns."
|
|
6199
|
+
},
|
|
6200
|
+
depth: {
|
|
6201
|
+
type: "number",
|
|
6202
|
+
description: "Conflict expansion depth (0=file-only, 1=default)"
|
|
6203
|
+
},
|
|
6204
|
+
minWaveSize: {
|
|
6205
|
+
type: "number",
|
|
6206
|
+
description: "Minimum independent tasks in a wave to justify parallel dispatch. Default 3."
|
|
6207
|
+
}
|
|
6208
|
+
},
|
|
6209
|
+
required: ["path", "tasks"]
|
|
6210
|
+
}
|
|
6211
|
+
};
|
|
6212
|
+
function validationError(messages) {
|
|
6213
|
+
return {
|
|
6214
|
+
content: [{ type: "text", text: `Validation failed: ${messages.join("; ")}` }],
|
|
6215
|
+
isError: true
|
|
6216
|
+
};
|
|
6217
|
+
}
|
|
6218
|
+
async function handlePlanParallelization(input) {
|
|
6219
|
+
try {
|
|
6220
|
+
const projectPath = sanitizePath(input.path);
|
|
6221
|
+
const { PlanTaskSchema } = await import("./dist-FBBADRYS.js");
|
|
6222
|
+
const { planParallelization, validatePlanTasks } = await import("./dist-LE5AU7FR.js");
|
|
6223
|
+
const parsed = PlanTaskSchema.array().safeParse(input.tasks);
|
|
6224
|
+
if (!parsed.success) {
|
|
6225
|
+
return validationError(parsed.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`));
|
|
6226
|
+
}
|
|
6227
|
+
const tasks = parsed.data;
|
|
6228
|
+
const { errors } = validatePlanTasks(tasks);
|
|
6229
|
+
if (errors.length > 0) return validationError(errors);
|
|
6230
|
+
const store = await loadGraphStore(projectPath);
|
|
6231
|
+
const { ConflictPredictor } = await import("./dist-DWBTZXR5.js");
|
|
6232
|
+
const predictor = new ConflictPredictor(store ?? void 0);
|
|
6233
|
+
const conflicts = predictor.predict({
|
|
6234
|
+
tasks: tasks.map((t) => ({ id: t.id, files: t.files })),
|
|
6235
|
+
...input.depth !== void 0 && { depth: input.depth }
|
|
6236
|
+
});
|
|
6237
|
+
const plan = planParallelization({
|
|
6238
|
+
tasks,
|
|
6239
|
+
conflicts,
|
|
6240
|
+
...input.minWaveSize !== void 0 && { minWaveSize: input.minWaveSize }
|
|
6241
|
+
});
|
|
6242
|
+
return { content: [{ type: "text", text: JSON.stringify(plan) }], isError: false };
|
|
6243
|
+
} catch (error) {
|
|
6244
|
+
return {
|
|
6245
|
+
content: [
|
|
6246
|
+
{
|
|
6247
|
+
type: "text",
|
|
6248
|
+
text: `Error: ${error instanceof Error ? error.message : String(error)}`
|
|
6249
|
+
}
|
|
6250
|
+
],
|
|
6251
|
+
isError: true
|
|
6252
|
+
};
|
|
6253
|
+
}
|
|
6254
|
+
}
|
|
6255
|
+
|
|
6177
6256
|
// src/mcp/tools/stale-constraints.ts
|
|
6178
6257
|
var detectStaleConstraintsDefinition = {
|
|
6179
6258
|
name: "detect_stale_constraints",
|
|
@@ -6252,7 +6331,7 @@ async function handleDetectStaleConstraints(input) {
|
|
|
6252
6331
|
]
|
|
6253
6332
|
};
|
|
6254
6333
|
}
|
|
6255
|
-
const { detectStaleConstraints } = await import("./dist-
|
|
6334
|
+
const { detectStaleConstraints } = await import("./dist-LE5AU7FR.js");
|
|
6256
6335
|
const result = detectStaleConstraints(
|
|
6257
6336
|
store,
|
|
6258
6337
|
windowDays,
|
|
@@ -6383,10 +6462,10 @@ function countCriticalFindings(securityData) {
|
|
|
6383
6462
|
return findings.filter((f) => f.severity === "error").length;
|
|
6384
6463
|
}
|
|
6385
6464
|
async function runHealthChecks(projectPath) {
|
|
6386
|
-
const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-
|
|
6387
|
-
const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-
|
|
6388
|
-
const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-
|
|
6389
|
-
const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-
|
|
6465
|
+
const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-2QPCNN7N.js");
|
|
6466
|
+
const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-7PNQZOWV.js");
|
|
6467
|
+
const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-35XURODP.js");
|
|
6468
|
+
const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-6AIUZXF5.js");
|
|
6390
6469
|
const [assessResult, depsResult, entropyResult, securityResult] = await Promise.all([
|
|
6391
6470
|
handleAssessProject2({
|
|
6392
6471
|
path: projectPath,
|
|
@@ -6926,6 +7005,32 @@ function buildDiffInfoFromGit(projectPath) {
|
|
|
6926
7005
|
);
|
|
6927
7006
|
return { changedFiles, newFiles, deletedFiles, totalDiffLines, fileDiffs: /* @__PURE__ */ new Map() };
|
|
6928
7007
|
}
|
|
7008
|
+
function neutralSnapshot(projectPath) {
|
|
7009
|
+
return {
|
|
7010
|
+
capturedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
7011
|
+
gitHead: "",
|
|
7012
|
+
projectPath,
|
|
7013
|
+
checks: {
|
|
7014
|
+
deps: { passed: true, issueCount: 0, circularDeps: 0, layerViolations: 0 },
|
|
7015
|
+
entropy: { passed: true, deadExports: 0, deadFiles: 0, driftCount: 0 },
|
|
7016
|
+
security: { passed: true, findingCount: 0, criticalCount: 0 },
|
|
7017
|
+
perf: { passed: true, violationCount: 0 },
|
|
7018
|
+
docs: { passed: true, undocumentedCount: 0 },
|
|
7019
|
+
lint: { passed: true, issueCount: 0 }
|
|
7020
|
+
},
|
|
7021
|
+
metrics: {
|
|
7022
|
+
avgFanOut: 0,
|
|
7023
|
+
maxFanOut: 0,
|
|
7024
|
+
avgCyclomaticComplexity: 0,
|
|
7025
|
+
maxCyclomaticComplexity: 0,
|
|
7026
|
+
avgCouplingRatio: 0,
|
|
7027
|
+
testCoverage: null,
|
|
7028
|
+
anomalyOutlierCount: 0,
|
|
7029
|
+
articulationPointCount: 0
|
|
7030
|
+
},
|
|
7031
|
+
signals: []
|
|
7032
|
+
};
|
|
7033
|
+
}
|
|
6929
7034
|
async function enrichSnapshotForDispatch(projectPath, options) {
|
|
6930
7035
|
let snapshot = null;
|
|
6931
7036
|
let snapshotFreshness = "fresh";
|
|
@@ -6933,6 +7038,9 @@ async function enrichSnapshotForDispatch(projectPath, options) {
|
|
|
6933
7038
|
snapshot = loadCachedSnapshot(projectPath);
|
|
6934
7039
|
if (snapshot && isSnapshotFresh(snapshot, projectPath)) {
|
|
6935
7040
|
snapshotFreshness = "cached";
|
|
7041
|
+
} else if (options.cachedOnly) {
|
|
7042
|
+
snapshot = snapshot ?? neutralSnapshot(projectPath);
|
|
7043
|
+
snapshotFreshness = "cached";
|
|
6936
7044
|
} else {
|
|
6937
7045
|
snapshot = null;
|
|
6938
7046
|
}
|
|
@@ -7052,6 +7160,7 @@ async function dispatchSkillsFromGit(projectPath, options = {}) {
|
|
|
7052
7160
|
const enrichOpts = { files };
|
|
7053
7161
|
if (commitMessage) enrichOpts.commitMessage = commitMessage;
|
|
7054
7162
|
if (options.fresh) enrichOpts.fresh = options.fresh;
|
|
7163
|
+
if (options.cachedOnly) enrichOpts.cachedOnly = true;
|
|
7055
7164
|
const ctx = await enrichSnapshotForDispatch(projectPath, enrichOpts);
|
|
7056
7165
|
const dispatchOpts = {};
|
|
7057
7166
|
if (options.limit !== void 0) dispatchOpts.limit = options.limit;
|
|
@@ -7220,7 +7329,7 @@ async function handleGetDecayTrends(input) {
|
|
|
7220
7329
|
};
|
|
7221
7330
|
}
|
|
7222
7331
|
try {
|
|
7223
|
-
const core = await import("./dist-
|
|
7332
|
+
const core = await import("./dist-LE5AU7FR.js");
|
|
7224
7333
|
const { TimelineManager } = core;
|
|
7225
7334
|
const manager = new TimelineManager(projectPath);
|
|
7226
7335
|
const timeline = manager.load();
|
|
@@ -7355,7 +7464,7 @@ async function handleCodeOutline(input) {
|
|
|
7355
7464
|
};
|
|
7356
7465
|
}
|
|
7357
7466
|
try {
|
|
7358
|
-
const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-
|
|
7467
|
+
const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-LE5AU7FR.js");
|
|
7359
7468
|
const { stat } = await import("fs/promises");
|
|
7360
7469
|
const stats = await stat(targetPath).catch(() => null);
|
|
7361
7470
|
if (stats?.isFile()) {
|
|
@@ -7374,7 +7483,7 @@ async function handleCodeOutline(input) {
|
|
|
7374
7483
|
})
|
|
7375
7484
|
);
|
|
7376
7485
|
fileStats.sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
7377
|
-
const { paginate: paginate2 } = await import("./dist-
|
|
7486
|
+
const { paginate: paginate2 } = await import("./dist-LE5AU7FR.js");
|
|
7378
7487
|
const paged = paginate2(fileStats, input.offset ?? 0, input.limit ?? 30);
|
|
7379
7488
|
const results = [];
|
|
7380
7489
|
for (const entry of paged.items) {
|
|
@@ -7447,7 +7556,7 @@ async function handleCodeSearch(input) {
|
|
|
7447
7556
|
};
|
|
7448
7557
|
}
|
|
7449
7558
|
try {
|
|
7450
|
-
const { searchSymbols } = await import("./dist-
|
|
7559
|
+
const { searchSymbols } = await import("./dist-LE5AU7FR.js");
|
|
7451
7560
|
const result = await searchSymbols(input.query, directory, input.glob);
|
|
7452
7561
|
const lines = [`Search: "${result.query}" \u2014 ${result.matches.length} matches`];
|
|
7453
7562
|
for (const match of result.matches) {
|
|
@@ -7516,7 +7625,7 @@ async function handleCodeUnfold(input) {
|
|
|
7516
7625
|
}
|
|
7517
7626
|
try {
|
|
7518
7627
|
if (input.symbol) {
|
|
7519
|
-
const { unfoldSymbol } = await import("./dist-
|
|
7628
|
+
const { unfoldSymbol } = await import("./dist-LE5AU7FR.js");
|
|
7520
7629
|
const result = await unfoldSymbol(filePath, input.symbol);
|
|
7521
7630
|
const header = result.warning ? `${result.file}:${result.startLine}-${result.endLine} ${result.warning}
|
|
7522
7631
|
` : `${result.file}:${result.startLine}-${result.endLine}
|
|
@@ -7524,7 +7633,7 @@ async function handleCodeUnfold(input) {
|
|
|
7524
7633
|
return { content: [{ type: "text", text: header + result.content }] };
|
|
7525
7634
|
}
|
|
7526
7635
|
if (input.startLine != null && input.endLine != null) {
|
|
7527
|
-
const { unfoldRange } = await import("./dist-
|
|
7636
|
+
const { unfoldRange } = await import("./dist-LE5AU7FR.js");
|
|
7528
7637
|
const result = await unfoldRange(filePath, input.startLine, input.endLine);
|
|
7529
7638
|
const header = `${result.file}:${result.startLine}-${result.endLine}
|
|
7530
7639
|
`;
|
|
@@ -7580,7 +7689,7 @@ async function handleCheckTraceability(input) {
|
|
|
7580
7689
|
content: [
|
|
7581
7690
|
{
|
|
7582
7691
|
type: "text",
|
|
7583
|
-
text: "No graph found. Run `harness scan` or use `ingest_source` tool first."
|
|
7692
|
+
text: "No graph found. Run `harness graph scan` or use `ingest_source` tool first."
|
|
7584
7693
|
}
|
|
7585
7694
|
],
|
|
7586
7695
|
isError: true
|
|
@@ -7598,7 +7707,7 @@ async function handleCheckTraceability(input) {
|
|
|
7598
7707
|
type: "text",
|
|
7599
7708
|
text: JSON.stringify({
|
|
7600
7709
|
status: "no-requirements",
|
|
7601
|
-
message: "No requirement nodes found in graph. Run `harness scan` to ingest spec requirements."
|
|
7710
|
+
message: "No requirement nodes found in graph. Run `harness graph scan` to ingest spec requirements."
|
|
7602
7711
|
})
|
|
7603
7712
|
}
|
|
7604
7713
|
]
|
|
@@ -7709,7 +7818,7 @@ async function handlePredictFailures(input) {
|
|
|
7709
7818
|
};
|
|
7710
7819
|
}
|
|
7711
7820
|
try {
|
|
7712
|
-
const core = await import("./dist-
|
|
7821
|
+
const core = await import("./dist-LE5AU7FR.js");
|
|
7713
7822
|
const { TimelineManager, PredictionEngine, SpecImpactEstimator } = core;
|
|
7714
7823
|
const manager = new TimelineManager(projectPath);
|
|
7715
7824
|
const includeRoadmap = input.includeRoadmap !== false;
|
|
@@ -8599,7 +8708,7 @@ async function handleIntentMode(projectPath, intent, pipeline, budget, filterCon
|
|
|
8599
8708
|
content: [
|
|
8600
8709
|
{
|
|
8601
8710
|
type: "text",
|
|
8602
|
-
text: "No graph found. Run `harness scan` or use `ingest_source` tool first."
|
|
8711
|
+
text: "No graph found. Run `harness graph scan` or use `ingest_source` tool first."
|
|
8603
8712
|
}
|
|
8604
8713
|
],
|
|
8605
8714
|
isError: true
|
|
@@ -8818,7 +8927,7 @@ async function handleDetectConstraintEmergence(input) {
|
|
|
8818
8927
|
}
|
|
8819
8928
|
const nodePath = await import("path");
|
|
8820
8929
|
const historyPath = nodePath.resolve(projectPath, ".harness/arch/violation-history.json");
|
|
8821
|
-
const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-
|
|
8930
|
+
const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-LE5AU7FR.js");
|
|
8822
8931
|
const manager = new ViolationHistoryManager(historyPath);
|
|
8823
8932
|
const history = manager.load();
|
|
8824
8933
|
const options = { windowWeeks, minOccurrences };
|
|
@@ -8906,7 +9015,7 @@ async function handleRunCIChecks(input) {
|
|
|
8906
9015
|
};
|
|
8907
9016
|
}
|
|
8908
9017
|
try {
|
|
8909
|
-
const { runCIChecks } = await import("./dist-
|
|
9018
|
+
const { runCIChecks } = await import("./dist-LE5AU7FR.js");
|
|
8910
9019
|
const skip = input.checks ? VALID_CHECKS.filter((c) => !input.checks.includes(c)) : [];
|
|
8911
9020
|
const result = await runCIChecks({
|
|
8912
9021
|
projectRoot: projectPath,
|
|
@@ -8968,7 +9077,7 @@ async function handleGenerateBlueprint(input) {
|
|
|
8968
9077
|
};
|
|
8969
9078
|
}
|
|
8970
9079
|
try {
|
|
8971
|
-
const { ProjectScanner } = await import("./dist-
|
|
9080
|
+
const { ProjectScanner } = await import("./dist-LE5AU7FR.js");
|
|
8972
9081
|
const scanner = new ProjectScanner(projectPath);
|
|
8973
9082
|
const data = await scanner.scan();
|
|
8974
9083
|
return {
|
|
@@ -9171,7 +9280,7 @@ function validateProposalCrossFields(input) {
|
|
|
9171
9280
|
}
|
|
9172
9281
|
async function loadCoreProposalApi() {
|
|
9173
9282
|
try {
|
|
9174
|
-
const core = await import("./dist-
|
|
9283
|
+
const core = await import("./dist-LE5AU7FR.js");
|
|
9175
9284
|
return {
|
|
9176
9285
|
createProposal: core.createProposal,
|
|
9177
9286
|
ProposalConflictError: core.ProposalConflictError
|
|
@@ -9189,9 +9298,9 @@ async function handleEmitSkillProposal(input) {
|
|
|
9189
9298
|
} catch (err2) {
|
|
9190
9299
|
return mcpError(err2 instanceof Error ? err2.message : "Invalid path");
|
|
9191
9300
|
}
|
|
9192
|
-
const
|
|
9193
|
-
if (
|
|
9194
|
-
return mcpError(
|
|
9301
|
+
const validationError2 = validateProposalCrossFields(input);
|
|
9302
|
+
if (validationError2) {
|
|
9303
|
+
return mcpError(validationError2);
|
|
9195
9304
|
}
|
|
9196
9305
|
const core = await loadCoreProposalApi();
|
|
9197
9306
|
if ("content" in core) {
|
|
@@ -19592,8 +19701,8 @@ async function buildEvaluator(input) {
|
|
|
19592
19701
|
);
|
|
19593
19702
|
}
|
|
19594
19703
|
async function handleOutcomeEval(input) {
|
|
19595
|
-
const
|
|
19596
|
-
if (
|
|
19704
|
+
const validationError2 = validateInput(input);
|
|
19705
|
+
if (validationError2 !== null) return errorResponse(validationError2);
|
|
19597
19706
|
try {
|
|
19598
19707
|
const evaluator = await buildEvaluator(input);
|
|
19599
19708
|
const verdict = await evaluator.evaluate({
|
|
@@ -19700,8 +19809,8 @@ ${await readFile2(file, "utf8")}`);
|
|
|
19700
19809
|
return parts.length > 0 ? parts.join("\n\n") : void 0;
|
|
19701
19810
|
}
|
|
19702
19811
|
async function handleAcceptanceEval(input) {
|
|
19703
|
-
const
|
|
19704
|
-
if (
|
|
19812
|
+
const validationError2 = validateInput2(input);
|
|
19813
|
+
if (validationError2 !== null) return errorResponse2(validationError2);
|
|
19705
19814
|
try {
|
|
19706
19815
|
const { AcceptanceEvaluator } = await import("@harness-engineering/intelligence");
|
|
19707
19816
|
const provider = await resolveAnalysisProvider2(input.model);
|
|
@@ -19765,7 +19874,7 @@ async function handleValidateStrategy(input) {
|
|
|
19765
19874
|
} catch (error) {
|
|
19766
19875
|
return mcpError2(error instanceof Error ? error.message : String(error));
|
|
19767
19876
|
}
|
|
19768
|
-
const { validateStrategy } = await import("./dist-
|
|
19877
|
+
const { validateStrategy } = await import("./dist-LE5AU7FR.js");
|
|
19769
19878
|
const result = await validateStrategy(projectPath);
|
|
19770
19879
|
if (!result.ok) {
|
|
19771
19880
|
return mcpJson({ present: true, valid: false, error: result.error.message });
|
|
@@ -19790,7 +19899,7 @@ async function handleReadStrategy(input) {
|
|
|
19790
19899
|
} catch (error) {
|
|
19791
19900
|
return mcpError2(error instanceof Error ? error.message : String(error));
|
|
19792
19901
|
}
|
|
19793
|
-
const core = await import("./dist-
|
|
19902
|
+
const core = await import("./dist-LE5AU7FR.js");
|
|
19794
19903
|
const validation = await core.validateStrategy(projectPath);
|
|
19795
19904
|
if (!validation.ok) {
|
|
19796
19905
|
return mcpJson({ present: true, valid: false, error: validation.error.message });
|
|
@@ -19842,7 +19951,7 @@ async function handleWriteStrategy(input) {
|
|
|
19842
19951
|
} catch (error) {
|
|
19843
19952
|
return mcpError2(error instanceof Error ? error.message : String(error));
|
|
19844
19953
|
}
|
|
19845
|
-
const core = await import("./dist-
|
|
19954
|
+
const core = await import("./dist-LE5AU7FR.js");
|
|
19846
19955
|
try {
|
|
19847
19956
|
core.writeStrategyDoc(input.doc, {
|
|
19848
19957
|
cwd: projectPath,
|
|
@@ -19886,7 +19995,7 @@ async function handleSeedPulseFromStrategy(input) {
|
|
|
19886
19995
|
} catch (error) {
|
|
19887
19996
|
return mcpError3(error instanceof Error ? error.message : String(error));
|
|
19888
19997
|
}
|
|
19889
|
-
const core = await import("./dist-
|
|
19998
|
+
const core = await import("./dist-LE5AU7FR.js");
|
|
19890
19999
|
const seed = core.seedFromStrategy({ cwd: projectPath });
|
|
19891
20000
|
return mcpJson2(seed);
|
|
19892
20001
|
}
|
|
@@ -19921,7 +20030,7 @@ async function handleWritePulseConfig(input) {
|
|
|
19921
20030
|
return mcpError3(error instanceof Error ? error.message : String(error));
|
|
19922
20031
|
}
|
|
19923
20032
|
const resolvedConfigPath = input.configPath !== void 0 ? path55.isAbsolute(input.configPath) ? input.configPath : path55.join(projectPath, input.configPath) : path55.join(projectPath, "harness.config.json");
|
|
19924
|
-
const core = await import("./dist-
|
|
20033
|
+
const core = await import("./dist-LE5AU7FR.js");
|
|
19925
20034
|
try {
|
|
19926
20035
|
core.writePulseConfig(input.config, {
|
|
19927
20036
|
configPath: resolvedConfigPath,
|
|
@@ -19970,7 +20079,7 @@ async function handleAcquireCompoundLock(input) {
|
|
|
19970
20079
|
} catch (error) {
|
|
19971
20080
|
return mcpError4(error instanceof Error ? error.message : String(error));
|
|
19972
20081
|
}
|
|
19973
|
-
const core = await import("./dist-
|
|
20082
|
+
const core = await import("./dist-LE5AU7FR.js");
|
|
19974
20083
|
try {
|
|
19975
20084
|
const handle = core.acquireCompoundLock(
|
|
19976
20085
|
input.category,
|
|
@@ -20094,6 +20203,7 @@ var TOOL_DEFINITIONS = [
|
|
|
20094
20203
|
askGraphDefinition,
|
|
20095
20204
|
checkTaskIndependenceDefinition,
|
|
20096
20205
|
predictConflictsDefinition,
|
|
20206
|
+
planParallelizationDefinition,
|
|
20097
20207
|
detectStaleConstraintsDefinition,
|
|
20098
20208
|
searchSkillsDefinition,
|
|
20099
20209
|
codeOutlineDefinition,
|
|
@@ -20188,6 +20298,7 @@ var TOOL_HANDLERS = {
|
|
|
20188
20298
|
ask_graph: handleAskGraph,
|
|
20189
20299
|
check_task_independence: handleCheckTaskIndependence,
|
|
20190
20300
|
predict_conflicts: handlePredictConflicts,
|
|
20301
|
+
plan_parallelization: handlePlanParallelization,
|
|
20191
20302
|
detect_stale_constraints: handleDetectStaleConstraints,
|
|
20192
20303
|
search_skills: handleSearchSkills,
|
|
20193
20304
|
code_outline: handleCodeOutline,
|
|
@@ -20334,7 +20445,7 @@ async function appendUpdateNotification(result, resolvedRoot) {
|
|
|
20334
20445
|
shouldRunCheck,
|
|
20335
20446
|
readCheckState,
|
|
20336
20447
|
spawnBackgroundCheck
|
|
20337
|
-
} = await import("./dist-
|
|
20448
|
+
} = await import("./dist-LE5AU7FR.js");
|
|
20338
20449
|
const { CLI_VERSION } = await import("./version-CUI434OP.js");
|
|
20339
20450
|
const configInterval = readConfigInterval(resolvedRoot);
|
|
20340
20451
|
const DEFAULT_INTERVAL = 864e5;
|