@lexwdex-org/opencode-dcp 3.5.0 → 5.0.0
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.en.md +60 -47
- package/README.md +45 -66
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +699 -1105
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +7 -32
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/dtc/digest.d.ts +16 -0
- package/dist/lib/dtc/digest.d.ts.map +1 -0
- package/dist/lib/dtc/engine.d.ts +64 -0
- package/dist/lib/dtc/engine.d.ts.map +1 -0
- package/dist/lib/dtc/state.d.ts +28 -0
- package/dist/lib/dtc/state.d.ts.map +1 -0
- package/dist/lib/dtc/types.d.ts +45 -0
- package/dist/lib/dtc/types.d.ts.map +1 -0
- package/dist/lib/hooks.d.ts +60 -31
- package/dist/lib/hooks.d.ts.map +1 -1
- package/dist/lib/prune-tool.d.ts +3 -2
- package/dist/lib/prune-tool.d.ts.map +1 -1
- package/dist/lib/session-events.d.ts +7 -0
- package/dist/lib/session-events.d.ts.map +1 -0
- package/dist/lib/text.d.ts +19 -0
- package/dist/lib/text.d.ts.map +1 -0
- package/package.json +2 -3
- package/dist/lib/auto-prune.d.ts +0 -20
- package/dist/lib/auto-prune.d.ts.map +0 -1
- package/dist/lib/prompts/compaction.d.ts +0 -4
- package/dist/lib/prompts/compaction.d.ts.map +0 -1
- package/dist/lib/prompts/store.d.ts +0 -17
- package/dist/lib/prompts/store.d.ts.map +0 -1
- package/dist/lib/prune-service.d.ts +0 -104
- package/dist/lib/prune-service.d.ts.map +0 -1
- package/dist/lib/session-boundary.d.ts +0 -90
- package/dist/lib/session-boundary.d.ts.map +0 -1
- package/dist/lib/session-model.d.ts +0 -8
- package/dist/lib/session-model.d.ts.map +0 -1
- package/dist/lib/summarize.d.ts +0 -38
- package/dist/lib/summarize.d.ts.map +0 -1
package/README.en.md
CHANGED
|
@@ -4,39 +4,41 @@
|
|
|
4
4
|
|
|
5
5
|
**English** | [中文](./README.md)
|
|
6
6
|
|
|
7
|
-
DCP
|
|
7
|
+
DCP manages OpenCode session context with **Dynamic Tiered Compression (DTC)**: folding happens inside every model request, before message serialization, and **never touches the session state machine** — no `session.summarize` calls, no compaction turns, no session writes. Compression is fully transparent to continuous autonomous work: an agent can run for days while the engine absorbs context pressure per request.
|
|
8
8
|
|
|
9
9
|
## How it works
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
The host fires `experimental.chat.messages.transform` before every model request. DCP folds the **request-scoped message copy** inside that hook (the host rebuilds the array from the database on every loop iteration, so all mutations are inherently request-scoped):
|
|
12
12
|
|
|
13
13
|
```text
|
|
14
|
-
|
|
14
|
+
┌──────────────┬──────────────┬──────────────┬────────────────┐
|
|
15
|
+
│ D distant │ M middle │ C current │ T protected │
|
|
16
|
+
│ heavy fold │ medium fold │ light fold │ last 4 turns │
|
|
17
|
+
│ digest lines │ first lines │ truncate big │ never touched │
|
|
18
|
+
└──────────────┴──────────────┴──────────────┴────────────────┘
|
|
19
|
+
◄── escalation deepens from the far end under budget pressure ──►
|
|
15
20
|
```
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
- **T tail zone**: the last `dtc.tailTurns` (default 4) conversation turns are **never folded**.
|
|
23
|
+
- **C current-task zone**: turns since the latest topic boundary (lexical drift detection); only oversized tool outputs are head+tail truncated, task details survive.
|
|
24
|
+
- **M middle zone**: long texts keep their first line; tool outputs get the host's native fold marker (rendered by the host as its own `[Old tool result content cleared]`); **tool arguments reduce to a target skeleton** (only filePath / command first line and friends — `oldString`/`newString`/`content` payloads are dropped); **failed attempts (error parts) fold to a short first line** — three edits on one file with two failures collapse to three recognizable call skeletons plus two single-line errors, with the final state owned by disk and the current-task zone; reasoning is emptied.
|
|
25
|
+
- **D distant zone**: whole turns collapse into one mechanical digest line (intent / actions / files touched / outcome / error count) and tool inputs are cleared — hard facts live on in the digest.
|
|
18
26
|
|
|
19
|
-
|
|
20
|
-
- `## 历史概要` (History digest) — early and middle history heavily compressed: one-line outcomes only, no process;
|
|
21
|
-
- Recent tasks — lightly compressed: completed tasks summarized in one line each; in-progress tasks keep full detail (goal, finished steps, file paths, key decisions, blockers, next actions). Details related to the current task are preserved first so work can continue from the checkpoint alone.
|
|
27
|
+
**Dynamic budget**: below `lowWatermarkRatio` of the context window (default 50%) **nothing is folded at all** — short sessions pay zero cost. Above it, folding escalates D→M→C from the far end until the estimate fits `targetRatio` (default 70%). The window size is learned per session from the `chat.params` hook; until it is known the engine fails open (no folding).
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
**Three structural laws** (the constructive exclusion of the old versions' "lost markers" failure):
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
1. Messages and parts are never added, removed, or reordered; IDs never change — tool-call/tool-result pairing cannot break;
|
|
32
|
+
2. Only string payloads are rewritten (text/output/reasoning), and tool-output folding uses the host's native `time.compacted` marker instead of a custom placeholder protocol;
|
|
33
|
+
3. Every mutation lives in the request-scoped copy only — session history in the database stays byte-identical.
|
|
26
34
|
|
|
27
|
-
|
|
28
|
-
- **The `dcp_prune` model tool** — DCP registers an LLM-invokable tool whose description carries heuristic guidance: call it immediately when the topic clearly changes, when a task wraps up, or when the context has grown noticeably.
|
|
29
|
-
- **Heuristic auto-prune** (`autoPrune`) — observes incoming user messages and triggers native compaction at turn boundaries (`session.idle`) on:
|
|
30
|
-
- topic drift: lexical similarity between the newest message and recent history drops sharply (CJK bigrams + Jaccard);
|
|
31
|
-
- message volume since the last prune crossing a threshold;
|
|
32
|
-
- resuming after a long idle gap.
|
|
33
|
-
Auto-triggers respect a cooldown; native `/compact` or host compaction also resets the counters.
|
|
34
|
-
- OpenCode's native `/compact` command uses the same path.
|
|
35
|
-
- `/dcp summarize` calls native `session.summarize()` manually.
|
|
35
|
+
## Trigger surfaces
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
- **Automatic**: there is nothing to trigger — every request decides its own fold depth from the budget. No signals, no boundaries, no queue.
|
|
38
|
+
- **The `dcp_prune` model tool**: returns instantly. Marks a topic boundary (the current-task zone restarts at the next turn) and raises this session's minimum fold level to M — old-task content folds from the next request onward. Never interrupts the running turn.
|
|
39
|
+
- **`/dcp fold`**: manual variant; raises the minimum fold level to the deepest tier.
|
|
40
|
+
- **`/dcp status`**: shows turns, token estimate, context window, and the manual fold level for the session.
|
|
41
|
+
- **The host's own compaction** (`/compact`, context-overflow fallback): **100% native behavior** — the host's anchored-summary prompt and its own previous-checkpoint rolling merge stay fully in charge; DCP replaces nothing. DCP contributes exactly two things: it raises the host's tail-protection defaults to 4 turns / 32000 tokens (`compaction.tail_turns` / `preserve_recent_tokens`; explicit user config always wins), and DTC skips the compaction input via a one-shot flag so the summarizer sees full-fidelity content.
|
|
40
42
|
|
|
41
43
|
## Install
|
|
42
44
|
|
|
@@ -46,7 +48,11 @@ opencode plugin @lexwdex-org/opencode-dcp@latest --global
|
|
|
46
48
|
|
|
47
49
|
## Configuration
|
|
48
50
|
|
|
49
|
-
DCP
|
|
51
|
+
DCP reads these layers in order; later layers override earlier ones:
|
|
52
|
+
|
|
53
|
+
1. `~/.config/opencode/dcp.jsonc` or `dcp.json`
|
|
54
|
+
2. `$OPENCODE_CONFIG_DIR/dcp.jsonc` or `dcp.json`
|
|
55
|
+
3. Project `.opencode/dcp.jsonc` or `dcp.json`
|
|
50
56
|
|
|
51
57
|
```jsonc
|
|
52
58
|
{
|
|
@@ -54,40 +60,47 @@ DCP loads global, custom-config-directory, then project configuration:
|
|
|
54
60
|
"enabled": true,
|
|
55
61
|
"autoUpdate": true,
|
|
56
62
|
"debug": false,
|
|
57
|
-
"
|
|
58
|
-
"commands": { "enabled": true },
|
|
59
|
-
"experimental": { "customPrompts": false },
|
|
60
|
-
"summarize": { "failureCooldownMs": 30000 },
|
|
61
|
-
"tool": { "enabled": true },
|
|
62
|
-
"autoPrune": {
|
|
63
|
+
"commands": {
|
|
63
64
|
"enabled": true,
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
},
|
|
66
|
+
"dtc": {
|
|
67
|
+
"enabled": true,
|
|
68
|
+
"tailTurns": 4,
|
|
69
|
+
"lowWatermarkRatio": 0.5,
|
|
70
|
+
"targetRatio": 0.7,
|
|
66
71
|
"driftThreshold": 0.18,
|
|
67
|
-
"
|
|
68
|
-
|
|
72
|
+
"toolOutputKeepChars": 4000,
|
|
73
|
+
},
|
|
74
|
+
"tool": {
|
|
75
|
+
"enabled": true,
|
|
69
76
|
},
|
|
70
77
|
}
|
|
71
78
|
```
|
|
72
79
|
|
|
73
|
-
| Key
|
|
74
|
-
|
|
|
75
|
-
| `
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
|
|
80
|
+
| Key | Description |
|
|
81
|
+
| ------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
82
|
+
| `dtc.enabled` | Master switch for dynamic tiered request-time compression |
|
|
83
|
+
| `dtc.tailTurns` | Turns at the end that are never folded (default 4) |
|
|
84
|
+
| `dtc.lowWatermarkRatio` | No folding below window × ratio (default 0.5) |
|
|
85
|
+
| `dtc.targetRatio` | Escalate folding until the estimate fits window × ratio (default 0.7) |
|
|
86
|
+
| `dtc.driftThreshold` | Jaccard similarity below which consecutive user messages start a new current-task zone (0–1, default 0.18) |
|
|
87
|
+
| `dtc.toolOutputKeepChars` | Head+tail characters kept for oversized current-zone tool outputs (default 4000) |
|
|
88
|
+
| `tool.enabled` | Register the model-invokable `dcp_prune` tool (instant boundary mark, never interrupts) |
|
|
89
|
+
|
|
90
|
+
## Migrating from 3.x / 4.0
|
|
83
91
|
|
|
84
|
-
|
|
85
|
-
`~/.config/opencode/dcp-prompts/defaults/compaction.md` to a project, custom-config, or global `dcp-prompts/overrides/compaction.md` path.
|
|
92
|
+
The 3.x `summarize` and `autoPrune` config blocks are gone (DCP no longer calls native summarize and has no heuristic triggers); since 4.1 `language` and `experimental.customPrompts` are gone as well — DCP no longer replaces the host's compaction prompt, so the `dcp-prompts` override machinery retired with it. Such keys produce a migration warning and are ignored. `autoPrune.driftThreshold` migrates automatically to `dtc.driftThreshold`. Older `compress`, `manualMode`, `strategies`, `turnProtection` keys remain removed.
|
|
86
93
|
|
|
87
|
-
|
|
94
|
+
Behavior change: compression no longer produces a visible "checkpoint turn" and needs no at-rest boundaries or continuation machinery — context folds automatically inside each request, invisible to the session and its state machine. Semantic checkpoints are fully handed back to the host's native compaction (manual `/compact` or the overflow fallback): native prompt, native rolling merge — DCP only contributes the tail-protection defaults and full-fidelity protection of the summarizer input.
|
|
88
95
|
|
|
89
|
-
|
|
96
|
+
## Development
|
|
90
97
|
|
|
91
|
-
|
|
98
|
+
```bash
|
|
99
|
+
npm test
|
|
100
|
+
npm run typecheck
|
|
101
|
+
npm run build
|
|
102
|
+
npm run format:check
|
|
103
|
+
npm run check:package
|
|
104
|
+
```
|
|
92
105
|
|
|
93
106
|
License: AGPL-3.0-or-later.
|
package/README.md
CHANGED
|
@@ -4,37 +4,41 @@
|
|
|
4
4
|
|
|
5
5
|
[**English**](./README.en.md) | **中文**
|
|
6
6
|
|
|
7
|
-
DCP
|
|
7
|
+
DCP 以**动态分级请求期压缩(DTC)**管理 OpenCode 会话上下文:折叠发生在每次模型请求的消息序列化之前,**永不触碰会话状态机**——不调用 `session.summarize`、不产生压缩回合、不写会话存储。压缩对连续自动工作完全透明:agent 可以不间断运行数日,上下文压力由引擎在请求期自动消化。
|
|
8
8
|
|
|
9
9
|
## 工作原理
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
宿主在每次模型请求前触发 `experimental.chat.messages.transform`,DCP 在钩子内对**请求期消息副本**做分级折叠(宿主每轮循环从数据库重建该数组,因此所有修改天然只作用于本次请求):
|
|
12
12
|
|
|
13
13
|
```text
|
|
14
|
-
|
|
14
|
+
┌────────────┬────────────┬────────────┬──────────────┐
|
|
15
|
+
│ D 远距离区 │ M 中距离区 │ C 当前任务 │ T 尾部保护区 │
|
|
16
|
+
│ 重度折叠 │ 中度折叠 │ 轻度折叠 │ 最后 4 轮 │
|
|
17
|
+
│ 结构化摘要 │ 首行+标记 │ 截长输出 │ 一个字节不动 │
|
|
18
|
+
└────────────┴────────────┴────────────┴──────────────┘
|
|
19
|
+
◄── 预算不足时从最远端逐级加深 ──►
|
|
15
20
|
```
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
- **T 尾部保护区**:最后 `dtc.tailTurns`(默认 4)轮对话**完全不折叠**。
|
|
23
|
+
- **C 当前任务区**:自最近话题边界(词面漂移检测)以来的轮次,只把超长 tool 输出做首尾截断,任务细节不丢。
|
|
24
|
+
- **M 中距离区**:长文本保留首行;tool 输出打宿主原生折叠标记(渲染为宿主自己的 `[Old tool result content cleared]`);**tool 参数规约为目标骨架**(仅留 filePath/command 首行等,`oldString`/`newString`/`content` 等载荷全部丢弃);**失败尝试(error part)折为短首行**——同一文件连改 3 次错 2 次,折叠后只剩 3 个可辨识调用骨架 + 2 条单行错误,最终状态以磁盘与当前任务区为准;推理内容清空。
|
|
25
|
+
- **D 远距离区**:整轮塌缩为一行机械摘要(意图 / 动作 / 涉及文件 / 结果 / 错误数),tool 参数一并清空——硬事实保留在摘要里。
|
|
18
26
|
|
|
19
|
-
|
|
20
|
-
- `## 历史概要` — 早期历史和中部历史高度压缩:每项主题只留一句结论,不含过程;
|
|
21
|
-
- 最近任务 — 轻度压缩:已完成任务一句话概括;进行中任务保留完整详情(目标、已完成步骤、文件路径、关键决策、阻塞、下一步)。与当前任务相关的近期细节优先保留,保证凭检查点即可直接继续工作。
|
|
27
|
+
**动态预算**:估算低于上下文窗口的 `lowWatermarkRatio`(默认 50%)时**完全不折叠**,短会话零开销;超出则按 D→M→C 从远到近逐级加深,直到估算落回 `targetRatio`(默认 70%)以内。窗口大小由 `chat.params` 钩子按会话自动学习,未知时 fail-open 不折叠。
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
**三条结构铁律**(老版本"丢失标记号"问题的构造性排除):
|
|
24
30
|
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- 话题变更(默认启用):新消息与近期消息的词面相似度骤降(CJK 二元组 + Jaccard);
|
|
29
|
-
- 消息量达到阈值(默认关闭,`autoPrune.signals.volume` 开启);
|
|
30
|
-
- 长时间中断后恢复(默认关闭,`autoPrune.signals.idleGap` 开启)。
|
|
31
|
-
自动触发带冷却期;OpenCode 原生 `/compact` 或宿主压缩也会重置计数。
|
|
32
|
-
- **OpenCode 原生 `/compact`**:手动触发同一条 compaction 路径。
|
|
33
|
-
- **`/dcp summarize`**:手动调用原生 `session.summarize()`。
|
|
31
|
+
1. 永不增删、重排消息或 part;永不改 ID——tool-call 与 tool-result 的配对不可能断裂;
|
|
32
|
+
2. 只重写字符串载荷(text/output/reasoning),折叠 tool 输出用宿主原生 `time.compacted` 标记,不自造占位符协议;
|
|
33
|
+
3. 一切修改仅存在于请求期副本,数据库中的会话历史逐字节不变。
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
## 触发面
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
- **自动**:无触发概念——每次请求按预算自动决定折叠深度,无需任何信号或边界。
|
|
38
|
+
- **模型调用 `dcp_prune` 工具**:瞬时返回。标记话题边界(当前任务区从下一轮重算)并把本会话折叠下限提到 M 级——旧任务内容从下一次请求起被折叠。绝不打断当前工作。
|
|
39
|
+
- **`/dcp fold`**:手动版本,直接把折叠下限提到最深档。
|
|
40
|
+
- **`/dcp status`**:查看当前会话的轮数、token 估算、窗口与降级档位。
|
|
41
|
+
- **宿主自身的 compaction**(`/compact`、上下文溢出兜底):**100% 原生行为**——原生 anchored-summary 提示词、原生上一份检查点滚动合并,DCP 不做任何替换。DCP 只做两件事:把宿主尾部保护默认提升到 4 轮 / 32000 tokens(`compaction.tail_turns` / `preserve_recent_tokens`,用户显式配置优先);压缩输入经过 transform 钩子时 DTC 一次性跳过,保证摘要器看到全保真内容。
|
|
38
42
|
|
|
39
43
|
## 安装
|
|
40
44
|
|
|
@@ -56,63 +60,38 @@ DCP 依次读取以下配置,后面的层覆盖前面的层:
|
|
|
56
60
|
"enabled": true,
|
|
57
61
|
"autoUpdate": true,
|
|
58
62
|
"debug": false,
|
|
59
|
-
"language": "zh",
|
|
60
63
|
"commands": {
|
|
61
64
|
"enabled": true,
|
|
62
65
|
},
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
66
|
+
"dtc": {
|
|
67
|
+
"enabled": true,
|
|
68
|
+
"tailTurns": 4,
|
|
69
|
+
"lowWatermarkRatio": 0.5,
|
|
70
|
+
"targetRatio": 0.7,
|
|
71
|
+
"driftThreshold": 0.18,
|
|
72
|
+
"toolOutputKeepChars": 4000,
|
|
68
73
|
},
|
|
69
74
|
"tool": {
|
|
70
75
|
"enabled": true,
|
|
71
76
|
},
|
|
72
|
-
"autoPrune": {
|
|
73
|
-
"enabled": true,
|
|
74
|
-
"signals": {
|
|
75
|
-
"topicDrift": true,
|
|
76
|
-
"volume": false,
|
|
77
|
-
"idleGap": false,
|
|
78
|
-
},
|
|
79
|
-
"minMessages": 8,
|
|
80
|
-
"volumeThreshold": 30,
|
|
81
|
-
"driftThreshold": 0.18,
|
|
82
|
-
"idleGapMs": 1800000,
|
|
83
|
-
"cooldownMs": 300000,
|
|
84
|
-
},
|
|
85
77
|
}
|
|
86
78
|
```
|
|
87
79
|
|
|
88
|
-
| 键
|
|
89
|
-
|
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
95
|
-
| `
|
|
96
|
-
| `
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
`~/.config/opencode/dcp-prompts/defaults/compaction.md` 复制到以下任一覆盖位置:
|
|
104
|
-
|
|
105
|
-
- 项目:`.opencode/dcp-prompts/overrides/compaction.md`
|
|
106
|
-
- 自定义配置目录:`$OPENCODE_CONFIG_DIR/dcp-prompts/overrides/compaction.md`
|
|
107
|
-
- 全局:`~/.config/opencode/dcp-prompts/overrides/compaction.md`
|
|
108
|
-
|
|
109
|
-
## 从 3.x 旧压缩管线迁移
|
|
110
|
-
|
|
111
|
-
旧配置 `compress`、`manualMode`、`strategies`、`turnProtection`、
|
|
112
|
-
`pruneNotification`、`protectedFilePatterns` 及旧命令保护字段均已删除。DCP 会显示迁移警告并忽略这些字段,不会静默继续旧行为。
|
|
113
|
-
|
|
114
|
-
以下功能已删除:`compress` / `compress_range` 模型工具、`/dcp compress`、
|
|
115
|
-
`/dcp decompress`、`/dcp recompress`、`/dcp sweep`、消息标记和插件压缩状态持久化。磁盘上已有的旧 DCP 会话状态文件不会被读取、改写或删除,可在确认不再回退旧版本后自行清理。
|
|
80
|
+
| 键 | 说明 |
|
|
81
|
+
| ------------------------- | ------------------------------------------------------------------------ |
|
|
82
|
+
| `dtc.enabled` | 动态分级请求期压缩总开关 |
|
|
83
|
+
| `dtc.tailTurns` | 尾部保护轮数:最后 N 轮完全不折叠(默认 4) |
|
|
84
|
+
| `dtc.lowWatermarkRatio` | 估算低于窗口 × 该比例时完全不折叠(默认 0.5) |
|
|
85
|
+
| `dtc.targetRatio` | 逐级加深折叠直到估算 ≤ 窗口 × 该比例(默认 0.7) |
|
|
86
|
+
| `dtc.driftThreshold` | Jaccard 相似度低于该值视为话题变更,开启新的当前任务区(0–1,默认 0.18) |
|
|
87
|
+
| `dtc.toolOutputKeepChars` | 当前任务区超长 tool 输出的首尾截断保留字符数(默认 4000) |
|
|
88
|
+
| `tool.enabled` | 注册模型可调用的 `dcp_prune` 工具(瞬时标记话题边界,绝不打断工作) |
|
|
89
|
+
|
|
90
|
+
## 从 3.x / 4.0 迁移
|
|
91
|
+
|
|
92
|
+
3.x 的 `summarize`、`autoPrune` 配置块已删除(DCP 不再调用原生 summarize,也不再有启发式触发器);4.1 起 `language` 与 `experimental.customPrompts` 也已删除——DCP 不再替换宿主压缩提示词,`dcp-prompts` 覆盖机制随之退役。这些键会显示迁移警告并被忽略。`autoPrune.driftThreshold` 自动迁移为 `dtc.driftThreshold`。更早的 `compress`、`manualMode`、`strategies`、`turnProtection` 等键维持删除状态。
|
|
93
|
+
|
|
94
|
+
行为变化:压缩不再产生可见的"检查点回合",也不再需要任何静息边界或续跑机制——上下文折叠在每次请求内自动完成,会话与状态机零感知。语义检查点完全交还宿主原生 compaction(手动 `/compact` 或溢出兜底):原生提示词、原生滚动合并,DCP 仅贡献尾部保护默认值与摘要输入的全保真保护。
|
|
116
95
|
|
|
117
96
|
## 开发验证
|
|
118
97
|
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAejD,QAAA,MAAM,MAAM,EAAE,MAiDK,CAAA;AAEnB,eAAe,MAAM,CAAA"}
|