nexus-agents 2.150.3 → 2.151.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.
@@ -4,10 +4,11 @@ import {
4
4
  VotingStrategySchema,
5
5
  createPolicyFailedResult,
6
6
  executeVoting,
7
+ maybeEscalateContrarian,
7
8
  registerConsensusVoteTool,
8
9
  resetCorrelationTracker,
9
10
  runConsensusForGoal
10
- } from "./chunk-SF3AM3SY.js";
11
+ } from "./chunk-UIL37D2V.js";
11
12
  import "./chunk-XSA7VZCU.js";
12
13
  import "./chunk-LXTTRYAT.js";
13
14
  import "./chunk-HQLZ7ORH.js";
@@ -33,8 +34,9 @@ export {
33
34
  VotingStrategySchema,
34
35
  createPolicyFailedResult,
35
36
  executeVoting,
37
+ maybeEscalateContrarian,
36
38
  registerConsensusVoteTool,
37
39
  resetCorrelationTracker,
38
40
  runConsensusForGoal
39
41
  };
40
- //# sourceMappingURL=consensus-vote-3R7MNO26.js.map
42
+ //# sourceMappingURL=consensus-vote-72AX6HNF.js.map
@@ -188,6 +188,17 @@ type VotingStrategy = 'simple_majority' | 'supermajority' | 'unanimous' | 'proof
188
188
  * - `fail_closed` (default for unanimous / higher_order): any error voids
189
189
  * the vote. Threshold math is not run. Use for security-critical or
190
190
  * breaking-change decisions where every voter must be heard.
191
+ * - `absolute_quorum` (opt-in, #4132): an errored voter DEGRADES the panel
192
+ * verdict to `no_quorum` instead of being silently dropped from the
193
+ * denominator. Unlike `fail_closed` (which reports a rejection-flavored void),
194
+ * `absolute_quorum` reports `no_quorum` — a recoverable "re-run the missing
195
+ * voice" state that never manufactures `approved` NOR `rejected` from an
196
+ * induced error. An approval requires ZERO errors, the contrarian (catfish)
197
+ * present and non-error (unless quick-mode drops it), and an ABSOLUTE approval
198
+ * count (`ceil(fraction * panelSize)` over the full requested panel — not just
199
+ * a majority of the responders). A genuine reject (zero errors) still blocks.
200
+ * The anti-DoS point: a voter you can knock offline can only ever force a
201
+ * re-run, never flip the verdict.
191
202
  *
192
203
  * Regardless of policy, a hard floor applies: when errors exceed 50% of
193
204
  * total voters, the vote always fails. Catches "all CLIs are down" — a
@@ -197,6 +208,7 @@ declare const ErrorPolicySchema: z.ZodEnum<{
197
208
  reduce_denominator: "reduce_denominator";
198
209
  count_as_abstain: "count_as_abstain";
199
210
  fail_closed: "fail_closed";
211
+ absolute_quorum: "absolute_quorum";
200
212
  }>;
201
213
  type ErrorPolicy = z.infer<typeof ErrorPolicySchema>;
202
214
  /**
@@ -235,6 +247,7 @@ declare const ConsensusVoteInputSchema: z.ZodObject<{
235
247
  reduce_denominator: "reduce_denominator";
236
248
  count_as_abstain: "count_as_abstain";
237
249
  fail_closed: "fail_closed";
250
+ absolute_quorum: "absolute_quorum";
238
251
  }>>;
239
252
  quickMode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
240
253
  simulateVotes: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ZodError, z, ZodType, ZodSafeParseResult } from 'zod';
2
- import { C as CliNameLiteral, I as InputModality, O as OutputModality, T as ToolCapability, S as SpecialFeature, P as Pricing, Q as QualityScores, M as ModelId, D as DecisionCostSummary, V as VotingStrategy } from './consensus-vote-types-DotaODdb.js';
3
- export { A as AgentVoteSummary, a as ConsensusVoteInput, b as ConsensusVoteInputSchema, c as ConsensusVoteResponse, d as VoteDecisionStatus } from './consensus-vote-types-DotaODdb.js';
2
+ import { C as CliNameLiteral, I as InputModality, O as OutputModality, T as ToolCapability, S as SpecialFeature, P as Pricing, Q as QualityScores, M as ModelId, D as DecisionCostSummary, V as VotingStrategy } from './consensus-vote-types-DOCnPzfx.js';
3
+ export { A as AgentVoteSummary, a as ConsensusVoteInput, b as ConsensusVoteInputSchema, c as ConsensusVoteResponse, d as VoteDecisionStatus } from './consensus-vote-types-DOCnPzfx.js';
4
4
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
5
  import { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
6
6
 
@@ -26742,6 +26742,10 @@ declare const PrReviewInputSchema: z.ZodObject<{
26742
26742
  prNumber: z.ZodOptional<z.ZodNumber>;
26743
26743
  baseSha: z.ZodOptional<z.ZodString>;
26744
26744
  simulate: z.ZodDefault<z.ZodBoolean>;
26745
+ errorPolicy: z.ZodDefault<z.ZodEnum<{
26746
+ standard: "standard";
26747
+ absolute_quorum: "absolute_quorum";
26748
+ }>>;
26745
26749
  dispatch: z.ZodDefault<z.ZodEnum<{
26746
26750
  async: "async";
26747
26751
  sync: "sync";
@@ -26775,6 +26779,14 @@ interface PrReviewVote {
26775
26779
  interface PrReviewAggregate {
26776
26780
  readonly decision: PrReviewDecision;
26777
26781
  readonly verified: boolean;
26782
+ /**
26783
+ * #4132: set when `absolute_quorum` DEGRADED a would-be verified approve to a
26784
+ * recoverable `{ decision: 'abstain', verified: false }` because a voter (esp.
26785
+ * the contrarian) errored or the panel was incomplete. `PrReviewAggregate` has
26786
+ * no `no_quorum` state, so `abstain`+`verified:false`+`reason` represents it —
26787
+ * the actionable "re-run the missing voice" signal. Absent on ungated verdicts.
26788
+ */
26789
+ readonly reason?: string;
26778
26790
  }
