nexus-agents 3.3.2 → 3.4.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.
Files changed (25) hide show
  1. package/dist/{chunk-UNDYHLRR.js → chunk-2KVTXC7Y.js} +6 -1
  2. package/dist/{chunk-UNDYHLRR.js.map → chunk-2KVTXC7Y.js.map} +1 -1
  3. package/dist/{chunk-VSFWQHRX.js → chunk-CFK4VK2M.js} +6 -6
  4. package/dist/{chunk-LVFYELQU.js → chunk-FHTU4BSP.js} +3 -3
  5. package/dist/{chunk-3T3TZZKG.js → chunk-JEV6RUUH.js} +2 -2
  6. package/dist/{chunk-RA5L4BVA.js → chunk-QAEBYGSP.js} +2 -2
  7. package/dist/{chunk-RAYKASM4.js → chunk-XL6T3HTN.js} +261 -31
  8. package/dist/chunk-XL6T3HTN.js.map +1 -0
  9. package/dist/cli.d.ts +1 -1
  10. package/dist/cli.js +7 -7
  11. package/dist/{consensus-vote-UF73LBG6.js → consensus-vote-EIEPPKAD.js} +3 -3
  12. package/dist/{consensus-vote-types-C7kiyyqD.d.ts → consensus-vote-types-jDyddCzg.d.ts} +27 -0
  13. package/dist/{improvement-review-B7DR4Y3C.js → improvement-review-YYHQ2D5L.js} +3 -3
  14. package/dist/index.d.ts +4 -2
  15. package/dist/index.js +6 -6
  16. package/dist/{setup-command-COUBH2NS.js → setup-command-CYZO22RO.js} +3 -3
  17. package/package.json +1 -1
  18. package/dist/chunk-RAYKASM4.js.map +0 -1
  19. /package/dist/{chunk-VSFWQHRX.js.map → chunk-CFK4VK2M.js.map} +0 -0
  20. /package/dist/{chunk-LVFYELQU.js.map → chunk-FHTU4BSP.js.map} +0 -0
  21. /package/dist/{chunk-3T3TZZKG.js.map → chunk-JEV6RUUH.js.map} +0 -0
  22. /package/dist/{chunk-RA5L4BVA.js.map → chunk-QAEBYGSP.js.map} +0 -0
  23. /package/dist/{consensus-vote-UF73LBG6.js.map → consensus-vote-EIEPPKAD.js.map} +0 -0
  24. /package/dist/{improvement-review-B7DR4Y3C.js.map → improvement-review-YYHQ2D5L.js.map} +0 -0
  25. /package/dist/{setup-command-COUBH2NS.js.map → setup-command-CYZO22RO.js.map} +0 -0
package/dist/cli.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { C as CliNameLiteral, K as VoteThreshold, E as ErrorPolicy, N as NoQuorumPolicy } from './consensus-vote-types-C7kiyyqD.js';
2
+ import { C as CliNameLiteral, K as VoteThreshold, E as ErrorPolicy, N as NoQuorumPolicy } from './consensus-vote-types-jDyddCzg.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
package/dist/cli.js CHANGED
@@ -18,7 +18,7 @@ import "./chunk-NNBX6YZI.js";
18
18
  import {
19
19
  setupCommandAsync,
20
20
  verifyCommand
21
- } from "./chunk-RA5L4BVA.js";
21
+ } from "./chunk-QAEBYGSP.js";
22
22
  import "./chunk-E6YS4KOL.js";
23
23
  import {
24
24
  AuthHandler,
@@ -139,7 +139,7 @@ import {
139
139
  validateCommand,
140
140
  validateWorkflow,
141
141
  wrapInMarkdownFence
142
- } from "./chunk-VSFWQHRX.js";
142
+ } from "./chunk-CFK4VK2M.js";
143
143
  import "./chunk-ZP5QHPDX.js";
144
144
  import "./chunk-HFOQKCD2.js";
145
145
  import "./chunk-YF35FKKD.js";
