nexus-agents 2.151.0 → 2.152.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.
@@ -18,7 +18,7 @@ import {
18
18
  DEFAULT_TASK_TTL_MS,
19
19
  DEFAULT_TOOL_RATE_LIMITS,
20
20
  clampTaskTtl
21
- } from "./chunk-O6PPXOH6.js";
21
+ } from "./chunk-GKZ3GPB3.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 });
@@ -44392,13 +44404,16 @@ var PR_REVIEW_ROLES = [
44392
44404
  "scope_steward"
44393
44405
  ];
44394
44406
  var MAX_DIFF_LENGTH = 5e4;
44407
+ var MAX_REPO_CONTEXT_LENGTH = 2e3;
44395
44408
  var MAX_DESCRIPTION_LENGTH = 1e4;
44396
44409
  var PR_REVIEW_ASYNC_HINT = "A pr_review run fans out to 5 live LLM voters and can exceed the synchronous MCP request timeout. Retry with `dispatch: 'async'` to get a jobId immediately, then poll get_job_result({ jobId }) for the result.";
44397
44410
  var PrReviewInputSchema = z91.object({
44398
44411
  prTitle: z91.string().min(1).max(500).describe("PR title"),
44399
44412
  prDescription: z91.string().max(MAX_DESCRIPTION_LENGTH).optional().describe("PR body / description"),
44400
44413
  prDiff: z91.string().min(1).max(MAX_DIFF_LENGTH).describe(`Unified diff text (max ${String(MAX_DIFF_LENGTH)} chars; truncate before calling)`),
44401
- repoContext: z91.string().max(2e3).optional().describe("Optional one-paragraph repo context (architecture, conventions)"),
44414
+ repoContext: z91.string().max(MAX_REPO_CONTEXT_LENGTH).optional().describe(
44415
+ `Optional one-paragraph repo context (architecture, conventions; max ${String(MAX_REPO_CONTEXT_LENGTH)} chars; trim before calling)`
44416
+ ),
44402
44417
  baseRef: z91.string().max(200).optional().describe("Base branch ref (e.g. main)"),
44403
44418
  headRef: z91.string().max(200).optional().describe("Head branch ref"),
44404
44419
  /**
@@ -51273,4 +51288,4 @@ export {
51273
51288
  shutdownFeedbackSubscriber,
51274
51289
  createEventBusBridge
51275
51290
  };
51276
- //# sourceMappingURL=chunk-KRCL3VT6.js.map
51291
+ //# sourceMappingURL=chunk-4RJB246Z.js.map