nexus-agents 2.103.1 → 2.103.2
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-TZ2YMIQV.js → chunk-3I5UBNXA.js} +3 -3
- package/dist/{chunk-G2FTEZDY.js → chunk-AGQU7XWB.js} +34 -7
- package/dist/{chunk-G2FTEZDY.js.map → chunk-AGQU7XWB.js.map} +1 -1
- package/dist/{chunk-OMFKL3FZ.js → chunk-DOINBQCP.js} +4 -4
- package/dist/{chunk-ULKXWKNZ.js → chunk-NNJLOPGX.js} +3 -3
- package/dist/{chunk-CB66XOZQ.js → chunk-O74KAIGB.js} +13 -13
- package/dist/{chunk-RDNEALPS.js → chunk-Z35RTR2B.js} +2 -2
- package/dist/cli.js +7 -7
- package/dist/{consensus-vote-2ODNLCSS.js → consensus-vote-WBO7Y24Y.js} +4 -3
- package/dist/{expert-bridge-GNHXRQEZ.js → expert-bridge-TF6C6XPV.js} +2 -2
- package/dist/{factory-6PU24HFM.js → factory-3CNPIFWT.js} +3 -2
- package/dist/index.d.ts +12 -1
- package/dist/index.js +15 -15
- package/dist/{setup-command-KMGJM4V4.js → setup-command-ZQPW7LPQ.js} +5 -5
- package/package.json +1 -1
- /package/dist/{chunk-TZ2YMIQV.js.map → chunk-3I5UBNXA.js.map} +0 -0
- /package/dist/{chunk-OMFKL3FZ.js.map → chunk-DOINBQCP.js.map} +0 -0
- /package/dist/{chunk-ULKXWKNZ.js.map → chunk-NNJLOPGX.js.map} +0 -0
- /package/dist/{chunk-CB66XOZQ.js.map → chunk-O74KAIGB.js.map} +0 -0
- /package/dist/{chunk-RDNEALPS.js.map → chunk-Z35RTR2B.js.map} +0 -0
- /package/dist/{consensus-vote-2ODNLCSS.js.map → consensus-vote-WBO7Y24Y.js.map} +0 -0
- /package/dist/{expert-bridge-GNHXRQEZ.js.map → expert-bridge-TF6C6XPV.js.map} +0 -0
- /package/dist/{factory-6PU24HFM.js.map → factory-3CNPIFWT.js.map} +0 -0
- /package/dist/{setup-command-KMGJM4V4.js.map → setup-command-ZQPW7LPQ.js.map} +0 -0
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
isCliAvailable,
|
|
38
38
|
sanitizeOutput,
|
|
39
39
|
withTimeout
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-AGQU7XWB.js";
|
|
41
41
|
import {
|
|
42
42
|
AgentError,
|
|
43
43
|
CLI_NAMES,
|
|
@@ -7003,7 +7003,7 @@ async function processVotesWithCascade(engineVotes, opts) {
|
|
|
7003
7003
|
var CONTRARIAN_ESCALATION_THRESHOLD = 0.8;
|
|
7004
7004
|
async function runContrarianCheck(proposal, log) {
|
|
7005
7005
|
try {
|
|
7006
|
-
const { executeExpert } = await import("./expert-bridge-
|
|
7006
|
+
const { executeExpert } = await import("./expert-bridge-TF6C6XPV.js");
|
|
7007
7007
|
const prompt = [
|
|
7008
7008
|
"You are a contrarian analyst. Your job is to find reasons this proposal should be REJECTED.",
|
|
7009
7009
|
"Look for: YAGNI (not needed), MISALIGNED (wrong tech/architecture), SECURITY_RISK, SCOPE_CREEP.",
|
|
@@ -7496,4 +7496,4 @@ export {
|
|
|
7496
7496
|
CONSENSUS_VOTE_OUTPUT_SCHEMA,
|
|
7497
7497
|
registerConsensusVoteTool
|
|
7498
7498
|
};
|
|
7499
|
-
//# sourceMappingURL=chunk-
|
|
7499
|
+
//# sourceMappingURL=chunk-3I5UBNXA.js.map
|
|
@@ -2,6 +2,9 @@ import {
|
|
|
2
2
|
CliCircuitBreaker,
|
|
3
3
|
DEFAULT_CIRCUIT_BREAKER_CONFIG
|
|
4
4
|
} from "./chunk-4PWBF3NC.js";
|
|
5
|
+
import {
|
|
6
|
+
getAvailabilityCache
|
|
7
|
+
} from "./chunk-3GUCNISD.js";
|
|
5
8
|
import {
|
|
6
9
|
generateHyphenId
|
|
7
10
|
} from "./chunk-KSMYBMM6.js";
|
|
@@ -2898,29 +2901,53 @@ var OpenCodeCliAdapter = class extends SubprocessCliAdapter {
|
|
|
2898
2901
|
if (this.availableModels === void 0 || this.availableModels.size === 0) return false;
|
|
2899
2902
|
return this.availableModels.has(cliModel);
|
|
2900
2903
|
}
|
|
2901
|
-
/**
|
|
2904
|
+
/** #3408: true if the model is in rate-limit cooldown (recent 429). Opt-in. */
|
|
2905
|
+
isCooled(cliModel) {
|
|
2906
|
+
return isDynamicModelsEnabled() && getAvailabilityCache().isKnownUnavailable(cliModel);
|
|
2907
|
+
}
|
|
2908
|
+
/** Usable = offered by the OpenCode install AND not in rate-limit cooldown. */
|
|
2909
|
+
isModelUsable(cliModel) {
|
|
2910
|
+
return this.isModelAvailable(cliModel) && !this.isCooled(cliModel);
|
|
2911
|
+
}
|
|
2912
|
+
/** Appends --model if the resolved model is usable (#1402, #3407, #3408). */
|
|
2902
2913
|
appendModelArg(args, task) {
|
|
2903
2914
|
const internalModel = task.model ?? this.model;
|
|
2904
2915
|
let cliModel = resolveOpenCodeModel(internalModel);
|
|
2905
|
-
if (!this.
|
|
2906
|
-
const
|
|
2916
|
+
if (!this.isModelUsable(cliModel) && isDynamicModelsEnabled() && this.availableModels !== void 0) {
|
|
2917
|
+
const usable = new Set([...this.availableModels].filter((m) => !this.isCooled(m)));
|
|
2918
|
+
const resolved = resolveLiveModelId(cliModel, usable);
|
|
2907
2919
|
if (resolved !== cliModel) {
|
|
2908
|
-
logger5.debug("Resolved
|
|
2920
|
+
logger5.debug("Resolved to live/non-cooled model (#3407/#3408)", {
|
|
2909
2921
|
from: cliModel,
|
|
2910
2922
|
to: resolved
|
|
2911
2923
|
});
|
|
2912
2924
|
cliModel = resolved;
|
|
2913
2925
|
}
|
|
2914
2926
|
}
|
|
2915
|
-
if (this.
|
|
2927
|
+
if (this.isModelUsable(cliModel)) {
|
|
2916
2928
|
args.push("--model", cliModel);
|
|
2917
2929
|
} else {
|
|
2918
|
-
logger5.debug("Model not
|
|
2930
|
+
logger5.debug("Model not usable (unavailable or cooled), using OpenCode default", {
|
|
2919
2931
|
requested: cliModel,
|
|
2920
2932
|
available: this.availableModels?.size ?? 0
|
|
2921
2933
|
});
|
|
2922
2934
|
}
|
|
2923
2935
|
}
|
|
2936
|
+
/**
|
|
2937
|
+
* #3408: mark a model in rate-limit cooldown when a call returns RATE_LIMITED,
|
|
2938
|
+
* so subsequent selections skip it until the AvailabilityCache TTL recovers.
|
|
2939
|
+
* Wraps the base executeTask; opt-in + fail-open (no-op when discovery is off).
|
|
2940
|
+
* Advisory: a cooled model is still usable via an explicit, available --model.
|
|
2941
|
+
*/
|
|
2942
|
+
async executeTask(task, options) {
|
|
2943
|
+
const result = await super.executeTask(task, options);
|
|
2944
|
+
if (isDynamicModelsEnabled() && !result.ok && result.error.code === "RATE_LIMITED") {
|
|
2945
|
+
const cliModel = resolveOpenCodeModel(task.model ?? this.model);
|
|
2946
|
+
getAvailabilityCache().markUnavailable(cliModel, "rate-limited (429)");
|
|
2947
|
+
logger5.debug("Cooldown: marked model rate-limited (#3408)", { model: cliModel });
|
|
2948
|
+
}
|
|
2949
|
+
return result;
|
|
2950
|
+
}
|
|
2924
2951
|
/** Appends optional task flags (workDir, variant, thinking). */
|
|
2925
2952
|
appendTaskFlags(args, task) {
|
|
2926
2953
|
const workDir = task.options?.["workDir"];
|
|
@@ -3418,4 +3445,4 @@ export {
|
|
|
3418
3445
|
isCliAvailable,
|
|
3419
3446
|
getAvailableClis
|
|
3420
3447
|
};
|
|
3421
|
-
//# sourceMappingURL=chunk-
|
|
3448
|
+
//# sourceMappingURL=chunk-AGQU7XWB.js.map
|