nexus-agents 8.42.8 → 8.42.10

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,10 +23,10 @@ import {
23
23
  toolSuccessStructured,
24
24
  withProgressHeartbeat,
25
25
  wrapToolWithTimeout
26
- } from "./chunk-YKQ4NWHP.js";
26
+ } from "./chunk-SQOL27X5.js";
27
27
  import {
28
28
  VERSION
29
- } from "./chunk-QJ6MN5QI.js";
29
+ } from "./chunk-BO3YR4BD.js";
30
30
  import {
31
31
  assessPanelIndependence,
32
32
  countDistinctModels,
@@ -4948,6 +4948,10 @@ function absoluteQuorumFraction(strategy) {
4948
4948
  return 0.5;
4949
4949
  }
4950
4950
  }
4951
+ function minimumRespondents(panelSize) {
4952
+ if (panelSize <= 0) return 0;
4953
+ return Math.min(panelSize, Math.max(Math.ceil(panelSize * 2 / 3), 3));
4954
+ }
4951
4955
  function absoluteQuorumDegradeReason(result, errorCount) {
4952
4956
  const contrarianVote = result.votes.find((v) => v.role === "catfish");
4953
4957
  const contrarianOk = contrarianVote !== void 0 && contrarianVote.source !== "error";
@@ -4977,15 +4981,30 @@ function computeAbsoluteQuorumDecision(result, errorCount, allErrors) {
4977
4981
  degradeReason: `no_quorum: absolute quorum not met (${String(approveCount)}/${String(needed)} approvals over ${String(panel)}-voter panel, absolute_quorum)`
4978
4982
  };
4979
4983
  }
4984
+ function respondentFloorOutcome(result) {
4985
+ if (result.result.outcome !== "approved") return void 0;
4986
+ const panel = result.panelSize ?? result.votes.length;
4987
+ const floor = minimumRespondents(panel);
4988
+ const respondents = result.votes.filter(
4989
+ (v) => v.source !== "error" && (v.vote.decision === "approve" || v.vote.decision === "reject")
4990
+ ).length;
4991
+ if (respondents >= floor) return void 0;
4992
+ return {
4993
+ decision: "no_quorum",
4994
+ degradeReason: `no_quorum: ${String(respondents)} of ${String(panel)} voters decided; ${String(floor)} required before a ratio is applied (#5780)`
4995
+ };
4996
+ }
4980
4997
  function resolveVoteDecision(input, result, errorCount) {
4981
4998
  const allErrors = errorCount === result.votes.length && errorCount > 0;
4982
4999
  if (result.policyReason !== void 0 || !result.result.quorumReached && allErrors) {
4983
5000
  return { decision: "no_quorum" };
4984
5001
  }
4985
5002
  if (input.errorPolicy === "absolute_quorum") {
4986
- return computeAbsoluteQuorumDecision(result, errorCount, allErrors);
5003
+ const quorumOutcome = computeAbsoluteQuorumDecision(result, errorCount, allErrors);
5004
+ if (quorumOutcome.decision !== "approved") return quorumOutcome;
5005
+ return respondentFloorOutcome(result) ?? quorumOutcome;
4987
5006
  }
4988
- return { decision: mapOutcomeToDecision(result.result.outcome) };
5007
+ return respondentFloorOutcome(result) ?? { decision: mapOutcomeToDecision(result.result.outcome) };
4989
5008
  }
4990
5009
  function applyAbsoluteQuorumTelemetry(response, input, decision, degradeReason) {
4991
5010
  if (input.errorPolicy === "absolute_quorum" && decision === "no_quorum") {
@@ -7830,4 +7849,4 @@ export {
7830
7849
  CONSENSUS_VOTE_TOOL_SCHEMA,
7831
7850
  registerConsensusVoteTool
7832
7851
  };
7833
- //# sourceMappingURL=chunk-IYQ4CN2Y.js.map
7852
+ //# sourceMappingURL=chunk-3PCDMUI3.js.map