nexus-agents 3.3.3 → 3.4.1

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-RAYKASM4.js → chunk-6BS3LEK2.js} +266 -32
  4. package/dist/chunk-6BS3LEK2.js.map +1 -0
  5. package/dist/{chunk-VIOLJ4QZ.js → chunk-7AMEWQNT.js} +6 -6
  6. package/dist/{chunk-3T3TZZKG.js → chunk-JEV6RUUH.js} +2 -2
  7. package/dist/{chunk-AWY6BHRP.js → chunk-JRRSJRQF.js} +3 -3
  8. package/dist/{chunk-OY2ABL2Z.js → chunk-LTFBVNXT.js} +2 -2
  9. package/dist/cli.d.ts +1 -1
  10. package/dist/cli.js +7 -7
  11. package/dist/{consensus-vote-UF73LBG6.js → consensus-vote-74ZUX4ZX.js} +5 -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-34NGKBOG.js → setup-command-7LYXD4ZV.js} +3 -3
  17. package/package.json +1 -1
  18. package/dist/chunk-RAYKASM4.js.map +0 -1
  19. /package/dist/{chunk-VIOLJ4QZ.js.map → chunk-7AMEWQNT.js.map} +0 -0
  20. /package/dist/{chunk-3T3TZZKG.js.map → chunk-JEV6RUUH.js.map} +0 -0
  21. /package/dist/{chunk-AWY6BHRP.js.map → chunk-JRRSJRQF.js.map} +0 -0
  22. /package/dist/{chunk-OY2ABL2Z.js.map → chunk-LTFBVNXT.js.map} +0 -0
  23. /package/dist/{consensus-vote-UF73LBG6.js.map → consensus-vote-74ZUX4ZX.js.map} +0 -0
  24. /package/dist/{improvement-review-B7DR4Y3C.js.map → improvement-review-YYHQ2D5L.js.map} +0 -0
  25. /package/dist/{setup-command-34NGKBOG.js.map → setup-command-7LYXD4ZV.js.map} +0 -0
