nexus-agents 8.40.0 → 8.40.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.
@@ -8,7 +8,7 @@ import {
8
8
  NODE_ENGINE_RANGE,
9
9
  VERSION,
10
10
  isNodeVersionSupported
11
- } from "./chunk-GHTO4L6T.js";
11
+ } from "./chunk-N2L2OOIR.js";
12
12
  import {
13
13
  capitalize
14
14
  } from "./chunk-7LP6VJRP.js";
@@ -1228,7 +1228,7 @@ async function runDoctorFix(result) {
1228
1228
  writeLine2("\u2500".repeat(40));
1229
1229
  let fixCount = 0;
1230
1230
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
1231
- const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-FCP5WDWE.js");
1231
+ const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-HYI2V7X2.js");
1232
1232
  const outcome = describeDataDirFix2(initDataDirectories2());
1233
1233
  writeLine2(outcome.line);
1234
1234
  if (outcome.counted) fixCount++;
@@ -1330,4 +1330,4 @@ export {
1330
1330
  startStdioServer,
1331
1331
  closeServer
1332
1332
  };
1333
- //# sourceMappingURL=chunk-XIZCIXMR.js.map
1333
+ //# sourceMappingURL=chunk-3HVXE7IZ.js.map
@@ -21,7 +21,7 @@ import {
21
21
  import {
22
22
  DEFAULT_TASK_TTL_MS,
23
23
  clampTaskTtl
24
- } from "./chunk-XIZCIXMR.js";
24
+ } from "./chunk-3HVXE7IZ.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-WBU27C3E.js";
@@ -55,7 +55,7 @@ import {
55
55
  toJobSummary,
56
56
  updateStage,
57
57
  writeJobCancelled
58
- } from "./chunk-2VGA2TRD.js";
58
+ } from "./chunk-VUKPI3WQ.js";
59
59
  import {
60
60
  allOf,
61
61
  anyOf
@@ -75,7 +75,7 @@ import {
75
75
  } from "./chunk-KRD3OF3M.js";
76
76
  import {
77
77
  withPrerequisite
78
- } from "./chunk-DKJBDPVX.js";
78
+ } from "./chunk-W42LJQCX.js";
79
79
  import {
80
80
  NOOP_NOTIFIER,
81
81
  RateLimiter,
@@ -100,7 +100,7 @@ import {
100
100
  withAuditTrail,
101
101
  withProgressHeartbeat,
102
102
  wrapToolWithTimeout
103
- } from "./chunk-N5FL5NGK.js";
103
+ } from "./chunk-R2RSCTDL.js";
104
104
  import {
105
105
  createAuditTrail,
106
106
  createGraphAuditBridge,
@@ -45899,7 +45899,7 @@ function buildVotingInput(plan, config) {
45899
45899
  }
45900
45900
  async function executeSingleVote(plan, config, log) {
45901
45901
  try {
45902
- const { executeVoting } = await import("./consensus-vote-SO3DZUIK.js");
45902
+ const { executeVoting } = await import("./consensus-vote-ZLSBT2OX.js");
45903
45903
  const input = buildVotingInput(plan, config);
45904
45904
  const result = await executeVoting(input, log);
45905
45905
  return parseVotingResult(result);
@@ -47691,7 +47691,7 @@ ${contextBlock}`;
47691
47691
  const strategy = config.votingStrategy ?? "higher_order";
47692
47692
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
47693
47693
  try {
47694
- const { executeVoting } = await import("./consensus-vote-SO3DZUIK.js");
47694
+ const { executeVoting } = await import("./consensus-vote-ZLSBT2OX.js");
47695
47695
  const votingResult = await executeVoting(
47696
47696
  {
47697
47697
  proposal: buildVoteProposal(plan, research),
@@ -56372,4 +56372,4 @@ export {
56372
56372
  startPipelineEventBridge,
56373
56373
  shutdownPipelineEventBridge
56374
56374
  };
56375
- //# sourceMappingURL=chunk-ZIUE2RNX.js.map
56375
+ //# sourceMappingURL=chunk-3KRAFSYC.js.map
@@ -1,6 +1,6 @@
1
1
  // src/version.ts
2
2
  import semver from "semver";
3
- var VERSION = true ? "8.40.0" : "dev";
3
+ var VERSION = true ? "8.40.1" : "dev";
4
4
  var NODE_ENGINE_RANGE = ">=22.5.0";
5
5
  function isNodeVersionSupported(version) {
6
6
  return semver.satisfies(version, NODE_ENGINE_RANGE);
@@ -11,4 +11,4 @@ export {
11
11
  NODE_ENGINE_RANGE,
12
12
  isNodeVersionSupported
13
13
  };
14
- //# sourceMappingURL=chunk-GHTO4L6T.js.map
14
+ //# sourceMappingURL=chunk-N2L2OOIR.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-GHTO4L6T.js";
3
+ } from "./chunk-N2L2OOIR.js";
4
4
  import {
5
5
  emitClawGuardViolation
6
6
  } from "./chunk-XIKVBZKG.js";
@@ -2306,4 +2306,4 @@ export {
2306
2306
  VOTING_THRESHOLDS,
2307
2307
  ConsensusMetricsSchema
2308
2308
  };
2309
- //# sourceMappingURL=chunk-N5FL5NGK.js.map
2309
+ //# sourceMappingURL=chunk-R2RSCTDL.js.map
@@ -23,10 +23,10 @@ import {
23
23
  toolSuccessStructured,
24
24
  withProgressHeartbeat,
25
25
  wrapToolWithTimeout
26
- } from "./chunk-N5FL5NGK.js";
26
+ } from "./chunk-R2RSCTDL.js";
27
27
  import {
28
28
  VERSION
29
- } from "./chunk-GHTO4L6T.js";
29
+ } from "./chunk-N2L2OOIR.js";
30
30
  import {
31
31
  assessPanelIndependence,
32
32
  countDistinctModels,
@@ -7830,4 +7830,4 @@ export {
7830
7830
  CONSENSUS_VOTE_TOOL_SCHEMA,
7831
7831
  registerConsensusVoteTool
7832
7832
  };
7833
- //# sourceMappingURL=chunk-2VGA2TRD.js.map
7833
+ //# sourceMappingURL=chunk-VUKPI3WQ.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-N5FL5NGK.js";
10
+ } from "./chunk-R2RSCTDL.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -2173,4 +2173,4 @@ export {
2173
2173
  runImprovementReview,
2174
2174
  registerImprovementReviewTool
2175
2175
  };
2176
- //# sourceMappingURL=chunk-DKJBDPVX.js.map
2176
+ //# sourceMappingURL=chunk-W42LJQCX.js.map
package/dist/cli.js CHANGED
@@ -157,7 +157,7 @@ import {
157
157
  validateNexusEnv,
158
158
  validateWorkflow,
159
159
  wrapInMarkdownFence
160
- } from "./chunk-ZIUE2RNX.js";
160
+ } from "./chunk-3KRAFSYC.js";
161
161
  import "./chunk-IVHR3QEK.js";
162
162
  import "./chunk-DGWT7DXX.js";
163
163
  import "./chunk-64GMIUM5.js";
@@ -177,7 +177,7 @@ import {
177
177
  doctorCommand,
178
178
  initDataDirectories,
179
179
  runDoctor
180
- } from "./chunk-XIZCIXMR.js";
180
+ } from "./chunk-3HVXE7IZ.js";
181
181
  import {
182
182
  buildOpenAICompatAdapters,
183
183
  readOpenAICompatEnv
@@ -196,7 +196,7 @@ import {
196
196
  recordAuthenticVote,
197
197
  registerConsensusVoteTool,
198
198
  toRecordDecision
199
- } from "./chunk-2VGA2TRD.js";
199
+ } from "./chunk-VUKPI3WQ.js";
200
200
  import {
201
201
  loadUsageEvents,
202
202
  rollupByModel
@@ -236,18 +236,18 @@ import {
236
236
  registerImprovementReviewTool,
237
237
  runImprovementReview,
238
238
  scanForSecrets
239
- } from "./chunk-DKJBDPVX.js";
239
+ } from "./chunk-W42LJQCX.js";
240
240
  import {
241
241
  createDefaultPolicyFirewall,
242
242
  setGlobalPolicyFirewall,
243
243
  setSecureHandlerAuditLogger,
244
244
  stagePolicyFirewallForRollout
245
- } from "./chunk-N5FL5NGK.js";
245
+ } from "./chunk-R2RSCTDL.js";
246
246
  import {
247
247
  NODE_ENGINE_RANGE,
248
248
  VERSION,
249
249
  isNodeVersionSupported
250
- } from "./chunk-GHTO4L6T.js";
250
+ } from "./chunk-N2L2OOIR.js";
251
251
  import "./chunk-XIKVBZKG.js";
252
252
  import {
253
253
  createUnifiedRegistry,
@@ -7441,8 +7441,8 @@ function formatVoteRow(v, opts) {
7441
7441
  return ` ${icon}${colors.reset} ${label}: ${v.vote.decision.toUpperCase()} (${formatPercentage(v.vote.confidence)})${tag}${grounds}`;
7442
7442
  }
7443
7443
  function printSummary2(ctx) {
7444
- const { result, votes, threshold } = ctx;
7445
- const { voteCounts, approvalPercentage, outcome, quorumReached } = result;
7444
+ const { result, votes, threshold, decision } = ctx;
7445
+ const { voteCounts, approvalPercentage, quorumReached } = result;
7446
7446
  const errored = votes.filter((v) => v.source === "error").length;
7447
7447
  const simulated = votes.filter((v) => v.source === "simulation").length;
7448
7448
  writeLine(`${colors.cyan}Summary${colors.reset}
@@ -7453,9 +7453,10 @@ function printSummary2(ctx) {
7453
7453
  if (errored > 0) writeLine(` ${colors.red}Errored: ${String(errored)}${colors.reset}`);
7454
7454
  writeLine(` Approval: ${approvalPercentage.toFixed(1)}%`);
7455
7455
  writeLine(` Threshold: ${threshold}`);
7456
- const outcomeColor = outcome === "approved" ? colors.green : outcome === "rejected" ? colors.red : colors.yellow;
7456
+ const decisionColor = decision === "approved" ? colors.green : decision === "no_quorum" ? colors.yellow : colors.red;
7457
+ const { text: decisionText } = decisionResultLabel(decision);
7457
7458
  const cause = explainOutcome({
7458
- outcome,
7459
+ decision,
7459
7460
  quorumReached,
7460
7461
  errored,
7461
7462
  votes,
@@ -7463,11 +7464,9 @@ function printSummary2(ctx) {
7463
7464
  threshold,
7464
7465
  ...ctx.optionGate === void 0 ? {} : { optionGate: ctx.optionGate }
7465
7466
  });
7466
- writeLine(
7467
- `
7468
- ${colors.bold}Result: ${outcomeColor}${outcome.toUpperCase()}${colors.reset}${cause}
7469
- `
7470
- );
7467
+ writeLine(`
7468
+ ${colors.bold}Result: ${decisionColor}${decisionText}${colors.reset}${cause}
7469
+ `);
7471
7470
  if (simulated > 0) {
7472
7471
  writeLine(
7473
7472
  `${colors.red}\u26A0 ${String(simulated)} of ${String(votes.length)} vote(s) were SIMULATED \u2014 do not rely on this result for decisions.${colors.reset}
@@ -7476,7 +7475,10 @@ ${colors.bold}Result: ${outcomeColor}${outcome.toUpperCase()}${colors.reset}${ca
7476
7475
  }
7477
7476
  }
7478
7477
  function explainOutcome(ctx) {
7479
- if (ctx.outcome !== "rejected") return "";
7478
+ if (ctx.decision === "no_quorum") {
7479
+ return ctx.errored > 0 ? ` ${colors.dim}\u2014 quorum void (${String(ctx.errored)} of ${String(ctx.votes.length)} voter(s) failed); re-run to recover${colors.reset}` : ` ${colors.dim}\u2014 quorum void: the absolute approval floor was not met by the full panel${colors.reset}`;
7480
+ }
7481
+ if (ctx.decision !== "rejected") return "";
7480
7482
  if (!ctx.quorumReached && ctx.errored > 0) {
7481
7483
  const total = ctx.votes.length;
7482
7484
  const survived = total - ctx.errored;
@@ -7529,14 +7531,15 @@ function formatVoteComment(result, decision) {
7529
7531
  });
7530
7532
  const effectiveDecision = decision ?? mapOutcomeToDecision(result.result.outcome);
7531
7533
  const { emoji: outcomeEmoji, text: outcomeText } = decisionResultLabel(effectiveDecision);
7532
- const voteRows = result.votes.map(({ role, vote }) => {
7534
+ const voteRows = result.votes.map(({ role, vote, source }) => {
7533
7535
  const roleLabel = VOTER_ROLES[role].split(" - ")[0] ?? role;
7534
- const decision2 = vote.decision.toUpperCase();
7535
- const confidence = formatPercentage(vote.confidence);
7536
+ const decision2 = source === "error" ? "ERRORED" : vote.decision.toUpperCase();
7537
+ const confidence = source === "error" ? "\u2014" : formatPercentage(vote.confidence);
7536
7538
  return `| ${roleLabel} | ${decision2} | ${confidence} |`;
7537
7539
  }).join("\n");
7540
+ const errored = result.votes.filter((v) => v.source === "error").length;
7538
7541
  const { voteCounts, approvalPercentage } = result.result;
7539
- const summary = `Approve: ${String(voteCounts.approve)}, Reject: ${String(voteCounts.reject)}, Abstain: ${String(voteCounts.abstain)} (${approvalPercentage.toFixed(1)}% approval)`;
7542
+ const summary = `Approve: ${String(voteCounts.approve)}, Reject: ${String(voteCounts.reject)}, Abstain: ${String(voteCounts.abstain)}` + (errored > 0 ? `, Errored: ${String(errored)}` : "") + ` (${approvalPercentage.toFixed(1)}% approval` + (errored > 0 ? `, measured over ${String(result.votes.length - errored)} responding voter(s)` : "") + ")";
7540
7543
  return `## Consensus Vote Result
7541
7544
 
7542
7545
  **Date:** ${now} (ET)
@@ -7609,7 +7612,13 @@ async function runVote(options) {
7609
7612
  strategy: result.strategy,
7610
7613
  // Likewise: an error-policy short-circuit voided the vote, and without it
7611
7614
  // the record calls a void a `rejected` (#4953).
7612
- ...result.policyReason !== void 0 ? { policyReason: result.policyReason } : {}
7615
+ ...result.policyReason !== void 0 ? { policyReason: result.policyReason } : {},
7616
+ // #5362 widened the RETURN TYPE for this and never added it to the literal,
7617
+ // so `explainOutcome`'s gate arm — written to consume it — was unreachable
7618
+ // and every option veto fell through to the generic threshold message,
7619
+ // blaming an approval bar the vote had cleared. TypeScript stayed silent
7620
+ // because the field is optional.
7621
+ ...result.optionGate !== void 0 ? { optionGate: result.optionGate } : {}
7613
7622
  };
7614
7623
  }
7615
7624
  function printDryRunBanner() {
@@ -7694,6 +7703,7 @@ ${colors.bold}Nexus Agents Consensus Vote${colors.reset}`);
7694
7703
  result: result.result,
7695
7704
  votes: result.votes,
7696
7705
  threshold: result.threshold,
7706
+ decision: result.decision,
7697
7707
  ...result.optionGate === void 0 ? {} : { optionGate: result.optionGate }
7698
7708
  });
7699
7709
  if (options.verbose === true) printHashes(result.votes);
@@ -19918,7 +19928,7 @@ function startImprovementReviewScheduler(options) {
19918
19928
  let running = false;
19919
19929
  const runOnce = async () => {
19920
19930
  try {
19921
- const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-7FTPX4KN.js");
19931
+ const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-Z233JBED.js");
19922
19932
  const input = ImprovementReviewInputSchema2.parse({ fileIssues });
19923
19933
  const result = await runImprovementReview2(input, { logger: logger22 });
19924
19934
  logger22.info("Scheduled improvement_review complete", {