opencode-acp 1.14.25-pr.351.88 → 1.14.25-pr.351.89

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
@@ -344,6 +344,21 @@ Each level overrides the previous, so project settings take priority over global
344
344
  // "openai/gpt-5.3-codex": 50000,
345
345
  // "anthropic/claude-sonnet-4.6": "25%"
346
346
  // },
347
+ // Nested per-provider/per-model overrides for ANY compress field
348
+ // (23 fields: thresholds, nudge behavior, protection, ...).
349
+ // Resolution is per field: model > provider > global. Unknown
350
+ // provider/model IDs fall back to the global value.
351
+ // "providers": {
352
+ // "anthropic": {
353
+ // "nudgeGrowthTokens": 50000,
354
+ // "models": {
355
+ // "claude-sonnet-4.6": {
356
+ // "maxContextLimit": "70%",
357
+ // "minNudgeContextPercent": 10
358
+ // }
359
+ // }
360
+ // }
361
+ // },
347
362
  // How often the context-limit nudge fires (1 = every fetch, 5 = every 5th)
348
363
  "nudgeFrequency": 5,
349
364
  // Start adding compression reminders after this many
@@ -403,6 +418,33 @@ Each level overrides the previous, so project settings take priority over global
403
418
 
404
419
  </details>
405
420
 
421
+ ### Per-Provider / Per-Model Overrides
422
+
423
+ Any `compress` field can be overridden per provider and per model via the nested `compress.providers` map:
424
+
425
+ ```jsonc
426
+ {
427
+ "compress": {
428
+ "maxContextLimit": "80%",
429
+ "providers": {
430
+ "anthropic": {
431
+ "nudgeGrowthTokens": 20000,
432
+ "models": {
433
+ "claude-sonnet-4.6": { "maxContextLimit": "70%", "nudgeForce": "strong" }
434
+ }
435
+ },
436
+ "openai": { "nudgeGrowthTokens": 40000 }
437
+ }
438
+ }
439
+ }
440
+ ```
441
+
442
+ Resolution is **per field**: model > provider > global. Unknown provider/model IDs fall back to the global value. A nested `maxContextLimit` also wins over the legacy flat `modelMaxLimits` map. Overrides deep-merge across the three config layers (global → config dir → project) per provider/model key.
443
+
444
+ Not overridable here: `permission`, the deprecated `minContextLimit` family, and the flat `model*Limits` maps themselves.
445
+
446
+ See the [`compress.providers`](./CONFIGURATION.md#compressproviders) reference in CONFIGURATION.md for the full 23-field list and recipes.
447
+
406
448
  ### Prompt Overrides
407
449
 
408
450
  ACP exposes six editable prompts:
package/README.zh-CN.md CHANGED
@@ -297,6 +297,21 @@ ACP 使用自己的配置文件,按以下顺序搜索:
297
297
  // "openai/gpt-5.3-codex": 50000,
298
298
  // "anthropic/claude-sonnet-4.6": "25%"
299
299
  // },
300
+ // 嵌套的 provider/model 级覆盖:可覆盖任意 compress 字段
301
+ // (23 项:阈值、nudge 行为、保护策略等)。
302
+ // 逐字段解析优先级:model > provider > 全局。
303
+ // 未知的 provider/model ID 回退到全局值。
304
+ // "providers": {
305
+ // "anthropic": {
306
+ // "nudgeGrowthTokens": 50000,
307
+ // "models": {
308
+ // "claude-sonnet-4.6": {
309
+ // "maxContextLimit": "70%",
310
+ // "minNudgeContextPercent": 10
311
+ // }
312
+ // }
313
+ // }
314
+ // },
300
315
  // How often the context-limit nudge fires (1 = every fetch, 5 = every 5th)
301
316
  "nudgeFrequency": 5,
302
317
  // Start adding compression reminders after this many
@@ -355,6 +370,33 @@ ACP 使用自己的配置文件,按以下顺序搜索:
355
370
 
356
371
  </details>
357
372
 
373
+ ### 按 Provider / 按模型覆盖
374
+
375
+ 任意 `compress` 字段都可通过嵌套的 `compress.providers` 按 provider 和按模型覆盖:
376
+
377
+ ```jsonc
378
+ {
379
+ "compress": {
380
+ "maxContextLimit": "80%",
381
+ "providers": {
382
+ "anthropic": {
383
+ "nudgeGrowthTokens": 20000,
384
+ "models": {
385
+ "claude-sonnet-4.6": { "maxContextLimit": "70%", "nudgeForce": "strong" }
386
+ }
387
+ },
388
+ "openai": { "nudgeGrowthTokens": 40000 }
389
+ }
390
+ }
391
+ }
392
+ ```
393
+
394
+ 解析为**逐字段**优先级:model > provider > 全局。未知的 provider/model ID 回退到全局值。嵌套的 `maxContextLimit` 同时优先于旧版扁平 `modelMaxLimits` 映射。多层配置(全局 → 配置目录 → 项目)按 provider/model 键深合并。
395
+
396
+ 不可覆盖:`permission`、已废弃的 `minContextLimit` 系列,以及扁平 `model*Limits` 映射自身。
397
+
398
+ 完整 23 项字段清单与配方见 CONFIGURATION.zh-CN.md 的 [`compress.providers`](./CONFIGURATION.zh-CN.md#compressproviders) 参考节。
399
+
358
400
  ### Prompt 覆盖
359
401
 
360
402
  ACP 暴露六个可编辑的 prompt:
package/dist/index.js CHANGED
@@ -9378,7 +9378,7 @@ import { writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
9378
9378
  import { join as join3 } from "path";
9379
9379
  import { existsSync as existsSync3 } from "fs";
9380
9380
  import { homedir as homedir3 } from "os";
9381
- var LOG_VERSION = true ? "1.14.25-pr.351.88" : "dev";
9381
+ var LOG_VERSION = true ? "1.14.25-pr.351.89" : "dev";
9382
9382
  var LEVEL_RANK = {
9383
9383
  debug: 10,
9384
9384
  info: 20,
@@ -11819,7 +11819,7 @@ var server = (async (ctx) => {
11819
11819
  }
11820
11820
  const logger = new Logger(config.debug, config.debug ? "debug" : config.logLevel);
11821
11821
  logger.info("ACP plugin initialized", {
11822
- version: true ? "1.14.25-pr.351.88" : "dev",
11822
+ version: true ? "1.14.25-pr.351.89" : "dev",
11823
11823
  workspace: ctx.directory,
11824
11824
  logLevel: logger.level,
11825
11825
  debug: config.debug,
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.14.25-pr.351.88",
4
+ "version": "1.14.25-pr.351.89",
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",