@@ -13,7 +13,7 @@ Add to your OpenCode config:
1313``` jsonc
1414// opencode.jsonc
1515{
16- " plugin" : [" @tarquinen/opencode-dcp@latest" ]
16+ " plugin" : [" @tarquinen/opencode-dcp@latest" ],
1717}
1818```
1919
@@ -56,63 +56,63 @@ DCP uses its own config file:
5656
5757``` jsonc
5858{
59- // Enable or disable the plugin
60- " enabled" : true ,
61- // Enable debug logging to ~/.config/opencode/logs/dcp/
62- " debug" : false ,
63- // Notification display: "off", "minimal", or "detailed"
64- " pruneNotification" : " detailed" ,
65- // Protect from pruning for <turns> message turns
66- " turnProtection" : {
67- " enabled" : false ,
68- " turns" : 4
69- },
70- // LLM-driven context pruning tools
71- " tools" : {
72- // Shared settings for all prune tools
73- " settings" : {
74- // Nudge the LLM to use prune tools (every <nudgeFrequency> tool results)
75- " nudgeEnabled" : true ,
76- " nudgeFrequency" : 10 ,
77- // Additional tools to protect from pruning
78- " protectedTools" : []
59+ // Enable or disable the plugin
60+ " enabled" : true ,
61+ // Enable debug logging to ~/.config/opencode/logs/dcp/
62+ " debug" : false ,
63+ // Notification display: "off", "minimal", or "detailed"
64+ " pruneNotification" : " detailed" ,
65+ // Protect from pruning for <turns> message turns
66+ " turnProtection" : {
67+ " enabled" : false ,
68+ " turns" : 4 ,
7969 },
80- // Removes tool content from context without preservation (for completed tasks or noise)
81- " discard" : {
82- " enabled" : true
70+ // LLM-driven context pruning tools
71+ " tools" : {
72+ // Shared settings for all prune tools
73+ " settings" : {
74+ // Nudge the LLM to use prune tools (every <nudgeFrequency> tool results)
75+ " nudgeEnabled" : true ,
76+ " nudgeFrequency" : 10 ,
77+ // Additional tools to protect from pruning
78+ " protectedTools" : [],
79+ },
80+ // Removes tool content from context without preservation (for completed tasks or noise)
81+ " discard" : {
82+ " enabled" : true ,
83+ },
84+ // Distills key findings into preserved knowledge before removing raw content
85+ " extract" : {
86+ " enabled" : true ,
87+ // Show distillation content as an ignored message notification
88+ " showDistillation" : false ,
89+ },
8390 },
84- // Distills key findings into preserved knowledge before removing raw content
85- " extract" : {
86- " enabled" : true ,
87- // Show distillation content as an ignored message notification
88- " showDistillation" : false
89- }
90- },
91- // Automatic pruning strategies
92- " strategies" : {
93- // Remove duplicate tool calls (same tool with same arguments)
94- " deduplication" : {
95- " enabled" : true ,
96- // Additional tools to protect from pruning
97- " protectedTools" : []
91+ // Automatic pruning strategies
92+ " strategies" : {
93+ // Remove duplicate tool calls (same tool with same arguments)
94+ " deduplication" : {
95+ " enabled" : true ,
96+ // Additional tools to protect from pruning
97+ " protectedTools" : [],
98+ },
99+ // Prune write tool inputs when the file has been subsequently read
100+ " supersedeWrites" : {
101+ " enabled" : true ,
102+ },
103+ // (Legacy) Run an LLM to analyze what tool calls are no longer relevant on idle
104+ " onIdle" : {
105+ " enabled" : false ,
106+ // Additional tools to protect from pruning
107+ " protectedTools" : [],
108+ // Override model for analysis (format: "provider/model")
109+ // "model": "anthropic/claude-haiku-4-5",
110+ // Show toast notifications when model selection fails
111+ " showModelErrorToasts" : true ,
112+ // When true, fallback models are not permitted
113+ " strictModelSelection" : false ,
114+ },
98115 },
99- // Prune write tool inputs when the file has been subsequently read
100- " supersedeWrites" : {
101- " enabled" : true
102- },
103- // (Legacy) Run an LLM to analyze what tool calls are no longer relevant on idle
104- " onIdle" : {
105- " enabled" : false ,
106- // Additional tools to protect from pruning
107- " protectedTools" : [],
108- // Override model for analysis (format: "provider/model")
109- // "model": "anthropic/claude-haiku-4-5",
110- // Show toast notifications when model selection fails
111- " showModelErrorToasts" : true ,
112- // When true, fallback models are not permitted
113- " strictModelSelection" : false
114- }
115- }
116116}
117117```
118118
@@ -128,6 +128,7 @@ By default, these tools are always protected from pruning across all strategies:
128128` task ` , ` todowrite ` , ` todoread ` , ` discard ` , ` extract ` , ` batch `
129129
130130The ` protectedTools ` arrays in each section add to this default list:
131+
131132- ` tools.settings.protectedTools ` — Protects tools from the ` discard ` and ` extract ` tools
132133- ` strategies.deduplication.protectedTools ` — Protects tools from deduplication
133134- ` strategies.onIdle.protectedTools ` — Protects tools from on-idle analysis
0 commit comments