@harness-engineering/cli 4.0.0 → 4.0.1
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/product-advisor/SKILL.md +202 -0
- package/dist/agents/skills/claude-code/product-advisor/skill.yaml +74 -0
- package/dist/agents/skills/codex/product-advisor/SKILL.md +202 -0
- package/dist/agents/skills/codex/product-advisor/skill.yaml +74 -0
- package/dist/agents/skills/cursor/product-advisor/SKILL.md +202 -0
- package/dist/agents/skills/cursor/product-advisor/skill.yaml +74 -0
- package/dist/agents/skills/gemini-cli/product-advisor/SKILL.md +202 -0
- package/dist/agents/skills/gemini-cli/product-advisor/skill.yaml +74 -0
- package/dist/{agents-md-7OSNWU52.js → agents-md-VJLYEH2S.js} +4 -4
- package/dist/{analyzer-V633GUHY-MBCQWKDU.js → analyzer-V633GUHY-OV335HGM.js} +2 -2
- package/dist/{architecture-2XYGJGT3.js → architecture-YQH2NYXY.js} +5 -5
- package/dist/{assess-project-3KPP2D6M.js → assess-project-KOTAPAHD.js} +1 -1
- package/dist/bin/harness-mcp.js +16 -16
- package/dist/bin/harness.js +27 -27
- package/dist/{check-phase-gate-46U5AAXE.js → check-phase-gate-CHU2E3OU.js} +5 -5
- package/dist/{chunk-AK67S3O4.js → chunk-36GQREOE.js} +3 -3
- package/dist/{chunk-CLI4K2CH.js → chunk-4U5LDFCY.js} +1 -1
- package/dist/{chunk-VTUINXWR.js → chunk-4VXFZSYF.js} +1 -1
- package/dist/{chunk-HXMAIVV2.js → chunk-5RSXUAMN.js} +1 -1
- package/dist/{chunk-TTWNGOBT.js → chunk-6SCYTIF4.js} +6 -6
- package/dist/{chunk-N55WOGN3.js → chunk-6YFHUIGT.js} +1 -1
- package/dist/{chunk-WL3O2PKJ.js → chunk-7PJCK7UE.js} +8 -8
- package/dist/{chunk-PHX45JYN.js → chunk-7TIJXWG3.js} +2 -2
- package/dist/{chunk-SPE7P4GL.js → chunk-AAUY53CC.js} +1 -1
- package/dist/{chunk-VTU3QOJT.js → chunk-AX5KGRM6.js} +1 -1
- package/dist/{chunk-MYVTYFQD.js → chunk-E5EW5HVJ.js} +1 -1
- package/dist/{chunk-HMW3C5DP.js → chunk-EYMOPFSD.js} +2 -2
- package/dist/{chunk-6YXCZV33.js → chunk-GHBFNLV2.js} +278 -211
- package/dist/{chunk-363V6GPR.js → chunk-I3CGCZJF.js} +9 -9
- package/dist/{chunk-MSBJ445U.js → chunk-JPVOI7GP.js} +5 -5
- package/dist/{chunk-6NCREWWM.js → chunk-M7F2PPN3.js} +3 -3
- package/dist/{chunk-KLPX55TI.js → chunk-MMLQPHZ5.js} +210 -135
- package/dist/{chunk-BV45354Q.js → chunk-OQ6KOQEV.js} +9 -9
- package/dist/{chunk-ERILXQBP.js → chunk-RG3TNIUB.js} +610 -428
- package/dist/{chunk-GXCPDAS5.js → chunk-SDMV4QHM.js} +5 -5
- package/dist/{chunk-ZEYAOYJL.js → chunk-SEA2PFVI.js} +1 -1
- package/dist/{chunk-IYWT3JJW.js → chunk-T746REAE.js} +1 -1
- package/dist/{chunk-FZ4Q73HA.js → chunk-UWVMJEUJ.js} +1 -1
- package/dist/{chunk-PP6ZRL5T.js → chunk-WZJR6SOI.js} +536 -422
- package/dist/{chunk-XFHZ7GCI.js → chunk-XAVMTAUT.js} +2 -2
- package/dist/{chunk-S2RQPPL6.js → chunk-YANR2RL7.js} +1 -1
- package/dist/{chunk-2N4OENGE.js → chunk-YYFSFSB3.js} +1 -1
- package/dist/{ci-workflow-XJN4UO3Q.js → ci-workflow-HO4WKGNG.js} +4 -4
- package/dist/{dist-IPVFYGY2.js → dist-6D2F2J57.js} +3 -3
- package/dist/{dist-OWHMNL4W.js → dist-DWBTZXR5.js} +1 -1
- package/dist/{docs-RSFZTNPG.js → docs-FP47JONV.js} +5 -5
- package/dist/{engine-DJIHY4JT.js → engine-YUA6IYOG.js} +4 -4
- package/dist/{entropy-EAEKJKRM.js → entropy-DBW2INZU.js} +4 -4
- package/dist/{feedback-JT5X3DBC.js → feedback-BPHADTRQ.js} +1 -1
- package/dist/{generate-agent-definitions-CC6KED3E.js → generate-agent-definitions-KPVGBGDY.js} +5 -5
- package/dist/{glob-helper-GLZAURJC.js → glob-helper-VR6UCZZB.js} +1 -1
- package/dist/{graph-loader-HHXN5FLP.js → graph-loader-STFGYKZH.js} +1 -1
- package/dist/index.js +27 -27
- package/dist/{loader-UWNVTYBY.js → loader-QOJQ6NZM.js} +4 -4
- package/dist/{mcp-TCLNK7HG.js → mcp-ZPX6O767.js} +16 -16
- package/dist/{performance-R6O3N3UB.js → performance-FXYTGJGQ.js} +5 -5
- package/dist/{review-pipeline-MOOWXWSQ.js → review-pipeline-2TFQ5OAE.js} +4 -4
- package/dist/{runtime-RIWQUKBQ.js → runtime-XK6ZCHKE.js} +4 -4
- package/dist/{scan-P7YFKB77.js → scan-IYSVRPD2.js} +1 -1
- package/dist/{security-U76C54W6.js → security-4W2P5ZGI.js} +1 -1
- package/dist/{state-events-F44CUUZG.js → state-events-ECQAIZLU.js} +4 -4
- package/dist/{validate-IUAV7MOU.js → validate-64KTEGIE.js} +5 -5
- package/dist/{validate-cross-check-M2ZM6RFY.js → validate-cross-check-J5PVGICB.js} +4 -4
- package/package.json +1 -1
|
@@ -5,30 +5,30 @@ import {
|
|
|
5
5
|
handleCreateSelfReview,
|
|
6
6
|
handleRequestPeerReview,
|
|
7
7
|
requestPeerReviewDefinition
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OQ6KOQEV.js";
|
|
9
9
|
import {
|
|
10
10
|
getSecurityTrendsDefinition,
|
|
11
11
|
handleGetSecurityTrends,
|
|
12
12
|
handleRunSecurityScan,
|
|
13
13
|
runSecurityScanDefinition
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-M7F2PPN3.js";
|
|
15
15
|
import {
|
|
16
16
|
handleRunCodeReview,
|
|
17
17
|
runCodeReviewDefinition,
|
|
18
18
|
sortFindingsBySeverity
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-EYMOPFSD.js";
|
|
20
20
|
import {
|
|
21
21
|
assessProjectDefinition,
|
|
22
22
|
handleAssessProject
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-6SCYTIF4.js";
|
|
24
24
|
import {
|
|
25
25
|
checkDocsDefinition,
|
|
26
26
|
handleCheckDocs
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-I3CGCZJF.js";
|
|
28
28
|
import {
|
|
29
29
|
detectEntropyDefinition,
|
|
30
30
|
handleDetectEntropy
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-SDMV4QHM.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-7PJCK7UE.js";
|
|
42
42
|
import {
|
|
43
43
|
getBusinessKnowledgeResource
|
|
44
44
|
} from "./chunk-IOW3MW2K.js";
|
|
@@ -53,21 +53,21 @@ import {
|
|
|
53
53
|
} from "./chunk-3ISINLYT.js";
|
|
54
54
|
import {
|
|
55
55
|
loadGraphStore
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-4U5LDFCY.js";
|
|
57
57
|
import {
|
|
58
58
|
handleValidateProject,
|
|
59
59
|
validateToolDefinition
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-36GQREOE.js";
|
|
61
61
|
import {
|
|
62
62
|
checkDependenciesDefinition,
|
|
63
63
|
handleCheckDependencies
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-JPVOI7GP.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-SEA2PFVI.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-XAVMTAUT.js";
|
|
97
97
|
import {
|
|
98
98
|
logger
|
|
99
99
|
} from "./chunk-EBJQ6N4M.js";
|
|
@@ -129,7 +129,7 @@ import {
|
|
|
129
129
|
scanForInjection,
|
|
130
130
|
serializeEnvelope,
|
|
131
131
|
writeTaint
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-MMLQPHZ5.js";
|
|
133
133
|
import {
|
|
134
134
|
Err,
|
|
135
135
|
INDEXED_FILE_KINDS,
|
|
@@ -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-6D2F2J57.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-YUA6IYOG.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-QOJQ6NZM.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-QOJQ6NZM.js");
|
|
971
|
+
const { generateRuntime } = await import("./runtime-XK6ZCHKE.js");
|
|
972
|
+
const { generateAgentsMd } = await import("./agents-md-VJLYEH2S.js");
|
|
973
|
+
const { generateCIWorkflow } = await import("./ci-workflow-HO4WKGNG.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-QOJQ6NZM.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-ECQAIZLU.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-6D2F2J57.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-6D2F2J57.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-ECQAIZLU.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-6D2F2J57.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-6D2F2J57.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-6D2F2J57.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-6D2F2J57.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-6D2F2J57.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-6D2F2J57.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-6D2F2J57.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-6D2F2J57.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-ECQAIZLU.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-6D2F2J57.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-ECQAIZLU.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-6D2F2J57.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-6D2F2J57.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-6D2F2J57.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-6D2F2J57.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-6D2F2J57.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-CHU2E3OU.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-J5PVGICB.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-6D2F2J57.js");
|
|
3102
|
+
const { readHarnessState } = await import("./state-events-ECQAIZLU.js");
|
|
3103
3103
|
await migrateToStreams(projectRoot);
|
|
3104
3104
|
const result = await readHarnessState(projectRoot);
|
|
3105
3105
|
if (result.ok) {
|
|
@@ -3217,7 +3217,7 @@ async function handleQueryGraph(input) {
|
|
|
3217
3217
|
const projectPath = sanitizePath(input.path);
|
|
3218
3218
|
const store = await loadGraphStore(projectPath);
|
|
3219
3219
|
if (!store) return graphNotFoundError();
|
|
3220
|
-
const { ContextQL } = await import("./dist-
|
|
3220
|
+
const { ContextQL } = await import("./dist-DWBTZXR5.js");
|
|
3221
3221
|
const cql = new ContextQL(store);
|
|
3222
3222
|
const result = cql.execute({
|
|
3223
3223
|
rootNodeIds: input.rootNodeIds,
|
|
@@ -3299,7 +3299,7 @@ async function handleSearchSimilar(input) {
|
|
|
3299
3299
|
const projectPath = sanitizePath(input.path);
|
|
3300
3300
|
const store = await loadGraphStore(projectPath);
|
|
3301
3301
|
if (!store) return graphNotFoundError();
|
|
3302
|
-
const { FusionLayer } = await import("./dist-
|
|
3302
|
+
const { FusionLayer } = await import("./dist-DWBTZXR5.js");
|
|
3303
3303
|
const fusion = new FusionLayer(store);
|
|
3304
3304
|
const results = fusion.search(input.query, input.topK ?? 10);
|
|
3305
3305
|
if (input.mode === "summary") {
|
|
@@ -3354,7 +3354,7 @@ async function handleFindContextFor(input) {
|
|
|
3354
3354
|
const projectPath = sanitizePath(input.path);
|
|
3355
3355
|
const store = await loadGraphStore(projectPath);
|
|
3356
3356
|
if (!store) return graphNotFoundError();
|
|
3357
|
-
const { FusionLayer, ContextQL } = await import("./dist-
|
|
3357
|
+
const { FusionLayer, ContextQL } = await import("./dist-DWBTZXR5.js");
|
|
3358
3358
|
const fusion = new FusionLayer(store);
|
|
3359
3359
|
const cql = new ContextQL(store);
|
|
3360
3360
|
const tokenBudget = input.tokenBudget ?? 4e3;
|
|
@@ -3459,7 +3459,7 @@ async function handleGetRelationships(input) {
|
|
|
3459
3459
|
const projectPath = sanitizePath(input.path);
|
|
3460
3460
|
const store = await loadGraphStore(projectPath);
|
|
3461
3461
|
if (!store) return graphNotFoundError();
|
|
3462
|
-
const { ContextQL } = await import("./dist-
|
|
3462
|
+
const { ContextQL } = await import("./dist-DWBTZXR5.js");
|
|
3463
3463
|
const cql = new ContextQL(store);
|
|
3464
3464
|
const direction = input.direction ?? "both";
|
|
3465
3465
|
const bidirectional = direction === "both" || direction === "inbound";
|
|
@@ -3577,7 +3577,7 @@ async function handleGetImpact(input) {
|
|
|
3577
3577
|
const projectPath = sanitizePath(input.path);
|
|
3578
3578
|
const store = await loadGraphStore(projectPath);
|
|
3579
3579
|
if (!store) return graphNotFoundError();
|
|
3580
|
-
const { ContextQL } = await import("./dist-
|
|
3580
|
+
const { ContextQL } = await import("./dist-DWBTZXR5.js");
|
|
3581
3581
|
let targetNodeId = input.nodeId;
|
|
3582
3582
|
if (!targetNodeId && input.filePath) {
|
|
3583
3583
|
const fileNodes = store.findNodes({ type: "file" });
|
|
@@ -3709,7 +3709,7 @@ async function handleIngestSource(input) {
|
|
|
3709
3709
|
try {
|
|
3710
3710
|
const projectPath = sanitizePath(input.path);
|
|
3711
3711
|
const graphDir = path16.join(projectPath, ".harness", "graph");
|
|
3712
|
-
const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-
|
|
3712
|
+
const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-DWBTZXR5.js");
|
|
3713
3713
|
const fs53 = await import("fs/promises");
|
|
3714
3714
|
await fs53.mkdir(graphDir, { recursive: true });
|
|
3715
3715
|
const store = new GraphStore();
|
|
@@ -3733,13 +3733,13 @@ async function handleIngestSource(input) {
|
|
|
3733
3733
|
results.push(gitResult);
|
|
3734
3734
|
}
|
|
3735
3735
|
if (input.source === "business-signals" || input.source === "all") {
|
|
3736
|
-
const { createExtractionRunner } = await import("./dist-
|
|
3736
|
+
const { createExtractionRunner } = await import("./dist-DWBTZXR5.js");
|
|
3737
3737
|
const extractedDir = path16.join(projectPath, ".harness", "knowledge", "extracted");
|
|
3738
3738
|
const signalsResult = await createExtractionRunner().run(projectPath, store, extractedDir);
|
|
3739
3739
|
results.push(signalsResult);
|
|
3740
3740
|
}
|
|
3741
3741
|
if (input.source === "diagrams" || input.source === "all") {
|
|
3742
|
-
const { DiagramParser } = await import("./dist-
|
|
3742
|
+
const { DiagramParser } = await import("./dist-DWBTZXR5.js");
|
|
3743
3743
|
const diagramParser = new DiagramParser(store);
|
|
3744
3744
|
const diagramResult = await diagramParser.ingest(projectPath);
|
|
3745
3745
|
results.push(diagramResult);
|
|
@@ -3805,7 +3805,7 @@ async function handleDetectAnomalies(input) {
|
|
|
3805
3805
|
const projectPath = sanitizePath(input.path);
|
|
3806
3806
|
const store = await loadGraphStore(projectPath);
|
|
3807
3807
|
if (!store) return graphNotFoundError();
|
|
3808
|
-
const { GraphAnomalyAdapter } = await import("./dist-
|
|
3808
|
+
const { GraphAnomalyAdapter } = await import("./dist-DWBTZXR5.js");
|
|
3809
3809
|
const adapter = new GraphAnomalyAdapter(store);
|
|
3810
3810
|
const report = adapter.detect({
|
|
3811
3811
|
...input.threshold !== void 0 && { threshold: input.threshold },
|
|
@@ -3854,7 +3854,7 @@ async function handleAskGraph(input) {
|
|
|
3854
3854
|
const projectPath = sanitizePath(input.path);
|
|
3855
3855
|
const store = await loadGraphStore(projectPath);
|
|
3856
3856
|
if (!store) return graphNotFoundError();
|
|
3857
|
-
const { askGraph } = await import("./dist-
|
|
3857
|
+
const { askGraph } = await import("./dist-DWBTZXR5.js");
|
|
3858
3858
|
const result = await askGraph(store, input.question);
|
|
3859
3859
|
return {
|
|
3860
3860
|
content: [{ type: "text", text: JSON.stringify(result) }]
|
|
@@ -3918,7 +3918,7 @@ async function handleComputeBlastRadius(input) {
|
|
|
3918
3918
|
const projectPath = sanitizePath(input.path);
|
|
3919
3919
|
const store = await loadGraphStore(projectPath);
|
|
3920
3920
|
if (!store) return graphNotFoundError();
|
|
3921
|
-
const { CascadeSimulator } = await import("./dist-
|
|
3921
|
+
const { CascadeSimulator } = await import("./dist-DWBTZXR5.js");
|
|
3922
3922
|
let targetNodeId = input.nodeId;
|
|
3923
3923
|
if (!targetNodeId && input.file) {
|
|
3924
3924
|
const fileNodes = store.findNodes({ type: "file" });
|
|
@@ -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-KPVGBGDY.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],
|
|
@@ -4836,7 +4836,7 @@ async function handleManageRoadmap(input) {
|
|
|
4836
4836
|
release,
|
|
4837
4837
|
promoteFeature,
|
|
4838
4838
|
groomRoadmap
|
|
4839
|
-
} = await import("./dist-
|
|
4839
|
+
} = await import("./dist-6D2F2J57.js");
|
|
4840
4840
|
const { Ok: Ok2 } = await import("./dist-ICW4QUEW.js");
|
|
4841
4841
|
const projectPath = projectPathPre;
|
|
4842
4842
|
const deps = {
|
|
@@ -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-6D2F2J57.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-ECQAIZLU.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-ECQAIZLU.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-6D2F2J57.js").then(
|
|
5529
5529
|
(core) => core.loadBudgetedLearnings(projectPath, {
|
|
5530
5530
|
intent: input.intent,
|
|
5531
5531
|
tokenBudget: input.learningsBudget ?? 1e3,
|
|
@@ -5534,14 +5534,14 @@ 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-6D2F2J57.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 () => {
|
|
5541
|
-
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-
|
|
5541
|
+
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-STFGYKZH.js");
|
|
5542
5542
|
const store = await loadGraphStore2(projectPath);
|
|
5543
5543
|
if (!store) return null;
|
|
5544
|
-
const { FusionLayer, ContextQL } = await import("./dist-
|
|
5544
|
+
const { FusionLayer, ContextQL } = await import("./dist-DWBTZXR5.js");
|
|
5545
5545
|
const fusion = new FusionLayer(store);
|
|
5546
5546
|
const cql = new ContextQL(store);
|
|
5547
5547
|
const tokenBudget = input.tokenBudget ?? 4e3;
|
|
@@ -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-6D2F2J57.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-ECQAIZLU.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-64KTEGIE.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-6D2F2J57.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-BPHADTRQ.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-BPHADTRQ.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-2TFQ5OAE.js");
|
|
5961
5961
|
const result = await handleRunCodeReview2({
|
|
5962
5962
|
path: projectPath,
|
|
5963
5963
|
diff,
|
|
@@ -6037,7 +6037,7 @@ async function handleCheckTaskIndependence(input) {
|
|
|
6037
6037
|
try {
|
|
6038
6038
|
const projectPath = sanitizePath(input.path);
|
|
6039
6039
|
const store = await loadGraphStore(projectPath);
|
|
6040
|
-
const { TaskIndependenceAnalyzer } = await import("./dist-
|
|
6040
|
+
const { TaskIndependenceAnalyzer } = await import("./dist-DWBTZXR5.js");
|
|
6041
6041
|
const analyzer = new TaskIndependenceAnalyzer(store ?? void 0);
|
|
6042
6042
|
const result = analyzer.analyze({
|
|
6043
6043
|
tasks: input.tasks,
|
|
@@ -6125,7 +6125,7 @@ async function handlePredictConflicts(input) {
|
|
|
6125
6125
|
try {
|
|
6126
6126
|
const projectPath = sanitizePath(input.path);
|
|
6127
6127
|
const store = await loadGraphStore(projectPath);
|
|
6128
|
-
const { ConflictPredictor } = await import("./dist-
|
|
6128
|
+
const { ConflictPredictor } = await import("./dist-DWBTZXR5.js");
|
|
6129
6129
|
const predictor = new ConflictPredictor(store ?? void 0);
|
|
6130
6130
|
const result = predictor.predict({
|
|
6131
6131
|
tasks: input.tasks,
|
|
@@ -6231,7 +6231,7 @@ async function handleDetectStaleConstraints(input) {
|
|
|
6231
6231
|
isError: true
|
|
6232
6232
|
};
|
|
6233
6233
|
}
|
|
6234
|
-
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-
|
|
6234
|
+
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-STFGYKZH.js");
|
|
6235
6235
|
const store = await loadGraphStore2(projectPath);
|
|
6236
6236
|
if (!store) {
|
|
6237
6237
|
return {
|
|
@@ -6252,7 +6252,7 @@ async function handleDetectStaleConstraints(input) {
|
|
|
6252
6252
|
]
|
|
6253
6253
|
};
|
|
6254
6254
|
}
|
|
6255
|
-
const { detectStaleConstraints } = await import("./dist-
|
|
6255
|
+
const { detectStaleConstraints } = await import("./dist-6D2F2J57.js");
|
|
6256
6256
|
const result = detectStaleConstraints(
|
|
6257
6257
|
store,
|
|
6258
6258
|
windowDays,
|
|
@@ -6383,10 +6383,10 @@ function countCriticalFindings(securityData) {
|
|
|
6383
6383
|
return findings.filter((f) => f.severity === "error").length;
|
|
6384
6384
|
}
|
|
6385
6385
|
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-
|
|
6386
|
+
const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-KOTAPAHD.js");
|
|
6387
|
+
const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-YQH2NYXY.js");
|
|
6388
|
+
const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-DBW2INZU.js");
|
|
6389
|
+
const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-4W2P5ZGI.js");
|
|
6390
6390
|
const [assessResult, depsResult, entropyResult, securityResult] = await Promise.all([
|
|
6391
6391
|
handleAssessProject2({
|
|
6392
6392
|
path: projectPath,
|
|
@@ -6443,10 +6443,10 @@ function avg(values) {
|
|
|
6443
6443
|
}
|
|
6444
6444
|
async function runGraphMetrics(projectPath) {
|
|
6445
6445
|
try {
|
|
6446
|
-
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-
|
|
6446
|
+
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-STFGYKZH.js");
|
|
6447
6447
|
const store = await loadGraphStore2(projectPath);
|
|
6448
6448
|
if (!store) return ZERO_METRICS;
|
|
6449
|
-
const { GraphCouplingAdapter, GraphComplexityAdapter, GraphAnomalyAdapter } = await import("./dist-
|
|
6449
|
+
const { GraphCouplingAdapter, GraphComplexityAdapter, GraphAnomalyAdapter } = await import("./dist-DWBTZXR5.js");
|
|
6450
6450
|
const couplingAdapter = new GraphCouplingAdapter(store);
|
|
6451
6451
|
const couplingData = couplingAdapter.computeCouplingData();
|
|
6452
6452
|
const files = couplingData.files;
|
|
@@ -7220,7 +7220,7 @@ async function handleGetDecayTrends(input) {
|
|
|
7220
7220
|
};
|
|
7221
7221
|
}
|
|
7222
7222
|
try {
|
|
7223
|
-
const core = await import("./dist-
|
|
7223
|
+
const core = await import("./dist-6D2F2J57.js");
|
|
7224
7224
|
const { TimelineManager } = core;
|
|
7225
7225
|
const manager = new TimelineManager(projectPath);
|
|
7226
7226
|
const timeline = manager.load();
|
|
@@ -7355,7 +7355,7 @@ async function handleCodeOutline(input) {
|
|
|
7355
7355
|
};
|
|
7356
7356
|
}
|
|
7357
7357
|
try {
|
|
7358
|
-
const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-
|
|
7358
|
+
const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-6D2F2J57.js");
|
|
7359
7359
|
const { stat } = await import("fs/promises");
|
|
7360
7360
|
const stats = await stat(targetPath).catch(() => null);
|
|
7361
7361
|
if (stats?.isFile()) {
|
|
@@ -7374,7 +7374,7 @@ async function handleCodeOutline(input) {
|
|
|
7374
7374
|
})
|
|
7375
7375
|
);
|
|
7376
7376
|
fileStats.sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
7377
|
-
const { paginate: paginate2 } = await import("./dist-
|
|
7377
|
+
const { paginate: paginate2 } = await import("./dist-6D2F2J57.js");
|
|
7378
7378
|
const paged = paginate2(fileStats, input.offset ?? 0, input.limit ?? 30);
|
|
7379
7379
|
const results = [];
|
|
7380
7380
|
for (const entry of paged.items) {
|
|
@@ -7447,7 +7447,7 @@ async function handleCodeSearch(input) {
|
|
|
7447
7447
|
};
|
|
7448
7448
|
}
|
|
7449
7449
|
try {
|
|
7450
|
-
const { searchSymbols } = await import("./dist-
|
|
7450
|
+
const { searchSymbols } = await import("./dist-6D2F2J57.js");
|
|
7451
7451
|
const result = await searchSymbols(input.query, directory, input.glob);
|
|
7452
7452
|
const lines = [`Search: "${result.query}" \u2014 ${result.matches.length} matches`];
|
|
7453
7453
|
for (const match of result.matches) {
|
|
@@ -7516,7 +7516,7 @@ async function handleCodeUnfold(input) {
|
|
|
7516
7516
|
}
|
|
7517
7517
|
try {
|
|
7518
7518
|
if (input.symbol) {
|
|
7519
|
-
const { unfoldSymbol } = await import("./dist-
|
|
7519
|
+
const { unfoldSymbol } = await import("./dist-6D2F2J57.js");
|
|
7520
7520
|
const result = await unfoldSymbol(filePath, input.symbol);
|
|
7521
7521
|
const header = result.warning ? `${result.file}:${result.startLine}-${result.endLine} ${result.warning}
|
|
7522
7522
|
` : `${result.file}:${result.startLine}-${result.endLine}
|
|
@@ -7524,7 +7524,7 @@ async function handleCodeUnfold(input) {
|
|
|
7524
7524
|
return { content: [{ type: "text", text: header + result.content }] };
|
|
7525
7525
|
}
|
|
7526
7526
|
if (input.startLine != null && input.endLine != null) {
|
|
7527
|
-
const { unfoldRange } = await import("./dist-
|
|
7527
|
+
const { unfoldRange } = await import("./dist-6D2F2J57.js");
|
|
7528
7528
|
const result = await unfoldRange(filePath, input.startLine, input.endLine);
|
|
7529
7529
|
const header = `${result.file}:${result.startLine}-${result.endLine}
|
|
7530
7530
|
`;
|
|
@@ -7586,7 +7586,7 @@ async function handleCheckTraceability(input) {
|
|
|
7586
7586
|
isError: true
|
|
7587
7587
|
};
|
|
7588
7588
|
}
|
|
7589
|
-
const { queryTraceability } = await import("./dist-
|
|
7589
|
+
const { queryTraceability } = await import("./dist-DWBTZXR5.js");
|
|
7590
7590
|
const options = {};
|
|
7591
7591
|
if (input.spec) options.specPath = input.spec;
|
|
7592
7592
|
if (input.feature) options.featureName = input.feature;
|
|
@@ -7709,7 +7709,7 @@ async function handlePredictFailures(input) {
|
|
|
7709
7709
|
};
|
|
7710
7710
|
}
|
|
7711
7711
|
try {
|
|
7712
|
-
const core = await import("./dist-
|
|
7712
|
+
const core = await import("./dist-6D2F2J57.js");
|
|
7713
7713
|
const { TimelineManager, PredictionEngine, SpecImpactEstimator } = core;
|
|
7714
7714
|
const manager = new TimelineManager(projectPath);
|
|
7715
7715
|
const includeRoadmap = input.includeRoadmap !== false;
|
|
@@ -8592,7 +8592,7 @@ function handleContentMode(content, pipeline, budget, source) {
|
|
|
8592
8592
|
};
|
|
8593
8593
|
}
|
|
8594
8594
|
async function handleIntentMode(projectPath, intent, pipeline, budget, filterContent) {
|
|
8595
|
-
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-
|
|
8595
|
+
const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-STFGYKZH.js");
|
|
8596
8596
|
const store = await loadGraphStore2(projectPath);
|
|
8597
8597
|
if (!store) {
|
|
8598
8598
|
return {
|
|
@@ -8605,7 +8605,7 @@ async function handleIntentMode(projectPath, intent, pipeline, budget, filterCon
|
|
|
8605
8605
|
isError: true
|
|
8606
8606
|
};
|
|
8607
8607
|
}
|
|
8608
|
-
const { PackedSummaryCache, FusionLayer, ContextQL } = await import("./dist-
|
|
8608
|
+
const { PackedSummaryCache, FusionLayer, ContextQL } = await import("./dist-DWBTZXR5.js");
|
|
8609
8609
|
const cache = new PackedSummaryCache(store);
|
|
8610
8610
|
const cachedEnvelope = cache.get(intent);
|
|
8611
8611
|
if (cachedEnvelope) {
|
|
@@ -8818,7 +8818,7 @@ async function handleDetectConstraintEmergence(input) {
|
|
|
8818
8818
|
}
|
|
8819
8819
|
const nodePath = await import("path");
|
|
8820
8820
|
const historyPath = nodePath.resolve(projectPath, ".harness/arch/violation-history.json");
|
|
8821
|
-
const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-
|
|
8821
|
+
const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-6D2F2J57.js");
|
|
8822
8822
|
const manager = new ViolationHistoryManager(historyPath);
|
|
8823
8823
|
const history = manager.load();
|
|
8824
8824
|
const options = { windowWeeks, minOccurrences };
|
|
@@ -8906,7 +8906,7 @@ async function handleRunCIChecks(input) {
|
|
|
8906
8906
|
};
|
|
8907
8907
|
}
|
|
8908
8908
|
try {
|
|
8909
|
-
const { runCIChecks } = await import("./dist-
|
|
8909
|
+
const { runCIChecks } = await import("./dist-6D2F2J57.js");
|
|
8910
8910
|
const skip = input.checks ? VALID_CHECKS.filter((c) => !input.checks.includes(c)) : [];
|
|
8911
8911
|
const result = await runCIChecks({
|
|
8912
8912
|
projectRoot: projectPath,
|
|
@@ -8968,7 +8968,7 @@ async function handleGenerateBlueprint(input) {
|
|
|
8968
8968
|
};
|
|
8969
8969
|
}
|
|
8970
8970
|
try {
|
|
8971
|
-
const { ProjectScanner } = await import("./dist-
|
|
8971
|
+
const { ProjectScanner } = await import("./dist-6D2F2J57.js");
|
|
8972
8972
|
const scanner = new ProjectScanner(projectPath);
|
|
8973
8973
|
const data = await scanner.scan();
|
|
8974
8974
|
return {
|
|
@@ -9136,45 +9136,68 @@ var emitSkillProposalDefinition = {
|
|
|
9136
9136
|
required: ["path", "kind", "proposedBy", "justification", "content"]
|
|
9137
9137
|
}
|
|
9138
9138
|
};
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
return
|
|
9139
|
+
function validateNewSkillProposal(input) {
|
|
9140
|
+
if (!input.content.skillYaml || !input.content.skillMd) {
|
|
9141
|
+
return "new-skill proposals require both skillYaml and skillMd";
|
|
9142
|
+
}
|
|
9143
|
+
if (input.targetSkill) {
|
|
9144
|
+
return "targetSkill is forbidden on new-skill proposals";
|
|
9145
|
+
}
|
|
9146
|
+
if (input.content.diff) {
|
|
9147
|
+
return "diff is forbidden on new-skill proposals (use skillYaml/skillMd)";
|
|
9148
|
+
}
|
|
9149
|
+
return null;
|
|
9150
|
+
}
|
|
9151
|
+
function validateRefinementProposal(input) {
|
|
9152
|
+
if (!input.targetSkill) {
|
|
9153
|
+
return "refinement proposals require targetSkill";
|
|
9154
|
+
}
|
|
9155
|
+
if (!input.content.diff) {
|
|
9156
|
+
return "refinement proposals require a unified diff";
|
|
9145
9157
|
}
|
|
9158
|
+
if (input.content.skillYaml || input.content.skillMd) {
|
|
9159
|
+
return "skillYaml/skillMd are forbidden on refinement proposals (encode in diff)";
|
|
9160
|
+
}
|
|
9161
|
+
return null;
|
|
9162
|
+
}
|
|
9163
|
+
function validateProposalCrossFields(input) {
|
|
9146
9164
|
if (input.kind === "new-skill") {
|
|
9147
|
-
|
|
9148
|
-
return mcpError("new-skill proposals require both skillYaml and skillMd");
|
|
9149
|
-
}
|
|
9150
|
-
if (input.targetSkill) {
|
|
9151
|
-
return mcpError("targetSkill is forbidden on new-skill proposals");
|
|
9152
|
-
}
|
|
9153
|
-
if (input.content.diff) {
|
|
9154
|
-
return mcpError("diff is forbidden on new-skill proposals (use skillYaml/skillMd)");
|
|
9155
|
-
}
|
|
9156
|
-
} else if (input.kind === "refinement") {
|
|
9157
|
-
if (!input.targetSkill) {
|
|
9158
|
-
return mcpError("refinement proposals require targetSkill");
|
|
9159
|
-
}
|
|
9160
|
-
if (!input.content.diff) {
|
|
9161
|
-
return mcpError("refinement proposals require a unified diff");
|
|
9162
|
-
}
|
|
9163
|
-
if (input.content.skillYaml || input.content.skillMd) {
|
|
9164
|
-
return mcpError("skillYaml/skillMd are forbidden on refinement proposals (encode in diff)");
|
|
9165
|
-
}
|
|
9165
|
+
return validateNewSkillProposal(input);
|
|
9166
9166
|
}
|
|
9167
|
-
|
|
9168
|
-
|
|
9167
|
+
if (input.kind === "refinement") {
|
|
9168
|
+
return validateRefinementProposal(input);
|
|
9169
|
+
}
|
|
9170
|
+
return null;
|
|
9171
|
+
}
|
|
9172
|
+
async function loadCoreProposalApi() {
|
|
9169
9173
|
try {
|
|
9170
|
-
const core = await import("./dist-
|
|
9171
|
-
|
|
9172
|
-
|
|
9174
|
+
const core = await import("./dist-6D2F2J57.js");
|
|
9175
|
+
return {
|
|
9176
|
+
createProposal: core.createProposal,
|
|
9177
|
+
ProposalConflictError: core.ProposalConflictError
|
|
9178
|
+
};
|
|
9173
9179
|
} catch (err2) {
|
|
9174
9180
|
return mcpError(
|
|
9175
9181
|
`Failed to load proposal store: ${err2 instanceof Error ? err2.message : "unknown error"}`
|
|
9176
9182
|
);
|
|
9177
9183
|
}
|
|
9184
|
+
}
|
|
9185
|
+
async function handleEmitSkillProposal(input) {
|
|
9186
|
+
let projectPath;
|
|
9187
|
+
try {
|
|
9188
|
+
projectPath = sanitizePath(input.path);
|
|
9189
|
+
} catch (err2) {
|
|
9190
|
+
return mcpError(err2 instanceof Error ? err2.message : "Invalid path");
|
|
9191
|
+
}
|
|
9192
|
+
const validationError = validateProposalCrossFields(input);
|
|
9193
|
+
if (validationError) {
|
|
9194
|
+
return mcpError(validationError);
|
|
9195
|
+
}
|
|
9196
|
+
const core = await loadCoreProposalApi();
|
|
9197
|
+
if ("content" in core) {
|
|
9198
|
+
return core;
|
|
9199
|
+
}
|
|
9200
|
+
const { createProposal, ProposalConflictError } = core;
|
|
9178
9201
|
try {
|
|
9179
9202
|
const proposal = await createProposal(projectPath, {
|
|
9180
9203
|
kind: input.kind,
|
|
@@ -10289,31 +10312,33 @@ function firstTrigger(contents, triggers) {
|
|
|
10289
10312
|
}
|
|
10290
10313
|
return best;
|
|
10291
10314
|
}
|
|
10315
|
+
function buildPresenceFinding(spec, file, contents, componentType, index) {
|
|
10316
|
+
const line = lineAt(contents, index);
|
|
10317
|
+
const snippet = (contents.split("\n")[line - 1] ?? "").trim();
|
|
10318
|
+
return {
|
|
10319
|
+
code: spec.code,
|
|
10320
|
+
severity: "warn",
|
|
10321
|
+
file,
|
|
10322
|
+
line,
|
|
10323
|
+
componentType,
|
|
10324
|
+
message: spec.message,
|
|
10325
|
+
evidence: { snippet },
|
|
10326
|
+
rule: { id: spec.code, source: `design-component-anatomy/pattern-${spec.id}` },
|
|
10327
|
+
fix: { kind: "manual", description: spec.fix }
|
|
10328
|
+
};
|
|
10329
|
+
}
|
|
10330
|
+
function detectPresence(spec, file, contents, componentType) {
|
|
10331
|
+
const index = firstTrigger(contents, spec.triggers);
|
|
10332
|
+
if (index === -1) return [];
|
|
10333
|
+
if (anyMatch(contents, spec.mitigations)) return [];
|
|
10334
|
+
return [buildPresenceFinding(spec, file, contents, componentType, index)];
|
|
10335
|
+
}
|
|
10292
10336
|
function presencePattern(spec) {
|
|
10293
10337
|
return {
|
|
10294
10338
|
code: spec.code,
|
|
10295
10339
|
id: spec.id,
|
|
10296
10340
|
source: `design-component-anatomy/pattern-${spec.id}`,
|
|
10297
|
-
detect(file, contents, componentType)
|
|
10298
|
-
const index = firstTrigger(contents, spec.triggers);
|
|
10299
|
-
if (index === -1) return [];
|
|
10300
|
-
if (anyMatch(contents, spec.mitigations)) return [];
|
|
10301
|
-
const line = lineAt(contents, index);
|
|
10302
|
-
const snippet = (contents.split("\n")[line - 1] ?? "").trim();
|
|
10303
|
-
return [
|
|
10304
|
-
{
|
|
10305
|
-
code: spec.code,
|
|
10306
|
-
severity: "warn",
|
|
10307
|
-
file,
|
|
10308
|
-
line,
|
|
10309
|
-
componentType,
|
|
10310
|
-
message: spec.message,
|
|
10311
|
-
evidence: { snippet },
|
|
10312
|
-
rule: { id: spec.code, source: `design-component-anatomy/pattern-${spec.id}` },
|
|
10313
|
-
fix: { kind: "manual", description: spec.fix }
|
|
10314
|
-
}
|
|
10315
|
-
];
|
|
10316
|
-
}
|
|
10341
|
+
detect: (file, contents, componentType) => detectPresence(spec, file, contents, componentType)
|
|
10317
10342
|
};
|
|
10318
10343
|
}
|
|
10319
10344
|
var SPECS = [
|
|
@@ -13751,23 +13776,7 @@ function extractPathIndex(root) {
|
|
|
13751
13776
|
}
|
|
13752
13777
|
function walkForPaths(node, breadcrumb, idx) {
|
|
13753
13778
|
if ("$value" in node) {
|
|
13754
|
-
|
|
13755
|
-
const $type = typeof node.$type === "string" ? node.$type : void 0;
|
|
13756
|
-
const $value = node.$value;
|
|
13757
|
-
if ($type === "color" && typeof $value === "string") {
|
|
13758
|
-
pushPath(idx.colorPath, $value.toLowerCase(), tokenPath);
|
|
13759
|
-
} else if ($type === "fontFamily" && typeof $value === "string") {
|
|
13760
|
-
pushPath(idx.fontFamilyPath, $value.toLowerCase(), tokenPath);
|
|
13761
|
-
} else if ($type === "fontFamily" && Array.isArray($value)) {
|
|
13762
|
-
for (const f of $value) {
|
|
13763
|
-
if (typeof f === "string") pushPath(idx.fontFamilyPath, f.toLowerCase(), tokenPath);
|
|
13764
|
-
}
|
|
13765
|
-
} else if (($type === "dimension" || $type === "spacing") && typeof $value === "string") {
|
|
13766
|
-
const px = parsePxValue($value);
|
|
13767
|
-
if (px !== null) pushPath(idx.spacingPath, px, tokenPath);
|
|
13768
|
-
} else if (($type === "dimension" || $type === "spacing") && typeof $value === "number") {
|
|
13769
|
-
pushPath(idx.spacingPath, $value, tokenPath);
|
|
13770
|
-
}
|
|
13779
|
+
collectPathInto(node, breadcrumb, idx);
|
|
13771
13780
|
return;
|
|
13772
13781
|
}
|
|
13773
13782
|
for (const [key, value] of Object.entries(node)) {
|
|
@@ -13777,6 +13786,15 @@ function walkForPaths(node, breadcrumb, idx) {
|
|
|
13777
13786
|
}
|
|
13778
13787
|
}
|
|
13779
13788
|
}
|
|
13789
|
+
function collectPathInto(node, breadcrumb, idx) {
|
|
13790
|
+
const tokenPath = breadcrumb.join(".");
|
|
13791
|
+
const $type = typeof node.$type === "string" ? node.$type : void 0;
|
|
13792
|
+
const $value = node.$value;
|
|
13793
|
+
const parts = classifyTokenValue($type, $value);
|
|
13794
|
+
for (const c of parts.colors) pushPath(idx.colorPath, c, tokenPath);
|
|
13795
|
+
for (const f of parts.fontFamilies) pushPath(idx.fontFamilyPath, f, tokenPath);
|
|
13796
|
+
for (const px of parts.spacingPx) pushPath(idx.spacingPath, px, tokenPath);
|
|
13797
|
+
}
|
|
13780
13798
|
function pushPath(map, key, path56) {
|
|
13781
13799
|
const list = map.get(key) ?? [];
|
|
13782
13800
|
list.push(path56);
|
|
@@ -13784,26 +13802,7 @@ function pushPath(map, key, path56) {
|
|
|
13784
13802
|
}
|
|
13785
13803
|
function walk(node, breadcrumb, set) {
|
|
13786
13804
|
if ("$value" in node) {
|
|
13787
|
-
|
|
13788
|
-
const $type = typeof node.$type === "string" ? node.$type : void 0;
|
|
13789
|
-
const $value = node.$value;
|
|
13790
|
-
if (node.$deprecated === true || isHarnessDeprecated(node.$extensions)) {
|
|
13791
|
-
set.deprecatedTokens.add(tokenPath);
|
|
13792
|
-
}
|
|
13793
|
-
if ($type === "color" && typeof $value === "string") {
|
|
13794
|
-
set.colors.add($value.toLowerCase());
|
|
13795
|
-
} else if ($type === "fontFamily" && typeof $value === "string") {
|
|
13796
|
-
set.fontFamilies.add($value.toLowerCase());
|
|
13797
|
-
} else if ($type === "fontFamily" && Array.isArray($value)) {
|
|
13798
|
-
for (const f of $value) {
|
|
13799
|
-
if (typeof f === "string") set.fontFamilies.add(f.toLowerCase());
|
|
13800
|
-
}
|
|
13801
|
-
} else if (($type === "dimension" || $type === "spacing") && typeof $value === "string") {
|
|
13802
|
-
const px = parsePxValue($value);
|
|
13803
|
-
if (px !== null) set.spacingPx.add(px);
|
|
13804
|
-
} else if (($type === "dimension" || $type === "spacing") && typeof $value === "number") {
|
|
13805
|
-
set.spacingPx.add($value);
|
|
13806
|
-
}
|
|
13805
|
+
collectTokenInto(node, breadcrumb, set);
|
|
13807
13806
|
return;
|
|
13808
13807
|
}
|
|
13809
13808
|
for (const [key, value] of Object.entries(node)) {
|
|
@@ -13813,6 +13812,46 @@ function walk(node, breadcrumb, set) {
|
|
|
13813
13812
|
}
|
|
13814
13813
|
}
|
|
13815
13814
|
}
|
|
13815
|
+
function collectTokenInto(node, breadcrumb, set) {
|
|
13816
|
+
const tokenPath = breadcrumb.join(".");
|
|
13817
|
+
const $type = typeof node.$type === "string" ? node.$type : void 0;
|
|
13818
|
+
const $value = node.$value;
|
|
13819
|
+
if (node.$deprecated === true || isHarnessDeprecated(node.$extensions)) {
|
|
13820
|
+
set.deprecatedTokens.add(tokenPath);
|
|
13821
|
+
}
|
|
13822
|
+
const parts = classifyTokenValue($type, $value);
|
|
13823
|
+
for (const c of parts.colors) set.colors.add(c);
|
|
13824
|
+
for (const f of parts.fontFamilies) set.fontFamilies.add(f);
|
|
13825
|
+
for (const px of parts.spacingPx) set.spacingPx.add(px);
|
|
13826
|
+
}
|
|
13827
|
+
function classifyTokenValue($type, $value) {
|
|
13828
|
+
return {
|
|
13829
|
+
colors: colorValues($type, $value),
|
|
13830
|
+
fontFamilies: fontFamilyValues($type, $value),
|
|
13831
|
+
spacingPx: spacingValues($type, $value)
|
|
13832
|
+
};
|
|
13833
|
+
}
|
|
13834
|
+
function colorValues($type, $value) {
|
|
13835
|
+
if ($type === "color" && typeof $value === "string") return [$value.toLowerCase()];
|
|
13836
|
+
return [];
|
|
13837
|
+
}
|
|
13838
|
+
function fontFamilyValues($type, $value) {
|
|
13839
|
+
if ($type !== "fontFamily") return [];
|
|
13840
|
+
if (typeof $value === "string") return [$value.toLowerCase()];
|
|
13841
|
+
if (Array.isArray($value)) {
|
|
13842
|
+
return $value.filter((f) => typeof f === "string").map((f) => f.toLowerCase());
|
|
13843
|
+
}
|
|
13844
|
+
return [];
|
|
13845
|
+
}
|
|
13846
|
+
function spacingValues($type, $value) {
|
|
13847
|
+
if ($type !== "dimension" && $type !== "spacing") return [];
|
|
13848
|
+
if (typeof $value === "string") {
|
|
13849
|
+
const px = parsePxValue($value);
|
|
13850
|
+
return px !== null ? [px] : [];
|
|
13851
|
+
}
|
|
13852
|
+
if (typeof $value === "number") return [$value];
|
|
13853
|
+
return [];
|
|
13854
|
+
}
|
|
13816
13855
|
function isHarnessDeprecated(extensions) {
|
|
13817
13856
|
if (!extensions || typeof extensions !== "object") return false;
|
|
13818
13857
|
const harness = extensions["harness"];
|
|
@@ -14160,40 +14199,76 @@ function extractLine2(source, offset) {
|
|
|
14160
14199
|
|
|
14161
14200
|
// src/drift/index.ts
|
|
14162
14201
|
var DEFAULT_GLOB_EXTENSIONS = [".ts", ".tsx", ".js", ".jsx", ".css", ".scss"];
|
|
14163
|
-
|
|
14164
|
-
const startedAt = Date.now();
|
|
14202
|
+
function resolveDriftConfig(input) {
|
|
14165
14203
|
const projectRoot = sanitizePath(input.path);
|
|
14166
|
-
const mode2 = input.mode ?? "fast";
|
|
14167
|
-
const strictness = input.designStrictness ?? "standard";
|
|
14168
14204
|
const tokenBypassEnabled = input.rules?.tokenBypass !== false;
|
|
14169
14205
|
const primitiveAdoptionEnabled = input.rules?.primitiveAdoption !== false;
|
|
14170
|
-
|
|
14171
|
-
|
|
14206
|
+
return {
|
|
14207
|
+
projectRoot,
|
|
14208
|
+
mode: input.mode ?? "fast",
|
|
14209
|
+
strictness: input.designStrictness ?? "standard",
|
|
14210
|
+
tokenBypassEnabled,
|
|
14211
|
+
primitiveAdoptionEnabled,
|
|
14212
|
+
tokens: tokenBypassEnabled ? loadTokenSet(projectRoot) : null,
|
|
14213
|
+
registry: primitiveAdoptionEnabled ? loadComponentRegistry(projectRoot) : null
|
|
14214
|
+
};
|
|
14215
|
+
}
|
|
14216
|
+
function computeRulesApplied(config) {
|
|
14172
14217
|
const rulesApplied = [];
|
|
14173
|
-
if (tokenBypassEnabled && tokens !== null) rulesApplied.push("token-bypass");
|
|
14174
|
-
if (primitiveAdoptionEnabled && registry !== null)
|
|
14175
|
-
|
|
14218
|
+
if (config.tokenBypassEnabled && config.tokens !== null) rulesApplied.push("token-bypass");
|
|
14219
|
+
if (config.primitiveAdoptionEnabled && config.registry !== null) {
|
|
14220
|
+
rulesApplied.push("primitive-adoption");
|
|
14221
|
+
}
|
|
14222
|
+
return rulesApplied;
|
|
14223
|
+
}
|
|
14224
|
+
function scanFile(file, config) {
|
|
14225
|
+
let source;
|
|
14226
|
+
try {
|
|
14227
|
+
source = fs31.readFileSync(file, "utf-8");
|
|
14228
|
+
} catch {
|
|
14229
|
+
return [];
|
|
14230
|
+
}
|
|
14176
14231
|
const findings = [];
|
|
14177
|
-
|
|
14178
|
-
|
|
14179
|
-
|
|
14180
|
-
|
|
14181
|
-
} catch {
|
|
14182
|
-
continue;
|
|
14183
|
-
}
|
|
14184
|
-
if (tokenBypassEnabled && tokens !== null) {
|
|
14185
|
-
findings.push(...runTokenBypassRule({ source, file, tokens, strictness }));
|
|
14186
|
-
}
|
|
14187
|
-
if (primitiveAdoptionEnabled && registry !== null) {
|
|
14188
|
-
findings.push(...runPrimitiveAdoptionRule({ source, file, registry, strictness }));
|
|
14189
|
-
}
|
|
14232
|
+
if (config.tokenBypassEnabled && config.tokens !== null) {
|
|
14233
|
+
findings.push(
|
|
14234
|
+
...runTokenBypassRule({ source, file, tokens: config.tokens, strictness: config.strictness })
|
|
14235
|
+
);
|
|
14190
14236
|
}
|
|
14237
|
+
if (config.primitiveAdoptionEnabled && config.registry !== null) {
|
|
14238
|
+
findings.push(
|
|
14239
|
+
...runPrimitiveAdoptionRule({
|
|
14240
|
+
source,
|
|
14241
|
+
file,
|
|
14242
|
+
registry: config.registry,
|
|
14243
|
+
strictness: config.strictness
|
|
14244
|
+
})
|
|
14245
|
+
);
|
|
14246
|
+
}
|
|
14247
|
+
return findings;
|
|
14248
|
+
}
|
|
14249
|
+
function scanFiles(files, config) {
|
|
14250
|
+
const findings = [];
|
|
14251
|
+
for (const file of files) {
|
|
14252
|
+
findings.push(...scanFile(file, config));
|
|
14253
|
+
}
|
|
14254
|
+
return findings;
|
|
14255
|
+
}
|
|
14256
|
+
function summarizeFindings(findings) {
|
|
14191
14257
|
const bySeverity = { error: 0, warn: 0, info: 0 };
|
|
14192
14258
|
const byCode2 = {};
|
|
14193
14259
|
for (const f of findings) {
|
|
14194
14260
|
bySeverity[f.severity] = (bySeverity[f.severity] ?? 0) + 1;
|
|
14195
14261
|
byCode2[f.code] = (byCode2[f.code] ?? 0) + 1;
|
|
14196
14262
|
}
|
|
14263
|
+
return { bySeverity, byCode: byCode2 };
|
|
14264
|
+
}
|
|
14265
|
+
async function runDetectDrift(input) {
|
|
14266
|
+
const startedAt = Date.now();
|
|
14267
|
+
const config = resolveDriftConfig(input);
|
|
14268
|
+
const rulesApplied = computeRulesApplied(config);
|
|
14269
|
+
const filesToScan = await collectFiles(config.projectRoot, input.files);
|
|
14270
|
+
const findings = scanFiles(filesToScan, config);
|
|
14271
|
+
const { bySeverity, byCode: byCode2 } = summarizeFindings(findings);
|
|
14197
14272
|
return {
|
|
14198
14273
|
findings,
|
|
14199
14274
|
summary: {
|
|
@@ -14204,9 +14279,9 @@ async function runDetectDrift(input) {
|
|
|
14204
14279
|
},
|
|
14205
14280
|
catalog: { rulesApplied },
|
|
14206
14281
|
meta: {
|
|
14207
|
-
mode:
|
|
14208
|
-
tokensLoaded: tokens !== null,
|
|
14209
|
-
registryLoaded: registry !== null
|
|
14282
|
+
mode: config.mode,
|
|
14283
|
+
tokensLoaded: config.tokens !== null,
|
|
14284
|
+
registryLoaded: config.registry !== null
|
|
14210
14285
|
}
|
|
14211
14286
|
};
|
|
14212
14287
|
}
|
|
@@ -15380,64 +15455,96 @@ function checkText(text, position, sourceFile, file, phrasesLc, strictness, seen
|
|
|
15380
15455
|
|
|
15381
15456
|
// src/brand/index.ts
|
|
15382
15457
|
var DEFAULT_GLOB_EXTENSIONS2 = [".ts", ".tsx", ".js", ".jsx", ".css", ".scss"];
|
|
15458
|
+
function resolveOptions(input) {
|
|
15459
|
+
return {
|
|
15460
|
+
mode: input.mode ?? "fast",
|
|
15461
|
+
strictness: input.designStrictness ?? "standard",
|
|
15462
|
+
tokenMisuseEnabled: input.rules?.tokenMisuse !== false,
|
|
15463
|
+
voiceEnabled: input.rules?.voice !== false
|
|
15464
|
+
};
|
|
15465
|
+
}
|
|
15383
15466
|
async function runAuditBrand(input) {
|
|
15384
15467
|
const startedAt = Date.now();
|
|
15385
15468
|
const projectRoot = sanitizePath(input.path);
|
|
15386
|
-
const mode2 = input
|
|
15387
|
-
const strictness = input.designStrictness ?? "standard";
|
|
15388
|
-
const tokenMisuseEnabled = input.rules?.tokenMisuse !== false;
|
|
15389
|
-
const voiceEnabled = input.rules?.voice !== false;
|
|
15469
|
+
const { mode: mode2, strictness, tokenMisuseEnabled, voiceEnabled } = resolveOptions(input);
|
|
15390
15470
|
const brandRules = voiceEnabled ? loadBrandRules(projectRoot) : null;
|
|
15391
15471
|
const brandTokens = tokenMisuseEnabled ? loadBrandTokenIndex(projectRoot) : null;
|
|
15472
|
+
const tokenActive = tokenMisuseEnabled && brandTokens !== null;
|
|
15473
|
+
const voiceActive = isVoiceRuleActive(voiceEnabled, brandRules);
|
|
15392
15474
|
const rulesApplied = [];
|
|
15393
|
-
if (
|
|
15394
|
-
if (
|
|
15395
|
-
rulesApplied.push("forbidden-phrases");
|
|
15396
|
-
}
|
|
15475
|
+
if (tokenActive) rulesApplied.push("token-misuse");
|
|
15476
|
+
if (voiceActive) rulesApplied.push("forbidden-phrases");
|
|
15397
15477
|
const filesToScan = collectFiles2(projectRoot, input.files);
|
|
15478
|
+
const findings = scanFiles2(filesToScan, {
|
|
15479
|
+
tokenActive,
|
|
15480
|
+
voiceActive,
|
|
15481
|
+
brandTokens,
|
|
15482
|
+
brandRules,
|
|
15483
|
+
strictness
|
|
15484
|
+
});
|
|
15485
|
+
return {
|
|
15486
|
+
findings,
|
|
15487
|
+
summary: {
|
|
15488
|
+
totalFiles: filesToScan.length,
|
|
15489
|
+
durationMs: Date.now() - startedAt,
|
|
15490
|
+
...tallyFindings(findings)
|
|
15491
|
+
},
|
|
15492
|
+
catalog: { rulesApplied },
|
|
15493
|
+
meta: {
|
|
15494
|
+
mode: mode2,
|
|
15495
|
+
designMdLoaded: brandRules !== null,
|
|
15496
|
+
brandTokensLoaded: brandTokens !== null
|
|
15497
|
+
}
|
|
15498
|
+
};
|
|
15499
|
+
}
|
|
15500
|
+
function isVoiceRuleActive(voiceEnabled, brandRules) {
|
|
15501
|
+
return voiceEnabled && brandRules?.voice != null && brandRules.voice.forbiddenPhrases.length > 0;
|
|
15502
|
+
}
|
|
15503
|
+
function scanFiles2(files, ctx) {
|
|
15398
15504
|
const findings = [];
|
|
15399
|
-
for (const file of
|
|
15505
|
+
for (const file of files) {
|
|
15400
15506
|
let source;
|
|
15401
15507
|
try {
|
|
15402
15508
|
source = fs36.readFileSync(file, "utf-8");
|
|
15403
15509
|
} catch {
|
|
15404
15510
|
continue;
|
|
15405
15511
|
}
|
|
15406
|
-
|
|
15407
|
-
findings.push(...runTokenMisuseRule({ source, file, brandTokens, strictness }));
|
|
15408
|
-
}
|
|
15409
|
-
if (voiceEnabled && brandRules?.voice && brandRules.voice.forbiddenPhrases.length > 0) {
|
|
15410
|
-
findings.push(
|
|
15411
|
-
...runForbiddenPhrasesRule({
|
|
15412
|
-
source,
|
|
15413
|
-
file,
|
|
15414
|
-
forbiddenPhrases: brandRules.voice.forbiddenPhrases,
|
|
15415
|
-
strictness
|
|
15416
|
-
})
|
|
15417
|
-
);
|
|
15418
|
-
}
|
|
15512
|
+
findings.push(...scanSource(source, file, ctx));
|
|
15419
15513
|
}
|
|
15514
|
+
return findings;
|
|
15515
|
+
}
|
|
15516
|
+
function scanSource(source, file, ctx) {
|
|
15517
|
+
const findings = [];
|
|
15518
|
+
if (ctx.tokenActive && ctx.brandTokens !== null) {
|
|
15519
|
+
findings.push(
|
|
15520
|
+
...runTokenMisuseRule({
|
|
15521
|
+
source,
|
|
15522
|
+
file,
|
|
15523
|
+
brandTokens: ctx.brandTokens,
|
|
15524
|
+
strictness: ctx.strictness
|
|
15525
|
+
})
|
|
15526
|
+
);
|
|
15527
|
+
}
|
|
15528
|
+
if (ctx.voiceActive && ctx.brandRules?.voice) {
|
|
15529
|
+
findings.push(
|
|
15530
|
+
...runForbiddenPhrasesRule({
|
|
15531
|
+
source,
|
|
15532
|
+
file,
|
|
15533
|
+
forbiddenPhrases: ctx.brandRules.voice.forbiddenPhrases,
|
|
15534
|
+
strictness: ctx.strictness
|
|
15535
|
+
})
|
|
15536
|
+
);
|
|
15537
|
+
}
|
|
15538
|
+
return findings;
|
|
15539
|
+
}
|
|
15540
|
+
function tallyFindings(findings) {
|
|
15420
15541
|
const bySeverity = { error: 0, warn: 0, info: 0 };
|
|
15421
15542
|
const byCode2 = {};
|
|
15422
15543
|
for (const f of findings) {
|
|
15423
15544
|
bySeverity[f.severity] = (bySeverity[f.severity] ?? 0) + 1;
|
|
15424
15545
|
byCode2[f.code] = (byCode2[f.code] ?? 0) + 1;
|
|
15425
15546
|
}
|
|
15426
|
-
return {
|
|
15427
|
-
findings,
|
|
15428
|
-
summary: {
|
|
15429
|
-
totalFiles: filesToScan.length,
|
|
15430
|
-
durationMs: Date.now() - startedAt,
|
|
15431
|
-
bySeverity,
|
|
15432
|
-
byCode: byCode2
|
|
15433
|
-
},
|
|
15434
|
-
catalog: { rulesApplied },
|
|
15435
|
-
meta: {
|
|
15436
|
-
mode: mode2,
|
|
15437
|
-
designMdLoaded: brandRules !== null,
|
|
15438
|
-
brandTokensLoaded: brandTokens !== null
|
|
15439
|
-
}
|
|
15440
|
-
};
|
|
15547
|
+
return { bySeverity, byCode: byCode2 };
|
|
15441
15548
|
}
|
|
15442
15549
|
function collectFiles2(projectRoot, explicitFiles) {
|
|
15443
15550
|
if (explicitFiles !== void 0 && explicitFiles.length > 0) {
|
|
@@ -16012,47 +16119,61 @@ function extractIdentifiers(file, source) {
|
|
|
16012
16119
|
const out = [];
|
|
16013
16120
|
const sourceLines = source.split("\n");
|
|
16014
16121
|
function visit5(node, parentBodyLineSize) {
|
|
16015
|
-
|
|
16016
|
-
|
|
16017
|
-
node.name.text,
|
|
16018
|
-
"function",
|
|
16019
|
-
node,
|
|
16020
|
-
sourceFile,
|
|
16021
|
-
sourceLines,
|
|
16022
|
-
out,
|
|
16023
|
-
parentBodyLineSize
|
|
16024
|
-
);
|
|
16025
|
-
}
|
|
16026
|
-
if ((ts4.isInterfaceDeclaration(node) || ts4.isTypeAliasDeclaration(node) || ts4.isClassDeclaration(node)) && node.name !== void 0) {
|
|
16027
|
-
pushIdentifier(
|
|
16028
|
-
node.name.text,
|
|
16029
|
-
"type",
|
|
16030
|
-
node,
|
|
16031
|
-
sourceFile,
|
|
16032
|
-
sourceLines,
|
|
16033
|
-
out,
|
|
16034
|
-
parentBodyLineSize
|
|
16035
|
-
);
|
|
16036
|
-
}
|
|
16037
|
-
if (ts4.isVariableStatement(node)) {
|
|
16038
|
-
for (const decl of node.declarationList.declarations) {
|
|
16039
|
-
for (const binding of collectBindingNames(decl.name)) {
|
|
16040
|
-
const kind = decl.initializer !== void 0 && (ts4.isArrowFunction(decl.initializer) || ts4.isFunctionExpression(decl.initializer)) ? "function" : "variable";
|
|
16041
|
-
pushIdentifier(binding, kind, decl, sourceFile, sourceLines, out, parentBodyLineSize);
|
|
16042
|
-
}
|
|
16043
|
-
}
|
|
16044
|
-
}
|
|
16045
|
-
let nextParentBodyLineSize = parentBodyLineSize;
|
|
16046
|
-
if ((ts4.isFunctionDeclaration(node) || ts4.isFunctionExpression(node) || ts4.isArrowFunction(node) || ts4.isMethodDeclaration(node)) && node.body !== void 0) {
|
|
16047
|
-
const start = sourceFile.getLineAndCharacterOfPosition(node.body.getStart(sourceFile)).line;
|
|
16048
|
-
const end = sourceFile.getLineAndCharacterOfPosition(node.body.getEnd()).line;
|
|
16049
|
-
nextParentBodyLineSize = end - start + 1;
|
|
16050
|
-
}
|
|
16122
|
+
collectDeclaredIdentifiers(node, sourceFile, sourceLines, out, parentBodyLineSize);
|
|
16123
|
+
const nextParentBodyLineSize = computeChildBodyLineSize(node, sourceFile, parentBodyLineSize);
|
|
16051
16124
|
ts4.forEachChild(node, (child) => visit5(child, nextParentBodyLineSize));
|
|
16052
16125
|
}
|
|
16053
16126
|
visit5(sourceFile, null);
|
|
16054
16127
|
return out;
|
|
16055
16128
|
}
|
|
16129
|
+
function collectDeclaredIdentifiers(node, sourceFile, sourceLines, out, parentBodyLineSize) {
|
|
16130
|
+
if (ts4.isFunctionDeclaration(node) && node.name !== void 0) {
|
|
16131
|
+
pushIdentifier(
|
|
16132
|
+
node.name.text,
|
|
16133
|
+
"function",
|
|
16134
|
+
node,
|
|
16135
|
+
sourceFile,
|
|
16136
|
+
sourceLines,
|
|
16137
|
+
out,
|
|
16138
|
+
parentBodyLineSize
|
|
16139
|
+
);
|
|
16140
|
+
return;
|
|
16141
|
+
}
|
|
16142
|
+
if (isTypeLikeDeclaration(node) && node.name !== void 0) {
|
|
16143
|
+
pushIdentifier(node.name.text, "type", node, sourceFile, sourceLines, out, parentBodyLineSize);
|
|
16144
|
+
return;
|
|
16145
|
+
}
|
|
16146
|
+
if (ts4.isVariableStatement(node)) {
|
|
16147
|
+
pushVariableIdentifiers(node, sourceFile, sourceLines, out, parentBodyLineSize);
|
|
16148
|
+
}
|
|
16149
|
+
}
|
|
16150
|
+
function isTypeLikeDeclaration(node) {
|
|
16151
|
+
return ts4.isInterfaceDeclaration(node) || ts4.isTypeAliasDeclaration(node) || ts4.isClassDeclaration(node);
|
|
16152
|
+
}
|
|
16153
|
+
function pushVariableIdentifiers(node, sourceFile, sourceLines, out, parentBodyLineSize) {
|
|
16154
|
+
for (const decl of node.declarationList.declarations) {
|
|
16155
|
+
for (const binding of collectBindingNames(decl.name)) {
|
|
16156
|
+
const kind = variableInitializerKind(decl.initializer);
|
|
16157
|
+
pushIdentifier(binding, kind, decl, sourceFile, sourceLines, out, parentBodyLineSize);
|
|
16158
|
+
}
|
|
16159
|
+
}
|
|
16160
|
+
}
|
|
16161
|
+
function variableInitializerKind(initializer) {
|
|
16162
|
+
return initializer !== void 0 && (ts4.isArrowFunction(initializer) || ts4.isFunctionExpression(initializer)) ? "function" : "variable";
|
|
16163
|
+
}
|
|
16164
|
+
function computeChildBodyLineSize(node, sourceFile, parentBodyLineSize) {
|
|
16165
|
+
const body = functionBodyOf(node);
|
|
16166
|
+
if (body === void 0) return parentBodyLineSize;
|
|
16167
|
+
const start = sourceFile.getLineAndCharacterOfPosition(body.getStart(sourceFile)).line;
|
|
16168
|
+
const end = sourceFile.getLineAndCharacterOfPosition(body.getEnd()).line;
|
|
16169
|
+
return end - start + 1;
|
|
16170
|
+
}
|
|
16171
|
+
function functionBodyOf(node) {
|
|
16172
|
+
if ((ts4.isFunctionDeclaration(node) || ts4.isFunctionExpression(node) || ts4.isArrowFunction(node) || ts4.isMethodDeclaration(node)) && node.body !== void 0) {
|
|
16173
|
+
return node.body;
|
|
16174
|
+
}
|
|
16175
|
+
return void 0;
|
|
16176
|
+
}
|
|
16056
16177
|
function pushIdentifier(name, kind, node, sourceFile, sourceLines, out, parentBodyLineSize) {
|
|
16057
16178
|
const { line: zeroLine } = sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile));
|
|
16058
16179
|
const line = zeroLine + 1;
|
|
@@ -17648,79 +17769,24 @@ async function runCopyCraft(input) {
|
|
|
17648
17769
|
const rubrics = SEED_RUBRICS4;
|
|
17649
17770
|
const enabledSurfaces = new Set(input.surfaces ?? ALL_SURFACES);
|
|
17650
17771
|
const items = [];
|
|
17651
|
-
const counts = {
|
|
17652
|
-
error: 0,
|
|
17653
|
-
log: 0,
|
|
17654
|
-
"cli-output": 0,
|
|
17655
|
-
commit: 0,
|
|
17656
|
-
"pr-description": 0,
|
|
17657
|
-
comment: 0
|
|
17658
|
-
};
|
|
17659
17772
|
const skippedSurfaces = [];
|
|
17660
17773
|
const sourceSurfaces = ["error", "log", "cli-output", "comment"].filter(
|
|
17661
17774
|
(s) => enabledSurfaces.has(s)
|
|
17662
17775
|
);
|
|
17663
17776
|
if (sourceSurfaces.length > 0) {
|
|
17664
|
-
|
|
17665
|
-
|
|
17666
|
-
|
|
17667
|
-
|
|
17668
|
-
|
|
17669
|
-
|
|
17670
|
-
|
|
17671
|
-
|
|
17672
|
-
|
|
17673
|
-
|
|
17674
|
-
source,
|
|
17675
|
-
surfaces: sourceSurfaces,
|
|
17676
|
-
...input.cliOutputPaths !== void 0 && { cliOutputPaths: input.cliOutputPaths }
|
|
17677
|
-
});
|
|
17678
|
-
const capped = extracted.slice(0, maxItemsPerFile);
|
|
17679
|
-
for (const item of capped) {
|
|
17680
|
-
counts[item.surface]++;
|
|
17681
|
-
items.push(item);
|
|
17682
|
-
}
|
|
17683
|
-
}
|
|
17684
|
-
}
|
|
17685
|
-
if (enabledSurfaces.has("commit")) {
|
|
17686
|
-
const result = extractCommits({
|
|
17687
|
-
projectRoot,
|
|
17688
|
-
...input.commitsSince !== void 0 && { since: input.commitsSince }
|
|
17689
|
-
});
|
|
17690
|
-
if (result.skipReason !== void 0) {
|
|
17691
|
-
skippedSurfaces.push({ surface: "commit", reason: result.skipReason });
|
|
17692
|
-
} else {
|
|
17693
|
-
for (const item of result.items) {
|
|
17694
|
-
counts.commit++;
|
|
17695
|
-
items.push(item);
|
|
17696
|
-
}
|
|
17697
|
-
}
|
|
17698
|
-
}
|
|
17699
|
-
if (enabledSurfaces.has("pr-description")) {
|
|
17700
|
-
const result = extractPRDescriptions({
|
|
17701
|
-
projectRoot,
|
|
17702
|
-
...input.prLimit !== void 0 && { limit: input.prLimit }
|
|
17703
|
-
});
|
|
17704
|
-
if (result.skipReason !== void 0) {
|
|
17705
|
-
skippedSurfaces.push({ surface: "pr-description", reason: result.skipReason });
|
|
17706
|
-
} else {
|
|
17707
|
-
for (const item of result.items) {
|
|
17708
|
-
counts["pr-description"]++;
|
|
17709
|
-
items.push(item);
|
|
17710
|
-
}
|
|
17711
|
-
}
|
|
17712
|
-
}
|
|
17713
|
-
const findings = [];
|
|
17714
|
-
for (const item of items) {
|
|
17715
|
-
for (const rubric of rubrics) {
|
|
17716
|
-
if (!rubricApplies2(rubric, item.surface)) continue;
|
|
17717
|
-
try {
|
|
17718
|
-
const finding = await critiqueOne3({ item, rubric, provider });
|
|
17719
|
-
if (finding !== null) findings.push(finding);
|
|
17720
|
-
} catch {
|
|
17721
|
-
}
|
|
17722
|
-
}
|
|
17777
|
+
items.push(
|
|
17778
|
+
...collectSourceItems({
|
|
17779
|
+
projectRoot,
|
|
17780
|
+
files: input.files,
|
|
17781
|
+
sourceSurfaces,
|
|
17782
|
+
maxFiles,
|
|
17783
|
+
maxItemsPerFile,
|
|
17784
|
+
cliOutputPaths: input.cliOutputPaths
|
|
17785
|
+
})
|
|
17786
|
+
);
|
|
17723
17787
|
}
|
|
17788
|
+
collectGitItems(input, projectRoot, enabledSurfaces, items, skippedSurfaces);
|
|
17789
|
+
const findings = await critiqueItems(items, rubrics, provider);
|
|
17724
17790
|
const surfacesScanned = ALL_SURFACES.filter(
|
|
17725
17791
|
(s) => enabledSurfaces.has(s) && !skippedSurfaces.some((sk) => sk.surface === s)
|
|
17726
17792
|
);
|
|
@@ -17741,12 +17807,89 @@ async function runCopyCraft(input) {
|
|
|
17741
17807
|
rubricsApplied: rubrics.map((r) => r.id),
|
|
17742
17808
|
surfacesScanned
|
|
17743
17809
|
},
|
|
17744
|
-
counts,
|
|
17810
|
+
counts: tallyCounts(items),
|
|
17745
17811
|
skippedSurfaces,
|
|
17746
17812
|
runId: randomUUID5()
|
|
17747
17813
|
}
|
|
17748
17814
|
};
|
|
17749
17815
|
}
|
|
17816
|
+
function collectSourceItems(args) {
|
|
17817
|
+
const out = [];
|
|
17818
|
+
const files = collectSourceFiles(args.projectRoot, args.files).slice(0, args.maxFiles);
|
|
17819
|
+
for (const file of files) {
|
|
17820
|
+
let source;
|
|
17821
|
+
try {
|
|
17822
|
+
source = fs45.readFileSync(file, "utf-8");
|
|
17823
|
+
} catch {
|
|
17824
|
+
continue;
|
|
17825
|
+
}
|
|
17826
|
+
const extracted = extractFromSource({
|
|
17827
|
+
file,
|
|
17828
|
+
source,
|
|
17829
|
+
surfaces: args.sourceSurfaces,
|
|
17830
|
+
...args.cliOutputPaths !== void 0 && { cliOutputPaths: args.cliOutputPaths }
|
|
17831
|
+
});
|
|
17832
|
+
out.push(...extracted.slice(0, args.maxItemsPerFile));
|
|
17833
|
+
}
|
|
17834
|
+
return out;
|
|
17835
|
+
}
|
|
17836
|
+
function collectExtractionResult(result, surface, items, skippedSurfaces) {
|
|
17837
|
+
if (result.skipReason !== void 0) {
|
|
17838
|
+
skippedSurfaces.push({ surface, reason: result.skipReason });
|
|
17839
|
+
} else {
|
|
17840
|
+
items.push(...result.items);
|
|
17841
|
+
}
|
|
17842
|
+
}
|
|
17843
|
+
function collectGitItems(input, projectRoot, enabledSurfaces, items, skippedSurfaces) {
|
|
17844
|
+
if (enabledSurfaces.has("commit")) {
|
|
17845
|
+
collectExtractionResult(
|
|
17846
|
+
extractCommits({
|
|
17847
|
+
projectRoot,
|
|
17848
|
+
...input.commitsSince !== void 0 && { since: input.commitsSince }
|
|
17849
|
+
}),
|
|
17850
|
+
"commit",
|
|
17851
|
+
items,
|
|
17852
|
+
skippedSurfaces
|
|
17853
|
+
);
|
|
17854
|
+
}
|
|
17855
|
+
if (enabledSurfaces.has("pr-description")) {
|
|
17856
|
+
collectExtractionResult(
|
|
17857
|
+
extractPRDescriptions({
|
|
17858
|
+
projectRoot,
|
|
17859
|
+
...input.prLimit !== void 0 && { limit: input.prLimit }
|
|
17860
|
+
}),
|
|
17861
|
+
"pr-description",
|
|
17862
|
+
items,
|
|
17863
|
+
skippedSurfaces
|
|
17864
|
+
);
|
|
17865
|
+
}
|
|
17866
|
+
}
|
|
17867
|
+
async function critiqueItems(items, rubrics, provider) {
|
|
17868
|
+
const findings = [];
|
|
17869
|
+
for (const item of items) {
|
|
17870
|
+
for (const rubric of rubrics) {
|
|
17871
|
+
if (!rubricApplies2(rubric, item.surface)) continue;
|
|
17872
|
+
try {
|
|
17873
|
+
const finding = await critiqueOne3({ item, rubric, provider });
|
|
17874
|
+
if (finding !== null) findings.push(finding);
|
|
17875
|
+
} catch {
|
|
17876
|
+
}
|
|
17877
|
+
}
|
|
17878
|
+
}
|
|
17879
|
+
return findings;
|
|
17880
|
+
}
|
|
17881
|
+
function tallyCounts(items) {
|
|
17882
|
+
const counts = {
|
|
17883
|
+
error: 0,
|
|
17884
|
+
log: 0,
|
|
17885
|
+
"cli-output": 0,
|
|
17886
|
+
commit: 0,
|
|
17887
|
+
"pr-description": 0,
|
|
17888
|
+
comment: 0
|
|
17889
|
+
};
|
|
17890
|
+
for (const item of items) counts[item.surface]++;
|
|
17891
|
+
return counts;
|
|
17892
|
+
}
|
|
17750
17893
|
function collectSourceFiles(projectRoot, explicitFiles) {
|
|
17751
17894
|
if (explicitFiles !== void 0 && explicitFiles.length > 0) {
|
|
17752
17895
|
return explicitFiles.map((f) => path48.isAbsolute(f) ? f : path48.join(projectRoot, f));
|
|
@@ -18184,57 +18327,15 @@ async function runTestCraft(input) {
|
|
|
18184
18327
|
const sourcePairEnabled = input.sourcePair !== false;
|
|
18185
18328
|
const frameworksFilter = input.frameworks !== void 0 ? new Set(input.frameworks) : null;
|
|
18186
18329
|
const files = collectTestFiles(projectRoot, input.files).slice(0, maxFiles);
|
|
18187
|
-
const
|
|
18188
|
-
|
|
18189
|
-
|
|
18190
|
-
|
|
18191
|
-
|
|
18192
|
-
playwright: 0,
|
|
18193
|
-
unknown: 0
|
|
18194
|
-
};
|
|
18195
|
-
let testsSkippedOrTodo = 0;
|
|
18196
|
-
let sourcePairedCount = 0;
|
|
18197
|
-
const sourcePairCache = /* @__PURE__ */ new Map();
|
|
18198
|
-
for (const file of files) {
|
|
18199
|
-
let source;
|
|
18200
|
-
try {
|
|
18201
|
-
source = fs47.readFileSync(file, "utf-8");
|
|
18202
|
-
} catch {
|
|
18203
|
-
continue;
|
|
18204
|
-
}
|
|
18205
|
-
const framework = detectFramework(source);
|
|
18206
|
-
if (frameworksFilter !== null && !frameworksFilter.has(framework)) continue;
|
|
18207
|
-
frameworksDetected[framework]++;
|
|
18208
|
-
const extracted = extractTests({ file, source, framework });
|
|
18209
|
-
const capped = extracted.slice(0, maxTestsPerFile);
|
|
18210
|
-
for (const test of capped) {
|
|
18211
|
-
if (test.todo) {
|
|
18212
|
-
testsSkippedOrTodo++;
|
|
18213
|
-
continue;
|
|
18214
|
-
}
|
|
18215
|
-
allTests.push(test);
|
|
18216
|
-
}
|
|
18217
|
-
if (sourcePairEnabled && !sourcePairCache.has(file)) {
|
|
18218
|
-
const result = resolveSourceFile(file);
|
|
18219
|
-
sourcePairCache.set(file, result);
|
|
18220
|
-
if (result !== null) sourcePairedCount++;
|
|
18221
|
-
}
|
|
18222
|
-
}
|
|
18330
|
+
const extraction = extractTestsFromFiles(files, {
|
|
18331
|
+
frameworksFilter,
|
|
18332
|
+
maxTestsPerFile,
|
|
18333
|
+
sourcePairEnabled
|
|
18334
|
+
});
|
|
18223
18335
|
const findings = [];
|
|
18224
|
-
for (const test of allTests) {
|
|
18225
|
-
const pair = sourcePairEnabled ? sourcePairCache.get(test.file) ?? null : null;
|
|
18226
|
-
|
|
18227
|
-
try {
|
|
18228
|
-
const finding = await critiqueOne4({
|
|
18229
|
-
test,
|
|
18230
|
-
rubric,
|
|
18231
|
-
provider,
|
|
18232
|
-
...pair !== null ? { sourcePair: pair } : {}
|
|
18233
|
-
});
|
|
18234
|
-
if (finding !== null) findings.push(finding);
|
|
18235
|
-
} catch {
|
|
18236
|
-
}
|
|
18237
|
-
}
|
|
18336
|
+
for (const test of extraction.allTests) {
|
|
18337
|
+
const pair = sourcePairEnabled ? extraction.sourcePairCache.get(test.file) ?? null : null;
|
|
18338
|
+
findings.push(...await critiqueTest(test, rubrics, provider, pair));
|
|
18238
18339
|
}
|
|
18239
18340
|
const totalCost = sumCosts4(provider);
|
|
18240
18341
|
return {
|
|
@@ -18252,15 +18353,80 @@ async function runTestCraft(input) {
|
|
|
18252
18353
|
catalog: { rubricsApplied: rubrics.map((r) => r.id) },
|
|
18253
18354
|
counts: {
|
|
18254
18355
|
filesScanned: files.length,
|
|
18255
|
-
testsExtracted: allTests.length,
|
|
18256
|
-
testsSkippedOrTodo,
|
|
18257
|
-
sourcePaired: sourcePairedCount
|
|
18356
|
+
testsExtracted: extraction.allTests.length,
|
|
18357
|
+
testsSkippedOrTodo: extraction.testsSkippedOrTodo,
|
|
18358
|
+
sourcePaired: extraction.sourcePairedCount
|
|
18258
18359
|
},
|
|
18259
|
-
frameworksDetected,
|
|
18360
|
+
frameworksDetected: extraction.frameworksDetected,
|
|
18260
18361
|
runId: randomUUID6()
|
|
18261
18362
|
}
|
|
18262
18363
|
};
|
|
18263
18364
|
}
|
|
18365
|
+
function readFileOrNull(file) {
|
|
18366
|
+
try {
|
|
18367
|
+
return fs47.readFileSync(file, "utf-8");
|
|
18368
|
+
} catch {
|
|
18369
|
+
return null;
|
|
18370
|
+
}
|
|
18371
|
+
}
|
|
18372
|
+
function collectNonTodoTests(tests, out) {
|
|
18373
|
+
let skipped = 0;
|
|
18374
|
+
for (const test of tests) {
|
|
18375
|
+
if (test.todo) skipped++;
|
|
18376
|
+
else out.push(test);
|
|
18377
|
+
}
|
|
18378
|
+
return skipped;
|
|
18379
|
+
}
|
|
18380
|
+
function extractTestsFromFiles(files, opts) {
|
|
18381
|
+
const allTests = [];
|
|
18382
|
+
const frameworksDetected = {
|
|
18383
|
+
vitest: 0,
|
|
18384
|
+
jest: 0,
|
|
18385
|
+
mocha: 0,
|
|
18386
|
+
playwright: 0,
|
|
18387
|
+
unknown: 0
|
|
18388
|
+
};
|
|
18389
|
+
let testsSkippedOrTodo = 0;
|
|
18390
|
+
let sourcePairedCount = 0;
|
|
18391
|
+
const sourcePairCache = /* @__PURE__ */ new Map();
|
|
18392
|
+
for (const file of files) {
|
|
18393
|
+
const source = readFileOrNull(file);
|
|
18394
|
+
if (source === null) continue;
|
|
18395
|
+
const framework = detectFramework(source);
|
|
18396
|
+
if (opts.frameworksFilter !== null && !opts.frameworksFilter.has(framework)) continue;
|
|
18397
|
+
frameworksDetected[framework]++;
|
|
18398
|
+
const capped = extractTests({ file, source, framework }).slice(0, opts.maxTestsPerFile);
|
|
18399
|
+
testsSkippedOrTodo += collectNonTodoTests(capped, allTests);
|
|
18400
|
+
if (opts.sourcePairEnabled && !sourcePairCache.has(file)) {
|
|
18401
|
+
const result = resolveSourceFile(file);
|
|
18402
|
+
sourcePairCache.set(file, result);
|
|
18403
|
+
if (result !== null) sourcePairedCount++;
|
|
18404
|
+
}
|
|
18405
|
+
}
|
|
18406
|
+
return {
|
|
18407
|
+
allTests,
|
|
18408
|
+
frameworksDetected,
|
|
18409
|
+
testsSkippedOrTodo,
|
|
18410
|
+
sourcePairedCount,
|
|
18411
|
+
sourcePairCache
|
|
18412
|
+
};
|
|
18413
|
+
}
|
|
18414
|
+
async function critiqueTest(test, rubrics, provider, pair) {
|
|
18415
|
+
const findings = [];
|
|
18416
|
+
for (const rubric of rubrics) {
|
|
18417
|
+
try {
|
|
18418
|
+
const finding = await critiqueOne4({
|
|
18419
|
+
test,
|
|
18420
|
+
rubric,
|
|
18421
|
+
provider,
|
|
18422
|
+
...pair !== null ? { sourcePair: pair } : {}
|
|
18423
|
+
});
|
|
18424
|
+
if (finding !== null) findings.push(finding);
|
|
18425
|
+
} catch {
|
|
18426
|
+
}
|
|
18427
|
+
}
|
|
18428
|
+
return findings;
|
|
18429
|
+
}
|
|
18264
18430
|
function collectTestFiles(projectRoot, explicitFiles) {
|
|
18265
18431
|
if (explicitFiles !== void 0 && explicitFiles.length > 0) {
|
|
18266
18432
|
return explicitFiles.map((f) => path50.isAbsolute(f) ? f : path50.join(projectRoot, f));
|
|
@@ -18990,21 +19156,30 @@ function findSecretMarker(node) {
|
|
|
18990
19156
|
if (ts7.isIdentifier(node) && SECRET_NAME_PATTERN.test(node.text)) return node.text;
|
|
18991
19157
|
if (ts7.isPropertyAccessExpression(node) && ts7.isIdentifier(node.name) && SECRET_NAME_PATTERN.test(node.name.text))
|
|
18992
19158
|
return node.name.text;
|
|
18993
|
-
if (ts7.isTemplateExpression(node))
|
|
18994
|
-
|
|
18995
|
-
|
|
18996
|
-
|
|
18997
|
-
|
|
19159
|
+
if (ts7.isTemplateExpression(node)) return findSecretInTemplate(node);
|
|
19160
|
+
if (ts7.isObjectLiteralExpression(node)) return findSecretInObjectLiteral(node);
|
|
19161
|
+
return void 0;
|
|
19162
|
+
}
|
|
19163
|
+
function findSecretInTemplate(node) {
|
|
19164
|
+
for (const span of node.templateSpans) {
|
|
19165
|
+
const sub = findSecretMarker(span.expression);
|
|
19166
|
+
if (sub !== void 0) return sub;
|
|
18998
19167
|
}
|
|
18999
|
-
|
|
19000
|
-
|
|
19001
|
-
|
|
19002
|
-
|
|
19003
|
-
|
|
19004
|
-
|
|
19005
|
-
|
|
19006
|
-
|
|
19007
|
-
|
|
19168
|
+
return void 0;
|
|
19169
|
+
}
|
|
19170
|
+
function findSecretInObjectLiteral(node) {
|
|
19171
|
+
for (const prop of node.properties) {
|
|
19172
|
+
const marker = secretMarkerFromProperty(prop);
|
|
19173
|
+
if (marker !== void 0) return marker;
|
|
19174
|
+
}
|
|
19175
|
+
return void 0;
|
|
19176
|
+
}
|
|
19177
|
+
function secretMarkerFromProperty(prop) {
|
|
19178
|
+
if (ts7.isPropertyAssignment(prop) && ts7.isIdentifier(prop.name) && SECRET_NAME_PATTERN.test(prop.name.text)) {
|
|
19179
|
+
return prop.name.text;
|
|
19180
|
+
}
|
|
19181
|
+
if (ts7.isShorthandPropertyAssignment(prop) && SECRET_NAME_PATTERN.test(prop.name.text)) {
|
|
19182
|
+
return prop.name.text;
|
|
19008
19183
|
}
|
|
19009
19184
|
return void 0;
|
|
19010
19185
|
}
|
|
@@ -19176,21 +19351,28 @@ function sliceAroundLine(source, line, maxChars) {
|
|
|
19176
19351
|
if (source.length <= maxChars) return source;
|
|
19177
19352
|
const lines = source.split("\n");
|
|
19178
19353
|
const targetIdx = Math.max(0, Math.min(lines.length - 1, line - 1));
|
|
19354
|
+
const { lo, hi } = expandWindow(lines, targetIdx, maxChars);
|
|
19355
|
+
return lines.slice(lo, hi + 1).join("\n");
|
|
19356
|
+
}
|
|
19357
|
+
function lineLen(lines, idx) {
|
|
19358
|
+
return lines[idx]?.length ?? 0;
|
|
19359
|
+
}
|
|
19360
|
+
function expandWindow(lines, targetIdx, maxChars) {
|
|
19179
19361
|
let lo = targetIdx;
|
|
19180
19362
|
let hi = targetIdx;
|
|
19181
|
-
let len = lines
|
|
19363
|
+
let len = lineLen(lines, targetIdx);
|
|
19182
19364
|
while (len < maxChars && (lo > 0 || hi < lines.length - 1)) {
|
|
19183
19365
|
if (lo > 0) {
|
|
19184
19366
|
lo--;
|
|
19185
|
-
len += (lines
|
|
19367
|
+
len += lineLen(lines, lo) + 1;
|
|
19186
19368
|
if (len >= maxChars) break;
|
|
19187
19369
|
}
|
|
19188
19370
|
if (hi < lines.length - 1) {
|
|
19189
19371
|
hi++;
|
|
19190
|
-
len += (lines
|
|
19372
|
+
len += lineLen(lines, hi) + 1;
|
|
19191
19373
|
}
|
|
19192
19374
|
}
|
|
19193
|
-
return
|
|
19375
|
+
return { lo, hi };
|
|
19194
19376
|
}
|
|
19195
19377
|
function parseFencedJson6(raw) {
|
|
19196
19378
|
const match = /```(?:json)?\s*\n?([\s\S]*?)\n?\s*```/.exec(raw);
|
|
@@ -19385,7 +19567,7 @@ async function resolveAnalysisProvider(model) {
|
|
|
19385
19567
|
}
|
|
19386
19568
|
}
|
|
19387
19569
|
async function emptyGraphStore() {
|
|
19388
|
-
const { GraphStore } = await import("./dist-
|
|
19570
|
+
const { GraphStore } = await import("./dist-DWBTZXR5.js");
|
|
19389
19571
|
return new GraphStore();
|
|
19390
19572
|
}
|
|
19391
19573
|
function validateInput(input) {
|
|
@@ -19583,7 +19765,7 @@ async function handleValidateStrategy(input) {
|
|
|
19583
19765
|
} catch (error) {
|
|
19584
19766
|
return mcpError2(error instanceof Error ? error.message : String(error));
|
|
19585
19767
|
}
|
|
19586
|
-
const { validateStrategy } = await import("./dist-
|
|
19768
|
+
const { validateStrategy } = await import("./dist-6D2F2J57.js");
|
|
19587
19769
|
const result = await validateStrategy(projectPath);
|
|
19588
19770
|
if (!result.ok) {
|
|
19589
19771
|
return mcpJson({ present: true, valid: false, error: result.error.message });
|
|
@@ -19608,7 +19790,7 @@ async function handleReadStrategy(input) {
|
|
|
19608
19790
|
} catch (error) {
|
|
19609
19791
|
return mcpError2(error instanceof Error ? error.message : String(error));
|
|
19610
19792
|
}
|
|
19611
|
-
const core = await import("./dist-
|
|
19793
|
+
const core = await import("./dist-6D2F2J57.js");
|
|
19612
19794
|
const validation = await core.validateStrategy(projectPath);
|
|
19613
19795
|
if (!validation.ok) {
|
|
19614
19796
|
return mcpJson({ present: true, valid: false, error: validation.error.message });
|
|
@@ -19660,7 +19842,7 @@ async function handleWriteStrategy(input) {
|
|
|
19660
19842
|
} catch (error) {
|
|
19661
19843
|
return mcpError2(error instanceof Error ? error.message : String(error));
|
|
19662
19844
|
}
|
|
19663
|
-
const core = await import("./dist-
|
|
19845
|
+
const core = await import("./dist-6D2F2J57.js");
|
|
19664
19846
|
try {
|
|
19665
19847
|
core.writeStrategyDoc(input.doc, {
|
|
19666
19848
|
cwd: projectPath,
|
|
@@ -19704,7 +19886,7 @@ async function handleSeedPulseFromStrategy(input) {
|
|
|
19704
19886
|
} catch (error) {
|
|
19705
19887
|
return mcpError3(error instanceof Error ? error.message : String(error));
|
|
19706
19888
|
}
|
|
19707
|
-
const core = await import("./dist-
|
|
19889
|
+
const core = await import("./dist-6D2F2J57.js");
|
|
19708
19890
|
const seed = core.seedFromStrategy({ cwd: projectPath });
|
|
19709
19891
|
return mcpJson2(seed);
|
|
19710
19892
|
}
|
|
@@ -19739,7 +19921,7 @@ async function handleWritePulseConfig(input) {
|
|
|
19739
19921
|
return mcpError3(error instanceof Error ? error.message : String(error));
|
|
19740
19922
|
}
|
|
19741
19923
|
const resolvedConfigPath = input.configPath !== void 0 ? path55.isAbsolute(input.configPath) ? input.configPath : path55.join(projectPath, input.configPath) : path55.join(projectPath, "harness.config.json");
|
|
19742
|
-
const core = await import("./dist-
|
|
19924
|
+
const core = await import("./dist-6D2F2J57.js");
|
|
19743
19925
|
try {
|
|
19744
19926
|
core.writePulseConfig(input.config, {
|
|
19745
19927
|
configPath: resolvedConfigPath,
|
|
@@ -19788,7 +19970,7 @@ async function handleAcquireCompoundLock(input) {
|
|
|
19788
19970
|
} catch (error) {
|
|
19789
19971
|
return mcpError4(error instanceof Error ? error.message : String(error));
|
|
19790
19972
|
}
|
|
19791
|
-
const core = await import("./dist-
|
|
19973
|
+
const core = await import("./dist-6D2F2J57.js");
|
|
19792
19974
|
try {
|
|
19793
19975
|
const handle = core.acquireCompoundLock(
|
|
19794
19976
|
input.category,
|
|
@@ -20152,7 +20334,7 @@ async function appendUpdateNotification(result, resolvedRoot) {
|
|
|
20152
20334
|
shouldRunCheck,
|
|
20153
20335
|
readCheckState,
|
|
20154
20336
|
spawnBackgroundCheck
|
|
20155
|
-
} = await import("./dist-
|
|
20337
|
+
} = await import("./dist-6D2F2J57.js");
|
|
20156
20338
|
const { CLI_VERSION } = await import("./version-CUI434OP.js");
|
|
20157
20339
|
const configInterval = readConfigInterval(resolvedRoot);
|
|
20158
20340
|
const DEFAULT_INTERVAL = 864e5;
|