opencode-acp 1.14.14-dev.1 → 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,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.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
+
505
+ ### v1.14.14 — Stable Release (2 PRs since v1.14.13)
506
+
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.
508
+
509
+ **PRs included**:
510
+ - **#288** (via #289) — `hideConsumedCompressCalls` keyed its keep-set on `compressCallId`, which is 1:N under batched compress (one tool call, multiple `content[]` entries share one callId). When a T2 distillation consumed only some siblings, a surviving sibling rescued the whole tool part, permanently leaking the consumed summaries — unreclaimable because compress is a default protected tool. Fix: key visibility per-block (on `startId::endId`) instead of per-callId; for kept batches with mixed liveness, rewrite the surviving tool part's `state.input.content` to drop consumed entries' summaries. All-consumed batches still fully removed. Files: `lib/compress/hide-consumed.ts`. Tests: +3 in `tests/hide-consumed.test.ts` (core regression verified to FAIL pre-fix).
511
+ - **#290** (via #291) — Batch `compress` aborted entirely when any single `content[]` entry contained only already-compressed messages (`Compression range N contains only already-compressed messages`), leaving valid entries unexecuted; the error also omitted which entry/IDs/blocks conflicted, forcing trial-and-error retries. Fix: (A) partial-failure batches — new `identifyPhantomPlans` drops phantom entries and compresses the rest, returning a concise skip notice; (C) detailed diagnostics on the all-phantom throw (entry index + consumed IDs + owning block); (B) a clamp warning when `clampMessageRef` silently shifts a boundary. Extracted `partitionPhantomPlans` + `buildPhantomSkipNotice` pure helpers for testable batch decision logic. `checkPhantomBlock` keeps its exact legacy contract. Files: `lib/compress/{pipeline,range,search,range-utils}.ts`. Tests: +19. Dual-agent reviewed (Oracle + General, both APPROVE).
512
+
513
+ **Install**: `opencode plugin opencode-acp@latest --global`
514
+
495
515
  ### v1.14.14-dev.1 — Dev Prerelease (2 PRs since v1.14.13)
496
516
 
497
517
  Dev prerelease covering two compress-subsystem fixes: the batched-call summary leak (#288) and the batch-compress all-or-nothing abort (#290). Published to the `dev` npm tag for early testing.
package/README.zh-CN.md CHANGED
@@ -446,6 +446,26 @@ ACP 是 DCP 的直接替代品。迁移步骤:
446
446
 
447
447
  ## 更新日志
448
448
 
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)
460
+
461
+ 正式版,包含两个压缩子系统修复:批量调用的 summary 泄漏(#288)和批量压缩的全有或全无中断(#290)。发布到 `latest` npm tag。
462
+
463
+ **包含的 PR**:
464
+ - **#288**(经 #289)— `hideConsumedCompressCalls` 的 keep-set 以 `compressCallId` 为键,在批量压缩下是 1:N 关系(一次工具调用,多个 `content[]` 条目共享一个 callId)。当 T2 蒸馏只消费了部分兄弟块时,存活的兄弟块会救下整个工具 part,永久泄漏已消费的 summary——且因 compress 是默认受保护工具而无法回收。修复:改为按块(`startId::endId`)标记可见性;对混合存活状态的保留批次,重写存活工具 part 的 `state.input.content` 以丢弃已消费条目的 summary。全部消费的批次仍整体移除。文件:`lib/compress/hide-consumed.ts`。测试:`tests/hide-consumed.test.ts` +3(核心回归测试已验证修复前会失败)。
465
+ - **#290**(经 #291)— 批量 `compress` 在任一 `content[]` 条目只含已压缩消息时整体中断(`Compression range N contains only already-compressed messages`),导致有效条目未执行;错误也未说明哪个条目/ID/块冲突,迫使反复试错重试。修复:(A) 部分失败批次——新增 `identifyPhantomPlans` 丢弃 phantom 条目并压缩其余,返回简洁的跳过提示;(C) 全 phantom 抛错时附详细诊断(条目序号 + 已消费 ID + 所属块);(B) `clampMessageRef` 静默平移边界时发出警告。抽出 `partitionPhantomPlans` + `buildPhantomSkipNotice` 纯函数使批量决策逻辑可测试。`checkPhantomBlock` 保持原有契约不变。文件:`lib/compress/{pipeline,range,search,range-utils}.ts`。测试:+19。双 agent review(Oracle + General,均 APPROVE)。
466
+
467
+ **安装**:`opencode plugin opencode-acp@latest --global`
468
+
449
469
  ### v1.14.14-dev.1 — Dev 预发布版(v1.14.13 以来 2 个 PR)
450
470
 
451
471
  Dev 预发布版,包含两个压缩子系统修复:批量调用的 summary 泄漏(#288)和批量压缩的全有或全无中断(#290)。发布到 `dev` npm tag 供早期测试。
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.1" : "dev";
8952
+ var LOG_VERSION = true ? "1.14.15" : "dev";
8952
8953
  var Logger = class {
8953
8954
  logDir;
8954
8955
  enabled;