nexus-agents 4.18.2 → 4.18.4
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-F34Y64DV.js → chunk-5NKKABGU.js} +52 -27
- package/dist/{chunk-F34Y64DV.js.map → chunk-5NKKABGU.js.map} +1 -1
- package/dist/{chunk-Q75PNRRU.js → chunk-NBWEGQNU.js} +2 -2
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +6 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{setup-data-dir-JFUUU7HP.js → setup-data-dir-AD4A5YON.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-Q75PNRRU.js.map → chunk-NBWEGQNU.js.map} +0 -0
- /package/dist/{setup-data-dir-JFUUU7HP.js.map → setup-data-dir-AD4A5YON.js.map} +0 -0
|
@@ -170,7 +170,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
170
170
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
171
171
|
|
|
172
172
|
// src/version.ts
|
|
173
|
-
var VERSION = true ? "4.18.
|
|
173
|
+
var VERSION = true ? "4.18.4" : "dev";
|
|
174
174
|
|
|
175
175
|
// src/mcp/task-store.ts
|
|
176
176
|
import { InMemoryTaskStore } from "@modelcontextprotocol/sdk/experimental/tasks";
|
|
@@ -339,6 +339,48 @@ async function closeServer(server, logger2) {
|
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
+
// src/cli/doctor-install-freshness.ts
|
|
343
|
+
var UNVERSIONED_BUILD = "dev";
|
|
344
|
+
var INSTALL_FRESHNESS_REMEDY = "npm install -g nexus-agents@latest \u2014 then RESTART any running MCP server. An already-spawned server keeps the old code until it is restarted, so updating alone leaves the session on the stale build.";
|
|
345
|
+
function assessInstallFreshness(globalVersion, expected, unavailableReason = "no global nexus-agents install found") {
|
|
346
|
+
if (expected === UNVERSIONED_BUILD) {
|
|
347
|
+
return {
|
|
348
|
+
state: "unknown",
|
|
349
|
+
reason: "running from source \u2014 this build has no version to compare"
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
if (globalVersion === null || globalVersion === "") {
|
|
353
|
+
return { state: "unknown", reason: unavailableReason };
|
|
354
|
+
}
|
|
355
|
+
if (globalVersion === expected) return { state: "aligned", version: expected };
|
|
356
|
+
return { state: "behind", global: globalVersion, expected };
|
|
357
|
+
}
|
|
358
|
+
function describeInstallFreshness(result) {
|
|
359
|
+
switch (result.state) {
|
|
360
|
+
case "aligned":
|
|
361
|
+
return `\u2713 Global install matches this build (${result.version})`;
|
|
362
|
+
case "behind":
|
|
363
|
+
return `\u2717 Global install is ${result.global}, this build is ${result.expected} \u2014 the MCP server runs the global one. ${INSTALL_FRESHNESS_REMEDY}`;
|
|
364
|
+
case "unknown":
|
|
365
|
+
return `? Global install version not determined (${result.reason}) \u2014 cannot confirm the MCP server runs this build`;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
function readGlobalVersion(exec) {
|
|
369
|
+
const raw = exec("npm", ["ls", "-g", "nexus-agents", "--depth=0", "--json"]);
|
|
370
|
+
if (raw === null) return { version: null, reason: "npm ls -g failed" };
|
|
371
|
+
try {
|
|
372
|
+
const parsed = JSON.parse(raw);
|
|
373
|
+
const deps = parsed.dependencies;
|
|
374
|
+
const version = deps?.["nexus-agents"]?.version;
|
|
375
|
+
if (typeof version !== "string" || version === "") {
|
|
376
|
+
return { version: null, reason: "no global nexus-agents install found" };
|
|
377
|
+
}
|
|
378
|
+
return { version, reason: "" };
|
|
379
|
+
} catch {
|
|
380
|
+
return { version: null, reason: "npm ls -g returned unparseable JSON" };
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
342
384
|
// src/cli/doctor-formatting.ts
|
|
343
385
|
var REQUIRED_NODE_MAJOR = 22;
|
|
344
386
|
function formatStatus(healthy, warn = false) {
|
|
@@ -647,8 +689,15 @@ function printDoctorResults(result) {
|
|
|
647
689
|
writeLine("");
|
|
648
690
|
printSandbox(result.sandbox);
|
|
649
691
|
printHarnessAlignment(result.harnessAlignment);
|
|
692
|
+
printInstallFreshness(result.installFreshness);
|
|
650
693
|
printDoctorSummary(result);
|
|
651
694
|
}
|
|
695
|
+
function printInstallFreshness(check) {
|
|
696
|
+
writeLine(`${colors.cyan}Checking global install freshness...${colors.reset}`);
|
|
697
|
+
writeLine("");
|
|
698
|
+
writeLine(` ${describeInstallFreshness(check)}`);
|
|
699
|
+
writeLine("");
|
|
700
|
+
}
|
|
652
701
|
function printHarnessAlignment(check) {
|
|
653
702
|
writeLine(`${colors.cyan}Checking agent-harness alignment...${colors.reset}`);
|
|
654
703
|
writeLine("");
|
|
@@ -744,30 +793,6 @@ function inspectFile(harness, relativePath, absolutePath) {
|
|
|
744
793
|
}
|
|
745
794
|
}
|
|
746
795
|
|
|
747
|
-
// src/cli/doctor-install-freshness.ts
|
|
748
|
-
function assessInstallFreshness(globalVersion, expected, unavailableReason = "no global nexus-agents install found") {
|
|
749
|
-
if (globalVersion === null || globalVersion === "") {
|
|
750
|
-
return { state: "unknown", reason: unavailableReason };
|
|
751
|
-
}
|
|
752
|
-
if (globalVersion === expected) return { state: "aligned", version: expected };
|
|
753
|
-
return { state: "behind", global: globalVersion, expected };
|
|
754
|
-
}
|
|
755
|
-
function readGlobalVersion(exec) {
|
|
756
|
-
const raw = exec("npm", ["ls", "-g", "nexus-agents", "--depth=0", "--json"]);
|
|
757
|
-
if (raw === null) return { version: null, reason: "npm ls -g failed" };
|
|
758
|
-
try {
|
|
759
|
-
const parsed = JSON.parse(raw);
|
|
760
|
-
const deps = parsed.dependencies;
|
|
761
|
-
const version = deps?.["nexus-agents"]?.version;
|
|
762
|
-
if (typeof version !== "string" || version === "") {
|
|
763
|
-
return { version: null, reason: "no global nexus-agents install found" };
|
|
764
|
-
}
|
|
765
|
-
return { version, reason: "" };
|
|
766
|
-
} catch {
|
|
767
|
-
return { version: null, reason: "npm ls -g returned unparseable JSON" };
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
|
|
771
796
|
// src/cli/doctor.ts
|
|
772
797
|
import { execFileSync } from "child_process";
|
|
773
798
|
var REQUIRED_NODE_MAJOR2 = 22;
|
|
@@ -1176,7 +1201,7 @@ async function runDoctorFix(result) {
|
|
|
1176
1201
|
writeLine2("\u2500".repeat(40));
|
|
1177
1202
|
let fixCount = 0;
|
|
1178
1203
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
1179
|
-
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-
|
|
1204
|
+
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-AD4A5YON.js");
|
|
1180
1205
|
const outcome = describeDataDirFix2(initDataDirectories2());
|
|
1181
1206
|
writeLine2(outcome.line);
|
|
1182
1207
|
if (outcome.counted) fixCount++;
|
|
@@ -1279,4 +1304,4 @@ export {
|
|
|
1279
1304
|
startStdioServer,
|
|
1280
1305
|
closeServer
|
|
1281
1306
|
};
|
|
1282
|
-
//# sourceMappingURL=chunk-
|
|
1307
|
+
//# sourceMappingURL=chunk-5NKKABGU.js.map
|