opencode-acp 1.14.14 → 1.14.15

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,16 @@ For the complete list with root cause analysis, see the [bug tracker](https://gi
492
492
 
493
493
  ## Changelog
494
494
 
495
+ ### v1.14.15 — Pin nudge growth to fixed 50,000 tokens
496
+
497
+ **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.
498
+
499
+ **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.
500
+
501
+ Files: `lib/config.ts`. Tests: 976 pass (no test asserts the default value).
502
+
503
+ **Install**: `opencode plugin opencode-acp@latest --global`
504
+
495
505
  ### v1.14.14 — Stable Release (2 PRs since v1.14.13)
496
506
 
497
507
  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,17 @@ ACP 是 DCP 的直接替代品。迁移步骤:
446
446
 
447
447
  ## 更新日志
448
448
 
449
- ### v1.14.14正式版(v1.14.13 以来 2 PR)
449
+ ### v1.14.15固定 nudge 增长阈值为 50,000 tokens
450
+
451
+ **问题**:T2/T3 nudge 增长阈值按模型上下文窗口的 5% 计算(通过 `context-compress-algorithms` 的 `resolveAdaptiveNudgeGrowth` 钳制在 20K–50K)。对于低于 1M 上下文的模型,这会产生更小的阈值(例如 200K 时为 10K,400K 时为 20K),导致 nudge 触发过于频繁、过度压缩。
452
+
453
+ **修复**:在默认配置(`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` 覆盖。
454
+
455
+ 文件:`lib/config.ts`。测试:976 通过(无测试断言该默认值)。
456
+
457
+ **安装**:`opencode plugin opencode-acp@latest --global`
458
+
459
+ ### v1.14.14 — 正式版(v1.14.13 以来 2 个 PR)
450
460
 
451
461
  正式版,包含两个压缩子系统修复:批量调用的 summary 泄漏(#288)和批量压缩的全有或全无中断(#290)。发布到 `latest` npm tag。
452
462
 
package/dist/index.js CHANGED
@@ -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.15" : "dev";
8952
8953
  var Logger = class {
8953
8954
  logDir;
8954
8955
  enabled;