@@ -21,7 +21,7 @@ import {
21
21
  DEFAULT_TASK_TTL_MS,
22
22
  DEFAULT_TOOL_RATE_LIMITS,
23
23
  clampTaskTtl
24
- } from "./chunk-AWY6BHRP.js";
24
+ } from "./chunk-JRRSJRQF.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-H3B6BSBZ.js";
@@ -45,7 +45,7 @@ import {
45
45
  simulationDeniedResult,
46
46
  toJobSummary,
47
47
  writeJobCancelled
48
- } from "./chunk-RAYKASM4.js";
48
+ } from "./chunk-6BS3LEK2.js";
49
49
  import {
50
50
  normalizeTopicToCanonical,
51
51
  synthesizeResearch
@@ -59,7 +59,7 @@ import {
59
59
  } from "./chunk-G2C4WNK7.js";
60
60
  import {
61
61
  withPrerequisite
62
- } from "./chunk-3T3TZZKG.js";
62
+ } from "./chunk-JEV6RUUH.js";
63
63
  import {
64
64
  NOOP_NOTIFIER,
65
65
  RateLimiter,
@@ -82,7 +82,7 @@ import {
82
82
  withAuditTrail,
83
83
  withProgressHeartbeat,
84
84
  wrapToolWithTimeout
85
- } from "./chunk-UNDYHLRR.js";
85
+ } from "./chunk-2KVTXC7Y.js";
86
86
  import {
87
87
  createAuditTrail,
88
88
  createGraphAuditBridge,
@@ -45787,7 +45787,7 @@ ${contextBlock}`;
45787
45787
  const strategy = config.votingStrategy ?? "higher_order";
45788
45788
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
45789
45789
  try {
45790
- const { executeVoting } = await import("./consensus-vote-UF73LBG6.js");
45790
+ const { executeVoting } = await import("./consensus-vote-74ZUX4ZX.js");
45791
45791
  const votingResult = await executeVoting(
45792
45792
  {
45793
45793
  proposal: buildVoteProposal(plan, research),
@@ -54166,4 +54166,4 @@ export {
54166
54166
  shutdownFeedbackSubscriber,
54167
54167
  createEventBusBridge
54168
54168
  };
54169
- //# sourceMappingURL=chunk-VIOLJ4QZ.js.map
54169
+ //# sourceMappingURL=chunk-7AMEWQNT.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-UNDYHLRR.js";
10
+ } from "./chunk-2KVTXC7Y.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -2132,4 +2132,4 @@ export {
2132
2132
  runImprovementReview,
2133
2133
  registerImprovementReviewTool
2134
2134
  };
2135
- //# sourceMappingURL=chunk-3T3TZZKG.js.map
2135
+ //# sourceMappingURL=chunk-JEV6RUUH.js.map
@@ -49,7 +49,7 @@ import {
49
49
  } from "./chunk-OQLFRJCW.js";
50
50
 
51
51
  // src/version.ts
52
- var VERSION = true ? "3.3.3" : "dev";
52
+ var VERSION = true ? "3.4.1" : "dev";
53
53
 
54
54
  // src/config/schemas-core.ts
55
55
  import { z } from "zod";
@@ -2253,7 +2253,7 @@ async function runDoctorFix(result) {
2253
2253
  writeLine2("\u2500".repeat(40));
2254
2254
  let fixCount = 0;
2255
2255
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
2256
- const { runSetup } = await import("./setup-command-34NGKBOG.js");
2256
+ const { runSetup } = await import("./setup-command-7LYXD4ZV.js");
2257
2257
  const setupResult = runSetup({
2258
2258
  skipMcp: true,
2259
2259
  skipRules: true,
@@ -2366,4 +2366,4 @@ export {
2366
2366
  startStdioServer,
2367
2367
  closeServer
2368
2368
  };
2369
- //# sourceMappingURL=chunk-AWY6BHRP.js.map
2369
+ //# sourceMappingURL=chunk-JRRSJRQF.js.map
@@ -8,7 +8,7 @@ import {
8
8
  checkSqlite,
9
9
  defaultConfig,
10
10
  initDataDirectories
11
- } from "./chunk-AWY6BHRP.js";
11
+ } from "./chunk-JRRSJRQF.js";
12
12
  import {
13
13
  BUILT_IN_EXPERTS
14
14
  } from "./chunk-YPNQPT2F.js";
@@ -2001,4 +2001,4 @@ export {
2001
2001
  setupCommand,
2002
2002
  setupCommandAsync
2003
2003
  };
2004
- //# sourceMappingURL=chunk-OY2ABL2Z.js.map
2004
+ //# sourceMappingURL=chunk-LTFBVNXT.js.map
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-OY2ABL2Z.js";
21
+ } from "./chunk-LTFBVNXT.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-VIOLJ4QZ.js";
142
+ } from "./chunk-7AMEWQNT.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-AWY6BHRP.js";
169
+ } from "./chunk-JRRSJRQF.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-6BS3LEK2.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", {
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  CONSENSUS_VOTE_OUTPUT_SCHEMA,
3
+ CONSENSUS_VOTE_TOOL_SCHEMA,
3
4
  ConsensusVoteInputSchema,
4
5
  VotingStrategySchema,
5
6
  createPolicyFailedResult,
@@ -9,9 +10,9 @@ import {
9
10
  resetCorrelationTracker,
10
11
  runConsensusForGoal,
11
12
  unwrapVoteOrThrow
12
- } from "./chunk-RAYKASM4.js";
13
+ } from "./chunk-6BS3LEK2.js";
13
14
  import "./chunk-YWGMDZR4.js";
14
- import "./chunk-UNDYHLRR.js";
15
+ import "./chunk-2KVTXC7Y.js";
15
16
  import "./chunk-63EFLUVS.js";
16
17
  import "./chunk-7L7CUYAY.js";
17
18
  import "./chunk-7HDPHBKE.js";
@@ -34,6 +35,7 @@ import "./chunk-OQLFRJCW.js";
34
35
  import "./chunk-ZPWHCABL.js";
35
36
  export {
36
37
  CONSENSUS_VOTE_OUTPUT_SCHEMA,
38
+ CONSENSUS_VOTE_TOOL_SCHEMA,
37
39
  ConsensusVoteInputSchema,
38
40
  VotingStrategySchema,
39
41
  createPolicyFailedResult,
@@ -44,4 +46,4 @@ export {
44
46
  runConsensusForGoal,
45
47
  unwrapVoteOrThrow
46
48
  };
47
- //# sourceMappingURL=consensus-vote-UF73LBG6.js.map
49
+ //# sourceMappingURL=consensus-vote-74ZUX4ZX.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-VIOLJ4QZ.js";
544
+ } from "./chunk-7AMEWQNT.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-AWY6BHRP.js";
578
+ } from "./chunk-JRRSJRQF.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-6BS3LEK2.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-74ZUX4ZX.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-OY2ABL2Z.js";
11
+ } from "./chunk-LTFBVNXT.js";
12
12
  import "./chunk-E6YS4KOL.js";
13
- import "./chunk-AWY6BHRP.js";
13
+ import "./chunk-JRRSJRQF.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-34NGKBOG.js.map
43
+ //# sourceMappingURL=setup-command-7LYXD4ZV.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexus-agents",
3
- "version": "3.3.3",
3
+ "version": "3.4.1",
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",