nexus-agents 4.3.0 → 4.3.2
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-OHRCTQDC.js → chunk-5HHTFAHY.js} +4 -4
- package/dist/{chunk-4WU3BGGK.js → chunk-CXA4H3PZ.js} +8 -72
- package/dist/chunk-CXA4H3PZ.js.map +1 -0
- package/dist/{chunk-D32WYARF.js → chunk-U6NDB43U.js} +2 -2
- package/dist/{chunk-D3BKW23W.js → chunk-Z3QSRADW.js} +3 -3
- package/dist/cli.js +4 -4
- package/dist/{consensus-vote-ZRLZYJ4D.js → consensus-vote-EOXPISAA.js} +2 -2
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -4
- package/dist/{setup-command-775JEHPJ.js → setup-command-GVDJEHTI.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-4WU3BGGK.js.map +0 -1
- /package/dist/{chunk-OHRCTQDC.js.map → chunk-5HHTFAHY.js.map} +0 -0
- /package/dist/{chunk-D32WYARF.js.map → chunk-U6NDB43U.js.map} +0 -0
- /package/dist/{chunk-D3BKW23W.js.map → chunk-Z3QSRADW.js.map} +0 -0
- /package/dist/{consensus-vote-ZRLZYJ4D.js.map → consensus-vote-EOXPISAA.js.map} +0 -0
- /package/dist/{setup-command-775JEHPJ.js.map → setup-command-GVDJEHTI.js.map} +0 -0
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
DEFAULT_TASK_TTL_MS,
|
|
23
23
|
DEFAULT_TOOL_RATE_LIMITS,
|
|
24
24
|
clampTaskTtl
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-Z3QSRADW.js";
|
|
26
26
|
import {
|
|
27
27
|
executeExpert
|
|
28
28
|
} from "./chunk-OYNZ6FCZ.js";
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
simulationDeniedResult,
|
|
47
47
|
toJobSummary,
|
|
48
48
|
writeJobCancelled
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-CXA4H3PZ.js";
|
|
50
50
|
import {
|
|
51
51
|
allOf
|
|
52
52
|
} from "./chunk-OQB3XC5O.js";
|
|
@@ -45931,7 +45931,7 @@ ${contextBlock}`;
|
|
|
45931
45931
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
45932
45932
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
45933
45933
|
try {
|
|
45934
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
45934
|
+
const { executeVoting } = await import("./consensus-vote-EOXPISAA.js");
|
|
45935
45935
|
const votingResult = await executeVoting(
|
|
45936
45936
|
{
|
|
45937
45937
|
proposal: buildVoteProposal(plan, research),
|
|
@@ -54497,4 +54497,4 @@ export {
|
|
|
54497
54497
|
shutdownFeedbackSubscriber,
|
|
54498
54498
|
createEventBusBridge
|
|
54499
54499
|
};
|
|
54500
|
-
//# sourceMappingURL=chunk-
|
|
54500
|
+
//# sourceMappingURL=chunk-5HHTFAHY.js.map
|
|
@@ -2657,8 +2657,6 @@ function createConsensusEngine(config, logger10) {
|
|
|
2657
2657
|
}
|
|
2658
2658
|
|
|
2659
2659
|
// src/consensus/quorum-validator.ts
|
|
2660
|
-
var DEFAULT_MIN_TRUST = 0.3;
|
|
2661
|
-
var DEFAULT_MIN_WEIGHT = 0.1;
|
|
2662
2660
|
var QuorumValidator = class {
|
|
2663
2661
|
logger;
|
|
2664
2662
|
constructor(logger10) {
|
|
@@ -2676,15 +2674,9 @@ var QuorumValidator = class {
|
|
|
2676
2674
|
return this.buildReachedResult(breakdown);
|
|
2677
2675
|
}
|
|
2678
2676
|
getQuorumBreakdown(input) {
|
|
2679
|
-
const { votes, agentWeights, config,
|
|
2677
|
+
const { votes, agentWeights, config, requiredParticipants } = input;
|
|
2680
2678
|
const voteCounts = this.countVotes(votes);
|
|
2681
|
-
const
|
|
2682
|
-
const { totalWeight, weightedCounts } = this.calculateWeights(
|
|
2683
|
-
votes,
|
|
2684
|
-
agentWeights,
|
|
2685
|
-
agentRecords,
|
|
2686
|
-
config
|
|
2687
|
-
);
|
|
2679
|
+
const { totalWeight, weightedCounts } = this.calculateWeights(votes, agentWeights, config);
|
|
2688
2680
|
const { threshold, actualQuorum, quorumReached, reasoning } = this.calculateQuorumStatus(
|
|
2689
2681
|
voteCounts,
|
|
2690
2682
|
weightedCounts,
|
|
@@ -2700,54 +2692,9 @@ var QuorumValidator = class {
|
|
|
2700
2692
|
threshold,
|
|
2701
2693
|
actualQuorum,
|
|
2702
2694
|
quorumReached,
|
|
2703
|
-
eligibleAgents,
|
|
2704
2695
|
reasoning
|
|
2705
2696
|
};
|
|
2706
2697
|
}
|
|
2707
|
-
/**
|
|
2708
|
-
* Decides whether an agent's vote counts, and with what weight.
|
|
2709
|
-
*
|
|
2710
|
-
* WIRING (#4666): this works and is tested, but **nothing in production can
|
|
2711
|
-
* reach an exclusion**. The three exclusion branches all require an
|
|
2712
|
-
* `AgentRecord`, and `getQuorumBreakdown`'s only production caller
|
|
2713
|
-
* (`voting-protocol-helpers`) passes `{ votes, config }` with no
|
|
2714
|
-
* `agentRecords` — `grep -rn agentRecords src --include=*.ts`, excluding
|
|
2715
|
-
* tests and this file, returns nothing. With no record the method returns
|
|
2716
|
-
* `{ eligible: true, weight: 1.0 }` on the first line.
|
|
2717
|
-
*
|
|
2718
|
-
* `enableByzantineDetection` additionally has zero writers anywhere in
|
|
2719
|
-
* `src/`: only this read and its declaration.
|
|
2720
|
-
*
|
|
2721
|
-
* So `eligibleAgents` is every voter, always. Do NOT read a full eligible
|
|
2722
|
-
* list as evidence that trust or Byzantine screening ran — nothing screened.
|
|
2723
|
-
* Wiring it needs a producer for `AgentRecord` (trust scores, Byzantine
|
|
2724
|
-
* flags), which the engine does not currently maintain.
|
|
2725
|
-
*
|
|
2726
|
-
* Kept rather than deleted: the behaviour is correct and covered by tests, so
|
|
2727
|
-
* this is unwired capability, not dead code. Removing a working trust model
|
|
2728
|
-
* is a decision about the resilience posture, not a cleanup — see #4666.
|
|
2729
|
-
*/
|
|
2730
|
-
isAgentEligible(agentId, record, config) {
|
|
2731
|
-
if (record === void 0) {
|
|
2732
|
-
return { eligible: true, weight: 1 };
|
|
2733
|
-
}
|
|
2734
|
-
if (config.enableByzantineDetection === true && (record.byzantineFlags ?? 0) > 0) {
|
|
2735
|
-
this.logger.debug("Agent flagged as Byzantine", { agentId, flags: record.byzantineFlags });
|
|
2736
|
-
return { eligible: false, reason: "byzantine_flagged", weight: record.weight };
|
|
2737
|
-
}
|
|
2738
|
-
if (record.trustScore < DEFAULT_MIN_TRUST) {
|
|
2739
|
-
this.logger.debug("Agent trust score below threshold", {
|
|
2740
|
-
agentId,
|
|
2741
|
-
trustScore: record.trustScore
|
|
2742
|
-
});
|
|
2743
|
-
return { eligible: false, reason: "low_trust", weight: record.weight };
|
|
2744
|
-
}
|
|
2745
|
-
if (record.weight < DEFAULT_MIN_WEIGHT) {
|
|
2746
|
-
this.logger.debug("Agent weight below threshold", { agentId, weight: record.weight });
|
|
2747
|
-
return { eligible: false, reason: "insufficient_weight", weight: record.weight };
|
|
2748
|
-
}
|
|
2749
|
-
return { eligible: true, weight: record.weight };
|
|
2750
|
-
}
|
|
2751
2698
|
countVotes(votes) {
|
|
2752
2699
|
let approve = 0;
|
|
2753
2700
|
let reject = 0;
|
|
@@ -2767,24 +2714,13 @@ var QuorumValidator = class {
|
|
|
2767
2714
|
}
|
|
2768
2715
|
return { approve, reject, abstain, total: votes.size };
|
|
2769
2716
|
}
|
|
2770
|
-
|
|
2771
|
-
const eligible = [];
|
|
2772
|
-
for (const agentId of votes.keys()) {
|
|
2773
|
-
const record = agentRecords?.get(agentId);
|
|
2774
|
-
const result = this.isAgentEligible(agentId, record, config);
|
|
2775
|
-
if (result.eligible) {
|
|
2776
|
-
eligible.push(agentId);
|
|
2777
|
-
}
|
|
2778
|
-
}
|
|
2779
|
-
return eligible;
|
|
2780
|
-
}
|
|
2781
|
-
calculateWeights(votes, agentWeights, agentRecords, config) {
|
|
2717
|
+
calculateWeights(votes, agentWeights, config) {
|
|
2782
2718
|
if (config.algorithm === "simple_majority" || config.algorithm === "unanimous") {
|
|
2783
2719
|
return { totalWeight: void 0, weightedCounts: void 0 };
|
|
2784
2720
|
}
|
|
2785
2721
|
const counts = { totalWeight: 0, approve: 0, reject: 0, abstain: 0 };
|
|
2786
2722
|
for (const [agentId, vote] of votes.entries()) {
|
|
2787
|
-
const weight = this.getVoteWeight(agentId, vote, agentWeights,
|
|
2723
|
+
const weight = this.getVoteWeight(agentId, vote, agentWeights, config);
|
|
2788
2724
|
counts.totalWeight += weight;
|
|
2789
2725
|
this.addWeightToDecision(counts, vote.decision, weight);
|
|
2790
2726
|
}
|
|
@@ -2798,8 +2734,8 @@ var QuorumValidator = class {
|
|
|
2798
2734
|
}
|
|
2799
2735
|
};
|
|
2800
2736
|
}
|
|
2801
|
-
getVoteWeight(agentId, vote, agentWeights,
|
|
2802
|
-
let weight = agentWeights?.get(agentId) ??
|
|
2737
|
+
getVoteWeight(agentId, vote, agentWeights, config) {
|
|
2738
|
+
let weight = agentWeights?.get(agentId) ?? 1;
|
|
2803
2739
|
if (config.confidenceMultiplier === true) {
|
|
2804
2740
|
weight *= vote.confidence;
|
|
2805
2741
|
}
|
|
@@ -6683,7 +6619,7 @@ var CONSENSUS_VOTE_TOOL_SCHEMA = {
|
|
|
6683
6619
|
"Authority-tier ratification subject (#4004) \u2014 the loop/strategy id this vote ratifies for an authority-ladder promotion. Bound into the authentic vote record so the promotion gate can verify it. Omit for ordinary votes."
|
|
6684
6620
|
)
|
|
6685
6621
|
};
|
|
6686
|
-
var CONSENSUS_VOTE_DESCRIPTION = "Execute multi-model consensus voting on a proposal. Uses 7 roles by default (architect, security, devex, ai_ml, pm, catfish, scope_steward) or 3 with quickMode (architect, security, scope_steward), voting with configurable strategies.
|
|
6622
|
+
var CONSENSUS_VOTE_DESCRIPTION = "Execute multi-model consensus voting on a proposal. Uses 7 roles by default (architect, security, devex, ai_ml, pm, catfish, scope_steward) or 3 with quickMode (architect, security, scope_steward), voting with configurable strategies. higher_order does NOT decide the verdict by correlation-aware aggregation (#4701): approve/reject is a simple tally of the panel, so correlated voters each carry full independent weight. The Bayesian correlation analysis is computed and feeds contrarian escalation only. Choose it for the escalation behaviour, not for a weighted verdict. Supports async mode (mode: 'async') \u2014 returns a jobId to poll via get_job_result. Pass ratifies=<subject> to bind an authority-ladder ratification vote into its authentic record. If your proposal asks voters to choose among named alternatives, you MUST pass them in `options` (#4472) \u2014 the threshold is then measured over WHICH option won, and the record carries the per-option tally plus selection coverage. WITHOUT `options` the tally is approve/reject/abstain only, so every voter who engages returns `approve` and a 6-1 split on which option persists as 7-0, 100% (#4452).";
|
|
6687
6623
|
function registerConsensusVoteTool(server, deps) {
|
|
6688
6624
|
const logger10 = deps.logger ?? createLogger({ tool: "consensus_vote" });
|
|
6689
6625
|
const notifier = deps.notifier ?? createMcpNotifier(server);
|
|
@@ -6792,4 +6728,4 @@ export {
|
|
|
6792
6728
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
6793
6729
|
registerConsensusVoteTool
|
|
6794
6730
|
};
|
|
6795
|
-
//# sourceMappingURL=chunk-
|
|
6731
|
+
//# sourceMappingURL=chunk-CXA4H3PZ.js.map
|