From 2e93281788f00eded9d23e054d15f37648f4cad8 Mon Sep 17 00:00:00 2001 From: ework-agent Date: Thu, 3 Sep 2026 22:55:15 +0800 Subject: [PATCH 1/3] =?UTF-8?q?release:=20v1.14.27=20=E2=80=94=20self-disa?= =?UTF-8?q?ble=20also=20triggers=20in=20manual=20proxy=20mode=20(/bili/=20?= =?UTF-8?q?baseURL=20detection)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 16 ++++++++++ CHANGELOG.zh-CN.md | 16 ++++++++++ devlog/2026-09-03_release-v1.14.27/REQ.md | 30 +++++++++++++++++++ devlog/2026-09-03_release-v1.14.27/WORKLOG.md | 28 +++++++++++++++++ package.json | 2 +- 5 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 devlog/2026-09-03_release-v1.14.27/REQ.md create mode 100644 devlog/2026-09-03_release-v1.14.27/WORKLOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md index acf5f89a..d9973952 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +### v1.14.27 — Self-disable also triggers in manual proxy mode (/bili/ baseURL detection) + +**Problem**: The v1.14.25 self-disable only covered the `bili opencode` launcher (env var `BILLION_CONTEXT_PROXY`). Users pointing a provider `baseURL` at the billion-context proxy directly (manual mode) still got duplicate context-management stacks — ACP's tools and `/acp` command alongside the proxy's wire-level compression (issue #337). + +**Fix** (#338): +- The plugin's config hook now scans every configured provider for the documented `/bili/` path prefix in `options.baseURL` and, when found, self-disables: all five ACP tools (`compress`, `decompress`, `search_context`, `acp_status`, `acp_context_recap`) are permission-denied (removed from the LLM tool list), the `/acp` command and `primary_tools` registration are skipped, and every transform/event hook becomes a no-op. One log line explains why. +- Detection is per-provider and case-sensitive; lookalikes (`/bilix/`, `bilibili.com`, bare `/bili`) do not match. The disable flag un-latches on config reload when no provider routes through the proxy again. +- Zero behavior change when no provider routes through the proxy — standalone installs are unaffected. 15 new tests (unit + integration through the real plugin factory); full suite 1044/1044. + +**Docs** (#352): +- Soft-deprecated `minContextLimit` and `modelMinLimits` (JSDoc + JSON schema + README/CONFIGURATION, EN/zh). Both remain fully honored until removed; growth nudges (`minNudgeContextPercent` + `nudgeGrowthTokens`) are the maintained nudge mechanism. `modelMaxLimits` is **not** deprecated. + +**Bookkeeping** (#358): promoted the npm `stable` dist-tag to 1.14.26. + +**Install**: `opencode plugin opencode-acp@latest --global` + ### v1.14.26 — Per-provider/per-model compress overrides; growth nudges respect the minNudgeContextPercent floor **Problem**: T1 growth nudges fired well below any configured lower context limit — the `minNudgeContextPercent` floor was plumbed into the trigger policy but ignored, so growth nudges fired at any context size (issue #342: ten `trigger=growth` nudges at 67K–152K against a 150K minimum on a 400K model). diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 5b5670ca..2157869d 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -1,5 +1,21 @@ # 更新日志 +### v1.14.27 — 手动代理模式(/bili/ baseURL)也触发自动禁用 + +**问题**:v1.14.25 的自动禁用只覆盖 `bili opencode` 启动器(环境变量 `BILLION_CONTEXT_PROXY`)。用户直接把某个 provider 的 `baseURL` 指向 billion-context 代理(手动模式)时,仍会同时加载两套上下文管理 —— ACP 的工具和 `/acp` 命令与代理在 wire 层的压缩并存(issue #337)。 + +**修复**(#338): +- 插件的 config hook 现在扫描所有已配置 provider 的 `options.baseURL`,发现文档约定的 `/bili/` 路径前缀即自动禁用:五个 ACP 工具(`compress`、`decompress`、`search_context`、`acp_status`、`acp_context_recap`)全部 permission-deny(从 LLM 工具列表中移除)、跳过 `/acp` 命令和 `primary_tools` 注册、所有 transform/event hook 变为 no-op,并打印一行日志说明原因。 +- 检测按 provider 进行且区分大小写;相似前缀(`/bilix/`、`bilibili.com`、裸 `/bili`)不会误判。禁用标志在配置重新加载、不再有 provider 走代理后自动解除。 +- 没有任何 provider 走代理时行为零变化 —— 独立安装完全不受影响。新增 15 个测试(单元测试 + 通过真实插件工厂的集成测试);全量测试 1044/1044 通过。 + +**文档**(#352): +- 软废弃 `minContextLimit` 与 `modelMinLimits`(JSDoc + JSON schema + README/CONFIGURATION,中英)。两者在移除前仍完全生效;维护中的提醒机制是增长型提醒(`minNudgeContextPercent` + `nudgeGrowthTokens`)。`modelMaxLimits` **未**废弃。 + +**记账**(#358):将 npm `stable` dist-tag 提升到 1.14.26。 + +**安装**:`opencode plugin opencode-acp@latest --global` + ### v1.14.26 — 任意 compress 字段支持按 provider/按模型覆盖;增长型提醒遵循 minNudgeContextPercent 下限 **问题**:T1 增长型提醒在远低于配置的上下文下限时就触发 —— `minNudgeContextPercent` 下限被传入触发策略但被忽略,导致增长型提醒在任何上下文大小下都会触发(issue #342:400K 模型上配置了 150K 下限,却在 67K–152K 触发了 10 次 `trigger=growth` 提醒)。 diff --git a/devlog/2026-09-03_release-v1.14.27/REQ.md b/devlog/2026-09-03_release-v1.14.27/REQ.md new file mode 100644 index 00000000..2f49f049 --- /dev/null +++ b/devlog/2026-09-03_release-v1.14.27/REQ.md @@ -0,0 +1,30 @@ +# REQ — Release v1.14.27 + +- Task ID: `2026-09-03_release-v1.14.27` +- Home Repo: `opencode-acp` +- Created: 2026-09-03 +- Status: In Progress +- Priority: P1 +- Owner: ework-daemon +- References: issue ranxianglei/opencode-acp#337, PR ranxianglei/opencode-acp#338, PR ranxianglei/opencode-acp#352, PR ranxianglei/opencode-acp#358 + +## 1. Background & Problem Statement + +- Release the issue #337 fix (self-disable in manual proxy mode — detect the documented `/bili/` prefix in provider `baseURL`, not only via the launcher env var `BILLION_CONTEXT_PROXY`) so it reaches npm `latest`. The fix is merged on master (PR #338, merge commit `6a8e531`) but unreleased — npm `latest` is still 1.14.26. +- The fix branch was a feature branch, not a release branch, so `release.yml` did not tag/publish on merge. +- Maintainer directed after merging PR #338: “合并了 发一个新版本” (merged — cut a new version). +- **Scope**: everything merged since v1.14.26 (tag `c62ba56`): PR #338 (code), PR #352 (soft-deprecate `minContextLimit` / `modelMinLimits` — docs/schema/JSDoc only, no behavior change; `modelMaxLimits` NOT deprecated), PR #358 (promote npm `stable` dist-tag to 1.14.26, bookkeeping). + +## 2. Release Contents + +- PR #338 (issue #337): config-hook scan of every provider's `options.baseURL` for `/bili/`; on match — permission-deny all five ACP tools (`compress`, `decompress`, `search_context`, `acp_status`, `acp_context_recap`), skip `/acp` command + `primary_tools`, no-op all five hooks, one explanatory log line. Case-sensitive, per-provider; lookalikes (`/bilix/`, `bilibili.com`, bare `/bili`) rejected. Disable flag un-latches on config reload without proxy routing. New pure module `lib/bili-proxy.ts`; 15 new tests (unit + integration through the real plugin factory); full suite 1044/1044. +- PR #352: soft deprecation of `minContextLimit` + `modelMinLimits` (JSDoc `@deprecated` in `lib/config.ts`, `[DEPRECATED …]` descriptions in `dcp.schema.json`, README EN/zh + CONFIGURATION zh doc updates). Both remain fully honored until removed; growth nudges (`minNudgeContextPercent` + `nudgeGrowthTokens`) are the maintained mechanism. No behavior change. +- PR #358: promote npm `stable` dist-tag from 1.14.25 to 1.14.26 (bookkeeping). + +## 3. Acceptance Criteria + +- [ ] `package.json` version bumped to 1.14.27 +- [ ] `CHANGELOG.md` + `CHANGELOG.zh-CN.md` updated with `### v1.14.27` +- [ ] `./scripts/ci/check-pr.sh 2026-09-03_release-v1.14.27 refs/remotes/origin/master` passes +- [ ] typecheck + full test suite pass +- [ ] PR created; human merges → CI auto-publishes to npm `latest` + GitHub Release diff --git a/devlog/2026-09-03_release-v1.14.27/WORKLOG.md b/devlog/2026-09-03_release-v1.14.27/WORKLOG.md new file mode 100644 index 00000000..e2a44527 --- /dev/null +++ b/devlog/2026-09-03_release-v1.14.27/WORKLOG.md @@ -0,0 +1,28 @@ +# WORKLOG — Release v1.14.27 + +- Task ID: `2026-09-03_release-v1.14.27` +- Home Repo: `opencode-acp` +- Status: In Progress +- Updated: 2026-09-03 + +## 1. Summary + +Release for PR #338 (issue #337 fix: self-disable also triggers in manual proxy mode — detect `/bili/` in provider `baseURL`) **+ PR #352** (soft-deprecate `minContextLimit` / `modelMinLimits`, docs/schema/JSDoc only) **+ PR #358** (promote npm `stable` dist-tag to 1.14.26, bookkeeping). Version 1.14.26 → 1.14.27. + +## 2. Change Log + +| Commit | Description | +|--------|-------------| +| (pending) | release: v1.14.27 — self-disable also triggers in manual proxy mode (/bili/ baseURL detection) | +| (pending) | docs: record release commit hash and check-pr result in WORKLOG | + +## 3. Verification + +- Release branch @ master `6a8e531` (incl. PR #338): typecheck clean (`tsc --noEmit`, no errors). +- Full test suite on the release branch: **1077 tests pass, 0 fail** (~110 s). +- `./scripts/ci/check-pr.sh 2026-09-03_release-v1.14.27 refs/remotes/origin/master`: see follow-up docs commit for final result (initial run failed only because the changelog/devlog changes were uncommitted at check time). +- Note: sandbox `node_modules` and `/tmp` are wiped between agent turns — `npm ci` re-run before verification. + +## 4. Rollback Plan + +Close the PR before merge — no tag/publish happens until a human merges. If already published, `npm dist-tag add opencode-acp@1.14.26 latest` restores the previous version as `latest`. diff --git a/package.json b/package.json index 8d855b5d..94941d1d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "opencode-acp", - "version": "1.14.26", + "version": "1.14.27", "type": "module", "description": "Active Context Pruning — model-driven context management for OpenCode (hardened fork of DCP with 35 bug fixes)", "main": "./dist/index.js", From b26d352b6993c9dccbd9f23cf4abca08bbd51e4e Mon Sep 17 00:00:00 2001 From: ework-agent Date: Thu, 3 Sep 2026 22:56:48 +0800 Subject: [PATCH 2/3] docs: record release commit hash and check-pr result in WORKLOG --- devlog/2026-09-03_release-v1.14.27/WORKLOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devlog/2026-09-03_release-v1.14.27/WORKLOG.md b/devlog/2026-09-03_release-v1.14.27/WORKLOG.md index e2a44527..1fd9b83c 100644 --- a/devlog/2026-09-03_release-v1.14.27/WORKLOG.md +++ b/devlog/2026-09-03_release-v1.14.27/WORKLOG.md @@ -13,14 +13,14 @@ Release for PR #338 (issue #337 fix: self-disable also triggers in manual proxy | Commit | Description | |--------|-------------| -| (pending) | release: v1.14.27 — self-disable also triggers in manual proxy mode (/bili/ baseURL detection) | -| (pending) | docs: record release commit hash and check-pr result in WORKLOG | +| `2e93281` | release: v1.14.27 — self-disable also triggers in manual proxy mode (/bili/ baseURL detection) | +| (this commit) | docs: record release commit hash and check-pr result in WORKLOG | ## 3. Verification - Release branch @ master `6a8e531` (incl. PR #338): typecheck clean (`tsc --noEmit`, no errors). - Full test suite on the release branch: **1077 tests pass, 0 fail** (~110 s). -- `./scripts/ci/check-pr.sh 2026-09-03_release-v1.14.27 refs/remotes/origin/master`: see follow-up docs commit for final result (initial run failed only because the changelog/devlog changes were uncommitted at check time). +- `./scripts/ci/check-pr.sh 2026-09-03_release-v1.14.27 refs/remotes/origin/master`: **all checks passed** (branch name, devlog REQ+WORKLOG, changelog version string in both files). - Note: sandbox `node_modules` and `/tmp` are wiped between agent turns — `npm ci` re-run before verification. ## 4. Rollback Plan From 56c3b9b5fbcbdffed9513429e0f4f196d7d48b9d Mon Sep 17 00:00:00 2001 From: ework-agent Date: Thu, 3 Sep 2026 22:58:34 +0800 Subject: [PATCH 3/3] docs: mark PR #361 as open in WORKLOG --- devlog/2026-09-03_release-v1.14.27/WORKLOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devlog/2026-09-03_release-v1.14.27/WORKLOG.md b/devlog/2026-09-03_release-v1.14.27/WORKLOG.md index 1fd9b83c..3211e425 100644 --- a/devlog/2026-09-03_release-v1.14.27/WORKLOG.md +++ b/devlog/2026-09-03_release-v1.14.27/WORKLOG.md @@ -2,7 +2,7 @@ - Task ID: `2026-09-03_release-v1.14.27` - Home Repo: `opencode-acp` -- Status: In Progress +- Status: PR Open (awaiting human merge) - Updated: 2026-09-03 ## 1. Summary @@ -16,6 +16,8 @@ Release for PR #338 (issue #337 fix: self-disable also triggers in manual proxy | `2e93281` | release: v1.14.27 — self-disable also triggers in manual proxy mode (/bili/ baseURL detection) | | (this commit) | docs: record release commit hash and check-pr result in WORKLOG | +PR: https://github.com/ranxianglei/opencode-acp/pull/361 (open, awaiting human merge). + ## 3. Verification - Release branch @ master `6a8e531` (incl. PR #338): typecheck clean (`tsc --noEmit`, no errors).