opencode-acp 1.11.1 → 1.11.2
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 +22 -0
- package/README.zh-CN.md +22 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -422,6 +422,28 @@ For the complete list with root cause analysis, see the [bug tracker](https://gi
|
|
|
422
422
|
|
|
423
423
|
## Changelog
|
|
424
424
|
|
|
425
|
+
### v1.11.2 — CI Enforcement & Auto-Publish (PR #104)
|
|
426
|
+
|
|
427
|
+
Added GitHub Actions CI to automate AGENTS.md compliance enforcement:
|
|
428
|
+
|
|
429
|
+
- **PR validation** (`pr-checks.yml`): every PR to master is checked for branch name convention (`YYYY-MM-DD_short-title`), devlog existence (`devlog/{branch}/REQ.md` + `WORKLOG.md`), and changelog updates on version bumps.
|
|
430
|
+
- **Auto-publish** (`release.yml`): pushing a `v*` tag triggers `npm ci` → `npm run check:package` → `npm test` → `npm publish` → GitHub Release, fully automated.
|
|
431
|
+
- Script: `scripts/ci/check-pr.sh` — reusable PR validation logic.
|
|
432
|
+
|
|
433
|
+
Requires `NPM_TOKEN` secret in GitHub repo settings.
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
### v1.11.1 — Compress Baseline Fix (PR #99)
|
|
438
|
+
|
|
439
|
+
**Problem**: When the model called `compress`, both `lastPerMessageNudgeTokens` and `lastToolOutputNudgeTokens` were set to `currentTokens` — the token count from the compress-calling assistant message, which reflects **pre-compression** context. After compressing 100K→50K, the baseline was stuck at 100K, so `growth = 50K - 100K = -50K` and nudges never fired again.
|
|
440
|
+
|
|
441
|
+
**Fix**: Both baselines are now set to `undefined` on compress detection. The next message-transform run re-establishes the baseline from the real post-compression API token count, without triggering a nudge (`computeShouldNudge` returns `shouldNudge: false` when baseline is `undefined`).
|
|
442
|
+
|
|
443
|
+
Files: `lib/messages/inject/inject.ts` (line 98-99). Tests: `tests/inject.test.ts` — 3 updated + 2 new (621 total, 0 fail).
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
425
447
|
### v1.11.0 — Tool-Result Recap Injection, Context Breakdown & Fork Rebuild
|
|
426
448
|
|
|
427
449
|
This release fixes two critical compression-injection bugs (#20 echo, #78 drift), adds a visible context breakdown to `acp_status`, and introduces a fork-rebuild mechanism.
|
package/README.zh-CN.md
CHANGED
|
@@ -395,6 +395,28 @@ ACP 在首次启动时自动将配置从 `dcp.jsonc` 迁移到 `acp.jsonc`,将
|
|
|
395
395
|
|
|
396
396
|
## 更新日志
|
|
397
397
|
|
|
398
|
+
### v1.11.2 — CI 自动校验 & 自动发布(PR #104)
|
|
399
|
+
|
|
400
|
+
新增 GitHub Actions CI 自动执行 AGENTS.md 规范:
|
|
401
|
+
|
|
402
|
+
- **PR 校验**(`pr-checks.yml`):每个到 master 的 PR 自动检查分支名规范(`YYYY-MM-DD_short-title`)、devlog 是否存在(`devlog/{分支}/REQ.md` + `WORKLOG.md`)、版本号变更时 changelog 是否更新。
|
|
403
|
+
- **自动发布**(`release.yml`):push `v*` tag 后自动执行 `npm ci` → `npm run check:package` → `npm test` → `npm publish` → GitHub Release,全自动。
|
|
404
|
+
- 脚本:`scripts/ci/check-pr.sh` — 可复用的 PR 校验逻辑。
|
|
405
|
+
|
|
406
|
+
需要在 GitHub Secrets 中配置 `NPM_TOKEN`。
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
### v1.11.1 — 压缩基线修复(PR #99)
|
|
411
|
+
|
|
412
|
+
**问题**:当模型调用 `compress` 时,`lastPerMessageNudgeTokens` 和 `lastToolOutputNudgeTokens` 都被设为 `currentTokens` —— 这是调用 compress 的 assistant 消息的 token 计数,反映的是**压缩前**的上下文。压缩 100K→50K 后,基线卡在 100K,导致 `growth = 50K - 100K = -50K`,nudge 永远不再触发。
|
|
413
|
+
|
|
414
|
+
**修复**:压缩时将两个基线都设为 `undefined`。下一次 message-transform 运行时从真实的压缩后 API token 计数重建基线,不会误触发 nudge(`computeShouldNudge` 在基线为 `undefined` 时返回 `shouldNudge: false`)。
|
|
415
|
+
|
|
416
|
+
文件:`lib/messages/inject/inject.ts`(第 98-99 行)。测试:`tests/inject.test.ts` — 3 个更新 + 2 个新增(共 621 个测试,0 失败)。
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
398
420
|
### v1.11.0 — 工具结果注入、上下文分解 & Fork 重建
|
|
399
421
|
|
|
400
422
|
本次发布修复了两个关键压缩注入 bug(#20 复读、#78 漂移),为 `acp_status` 添加了可见上下文分解,并引入了 fork 重建机制。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "opencode-acp",
|
|
4
|
-
"version": "1.11.
|
|
4
|
+
"version": "1.11.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Active Context Pruning — model-driven context management for OpenCode (hardened fork of DCP with 35 bug fixes)",
|
|
7
7
|
"main": "./dist/index.js",
|