nexus-agents 10.1.0 → 10.1.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.
@@ -58,7 +58,7 @@ import {
58
58
  updateStage,
59
59
  withFileLock,
60
60
  writeJobCancelled
61
- } from "./chunk-TLITBKMZ.js";
61
+ } from "./chunk-WVIHRMGD.js";
62
62
  import {
63
63
  normalizeTopicToCanonical,
64
64
  synthesizeResearch
@@ -77,7 +77,7 @@ import {
77
77
  } from "./chunk-MYM2TPNL.js";
78
78
  import {
79
79
  withPrerequisite
80
- } from "./chunk-33C22IY4.js";
80
+ } from "./chunk-WNWLMQAV.js";
81
81
  import {
82
82
  NOOP_NOTIFIER,
83
83
  RateLimiter,
@@ -105,7 +105,7 @@ import {
105
105
  toolSuccess,
106
106
  withProgressHeartbeat,
107
107
  wrapToolWithTimeout
108
- } from "./chunk-HQWQ7MR5.js";
108
+ } from "./chunk-K2S6SHSK.js";
109
109
  import {
110
110
  generateSecurityPlan
111
111
  } from "./chunk-L4P4A7Z2.js";
@@ -187,7 +187,7 @@ import {
187
187
  import {
188
188
  DEFAULT_TASK_TTL_MS,
189
189
  clampTaskTtl
190
- } from "./chunk-C6MM6Z65.js";
190
+ } from "./chunk-UABTN3VX.js";
191
191
  import {
192
192
  allOf,
193
193
  anyOf
@@ -196,7 +196,7 @@ import {
196
196
  VERSION,
197
197
  createRequestContext,
198
198
  measuredTrustTier
199
- } from "./chunk-AMK4BTAV.js";
199
+ } from "./chunk-UBOJ2A3P.js";
200
200
  import {
201
201
  isGatewayModelAdapter
202
202
  } from "./chunk-XQMQGUJT.js";
@@ -46651,7 +46651,7 @@ function buildVotingInput(plan, config) {
46651
46651
  }
