opencode-acp 1.14.6 → 1.14.7

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
@@ -509,6 +509,14 @@ For the complete list with root cause analysis, see the [bug tracker](https://gi
509
509
 
510
510
  ## Changelog
511
511
 
512
+ ### v1.14.7 — Deduplicate HOW_TO_COMPRESS_RULES (PR #228)
513
+
514
+ **Problem**: `HOW_TO_COMPRESS_RULES` (~1.2K tokens) was injected 3-4 times per nudge turn — once in the system prompt, 1-2 times in nudge templates (turn/iteration/context-limit), and again in the breakdown block. In non-maxLimit scenarios the suffix message alone contained the rules 2-3 times. This wasted 2.4-3.6K tokens per nudge turn. The duplication became visible in v1.14.6 which persists debug nudge text to chat UI.
515
+
516
+ **Fix**: Removed `HOW_TO_COMPRESS_RULES` from the breakdown block (`inject.ts:535-537`) and all 3 nudge templates (`turn-nudge.ts`, `iteration-nudge.ts`, `context-limit-nudge.ts`). Kept in `system.ts` (single source of truth — injected every turn per v1.8.2 invariant) and `quality-gate/rejection.ts` (retry guidance). Oracle-verified: no scenario loses compression guidance.
517
+
518
+ Files: `lib/messages/inject/inject.ts`, `lib/prompts/{turn,iteration,context-limit}-nudge.ts`. 917 tests pass.
519
+
512
520
  ### v1.14.6 — Debug Nudge Chat Visibility (PR #226)
513
521
 
514
522
  **Problem**: With `debug: true`, ACP nudge injections (compression suggestions, context breakdown, tier triggers) were only visible via a 5-second toast and log files. The nudge suffix message is ephemeral — injected by the message-transform hook but never persisted to the conversation DB — so users could not see what the model was actually seeing in the chat UI. This made debugging nudge behavior very difficult.
package/README.zh-CN.md CHANGED
@@ -463,6 +463,14 @@ ACP 在首次启动时自动将配置从 `dcp.jsonc` 迁移到 `acp.jsonc`,将
463
463
 
464
464
  ## 更新日志
465
465
 
466
+ ### v1.14.7 — 去重 HOW_TO_COMPRESS_RULES(PR #228)
467
+
468
+ **问题**:`HOW_TO_COMPRESS_RULES`(~1.2K tokens)每次 nudge 注入重复 3-4 次——系统提示词 1 次、nudge 模板 1-2 次、breakdown 块 1 次。非 maxLimit 场景下 suffix 消息单独就包含 2-3 份规则。每次 nudge 浪费 2.4-3.6K tokens。v1.14.6 让 debug 模式持久化 nudge 文本到聊天界面后,重复变得可见。
469
+
470
+ **修复**:从 breakdown 块(`inject.ts:535-537`)和全部 3 个 nudge 模板(`turn-nudge.ts`、`iteration-nudge.ts`、`context-limit-nudge.ts`)移除 `HOW_TO_COMPRESS_RULES`。保留在 `system.ts`(单一可信源——每轮注入,v1.8.2 不变量)和 `quality-gate/rejection.ts`(重试指导)。Oracle 验证:无任何场景丢失压缩指导。
471
+
472
+ 文件:`lib/messages/inject/inject.ts`、`lib/prompts/{turn,iteration,context-limit}-nudge.ts`。917 项测试通过。
473
+
466
474
  ### v1.14.6 — Debug Nudge 聊天界面可见性(PR #226)
467
475
 
468
476
  **问题**:开启 `debug: true` 时,ACP nudge 注入(压缩建议、上下文分类、分层触发器)只能通过 5 秒 toast 和日志文件查看。nudge 后缀消息是临时的——由消息变换 hook 注入但从未持久化到会话数据库——因此用户无法在聊天界面看到模型实际看到的内容。这使得调试 nudge 行为非常困难。
package/dist/index.js CHANGED
@@ -8331,11 +8331,6 @@ ${formatCompressibleRanges(recommendedRanges, contextRanges.protected)}`;
8331
8331
  }
8332
8332
  breakdown += `
8333
8333
  Use \`acp_status({scope:"uncompressed"})\` to re-fetch compressible ranges after compressing, or \`acp_status\` for compressed block details.`;
8334
- if (effectiveTipsVariant !== "maxLimit") {
8335
- breakdown += `
8336
-
8337
- ${HOW_TO_COMPRESS_RULES}`;
8338
- }
8339
8334
  appendToLastTextPart(suffixMessage, breakdown);
8340
8335
  }
8341
8336
  if (effectiveTipsVariant === "maxLimit") {
@@ -9543,7 +9538,7 @@ import { writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
9543
9538
  import { join as join3 } from "path";
9544
9539
  import { existsSync as existsSync3 } from "fs";
9545
9540
  import { homedir as homedir3 } from "os";
9546
- var LOG_VERSION = true ? "1.14.6" : "dev";
9541
+ var LOG_VERSION = true ? "1.14.7" : "dev";
9547
9542
  var Logger = class {
9548
9543
  logDir;
9549
9544
  enabled;
@@ -9968,8 +9963,6 @@ HOW TO CALL COMPRESS:
9968
9963
  - Do NOT use IDs from compressed block summaries \u2014 they are stale.
9969
9964
  - startId must appear BEFORE endId in the conversation.
9970
9965
 
9971
- ${HOW_TO_COMPRESS_RULES}
9972
-
9973
9966
  RANGE STRATEGY:
9974
9967
  - Prefer one large range over multiple small ones.
9975
9968
  - Compress OLDER resolved history first. Keep recent active work.
@@ -9987,8 +9980,6 @@ Context is getting full. If you've finished reading tool outputs or exploration
9987
9980
  }
9988
9981
 
9989
9982
  \u26A0\uFE0F ONLY use IDs from tags visible above. Do NOT invent or copy example IDs.
9990
-
9991
- ${HOW_TO_COMPRESS_RULES}
9992
9983
  </system-reminder>
9993
9984
  `;
9994
9985
 
@@ -10002,9 +9993,7 @@ You've been iterating for a while. If any earlier work is closed and unlikely to
10002
9993
  "content": [{ "startId": "<visible message ID>", "endId": "<visible message ID>", "summary": "..." }]
10003
9994
  }
10004
9995
 
10005
- \u26A0\uFE0F ONLY use IDs from <dcp-message-id> tags visible above. Do NOT invent or copy example IDs.
10006
-
10007
- ${HOW_TO_COMPRESS_RULES}
9996
+ \u26A0\uFE0F ONLY use IDs from tags visible above. Do NOT invent or copy example IDs.
10008
9997
  </system-reminder>
10009
9998
  `;
10010
9999