nexus-agents 4.17.0 → 4.17.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.
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-M7UTZBNQ.js";
24
+ } from "./chunk-EEE7AK4Y.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-FSCMH2Y3.js";
@@ -55862,4 +55862,4 @@ export {
55862
55862
  shutdownFeedbackSubscriber,
55863
55863
  createEventBusBridge
55864
55864
  };
55865
- //# sourceMappingURL=chunk-F7F54NTS.js.map
55865
+ //# sourceMappingURL=chunk-5HTNYWWC.js.map
@@ -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.17.0" : "dev";
173
+ var VERSION = true ? "4.17.1" : "dev";
174
174
 
175
175
  // src/mcp/task-store.ts
176
176
  import { InMemoryTaskStore } from "@modelcontextprotocol/sdk/experimental/tasks";
@@ -1134,7 +1134,7 @@ async function runDoctorFix(result) {
1134
1134
  writeLine2("\u2500".repeat(40));
1135
1135
  let fixCount = 0;
1136
1136
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1137
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-NAHXPGOF.js");
1137
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-DISD4YT3.js");
1138
1138
  const outcome = describeDataDirFix2(initDataDirectories2());
1139
1139
  writeLine2(outcome.line);
1140
1140
  if (outcome.counted) fixCount++;
@@ -1237,4 +1237,4 @@ export {
1237
1237
  startStdioServer,
1238
1238
  closeServer
1239
1239
  };
1240
- //# sourceMappingURL=chunk-M7UTZBNQ.js.map
1240
+ //# sourceMappingURL=chunk-EEE7AK4Y.js.map
package/dist/cli.js CHANGED
@@ -153,7 +153,7 @@ import {
153
153
  validateNexusEnv,
154
154
  validateWorkflow,
155
155
  wrapInMarkdownFence
156
- } from "./chunk-F7F54NTS.js";
156
+ } from "./chunk-5HTNYWWC.js";
157
157
  import "./chunk-KXX4I7Z5.js";
158
158
  import "./chunk-HFOQKCD2.js";
159
159
  import "./chunk-RSMG2DPB.js";
