nexus-agents 2.77.13 → 2.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{child-mcp-config-MJMUF7TL.js → child-mcp-config-CTO2MBRM.js} +3 -4
- package/dist/{child-mcp-config-MJMUF7TL.js.map → child-mcp-config-CTO2MBRM.js.map} +1 -1
- package/dist/{chunk-YJ2IGAD2.js → chunk-2UYTFLMO.js} +2 -2
- package/dist/{chunk-6AY5DK4E.js → chunk-2YPG6PDG.js} +3 -3
- package/dist/{chunk-3VWMM6UF.js → chunk-3NIPH6UP.js} +2 -2
- package/dist/{chunk-GFKGL2GQ.js → chunk-3ULMVOIF.js} +171 -83
- package/dist/chunk-3ULMVOIF.js.map +1 -0
- package/dist/{chunk-JN6UWGHH.js → chunk-5O6XLBPP.js} +2 -2
- package/dist/{chunk-ERWXGXV2.js → chunk-6TFTVW77.js} +3 -3
- package/dist/{chunk-GOT7OAL5.js → chunk-7BMOZJYS.js} +29 -5
- package/dist/chunk-7BMOZJYS.js.map +1 -0
- package/dist/{chunk-C2LLQ6TW.js → chunk-7XCUZI4G.js} +4 -4
- package/dist/chunk-7XCUZI4G.js.map +1 -0
- package/dist/{chunk-TDV5ALHY.js → chunk-D6TM2VHX.js} +3 -3
- package/dist/{chunk-PWTJGGKB.js → chunk-DLXT23AC.js} +2 -2
- package/dist/chunk-DNO2INX5.js +276 -0
- package/dist/chunk-DNO2INX5.js.map +1 -0
- package/dist/{chunk-G2CSKBY5.js → chunk-FJWWSVWB.js} +29 -6
- package/dist/chunk-FJWWSVWB.js.map +1 -0
- package/dist/{chunk-DSQ5XM4O.js → chunk-FVPYP5DD.js} +4 -4
- package/dist/{chunk-MGLWPN2I.js → chunk-GONMG4NM.js} +2 -2
- package/dist/{chunk-YQMQSJQK.js → chunk-HYU4GZY6.js} +2 -2
- package/dist/{chunk-3DH5SLFH.js → chunk-K2QILJG4.js} +6 -6
- package/dist/{chunk-5WHWKY32.js → chunk-KT5FIBWS.js} +2 -2
- package/dist/{chunk-DIB6V67T.js → chunk-L6SCKLGO.js} +3 -3
- package/dist/{chunk-IPWCD22D.js → chunk-PLX6FCFC.js} +2 -2
- package/dist/chunk-PQHVC4BD.js +639 -0
- package/dist/chunk-PQHVC4BD.js.map +1 -0
- package/dist/chunk-Q5CFPIJ5.js +5581 -0
- package/dist/chunk-Q5CFPIJ5.js.map +1 -0
- package/dist/{chunk-G6ZPVADX.js → chunk-SD76JZBG.js} +2 -2
- package/dist/{chunk-Y2CP4Z5B.js → chunk-SWFJU3W2.js} +220 -4580
- package/dist/chunk-SWFJU3W2.js.map +1 -0
- package/dist/{chunk-3MRM53T4.js → chunk-WDYCIJWN.js} +640 -470
- package/dist/chunk-WDYCIJWN.js.map +1 -0
- package/dist/{chunk-RBZ4CDMY.js → chunk-YMMYYAZT.js} +5 -5
- package/dist/{chunk-CM3TORGV.js → chunk-YXWGEIQR.js} +2 -2
- package/dist/{chunk-JX6OI4FS.js → chunk-ZI6G7U7Y.js} +125 -33
- package/dist/chunk-ZI6G7U7Y.js.map +1 -0
- package/dist/{chunk-7NK7BTWP.js → chunk-ZVCED4Z4.js} +2 -2
- package/dist/cli-circuit-breaker-I74ZQ44Q.js +13 -0
- package/dist/cli.js +109 -58
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-S6E26BCI.js → composite-router-V3OC57IE.js} +3 -4
- package/dist/consensus-vote-ESFPGEJE.js +30 -0
- package/dist/context-retriever-MB3D7KS6.js +18 -0
- package/dist/dist-NIXVXYIH.js +42 -0
- package/dist/doctor-deep-KQ765XZA.js +12 -0
- package/dist/expert-bridge-JKLC57IC.js +10 -0
- package/dist/factory-BUUXNGIB.js +14 -0
- package/dist/{factory-X3VKIGKP.js → factory-LHHYDVZX.js} +5 -6
- package/dist/index.d.ts +72 -8
- package/dist/index.js +208 -316
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-CFE7M6XA.js → init-opencode-GXZN2W5S.js} +6 -7
- package/dist/{init-opencode-CFE7M6XA.js.map → init-opencode-GXZN2W5S.js.map} +1 -1
- package/dist/issue-triage-RMXPDZ2K.js +15 -0
- package/dist/{learning-persistence-N6ILD2HX.js → learning-persistence-Q3HTOGTU.js} +2 -3
- package/dist/outcome-store-adapter-QRFJJIKB.js +57 -0
- package/dist/outcome-store-adapter-QRFJJIKB.js.map +1 -0
- package/dist/{registry-command-RPPC7N2K.js → registry-command-6E4YKAMT.js} +3 -4
- package/dist/{registry-command-RPPC7N2K.js.map → registry-command-6E4YKAMT.js.map} +1 -1
- package/dist/{repo-security-plan-7ZCDVH5O.js → repo-security-plan-AGRU72DL.js} +4 -5
- package/dist/research-helpers-synthesize-K2UCJQQG.js +13 -0
- package/dist/{routing-memory-5VTX7LQX.js → routing-memory-3B6DDZ76.js} +3 -4
- package/dist/{session-memory-7XBV6BMY.js → session-memory-L7EQIY2O.js} +4 -5
- package/dist/{setup-command-W6UKPODL.js → setup-command-R4BOEMLZ.js} +11 -12
- package/dist/setup-config-EQT24DD4.js +10 -0
- package/dist/{setup-custom-api-WM5W5AY5.js → setup-custom-api-IBDV654K.js} +5 -6
- package/dist/{setup-custom-api-WM5W5AY5.js.map → setup-custom-api-IBDV654K.js.map} +1 -1
- package/dist/tool-memory-6HCHQLAN.js +19 -0
- package/dist/{weather-report-YJMVKJGA.js → weather-report-ER3WUZ7S.js} +3 -4
- package/package.json +3 -2
- package/dist/adaptive-memory-EI564K4C.js +0 -16
- package/dist/chunk-3MRM53T4.js.map +0 -1
- package/dist/chunk-BJ2OMC7P.js +0 -944
- package/dist/chunk-BJ2OMC7P.js.map +0 -1
- package/dist/chunk-C2LLQ6TW.js.map +0 -1
- package/dist/chunk-G2CSKBY5.js.map +0 -1
- package/dist/chunk-GFKGL2GQ.js.map +0 -1
- package/dist/chunk-GOT7OAL5.js.map +0 -1
- package/dist/chunk-I7ORMAO7.js +0 -32
- package/dist/chunk-I7ORMAO7.js.map +0 -1
- package/dist/chunk-JX6OI4FS.js.map +0 -1
- package/dist/chunk-Y2CP4Z5B.js.map +0 -1
- package/dist/cli-circuit-breaker-YX4BWZD5.js +0 -14
- package/dist/consensus-vote-MUQ4HPIF.js +0 -30
- package/dist/doctor-deep-BRU5ZUJI.js +0 -13
- package/dist/expert-bridge-ZPNVLJVN.js +0 -11
- package/dist/factory-A7DTCCUY.js +0 -15
- package/dist/issue-triage-6XD6CVPB.js +0 -16
- package/dist/mobimem-CG2MNS7V.js +0 -14
- package/dist/nexus-data-dir-77UO7N6J.js +0 -12
- package/dist/research-helpers-synthesize-36TUTUUA.js +0 -14
- package/dist/setup-config-EI5KROA3.js +0 -11
- /package/dist/{chunk-YJ2IGAD2.js.map → chunk-2UYTFLMO.js.map} +0 -0
- /package/dist/{chunk-6AY5DK4E.js.map → chunk-2YPG6PDG.js.map} +0 -0
- /package/dist/{chunk-3VWMM6UF.js.map → chunk-3NIPH6UP.js.map} +0 -0
- /package/dist/{chunk-JN6UWGHH.js.map → chunk-5O6XLBPP.js.map} +0 -0
- /package/dist/{chunk-ERWXGXV2.js.map → chunk-6TFTVW77.js.map} +0 -0
- /package/dist/{chunk-TDV5ALHY.js.map → chunk-D6TM2VHX.js.map} +0 -0
- /package/dist/{chunk-PWTJGGKB.js.map → chunk-DLXT23AC.js.map} +0 -0
- /package/dist/{chunk-DSQ5XM4O.js.map → chunk-FVPYP5DD.js.map} +0 -0
- /package/dist/{chunk-MGLWPN2I.js.map → chunk-GONMG4NM.js.map} +0 -0
- /package/dist/{chunk-YQMQSJQK.js.map → chunk-HYU4GZY6.js.map} +0 -0
- /package/dist/{chunk-3DH5SLFH.js.map → chunk-K2QILJG4.js.map} +0 -0
- /package/dist/{chunk-5WHWKY32.js.map → chunk-KT5FIBWS.js.map} +0 -0
- /package/dist/{chunk-DIB6V67T.js.map → chunk-L6SCKLGO.js.map} +0 -0
- /package/dist/{chunk-IPWCD22D.js.map → chunk-PLX6FCFC.js.map} +0 -0
- /package/dist/{chunk-G6ZPVADX.js.map → chunk-SD76JZBG.js.map} +0 -0
- /package/dist/{chunk-RBZ4CDMY.js.map → chunk-YMMYYAZT.js.map} +0 -0
- /package/dist/{chunk-CM3TORGV.js.map → chunk-YXWGEIQR.js.map} +0 -0
- /package/dist/{chunk-7NK7BTWP.js.map → chunk-ZVCED4Z4.js.map} +0 -0
- /package/dist/{adaptive-memory-EI564K4C.js.map → cli-circuit-breaker-I74ZQ44Q.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-YX4BWZD5.js.map → composite-router-V3OC57IE.js.map} +0 -0
- /package/dist/{composite-router-S6E26BCI.js.map → consensus-vote-ESFPGEJE.js.map} +0 -0
- /package/dist/{consensus-vote-MUQ4HPIF.js.map → context-retriever-MB3D7KS6.js.map} +0 -0
- /package/dist/{doctor-deep-BRU5ZUJI.js.map → dist-NIXVXYIH.js.map} +0 -0
- /package/dist/{expert-bridge-ZPNVLJVN.js.map → doctor-deep-KQ765XZA.js.map} +0 -0
- /package/dist/{factory-A7DTCCUY.js.map → expert-bridge-JKLC57IC.js.map} +0 -0
- /package/dist/{factory-X3VKIGKP.js.map → factory-BUUXNGIB.js.map} +0 -0
- /package/dist/{issue-triage-6XD6CVPB.js.map → factory-LHHYDVZX.js.map} +0 -0
- /package/dist/{learning-persistence-N6ILD2HX.js.map → issue-triage-RMXPDZ2K.js.map} +0 -0
- /package/dist/{mobimem-CG2MNS7V.js.map → learning-persistence-Q3HTOGTU.js.map} +0 -0
- /package/dist/{nexus-data-dir-77UO7N6J.js.map → repo-security-plan-AGRU72DL.js.map} +0 -0
- /package/dist/{repo-security-plan-7ZCDVH5O.js.map → research-helpers-synthesize-K2UCJQQG.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-36TUTUUA.js.map → routing-memory-3B6DDZ76.js.map} +0 -0
- /package/dist/{routing-memory-5VTX7LQX.js.map → session-memory-L7EQIY2O.js.map} +0 -0
- /package/dist/{session-memory-7XBV6BMY.js.map → setup-command-R4BOEMLZ.js.map} +0 -0
- /package/dist/{setup-command-W6UKPODL.js.map → setup-config-EQT24DD4.js.map} +0 -0
- /package/dist/{setup-config-EI5KROA3.js.map → tool-memory-6HCHQLAN.js.map} +0 -0
- /package/dist/{weather-report-YJMVKJGA.js.map → weather-report-ER3WUZ7S.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runConfigInitSync
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YXWGEIQR.js";
|
|
4
4
|
import {
|
|
5
5
|
VERSION,
|
|
6
6
|
checkApiKeys,
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
checkSqlite,
|
|
9
9
|
defaultConfig,
|
|
10
10
|
initDataDirectories
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZI6G7U7Y.js";
|
|
12
12
|
import {
|
|
13
13
|
probeAllClis
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D6TM2VHX.js";
|
|
15
15
|
import {
|
|
16
16
|
BUILT_IN_EXPERTS
|
|
17
17
|
} from "./chunk-ZM4O442V.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
getErrorMessage,
|
|
26
26
|
getTimeProvider,
|
|
27
27
|
symbols
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-WDYCIJWN.js";
|
|
29
29
|
|
|
30
30
|
// src/cli/setup-command.ts
|
|
31
31
|
import { existsSync as existsSync4 } from "fs";
|
|
@@ -1948,4 +1948,4 @@ export {
|
|
|
1948
1948
|
setupCommand,
|
|
1949
1949
|
setupCommandAsync
|
|
1950
1950
|
};
|
|
1951
|
-
//# sourceMappingURL=chunk-
|
|
1951
|
+
//# sourceMappingURL=chunk-YMMYYAZT.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getErrorMessage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WDYCIJWN.js";
|
|
4
4
|
|
|
5
5
|
// src/cli/setup-config.ts
|
|
6
6
|
import { copyFileSync, existsSync, writeFileSync } from "fs";
|
|
@@ -74,4 +74,4 @@ function ensureBackup(outputPath) {
|
|
|
74
74
|
export {
|
|
75
75
|
runConfigInitSync
|
|
76
76
|
};
|
|
77
|
-
//# sourceMappingURL=chunk-
|
|
77
|
+
//# sourceMappingURL=chunk-YXWGEIQR.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULTS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HYU4GZY6.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveInsideRoot
|
|
6
6
|
} from "./chunk-NUBSJGQZ.js";
|
|
7
|
-
import {
|
|
8
|
-
createAllAdapters,
|
|
9
|
-
probeCli
|
|
10
|
-
} from "./chunk-TDV5ALHY.js";
|
|
11
7
|
import {
|
|
12
8
|
capitalize
|
|
13
9
|
} from "./chunk-633WH2ML.js";
|
|
10
|
+
import {
|
|
11
|
+
createAllAdapters,
|
|
12
|
+
probeCli
|
|
13
|
+
} from "./chunk-D6TM2VHX.js";
|
|
14
14
|
import {
|
|
15
15
|
CliNameSchema,
|
|
16
16
|
DEFAULT_CAPABILITIES,
|
|
@@ -27,20 +27,18 @@ import {
|
|
|
27
27
|
ok,
|
|
28
28
|
symbols,
|
|
29
29
|
writeLine
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-WDYCIJWN.js";
|
|
31
31
|
import {
|
|
32
|
+
detectSandbox,
|
|
32
33
|
getLearningDir,
|
|
34
|
+
getNexusDataDir,
|
|
33
35
|
getOutcomesFile,
|
|
34
36
|
getRulesFile,
|
|
35
37
|
isPersistenceEnabled
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import {
|
|
38
|
-
detectSandbox,
|
|
39
|
-
getNexusDataDir
|
|
40
|
-
} from "./chunk-GOT7OAL5.js";
|
|
38
|
+
} from "./chunk-7BMOZJYS.js";
|
|
41
39
|
|
|
42
40
|
// src/version.ts
|
|
43
|
-
var VERSION = true ? "2.
|
|
41
|
+
var VERSION = true ? "2.79.0" : "dev";
|
|
44
42
|
|
|
45
43
|
// src/config/schemas-core.ts
|
|
46
44
|
import { z } from "zod";
|
|
@@ -1297,18 +1295,18 @@ function getConfig(options) {
|
|
|
1297
1295
|
}
|
|
1298
1296
|
|
|
1299
1297
|
// src/cli/setup-data-dir.ts
|
|
1300
|
-
import { mkdirSync, existsSync as
|
|
1301
|
-
import { join as
|
|
1298
|
+
import { mkdirSync, existsSync as existsSync4 } from "fs";
|
|
1299
|
+
import { join as join4 } from "path";
|
|
1302
1300
|
|
|
1303
1301
|
// src/cli/doctor.ts
|
|
1304
1302
|
import {
|
|
1305
|
-
existsSync as
|
|
1306
|
-
readFileSync as
|
|
1303
|
+
existsSync as existsSync3,
|
|
1304
|
+
readFileSync as readFileSync3,
|
|
1307
1305
|
readdirSync,
|
|
1308
1306
|
accessSync,
|
|
1309
1307
|
constants as fsConstants
|
|
1310
1308
|
} from "fs";
|
|
1311
|
-
import { join as
|
|
1309
|
+
import { join as join3 } from "path";
|
|
1312
1310
|
|
|
1313
1311
|
// src/mcp/server.ts
|
|
1314
1312
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -1770,8 +1768,100 @@ function printDoctorResults(result) {
|
|
|
1770
1768
|
printDataDirectory(result.dataDirectory);
|
|
1771
1769
|
writeLine("");
|
|
1772
1770
|
printSandbox(result.sandbox);
|
|
1771
|
+
printHarnessAlignment(result.harnessAlignment);
|
|
1773
1772
|
printDoctorSummary(result);
|
|
1774
1773
|
}
|
|
1774
|
+
function printHarnessAlignment(check) {
|
|
1775
|
+
writeLine(`${colors.cyan}Checking agent-harness alignment...${colors.reset}`);
|
|
1776
|
+
writeLine("");
|
|
1777
|
+
writeLine(
|
|
1778
|
+
`${formatStatus(check.agentsMdExists)} AGENTS.md: ${check.agentsMdExists ? "present (federated surface)" : "MISSING \u2014 federation invariant broken"}`
|
|
1779
|
+
);
|
|
1780
|
+
for (const f of check.files) {
|
|
1781
|
+
if (!f.exists) {
|
|
1782
|
+
writeLine(` ${colors.gray}\u25CB${colors.reset} ${f.harness}: not present (${f.path})`);
|
|
1783
|
+
continue;
|
|
1784
|
+
}
|
|
1785
|
+
if (f.error !== null) {
|
|
1786
|
+
writeLine(` ${colors.red}\u2717${colors.reset} ${f.harness}: ${f.error}`);
|
|
1787
|
+
continue;
|
|
1788
|
+
}
|
|
1789
|
+
if (f.redirectsToAgentsMd) {
|
|
1790
|
+
writeLine(` ${colors.green}\u2713${colors.reset} ${f.harness}: aligned (${f.path})`);
|
|
1791
|
+
} else {
|
|
1792
|
+
writeLine(
|
|
1793
|
+
` ${colors.yellow}\u26A0${colors.reset} ${f.harness}: drift \u2014 ${f.path} exists but does NOT mention AGENTS.md`
|
|
1794
|
+
);
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
writeLine("");
|
|
1798
|
+
writeLine(
|
|
1799
|
+
` Summary: ${String(check.alignedCount)} aligned, ${String(check.driftCount)} drift, ${String(check.missingCount)} absent`
|
|
1800
|
+
);
|
|
1801
|
+
if (check.driftCount > 0) {
|
|
1802
|
+
writeLine(
|
|
1803
|
+
` ${colors.yellow}Drift detected.${colors.reset} Per docs/architecture/AGENT_COMPATIBILITY.md, harness configs must redirect to AGENTS.md \u2014 never duplicate content.`
|
|
1804
|
+
);
|
|
1805
|
+
}
|
|
1806
|
+
writeLine("");
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
// src/cli/doctor-harness-alignment.ts
|
|
1810
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
1811
|
+
import { join as join2 } from "path";
|
|
1812
|
+
var HARNESS_FILES = [
|
|
1813
|
+
{ harness: "Cursor", path: ".cursor/rules/agents.mdc" },
|
|
1814
|
+
{ harness: "Windsurf", path: ".windsurf/rules/agents.md" },
|
|
1815
|
+
{ harness: "Aider", path: ".aider.conf.yml" },
|
|
1816
|
+
{ harness: "Continue", path: ".continue/rules/agents.md" },
|
|
1817
|
+
{ harness: "Cline", path: ".clinerules/agents.md" }
|
|
1818
|
+
];
|
|
1819
|
+
function checkHarnessAlignment(cwd = process.cwd()) {
|
|
1820
|
+
const agentsMdPath = join2(cwd, "AGENTS.md");
|
|
1821
|
+
const agentsMdExists = existsSync2(agentsMdPath);
|
|
1822
|
+
const files = HARNESS_FILES.map(
|
|
1823
|
+
({ harness, path }) => inspectFile(harness, path, join2(cwd, path))
|
|
1824
|
+
);
|
|
1825
|
+
const alignedCount = files.filter((f) => f.exists && f.redirectsToAgentsMd).length;
|
|
1826
|
+
const driftCount = files.filter((f) => f.exists && !f.redirectsToAgentsMd).length;
|
|
1827
|
+
const missingCount = files.filter((f) => !f.exists).length;
|
|
1828
|
+
return {
|
|
1829
|
+
agentsMdExists,
|
|
1830
|
+
files,
|
|
1831
|
+
alignedCount,
|
|
1832
|
+
driftCount,
|
|
1833
|
+
missingCount
|
|
1834
|
+
};
|
|
1835
|
+
}
|
|
1836
|
+
function inspectFile(harness, relativePath, absolutePath) {
|
|
1837
|
+
if (!existsSync2(absolutePath)) {
|
|
1838
|
+
return {
|
|
1839
|
+
harness,
|
|
1840
|
+
path: relativePath,
|
|
1841
|
+
exists: false,
|
|
1842
|
+
redirectsToAgentsMd: false,
|
|
1843
|
+
error: null
|
|
1844
|
+
};
|
|
1845
|
+
}
|
|
1846
|
+
try {
|
|
1847
|
+
const content = readFileSync2(absolutePath, "utf-8");
|
|
1848
|
+
return {
|
|
1849
|
+
harness,
|
|
1850
|
+
path: relativePath,
|
|
1851
|
+
exists: true,
|
|
1852
|
+
redirectsToAgentsMd: content.includes("AGENTS.md"),
|
|
1853
|
+
error: null
|
|
1854
|
+
};
|
|
1855
|
+
} catch (error) {
|
|
1856
|
+
return {
|
|
1857
|
+
harness,
|
|
1858
|
+
path: relativePath,
|
|
1859
|
+
exists: true,
|
|
1860
|
+
redirectsToAgentsMd: false,
|
|
1861
|
+
error: error instanceof Error ? error.message : String(error)
|
|
1862
|
+
};
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1775
1865
|
|
|
1776
1866
|
// src/cli/doctor.ts
|
|
1777
1867
|
var REQUIRED_NODE_MAJOR2 = 22;
|
|
@@ -1901,7 +1991,7 @@ function checkApiKeys() {
|
|
|
1901
1991
|
}
|
|
1902
1992
|
function checkConfigFile() {
|
|
1903
1993
|
for (const configPath of CONFIG_FILE_PATHS) {
|
|
1904
|
-
if (
|
|
1994
|
+
if (existsSync3(configPath)) {
|
|
1905
1995
|
return { found: true, path: configPath };
|
|
1906
1996
|
}
|
|
1907
1997
|
}
|
|
@@ -1942,11 +2032,11 @@ function buildRegistryAdvisory(cliResults) {
|
|
|
1942
2032
|
function hasPriorUsage() {
|
|
1943
2033
|
try {
|
|
1944
2034
|
const root = getNexusDataDir();
|
|
1945
|
-
if (!
|
|
2035
|
+
if (!existsSync3(root)) return false;
|
|
1946
2036
|
for (const sub of ["audit", "learning", "sessions", "voting"]) {
|
|
1947
2037
|
const p = `${root}/${sub}`;
|
|
1948
2038
|
try {
|
|
1949
|
-
if (
|
|
2039
|
+
if (existsSync3(p) && readdirSync(p).length > 0) return true;
|
|
1950
2040
|
} catch {
|
|
1951
2041
|
}
|
|
1952
2042
|
}
|
|
@@ -1956,13 +2046,13 @@ function hasPriorUsage() {
|
|
|
1956
2046
|
}
|
|
1957
2047
|
}
|
|
1958
2048
|
function countJsonlLines(filePath) {
|
|
1959
|
-
if (!
|
|
1960
|
-
return
|
|
2049
|
+
if (!existsSync3(filePath)) return 0;
|
|
2050
|
+
return readFileSync3(filePath, "utf-8").split("\n").filter((l) => l.trim().length > 0).length;
|
|
1961
2051
|
}
|
|
1962
2052
|
function readRulesMetadata(filePath) {
|
|
1963
|
-
if (!
|
|
2053
|
+
if (!existsSync3(filePath)) return { count: 0, savedAt: null };
|
|
1964
2054
|
try {
|
|
1965
|
-
const raw = JSON.parse(
|
|
2055
|
+
const raw = JSON.parse(readFileSync3(filePath, "utf-8"));
|
|
1966
2056
|
const rules = raw["rules"];
|
|
1967
2057
|
const saved = raw["savedAt"];
|
|
1968
2058
|
return {
|
|
@@ -1974,7 +2064,7 @@ function readRulesMetadata(filePath) {
|
|
|
1974
2064
|
}
|
|
1975
2065
|
}
|
|
1976
2066
|
function checkDirAccess(dir) {
|
|
1977
|
-
const exists =
|
|
2067
|
+
const exists = existsSync3(dir);
|
|
1978
2068
|
if (!exists) return { exists: false, writable: false };
|
|
1979
2069
|
try {
|
|
1980
2070
|
accessSync(dir, fsConstants.W_OK);
|
|
@@ -2034,10 +2124,10 @@ async function checkSqlite() {
|
|
|
2034
2124
|
}
|
|
2035
2125
|
function checkDataDirectory() {
|
|
2036
2126
|
const rootPath = getNexusDataDir();
|
|
2037
|
-
const rootExists =
|
|
2127
|
+
const rootExists = existsSync3(rootPath);
|
|
2038
2128
|
const subdirectories = DATA_SUBDIRECTORIES.map((name) => {
|
|
2039
|
-
const fullPath =
|
|
2040
|
-
const exists =
|
|
2129
|
+
const fullPath = join3(rootPath, name);
|
|
2130
|
+
const exists = existsSync3(fullPath);
|
|
2041
2131
|
return { name, path: fullPath, exists, writable: exists && isWritable(fullPath) };
|
|
2042
2132
|
});
|
|
2043
2133
|
return { rootExists, rootPath, subdirectories };
|
|
@@ -2086,6 +2176,7 @@ async function runDoctor() {
|
|
|
2086
2176
|
const sqliteCheck = await checkSqlite();
|
|
2087
2177
|
const dataDirectory = checkDataDirectory();
|
|
2088
2178
|
const sandbox = checkSandbox();
|
|
2179
|
+
const harnessAlignment = checkHarnessAlignment();
|
|
2089
2180
|
const hasAuthMethod = apiKeys.some((k) => k.configured) || clis.some((c) => c.installed && c.authenticated);
|
|
2090
2181
|
const allHealthy = nodeVersion.supported && hasAuthMethod && mcpServerReady && clis.every((c) => c.installed && c.authenticated && c.versionStatus !== "unsupported");
|
|
2091
2182
|
return {
|
|
@@ -2100,6 +2191,7 @@ async function runDoctor() {
|
|
|
2100
2191
|
sqliteCheck,
|
|
2101
2192
|
dataDirectory,
|
|
2102
2193
|
sandbox,
|
|
2194
|
+
harnessAlignment,
|
|
2103
2195
|
allHealthy,
|
|
2104
2196
|
timestamp: new Date(getTimeProvider().now())
|
|
2105
2197
|
};
|
|
@@ -2121,7 +2213,7 @@ async function runDoctorFix(result) {
|
|
|
2121
2213
|
writeLine2("\u2500".repeat(40));
|
|
2122
2214
|
let fixCount = 0;
|
|
2123
2215
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
2124
|
-
const { runSetup } = await import("./setup-command-
|
|
2216
|
+
const { runSetup } = await import("./setup-command-R4BOEMLZ.js");
|
|
2125
2217
|
const setupResult = runSetup({
|
|
2126
2218
|
skipMcp: true,
|
|
2127
2219
|
skipRules: true,
|
|
@@ -2135,7 +2227,7 @@ async function runDoctorFix(result) {
|
|
|
2135
2227
|
}
|
|
2136
2228
|
}
|
|
2137
2229
|
if (!result.configFile.found) {
|
|
2138
|
-
const { runConfigInitSync } = await import("./setup-config-
|
|
2230
|
+
const { runConfigInitSync } = await import("./setup-config-EQT24DD4.js");
|
|
2139
2231
|
const configResult = runConfigInitSync(process.cwd(), false, false);
|
|
2140
2232
|
if (configResult.success && configResult.created) {
|
|
2141
2233
|
writeLine2(`\u2713 Generated config: ${configResult.path}`);
|
|
@@ -2168,7 +2260,7 @@ function initDataDirectories(dryRun = false) {
|
|
|
2168
2260
|
ensureDir(NEXUS_DATA_DIR, dryRun, created, alreadyExisted);
|
|
2169
2261
|
for (const subdir of DATA_SUBDIRECTORIES) {
|
|
2170
2262
|
const mode = RESTRICTED_DIRS.has(subdir) ? 448 : void 0;
|
|
2171
|
-
ensureDir(
|
|
2263
|
+
ensureDir(join4(NEXUS_DATA_DIR, subdir), dryRun, created, alreadyExisted, mode);
|
|
2172
2264
|
}
|
|
2173
2265
|
return { success: true, rootPath: NEXUS_DATA_DIR, created, alreadyExisted, error: null };
|
|
2174
2266
|
} catch (error) {
|
|
@@ -2177,7 +2269,7 @@ function initDataDirectories(dryRun = false) {
|
|
|
2177
2269
|
}
|
|
2178
2270
|
}
|
|
2179
2271
|
function ensureDir(dirPath, dryRun, created, alreadyExisted, mode) {
|
|
2180
|
-
if (
|
|
2272
|
+
if (existsSync4(dirPath)) {
|
|
2181
2273
|
alreadyExisted.push(dirPath);
|
|
2182
2274
|
return;
|
|
2183
2275
|
}
|
|
@@ -2231,4 +2323,4 @@ export {
|
|
|
2231
2323
|
startStdioServer,
|
|
2232
2324
|
closeServer
|
|
2233
2325
|
};
|
|
2234
|
-
//# sourceMappingURL=chunk-
|
|
2326
|
+
//# sourceMappingURL=chunk-ZI6G7U7Y.js.map
|