nexus-agents 3.4.6 → 3.4.7
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/{chunk-ZBHLRTPM.js → chunk-J34IF7WA.js} +43 -9
- package/dist/chunk-J34IF7WA.js.map +1 -0
- package/dist/{chunk-TH6S5NMU.js → chunk-SLLUTZHU.js} +2 -2
- package/dist/{chunk-KED7JA7R.js → chunk-WEQNCK5F.js} +2 -2
- package/dist/cli.js +3 -3
- package/dist/index.js +2 -2
- package/dist/{setup-command-5KHJHIFM.js → setup-command-OZLCZC5Q.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-ZBHLRTPM.js.map +0 -1
- /package/dist/{chunk-TH6S5NMU.js.map → chunk-SLLUTZHU.js.map} +0 -0
- /package/dist/{chunk-KED7JA7R.js.map → chunk-WEQNCK5F.js.map} +0 -0
- /package/dist/{setup-command-5KHJHIFM.js.map → setup-command-OZLCZC5Q.js.map} +0 -0
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
} from "./chunk-OQLFRJCW.js";
|
|
50
50
|
|
|
51
51
|
// src/version.ts
|
|
52
|
-
var VERSION = true ? "3.4.
|
|
52
|
+
var VERSION = true ? "3.4.7" : "dev";
|
|
53
53
|
|
|
54
54
|
// src/config/schemas-core.ts
|
|
55
55
|
import { z } from "zod";
|
|
@@ -1254,7 +1254,8 @@ import {
|
|
|
1254
1254
|
} from "fs";
|
|
1255
1255
|
|
|
1256
1256
|
// src/cli/doctor-scratch-space.ts
|
|
1257
|
-
import { statfsSync } from "fs";
|
|
1257
|
+
import { statSync, statfsSync } from "fs";
|
|
1258
|
+
import { tmpdir } from "os";
|
|
1258
1259
|
var MIB = 1024 * 1024;
|
|
1259
1260
|
var GIB = 1024 * 1024 * 1024;
|
|
1260
1261
|
var CRITICAL_FREE_BYTES = 512 * MIB;
|
|
@@ -1268,12 +1269,13 @@ function grade(freeBytes) {
|
|
|
1268
1269
|
if (freeBytes < WARN_FREE_BYTES) return "warn";
|
|
1269
1270
|
return "ok";
|
|
1270
1271
|
}
|
|
1271
|
-
function checkScratchSpace(root = getNexusTmpDir(), statfs = statfsSync) {
|
|
1272
|
+
function checkScratchSpace(root = getNexusTmpDir(), statfs = statfsSync, label = "nexus") {
|
|
1272
1273
|
let reading;
|
|
1273
1274
|
try {
|
|
1274
1275
|
reading = statfs(root);
|
|
1275
1276
|
} catch {
|
|
1276
1277
|
return {
|
|
1278
|
+
label,
|
|
1277
1279
|
root,
|
|
1278
1280
|
available: false,
|
|
1279
1281
|
freeBytes: 0,
|
|
@@ -1288,6 +1290,7 @@ function checkScratchSpace(root = getNexusTmpDir(), statfs = statfsSync) {
|
|
|
1288
1290
|
const percentUsed = totalBytes > 0 ? Math.round((totalBytes - freeBytes) / totalBytes * 100) : 100;
|
|
1289
1291
|
const severity = grade(freeBytes);
|
|
1290
1292
|
return {
|
|
1293
|
+
label,
|
|
1291
1294
|
root,
|
|
1292
1295
|
available: true,
|
|
1293
1296
|
freeBytes,
|
|
@@ -1297,12 +1300,43 @@ function checkScratchSpace(root = getNexusTmpDir(), statfs = statfsSync) {
|
|
|
1297
1300
|
message: `${formatBytes(freeBytes)} free of ${formatBytes(totalBytes)} (${String(percentUsed)}% used)`
|
|
1298
1301
|
};
|
|
1299
1302
|
}
|
|
1303
|
+
function defaultRoots() {
|
|
1304
|
+
return [
|
|
1305
|
+
{ label: "nexus", root: getNexusTmpDir() },
|
|
1306
|
+
{ label: "system", root: tmpdir() }
|
|
1307
|
+
];
|
|
1308
|
+
}
|
|
1309
|
+
function checkScratchFilesystems(options = {}) {
|
|
1310
|
+
const roots = options.roots ?? defaultRoots();
|
|
1311
|
+
const statfs = options.statfs ?? statfsSync;
|
|
1312
|
+
const deviceOf = options.deviceOf ?? ((path) => statSync(path).dev);
|
|
1313
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1314
|
+
const checks = [];
|
|
1315
|
+
for (const { label, root } of roots) {
|
|
1316
|
+
let device;
|
|
1317
|
+
try {
|
|
1318
|
+
device = deviceOf(root);
|
|
1319
|
+
} catch {
|
|
1320
|
+
continue;
|
|
1321
|
+
}
|
|
1322
|
+
if (seen.has(device)) continue;
|
|
1323
|
+
seen.add(device);
|
|
1324
|
+
checks.push(checkScratchSpace(root, statfs, label));
|
|
1325
|
+
}
|
|
1326
|
+
return checks;
|
|
1327
|
+
}
|
|
1328
|
+
function formatScratchFilesystems(checks) {
|
|
1329
|
+
if (checks.length === 0) {
|
|
1330
|
+
return " \u26A0 Scratch space: no scratch filesystem could be identified";
|
|
1331
|
+
}
|
|
1332
|
+
return checks.map(formatScratchSpace).join("\n");
|
|
1333
|
+
}
|
|
1300
1334
|
function formatScratchSpace(check) {
|
|
1301
1335
|
if (!check.available) {
|
|
1302
|
-
return ` \u26A0 Scratch space: ${check.message}`;
|
|
1336
|
+
return ` \u26A0 Scratch space [${check.label}]: ${check.message}`;
|
|
1303
1337
|
}
|
|
1304
1338
|
const icon = check.severity === "ok" ? "\u2713" : check.severity === "warn" ? "\u26A0" : "\u2717";
|
|
1305
|
-
const line = ` ${icon} Scratch space (${check.root}): ${check.message}`;
|
|
1339
|
+
const line = ` ${icon} Scratch space [${check.label}] (${check.root}): ${check.message}`;
|
|
1306
1340
|
if (check.severity === "ok") return line;
|
|
1307
1341
|
return [
|
|
1308
1342
|
line,
|
|
@@ -1786,7 +1820,7 @@ function printDoctorResults(result) {
|
|
|
1786
1820
|
writeLine("");
|
|
1787
1821
|
printSqliteCheck(result.sqliteCheck);
|
|
1788
1822
|
printDataDirectory(result.dataDirectory);
|
|
1789
|
-
writeLine(
|
|
1823
|
+
writeLine(formatScratchFilesystems(result.scratchSpace));
|
|
1790
1824
|
writeLine("");
|
|
1791
1825
|
printSandbox(result.sandbox);
|
|
1792
1826
|
printHarnessAlignment(result.harnessAlignment);
|
|
@@ -2214,7 +2248,7 @@ async function runDoctor() {
|
|
|
2214
2248
|
const sandbox = checkSandbox();
|
|
2215
2249
|
const harnessAlignment = checkHarnessAlignment();
|
|
2216
2250
|
const voterTransport = checkVoterTransport();
|
|
2217
|
-
const scratchSpace =
|
|
2251
|
+
const scratchSpace = checkScratchFilesystems();
|
|
2218
2252
|
const hasAuthMethod = apiKeys.some((k) => k.configured) || clis.some((c) => c.installed && c.authenticated);
|
|
2219
2253
|
const allHealthy = nodeVersion.supported && hasAuthMethod && mcpServerReady && clis.every((c) => c.installed && c.authenticated && c.versionStatus !== "unsupported");
|
|
2220
2254
|
return {
|
|
@@ -2253,7 +2287,7 @@ async function runDoctorFix(result) {
|
|
|
2253
2287
|
writeLine2("\u2500".repeat(40));
|
|
2254
2288
|
let fixCount = 0;
|
|
2255
2289
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
2256
|
-
const { runSetup } = await import("./setup-command-
|
|
2290
|
+
const { runSetup } = await import("./setup-command-OZLCZC5Q.js");
|
|
2257
2291
|
const setupResult = runSetup({
|
|
2258
2292
|
skipMcp: true,
|
|
2259
2293
|
skipRules: true,
|
|
@@ -2366,4 +2400,4 @@ export {
|
|
|
2366
2400
|
startStdioServer,
|
|
2367
2401
|
closeServer
|
|
2368
2402
|
};
|
|
2369
|
-
//# sourceMappingURL=chunk-
|
|
2403
|
+
//# sourceMappingURL=chunk-J34IF7WA.js.map
|