nexus-agents 2.173.2 → 2.173.4
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.
- package/dist/{chunk-GNXQBXFI.js → chunk-CGIT3MVV.js} +2 -2
- package/dist/{chunk-5UKKGPRS.js → chunk-R4ZINS62.js} +62 -38
- package/dist/chunk-R4ZINS62.js.map +1 -0
- package/dist/{chunk-H63X54TU.js → chunk-YYCG236I.js} +3 -3
- package/dist/cli.js +47 -21
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +22 -0
- package/dist/index.js +2 -2
- package/dist/{setup-command-24Z3KEHP.js → setup-command-EQGY5TZ5.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-5UKKGPRS.js.map +0 -1
- /package/dist/{chunk-GNXQBXFI.js.map → chunk-CGIT3MVV.js.map} +0 -0
- /package/dist/{chunk-H63X54TU.js.map → chunk-YYCG236I.js.map} +0 -0
- /package/dist/{setup-command-24Z3KEHP.js.map → setup-command-EQGY5TZ5.js.map} +0 -0
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
} from "./chunk-DHVMSIT5.js";
|
|
47
47
|
|
|
48
48
|
// src/version.ts
|
|
49
|
-
var VERSION = true ? "2.173.
|
|
49
|
+
var VERSION = true ? "2.173.4" : "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-
|
|
2185
|
+
const { runSetup } = await import("./setup-command-EQGY5TZ5.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-
|
|
2298
|
+
//# sourceMappingURL=chunk-YYCG236I.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-
|
|
21
|
+
} from "./chunk-CGIT3MVV.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-
|
|
142
|
+
} from "./chunk-R4ZINS62.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-
|
|
169
|
+
} from "./chunk-YYCG236I.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([
|
|
1876
|
-
()
|
|
1877
|
-
|
|
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.
|
|
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
|
|
2014
|
-
|
|
2015
|
-
|
|
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
|
|
2091
|
-
|
|
2092
|
-
|
|
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
|
/**
|