-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdcp.jsonc
More file actions
93 lines (74 loc) · 4.03 KB
/
Copy pathdcp.jsonc
File metadata and controls
93 lines (74 loc) · 4.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
"$schema": "https://raw.githubusercontent.com/Opencode-DCP/opencode-dynamic-context-pruning/master/dcp.schema.json",
// ═══ 基础开关 ═════════════════════════════════════════════════════
// 启用 DCP。
"enabled": true,
// 仅排障时开启。平时关闭,避免噪声和额外 token。
"debug": false,
// 压缩后只给最小提示;提示写进对话,方便后续上下文追踪。
"pruneNotification": "minimal",
"pruneNotificationType": "chat",
// ═══ 自动清理策略 ═════════════════════════════════════════════════
"strategies": {
// 去重重复工具输出和重复上下文。保护列表留空,避免绕过全局保护规则。
"deduplication": {
"enabled": true,
"protectedTools": [],
},
// 清理过期错误输出。保留最近 4 轮,避免刚出现的失败线索被删掉。
"purgeErrors": {
"enabled": true,
"turns": 4,
"protectedTools": [],
},
},
// ═══ 压缩控制 ═════════════════════════════════════════════════════
"compress": {
// range 模式整段替换,稳定且兼容当前 OpenCode 压缩流程。
"mode": "range",
// 自动允许压缩。若要每次确认,改为 "ask"。
"permission": "allow",
// DCP 自身已有 minimal 通知;这里关闭详细压缩块展示,降低干扰。
"showCompression": false,
// 布尔值由 schema 约束;用于防止压缩摘要继续触发级联压缩。
"summaryBuffer": true,
// 使用百分比阈值,避免切换模型后固定 token 阈值失真。
"maxContextLimit": "80%",
"minContextLimit": "50%",
// 低频提醒,减少提示注入对 prompt cache 的破坏。
"nudgeFrequency": 15,
"iterationNudgeThreshold": 15,
"nudgeForce": "soft",
// 保护用户原文,避免压缩破坏边界语义。
"protectUserMessages": true,
// 这些工具输出由环境托管或承担任务状态;压缩时保留原始结果。
"protectedTools": ["task", "skill", "todowrite", "todoread"],
},
// ═══ 最近轮次保护 ═════════════════════════════════════════════════
"turnProtection": {
"enabled": true,
"turns": 8,
},
// ═══ 命令与托管工具保护 ═══════════════════════════════════════════
"commands": {
"enabled": true,
"protectedTools": ["task", "todowrite", "todoread"],
},
// ═══ 手动模式 ═════════════════════════════════════════════════════
"manualMode": {
// false 表示自动策略照常运行;需要完全手动压缩时改为 true。
"enabled": false,
// schema 当前要求布尔值。true 表示手动模式下仍允许自动策略辅助清理。
"automaticStrategies": true,
},
// ═══ 实验功能 ═════════════════════════════════════════════════════
"experimental": {
// 允许 DCP 识别子代理上下文,减少任务结果被误剪。
"allowSubAgents": true,
// 未维护自定义 prompt override,先关闭,避免隐式创建/覆盖提示词文件。
"customPrompts": false,
},
// ═══ 文件路径保护 ═════════════════════════════════════════════════
// 需要永久保护的文件操作参数可在这里加 glob,例如 ["**/AGENTS.md"]。
"protectedFilePatterns": [],
}