nexus-agents 4.37.1 → 5.0.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.
@@ -23,7 +23,7 @@ import {
23
23
  toolSuccessStructured,
24
24
  withProgressHeartbeat,
25
25
  wrapToolWithTimeout
26
- } from "./chunk-XHW3KDPI.js";
26
+ } from "./chunk-KRIAQJ7L.js";
27
27
  import {
28
28
  assessPanelIndependence,
29
29
  countDistinctModels,
@@ -6848,4 +6848,4 @@ export {
6848
6848
  CONSENSUS_VOTE_TOOL_SCHEMA,
6849
6849
  registerConsensusVoteTool
6850
6850
  };
6851
- //# sourceMappingURL=chunk-JKCSBEVL.js.map
6851
+ //# sourceMappingURL=chunk-5ZMA2TIE.js.map
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-TPCDMGLX.js";
24
+ } from "./chunk-OHAMRJ45.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-WTQEMR7D.js";
@@ -47,7 +47,7 @@ import {
47
47
  simulationDeniedResult,
48
48
  toJobSummary,
49
49
  writeJobCancelled
50
- } from "./chunk-JKCSBEVL.js";
50
+ } from "./chunk-5ZMA2TIE.js";
51
51
  import {
52
52
  allOf
53
53
  } from "./chunk-OQB3XC5O.js";
@@ -64,7 +64,7 @@ import {
64
64
  } from "./chunk-C2LEM7RD.js";
