@harness-engineering/cli 2.4.0 → 2.4.2
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-2M46KG4F.js +10 -0
- package/dist/{architecture-I2G7PNQB.js → architecture-3ZSN5RDQ.js} +5 -5
- package/dist/{assess-project-LO6NCLE7.js → assess-project-KZWFQEJE.js} +5 -3
- package/dist/bin/harness-mcp.js +16 -16
- package/dist/bin/harness.js +29 -27
- package/dist/{check-phase-gate-52SQFNJB.js → check-phase-gate-EWV5VYTG.js} +5 -5
- package/dist/{chunk-GDJ2MRYH.js → chunk-2TGCYJMT.js} +259 -5
- package/dist/{chunk-TIQU5VY7.js → chunk-5FDBXUFW.js} +1 -1
- package/dist/{chunk-7BNK4M23.js → chunk-5XLLIYYL.js} +1 -1
- package/dist/{chunk-U4XK4BB3.js → chunk-73KZ2E47.js} +9 -9
- package/dist/{chunk-NGCM4B4V.js → chunk-7RZZV73V.js} +5 -5
- package/dist/{chunk-WY2J54IZ.js → chunk-B2ZYMQGT.js} +64 -30
- package/dist/{chunk-XPRGWHBL.js → chunk-BCFDGOMA.js} +1 -1
- package/dist/{chunk-27EHWQPK.js → chunk-GLKASJZE.js} +6 -6
- package/dist/{chunk-TCR5PKMU.js → chunk-GOSUZC5H.js} +514 -208
- package/dist/{chunk-MQRKPF46.js → chunk-I2KULMPD.js} +10 -10
- package/dist/{chunk-4XB37LST.js → chunk-IEHXZB6J.js} +9 -9
- package/dist/{chunk-5YOHXTK3.js → chunk-KOK7BFP2.js} +3 -3
- package/dist/{chunk-2L2A6W6I.js → chunk-KRQTN46U.js} +3 -3
- package/dist/{chunk-GN2CSZC6.js → chunk-LHHO7AH4.js} +3 -3
- package/dist/{chunk-OFMQEUYN.js → chunk-LJF6UY4R.js} +2 -2
- package/dist/{chunk-KPWUZSHL.js → chunk-MXOQEI72.js} +25 -8
- package/dist/{chunk-54JTO4NZ.js → chunk-NM3ZIWVN.js} +2 -2
- package/dist/{chunk-JGPOQJ73.js → chunk-NTOKQJOX.js} +2 -2
- package/dist/chunk-O63AAPIZ.js +190 -0
- package/dist/{chunk-TVJZX53C.js → chunk-OUXYITL5.js} +2 -2
- package/dist/{chunk-MSBVH6ER.js → chunk-PPQ3TY2R.js} +2 -2
- package/dist/{chunk-RYVL76ZF.js → chunk-QV5EBDWA.js} +1 -1
- package/dist/{chunk-FJJYQWUP.js → chunk-RRTTJ3VB.js} +2 -2
- package/dist/{chunk-Q43LM7CO.js → chunk-TPNA2I4J.js} +206 -97
- package/dist/{chunk-RZASDABE.js → chunk-UPV7VDUB.js} +2 -2
- package/dist/{chunk-DJRRTZGD.js → chunk-UQJV7NNM.js} +2 -2
- package/dist/ci-workflow-5TBUHJFC.js +10 -0
- package/dist/{dist-ZJGFXGIB.js → dist-HA6IIPRC.js} +39 -3
- package/dist/dist-O733ZU6I.js +49 -0
- package/dist/{dist-SQAOKWXM.js → dist-QPWXPCPL.js} +1 -1
- package/dist/{docs-7CW7WUFB.js → docs-D6WI2LCF.js} +5 -5
- package/dist/engine-GBEVIZZQ.js +10 -0
- package/dist/{entropy-P6QELTFA.js → entropy-V6M4KJDC.js} +4 -4
- package/dist/{feedback-PJWCDRRZ.js → feedback-22I4HHXM.js} +1 -1
- package/dist/{generate-agent-definitions-ONDIJHHK.js → generate-agent-definitions-UM7T3WLA.js} +5 -5
- package/dist/{glob-helper-JE3MO4UD.js → glob-helper-XE2UGEOV.js} +1 -1
- package/dist/{graph-loader-TJU4E7KL.js → graph-loader-EQBOIHFZ.js} +1 -1
- package/dist/index.d.ts +100 -10
- package/dist/index.js +26 -26
- package/dist/loader-5V72NYMF.js +12 -0
- package/dist/{mcp-UUNLS3MC.js → mcp-5KQGFG5U.js} +16 -16
- package/dist/{performance-7X3EFAOD.js → performance-MVORVVMG.js} +5 -5
- package/dist/{review-pipeline-GAJ22PBC.js → review-pipeline-JYSVCNGJ.js} +4 -4
- package/dist/runtime-KZC2OQI7.js +11 -0
- package/dist/{scan-SFX5U3TE.js → scan-4PPP6ZXT.js} +1 -1
- package/dist/{security-ZSU643D7.js → security-WOVOBLCI.js} +1 -1
- package/dist/{tool-tiers-7QGZ3FKY.js → tool-tiers-QVWKAZX4.js} +5 -1
- package/dist/{validate-IDX6RI3U.js → validate-55HGQKWR.js} +5 -5
- package/dist/validate-cross-check-H3PSV4VY.js +10 -0
- package/package.json +6 -6
- package/dist/agents-md-ROTDQOXM.js +0 -10
- package/dist/chunk-RL4VMEXL.js +0 -53
- package/dist/ci-workflow-MYBH64CR.js +0 -10
- package/dist/dist-3EWNRFFQ.js +0 -21
- package/dist/engine-Y75QZW6N.js +0 -10
- package/dist/loader-DQRNWKOZ.js +0 -12
- package/dist/runtime-6TK6U72R.js +0 -11
- package/dist/validate-cross-check-5YEWZ3EW.js +0 -10
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
handleRunCodeReview,
|
|
3
3
|
runCodeReviewDefinition,
|
|
4
4
|
sortFindingsBySeverity
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UPV7VDUB.js";
|
|
6
6
|
import {
|
|
7
7
|
assessProjectDefinition,
|
|
8
8
|
handleAssessProject
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-B2ZYMQGT.js";
|
|
10
10
|
import {
|
|
11
11
|
getBusinessKnowledgeResource
|
|
12
12
|
} from "./chunk-IOW3MW2K.js";
|
|
@@ -17,35 +17,35 @@ import {
|
|
|
17
17
|
handleCreateSelfReview,
|
|
18
18
|
handleRequestPeerReview,
|
|
19
19
|
requestPeerReviewDefinition
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IEHXZB6J.js";
|
|
21
21
|
import {
|
|
22
22
|
getSecurityTrendsDefinition,
|
|
23
23
|
handleGetSecurityTrends,
|
|
24
24
|
handleRunSecurityScan,
|
|
25
25
|
runSecurityScanDefinition
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-LHHO7AH4.js";
|
|
27
27
|
import {
|
|
28
28
|
loadGraphStore
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-5FDBXUFW.js";
|
|
30
30
|
import {
|
|
31
31
|
handleValidateProject,
|
|
32
32
|
validateToolDefinition
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-KRQTN46U.js";
|
|
34
34
|
import {
|
|
35
35
|
checkDependenciesDefinition,
|
|
36
36
|
handleCheckDependencies
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-7RZZV73V.js";
|
|
38
38
|
import {
|
|
39
39
|
resolveProjectConfig
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-LJF6UY4R.js";
|
|
41
41
|
import {
|
|
42
42
|
checkDocsDefinition,
|
|
43
43
|
handleCheckDocs
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-I2KULMPD.js";
|
|
45
45
|
import {
|
|
46
46
|
detectEntropyDefinition,
|
|
47
47
|
handleDetectEntropy
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-GLKASJZE.js";
|
|
49
49
|
import {
|
|
50
50
|
checkPerformanceDefinition,
|
|
51
51
|
getCriticalPathsDefinition,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
handleGetPerfBaselines,
|
|
56
56
|
handleUpdatePerfBaselines,
|
|
57
57
|
updatePerfBaselinesDefinition
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-73KZ2E47.js";
|
|
59
59
|
import {
|
|
60
60
|
resultToMcpResponse
|
|
61
61
|
} from "./chunk-EPUKTTJZ.js";
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
} from "./chunk-27AJKSQY.js";
|
|
68
68
|
import {
|
|
69
69
|
resolveConfig
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-MXOQEI72.js";
|
|
71
71
|
import {
|
|
72
72
|
GENERATED_HEADER_CLAUDE,
|
|
73
73
|
GENERATED_HEADER_CODEX,
|
|
@@ -107,11 +107,11 @@ import {
|
|
|
107
107
|
scanForInjection,
|
|
108
108
|
serializeEnvelope,
|
|
109
109
|
writeTaint
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-2TGCYJMT.js";
|
|
111
111
|
import {
|
|
112
112
|
Err,
|
|
113
113
|
Ok
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-O63AAPIZ.js";
|
|
115
115
|
import {
|
|
116
116
|
SkillMetadataSchema
|
|
117
117
|
} from "./chunk-HIK6OEUF.js";
|
|
@@ -712,7 +712,7 @@ ${skippedMsg}`
|
|
|
712
712
|
async function handleInitProject(input) {
|
|
713
713
|
const i = input;
|
|
714
714
|
try {
|
|
715
|
-
const { TemplateEngine } = await import("./engine-
|
|
715
|
+
const { TemplateEngine } = await import("./engine-GBEVIZZQ.js");
|
|
716
716
|
const engine = new TemplateEngine(resolveTemplatesDir());
|
|
717
717
|
const safePath = sanitizePath(i.path);
|
|
718
718
|
const detected = tryDetectFramework(engine, safePath, i);
|
|
@@ -734,7 +734,7 @@ var listPersonasDefinition = {
|
|
|
734
734
|
inputSchema: { type: "object", properties: {} }
|
|
735
735
|
};
|
|
736
736
|
async function handleListPersonas() {
|
|
737
|
-
const { listPersonas } = await import("./loader-
|
|
737
|
+
const { listPersonas } = await import("./loader-5V72NYMF.js");
|
|
738
738
|
const result = listPersonas(resolvePersonasDir());
|
|
739
739
|
return resultToMcpResponse(result);
|
|
740
740
|
}
|
|
@@ -758,10 +758,10 @@ async function handleGeneratePersonaArtifacts(input) {
|
|
|
758
758
|
if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.name)) {
|
|
759
759
|
return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.name}`)));
|
|
760
760
|
}
|
|
761
|
-
const { loadPersona } = await import("./loader-
|
|
762
|
-
const { generateRuntime } = await import("./runtime-
|
|
763
|
-
const { generateAgentsMd } = await import("./agents-md-
|
|
764
|
-
const { generateCIWorkflow } = await import("./ci-workflow-
|
|
761
|
+
const { loadPersona } = await import("./loader-5V72NYMF.js");
|
|
762
|
+
const { generateRuntime } = await import("./runtime-KZC2OQI7.js");
|
|
763
|
+
const { generateAgentsMd } = await import("./agents-md-2M46KG4F.js");
|
|
764
|
+
const { generateCIWorkflow } = await import("./ci-workflow-5TBUHJFC.js");
|
|
765
765
|
const personasDir = resolvePersonasDir();
|
|
766
766
|
const filePath = path3.join(personasDir, `${input.name}.yaml`);
|
|
767
767
|
if (!filePath.startsWith(personasDir)) {
|
|
@@ -816,7 +816,7 @@ async function handleRunPersona(input) {
|
|
|
816
816
|
if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.persona)) {
|
|
817
817
|
return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.persona}`)));
|
|
818
818
|
}
|
|
819
|
-
const { loadPersona } = await import("./loader-
|
|
819
|
+
const { loadPersona } = await import("./loader-5V72NYMF.js");
|
|
820
820
|
const { runPersona } = await import("./runner-AAEF2TXY.js");
|
|
821
821
|
const { executeSkill } = await import("./skill-executor-MOCUIAYS.js");
|
|
822
822
|
const personasDir = resolvePersonasDir();
|
|
@@ -1261,7 +1261,7 @@ function loadOrGenerateProfile(projectRoot) {
|
|
|
1261
1261
|
// src/mcp/tools/event-emitter.ts
|
|
1262
1262
|
async function emitSkillEvent(projectPath, event) {
|
|
1263
1263
|
try {
|
|
1264
|
-
const { emitEvent } = await import("./dist-
|
|
1264
|
+
const { emitEvent } = await import("./dist-HA6IIPRC.js");
|
|
1265
1265
|
await emitEvent(projectPath, event);
|
|
1266
1266
|
} catch {
|
|
1267
1267
|
}
|
|
@@ -1533,7 +1533,7 @@ async function autoSyncRoadmap(projectPath) {
|
|
|
1533
1533
|
try {
|
|
1534
1534
|
const roadmapFile = path10.join(projectPath, "docs", "roadmap.md");
|
|
1535
1535
|
if (!fs9.existsSync(roadmapFile)) return;
|
|
1536
|
-
const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-
|
|
1536
|
+
const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-HA6IIPRC.js");
|
|
1537
1537
|
const raw = fs9.readFileSync(roadmapFile, "utf-8");
|
|
1538
1538
|
const parseResult = parseRoadmap(raw);
|
|
1539
1539
|
if (!parseResult.ok) return;
|
|
@@ -1563,7 +1563,7 @@ async function triggerExternalSync(projectPath, roadmapFile) {
|
|
|
1563
1563
|
console.warn("[roadmap-sync] GITHUB_TOKEN not found \u2014 external sync skipped");
|
|
1564
1564
|
return;
|
|
1565
1565
|
}
|
|
1566
|
-
const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-
|
|
1566
|
+
const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-HA6IIPRC.js");
|
|
1567
1567
|
const adapter = new GitHubIssuesSyncAdapter({
|
|
1568
1568
|
token,
|
|
1569
1569
|
config: trackerConfig
|
|
@@ -1660,12 +1660,12 @@ var manageStateDefinition = {
|
|
|
1660
1660
|
}
|
|
1661
1661
|
};
|
|
1662
1662
|
async function handleShow(projectPath, input) {
|
|
1663
|
-
const { loadState } = await import("./dist-
|
|
1663
|
+
const { loadState } = await import("./dist-HA6IIPRC.js");
|
|
1664
1664
|
return resultToMcpResponse(await loadState(projectPath, input.stream, input.session));
|
|
1665
1665
|
}
|
|
1666
1666
|
async function handleLearn(projectPath, input) {
|
|
1667
1667
|
if (!input.learning) return mcpError("Error: learning is required for learn action");
|
|
1668
|
-
const { appendLearning } = await import("./dist-
|
|
1668
|
+
const { appendLearning } = await import("./dist-HA6IIPRC.js");
|
|
1669
1669
|
const result = await appendLearning(
|
|
1670
1670
|
projectPath,
|
|
1671
1671
|
input.learning,
|
|
@@ -1680,7 +1680,7 @@ async function handleLearn(projectPath, input) {
|
|
|
1680
1680
|
async function handleFailure(projectPath, input) {
|
|
1681
1681
|
if (!input.description) return mcpError("Error: description is required for failure action");
|
|
1682
1682
|
if (!input.failureType) return mcpError("Error: failureType is required for failure action");
|
|
1683
|
-
const { appendFailure } = await import("./dist-
|
|
1683
|
+
const { appendFailure } = await import("./dist-HA6IIPRC.js");
|
|
1684
1684
|
const result = await appendFailure(
|
|
1685
1685
|
projectPath,
|
|
1686
1686
|
input.description,
|
|
@@ -1699,19 +1699,19 @@ async function handleFailure(projectPath, input) {
|
|
|
1699
1699
|
return resultToMcpResponse(Ok({ recorded: true }));
|
|
1700
1700
|
}
|
|
1701
1701
|
async function handleArchive(projectPath, input) {
|
|
1702
|
-
const { archiveFailures } = await import("./dist-
|
|
1702
|
+
const { archiveFailures } = await import("./dist-HA6IIPRC.js");
|
|
1703
1703
|
const result = await archiveFailures(projectPath, input.stream, input.session);
|
|
1704
1704
|
if (!result.ok) return resultToMcpResponse(result);
|
|
1705
1705
|
return resultToMcpResponse(Ok({ archived: true }));
|
|
1706
1706
|
}
|
|
1707
1707
|
async function handleReset(projectPath, input) {
|
|
1708
|
-
const { saveState, DEFAULT_STATE } = await import("./dist-
|
|
1708
|
+
const { saveState, DEFAULT_STATE } = await import("./dist-HA6IIPRC.js");
|
|
1709
1709
|
const result = await saveState(projectPath, { ...DEFAULT_STATE }, input.stream, input.session);
|
|
1710
1710
|
if (!result.ok) return resultToMcpResponse(result);
|
|
1711
1711
|
return resultToMcpResponse(Ok({ reset: true }));
|
|
1712
1712
|
}
|
|
1713
1713
|
async function handleGate(projectPath, input) {
|
|
1714
|
-
const { runMechanicalGate } = await import("./dist-
|
|
1714
|
+
const { runMechanicalGate } = await import("./dist-HA6IIPRC.js");
|
|
1715
1715
|
const result = await runMechanicalGate(projectPath);
|
|
1716
1716
|
if (result.ok) {
|
|
1717
1717
|
await emitSkillEvent(projectPath, {
|
|
@@ -1731,7 +1731,7 @@ async function handleGate(projectPath, input) {
|
|
|
1731
1731
|
}
|
|
1732
1732
|
async function handleSaveHandoff(projectPath, input) {
|
|
1733
1733
|
if (!input.handoff) return mcpError("Error: handoff is required for save-handoff action");
|
|
1734
|
-
const { saveHandoff } = await import("./dist-
|
|
1734
|
+
const { saveHandoff } = await import("./dist-HA6IIPRC.js");
|
|
1735
1735
|
const result = await saveHandoff(
|
|
1736
1736
|
projectPath,
|
|
1737
1737
|
input.handoff,
|
|
@@ -1753,7 +1753,7 @@ async function handleSaveHandoff(projectPath, input) {
|
|
|
1753
1753
|
return resultToMcpResponse(Ok({ saved: true }));
|
|
1754
1754
|
}
|
|
1755
1755
|
async function handleLoadHandoff(projectPath, input) {
|
|
1756
|
-
const { loadHandoff } = await import("./dist-
|
|
1756
|
+
const { loadHandoff } = await import("./dist-HA6IIPRC.js");
|
|
1757
1757
|
return resultToMcpResponse(await loadHandoff(projectPath, input.stream, input.session));
|
|
1758
1758
|
}
|
|
1759
1759
|
async function handleAppendEntry(projectPath, input) {
|
|
@@ -1761,7 +1761,7 @@ async function handleAppendEntry(projectPath, input) {
|
|
|
1761
1761
|
if (!input.authorSkill) return mcpError("Error: authorSkill is required for append_entry action");
|
|
1762
1762
|
if (!input.content) return mcpError("Error: content is required for append_entry action");
|
|
1763
1763
|
if (input.session) {
|
|
1764
|
-
const { appendSessionEntry } = await import("./dist-
|
|
1764
|
+
const { appendSessionEntry } = await import("./dist-HA6IIPRC.js");
|
|
1765
1765
|
const result = await appendSessionEntry(
|
|
1766
1766
|
projectPath,
|
|
1767
1767
|
input.session,
|
|
@@ -1774,7 +1774,7 @@ async function handleAppendEntry(projectPath, input) {
|
|
|
1774
1774
|
if (input.section !== "decisions") {
|
|
1775
1775
|
return mcpError("Error: session is required for non-decisions sections");
|
|
1776
1776
|
}
|
|
1777
|
-
const { loadState, saveState } = await import("./dist-
|
|
1777
|
+
const { loadState, saveState } = await import("./dist-HA6IIPRC.js");
|
|
1778
1778
|
const lr = await loadState(projectPath, input.stream);
|
|
1779
1779
|
if (!lr.ok) return resultToMcpResponse(lr);
|
|
1780
1780
|
lr.value.decisions.push({
|
|
@@ -1792,7 +1792,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
|
|
|
1792
1792
|
if (!input.entryId) return mcpError("Error: entryId is required for update_entry_status action");
|
|
1793
1793
|
if (!input.newStatus)
|
|
1794
1794
|
return mcpError("Error: newStatus is required for update_entry_status action");
|
|
1795
|
-
const { updateSessionEntryStatus } = await import("./dist-
|
|
1795
|
+
const { updateSessionEntryStatus } = await import("./dist-HA6IIPRC.js");
|
|
1796
1796
|
const result = await updateSessionEntryStatus(
|
|
1797
1797
|
projectPath,
|
|
1798
1798
|
input.session,
|
|
@@ -1805,7 +1805,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
|
|
|
1805
1805
|
async function handleReadSection(projectPath, input) {
|
|
1806
1806
|
if (!input.session) return mcpError("Error: session is required for read_section action");
|
|
1807
1807
|
if (!input.section) return mcpError("Error: section is required for read_section action");
|
|
1808
|
-
const { readSessionSection } = await import("./dist-
|
|
1808
|
+
const { readSessionSection } = await import("./dist-HA6IIPRC.js");
|
|
1809
1809
|
const result = await readSessionSection(
|
|
1810
1810
|
projectPath,
|
|
1811
1811
|
input.session,
|
|
@@ -1815,13 +1815,13 @@ async function handleReadSection(projectPath, input) {
|
|
|
1815
1815
|
}
|
|
1816
1816
|
async function handleReadSections(projectPath, input) {
|
|
1817
1817
|
if (!input.session) return mcpError("Error: session is required for read_sections action");
|
|
1818
|
-
const { readSessionSections } = await import("./dist-
|
|
1818
|
+
const { readSessionSections } = await import("./dist-HA6IIPRC.js");
|
|
1819
1819
|
const result = await readSessionSections(projectPath, input.session);
|
|
1820
1820
|
return resultToMcpResponse(result);
|
|
1821
1821
|
}
|
|
1822
1822
|
async function handleArchiveSession(projectPath, input) {
|
|
1823
1823
|
if (!input.session) return mcpError("Error: session is required for archive_session action");
|
|
1824
|
-
const { archiveSession } = await import("./dist-
|
|
1824
|
+
const { archiveSession } = await import("./dist-HA6IIPRC.js");
|
|
1825
1825
|
const result = await archiveSession(projectPath, input.session);
|
|
1826
1826
|
if (!result.ok) return resultToMcpResponse(result);
|
|
1827
1827
|
await autoSyncRoadmap(projectPath);
|
|
@@ -1901,7 +1901,7 @@ var listStreamsDefinition = {
|
|
|
1901
1901
|
};
|
|
1902
1902
|
async function handleListStreams(input) {
|
|
1903
1903
|
try {
|
|
1904
|
-
const { listStreams, loadStreamIndex } = await import("./dist-
|
|
1904
|
+
const { listStreams, loadStreamIndex } = await import("./dist-HA6IIPRC.js");
|
|
1905
1905
|
const projectPath = sanitizePath(input.path);
|
|
1906
1906
|
const indexResult = await loadStreamIndex(projectPath);
|
|
1907
1907
|
const streamsResult = await listStreams(projectPath);
|
|
@@ -1939,7 +1939,7 @@ var checkPhaseGateDefinition = {
|
|
|
1939
1939
|
};
|
|
1940
1940
|
async function handleCheckPhaseGate(input) {
|
|
1941
1941
|
try {
|
|
1942
|
-
const { runCheckPhaseGate } = await import("./check-phase-gate-
|
|
1942
|
+
const { runCheckPhaseGate } = await import("./check-phase-gate-EWV5VYTG.js");
|
|
1943
1943
|
const result = await runCheckPhaseGate({ cwd: sanitizePath(input.path) });
|
|
1944
1944
|
if (result.ok) {
|
|
1945
1945
|
return { content: [{ type: "text", text: JSON.stringify(result.value) }] };
|
|
@@ -1995,7 +1995,7 @@ async function handleValidateCrossCheck(input) {
|
|
|
1995
1995
|
};
|
|
1996
1996
|
}
|
|
1997
1997
|
try {
|
|
1998
|
-
const { runCrossCheck } = await import("./validate-cross-check-
|
|
1998
|
+
const { runCrossCheck } = await import("./validate-cross-check-H3PSV4VY.js");
|
|
1999
1999
|
const specsDir = path11.resolve(projectPath, input.specsDir ?? "docs/specs");
|
|
2000
2000
|
if (!specsDir.startsWith(projectPath)) {
|
|
2001
2001
|
return {
|
|
@@ -2762,7 +2762,7 @@ async function handleGenerateSlashCommands(input) {
|
|
|
2762
2762
|
// src/mcp/resources/state.ts
|
|
2763
2763
|
async function getStateResource(projectRoot) {
|
|
2764
2764
|
try {
|
|
2765
|
-
const { loadState, migrateToStreams } = await import("./dist-
|
|
2765
|
+
const { loadState, migrateToStreams } = await import("./dist-HA6IIPRC.js");
|
|
2766
2766
|
await migrateToStreams(projectRoot);
|
|
2767
2767
|
const result = await loadState(projectRoot);
|
|
2768
2768
|
if (result.ok) {
|
|
@@ -2880,7 +2880,7 @@ async function handleQueryGraph(input) {
|
|
|
2880
2880
|
const projectPath = sanitizePath(input.path);
|
|
2881
2881
|
const store = await loadGraphStore(projectPath);
|
|
2882
2882
|
if (!store) return graphNotFoundError();
|
|
2883
|
-
const { ContextQL } = await import("./dist-
|
|
2883
|
+
const { ContextQL } = await import("./dist-QPWXPCPL.js");
|
|
2884
2884
|
const cql = new ContextQL(store);
|
|
2885
2885
|
const result = cql.execute({
|
|
2886
2886
|
rootNodeIds: input.rootNodeIds,
|
|
@@ -2962,7 +2962,7 @@ async function handleSearchSimilar(input) {
|
|
|
2962
2962
|
const projectPath = sanitizePath(input.path);
|
|
2963
2963
|
const store = await loadGraphStore(projectPath);
|
|
2964
2964
|
if (!store) return graphNotFoundError();
|
|
2965
|
-
const { FusionLayer } = await import("./dist-
|
|
2965
|
+
const { FusionLayer } = await import("./dist-QPWXPCPL.js");
|
|
2966
2966
|
const fusion = new FusionLayer(store);
|
|
2967
2967
|
const results = fusion.search(input.query, input.topK ?? 10);
|
|
2968
2968
|
if (input.mode === "summary") {
|
|
@@ -3017,7 +3017,7 @@ async function handleFindContextFor(input) {
|
|
|
3017
3017
|
const projectPath = sanitizePath(input.path);
|
|
3018
3018
|
const store = await loadGraphStore(projectPath);
|
|
3019
3019
|
if (!store) return graphNotFoundError();
|
|
3020
|
-
const { FusionLayer, ContextQL } = await import("./dist-
|
|
3020
|
+
const { FusionLayer, ContextQL } = await import("./dist-QPWXPCPL.js");
|
|
3021
3021
|
const fusion = new FusionLayer(store);
|
|
3022
3022
|
const cql = new ContextQL(store);
|
|
3023
3023
|
const tokenBudget = input.tokenBudget ?? 4e3;
|
|
@@ -3122,7 +3122,7 @@ async function handleGetRelationships(input) {
|
|
|
3122
3122
|
const projectPath = sanitizePath(input.path);
|
|
3123
3123
|
const store = await loadGraphStore(projectPath);
|
|
3124
3124
|
if (!store) return graphNotFoundError();
|
|
3125
|
-
const { ContextQL } = await import("./dist-
|
|
3125
|
+
const { ContextQL } = await import("./dist-QPWXPCPL.js");
|
|
3126
3126
|
const cql = new ContextQL(store);
|
|
3127
3127
|
const direction = input.direction ?? "both";
|
|
3128
3128
|
const bidirectional = direction === "both" || direction === "inbound";
|
|
@@ -3240,7 +3240,7 @@ async function handleGetImpact(input) {
|
|
|
3240
3240
|
const projectPath = sanitizePath(input.path);
|
|
3241
3241
|
const store = await loadGraphStore(projectPath);
|
|
3242
3242
|
if (!store) return graphNotFoundError();
|
|
3243
|
-
const { ContextQL } = await import("./dist-
|
|
3243
|
+
const { ContextQL } = await import("./dist-QPWXPCPL.js");
|
|
3244
3244
|
let targetNodeId = input.nodeId;
|
|
3245
3245
|
if (!targetNodeId && input.filePath) {
|
|
3246
3246
|
const fileNodes = store.findNodes({ type: "file" });
|
|
@@ -3372,7 +3372,7 @@ async function handleIngestSource(input) {
|
|
|
3372
3372
|
try {
|
|
3373
3373
|
const projectPath = sanitizePath(input.path);
|
|
3374
3374
|
const graphDir = path15.join(projectPath, ".harness", "graph");
|
|
3375
|
-
const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-
|
|
3375
|
+
const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-QPWXPCPL.js");
|
|
3376
3376
|
const fs17 = await import("fs/promises");
|
|
3377
3377
|
await fs17.mkdir(graphDir, { recursive: true });
|
|
3378
3378
|
const store = new GraphStore();
|
|
@@ -3396,13 +3396,13 @@ async function handleIngestSource(input) {
|
|
|
3396
3396
|
results.push(gitResult);
|
|
3397
3397
|
}
|
|
3398
3398
|
if (input.source === "business-signals" || input.source === "all") {
|
|
3399
|
-
const { createExtractionRunner } = await import("./dist-
|
|
3399
|
+
const { createExtractionRunner } = await import("./dist-QPWXPCPL.js");
|
|
3400
3400
|
const extractedDir = path15.join(projectPath, ".harness", "knowledge", "extracted");
|
|
3401
3401
|
const signalsResult = await createExtractionRunner().run(projectPath, store, extractedDir);
|
|
3402
3402
|
results.push(signalsResult);
|
|
3403
3403
|
}
|
|
3404
3404
|
if (input.source === "diagrams" || input.source === "all") {
|
|
3405
|
-
const { DiagramParser } = await import("./dist-
|
|
3405
|
+
const { DiagramParser } = await import("./dist-QPWXPCPL.js");
|
|
3406
3406
|
const diagramParser = new DiagramParser(store);
|
|
3407
3407
|
const diagramResult = await diagramParser.ingest(projectPath);
|
|
3408
3408
|
results.push(diagramResult);
|
|
@@ -3468,7 +3468,7 @@ async function handleDetectAnomalies(input) {
|
|
|
3468
3468
|
const projectPath = sanitizePath(input.path);
|
|
3469
3469
|
const store = await loadGraphStore(projectPath);
|
|
3470
3470
|
if (!store) return graphNotFoundError();
|
|
3471
|
-
const { GraphAnomalyAdapter } = await import("./dist-
|
|
3471
|
+
const { GraphAnomalyAdapter } = await import("./dist-QPWXPCPL.js");
|
|
3472
3472
|
const adapter = new GraphAnomalyAdapter(store);
|
|
3473
3473
|
const report = adapter.detect({
|
|
3474
3474
|
...input.threshold !== void 0 && { threshold: input.threshold },
|
|
@@ -3517,7 +3517,7 @@ async function handleAskGraph(input) {
|
|
|
3517
3517
|
const projectPath = sanitizePath(input.path);
|
|
3518
3518
|
const store = await loadGraphStore(projectPath);
|
|
3519
3519
|
if (!store) return graphNotFoundError();
|
|
3520
|
-
const { askGraph } = await import("./dist-
|
|
3520
|
+
const { askGraph } = await import("./dist-QPWXPCPL.js");
|
|
3521
3521
|
const result = await askGraph(store, input.question);
|
|
3522
3522
|
return {
|
|
3523
3523
|
content: [{ type: "text", text: JSON.stringify(result) }]
|
|
@@ -3581,7 +3581,7 @@ async function handleComputeBlastRadius(input) {
|
|
|
3581
3581
|
const projectPath = sanitizePath(input.path);
|
|
3582
3582
|
const store = await loadGraphStore(projectPath);
|
|
3583
3583
|
if (!store) return graphNotFoundError();
|
|
3584
|
-
const { CascadeSimulator } = await import("./dist-
|
|
3584
|
+
const { CascadeSimulator } = await import("./dist-QPWXPCPL.js");
|
|
3585
3585
|
let targetNodeId = input.nodeId;
|
|
3586
3586
|
if (!targetNodeId && input.file) {
|
|
3587
3587
|
const fileNodes = store.findNodes({ type: "file" });
|
|
@@ -3782,7 +3782,7 @@ var generateAgentDefinitionsDefinition = {
|
|
|
3782
3782
|
}
|
|
3783
3783
|
};
|
|
3784
3784
|
async function handleGenerateAgentDefinitions(input) {
|
|
3785
|
-
const { generateAgentDefinitions } = await import("./generate-agent-definitions-
|
|
3785
|
+
const { generateAgentDefinitions } = await import("./generate-agent-definitions-UM7T3WLA.js");
|
|
3786
3786
|
const platforms = input.platform === "all" || !input.platform ? ["claude-code", "gemini-cli"] : [input.platform];
|
|
3787
3787
|
const results = generateAgentDefinitions({
|
|
3788
3788
|
platforms: [...platforms],
|
|
@@ -4276,8 +4276,8 @@ async function handleManageRoadmap(input) {
|
|
|
4276
4276
|
return handleManageRoadmapFileLess(input, clientResult.value);
|
|
4277
4277
|
}
|
|
4278
4278
|
try {
|
|
4279
|
-
const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, assignFeature } = await import("./dist-
|
|
4280
|
-
const { Ok: Ok2 } = await import("./dist-
|
|
4279
|
+
const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, assignFeature } = await import("./dist-HA6IIPRC.js");
|
|
4280
|
+
const { Ok: Ok2 } = await import("./dist-O733ZU6I.js");
|
|
4281
4281
|
const projectPath = projectPathPre;
|
|
4282
4282
|
const deps = {
|
|
4283
4283
|
parseRoadmap,
|
|
@@ -4715,7 +4715,7 @@ async function handleTransition(validInput, projectPath, id) {
|
|
|
4715
4715
|
const transition = transitionResult.data;
|
|
4716
4716
|
const prompt = renderTransition(transition);
|
|
4717
4717
|
try {
|
|
4718
|
-
const { saveHandoff } = await import("./dist-
|
|
4718
|
+
const { saveHandoff } = await import("./dist-HA6IIPRC.js");
|
|
4719
4719
|
await saveHandoff(
|
|
4720
4720
|
projectPath,
|
|
4721
4721
|
{
|
|
@@ -4796,7 +4796,7 @@ async function handleEmitInteraction(input) {
|
|
|
4796
4796
|
}
|
|
4797
4797
|
async function recordInteraction(projectPath, id, type, decision, stream) {
|
|
4798
4798
|
try {
|
|
4799
|
-
const { loadState, saveState } = await import("./dist-
|
|
4799
|
+
const { loadState, saveState } = await import("./dist-HA6IIPRC.js");
|
|
4800
4800
|
const stateResult = await loadState(projectPath, stream);
|
|
4801
4801
|
if (stateResult.ok) {
|
|
4802
4802
|
const state = stateResult.value;
|
|
@@ -4957,10 +4957,10 @@ async function handleGatherContext(input) {
|
|
|
4957
4957
|
input.include ?? ["state", "learnings", "handoff", "graph", "validation", "businessKnowledge"]
|
|
4958
4958
|
);
|
|
4959
4959
|
const errors = [];
|
|
4960
|
-
const statePromise = includeSet.has("state") ? import("./dist-
|
|
4960
|
+
const statePromise = includeSet.has("state") ? import("./dist-HA6IIPRC.js").then(
|
|
4961
4961
|
(core) => core.loadState(projectPath, void 0, input.session)
|
|
4962
4962
|
) : Promise.resolve(null);
|
|
4963
|
-
const learningsPromise = includeSet.has("learnings") ? import("./dist-
|
|
4963
|
+
const learningsPromise = includeSet.has("learnings") ? import("./dist-HA6IIPRC.js").then(
|
|
4964
4964
|
(core) => core.loadBudgetedLearnings(projectPath, {
|
|
4965
4965
|
intent: input.intent,
|
|
4966
4966
|
tokenBudget: input.learningsBudget ?? 1e3,
|
|
@@ -4969,14 +4969,14 @@ async function handleGatherContext(input) {
|
|
|
4969
4969
|
...input.depth !== void 0 && { depth: input.depth }
|
|
4970
4970
|
})
|
|
4971
4971
|
) : Promise.resolve(null);
|
|
4972
|
-
const handoffPromise = includeSet.has("handoff") ? import("./dist-
|
|
4972
|
+
const handoffPromise = includeSet.has("handoff") ? import("./dist-HA6IIPRC.js").then(
|
|
4973
4973
|
(core) => core.loadHandoff(projectPath, void 0, input.session)
|
|
4974
4974
|
) : Promise.resolve(null);
|
|
4975
4975
|
const graphPromise = includeSet.has("graph") ? (async () => {
|
|
4976
|
-
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-
|
|
4976
|
+
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-EQBOIHFZ.js");
|
|
4977
4977
|
const store = await loadGraphStore2(projectPath);
|
|
4978
4978
|
if (!store) return null;
|
|
4979
|
-
const { FusionLayer, ContextQL } = await import("./dist-
|
|
4979
|
+
const { FusionLayer, ContextQL } = await import("./dist-QPWXPCPL.js");
|
|
4980
4980
|
const fusion = new FusionLayer(store);
|
|
4981
4981
|
const cql = new ContextQL(store);
|
|
4982
4982
|
const tokenBudget = input.tokenBudget ?? 4e3;
|
|
@@ -5013,11 +5013,11 @@ async function handleGatherContext(input) {
|
|
|
5013
5013
|
context: contextBlocks
|
|
5014
5014
|
};
|
|
5015
5015
|
})() : Promise.resolve(null);
|
|
5016
|
-
const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-
|
|
5016
|
+
const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-HA6IIPRC.js").then(
|
|
5017
5017
|
(core) => core.readSessionSections(projectPath, input.session)
|
|
5018
5018
|
) : Promise.resolve(null);
|
|
5019
5019
|
const shouldIncludeEvents = input.includeEvents !== void 0 ? input.includeEvents : includeSet.has("events") || !!input.session && !input.include;
|
|
5020
|
-
const eventsPromise = shouldIncludeEvents ? import("./dist-
|
|
5020
|
+
const eventsPromise = shouldIncludeEvents ? import("./dist-HA6IIPRC.js").then(async (core) => {
|
|
5021
5021
|
const result = await core.loadEvents(projectPath, {
|
|
5022
5022
|
session: input.session
|
|
5023
5023
|
});
|
|
@@ -5025,7 +5025,7 @@ async function handleGatherContext(input) {
|
|
|
5025
5025
|
return core.formatEventTimeline(result.value);
|
|
5026
5026
|
}) : Promise.resolve(null);
|
|
5027
5027
|
const validationPromise = includeSet.has("validation") ? (async () => {
|
|
5028
|
-
const { handleValidateProject: handleValidateProject2 } = await import("./validate-
|
|
5028
|
+
const { handleValidateProject: handleValidateProject2 } = await import("./validate-55HGQKWR.js");
|
|
5029
5029
|
const result = await handleValidateProject2({ path: projectPath });
|
|
5030
5030
|
const first = result.content[0];
|
|
5031
5031
|
return first ? JSON.parse(first.text) : null;
|
|
@@ -5128,7 +5128,7 @@ async function handleGatherContext(input) {
|
|
|
5128
5128
|
};
|
|
5129
5129
|
if (input.session) {
|
|
5130
5130
|
try {
|
|
5131
|
-
const core = await import("./dist-
|
|
5131
|
+
const core = await import("./dist-HA6IIPRC.js");
|
|
5132
5132
|
core.updateSessionIndex(
|
|
5133
5133
|
projectPath,
|
|
5134
5134
|
input.session,
|
|
@@ -5280,7 +5280,7 @@ async function handleReviewChanges(input) {
|
|
|
5280
5280
|
}
|
|
5281
5281
|
}
|
|
5282
5282
|
async function runQuickReview(projectPath, diff, diffLines, downgraded, offset, limit) {
|
|
5283
|
-
const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-
|
|
5283
|
+
const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-22I4HHXM.js");
|
|
5284
5284
|
const result = await handleAnalyzeDiff2({ diff, path: projectPath });
|
|
5285
5285
|
const firstContent = result.content[0];
|
|
5286
5286
|
if (!firstContent) throw new Error("Empty analyze_diff response");
|
|
@@ -5315,7 +5315,7 @@ function extractFileCount(diffParsed) {
|
|
|
5315
5315
|
return files?.length ?? 0;
|
|
5316
5316
|
}
|
|
5317
5317
|
async function runStandardReview(projectPath, diff, diffLines, downgraded, offset, limit) {
|
|
5318
|
-
const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-
|
|
5318
|
+
const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-22I4HHXM.js");
|
|
5319
5319
|
const [diffResult, reviewResult] = await Promise.all([
|
|
5320
5320
|
handleAnalyzeDiff2({ diff, path: projectPath }),
|
|
5321
5321
|
handleCreateSelfReview2({ path: projectPath, diff })
|
|
@@ -5350,7 +5350,7 @@ async function runStandardReview(projectPath, diff, diffLines, downgraded, offse
|
|
|
5350
5350
|
};
|
|
5351
5351
|
}
|
|
5352
5352
|
async function runDeepReview(projectPath, diff, diffLines, _downgraded, offset, limit) {
|
|
5353
|
-
const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-
|
|
5353
|
+
const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-JYSVCNGJ.js");
|
|
5354
5354
|
const result = await handleRunCodeReview2({
|
|
5355
5355
|
path: projectPath,
|
|
5356
5356
|
diff,
|
|
@@ -5429,7 +5429,7 @@ async function handleCheckTaskIndependence(input) {
|
|
|
5429
5429
|
try {
|
|
5430
5430
|
const projectPath = sanitizePath(input.path);
|
|
5431
5431
|
const store = await loadGraphStore(projectPath);
|
|
5432
|
-
const { TaskIndependenceAnalyzer } = await import("./dist-
|
|
5432
|
+
const { TaskIndependenceAnalyzer } = await import("./dist-QPWXPCPL.js");
|
|
5433
5433
|
const analyzer = new TaskIndependenceAnalyzer(store ?? void 0);
|
|
5434
5434
|
const result = analyzer.analyze({
|
|
5435
5435
|
tasks: input.tasks,
|
|
@@ -5517,7 +5517,7 @@ async function handlePredictConflicts(input) {
|
|
|
5517
5517
|
try {
|
|
5518
5518
|
const projectPath = sanitizePath(input.path);
|
|
5519
5519
|
const store = await loadGraphStore(projectPath);
|
|
5520
|
-
const { ConflictPredictor } = await import("./dist-
|
|
5520
|
+
const { ConflictPredictor } = await import("./dist-QPWXPCPL.js");
|
|
5521
5521
|
const predictor = new ConflictPredictor(store ?? void 0);
|
|
5522
5522
|
const result = predictor.predict({
|
|
5523
5523
|
tasks: input.tasks,
|
|
@@ -5623,7 +5623,7 @@ async function handleDetectStaleConstraints(input) {
|
|
|
5623
5623
|
isError: true
|
|
5624
5624
|
};
|
|
5625
5625
|
}
|
|
5626
|
-
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-
|
|
5626
|
+
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-EQBOIHFZ.js");
|
|
5627
5627
|
const store = await loadGraphStore2(projectPath);
|
|
5628
5628
|
if (!store) {
|
|
5629
5629
|
return {
|
|
@@ -5644,7 +5644,7 @@ async function handleDetectStaleConstraints(input) {
|
|
|
5644
5644
|
]
|
|
5645
5645
|
};
|
|
5646
5646
|
}
|
|
5647
|
-
const { detectStaleConstraints } = await import("./dist-
|
|
5647
|
+
const { detectStaleConstraints } = await import("./dist-HA6IIPRC.js");
|
|
5648
5648
|
const result = detectStaleConstraints(
|
|
5649
5649
|
store,
|
|
5650
5650
|
windowDays,
|
|
@@ -5764,10 +5764,10 @@ function countCriticalFindings(securityData) {
|
|
|
5764
5764
|
return findings.filter((f) => f.severity === "error").length;
|
|
5765
5765
|
}
|
|
5766
5766
|
async function runHealthChecks(projectPath) {
|
|
5767
|
-
const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-
|
|
5768
|
-
const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-
|
|
5769
|
-
const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-
|
|
5770
|
-
const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-
|
|
5767
|
+
const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-KZWFQEJE.js");
|
|
5768
|
+
const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-3ZSN5RDQ.js");
|
|
5769
|
+
const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-V6M4KJDC.js");
|
|
5770
|
+
const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-WOVOBLCI.js");
|
|
5771
5771
|
const [assessResult, depsResult, entropyResult, securityResult] = await Promise.all([
|
|
5772
5772
|
handleAssessProject2({
|
|
5773
5773
|
path: projectPath,
|
|
@@ -5822,10 +5822,10 @@ function avg(values) {
|
|
|
5822
5822
|
}
|
|
5823
5823
|
async function runGraphMetrics(projectPath) {
|
|
5824
5824
|
try {
|
|
5825
|
-
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-
|
|
5825
|
+
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-EQBOIHFZ.js");
|
|
5826
5826
|
const store = await loadGraphStore2(projectPath);
|
|
5827
5827
|
if (!store) return ZERO_METRICS;
|
|
5828
|
-
const { GraphCouplingAdapter, GraphComplexityAdapter, GraphAnomalyAdapter } = await import("./dist-
|
|
5828
|
+
const { GraphCouplingAdapter, GraphComplexityAdapter, GraphAnomalyAdapter } = await import("./dist-QPWXPCPL.js");
|
|
5829
5829
|
const couplingAdapter = new GraphCouplingAdapter(store);
|
|
5830
5830
|
const couplingData = couplingAdapter.computeCouplingData();
|
|
5831
5831
|
const files = couplingData.files;
|
|
@@ -6608,7 +6608,7 @@ async function handleGetDecayTrends(input) {
|
|
|
6608
6608
|
};
|
|
6609
6609
|
}
|
|
6610
6610
|
try {
|
|
6611
|
-
const core = await import("./dist-
|
|
6611
|
+
const core = await import("./dist-HA6IIPRC.js");
|
|
6612
6612
|
const { TimelineManager } = core;
|
|
6613
6613
|
const manager = new TimelineManager(projectPath);
|
|
6614
6614
|
const timeline = manager.load();
|
|
@@ -6743,7 +6743,7 @@ async function handleCodeOutline(input) {
|
|
|
6743
6743
|
};
|
|
6744
6744
|
}
|
|
6745
6745
|
try {
|
|
6746
|
-
const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-
|
|
6746
|
+
const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-HA6IIPRC.js");
|
|
6747
6747
|
const { stat } = await import("fs/promises");
|
|
6748
6748
|
const stats = await stat(targetPath).catch(() => null);
|
|
6749
6749
|
if (stats?.isFile()) {
|
|
@@ -6762,7 +6762,7 @@ async function handleCodeOutline(input) {
|
|
|
6762
6762
|
})
|
|
6763
6763
|
);
|
|
6764
6764
|
fileStats.sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
6765
|
-
const { paginate: paginate2 } = await import("./dist-
|
|
6765
|
+
const { paginate: paginate2 } = await import("./dist-HA6IIPRC.js");
|
|
6766
6766
|
const paged = paginate2(fileStats, input.offset ?? 0, input.limit ?? 30);
|
|
6767
6767
|
const results = [];
|
|
6768
6768
|
for (const entry of paged.items) {
|
|
@@ -6835,7 +6835,7 @@ async function handleCodeSearch(input) {
|
|
|
6835
6835
|
};
|
|
6836
6836
|
}
|
|
6837
6837
|
try {
|
|
6838
|
-
const { searchSymbols } = await import("./dist-
|
|
6838
|
+
const { searchSymbols } = await import("./dist-HA6IIPRC.js");
|
|
6839
6839
|
const result = await searchSymbols(input.query, directory, input.glob);
|
|
6840
6840
|
const lines = [`Search: "${result.query}" \u2014 ${result.matches.length} matches`];
|
|
6841
6841
|
for (const match of result.matches) {
|
|
@@ -6904,7 +6904,7 @@ async function handleCodeUnfold(input) {
|
|
|
6904
6904
|
}
|
|
6905
6905
|
try {
|
|
6906
6906
|
if (input.symbol) {
|
|
6907
|
-
const { unfoldSymbol } = await import("./dist-
|
|
6907
|
+
const { unfoldSymbol } = await import("./dist-HA6IIPRC.js");
|
|
6908
6908
|
const result = await unfoldSymbol(filePath, input.symbol);
|
|
6909
6909
|
const header = result.warning ? `${result.file}:${result.startLine}-${result.endLine} ${result.warning}
|
|
6910
6910
|
` : `${result.file}:${result.startLine}-${result.endLine}
|
|
@@ -6912,7 +6912,7 @@ async function handleCodeUnfold(input) {
|
|
|
6912
6912
|
return { content: [{ type: "text", text: header + result.content }] };
|
|
6913
6913
|
}
|
|
6914
6914
|
if (input.startLine != null && input.endLine != null) {
|
|
6915
|
-
const { unfoldRange } = await import("./dist-
|
|
6915
|
+
const { unfoldRange } = await import("./dist-HA6IIPRC.js");
|
|
6916
6916
|
const result = await unfoldRange(filePath, input.startLine, input.endLine);
|
|
6917
6917
|
const header = `${result.file}:${result.startLine}-${result.endLine}
|
|
6918
6918
|
`;
|
|
@@ -6974,7 +6974,7 @@ async function handleCheckTraceability(input) {
|
|
|
6974
6974
|
isError: true
|
|
6975
6975
|
};
|
|
6976
6976
|
}
|
|
6977
|
-
const { queryTraceability } = await import("./dist-
|
|
6977
|
+
const { queryTraceability } = await import("./dist-QPWXPCPL.js");
|
|
6978
6978
|
const options = {};
|
|
6979
6979
|
if (input.spec) options.specPath = input.spec;
|
|
6980
6980
|
if (input.feature) options.featureName = input.feature;
|
|
@@ -7097,7 +7097,7 @@ async function handlePredictFailures(input) {
|
|
|
7097
7097
|
};
|
|
7098
7098
|
}
|
|
7099
7099
|
try {
|
|
7100
|
-
const core = await import("./dist-
|
|
7100
|
+
const core = await import("./dist-HA6IIPRC.js");
|
|
7101
7101
|
const { TimelineManager, PredictionEngine, SpecImpactEstimator } = core;
|
|
7102
7102
|
const manager = new TimelineManager(projectPath);
|
|
7103
7103
|
const includeRoadmap = input.includeRoadmap !== false;
|
|
@@ -7980,7 +7980,7 @@ function handleContentMode(content, pipeline, budget, source) {
|
|
|
7980
7980
|
};
|
|
7981
7981
|
}
|
|
7982
7982
|
async function handleIntentMode(projectPath, intent, pipeline, budget, filterContent) {
|
|
7983
|
-
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-
|
|
7983
|
+
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-EQBOIHFZ.js");
|
|
7984
7984
|
const store = await loadGraphStore2(projectPath);
|
|
7985
7985
|
if (!store) {
|
|
7986
7986
|
return {
|
|
@@ -7993,7 +7993,7 @@ async function handleIntentMode(projectPath, intent, pipeline, budget, filterCon
|
|
|
7993
7993
|
isError: true
|
|
7994
7994
|
};
|
|
7995
7995
|
}
|
|
7996
|
-
const { PackedSummaryCache, FusionLayer, ContextQL } = await import("./dist-
|
|
7996
|
+
const { PackedSummaryCache, FusionLayer, ContextQL } = await import("./dist-QPWXPCPL.js");
|
|
7997
7997
|
const cache = new PackedSummaryCache(store);
|
|
7998
7998
|
const cachedEnvelope = cache.get(intent);
|
|
7999
7999
|
if (cachedEnvelope) {
|
|
@@ -8206,7 +8206,7 @@ async function handleDetectConstraintEmergence(input) {
|
|
|
8206
8206
|
}
|
|
8207
8207
|
const nodePath = await import("path");
|
|
8208
8208
|
const historyPath = nodePath.resolve(projectPath, ".harness/arch/violation-history.json");
|
|
8209
|
-
const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-
|
|
8209
|
+
const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-HA6IIPRC.js");
|
|
8210
8210
|
const manager = new ViolationHistoryManager(historyPath);
|
|
8211
8211
|
const history = manager.load();
|
|
8212
8212
|
const options = { windowWeeks, minOccurrences };
|
|
@@ -8294,7 +8294,7 @@ async function handleRunCIChecks(input) {
|
|
|
8294
8294
|
};
|
|
8295
8295
|
}
|
|
8296
8296
|
try {
|
|
8297
|
-
const { runCIChecks } = await import("./dist-
|
|
8297
|
+
const { runCIChecks } = await import("./dist-HA6IIPRC.js");
|
|
8298
8298
|
const skip = input.checks ? VALID_CHECKS.filter((c) => !input.checks.includes(c)) : [];
|
|
8299
8299
|
const result = await runCIChecks({
|
|
8300
8300
|
projectRoot: projectPath,
|
|
@@ -8356,7 +8356,7 @@ async function handleGenerateBlueprint(input) {
|
|
|
8356
8356
|
};
|
|
8357
8357
|
}
|
|
8358
8358
|
try {
|
|
8359
|
-
const { ProjectScanner } = await import("./dist-
|
|
8359
|
+
const { ProjectScanner } = await import("./dist-HA6IIPRC.js");
|
|
8360
8360
|
const scanner = new ProjectScanner(projectPath);
|
|
8361
8361
|
const data = await scanner.scan();
|
|
8362
8362
|
return {
|
|
@@ -8375,6 +8375,109 @@ async function handleGenerateBlueprint(input) {
|
|
|
8375
8375
|
}
|
|
8376
8376
|
}
|
|
8377
8377
|
|
|
8378
|
+
// src/mcp/tools/gateway-tools.ts
|
|
8379
|
+
function orchestratorBase() {
|
|
8380
|
+
return process.env["HARNESS_ORCHESTRATOR_URL"] ?? "http://127.0.0.1:8080";
|
|
8381
|
+
}
|
|
8382
|
+
function authHeader() {
|
|
8383
|
+
const tok = process.env["HARNESS_API_TOKEN"];
|
|
8384
|
+
return tok ? { Authorization: `Bearer ${tok}` } : {};
|
|
8385
|
+
}
|
|
8386
|
+
var triggerMaintenanceJobDefinition = {
|
|
8387
|
+
name: "trigger_maintenance_job",
|
|
8388
|
+
description: "Trigger a maintenance task ad-hoc via POST /api/v1/jobs/maintenance. Requires trigger-job scope.",
|
|
8389
|
+
inputSchema: {
|
|
8390
|
+
type: "object",
|
|
8391
|
+
properties: {
|
|
8392
|
+
taskId: {
|
|
8393
|
+
type: "string",
|
|
8394
|
+
description: "Registered maintenance task identifier (e.g. cleanup-sessions)"
|
|
8395
|
+
},
|
|
8396
|
+
params: {
|
|
8397
|
+
type: "object",
|
|
8398
|
+
description: "Optional task-specific parameters",
|
|
8399
|
+
additionalProperties: true
|
|
8400
|
+
}
|
|
8401
|
+
},
|
|
8402
|
+
required: ["taskId"]
|
|
8403
|
+
}
|
|
8404
|
+
};
|
|
8405
|
+
async function handleTriggerMaintenanceJob(input) {
|
|
8406
|
+
const body = { taskId: input.taskId };
|
|
8407
|
+
if (input.params !== void 0) body["params"] = input.params;
|
|
8408
|
+
const res = await fetch(`${orchestratorBase()}/api/v1/jobs/maintenance`, {
|
|
8409
|
+
method: "POST",
|
|
8410
|
+
headers: { "Content-Type": "application/json", ...authHeader() },
|
|
8411
|
+
body: JSON.stringify(body)
|
|
8412
|
+
});
|
|
8413
|
+
const text = await res.text();
|
|
8414
|
+
if (!res.ok) {
|
|
8415
|
+
return {
|
|
8416
|
+
content: [{ type: "text", text: `Trigger failed (${res.status}): ${text}` }],
|
|
8417
|
+
isError: true
|
|
8418
|
+
};
|
|
8419
|
+
}
|
|
8420
|
+
return { content: [{ type: "text", text }] };
|
|
8421
|
+
}
|
|
8422
|
+
var listGatewayTokensDefinition = {
|
|
8423
|
+
name: "list_gateway_tokens",
|
|
8424
|
+
description: "List Gateway API tokens via GET /api/v1/auth/tokens. Secrets are redacted. Requires admin scope.",
|
|
8425
|
+
inputSchema: { type: "object", properties: {}, additionalProperties: false }
|
|
8426
|
+
};
|
|
8427
|
+
async function handleListGatewayTokens() {
|
|
8428
|
+
const res = await fetch(`${orchestratorBase()}/api/v1/auth/tokens`, {
|
|
8429
|
+
headers: { ...authHeader() }
|
|
8430
|
+
});
|
|
8431
|
+
const text = await res.text();
|
|
8432
|
+
if (!res.ok) {
|
|
8433
|
+
return {
|
|
8434
|
+
content: [{ type: "text", text: `List failed (${res.status}): ${text}` }],
|
|
8435
|
+
isError: true
|
|
8436
|
+
};
|
|
8437
|
+
}
|
|
8438
|
+
return { content: [{ type: "text", text }] };
|
|
8439
|
+
}
|
|
8440
|
+
|
|
8441
|
+
// src/mcp/tools/webhook-tools.ts
|
|
8442
|
+
function orchestratorBase2() {
|
|
8443
|
+
return process.env["HARNESS_ORCHESTRATOR_URL"] ?? "http://127.0.0.1:8080";
|
|
8444
|
+
}
|
|
8445
|
+
function authHeader2() {
|
|
8446
|
+
const tok = process.env["HARNESS_API_TOKEN"];
|
|
8447
|
+
return tok ? { Authorization: `Bearer ${tok}` } : {};
|
|
8448
|
+
}
|
|
8449
|
+
var subscribeWebhookDefinition = {
|
|
8450
|
+
name: "subscribe_webhook",
|
|
8451
|
+
description: "Subscribe to outbound webhook fan-out via POST /api/v1/webhooks. Returns the secret once. Requires subscribe-webhook scope.",
|
|
8452
|
+
inputSchema: {
|
|
8453
|
+
type: "object",
|
|
8454
|
+
properties: {
|
|
8455
|
+
url: { type: "string", description: "https URL to POST events to" },
|
|
8456
|
+
events: {
|
|
8457
|
+
type: "array",
|
|
8458
|
+
items: { type: "string" },
|
|
8459
|
+
description: 'Event-type globs (e.g. ["maintenance.completed", "interaction.*"])'
|
|
8460
|
+
}
|
|
8461
|
+
},
|
|
8462
|
+
required: ["url", "events"]
|
|
8463
|
+
}
|
|
8464
|
+
};
|
|
8465
|
+
async function handleSubscribeWebhook(input) {
|
|
8466
|
+
const res = await fetch(`${orchestratorBase2()}/api/v1/webhooks`, {
|
|
8467
|
+
method: "POST",
|
|
8468
|
+
headers: { "Content-Type": "application/json", ...authHeader2() },
|
|
8469
|
+
body: JSON.stringify({ url: input.url, events: input.events })
|
|
8470
|
+
});
|
|
8471
|
+
const text = await res.text();
|
|
8472
|
+
if (!res.ok) {
|
|
8473
|
+
return {
|
|
8474
|
+
content: [{ type: "text", text: `Subscribe failed (${res.status}): ${text}` }],
|
|
8475
|
+
isError: true
|
|
8476
|
+
};
|
|
8477
|
+
}
|
|
8478
|
+
return { content: [{ type: "text", text }] };
|
|
8479
|
+
}
|
|
8480
|
+
|
|
8378
8481
|
// src/mcp/server.ts
|
|
8379
8482
|
var TOOL_DEFINITIONS = [
|
|
8380
8483
|
validateToolDefinition,
|
|
@@ -8437,7 +8540,10 @@ var TOOL_DEFINITIONS = [
|
|
|
8437
8540
|
compactToolDefinition,
|
|
8438
8541
|
detectConstraintEmergenceDefinition,
|
|
8439
8542
|
runCIChecksDefinition,
|
|
8440
|
-
generateBlueprintDefinition
|
|
8543
|
+
generateBlueprintDefinition,
|
|
8544
|
+
triggerMaintenanceJobDefinition,
|
|
8545
|
+
listGatewayTokensDefinition,
|
|
8546
|
+
subscribeWebhookDefinition
|
|
8441
8547
|
].map((def) => ({ ...def, trustedOutput: true }));
|
|
8442
8548
|
var TOOL_HANDLERS = {
|
|
8443
8549
|
validate_project: handleValidateProject,
|
|
@@ -8500,7 +8606,10 @@ var TOOL_HANDLERS = {
|
|
|
8500
8606
|
compact: handleCompact,
|
|
8501
8607
|
detect_constraint_emergence: handleDetectConstraintEmergence,
|
|
8502
8608
|
run_ci_checks: handleRunCIChecks,
|
|
8503
|
-
generate_blueprint: handleGenerateBlueprint
|
|
8609
|
+
generate_blueprint: handleGenerateBlueprint,
|
|
8610
|
+
trigger_maintenance_job: handleTriggerMaintenanceJob,
|
|
8611
|
+
list_gateway_tokens: handleListGatewayTokens,
|
|
8612
|
+
subscribe_webhook: handleSubscribeWebhook
|
|
8504
8613
|
};
|
|
8505
8614
|
var RESOURCE_DEFINITIONS = [
|
|
8506
8615
|
{
|
|
@@ -8602,7 +8711,7 @@ async function appendUpdateNotification(result, resolvedRoot) {
|
|
|
8602
8711
|
shouldRunCheck,
|
|
8603
8712
|
readCheckState,
|
|
8604
8713
|
spawnBackgroundCheck
|
|
8605
|
-
} = await import("./dist-
|
|
8714
|
+
} = await import("./dist-HA6IIPRC.js");
|
|
8606
8715
|
const { CLI_VERSION } = await import("./version-CUI434OP.js");
|
|
8607
8716
|
const configInterval = readConfigInterval(resolvedRoot);
|
|
8608
8717
|
const DEFAULT_INTERVAL = 864e5;
|
|
@@ -8665,7 +8774,7 @@ function createHarnessServer(projectRoot, toolFilter) {
|
|
|
8665
8774
|
});
|
|
8666
8775
|
const compactedHandlers = applyCompaction(guardedHandlers);
|
|
8667
8776
|
const server = new Server(
|
|
8668
|
-
{ name: "harness-engineering", version: "
|
|
8777
|
+
{ name: "harness-engineering", version: "2.3.1" },
|
|
8669
8778
|
{ capabilities: { tools: {}, resources: {} } }
|
|
8670
8779
|
);
|
|
8671
8780
|
const sessionChecked = { value: false };
|