26779
26791
  interface PrReviewResponse {
26780
26792
  readonly summary: PrReviewDecision;
@@ -26836,7 +26848,7 @@ declare function mapVoteDecisionToPrDecision(voteDecision: 'approve' | 'reject'
26836
26848
  * Adding the finding requirement would zero this path out and reproduce
26837
26849
  * the baseline behavior.
26838
26850
  */
26839
- declare function aggregatePrDecisions(reviews: readonly PrReviewVote[]): PrReviewAggregate;
26851
+ declare function aggregatePrDecisions(reviews: readonly PrReviewVote[], errorPolicy?: 'standard' | 'absolute_quorum'): PrReviewAggregate;
26840
26852
  /** Builds the proposal text passed to voters. The voters are designed for
26841
26853
  * yes/no proposals — by framing the diff as "should this PR be merged?" we
26842
26854
  * get usable output without needing new system prompts (Child 3 will add
package/dist/index.js CHANGED
@@ -520,7 +520,7 @@ import {
520
520
  validateWorkflow,
521
521
  validateWorkflowDependencies,
522
522
  withLogging
523
- } from "./chunk-OSOHRYY5.js";
523
+ } from "./chunk-KRCL3VT6.js";
524
524
  import {
525
525
  OPENAI_MODELS,
526
526
  OPENAI_MODEL_ALIASES,
@@ -560,7 +560,7 @@ import {
560
560
  getKnownNexusVarNames,
561
561
  startStdioServer,
562
562
  validateNexusEnv
563
- } from "./chunk-DFK6H3KT.js";
563
+ } from "./chunk-O6PPXOH6.js";
564
564
  import {
565
565
  CliCircuitBreakerIntegration,
566
566
  createCliCircuitBreakerIntegration
@@ -616,7 +616,7 @@ import {
616
616
  generateProposalId,
617
617
  parseAgentPairKey,
618
618
  registerConsensusVoteTool
619
- } from "./chunk-SF3AM3SY.js";
619
+ } from "./chunk-UIL37D2V.js";
620
620
  import "./chunk-XSA7VZCU.js";
621
621
  import "./chunk-7ZMOF54O.js";
622
622
  import {
@@ -5955,7 +5955,7 @@ function buildVotingInput(plan, config) {
5955
5955
  }
5956
5956
  async function executeSingleVote(plan, config, log) {
5957
5957
  try {
5958
- const { executeVoting } = await import("./consensus-vote-3R7MNO26.js");
5958
+ const { executeVoting } = await import("./consensus-vote-72AX6HNF.js");
5959
5959
  const input = buildVotingInput(plan, config);
5960
5960
  const result = await executeVoting(input, log);
5961
5961
  return parseVotingResult(result);
@@ -8,9 +8,9 @@ import {
8
8
  runWizard,
9
9
  setupCommand,
10
10
  setupCommandAsync
11
- } from "./chunk-NQN3RNFP.js";
11
+ } from "./chunk-VXN3GODL.js";
12
12
  import "./chunk-CD7FU55Z.js";
13
- import "./chunk-DFK6H3KT.js";
13
+ import "./chunk-O6PPXOH6.js";
14
14
  import "./chunk-NUBSJGQZ.js";
15
15
  import "./chunk-6T3EPABN.js";
16
16
  import "./chunk-ZM4O442V.js";
@@ -35,4 +35,4 @@ export {
35
35
  setupCommand,
36
36
  setupCommandAsync
37
37
  };
38
- //# sourceMappingURL=setup-command-PPHPJCSN.js.map
38
+ //# sourceMappingURL=setup-command-JERVOJ5Z.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexus-agents",
3
- "version": "2.150.3",
3
+ "version": "2.151.0",
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",