46652
46652
  async function executeSingleVote(plan, config, log) {
46653
46653
  try {
46654
- const { executeVoting } = await import("./consensus-vote-V2JQHILD.js");
46654
+ const { executeVoting } = await import("./consensus-vote-KKS36YLZ.js");
46655
46655
  const input = buildVotingInput(plan, config);
46656
46656
  const result = await executeVoting(input, log);
46657
46657
  return parseVotingResult(result);
@@ -48451,7 +48451,7 @@ function createVoteStage({ config, startStage }) {
48451
48451
  const strategy = config.votingStrategy ?? "higher_order";
48452
48452
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
48453
48453
  try {
48454
- const { executeVoting } = await import("./consensus-vote-V2JQHILD.js");
48454
+ const { executeVoting } = await import("./consensus-vote-KKS36YLZ.js");
48455
48455
  const proposal = buildVoteProposal(plan, research);
48456
48456
  const votingResult = await executeVoting(
48457
48457
  {
@@ -58413,4 +58413,4 @@ export {
58413
58413
  initializeSandbox,
58414
58414
  getSandboxMode
58415
58415
  };
58416
- //# sourceMappingURL=chunk-IYEZVAJT.js.map
58416
+ //# sourceMappingURL=chunk-G4JXD6UJ.js.map
@@ -5,7 +5,7 @@ import {
5
5
  getCurrentRequestContext,
6
6
  runWithRequestContext,
7
7
  serverCallerInfo
8
- } from "./chunk-AMK4BTAV.js";
8
+ } from "./chunk-UBOJ2A3P.js";
9
9
  import {
10
10
  DEFAULT_EXECUTION_MODE
11
11
  } from "./chunk-TYLE7Z2S.js";
@@ -2343,4 +2343,4 @@ export {
2343
2343
  DEFAULT_CONSENSUS_CONFIG,
2344
2344
  ConsensusMetricsSchema
2345
2345
  };
2346
- //# sourceMappingURL=chunk-HQWQ7MR5.js.map
2346
+ //# sourceMappingURL=chunk-K2S6SHSK.js.map
@@ -7,7 +7,7 @@ import {
7
7
  VERSION,
8
8
  isNodeVersionSupported,
9
9
  recordServerTransport
10
- } from "./chunk-AMK4BTAV.js";
10
+ } from "./chunk-UBOJ2A3P.js";
11
11
  import {
12
12
  checkGatewayHealth,
13
13
  cliFailsVerdict,
@@ -1185,6 +1185,7 @@ function formatMcpClientLine(result) {
1185
1185
  }
1186
1186
 
1187
1187
  // src/cli/doctor-install-freshness.ts
1188
+ import { posix, win32 } from "node:path";
1188
1189
  import semver from "semver";
1189
1190
  var UNVERSIONED_BUILD = "dev";
1190
1191
  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.";
@@ -1210,15 +1211,16 @@ function assessInstallFreshness(globalVersion, expected, unavailableReason = "no
1210
1211
  return { state: "behind", global: globalVersion, expected };
1211
1212
  }
1212
1213
  function describeInstallFreshness(result) {
1214
+ const scope = result.prefix === void 0 ? "" : ` (prefix: ${result.prefix})`;
1213
1215
  switch (result.state) {
1214
1216
  case "aligned":
1215
- return `\u2713 Global install matches this build (${result.version})`;
1217
+ return `\u2713 Global install matches this build (${result.version})${scope}`;
1216
1218
  case "behind":
1217
- return `\u2717 Global install is ${result.global}, this build is ${result.expected} \u2014 the MCP server runs the global one. ${INSTALL_FRESHNESS_REMEDY}`;
1219
+ return `\u2717 Global install is ${result.global}, this build is ${result.expected}${scope} \u2014 the MCP server runs the global one. ${INSTALL_FRESHNESS_REMEDY}`;
1218
1220
  case "ahead":
1219
- return `\u26A0 Global install is ${result.global}, newer than this build (${result.expected}) \u2014 the MCP server runs the global one, not this build`;
1221
+ return `\u26A0 Global install is ${result.global}, newer than this build (${result.expected})${scope} \u2014 the MCP server runs the global one, not this build`;
1220
1222
  case "unknown":
1221
- return `\u26A0 Global install version not determined (${result.reason}) \u2014 cannot confirm the MCP server runs this build`;
1223
+ return `\u26A0 Global install version not determined (${result.reason})${scope} \u2014 cannot confirm the MCP server runs this build`;
1222
1224
  }
1223
1225
  }
1224
1226
  function installFreshnessFailsVerdict(result) {
@@ -1239,19 +1241,35 @@ function describeInstallFreshnessSummary(result) {
1239
1241
  if (result.state === "ahead") return " \u2014 global install newer than this build";
1240
1242
  return "";
1241
1243
  }
1242
- function readGlobalVersion(exec) {
1243
- const raw = exec("npm", ["ls", "-g", "nexus-agents", "--depth=0", "--json"]);
1244
- if (raw === null) return { version: null, reason: "npm ls -g failed" };
1244
+ function resolveInterpreterInstall(execPath, platform) {
1245
+ const path = platform === "win32" ? win32 : posix;
1246
+ const binDir = path.dirname(execPath);
1247
+ const prefix = platform === "win32" ? binDir : path.dirname(binDir);
1248
+ const modules = platform === "win32" ? path.join(prefix, "node_modules") : path.join(prefix, "lib", "node_modules");
1249
+ return { prefix, npmCli: path.join(modules, "npm", "bin", "npm-cli.js") };
1250
+ }
1251
+ function readGlobalVersion(exec, execPath = process.execPath, platform = process.platform) {
1252
+ const { prefix, npmCli } = resolveInterpreterInstall(execPath, platform);
1253
+ const raw = exec(execPath, [
1254
+ npmCli,
1255
+ "ls",
1256
+ "-g",
1257
+ "nexus-agents",
1258
+ "--depth=0",
1259
+ "--json",
1260
+ `--prefix=${prefix}`
1261
+ ]);
1262
+ if (raw === null) return { version: null, reason: "npm ls -g failed", prefix };
1245
1263
  try {
1246
1264
  const parsed = JSON.parse(raw);
1247
1265
  const deps = parsed.dependencies;
1248
1266
  const version = deps?.["nexus-agents"]?.version;
1249
1267
  if (typeof version !== "string" || version === "") {
1250
- return { version: null, reason: "no global nexus-agents install found" };
1268
+ return { version: null, reason: "no global nexus-agents install found", prefix };
1251
1269
  }
1252
- return { version, reason: "" };
1270
+ return { version, reason: "", prefix };
1253
1271
  } catch {
1254
- return { version: null, reason: "npm ls -g returned unparseable JSON" };
1272
+ return { version: null, reason: "npm ls -g returned unparseable JSON", prefix };
1255
1273
  }
1256
1274
  }
1257
1275
 
@@ -2087,7 +2105,7 @@ function checkSandbox() {
2087
2105
  };
2088
2106
  }
2089
2107
  function checkInstallFreshness() {
2090
- const { version, reason } = readGlobalVersion((cmd, args) => {
2108
+ const { version, reason, prefix } = readGlobalVersion((cmd, args) => {
2091
2109
  try {
2092
2110
  return execFileSync(cmd, [...args], {
2093
2111
  encoding: "utf8",
@@ -2097,7 +2115,7 @@ function checkInstallFreshness() {
2097
2115
  return null;
2098
2116
  }
2099
2117
  });
2100
- return assessInstallFreshness(version, VERSION, reason);
2118
+ return { ...assessInstallFreshness(version, VERSION, reason), prefix };
2101
2119
  }
2102
2120
  function collectEnvironmentChecks() {
2103
2121
  return {
@@ -2234,7 +2252,7 @@ async function runDoctorFix(result) {
2234
2252
  writeLine2("\u2500".repeat(40));
2235
2253
  let fixCount = 0;
2236
2254
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
2237
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-75Z5PSSB.js");
2255
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-6MZ2HZDC.js");
2238
2256
  const outcome = describeDataDirFix2(initDataDirectories2());
2239
2257
  writeLine2(outcome.line);
2240
2258
  if (outcome.counted) fixCount++;
@@ -2354,4 +2372,4 @@ export {
2354
2372
  startStdioServer,
2355
2373
  closeServer
2356
2374
  };
2357
- //# sourceMappingURL=chunk-C6MM6Z65.js.map
2375
+ //# sourceMappingURL=chunk-UABTN3VX.js.map