nexus-agents 2.151.1 → 2.152.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.
@@ -42,7 +42,7 @@ import {
42
42
  } from "./chunk-DHVMSIT5.js";
43
43
 
44
44
  // src/version.ts
45
- var VERSION = true ? "2.151.1" : "dev";
45
+ var VERSION = true ? "2.152.1" : "dev";
46
46
 
47
47
  // src/config/schemas-core.ts
48
48
  import { z } from "zod";
@@ -2132,7 +2132,7 @@ async function runDoctorFix(result) {
2132
2132
  writeLine2("\u2500".repeat(40));
2133
2133
  let fixCount = 0;
2134
2134
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
2135
- const { runSetup } = await import("./setup-command-IQ7WFZIM.js");
2135
+ const { runSetup } = await import("./setup-command-FMQRL3YR.js");
2136
2136
  const setupResult = runSetup({
2137
2137
  skipMcp: true,
2138
2138
  skipRules: true,
@@ -2245,4 +2245,4 @@ export {
2245
2245
  startStdioServer,
2246
2246
  closeServer
2247
2247
  };
2248
- //# sourceMappingURL=chunk-SJFARLAQ.js.map
2248
+ //# sourceMappingURL=chunk-FQEYEH7X.js.map
@@ -18,7 +18,7 @@ import {
18
18
  DEFAULT_TASK_TTL_MS,
19
19
  DEFAULT_TOOL_RATE_LIMITS,
20
20
  clampTaskTtl
21
- } from "./chunk-SJFARLAQ.js";
21
+ } from "./chunk-FQEYEH7X.js";
22
22
  import {
23
23
  executeExpert
24
24
  } from "./chunk-JYHSZDKL.js";
@@ -41,7 +41,7 @@ import {
41
41
  toJobSummary,
42
42
  warnIfSimulatedOutsideTests,
43
43
  writeJobCancelled
44
- } from "./chunk-UIL37D2V.js";
44
+ } from "./chunk-447YUGJD.js";
45
45
  import {
46
46
  normalizeTopicToCanonical,
47
47
  synthesizeResearch
@@ -43148,6 +43148,26 @@ function buildVoteProposal(plan, research) {
43148
43148
  const researchPart = trimmed.slice(0, VOTE_RESEARCH_BUDGET);
43149
43149
  return `${planPart}${RESEARCH_HEADER}${researchPart}`.slice(0, VOTE_PROPOSAL_MAX);
43150
43150
  }
43151
+ function classifyVoteStageResult(votingResult) {
43152
+ const { approve, reject } = votingResult.result.voteCounts;
43153
+ const pct = approve / Math.max(1, approve + reject) * 100;
43154
+ const decision = votingResult.decision ?? (votingResult.result.outcome === "approved" ? "approved" : "rejected");
43155
+ if (decision === "no_quorum") {
43156
+ return {
43157
+ vote: {
43158
+ kind: "no_quorum",
43159
+ reason: "consensus vote could not reach quorum (a voice was missing)",
43160
+ approvalPercentage: pct
43161
+ },
43162
+ label: "No quorum \u2014 re-run needed"
43163
+ };
43164
+ }
43165
+ if (decision !== "approved") {
43166
+ const feedback = votingResult.votes.filter((v) => v.vote.decision !== "approve").map((v) => v.vote.reasoning).join("\n");
43167
+ return { vote: { kind: "rejected", feedback, approvalPercentage: pct }, label: "Rejected" };
43168
+ }
43169
+ return { vote: { kind: "approved", approvalPercentage: pct }, label: "Approved" };
43170
+ }
43151
43171
  function emitStageEvent2(stage, status, details) {
43152
43172
  emitPipelineStageEvent("dev-pipeline", stage, status, details);
43153
43173
  }
@@ -43446,7 +43466,7 @@ ${contextBlock}`;
43446
43466
  const strategy = config.votingStrategy ?? "higher_order";
43447
43467
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
43448
43468
  try {
43449
- const { executeVoting } = await import("./consensus-vote-72AX6HNF.js");
43469
+ const { executeVoting } = await import("./consensus-vote-VPHFIIMN.js");
43450
43470
  const votingResult = await executeVoting(
43451
43471
  {
43452
43472
  proposal: buildVoteProposal(plan, research),
@@ -43456,30 +43476,22 @@ ${contextBlock}`;
43456
43476
  },
43457
43477
  logger45
43458
43478
  );
43459
- const approved = votingResult.result.outcome === "approved";
43460
- const pct = votingResult.result.voteCounts.approve / Math.max(
43461
- 1,
43462
- votingResult.result.voteCounts.approve + votingResult.result.voteCounts.reject
43463
- ) * 100;
43464
- const feedback = votingResult.votes.filter((v) => v.vote.decision !== "approve").map((v) => v.vote.reasoning).join("\n");
43479
+ const { vote, label } = classifyVoteStageResult(votingResult);
43465
43480
  const ms = getTimeProvider().now() - start;
43466
43481
  emitStageEvent2("vote", "completed", { durationMs: ms });
43467
43482
  recordOutcome({
43468
43483
  taskId: "vote",
43469
43484
  category: "planning",
43470
43485
  cli: void 0,
43471
- success: approved,
43486
+ success: vote.kind === "approved",
43472
43487
  durationMs: ms
43473
43488
  });
43474
43489
  await postProgress(
43475
43490
  config,
43476
43491
  "Vote",
43477
- `${approved ? "Approved" : "Rejected"} (${Math.round(pct)}%, ${ms}ms)`
43492
+ `${label} (${Math.round(vote.approvalPercentage)}%, ${ms}ms)`
43478
43493
  );
43479
- if (!approved) {
43480
- return { kind: "rejected", feedback, approvalPercentage: pct };
43481
- }
43482
- return { kind: "approved", approvalPercentage: pct };
43494
+ return vote;
43483
43495
  } catch (error) {
43484
43496
  const msg = error instanceof Error ? error.message : String(error);
43485
43497
  emitStageEvent2("vote", "failed", { error: msg });
@@ -43490,8 +43502,16 @@ ${contextBlock}`;
43490
43502
  success: false,
43491
43503
  durationMs: getTimeProvider().now() - start
43492
43504
  });
43493
- await postProgress(config, "Vote", `Error (auto-approved): ${msg.slice(0, 200)}`);
43494
- return { kind: "approved", approvalPercentage: 0 };
43505
+ await postProgress(
43506
+ config,
43507
+ "Vote",
43508
+ `Error (failing closed \u2014 no quorum): ${msg.slice(0, 200)}`
43509
+ );
43510
+ return {
43511
+ kind: "no_quorum",
43512
+ reason: `vote stage errored \u2014 failing closed: ${msg.slice(0, 160)}`,
43513
+ approvalPercentage: 0
43514
+ };
43495
43515
  }
43496
43516
  },
43497
43517
  decompose: async (plan) => {
@@ -51276,4 +51296,4 @@ export {
51276
51296
  shutdownFeedbackSubscriber,
51277
51297
  createEventBusBridge
51278
51298
  };
51279
- //# sourceMappingURL=chunk-IR7FP4SS.js.map
51299
+ //# sourceMappingURL=chunk-KZUJBQYH.js.map