@@ -166,7 +166,7 @@ import {
166
166
  loadConfig,
167
167
  runDoctor,
168
168
  validateNexusEnv
169
- } from "./chunk-LVFYELQU.js";
169
+ } from "./chunk-FHTU4BSP.js";
170
170
  import {
171
171
  buildOpenAICompatAdapters,
172
172
  readOpenAICompatEnv
@@ -183,7 +183,7 @@ import {
183
183
  executeVoting,
184
184
  mapOutcomeToDecision,
185
185
  registerConsensusVoteTool
186
- } from "./chunk-RAYKASM4.js";
186
+ } from "./chunk-XL6T3HTN.js";
187
187
  import {
188
188
  loadUsageEvents,
189
189
  rollupByModel
@@ -215,10 +215,10 @@ import {
215
215
  registerImprovementReviewTool,
216
216
  runImprovementReview,
217
217
  scanForSecrets
218
- } from "./chunk-3T3TZZKG.js";
218
+ } from "./chunk-JEV6RUUH.js";
219
219
  import {
220
220
  createDefaultPolicyFirewall
221
- } from "./chunk-UNDYHLRR.js";
221
+ } from "./chunk-2KVTXC7Y.js";
222
222
  import "./chunk-63EFLUVS.js";
223
223
  import {
224
224
  createUnifiedRegistry,
@@ -17461,7 +17461,7 @@ function startImprovementReviewScheduler(options) {
17461
17461
  let running = false;
17462
17462
  const runOnce = async () => {
17463
17463
  try {
17464
- const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-B7DR4Y3C.js");
17464
+ const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-YYHQ2D5L.js");
17465
17465
  const input = ImprovementReviewInputSchema2.parse({ fileIssues });
17466
17466
  const result = await runImprovementReview2(input, { logger: logger19 });
17467
17467
  logger19.info("Scheduled improvement_review complete", {
@@ -9,9 +9,9 @@ import {
9
9
  resetCorrelationTracker,
10
10
  runConsensusForGoal,
11
11
  unwrapVoteOrThrow
12
- } from "./chunk-RAYKASM4.js";
12
+ } from "./chunk-XL6T3HTN.js";
13
13
  import "./chunk-YWGMDZR4.js";
14
- import "./chunk-UNDYHLRR.js";
14
+ import "./chunk-2KVTXC7Y.js";
15
15
  import "./chunk-63EFLUVS.js";
16
16
  import "./chunk-7L7CUYAY.js";
17
17
  import "./chunk-7HDPHBKE.js";
@@ -44,4 +44,4 @@ export {
44
44
  runConsensusForGoal,
45
45
  unwrapVoteOrThrow
46
46
  };
47
- //# sourceMappingURL=consensus-vote-UF73LBG6.js.map
47
+ //# sourceMappingURL=consensus-vote-EIEPPKAD.js.map
@@ -291,6 +291,7 @@ declare const VoteSchema: z.ZodObject<{
291
291
  }, z.core.$strip>;
292
292
  claim: z.ZodString;
293
293
  }, z.core.$strip>>>;
294
+ selectedOption: z.ZodOptional<z.ZodString>;
294
295
  timestamp: z.ZodOptional<z.ZodISODateTime>;
295
296
  }, z.core.$strip>;
296
297
  type Vote = z.infer<typeof VoteSchema>;
@@ -430,6 +431,7 @@ declare const ConsensusResultSchema: z.ZodObject<{
430
431
  }, z.core.$strip>;
431
432
  claim: z.ZodString;
432
433
  }, z.core.$strip>>>;
434
+ selectedOption: z.ZodOptional<z.ZodString>;
433
435
  timestamp: z.ZodOptional<z.ZodISODateTime>;
434
436
  }, z.core.$strip>>;
435
437
  voteCounts: z.ZodObject<{
@@ -757,6 +759,7 @@ declare const VoteThresholdSchema: z.ZodEnum<{
757
759
  type VoteThreshold = z.infer<typeof VoteThresholdSchema>;
758
760
  declare const ConsensusVoteInputSchema: z.ZodObject<{
759
761
  proposal: z.ZodString;
762
+ options: z.ZodOptional<z.ZodArray<z.ZodString>>;
760
763
  threshold: z.ZodOptional<z.ZodEnum<{
761
764
  supermajority: "supermajority";
762
765
  unanimous: "unanimous";
@@ -798,6 +801,9 @@ interface AgentVoteSummary {
798
801
  modelUsed?: string;
799
802
  /** Structured rejection categories for reject→refine→re-vote loops (Issue #1213). */
800
803
  rejectionCategories?: readonly string[];
804
+ /** Which declared option this voter chose (#4472). Absent when the proposal
805
+ * declared none, or the voter's selection matched none of them. */
806
+ selectedOption?: string;
801
807
  }
802
808
  /**
803
809
  * Canonical set of decision statuses a vote response can carry. Single source
@@ -863,6 +869,27 @@ interface ConsensusVoteResponse {
863
869
  * adapter reported no usage are counted as unmeasured, not a measured $0).
864
870
  */
865
871
  costSummary?: DecisionCostSummary;
872
+ /**
873
+ * #4472: declared-option outcome, present only when the proposal declared
874
+ * `options`. Separate from `approvalPercentage` — that stays the
875
+ * approve/reject figure — so a caller can tell WHICH bar failed.
876
+ *
877
+ * `unattributedApprovals` is load-bearing, not decoration: a share alone
878
+ * cannot distinguish dissent from absence, since `4 pick X + 3 unparseable`
879
+ * reads 57% exactly like a real 4/3 split.
880
+ */
881
+ optionOutcome?: {
882
+ tally: ReadonlyArray<{
883
+ option: string;
884
+ count: number;
885
+ }>;
886
+ leadingOption?: string;
887
+ leadingShare: number;
888
+ approverCount: number;
889
+ selectedCount: number;
890
+ unattributedApprovals: number;
891
+ thresholdMet: boolean;
892
+ };
866
893
  /**
867
894
  * #3991: whether the authentic vote record (#3897) was persisted at vote time.
868
895
  * Post-#3991 the runtime ledger routes through `nexusDataPath` under
@@ -11,8 +11,8 @@ import {
11
11
  loadSelfEvalSignals,
12
12
  registerImprovementReviewTool,
13
13
  runImprovementReview
14
- } from "./chunk-3T3TZZKG.js";
15
- import "./chunk-UNDYHLRR.js";
14
+ } from "./chunk-JEV6RUUH.js";
15
+ import "./chunk-2KVTXC7Y.js";
16
16
  import "./chunk-63EFLUVS.js";
17
17
  import "./chunk-26NSVQ65.js";
18
18
  import "./chunk-2HUC6NZN.js";
@@ -32,4 +32,4 @@ export {
32
32
  registerImprovementReviewTool,
33
33
  runImprovementReview
34
34
  };
35
- //# sourceMappingURL=improvement-review-B7DR4Y3C.js.map
35
+ //# sourceMappingURL=improvement-review-YYHQ2D5L.js.map
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, V as Vote, a as VoteDecision$1, b as VoterRole, D as DecisionCostSummary, c as ConsensusAlgorithm, d as VoteCounts, W as WeightedVoteCounts, A as AgentPerformance, e as ProposalState, f as ProposalId, g as ConsensusEngineConfig, h as ConsensusResult, i as ProposalStatus, j as Proposal, k as ConsensusMetrics, l as VoterExpansionCallback, m as AgentVoteResult, n as VotingStrategy, E as ErrorPolicy } from './consensus-vote-types-C7kiyyqD.js';
3
- export { o as AgentPerformanceSchema, p as AgentVoteSummary, q as ConsensusAlgorithmSchema, r as ConsensusEngineConfigSchema, s as ConsensusMetricsSchema, t as ConsensusResultSchema, u as ConsensusVoteInput, v as ConsensusVoteInputSchema, w as ConsensusVoteResponse, x as DEFAULT_CONSENSUS_CONFIG, y as ProposalSchema, z as ProposalStatusSchema, R as REJECTION_CATEGORIES, B as RejectionCategory, F as RejectionCategorySchema, G as VOTING_THRESHOLDS, H as VoteDecisionStatus, J as VoteSchema } from './consensus-vote-types-C7kiyyqD.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, V as Vote, a as VoteDecision$1, b as VoterRole, D as DecisionCostSummary, c as ConsensusAlgorithm, d as VoteCounts, W as WeightedVoteCounts, A as AgentPerformance, e as ProposalState, f as ProposalId, g as ConsensusEngineConfig, h as ConsensusResult, i as ProposalStatus, j as Proposal, k as ConsensusMetrics, l as VoterExpansionCallback, m as AgentVoteResult, n as VotingStrategy, E as ErrorPolicy } from './consensus-vote-types-jDyddCzg.js';
3
+ export { o as AgentPerformanceSchema, p as AgentVoteSummary, q as ConsensusAlgorithmSchema, r as ConsensusEngineConfigSchema, s as ConsensusMetricsSchema, t as ConsensusResultSchema, u as ConsensusVoteInput, v as ConsensusVoteInputSchema, w as ConsensusVoteResponse, x as DEFAULT_CONSENSUS_CONFIG, y as ProposalSchema, z as ProposalStatusSchema, R as REJECTION_CATEGORIES, B as RejectionCategory, F as RejectionCategorySchema, G as VOTING_THRESHOLDS, H as VoteDecisionStatus, J as VoteSchema } from './consensus-vote-types-jDyddCzg.js';
4
4
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
5
  import { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
6
6
 
@@ -32370,6 +32370,8 @@ interface CollectRealVotesOptions extends VoterAgentOptions {
32370
32370
  * ⇒ the CLI round-robin path is used (unchanged).
32371
32371
  */
32372
32372
  readonly gatewayAdapters?: readonly IModelAdapter[] | undefined;
32373
+ /** Named alternatives for a multi-option proposal (#4472); each voter picks one. */
32374
+ readonly declaredOptions?: readonly string[] | undefined;
32373
32375
  }
32374
32376
  /**
32375
32377
  * Error thrown when no adapter is available and simulation is disabled.
package/dist/index.js CHANGED
@@ -541,7 +541,7 @@ import {
541
541
  withLogging,
542
542
  withRetry,
543
543
  withRetryWrapper
544
- } from "./chunk-VSFWQHRX.js";
544
+ } from "./chunk-CFK4VK2M.js";
545
545
  import {
546
546
  FALLBACK_SCANNER_DATA,
547
547
  buildPlanFromAnalysis,
@@ -575,7 +575,7 @@ import {
575
575
  getKnownNexusVarNames,
576
576
  startStdioServer,
577
577
  validateNexusEnv
578
- } from "./chunk-LVFYELQU.js";
578
+ } from "./chunk-FHTU4BSP.js";
579
579
  import {
580
580
  OPENAI_MODELS,
581
581
  OPENAI_MODEL_ALIASES,
@@ -633,7 +633,7 @@ import {
633
633
  generateProposalId,
634
634
  parseAgentPairKey,
635
635
  registerConsensusVoteTool
636
- } from "./chunk-RAYKASM4.js";
636
+ } from "./chunk-XL6T3HTN.js";
637
637
  import "./chunk-YWGMDZR4.js";
638
638
  import "./chunk-MRSTTALY.js";
639
639
  import {
@@ -681,7 +681,7 @@ import {
681
681
  import {
682
682
  ImprovementReviewInputSchema,
683
683
  registerImprovementReviewTool
684
- } from "./chunk-3T3TZZKG.js";
684
+ } from "./chunk-JEV6RUUH.js";
685
685
  import {
686
686
  AgentPerformanceSchema,
687
687
  ConsensusAlgorithmSchema,
@@ -717,7 +717,7 @@ import {
717
717
  toolSuccess,
718
718
  toolSuccessStructured,
719
719
  validateToolInput
720
- } from "./chunk-UNDYHLRR.js";
720
+ } from "./chunk-2KVTXC7Y.js";
721
721
  import {
722
722
  AuditTrail,
723
723
  MAX_STRIPPED_ELEMENTS_PER_EVENT,
@@ -4711,7 +4711,7 @@ function buildVotingInput(plan, config) {
4711
4711
  }
4712
4712
  async function executeSingleVote(plan, config, log) {
4713
4713
  try {
4714
- const { executeVoting } = await import("./consensus-vote-UF73LBG6.js");
4714
+ const { executeVoting } = await import("./consensus-vote-EIEPPKAD.js");
4715
4715
  const input = buildVotingInput(plan, config);
4716
4716
  const result = await executeVoting(input, log);
4717
4717
  return parseVotingResult(result);
@@ -8,9 +8,9 @@ import {
8
8
  runWizard,
9
9
  setupCommand,
10
10
  setupCommandAsync
11
- } from "./chunk-RA5L4BVA.js";
11
+ } from "./chunk-QAEBYGSP.js";
12
12
  import "./chunk-E6YS4KOL.js";
13
- import "./chunk-LVFYELQU.js";
13
+ import "./chunk-FHTU4BSP.js";
14
14
  import "./chunk-CYXQRAJ2.js";
15
15
  import "./chunk-YWGMDZR4.js";
16
16
  import "./chunk-NUBSJGQZ.js";
@@ -40,4 +40,4 @@ export {
40
40
  setupCommand,
41
41
  setupCommandAsync
42
42
  };
43
- //# sourceMappingURL=setup-command-COUBH2NS.js.map
43
+ //# sourceMappingURL=setup-command-CYZO22RO.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexus-agents",
3
- "version": "3.3.2",
3
+ "version": "3.4.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",