nexus-agents 2.173.2 → 2.173.3

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.
@@ -21,7 +21,7 @@ import {
21
21
  DEFAULT_TASK_TTL_MS,
22
22
  DEFAULT_TOOL_RATE_LIMITS,
23
23
  clampTaskTtl
24
- } from "./chunk-H63X54TU.js";
24
+ } from "./chunk-WJHTVYP6.js";
25
25
  import {
26
26
  executeExpert
27
27
  } from "./chunk-MBTEWGZK.js";
@@ -54021,4 +54021,4 @@ export {
54021
54021
  shutdownFeedbackSubscriber,
54022
54022
  createEventBusBridge
54023
54023
  };
54024
- //# sourceMappingURL=chunk-5UKKGPRS.js.map
54024
+ //# sourceMappingURL=chunk-GNZ2ZIT3.js.map
@@ -8,7 +8,7 @@ import {
8
8
  checkSqlite,
9
9
  defaultConfig,
10
10
  initDataDirectories
11
- } from "./chunk-H63X54TU.js";
11
+ } from "./chunk-WJHTVYP6.js";
12
12
  import {
13
13
  BUILT_IN_EXPERTS
14
14
  } from "./chunk-ZM4O442V.js";
@@ -2001,4 +2001,4 @@ export {
2001
2001
  setupCommand,
2002
2002
  setupCommandAsync
2003
2003
  };
2004
- //# sourceMappingURL=chunk-GNXQBXFI.js.map
2004
+ //# sourceMappingURL=chunk-QZLISECU.js.map
@@ -46,7 +46,7 @@ import {
46
46
  } from "./chunk-DHVMSIT5.js";
47
47
 
48
48
  // src/version.ts
49
- var VERSION = true ? "2.173.2" : "dev";
49
+ var VERSION = true ? "2.173.3" : "dev";
50
50
 
51
51
  // src/config/schemas-core.ts
52
52
  import { z } from "zod";
@@ -2182,7 +2182,7 @@ async function runDoctorFix(result) {
2182
2182
  writeLine2("\u2500".repeat(40));
2183
2183
  let fixCount = 0;
2184
2184
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
2185
- const { runSetup } = await import("./setup-command-24Z3KEHP.js");
2185
+ const { runSetup } = await import("./setup-command-EGDBEPM5.js");
2186
2186
  const setupResult = runSetup({
2187
2187
  skipMcp: true,
2188
2188
  skipRules: true,
@@ -2295,4 +2295,4 @@ export {
2295
2295
  startStdioServer,
2296
2296
  closeServer
2297
2297
  };
2298
- //# sourceMappingURL=chunk-H63X54TU.js.map
2298
+ //# sourceMappingURL=chunk-WJHTVYP6.js.map
package/dist/cli.js CHANGED
@@ -18,7 +18,7 @@ import "./chunk-O6VB54QJ.js";
18
18
  import {
19
19
  setupCommandAsync,
20
20
  verifyCommand
21
- } from "./chunk-GNXQBXFI.js";
21
+ } from "./chunk-QZLISECU.js";
22
22
  import "./chunk-4KURMOBY.js";
23
23
  import {
24
24
  AuthHandler,
@@ -139,7 +139,7 @@ import {
139
139
  validateCommand,
140
140
  validateWorkflow,
141
141
  wrapInMarkdownFence
142
- } from "./chunk-5UKKGPRS.js";
142
+ } from "./chunk-GNZ2ZIT3.js";
143
143
  import "./chunk-P6POKYSM.js";
144
144
  import "./chunk-HFOQKCD2.js";
145
145
  import "./chunk-YF35FKKD.js";
@@ -166,7 +166,7 @@ import {
166
166
  loadConfig,
167
167
  runDoctor,
168
168
  validateNexusEnv
169
- } from "./chunk-H63X54TU.js";
169
+ } from "./chunk-WJHTVYP6.js";
170
170
  import {
171
171
  buildOpenAICompatAdapters,
172
172
  readOpenAICompatEnv
@@ -1872,11 +1872,12 @@ var BaseEvaluator = class {
1872
1872
  }, this.timeoutMs);
1873
1873
  });
