opencode-acp 1.14.25-pr.352.85 → 1.14.26-pr.352.91
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 +45 -0
- package/README.zh-CN.md +45 -0
- package/dist/index.js +1489 -1378
- package/dist/index.js.map +1 -1
- package/dist/lib/compress/range.d.ts.map +1 -1
- package/dist/lib/config-validation.d.ts.map +1 -1
- package/dist/lib/config.d.ts +13 -8
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/messages/inject/inject.d.ts.map +1 -1
- package/dist/lib/messages/inject/utils.d.ts +23 -1
- package/dist/lib/messages/inject/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -339,11 +339,29 @@ Each level overrides the previous, so project settings take priority over global
|
|
|
339
339
|
// "anthropic/claude-sonnet-4.6": "80%"
|
|
340
340
|
// },
|
|
341
341
|
// Optional per-model override for minContextLimit.
|
|
342
|
+
// DEPRECATED — scheduled for removal alongside minContextLimit;
|
|
343
|
+
// use compress.providers (or minNudgeContextPercent for growth
|
|
344
|
+
// nudges) instead. Still honored until removed.
|
|
342
345
|
// If present, this wins over the global minContextLimit.
|
|
343
346
|
// "modelMinLimits": {
|
|
344
347
|
// "openai/gpt-5.3-codex": 50000,
|
|
345
348
|
// "anthropic/claude-sonnet-4.6": "25%"
|
|
346
349
|
// },
|
|
350
|
+
// Nested per-provider/per-model overrides for ANY compress field
|
|
351
|
+
// (23 fields: thresholds, nudge behavior, protection, ...).
|
|
352
|
+
// Resolution is per field: model > provider > global. Unknown
|
|
353
|
+
// provider/model IDs fall back to the global value.
|
|
354
|
+
// "providers": {
|
|
355
|
+
// "anthropic": {
|
|
356
|
+
// "nudgeGrowthTokens": 50000,
|
|
357
|
+
// "models": {
|
|
358
|
+
// "claude-sonnet-4.6": {
|
|
359
|
+
// "maxContextLimit": "70%",
|
|
360
|
+
// "minNudgeContextPercent": 10
|
|
361
|
+
// }
|
|
362
|
+
// }
|
|
363
|
+
// }
|
|
364
|
+
// },
|
|
347
365
|
// How often the context-limit nudge fires (1 = every fetch, 5 = every 5th)
|
|
348
366
|
"nudgeFrequency": 5,
|
|
349
367
|
// Start adding compression reminders after this many
|
|
@@ -403,6 +421,33 @@ Each level overrides the previous, so project settings take priority over global
|
|
|
403
421
|
|
|
404
422
|
</details>
|
|
405
423
|
|
|
424
|
+
### Per-Provider / Per-Model Overrides
|
|
425
|
+
|
|
426
|
+
Any `compress` field can be overridden per provider and per model via the nested `compress.providers` map:
|
|
427
|
+
|
|
428
|
+
```jsonc
|
|
429
|
+
{
|
|
430
|
+
"compress": {
|
|
431
|
+
"maxContextLimit": "80%",
|
|
432
|
+
"providers": {
|
|
433
|
+
"anthropic": {
|
|
434
|
+
"nudgeGrowthTokens": 20000,
|
|
435
|
+
"models": {
|
|
436
|
+
"claude-sonnet-4.6": { "maxContextLimit": "70%", "nudgeForce": "strong" }
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
"openai": { "nudgeGrowthTokens": 40000 }
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
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.
|
|
446
|
+
|
|
447
|
+
Not overridable here: `permission`, the deprecated `minContextLimit` / `modelMinLimits` family, and the flat `modelMaxLimits` / `modelMinLimits` maps themselves. Note: `modelMaxLimits` is **not** deprecated — it stays fully supported; a nested `maxContextLimit` simply outranks it.
|
|
448
|
+
|
|
449
|
+
See the [`compress.providers`](./CONFIGURATION.md#compressproviders) reference in CONFIGURATION.md for the full 23-field list and recipes.
|
|
450
|
+
|
|
406
451
|
### Prompt Overrides
|
|
407
452
|
|
|
408
453
|
ACP exposes six editable prompts:
|
package/README.zh-CN.md
CHANGED
|
@@ -292,11 +292,29 @@ ACP 使用自己的配置文件,按以下顺序搜索:
|
|
|
292
292
|
// "anthropic/claude-sonnet-4.6": "80%"
|
|
293
293
|
// },
|
|
294
294
|
// Optional per-model override for minContextLimit.
|
|
295
|
+
// 已废弃 —— 将随 minContextLimit 一并移除;
|
|
296
|
+
// 请改用 compress.providers(增长型提醒用
|
|
297
|
+
// minNudgeContextPercent)。移除前仍然生效。
|
|
295
298
|
// If present, this wins over the global minContextLimit.
|
|
296
299
|
// "modelMinLimits": {
|
|
297
300
|
// "openai/gpt-5.3-codex": 50000,
|
|
298
301
|
// "anthropic/claude-sonnet-4.6": "25%"
|
|
299
302
|
// },
|
|
303
|
+
// 嵌套的 provider/model 级覆盖:可覆盖任意 compress 字段
|
|
304
|
+
// (23 项:阈值、nudge 行为、保护策略等)。
|
|
305
|
+
// 逐字段解析优先级:model > provider > 全局。
|
|
306
|
+
// 未知的 provider/model ID 回退到全局值。
|
|
307
|
+
// "providers": {
|
|
308
|
+
// "anthropic": {
|
|
309
|
+
// "nudgeGrowthTokens": 50000,
|
|
310
|
+
// "models": {
|
|
311
|
+
// "claude-sonnet-4.6": {
|
|
312
|
+
// "maxContextLimit": "70%",
|
|
313
|
+
// "minNudgeContextPercent": 10
|
|
314
|
+
// }
|
|
315
|
+
// }
|
|
316
|
+
// }
|
|
317
|
+
// },
|
|
300
318
|
// How often the context-limit nudge fires (1 = every fetch, 5 = every 5th)
|
|
301
319
|
"nudgeFrequency": 5,
|
|
302
320
|
// Start adding compression reminders after this many
|
|
@@ -355,6 +373,33 @@ ACP 使用自己的配置文件,按以下顺序搜索:
|
|
|
355
373
|
|
|
356
374
|
</details>
|
|
357
375
|
|
|
376
|
+
### 按 Provider / 按模型覆盖
|
|
377
|
+
|
|
378
|
+
任意 `compress` 字段都可通过嵌套的 `compress.providers` 按 provider 和按模型覆盖:
|
|
379
|
+
|
|
380
|
+
```jsonc
|
|
381
|
+
{
|
|
382
|
+
"compress": {
|
|
383
|
+
"maxContextLimit": "80%",
|
|
384
|
+
"providers": {
|
|
385
|
+
"anthropic": {
|
|
386
|
+
"nudgeGrowthTokens": 20000,
|
|
387
|
+
"models": {
|
|
388
|
+
"claude-sonnet-4.6": { "maxContextLimit": "70%", "nudgeForce": "strong" }
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
"openai": { "nudgeGrowthTokens": 40000 }
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
解析为**逐字段**优先级:model > provider > 全局。未知的 provider/model ID 回退到全局值。嵌套的 `maxContextLimit` 同时优先于旧版扁平 `modelMaxLimits` 映射。多层配置(全局 → 配置目录 → 项目)按 provider/model 键深合并。
|
|
398
|
+
|
|
399
|
+
不可覆盖:`permission`、已废弃的 `minContextLimit` / `modelMinLimits` 系列、以及扁平 `modelMaxLimits` / `modelMinLimits` 映射自身。注意:`modelMaxLimits` **未废弃** —— 仍完全支持,只是优先级低于嵌套的 `maxContextLimit`。
|
|
400
|
+
|
|
401
|
+
完整 23 项字段清单与配方见 CONFIGURATION.zh-CN.md 的 [`compress.providers`](./CONFIGURATION.zh-CN.md#compressproviders) 参考节。
|
|
402
|
+
|
|
358
403
|
### Prompt 覆盖
|
|
359
404
|
|
|
360
405
|
ACP 暴露六个可编辑的 prompt:
|