nexus-agents 4.37.2 → 5.0.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.
@@ -11,11 +11,11 @@ import {
11
11
  resetCorrelationTracker,
12
12
  runConsensusForGoal,
13
13
  unwrapVoteOrThrow
14
- } from "./chunk-BL2RCXGC.js";
14
+ } from "./chunk-DDUZI6OD.js";
15
15
  import "./chunk-SOKS6XK2.js";
16
16
  import "./chunk-OQB3XC5O.js";
17
- import "./chunk-DLWXTCLB.js";
18
- import "./chunk-3BL6HLHW.js";
17
+ import "./chunk-BZRUZSJ6.js";
18
+ import "./chunk-7A63AX2A.js";
19
19
  import "./chunk-ZSNWRX2B.js";
20
20
  import "./chunk-OKS6I7T7.js";
21
21
  import "./chunk-VS2DUTJ5.js";
@@ -50,4 +50,4 @@ export {
50
50
  runConsensusForGoal,
51
51
  unwrapVoteOrThrow
52
52
  };
53
- //# sourceMappingURL=consensus-vote-VNLVKZZK.js.map
53
+ //# sourceMappingURL=consensus-vote-X2EF47XM.js.map
@@ -11,9 +11,9 @@ import {
11
11
  loadSelfEvalSignals,
12
12
  registerImprovementReviewTool,
13
13
  runImprovementReview
14
- } from "./chunk-DIMPT3NS.js";
15
- import "./chunk-DLWXTCLB.js";
16
- import "./chunk-3BL6HLHW.js";
14
+ } from "./chunk-GQXDNAMB.js";
15
+ import "./chunk-BZRUZSJ6.js";
16
+ import "./chunk-7A63AX2A.js";
17
17
  import "./chunk-ZSNWRX2B.js";
18
18
  import "./chunk-AVYTX7JQ.js";
19
19
  import "./chunk-GBHJ37V3.js";
@@ -33,4 +33,4 @@ export {
33
33
  registerImprovementReviewTool,
34
34
  runImprovementReview
35
35
  };
