nexus-agents 8.46.12 → 8.46.14

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-7JSICUB5.js";
24
+ } from "./chunk-P4P3HT6B.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-QLF22ILR.js";
@@ -55,7 +55,7 @@ import {
55
55
  toJobSummary,
56
56
  updateStage,
57
57
  writeJobCancelled
58
- } from "./chunk-RENU7KZA.js";
58
+ } from "./chunk-MJG5EZO7.js";
59
59
  import {
60
60
  allOf,
61
61
  anyOf
@@ -75,7 +75,7 @@ import {
75
75
  } from "./chunk-43ONDTAK.js";
76
76
  import {
77
77
  withPrerequisite
78
- } from "./chunk-YZ3RVX52.js";
78
+ } from "./chunk-GQMIBFMY.js";
79
79
  import {
80
80
  NOOP_NOTIFIER,
81
81
  RateLimiter,
@@ -100,7 +100,7 @@ import {
100
100
  withAuditTrail,
101
101
  withProgressHeartbeat,
102
102
  wrapToolWithTimeout
103
- } from "./chunk-QVUWED65.js";
103
+ } from "./chunk-CTR7MEJA.js";
104
104
  import {
105
105
  createAuditTrail,
106
106
  createGraphAuditBridge,
@@ -27304,6 +27304,7 @@ function calculateZStatistic(params) {
27304
27304
  }
27305
27305
  function calculateDifferenceCI(p1, p2, total1, total2, confidence) {
27306
27306
  const difference = p1 - p2;
27307
+ const measured = total1 > 0 && total2 > 0;
27307
27308
  const seDiff = Math.sqrt(p1 * (1 - p1) / (total1 || 1) + p2 * (1 - p2) / (total2 || 1));
27308
27309
  const z128 = getZScore(confidence);
27309
27310
  return {
@@ -27312,7 +27313,8 @@ function calculateDifferenceCI(p1, p2, total1, total2, confidence) {
27312
27313
  estimate: difference,
27313
27314
  confidence,
27314
27315
  n: total1 + total2,
27315
- standardError: seDiff
27316
+ standardError: seDiff,
27317
+ measured
27316
27318
  };
27317
27319
  }
27318
27320
 
@@ -27323,12 +27325,16 @@ function proportionConfidenceInterval(successes, total, options = {}) {
27323
27325
  const p = n > 0 ? successes / n : 0;
27324
27326
  if (n === 0) {
27325
27327
  return {
27328
+ // [0, 1] is the whole domain — honest for a PROPORTION, but honest by
27329
+ // luck: it is expressible only because the domain is bounded. `measured`
27330
+ // is what says it deliberately (#5760).
27326
27331
  lower: 0,
27327
27332
  upper: 1,
27328
27333
  estimate: 0,
27329
27334
  confidence: opts.confidence,
27330
27335
  n: 0,
27331
- standardError: 0
27336
+ standardError: 0,
27337
+ measured: false
27332
27338
  };
27333
27339
  }
27334
27340
  const z128 = getZScore(opts.confidence);
@@ -27343,6 +27349,7 @@ function proportionConfidenceInterval(successes, total, options = {}) {
27343
27349
  lower,
27344
27350
  upper,
27345
27351
  estimate: p,
27352
+ measured: true,
27346
27353
  confidence: opts.confidence,
27347
27354
  n,
27348
27355
  standardError
@@ -27353,12 +27360,19 @@ function meanConfidenceInterval(values, options = {}) {
27353
27360
  const n = values.length;
27354
27361
  if (n === 0) {
27355
27362
  return {
27363
+ // A zero-width interval is the STRONGEST possible precision claim, and
27364
+ // there is no data behind it. Unlike a proportion, a mean is unbounded,
27365
+ // so no finite interval means "I know nothing" — `measured: false` is
27366
+ // the only thing here that can say it (#5760). Bounds are left as they
27367
+ // were: Infinity and NaN both serialise to `null`, which would turn a
27368
+ // loud in-process signal into a silent persisted one.
27356
27369
  lower: 0,
27357
27370
  upper: 0,
27358
27371
  estimate: 0,
27359
27372
  confidence: opts.confidence,
27360
27373
  n: 0,
27361
- standardError: 0
27374
+ standardError: 0,
27375
+ measured: false
27362
27376
  };
27363
27377
  }
27364
27378
  const mean = values.reduce((sum, v) => sum + v, 0) / n;
@@ -27371,6 +27385,7 @@ function meanConfidenceInterval(values, options = {}) {
27371
27385
  lower: mean - margin,
27372
27386
  upper: mean + margin,
27373
27387
  estimate: mean,
27388
+ measured: true,
27374
27389
  confidence: opts.confidence,
27375
27390
  n,
27376
27391
  standardError
@@ -46092,7 +46107,7 @@ function buildVotingInput(plan, config) {
46092
46107
  }
46093
46108
  async function executeSingleVote(plan, config, log) {
46094
46109
  try {
46095
- const { executeVoting } = await import("./consensus-vote-QEDB75LI.js");
46110
+ const { executeVoting } = await import("./consensus-vote-NP7MH4NN.js");
46096
46111
  const input = buildVotingInput(plan, config);
46097
46112
  const result = await executeVoting(input, log);
46098
46113
  return parseVotingResult(result);
@@ -47887,7 +47902,7 @@ ${contextBlock}`;
47887
47902
  const strategy = config.votingStrategy ?? "higher_order";
47888
47903
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47889
47904
  try {
47890
- const { executeVoting } = await import("./consensus-vote-QEDB75LI.js");
47905
+ const { executeVoting } = await import("./consensus-vote-NP7MH4NN.js");
47891
47906
  const votingResult = await executeVoting(
47892
47907
  {
47893
47908
  proposal: buildVoteProposal(plan, research),
@@ -54873,7 +54888,7 @@ function getDecisiveRouterType(decision) {
54873
54888
  }
54874
54889
  return { routerType: "topsis", measured: false };
54875
54890
  }
54876
- function buildStoredDecision(id, traceId, routerType, decision) {
54891
+ function buildStoredDecision(id, traceId, routerType, decision, routerTypeMeasured) {
54877
54892
  return {
54878
54893
  id,
54879
54894
  traceId,
@@ -54884,7 +54899,8 @@ function buildStoredDecision(id, traceId, routerType, decision) {
54884
54899
  alternativeModels: decision.alternatives.map(routingArmDisplaySlot),
54885
54900
  confidence: decision.confidence,
54886
54901
  reason: decision.reason,
54887
- taskProfile: serializeTaskProfile(decision.taskProfile)
54902
+ taskProfile: serializeTaskProfile(decision.taskProfile),
54903
+ routerTypeMeasured
54888
54904
  };
54889
54905
  }
54890
54906
  function serializeTaskProfile(profile) {
@@ -54958,7 +54974,13 @@ var FeedbackIntegration = class {
54958
54974
  const decisionWithId = { ...routingDecision, id };
54959
54975
  this.collector.recordRoutingDecision(decisionWithId);
54960
54976
  if (this.outcomeStorage !== void 0) {
54961
- const storedDecision = buildStoredDecision(id, trace, decisive.routerType, decision);
54977
+ const storedDecision = buildStoredDecision(
54978
+ id,
54979
+ trace,
54980
+ decisive.routerType,
54981
+ decision,
54982
+ decisive.measured
54983
+ );
54962
54984
  this.outcomeStorage.storeDecision(storedDecision).catch((error) => {
54963
54985
  this.logger.warn("Failed to persist routing decision to SQLite", { id, error });
54964
54986
  });
@@ -56621,4 +56643,4 @@ export {
56621
56643
  startPipelineEventBridge,
56622
56644
  shutdownPipelineEventBridge
56623
56645
  };
56624
- //# sourceMappingURL=chunk-Z7XY4BJR.js.map
56646
+ //# sourceMappingURL=chunk-ABSESTZF.js.map