


















@@ -46,7 +46,7 @@ export function applyLocalTsgoPolicy(args, env, hostResources) {
4646);
4747}
484849-if (shouldThrottleLocalHeavyChecks(nextEnv, hostResources)) {
49+if (shouldThrottleLocalHeavyChecks(nextEnv, hostResources, "auto")) {
5050insertBeforeSeparator(nextArgs, "--singleThreaded");
5151insertBeforeSeparator(nextArgs, "--checkers", "1");
5252@@ -145,12 +145,12 @@ export function shouldAcquireLocalHeavyCheckLockForTsgo(args, env = process.env)
145145);
146146}
147147148-export function shouldThrottleLocalHeavyChecks(env, hostResources) {
148+export function shouldThrottleLocalHeavyChecks(env, hostResources, defaultMode = "throttled") {
149149if (!isLocalCheckEnabled(env)) {
150150return false;
151151}
152152153-const mode = readLocalCheckMode(env);
153+const mode = readLocalCheckMode(env, defaultMode);
154154if (mode === "throttled") {
155155return true;
156156}
@@ -298,17 +298,15 @@ function insertBeforeSeparator(args, ...items) {
298298args.splice(insertIndex, 0, ...items);
299299}
300300301-function readLocalCheckMode(env) {
301+function readLocalCheckMode(env, defaultMode) {
302302const raw = env.OPENCLAW_LOCAL_CHECK_MODE?.trim().toLowerCase();
303303if (raw === "throttled" || raw === "low-memory") {
304304return "throttled";
305305}
306306if (raw === "full" || raw === "fast") {
307307return "full";
308308}
309-// Keep local heavy checks conservative by default. Developers can still opt
310-// into full-speed runs explicitly with OPENCLAW_LOCAL_CHECK_MODE=full.
311-return "throttled";
309+return defaultMode;
312310}
313311314312function resolveHostResources(hostResources) {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。