opencode-acp 1.14.25 → 1.14.26-pr.353.87
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/README.md
CHANGED
|
@@ -324,11 +324,12 @@ Each level overrides the previous, so project settings take priority over global
|
|
|
324
324
|
// Soft upper threshold: above this, ACP keeps injecting strong
|
|
325
325
|
// compression nudges (based on nudgeFrequency), so compression is
|
|
326
326
|
// much more likely. Accepts: number or "X%" of model context window.
|
|
327
|
-
"maxContextLimit": "
|
|
328
|
-
// Soft lower threshold for reminder nudges: below this,
|
|
329
|
-
// reminders are off (compression less likely). At/above this,
|
|
330
|
-
// are on.
|
|
331
|
-
|
|
327
|
+
"maxContextLimit": "80%",
|
|
328
|
+
// Soft lower threshold for turn/iteration reminder nudges: below this,
|
|
329
|
+
// those reminders are off (compression less likely). At/above this, they
|
|
330
|
+
// are on. Growth nudges have their own floor: minNudgeContextPercent.
|
|
331
|
+
// Accepts: number or "X%" of model context window.
|
|
332
|
+
"minContextLimit": "80%",
|
|
332
333
|
// Optional per-model override for maxContextLimit by providerID/modelID.
|
|
333
334
|
// If present, this wins over the global maxContextLimit.
|
|
334
335
|
// Accepts: number or "X%".
|
package/dist/index.js
CHANGED
|
@@ -1489,7 +1489,7 @@ var defaultConfig = {
|
|
|
1489
1489
|
maxContextLimit: "80%",
|
|
1490
1490
|
minContextLimit: "80%",
|
|
1491
1491
|
nudgeFrequency: 5,
|
|
1492
|
-
minNudgeContextPercent:
|
|
1492
|
+
minNudgeContextPercent: 5,
|
|
1493
1493
|
iterationNudgeThreshold: 15,
|
|
1494
1494
|
nudgeForce: "soft",
|
|
1495
1495
|
protectedTools: [...COMPRESS_DEFAULT_PROTECTED_TOOLS],
|
|
@@ -7639,11 +7639,13 @@ var injectCompressNudges = (state, config, logger, messages, prompts, compressio
|
|
|
7639
7639
|
overMinLimit,
|
|
7640
7640
|
overMaxLimit,
|
|
7641
7641
|
lastNudgeTokens: growthReference,
|
|
7642
|
-
minNudgeContextPercent: config.compress?.minNudgeContextPercent ??
|
|
7642
|
+
minNudgeContextPercent: config.compress?.minNudgeContextPercent ?? 5,
|
|
7643
7643
|
nudgeGrowthTokens: effectiveThreshold
|
|
7644
7644
|
});
|
|
7645
7645
|
const growthSinceBaseline = currentTokens !== void 0 && growthReference !== void 0 ? currentTokens - growthReference : void 0;
|
|
7646
|
-
const
|
|
7646
|
+
const minNudgeFloorTokens = modelContextLimit !== void 0 ? Math.round((config.compress?.minNudgeContextPercent ?? 5) / 100 * modelContextLimit) : void 0;
|
|
7647
|
+
const overMinNudgeFloor = minNudgeFloorTokens === void 0 || currentTokens === void 0 || currentTokens >= minNudgeFloorTokens;
|
|
7648
|
+
const nudgeAllowed = emergencyOverride || decision.shouldNudge && (overMaxLimit || overMinNudgeFloor) && growthSinceBaseline !== void 0 && growthSinceBaseline >= growthFloor;
|
|
7647
7649
|
const effectiveTipsVariant = emergencyOverride ? "maxLimit" : decision.tipsVariant;
|
|
7648
7650
|
if (state.nudges.lastPerMessageNudgeTokens === void 0 && currentTokens !== void 0) {
|
|
7649
7651
|
state.nudges.lastPerMessageNudgeTokens = currentTokens;
|
|
@@ -9110,7 +9112,7 @@ import { writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
|
|
|
9110
9112
|
import { join as join3 } from "path";
|
|
9111
9113
|
import { existsSync as existsSync3 } from "fs";
|
|
9112
9114
|
import { homedir as homedir3 } from "os";
|
|
9113
|
-
var LOG_VERSION = true ? "1.14.
|
|
9115
|
+
var LOG_VERSION = true ? "1.14.26-pr.353.87" : "dev";
|
|
9114
9116
|
var LEVEL_RANK = {
|
|
9115
9117
|
debug: 10,
|
|
9116
9118
|
info: 20,
|
|
@@ -11551,7 +11553,7 @@ var server = (async (ctx) => {
|
|
|
11551
11553
|
}
|
|
11552
11554
|
const logger = new Logger(config.debug, config.debug ? "debug" : config.logLevel);
|
|
11553
11555
|
logger.info("ACP plugin initialized", {
|
|
11554
|
-
version: true ? "1.14.
|
|
11556
|
+
version: true ? "1.14.26-pr.353.87" : "dev",
|
|
11555
11557
|
workspace: ctx.directory,
|
|
11556
11558
|
logLevel: logger.level,
|
|
11557
11559
|
debug: config.debug,
|