1874
1874
  try {
1875
- const result = await Promise.race([this.performEvaluation(component), timeoutPromise]).finally(
1876
- () => {
1877
- if (timeoutId !== void 0) clearTimeout(timeoutId);
1878
- }
1879
- );
1875
+ const result = await Promise.race([
1876
+ this.performEvaluation(component),
1877
+ timeoutPromise
1878
+ ]).finally(() => {
1879
+ if (timeoutId !== void 0) clearTimeout(timeoutId);
1880
+ });
1880
1881
  this.log.debug("Evaluation complete", {
1881
1882
  component: component.path,
1882
1883
  recommendation: result.recommendation,
@@ -1914,6 +1915,23 @@ var BaseEvaluator = class {
1914
1915
  cite(metric, value, source, threshold) {
1915
1916
  return { metric, value, source, ...threshold !== void 0 ? { threshold } : {} };
1916
1917
  }
1918
+ /**
1919
+ * Shared per-role confidence rubric: `base + min(metricCap, metricCount *
1920
+ * metricCoeff) - concernPenalty`. More observed metrics ⇒ higher confidence
1921
+ * (bonus capped); more concerns ⇒ lower confidence (penalty capped).
1922
+ *
1923
+ * Each evaluator role passes its OWN base/cap/coeff — the constants are
1924
+ * intentionally NOT unified (architecture-fit, practical-value, and
1925
+ * code-quality each weight evidence differently). Omit the concern fields to
1926
+ * skip the penalty entirely (roles that judge on positive signals only).
1927
+ *
1928
+ * The returned value is later clamped to [0, 1] by {@link createResult}.
1929
+ */
1930
+ computeConfidence(opts) {
1931
+ const metricBonus = Math.min(opts.metricCap, opts.metricCount * opts.metricCoeff);
1932
+ const concernPenalty = opts.concernCount !== void 0 && opts.concernCoeff !== void 0 ? Math.min(opts.concernCap ?? Infinity, opts.concernCount * opts.concernCoeff) : 0;
1933
+ return opts.base + metricBonus - concernPenalty;
1934
+ }
1917
1935
  };
1918
1936
 
1919
1937
  // src/self-eval/code-quality-evaluator.ts
@@ -1930,7 +1948,15 @@ var CodeQualityEvaluator = class extends BaseEvaluator {
1930
1948
  score = this.evaluateFileLength(component, metrics, concerns, score);
1931
1949
  score = this.evaluateTestCoverage(component, metrics, concerns, score);
1932
1950
  const recommendation = this.scoreToRecommendation(score);
1933
- const confidence = this.calculateConfidence(metrics.length, concerns.length);
1951
+ const confidence = this.computeConfidence({
1952
+ base: 0.5,
1953
+ metricCount: metrics.length,
1954
+ metricCap: 0.4,
1955
+ metricCoeff: 0.1,
1956
+ concernCount: concerns.length,
1957
+ concernCap: 0.2,
1958
+ concernCoeff: 0.05
1959
+ });
1934
1960
  return this.createResult(component, recommendation, confidence, metrics, concerns);
1935
1961
  }
1936
1962
  /**
@@ -1987,12 +2013,6 @@ var CodeQualityEvaluator = class extends BaseEvaluator {
1987
2013
  if (score >= 0.3) return "refactor";
1988
2014
  return "deprecate";
1989
2015
  }
1990
- calculateConfidence(metricCount, concernCount) {
1991
- const base = 0.5;
1992
- const metricBonus = Math.min(0.4, metricCount * 0.1);
1993
- const concernPenalty = Math.min(0.2, concernCount * 0.05);
1994
- return base + metricBonus - concernPenalty;
1995
- }
1996
2016
  };
1997
2017
 
1998
2018
  // src/self-eval/architecture-fit-evaluator.ts
@@ -2010,9 +2030,12 @@ var ArchitectureFitEvaluator = class extends BaseEvaluator {
2010
2030
  score = this.evaluateExports(component, metrics, concerns, score);
2011
2031
  this.checkNodeProtocolImports(component, metrics);
2012
2032
  const recommendation = this.scoreToRecommendation(score);
2013
- const base = 0.6;
2014
- const metricBonus = Math.min(0.3, metrics.length * 0.05);
2015
- const confidence = base + metricBonus;
2033
+ const confidence = this.computeConfidence({
2034
+ base: 0.6,
2035
+ metricCount: metrics.length,
2036
+ metricCap: 0.3,
2037
+ metricCoeff: 0.05
2038
+ });
2016
2039
  return this.createResult(component, recommendation, confidence, metrics, concerns);
2017
2040
  }
2018
2041
  /**
@@ -2087,9 +2110,12 @@ var PracticalValueEvaluator = class extends BaseEvaluator {
2087
2110
  score = this.evaluateSpecialFiles(component, metrics, score);
2088
2111
  score = this.evaluateSizeHeuristics(component, metrics, concerns, score);
2089
2112
  const recommendation = this.scoreToRecommendation(score);
2090
- const base = 0.5;
2091
- const metricBonus = Math.min(0.4, metrics.length * 0.08);
2092
- const confidence = base + metricBonus;
2113
+ const confidence = this.computeConfidence({
2114
+ base: 0.5,
2115
+ metricCount: metrics.length,
2116
+ metricCap: 0.4,
2117
+ metricCoeff: 0.08
2118
+ });
2093
2119
  return this.createResult(component, recommendation, confidence, metrics, concerns);
2094
2120
  }
2095
2121
  /**