opencode-acp 1.14.14 → 1.14.16

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
@@ -492,6 +492,26 @@ For the complete list with root cause analysis, see the [bug tracker](https://gi
492
492
 
493
493
  ## Changelog
494
494
 
495
+ ### v1.14.16 — Raise context limits to 80%
496
+
497
+ **Problem**: The compression thresholds were `maxContextLimit: 55%` / `minContextLimit: 45%`. The strong "over-limit" nudge fired as soon as context exceeded 55% of the model window. Combined with the fixed 50K growth threshold (v1.14.15), this still engaged compression relatively early, leaving usable context unused.
498
+
499
+ **Fix**: Raise **both** `compress.maxContextLimit` (`"55%"` → `"80%"`) and `compress.minContextLimit` (`"45%"` → `"80%"`) in `lib/config.ts`. Compression now waits until context exceeds 80% before firing the strong "over-limit" nudge. Setting `minContextLimit` equal to `maxContextLimit` removes the legacy 45% early-engagement band entirely — `minContextLimit` only affects the nudge tip *tone* (`tipsVariant`), never whether a nudge fires; the actual nudge decision is `growthSinceLastNudge >= nudgeGrowthTokens || overMaxLimit`, so aligning both at 80% makes behavior uniform and drops the meaningless early tip tone. The `emergencyThresholdPercent: "98%"` backstop is unchanged. Users can override via `compress.maxContextLimit` / `compress.minContextLimit` in their config.
500
+
501
+ Files: `lib/config.ts`. Tests: 976 pass.
502
+
503
+ **Install**: `opencode plugin opencode-acp@latest --global`
504
+
505
+ ### v1.14.15 — Pin nudge growth to fixed 50,000 tokens
506
+
507
+ **Problem**: The T2/T3 nudge growth threshold was computed as 5% of the model context window (clamped 20K–50K via `resolveAdaptiveNudgeGrowth` from `context-compress-algorithms`). For sub-1M-context models this produced smaller thresholds (e.g. 10K at 200K, 20K at 400K), causing nudges to fire too eagerly and over-compress.
508
+
509
+ **Fix**: Set a fixed default `compress.nudgeGrowthTokens: 50000` in the default config (`lib/config.ts`), overriding the adaptive value through the existing `config.compress?.nudgeGrowthTokens ?? resolveAdaptiveNudgeGrowth(...)` hook at `lib/messages/inject/inject.ts`. Aligns opencode-acp with the parallel `acp-kernel` change (v0.0.19). The `emergencyThresholdPercent: "98%"` backstop still fires regardless of growth threshold. Users can override via `compress.nudgeGrowthTokens` in their config.
510
+
511
+ Files: `lib/config.ts`. Tests: 976 pass (no test asserts the default value).
512
+
513
+ **Install**: `opencode plugin opencode-acp@latest --global`
514
+
495
515
  ### v1.14.14 — Stable Release (2 PRs since v1.14.13)
496
516
 
497
517
  Stable release covering two compress-subsystem fixes: the batched-call summary leak (#288) and the batch-compress all-or-nothing abort (#290). Published to the `latest` npm tag.
package/README.zh-CN.md CHANGED
@@ -446,7 +446,27 @@ ACP 是 DCP 的直接替代品。迁移步骤:
446
446
 
447
447
  ## 更新日志
448
448
 
449
- ### v1.14.14正式版(v1.14.13 以来 2 个 PR)
449
+ ### v1.14.16将上下文 limit 提升至 80%
450
+
451
+ **问题**:压缩阈值原为 `maxContextLimit: 55%` / `minContextLimit: 45%`。上下文一旦超过模型窗口的 55% 就会触发强「超限」nudge。配合 v1.14.15 固定的 50K 增长阈值,压缩仍较早介入,可用上下文未被充分利用。
452
+
453
+ **修复**:将 `compress.maxContextLimit`(`"55%"` → `"80%"`)和 `compress.minContextLimit`(`"45%"` → `"80%"`)**同时**提升至 80%(`lib/config.ts`)。压缩现在等到上下文超过 80% 才触发强「超限」nudge。把 `minContextLimit` 设为与 `maxContextLimit` 相同,彻底移除旧的 45% 提前介入区间 —— `minContextLimit` 只影响 nudge 提示语气(`tipsVariant`),不决定是否触发;实际 nudge 判定为 `growthSinceLastNudge >= nudgeGrowthTokens || overMaxLimit`,两者都设 80% 使行为统一,并去掉无意义的早期提示语气。`emergencyThresholdPercent: "98%"` 兜底不变。用户可通过配置中的 `compress.maxContextLimit` / `compress.minContextLimit` 覆盖。
454
+
455
+ 文件:`lib/config.ts`。测试:976 通过。
456
+
457
+ **安装**:`opencode plugin opencode-acp@latest --global`
458
+
459
+ ### v1.14.15 — 固定 nudge 增长阈值为 50,000 tokens
460
+
461
+ **问题**:T2/T3 nudge 增长阈值按模型上下文窗口的 5% 计算(通过 `context-compress-algorithms` 的 `resolveAdaptiveNudgeGrowth` 钳制在 20K–50K)。对于低于 1M 上下文的模型,这会产生更小的阈值(例如 200K 时为 10K,400K 时为 20K),导致 nudge 触发过于频繁、过度压缩。
462
+
463
+ **修复**:在默认配置(`lib/config.ts`)中设置固定默认值 `compress.nudgeGrowthTokens: 50000`,通过 `lib/messages/inject/inject.ts` 中已有的 `config.compress?.nudgeGrowthTokens ?? resolveAdaptiveNudgeGrowth(...)` 钩子覆盖自适应值。使 opencode-acp 与 `acp-kernel` 的并行改动(v0.0.19)保持一致。`emergencyThresholdPercent: "98%"` 兜底仍与增长阈值无关地触发。用户可通过配置中的 `compress.nudgeGrowthTokens` 覆盖。
464
+
465
+ 文件:`lib/config.ts`。测试:976 通过(无测试断言该默认值)。
466
+
467
+ **安装**:`opencode plugin opencode-acp@latest --global`
468
+
469
+ ### v1.14.14 — 正式版(v1.14.13 以来 2 个 PR)
450
470
 
451
471
  正式版,包含两个压缩子系统修复:批量调用的 summary 泄漏(#288)和批量压缩的全有或全无中断(#290)。发布到 `latest` npm tag。
452
472
 
package/dist/index.js CHANGED
@@ -1484,8 +1484,8 @@ var defaultConfig = {
1484
1484
  permission: "allow",
1485
1485
  showCompression: true,
1486
1486
  summaryBuffer: true,
1487
- maxContextLimit: "55%",
1488
- minContextLimit: "45%",
1487
+ maxContextLimit: "80%",
1488
+ minContextLimit: "80%",
1489
1489
  nudgeFrequency: 5,
1490
1490
  minNudgeContextPercent: 15,
1491
1491
  iterationNudgeThreshold: 15,
@@ -1497,6 +1497,7 @@ var defaultConfig = {
1497
1497
  minCompressRange: 5e3,
1498
1498
  minNudgeGrowthRatio: 0.45,
1499
1499
  minNudgeGrowthFloor: 5e3,
1500
+ nudgeGrowthTokens: 5e4,
1500
1501
  emergencyThresholdPercent: "98%",
1501
1502
  maxVisibleSegments: 50,
1502
1503
  keepEmbedMaxChars: 2e3,
@@ -8948,7 +8949,7 @@ import { writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
8948
8949
  import { join as join3 } from "path";
8949
8950
  import { existsSync as existsSync3 } from "fs";
8950
8951
  import { homedir as homedir3 } from "os";
8951
- var LOG_VERSION = true ? "1.14.14" : "dev";
8952
+ var LOG_VERSION = true ? "1.14.16" : "dev";
8952
8953
  var Logger = class {
8953
8954
  logDir;
8954
8955
  enabled;