@@ -173,7 +173,7 @@ import {
173
173
  doctorCommand,
174
174
  initDataDirectories,
175
175
  runDoctor
176
- } from "./chunk-M7UTZBNQ.js";
176
+ } from "./chunk-EEE7AK4Y.js";
177
177
  import {
178
178
  buildOpenAICompatAdapters,
179
179
  readOpenAICompatEnv
@@ -5266,16 +5266,23 @@ function auditRouting(options) {
5266
5266
  return includeBanditStats === true ? { ...baseResult, banditStats: computeBanditStats(bandit) } : baseResult;
5267
5267
  }
5268
5268
 
5269
+ // src/cli/ansi-width.ts
5270
+ var ANSI_SGR = /\u001b\[[0-9;]*m/g;
5271
+ function visibleWidth(s) {
5272
+ return s.replace(ANSI_SGR, "").length;
5273
+ }
5274
+
5269
5275
  // src/cli/box-drawing.ts
5270
5276
  var BOX_WIDTH = 65;
5271
5277
  function horizontalLine(char = "\u2500") {
5272
5278
  return char.repeat(BOX_WIDTH - 2);
5273
5279
  }
5274
5280
  function boxLine(content, borderColor = colors.cyan) {
5275
- return color("\u2502", borderColor) + content.padEnd(BOX_WIDTH - 2) + color("\u2502", borderColor);
5281
+ const pad = Math.max(0, BOX_WIDTH - 2 - visibleWidth(content));
5282
+ return color("\u2502", borderColor) + content + " ".repeat(pad) + color("\u2502", borderColor);
5276
5283
  }
5277
5284
  function centerText(text, borderColor = colors.cyan) {
5278
- const padding = Math.max(0, BOX_WIDTH - text.length - 2);
5285
+ const padding = Math.max(0, BOX_WIDTH - visibleWidth(text) - 2);
5279
5286
  const left = Math.floor(padding / 2);
5280
5287
  const right = padding - left;
5281
5288
  return color("\u2502", borderColor) + " ".repeat(left) + text + " ".repeat(right) + color("\u2502", borderColor);
@@ -5293,11 +5300,29 @@ function formatHeader2(result) {
5293
5300
  lines.push(color("\u251C" + horizontalLine() + "\u2524", ANSI.cyan));
5294
5301
  return lines;
5295
5302
  }
5303
+ function wrapPipeSeparated(text, width) {
5304
+ const segments = text.split(" | ");
5305
+ const lines = [];
5306
+ let current = "";
5307
+ for (const segment of segments) {
5308
+ const candidate = current === "" ? segment : `${current} | ${segment}`;
5309
+ if (current !== "" && candidate.length > width) {
5310
+ lines.push(current);
5311
+ current = segment;
5312
+ } else {
5313
+ current = candidate;
5314
+ }
5315
+ }
5316
+ if (current !== "") lines.push(current);
5317
+ return lines;
5318
+ }
5296
5319
  function formatTaskAnalysis(result) {
5297
5320
  const lines = [];
5298
5321
  lines.push(boxLine(color(" Task Analysis:", ANSI.bold)));
5299
5322
  const profileSummary = summarizeTaskProfile(result.taskProfile);
5300
- lines.push(boxLine(` ${profileSummary}`));
5323
+ for (const segment of wrapPipeSeparated(profileSummary, BOX_WIDTH - 5)) {
5324
+ lines.push(boxLine(` ${segment}`));
5325
+ }
5301
5326
  lines.push(color("\u251C" + horizontalLine() + "\u2524", ANSI.cyan));
5302
5327
  return lines;
5303
5328
  }
@@ -5340,7 +5365,7 @@ function formatLinUCBSelection(result) {
5340
5365
  const ucb = arm.ucbScore.toFixed(2);
5341
5366
  const pulls = String(arm.pullCount);
5342
5367
  const content = ` ${arm.cliName.padEnd(8)} UCB: ${ucb.padStart(5)} pulls: ${pulls.padStart(3)} ${marker}`;
5343
- lines.push(color("\u2502", ANSI.cyan) + content.padEnd(BOX_WIDTH + 8) + color("\u2502", ANSI.cyan));
5368
+ lines.push(boxLine(content));
5344
5369
  }
5345
5370
  lines.push(color("\u251C" + horizontalLine() + "\u2524", ANSI.cyan));
5346
5371
  return lines;
@@ -5348,7 +5373,7 @@ function formatLinUCBSelection(result) {
5348
5373
  function formatFinalSelection(result, explain) {
5349
5374
  const lines = [];
5350
5375
  const selectionText = color(` Final Selection: ${result.selectedCli}`, ANSI.bold + ANSI.green);
5351
- lines.push(color("\u2502", ANSI.cyan) + selectionText.padEnd(BOX_WIDTH + 11) + color("\u2502", ANSI.cyan));
5376
+ lines.push(boxLine(selectionText));
5352
5377
  lines.push(boxLine(` Reason: ${result.selectionReason}`));
5353
5378
  lines.push(color("\u2570" + horizontalLine() + "\u256F", ANSI.cyan));
5354
5379
  if (explain) {
@@ -5366,7 +5391,7 @@ function formatBanditStatsHeader() {
5366
5391
  return [
5367
5392
  "",
5368
5393
  color("\u256D" + horizontalLine() + "\u256E", ANSI.yellow),
5369
- color("\u2502", ANSI.yellow) + color(" LinUCB Detailed Statistics (--bandit-stats)", ANSI.bold).padEnd(BOX_WIDTH + 7) + color("\u2502", ANSI.yellow),
5394
+ boxLine(color(" LinUCB Detailed Statistics (--bandit-stats)", ANSI.bold), ANSI.yellow),
5370
5395
  color("\u251C" + horizontalLine() + "\u2524", ANSI.yellow)
5371
5396
  ];
5372
5397
  }
@@ -5392,13 +5417,9 @@ function formatExplorationSection(stats) {
5392
5417
  }
5393
5418
  function formatFeatureImportanceSection(stats) {
5394
5419
  const lines = [];
5395
- lines.push(
5396
- color("\u2502", ANSI.yellow) + color(" Feature Importance by Arm:", ANSI.bold).padEnd(BOX_WIDTH + 7) + color("\u2502", ANSI.yellow)
5397
- );
5420
+ lines.push(boxLine(color(" Feature Importance by Arm:", ANSI.bold), ANSI.yellow));
5398
5421
  for (const arm of stats.detailedArms) {
5399
- lines.push(
5400
- color("\u2502", ANSI.yellow) + ` ${color(arm.cliName, ANSI.cyan)}:`.padEnd(BOX_WIDTH + 5) + color("\u2502", ANSI.yellow)
5401
- );
5422
+ lines.push(boxLine(` ${color(arm.cliName, ANSI.cyan)}:`, ANSI.yellow));
5402
5423
  const top3 = arm.featureImportance.slice(0, 3);
5403
5424
  for (const fi of top3) {
5404
5425
  const pct2 = formatPercentage(fi.importance, 1);