Repository navigation
v2.0.0-alpha.10
Pre-release
Pre-release
·
2 commits
to master
since this release
[Version: v2.0.0-alpha.10] - 2026-11-20
Full Changelog: v2.0.0-alpha.9...v2.0.0-alpha.10
发布范围
- ACP 2.0 Alpha 性能维护更新,减少长历史的重复 token 编码及工具事件中的完整历史读取。
功能优化
- 为精确 token 计数增加最多 65,536 条的进程内 LRU 缓存,仅保留内容指纹和计数,不保留原文。内容改变后重新计算,失败后的近似估算不进入缓存。
- 优先从工具生命周期事件获取工具名,正常事件序列无需为此读取完整历史;缺失事件或缓存淘汰时保留历史查询及重试,压缩计时行为保持不变。
- 扩展现有请求级诊断,记录计数路径、缓存命中、未命中、淘汰、错误及耗时;离线汇总兼容旧记录,不记录输入文本或指纹。
兼容性与升级前置条件
- 要求 OpenCode >=2.1.4 且 <3。
- 不增加配置项或依赖,不改变持久化格式、message refs 或 compression block IDs;从 alpha.9 升级无需数据迁移。
- 保留既有文本归一化、特殊 token、失败回退及历史 provider usage 处理方式。
已知问题
- 缓存命中仍需扫描文本生成指纹,首次或淘汰后的内容仍需编码;并发会话总工作集超过容量时仍可能反复淘汰,不保证冷路径加速。
- 本版不消除其他历史加载或全部长历史等待,也不包含 #51 中的图片/base64 问题及解压预算修复。
[Version: v2.0.0-alpha.10] - 2026-11-20
Full Changelog: v2.0.0-alpha.9...v2.0.0-alpha.10
Release scope
- An ACP 2.0 Alpha performance maintenance update reducing repeated token encoding for long histories and full-history reads during tool events.
Improvements
- Add a process-local LRU cache with up to 65,536 exact token counts, retaining only content fingerprints and counts, not original text. Changed content is recounted, and approximate fallback results are not cached.
- Resolve tool names from lifecycle events, avoiding full-history reads for this purpose during normal event sequences. Preserve history lookup and retries for missing events or evicted entries, without changing compression timing.
- Extend existing request-local diagnostics with counting paths, cache hits, misses, evictions, errors, and elapsed time. Offline summaries remain compatible with older records; input text and fingerprints are not logged.
Compatibility and upgrade prerequisites
- Requires OpenCode >=2.1.4 and <3.
- No new configuration options or dependencies, and no changes to persisted formats, message refs, or compression block IDs. Upgrading from alpha.9 requires no data migration.
- Preserve existing text normalization, special-token handling, failure fallback, and historical provider usage handling.
Known issues
- Cache hits still scan text to compute fingerprints; first-seen or evicted content still requires encoding. Concurrent sessions whose combined working set exceeds capacity may still cause repeated eviction. Cold-path speedups are not guaranteed.
- This release does not eliminate other history loading or all long-history delays, and does not include the image/base64 or decompression-budget fixes discussed in #51.