nexus-agents 2.119.2 → 2.120.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.
@@ -26,7 +26,7 @@ import {
26
26
  writeJobComplete,
27
27
  writeJobFailed,
28
28
  writeJobPending
29
- } from "./chunk-EZ47OIGA.js";
29
+ } from "./chunk-VEANYNRI.js";
30
30
  import {
31
31
  normalizeTopicToCanonical,
32
32
  synthesizeResearch
@@ -115,7 +115,7 @@ import {
115
115
  DEFAULT_TASK_TTL_MS,
116
116
  DEFAULT_TOOL_RATE_LIMITS,
117
117
  clampTaskTtl
118
- } from "./chunk-HWQHXB3L.js";
118
+ } from "./chunk-ODGT3XLG.js";
119
119
  import {
120
120
  resolveInsideRoot
121
121
  } from "./chunk-NUBSJGQZ.js";
@@ -42059,7 +42059,7 @@ ${contextBlock}`;
42059
42059
  const strategy = config.votingStrategy ?? "higher_order";
42060
42060
  await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
42061
42061
  try {
42062
- const { executeVoting } = await import("./consensus-vote-MW4OI6G2.js");
42062
+ const { executeVoting } = await import("./consensus-vote-DA5X2LVZ.js");
42063
42063
  const votingResult = await executeVoting(
42064
42064
  {
42065
42065
  proposal: buildVoteProposal(plan, research),
@@ -49074,4 +49074,4 @@ export {
49074
49074
  detectBackend,
49075
49075
  createTaskTracker
49076
49076
  };
49077
- //# sourceMappingURL=chunk-T4D7CT6L.js.map
49077
+ //# sourceMappingURL=chunk-DSHHLWFL.js.map
@@ -8,7 +8,7 @@ import {
8
8
  checkSqlite,
9
9
  defaultConfig,
10
10
  initDataDirectories
11
- } from "./chunk-HWQHXB3L.js";
11
+ } from "./chunk-ODGT3XLG.js";
12
12
  import {
13
13
  probeAllClis
14
14
  } from "./chunk-62ACDINW.js";
@@ -2000,4 +2000,4 @@ export {
2000
2000
  setupCommand,
2001
2001
  setupCommandAsync
2002
2002
  };
2003
- //# sourceMappingURL=chunk-235LYOTA.js.map
2003
+ //# sourceMappingURL=chunk-H4UJ2HMY.js.map
@@ -40,7 +40,7 @@ import {
40
40
  } from "./chunk-CH7QIDHQ.js";
41
41
 
42
42
  // src/version.ts
43
- var VERSION = true ? "2.119.2" : "dev";
43
+ var VERSION = true ? "2.120.0" : "dev";
44
44
 
45
45
  // src/config/schemas-core.ts
46
46
  import { z } from "zod";
@@ -2099,7 +2099,7 @@ async function runDoctorFix(result) {
2099
2099
  writeLine2("\u2500".repeat(40));
2100
2100
  let fixCount = 0;
2101
2101
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
2102
- const { runSetup } = await import("./setup-command-UC552MKE.js");
2102
+ const { runSetup } = await import("./setup-command-DHAFUDXP.js");
2103
2103
  const setupResult = runSetup({
2104
2104
  skipMcp: true,
2105
2105
  skipRules: true,
@@ -2211,4 +2211,4 @@ export {
2211
2211
  startStdioServer,
2212
2212
  closeServer
2213
2213
  };
2214
- //# sourceMappingURL=chunk-HWQHXB3L.js.map
2214
+ //# sourceMappingURL=chunk-ODGT3XLG.js.map
@@ -1678,9 +1678,18 @@ async function executeSingleVoteAttempt(role, proposal, adapter, timeoutMs) {
1678
1678
  // Low temperature for consistent evaluations
1679
1679
  // #3433: request native structured output (Claude tool_use / OpenAI+Gemini
1680
1680
  // json mode) so the vote arrives as a schema-valid JSON object instead of
1681
- // prose-wrapped JSON. Adapters that don't honor responseFormat ignore it and
1682
- // the existing extractTextFromResponse + parseVoteResponse regex/Zod path
1683
- // below is the fallback no behavior change for those backends.
1681
+ // prose-wrapped JSON. When an adapter DOES honor it, the
1682
+ // extractTextFromResponse + parseVoteResponse regex/Zod path below still
1683
+ // accepts the result, so it's also the fallback for prose-returning backends.
1684
+ //
1685
+ // CAVEAT (#3497): not every backend "silently ignores" an unsupported
1686
+ // responseFormat. OpenRouter implements `json_schema` via provider tool-use,
1687
+ // so a role routed to a provider without tool-use returns a hard
1688
+ // 404 "No endpoints found that support tool use" rather than ignoring the
1689
+ // field. Those voters then error → abstain (the panel degrades to the
1690
+ // succeeding voters). The real fix — gate `responseFormat` on a model
1691
+ // structured-output capability, or retry-without-it on that 404 — is tracked
1692
+ // in #3497; this comment no longer claims a universal "no behavior change".
1684
1693
  responseFormat: { type: "json_schema", schema: VOTE_JSON_SCHEMA },
1685
1694
  // Thread the vote's budget into the adapter so its shorter standard CLI
1686
1695
  // timeout doesn't fire first and surface as an MCP -32001 on slow voters
@@ -5084,6 +5093,10 @@ var VotingStrategySchema = z6.enum([
5084
5093
  function isHigherOrderStrategy(strategy) {
5085
5094
  return strategy === "higher_order" || strategy === "opinion_wise";
5086
5095
  }
5096
+ var HIGHER_ORDER_ESCALATION_POSTERIOR_FLOOR = 0.65;
5097
+ function shouldEscalateLowPosterior(strategy, outcome, quickMode, posteriorApproval) {
5098
+ return quickMode && outcome === "approved" && isHigherOrderStrategy(strategy) && posteriorApproval !== void 0 && posteriorApproval < HIGHER_ORDER_ESCALATION_POSTERIOR_FLOOR;
5099
+ }
5087
5100
  var ErrorPolicySchema = z6.enum(["reduce_denominator", "count_as_abstain", "fail_closed"]);
5088
5101
  var VoteThresholdSchema = z6.enum(["majority", "supermajority", "unanimous"]);
5089
5102
  var ERROR_FLOOR_FRACTION = 0.5;
@@ -6038,8 +6051,15 @@ function buildPolicyShortCircuitResult(args) {
6038
6051
  policyReason: args.reason
6039
6052
  };
6040
6053
  }
6041
- async function maybeEscalateContrarian(input, outcome, logger11, opts) {
6054
+ async function maybeEscalateContrarian(input, outcome, ctx, logger11, opts) {
6042
6055
  if (!input.quickMode || outcome !== "approved" || input.simulateVotes) return void 0;
6056
+ if (shouldEscalateLowPosterior(ctx.strategy, outcome, input.quickMode, ctx.posteriorApproval)) {
6057
+ logger11.warn("Posterior-confidence escalation: re-running with full vote (#3174)", {
6058
+ strategy: ctx.strategy,
6059
+ posteriorApproval: ctx.posteriorApproval
6060
+ });
6061
+ return executeVoting({ ...input, quickMode: false }, logger11, opts);
6062
+ }
6043
6063
  const escalation = await runContrarianCheck(input.proposal, logger11);
6044
6064
  if (!escalation.shouldEscalate) return void 0;
6045
6065
  logger11.warn("Contrarian escalation: re-running with full vote", {
@@ -6090,7 +6110,13 @@ async function executeVoting(input, logger11, opts) {
6090
6110
  }
6091
6111
  );
6092
6112
  recordVotesToTracker(votes, outcome, logger11);
6093
- const escalated = await maybeEscalateContrarian(input, outcome, logger11, opts);
6113
+ const escalated = await maybeEscalateContrarian(
6114
+ input,
6115
+ outcome,
6116
+ { strategy, posteriorApproval: higherOrderResult?.posteriorApproval },
6117
+ logger11,
6118
+ opts
6119
+ );
6094
6120
  if (escalated !== void 0) return escalated;
6095
6121
  return finalizeVotingResult({
6096
6122
  input,
@@ -6457,4 +6483,4 @@ export {
6457
6483
  CONSENSUS_VOTE_OUTPUT_SCHEMA,
6458
6484
  registerConsensusVoteTool
6459
6485
  };
6460
- //# sourceMappingURL=chunk-EZ47OIGA.js.map
6486
+ //# sourceMappingURL=chunk-VEANYNRI.js.map