nexus-agents 2.142.0 → 2.143.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.
- package/dist/{chunk-FPIAD37H.js → chunk-P75OHXX5.js} +14 -1
- package/dist/chunk-P75OHXX5.js.map +1 -0
- package/dist/{chunk-PXH2RMJL.js → chunk-QTQBGLTG.js} +3 -3
- package/dist/{chunk-ZFARSMPH.js → chunk-TZTAAZGD.js} +2 -2
- package/dist/{chunk-NESFWFYT.js → chunk-X5FLDORQ.js} +4 -4
- package/dist/{chunk-NESFWFYT.js.map → chunk-X5FLDORQ.js.map} +1 -1
- package/dist/cli.js +4 -4
- package/dist/{consensus-vote-DYE7UKAI.js → consensus-vote-3GJMGB3L.js} +2 -2
- package/dist/index.d.ts +40 -17
- package/dist/index.js +4 -4
- package/dist/{setup-command-EFIGMMYZ.js → setup-command-3MDZJNXO.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-FPIAD37H.js.map +0 -1
- /package/dist/{chunk-PXH2RMJL.js.map → chunk-QTQBGLTG.js.map} +0 -0
- /package/dist/{chunk-ZFARSMPH.js.map → chunk-TZTAAZGD.js.map} +0 -0
- /package/dist/{consensus-vote-DYE7UKAI.js.map → consensus-vote-3GJMGB3L.js.map} +0 -0
- /package/dist/{setup-command-EFIGMMYZ.js.map → setup-command-3MDZJNXO.js.map} +0 -0
|
@@ -1468,9 +1468,12 @@ var logger = createLogger({ component: "higher-order-voting" });
|
|
|
1468
1468
|
var OWVoting = class {
|
|
1469
1469
|
algorithm;
|
|
1470
1470
|
config;
|
|
1471
|
+
/** #3173: tracker used when `aggregate` is called without a per-call one. */
|
|
1472
|
+
injectedTracker;
|
|
1471
1473
|
constructor(options = {}) {
|
|
1472
1474
|
this.config = { ...DEFAULT_HIGHER_ORDER_CONFIG, ...options.config };
|
|
1473
1475
|
this.algorithm = options.algorithm ?? "simple_majority";
|
|
1476
|
+
this.injectedTracker = options.tracker;
|
|
1474
1477
|
logger.info("OWVoting initialized", { config: this.config, algorithm: this.algorithm });
|
|
1475
1478
|
}
|
|
1476
1479
|
/** IVotingStrategy implementation for integration with ConsensusEngine. */
|
|
@@ -1562,6 +1565,16 @@ var OWVoting = class {
|
|
|
1562
1565
|
return result;
|
|
1563
1566
|
}
|
|
1564
1567
|
aggregate(votes, tracker) {
|
|
1568
|
+
const effectiveTracker = tracker ?? this.injectedTracker;
|
|
1569
|
+
if (effectiveTracker === void 0) {
|
|
1570
|
+
throw new Error(
|
|
1571
|
+
"OWVoting.aggregate requires an ICorrelationTracker \u2014 pass it as an argument or inject one via OWVotingOptions.tracker (#3173)."
|
|
1572
|
+
);
|
|
1573
|
+
}
|
|
1574
|
+
return this.aggregateWith(votes, effectiveTracker);
|
|
1575
|
+
}
|
|
1576
|
+
/** Core aggregation against a resolved tracker (#3173 — extracted from aggregate). */
|
|
1577
|
+
aggregateWith(votes, tracker) {
|
|
1565
1578
|
const agentIds = Array.from(votes.keys());
|
|
1566
1579
|
if (!tracker.hasSufficientData(agentIds)) {
|
|
1567
1580
|
if (this.config.fallbackToSimpleVoting) {
|
|
@@ -6180,4 +6193,4 @@ export {
|
|
|
6180
6193
|
CONSENSUS_VOTE_OUTPUT_SCHEMA,
|
|
6181
6194
|
registerConsensusVoteTool
|
|
6182
6195
|
};
|
|
6183
|
-
//# sourceMappingURL=chunk-
|
|
6196
|
+
//# sourceMappingURL=chunk-P75OHXX5.js.map
|