nexus-agents 2.63.1 → 2.63.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.
@@ -8082,7 +8082,9 @@ var ConsensusVoteInputSchema = z8.object({
8082
8082
  "Voting strategy: simple_majority (default), supermajority, unanimous, proof_of_learning, or higher_order (Bayesian-optimal)"
8083
8083
  ),
8084
8084
  quickMode: z8.boolean().optional().default(false).describe("Use 3 agents instead of 5 for faster execution"),
8085
- simulateVotes: z8.boolean().optional().default(false).describe("Use simulated votes instead of LLM execution")
8085
+ simulateVotes: z8.boolean().optional().default(false).describe(
8086
+ "TESTS ONLY \u2014 when true, voters return random decisions. Output must not be used for real decisions. (#2319)"
8087
+ )
8086
8088
  });
8087
8089
  function toAgentVoteSummary(result) {
8088
8090
  const roleName = VOTER_ROLES[result.role].split(" - ")[0] ?? result.role;
@@ -12638,6 +12640,11 @@ function emitTrendDetected(bus, detail) {
12638
12640
  // src/mcp/tools/consensus-vote-recording.ts
12639
12641
  var logger10 = createLogger({ tool: "consensus-vote" });
12640
12642
  function recordVoteSuccess(proposal, strategy, outcome, duration, votes) {
12643
+ const allSimulated = votes !== void 0 && votes.length > 0 && votes.every((v) => v.source === "simulation");
12644
+ if (allSimulated) {
12645
+ logger10.debug("Skipping memory + outcome recording \u2014 all votes simulated");
12646
+ return;
12647
+ }
12641
12648
  try {
12642
12649
  const memory = getToolMemory();
12643
12650
  memory.recordTask({
@@ -12701,6 +12708,20 @@ function recordVoteOutcomes(votes) {
12701
12708
  }
12702
12709
  }
12703
12710
 
12711
+ // src/mcp/tools/simulation-guard.ts
12712
+ var WARNED = /* @__PURE__ */ new Set();
12713
+ function isTestRunner() {
12714
+ return process.env.VITEST === "true" || process.env.NODE_ENV === "test";
12715
+ }
12716
+ function warnIfSimulatedOutsideTests(toolName, logger11) {
12717
+ if (isTestRunner()) return;
12718
+ if (WARNED.has(toolName)) return;
12719
+ WARNED.add(toolName);
12720
+ logger11.warn(
12721
+ `[${toolName}] simulateVotes=true: output is RANDOM and reserved for tests/demos. Do not treat the result as a real decision.`
12722
+ );
12723
+ }
12724
+
12704
12725
  // src/mcp/tools/consensus-vote.ts
12705
12726
  var persistentCorrelationTracker;
12706
12727
  function getOrCreateCorrelationTracker() {
@@ -12933,6 +12954,7 @@ async function executeVoting(input, logger11) {
12933
12954
  }
12934
12955
  async function handleConsensusVote(deps, args) {
12935
12956
  const logger11 = deps.logger ?? createLogger({ tool: "consensus_vote" });
12957
+ if (args.simulateVotes) warnIfSimulatedOutsideTests("consensus_vote", logger11);
12936
12958
  try {
12937
12959
  const result = await executeVoting(args, logger11);
12938
12960
  const strategy = args.strategy ?? "simple_majority";
@@ -13065,7 +13087,7 @@ function registerConsensusVoteTool(server, deps) {
13065
13087
  "Voting strategy: simple_majority (default), supermajority, unanimous, proof_of_learning, or higher_order"
13066
13088
  ),
13067
13089
  quickMode: z19.boolean().optional().default(false).describe("Use 3 agents instead of 7"),
13068
- simulateVotes: z19.boolean().optional().default(false).describe("Use simulated votes")
13090
+ simulateVotes: z19.boolean().optional().default(false).describe("TESTS ONLY \u2014 random output, must not be used for real decisions (#2319)")
13069
13091
  };
13070
13092
  const description = "Execute multi-model consensus voting on a proposal. Uses 7 specialized agent roles (architect, security, devex, ai_ml, pm, catfish, scope_steward) to vote on proposals with configurable strategies. Supports higher_order strategy for Bayesian-optimal aggregation with correlation awareness (Issue #514).";
13071
13093
  const secureHandler = createSecureHandler(createConsensusVoteHandler(depsWithNotifier), {
@@ -13224,9 +13246,10 @@ export {
13224
13246
  createCorrelationTracker,
13225
13247
  VotingStrategySchema,
13226
13248
  ConsensusVoteInputSchema,
13249
+ warnIfSimulatedOutsideTests,
13227
13250
  resetCorrelationTracker,
13228
13251
  executeVoting,
13229
13252
  CONSENSUS_VOTE_OUTPUT_SCHEMA,
13230
13253
  registerConsensusVoteTool
13231
13254
  };
13232
- //# sourceMappingURL=chunk-RIMON2SA.js.map
13255
+ //# sourceMappingURL=chunk-PEDEZRPR.js.map