36
- //# sourceMappingURL=improvement-review-RVR2XRU2.js.map
36
+ //# sourceMappingURL=improvement-review-VBLDRXFP.js.map
package/dist/index.d.ts CHANGED
@@ -20649,16 +20649,28 @@ interface DistributionStats {
20649
20649
  * Regret analysis result comparing actual vs optimal decisions.
20650
20650
  */
20651
20651
  interface RegretAnalysis {
20652
- /** Total cumulative regret */
20653
- readonly cumulativeRegret: number;
20654
- /** Average regret per decision */
20655
- readonly avgRegret: number;
20656
- /** Number of decisions analyzed */
20652
+ /**
20653
+ * Total cumulative regret, or `null` when no decision was comparable (#5255).
20654
+ *
20655
+ * These three were plain `number` and returned `0`/`0`/`1` for an empty
20656
+ * decision set — which the dashboard rendered as "Cumulative Regret: 0.00"
20657
+ * and "Optimal Decision Rate: 100.0%" with a full progress bar. A perfect
20658
+ * routing record asserted over nothing is an absent measurement wearing a
20659
+ * good score, and the primary consumer of these numbers is the learning loop
20660
+ * itself, which has no way to consult a sibling flag.
20661
+ *
20662
+ * `null` means UNMEASURED — no comparable decision existed. It does not mean
20663
+ * zero regret; that is `0`, and the two are now distinguishable.
20664
+ */
20665
+ readonly cumulativeRegret: number | null;
20666
+ /** Average regret per decision, or `null` when unmeasured — see above. */
20667
+ readonly avgRegret: number | null;
20668
+ /** Number of decisions analyzed. Stays numeric: 0 is the true count. */
20657
20669
  readonly totalDecisions: number;
20658
- /** Number of suboptimal decisions */
20670
+ /** Number of suboptimal decisions. Stays numeric: 0 is the true count. */
20659
20671
  readonly suboptimalDecisions: number;
20660
- /** Percentage of optimal decisions */
20661
- readonly optimalRate: number;
20672
+ /** Share of optimal decisions, or `null` when unmeasured — see above. */
20673
+ readonly optimalRate: number | null;
20662
20674
  /** Regret per model (how much worse each model performed vs best) */
20663
20675
  readonly regretPerModel: Record<string, number>;
20664
20676
  }
@@ -20790,21 +20802,35 @@ interface TaskTypePerformance {
20790
20802
  * Learning progress metrics.
20791
20803
  */
20792
20804
  interface LearningProgress {
20793
- /** LinUCB exploration rate over time */
20794
- readonly explorationRate: number;
20805
+ /**
20806
+ * LinUCB exploration rate, or `null` when nothing was recorded (#5255).
20807
+ *
20808
+ * `0` was the empty-case value and rendered as "0.0%" — indistinguishable
20809
+ * from a real fully-greedy policy, which is a legitimate 0.0%. `null` means
20810
+ * UNMEASURED; `0` means measured-and-zero.
20811
+ */
20812
+ readonly explorationRate: number | null;
20795
20813
  readonly explorationRateTrend: number;
20796
- /** Cumulative regret */
20797
- readonly cumulativeRegret: number;
20798
- readonly avgRegret: number;
20799
- /** Optimal decision rate */
20800
- readonly optimalRate: number;
20814
+ /** Cumulative regret, or `null` when no decision was comparable. */
20815
+ readonly cumulativeRegret: number | null;
20816
+ /** Average regret per decision, or `null` when unmeasured. */
20817
+ readonly avgRegret: number | null;
20818
+ /** Optimal decision rate, or `null` when unmeasured. */
20819
+ readonly optimalRate: number | null;
20801
20820
  /** Feature importance ranking */
20802
20821
  readonly featureImportance: readonly {
20803
20822
  readonly feature: string;
20804
20823
  readonly importance: number;
20805
20824
  }[];
20806
20825
  /** Learning convergence metric (0-1, 1 = converged) */
20807
- readonly convergenceScore: number;
20826
+ /**
20827
+ * Convergence score, or `null` when no feature weights were recorded (#5255).
20828
+ *
20829
+ * The empty case returned `0`, which reads as WORST-possible convergence —
20830
+ * `Math.exp(-variance)` only approaches 0 and never reaches it, so a literal
20831
+ * 0% could not have been a real reading.
20832
+ */
20833
+ readonly convergenceScore: number | null;
20808
20834
  }
20809
20835
  /**
20810
20836
  * Dashboard summary.
@@ -20838,10 +20864,27 @@ interface DashboardSummary {
20838
20864
  interface DashboardHealthIndicators {
20839
20865
  /** Whether we have enough data for statistical inference */
20840
20866
  readonly hasMinimumData: boolean;
20841
- /** Whether learning is progressing (regret decreasing) */
20842
- readonly isLearning: boolean;
20843
- /** Whether exploration rate is in healthy range (10-20%) */
20844
- readonly healthyExploration: boolean;
20867
+ /**
20868
+ * Whether learning is progressing, or `null` when unmeasured (#5255).
20869
+ *
20870
+ * This was `boolean` and computed from `avgRegret`/`optimalRate`, whose empty
20871
+ * case returned `0`/`1` — so it answered "yes" on the strength of no data.
20872
+ * #4714 spotted that and guarded only the aggregate `healthScore`; the guard
20873
+ * keys on total outcomes, which is a DIFFERENT collection from the one these
20874
+ * metrics read, so on a live system it passed and the fabricated verdict
20875
+ * flowed through anyway.
20876
+ */
20877
+ readonly isLearning: boolean | null;
20878
+ /**
20879
+ * Whether exploration is in the healthy 10-20% range, or `null` when nothing
20880
+ * was recorded (#5255).
20881
+ *
20882
+ * Previously rendered `✗ Healthy Exploration` over ZERO samples — asserting a
20883
+ * health *failure* from absence — while the warning that would have explained
20884
+ * it was gated behind `explorationHistory.length > 10`, so the one disclosing
20885
+ * line was exactly the suppressed one.
20886
+ */
20887
+ readonly healthyExploration: boolean | null;
20845
20888
  /** Whether any model is significantly underperforming */
20846
20889
  readonly noUnderperformers: boolean;
20847
20890
  /** Overall health score (0-1) */
package/dist/index.js CHANGED
@@ -553,7 +553,7 @@ import {
553
553
  withLogging,
554
554
  withRetry,
555
555
  withRetryWrapper
556
- } from "./chunk-EZVDJJ4T.js";
556
+ } from "./chunk-LFAIB5MG.js";
557
557
  import {
558
558
  FALLBACK_SCANNER_DATA,
559
559
  buildPlanFromAnalysis,
@@ -574,7 +574,7 @@ import {
574
574
  connectTransport,
575
575
  createServer,
576
576
  startStdioServer
577
- } from "./chunk-WCQD5WJX.js";
577
+ } from "./chunk-AYJNW7JN.js";
578
578
  import {
579
579
  OPENAI_MODELS,
580
580
  OPENAI_MODEL_ALIASES,
@@ -632,7 +632,7 @@ import {
632
632
  generateProposalId,
633
633
  parseAgentPairKey,
634
634
  registerConsensusVoteTool
635
- } from "./chunk-BL2RCXGC.js";
635
+ } from "./chunk-DDUZI6OD.js";
636
636
  import "./chunk-SOKS6XK2.js";
637
637
  import {
638
638
  allOf
@@ -683,7 +683,7 @@ import {
683
683
  import {
684
684
  ImprovementReviewInputSchema,
685
685
  registerImprovementReviewTool
686
- } from "./chunk-DIMPT3NS.js";
686
+ } from "./chunk-GQXDNAMB.js";
687
687
  import {
688
688
  AgentPerformanceSchema,
689
689
  ConsensusAlgorithmSchema,
@@ -719,10 +719,10 @@ import {
719
719
  toolSuccess,
720
720
  toolSuccessStructured,
721
721
  validateToolInput
722
- } from "./chunk-DLWXTCLB.js";
722
+ } from "./chunk-BZRUZSJ6.js";
723
723
  import {
724
724
  VERSION
725
- } from "./chunk-3BL6HLHW.js";
725
+ } from "./chunk-7A63AX2A.js";
726
726
  import {
727
727
  AuditTrail,
728
728
  MAX_STRIPPED_ELEMENTS_PER_EVENT,
@@ -4755,7 +4755,7 @@ function buildVotingInput(plan, config) {
4755
4755
  }
4756
4756
  async function executeSingleVote(plan, config, log) {
4757
4757
  try {
4758
- const { executeVoting } = await import("./consensus-vote-VNLVKZZK.js");
4758
+ const { executeVoting } = await import("./consensus-vote-X2EF47XM.js");
4759
4759
  const input = buildVotingInput(plan, config);
4760
4760
  const result = await executeVoting(input, log);
4761
4761
  return parseVotingResult(result);
@@ -2,11 +2,11 @@ import {
2
2
  NEXUS_DATA_DIR,
3
3
  describeDataDirFix,
4
4
  initDataDirectories
5
- } from "./chunk-WCQD5WJX.js";
5
+ } from "./chunk-AYJNW7JN.js";
6
6
  import "./chunk-VZM7YQZL.js";
7
7
  import "./chunk-SOKS6XK2.js";
8
8
  import "./chunk-OQB3XC5O.js";
9
- import "./chunk-3BL6HLHW.js";
9
+ import "./chunk-7A63AX2A.js";
10
10
  import "./chunk-6T3EPABN.js";
11
11
  import "./chunk-VRJJGXUE.js";
12
12
  import "./chunk-2P6GBKUN.js";
@@ -26,4 +26,4 @@ export {
26
26
  describeDataDirFix,
27
27
  initDataDirectories
28
28
  };
29
- //# sourceMappingURL=setup-data-dir-TCVUSEDW.js.map
29
+ //# sourceMappingURL=setup-data-dir-RQCYL3D3.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexus-agents",
3
- "version": "4.37.2",
3
+ "version": "5.0.1",
4
4
  "description": "Governance substrate for AI coding agents — adversarial PR review, drift-detected rules, tamper-evident audit, and closed-loop outcome routing for Claude, Codex, Gemini, and OpenCode",
5
5
  "mcpName": "io.github.nexus-substrate/nexus-agents",
6
6
  "license": "MIT",
@@ -1,7 +0,0 @@
1
- // src/version.ts
2
- var VERSION = true ? "4.37.2" : "dev";
3
-
4
- export {
5
- VERSION
6
- };
7
- //# sourceMappingURL=chunk-3BL6HLHW.js.map