65
65
  import {
66
66
  withPrerequisite
67
- } from "./chunk-D6TYDK4U.js";
67
+ } from "./chunk-CAQ5KUPL.js";
68
68
  import {
69
69
  NOOP_NOTIFIER,
70
70
  RateLimiter,
@@ -88,7 +88,7 @@ import {
88
88
  withAuditTrail,
89
89
  withProgressHeartbeat,
90
90
  wrapToolWithTimeout
91
- } from "./chunk-XHW3KDPI.js";
91
+ } from "./chunk-KRIAQJ7L.js";
92
92
  import {
93
93
  createAuditTrail,
94
94
  createGraphAuditBridge,
@@ -27173,11 +27173,11 @@ function calculateDistributionStats(values) {
27173
27173
  function calculateRegret(decisions) {
27174
27174
  if (decisions.length === 0) {
27175
27175
  return {
27176
- cumulativeRegret: 0,
27177
- avgRegret: 0,
27176
+ cumulativeRegret: null,
27177
+ avgRegret: null,
27178
27178
  totalDecisions: 0,
27179
27179
  suboptimalDecisions: 0,
27180
- optimalRate: 1,
27180
+ optimalRate: null,
27181
27181
  regretPerModel: {}
27182
27182
  };
27183
27183
  }
@@ -27319,12 +27319,15 @@ function renderTaskTypePerformance(taskTypes) {
27319
27319
  function renderLearningProgress2(progress, options) {
27320
27320
  const lines = ["Learning Progress:"];
27321
27321
  lines.push("-".repeat(60));
27322
- const explorationBar = renderProgressBar(progress.explorationRate, 0.3);
27323
- const optimalBar = renderProgressBar(progress.optimalRate, 1);
27324
- lines.push(`Exploration Rate: ${explorationBar} ${(progress.explorationRate * 100).toFixed(1)}%`);
27325
- lines.push(`Optimal Decision Rate: ${optimalBar} ${(progress.optimalRate * 100).toFixed(1)}%`);
27326
- lines.push(`Cumulative Regret: ${progress.cumulativeRegret.toFixed(2)}`);
27327
- lines.push(`Convergence Score: ${(progress.convergenceScore * 100).toFixed(0)}%`);
27322
+ const pct = (label, value, barMax) => value === null ? `${label}: unmeasured (nothing recorded)` : `${label}: ${renderProgressBar(value, barMax)} ${(value * 100).toFixed(1)}%`;
27323
+ lines.push(pct("Exploration Rate", progress.explorationRate, 0.3));
27324
+ lines.push(pct("Optimal Decision Rate", progress.optimalRate, 1));
27325
+ lines.push(
27326
+ progress.cumulativeRegret === null ? "Cumulative Regret: unmeasured (no comparable decision)" : `Cumulative Regret: ${progress.cumulativeRegret.toFixed(2)}`
27327
+ );
27328
+ lines.push(
27329
+ progress.convergenceScore === null ? "Convergence Score: unmeasured (no feature weights recorded)" : `Convergence Score: ${(progress.convergenceScore * 100).toFixed(0)}%`
27330
+ );
27328
27331
  if (options.showFeatureImportance === true && progress.featureImportance.length > 0) {
27329
27332
  lines.push("");
27330
27333
  lines.push("Top Features:");
@@ -27338,10 +27341,10 @@ function renderLearningProgress2(progress, options) {
27338
27341
  function renderHealthIndicators(health) {
27339
27342
  const lines = ["Health Indicators:"];
27340
27343
  lines.push("-".repeat(60));
27341
- const check = (ok2) => ok2 ? "\u2713" : "\u2717";
27344
+ const check = (ok2) => ok2 === null ? "?" : ok2 ? "\u2713" : "\u2717";
27342
27345
  lines.push(`${check(health.hasMinimumData)} Minimum Data`);
27343
- lines.push(`${check(health.isLearning)} Learning Progress`);
27344
- lines.push(`${check(health.healthyExploration)} Healthy Exploration`);
27346
+ lines.push(`${check(health.isLearning)} Learning Progress${health.isLearning === null ? " (unmeasured)" : ""}`);
27347
+ lines.push(`${check(health.healthyExploration)} Healthy Exploration${health.healthyExploration === null ? " (unmeasured)" : ""}`);
27345
27348
  lines.push(`${check(health.noUnderperformers)} No Underperformers`);
27346
27349
  lines.push("");
27347
27350
  lines.push(
@@ -27431,10 +27434,10 @@ function calculateTaskTypePerformance(taskType, outcomes, minSampleSize) {
27431
27434
  }
27432
27435
  function calculateLearningProgress(outcomes, explorationHistory, featureWeights) {
27433
27436
  const recentExploration = explorationHistory.slice(-10);
27434
- const explorationRate = recentExploration.length > 0 ? recentExploration.reduce((sum, e) => sum + e.rate, 0) / recentExploration.length : 0;
27437
+ const explorationRate = recentExploration.length > 0 ? recentExploration.reduce((sum, e) => sum + e.rate, 0) / recentExploration.length : null;
27435
27438
  const olderExploration = explorationHistory.slice(-20, -10);
27436
27439
  const olderAvg = olderExploration.length > 0 ? olderExploration.reduce((sum, e) => sum + e.rate, 0) / olderExploration.length : explorationRate;
27437
- const explorationRateTrend = explorationRate - olderAvg;
27440
+ const explorationRateTrend = explorationRate === null || olderAvg === null ? 0 : explorationRate - olderAvg;
27438
27441
  const comparableOutcomes = outcomes.filter((o) => o.allModelRewards !== void 0).map((o) => ({
27439
27442
  chosenModel: o.model,
27440
27443
  actualReward: o.reward,
@@ -27458,7 +27461,7 @@ function calculateLearningProgress(outcomes, explorationHistory, featureWeights)
27458
27461
  }
27459
27462
  function calculateConvergenceScore(featureWeights) {
27460
27463
  if (Object.keys(featureWeights).length === 0) {
27461
- return 0;
27464
+ return null;
27462
27465
  }
27463
27466
  const variances = [];
27464
27467
  for (const weights of Object.values(featureWeights)) {
@@ -27478,6 +27481,7 @@ function calculateAvgReward(outcomes) {
27478
27481
  }
27479
27482
  function computeHealthScore(hasMinimumData, isLearning, healthyExploration, noUnderperformers) {
27480
27483
  if (!hasMinimumData) return null;
27484
+ if (isLearning === null || healthyExploration === null) return null;
27481
27485
  const scores = [
27482
27486
  1,
27483
27487
  // hasMinimumData, established above
@@ -27638,6 +27642,10 @@ var ValidationDashboard = class {
27638
27642
  };
27639
27643
  }
27640
27644
  checkLearningProgress(progress, outcomeCount, warnings) {
27645
+ if (progress.avgRegret === null || progress.optimalRate === null) {
27646
+ warnings.push("Learning progress unmeasured: no comparable routing decisions recorded");
27647
+ return null;
27648
+ }
27641
27649
  const isLearning = progress.avgRegret < MAX_ACCEPTABLE_REGRET || progress.optimalRate > MIN_OPTIMAL_RATE;
27642
27650
  if (!isLearning && outcomeCount >= MIN_OUTCOMES_FOR_HEALTH) {
27643
27651
  warnings.push("Learning not progressing: regret remains high");
@@ -27645,6 +27653,10 @@ var ValidationDashboard = class {
27645
27653
  return isLearning;
27646
27654
  }
27647
27655
  checkExplorationHealth(progress, warnings) {
27656
+ if (progress.explorationRate === null) {
27657
+ warnings.push("Exploration health unmeasured: no exploration rate recorded");
27658
+ return null;
27659
+ }
27648
27660
  const healthyExploration = progress.explorationRate >= 0.1 && progress.explorationRate <= 0.2;
27649
27661
  if (!healthyExploration && this.explorationHistory.length > 10) {
27650
27662
  const pct = (progress.explorationRate * 100).toFixed(1);
@@ -47305,7 +47317,7 @@ ${contextBlock}`;
47305
47317
  const strategy = config.votingStrategy ?? "higher_order";
47306
47318
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47307
47319
  try {
47308
- const { executeVoting } = await import("./consensus-vote-U4ZQ5DHJ.js");
47320
+ const { executeVoting } = await import("./consensus-vote-DCN5VMST.js");
47309
47321
  const votingResult = await executeVoting(
47310
47322
  {
47311
47323
  proposal: buildVoteProposal(plan, research),
@@ -55941,4 +55953,4 @@ export {
55941
55953
  shutdownFeedbackSubscriber,
55942
55954
  createEventBusBridge
55943
55955
  };
55944
- //# sourceMappingURL=chunk-X7GBLNAK.js.map
55956
+ //# sourceMappingURL=chunk-AJTCAKFN.js.map