opencode-acp 1.11.2 → 1.12.0
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 +38 -0
- package/README.zh-CN.md +38 -0
- package/dist/index.js +368 -91
- package/dist/index.js.map +1 -1
- package/dist/lib/compress/keep-markers.d.ts +11 -0
- package/dist/lib/compress/keep-markers.d.ts.map +1 -0
- package/dist/lib/compress/range.d.ts.map +1 -1
- package/dist/lib/compress/status.d.ts.map +1 -1
- package/dist/lib/config-validation.d.ts.map +1 -1
- package/dist/lib/config.d.ts +1 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/hooks.d.ts.map +1 -1
- package/dist/lib/messages/inject/inject.d.ts +1 -1
- package/dist/lib/messages/inject/inject.d.ts.map +1 -1
- package/dist/lib/messages/inject/utils.d.ts +10 -0
- package/dist/lib/messages/inject/utils.d.ts.map +1 -1
- package/dist/lib/prompts/compress-range.d.ts +1 -1
- package/dist/lib/prompts/compress-range.d.ts.map +1 -1
- package/dist/lib/prompts/compression-rules.d.ts +7 -1
- package/dist/lib/prompts/compression-rules.d.ts.map +1 -1
- package/dist/lib/prompts/context-limit-nudge.d.ts +1 -1
- package/dist/lib/prompts/context-limit-nudge.d.ts.map +1 -1
- package/dist/lib/prompts/iteration-nudge.d.ts +1 -1
- package/dist/lib/prompts/iteration-nudge.d.ts.map +1 -1
- package/dist/lib/prompts/system.d.ts +1 -1
- package/dist/lib/prompts/system.d.ts.map +1 -1
- package/dist/lib/prompts/turn-nudge.d.ts +1 -1
- package/dist/lib/prompts/turn-nudge.d.ts.map +1 -1
- package/dist/lib/state/persistence.d.ts +2 -0
- package/dist/lib/state/persistence.d.ts.map +1 -1
- package/dist/lib/state/state.d.ts.map +1 -1
- package/dist/lib/state/types.d.ts +10 -0
- package/dist/lib/state/types.d.ts.map +1 -1
- package/dist/lib/state/utils.d.ts.map +1 -1
- package/dist/lib/ui/notification.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -422,6 +422,44 @@ For the complete list with root cause analysis, see the [bug tracker](https://gi
|
|
|
422
422
|
|
|
423
423
|
## Changelog
|
|
424
424
|
|
|
425
|
+
### v1.12.0 — Baseline Leak Fix + KEEP/REF Markers + Compressible Ranges (PR #115)
|
|
426
|
+
|
|
427
|
+
Comprehensive fix for issue #23 (context memory leak). 7 commits, 22 files, 851 insertions, 327 deletions.
|
|
428
|
+
|
|
429
|
+
**Baseline Leak Fix**: After compress, the model continues working in the same turn, inflating context from ~78K to ~150K. Each transform re-established the nudge baseline to the inflated value, leaking 72K of headroom. Fix: `compressBaselineSet` lock flag sets baseline only on the first post-compress transform; turn-wide compress scan (`messages.slice(currentTurnStart).some(...)`) replaces last-message-only check.
|
|
430
|
+
|
|
431
|
+
**KEEP/REF Markers**: Models over-summarize because they can't precisely retype large content. `[[KEEP:mNNNNN]]` auto-expands original message content inline (truncated to 2000 chars). `[[REF:mNNNNN|desc]]` creates compact links. Resolution runs after summary finalization, before wrapping.
|
|
432
|
+
|
|
433
|
+
**Compressible Ranges**: Replaces size-based "Largest code/text messages" listing with need-based ranges grouped by conversation turn. Shows ALL ranges with gap detection (no ranges spanning compressed holes). The nudge now says "compress ALL listed ranges" instead of recommending specific large items.
|
|
434
|
+
|
|
435
|
+
**Compression Philosophy (5 bullets)**: Need-based guidance replacing size-based recommendations — compress by need not by percentage, work from summaries not raw outputs, curate with KEEP/REF for critical content.
|
|
436
|
+
|
|
437
|
+
**Other fixes**: Removed `toolOutputReminder` (bypassed adaptive threshold, caused over-compression); `acp_status` default = compressible ranges view; debug nudge (`config.debug` → terminal output); `baselineCorrected` persistence fix; Bug 14 cap (detailed notification: 10K chars); system prompt 5 fixes; multi-block notification empty summary fix. Oracle reviewed.
|
|
438
|
+
|
|
439
|
+
Files: `lib/messages/inject/inject.ts`, `lib/compress/keep-markers.ts`, `lib/messages/inject/utils.ts`, `lib/compress/status.ts`, `lib/prompts/compression-rules.ts`, `lib/prompts/system.ts`, `lib/state/`, `lib/ui/notification.ts`, `lib/hooks.ts`. Tests: 630 pass.
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
### v1.11.4 — Baseline Persistence Fix + Unified Release Workflow (PR #112, #113)
|
|
444
|
+
|
|
445
|
+
**Bug fix (PR #112)**: After compress sets `lastPerMessageNudgeTokens = undefined`, the next transform re-establishes the baseline in memory but never persists it to disk (save condition was false). After restart, nudges break again. Fix: added `baselineReEstablished` flag to save condition. Also fixed async save race condition in `writePersistedSessionState` (file path resolved after `await`).
|
|
446
|
+
|
|
447
|
+
**CI fix (PR #113)**: Merged `auto-tag.yml` + `release.yml` into single workflow. GitHub Actions `GITHUB_TOKEN` cannot trigger chained workflows — the tag pushed by `auto-tag.yml` didn't fire `release.yml`.
|
|
448
|
+
|
|
449
|
+
Files: `lib/messages/inject/inject.ts`, `lib/state/persistence.ts`. Tests: `tests/inject.test.ts` (+94 lines, 2 new E2E tests).
|
|
450
|
+
|
|
451
|
+
---
|
|
452
|
+
|
|
453
|
+
### v1.11.3 — Auto-Tag on Release Branch Merge (PR #111)
|
|
454
|
+
|
|
455
|
+
**Problem**: After merging a release PR, the version tag (`v{VERSION}`) still had to be pushed manually — easy to forget.
|
|
456
|
+
|
|
457
|
+
**Fix**: Added `auto-tag.yml` workflow. When a `YYYY-MM-DD_release-v*` branch is merged to master, CI automatically reads `package.json` version, creates the tag, and pushes it. The tag push then triggers `release.yml` for auto-publish. Normal (non-release) branches that accidentally change the version are ignored.
|
|
458
|
+
|
|
459
|
+
Files: `.github/workflows/auto-tag.yml`. AGENTS.md Section 5.4 updated.
|
|
460
|
+
|
|
461
|
+
---
|
|
462
|
+
|
|
425
463
|
### v1.11.2 — CI Enforcement & Auto-Publish (PR #104)
|
|
426
464
|
|
|
427
465
|
Added GitHub Actions CI to automate AGENTS.md compliance enforcement:
|
package/README.zh-CN.md
CHANGED
|
@@ -395,6 +395,44 @@ ACP 在首次启动时自动将配置从 `dcp.jsonc` 迁移到 `acp.jsonc`,将
|
|
|
395
395
|
|
|
396
396
|
## 更新日志
|
|
397
397
|
|
|
398
|
+
### v1.12.0 — 基线泄露修复 + KEEP/REF 标记 + 可压缩范围(PR #115)
|
|
399
|
+
|
|
400
|
+
Issue #23(上下文内存泄露)的综合修复。7 个 commit,22 个文件,851 行新增,327 行删除。
|
|
401
|
+
|
|
402
|
+
**基线泄露修复**:压缩后模型在同一轮继续工作,上下文从 ~78K 膨胀到 ~150K。每次 transform 重新建立 nudge 基线到膨胀后的值,泄露 72K 余量。修复:`compressBaselineSet` 锁标志只在首次 post-compress transform 设基线;全轮扫描(`messages.slice(currentTurnStart).some(...)`)替换仅检查最后一条 assistant 消息。
|
|
403
|
+
|
|
404
|
+
**KEEP/REF 标记**:模型过度摘要因为无法精确重打大段内容。`[[KEEP:mNNNNN]]` 自动展开原始消息内容(截断到 2000 字符)。`[[REF:mNNNNN|描述]]` 生成紧凑链接。解析在摘要定稿后、包装前执行。
|
|
405
|
+
|
|
406
|
+
**可压缩范围**:用按需分组范围替换基于大小的"最大代码/文本消息"列表。显示所有范围,带间隔检测(不会跨越压缩洞)。nudge 现在说"压缩所有列出的范围"而不是推荐特定大项。
|
|
407
|
+
|
|
408
|
+
**压缩哲学(5 条)**:基于需要的指导替换基于大小的推荐——按需压缩而非按百分比,基于摘要工作而非原始输出,用 KEEP/REF 策展关键内容。
|
|
409
|
+
|
|
410
|
+
**其他修复**:移除 `toolOutputReminder`(绕过自适应阈值,导致过度压缩);`acp_status` 默认 = 可压缩范围视图;调试 nudge(`config.debug` → 终端输出);`baselineCorrected` 持久化修复;Bug 14 截断(detailed 通知:10K 字符);系统提示 5 处修复;多块通知空摘要修复。经 Oracle 审查。
|
|
411
|
+
|
|
412
|
+
文件:`lib/messages/inject/inject.ts`、`lib/compress/keep-markers.ts`、`lib/messages/inject/utils.ts`、`lib/compress/status.ts`、`lib/prompts/compression-rules.ts`、`lib/prompts/system.ts`、`lib/state/`、`lib/ui/notification.ts`、`lib/hooks.ts`。测试:630 通过。
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
### v1.11.4 — 基线持久化修复 + 统一发布工作流(PR #112, #113)
|
|
417
|
+
|
|
418
|
+
**Bug 修复(PR #112)**:压缩后 baseline 设为 `undefined`,下一轮重建为真实值但**不写盘**(save 条件为 false)。重启后 nudge 失效。修复:新增 `baselineReEstablished` flag 加入 save 条件。同时修复 `writePersistedSessionState` 异步竞态(文件路径在 `await` 之后解析)。
|
|
419
|
+
|
|
420
|
+
**CI 修复(PR #113)**:合并 `auto-tag.yml` + `release.yml` 为单一工作流。GitHub Actions `GITHUB_TOKEN` 无法链式触发 workflow——auto-tag push 的 tag 不会触发 release.yml。
|
|
421
|
+
|
|
422
|
+
文件:`lib/messages/inject/inject.ts`、`lib/state/persistence.ts`。测试:`tests/inject.test.ts`(+94 行,2 个新 E2E 测试)。
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
### v1.11.3 — 发布分支合并自动打 Tag(PR #111)
|
|
427
|
+
|
|
428
|
+
**问题**:合并发布 PR 后,仍需手动 push 版本 tag(`v{VERSION}`)——容易遗忘。
|
|
429
|
+
|
|
430
|
+
**修复**:新增 `auto-tag.yml` 工作流。当 `YYYY-MM-DD_release-v*` 分支合并到 master 时,CI 自动读取 `package.json` 版本号,创建并 push tag。Tag push 随即触发 `release.yml` 自动发布。普通分支误改版本号不会触发。
|
|
431
|
+
|
|
432
|
+
文件:`.github/workflows/auto-tag.yml`。AGENTS.md Section 5.4 已更新。
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
398
436
|
### v1.11.2 — CI 自动校验 & 自动发布(PR #104)
|
|
399
437
|
|
|
400
438
|
新增 GitHub Actions CI 自动执行 AGENTS.md 规范:
|