@royalcat/opencode-dcp-rc 4.0.2 → 4.0.3

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
@@ -84,8 +84,8 @@ opencode plugin add /path/to/opencode-dcp-rc
84
84
  {
85
85
  "compress": {
86
86
  "permission": "allow",
87
- "minContextLimit": 50000,
88
- "maxContextLimit": 100000,
87
+ "minContextLimit": "20%",
88
+ "maxContextLimit": "80%",
89
89
  "scrubModelOutput": true,
90
90
  "scrubMessageIds": true,
91
91
  },
@@ -93,6 +93,10 @@ opencode plugin add /path/to/opencode-dcp-rc
93
93
  }
94
94
  ```
95
95
 
96
+ Both context limits accept a token count or a percentage of the model's context
97
+ window; the defaults are `"20%"` and `"80%"`, and `compress.modelMinLimits` /
98
+ `compress.modelMaxLimits` override them per `providerID/modelID`.
99
+
96
100
  The rest of the upstream configuration (strategies, protection lists, manual
97
101
  mode, subagents) still applies, except `compress.mode` and `autoUpdate`, which
98
102
  the fork no longer uses. Compress prompt text can be overridden through
@@ -121,10 +125,6 @@ kill-switches only — for example to debug the raw model output.
121
125
 
122
126
  # Upstream README
123
127
 
124
- > **Fork note:** The upstream documentation below is kept for attribution and
125
- > history. This fork does not ship its `range`/`message` modes, V1 support, or
126
- > auto-update behavior; see the fork section above for what this package does.
127
-
128
128
  # Dynamic Context Pruning Plugin
129
129
 
130
130
  [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/dansmolsky)
@@ -201,16 +201,13 @@ Each level overrides the previous, so project settings take priority over global
201
201
 
202
202
  ```jsonc
203
203
  {
204
- "$schema": "https://raw.githubusercontent.com/Opencode-DCP/opencode-dynamic-context-pruning/master/dcp.schema.json",
204
+ "$schema": "https://raw.githubusercontent.com/royalcat/opencode-dcp-rc/master/dcp.schema.json",
205
205
  // Enable or disable the plugin
206
206
  "enabled": true,
207
- // Automatically update npm-installed DCP when a newer npm latest is available.
208
- // Version-locked plugin specs are not updated.
209
- "autoUpdate": true,
210
207
  // Enable debug logging to ~/.config/opencode/logs/dcp/
211
208
  "debug": false,
212
209
  // Notification display: "off", "minimal", or "detailed"
213
- "pruneNotification": "detailed",
210
+ "pruneNotification": "off",
214
211
  // Notification type: "chat" (in-conversation) or "toast" (system toast)
215
212
  "pruneNotificationType": "chat",
216
213
  // Slash commands configuration
@@ -245,9 +242,6 @@ Each level overrides the previous, so project settings take priority over global
245
242
  "protectedFilePatterns": [],
246
243
  // Unified context compression tool and behavior settings
247
244
  "compress": {
248
- // Compression mode: "range" (compress spans into block summaries)
249
- // or experimental "message" (compress individual raw messages)
250
- "mode": "range",
251
245
  // Permission mode: "allow" (no prompt), "ask" (prompt), "deny" (tool not registered)
252
246
  "permission": "allow",
253
247
  // Show compression content in a chat notification
@@ -257,11 +251,11 @@ Each level overrides the previous, so project settings take priority over global
257
251
  // Soft upper threshold: above this, DCP keeps injecting strong
258
252
  // compression nudges (based on nudgeFrequency), so compression is
259
253
  // much more likely. Accepts: number or "X%" of model context window.
260
- "maxContextLimit": 100000,
254
+ "maxContextLimit": "80%",
261
255
  // Soft lower threshold for reminder nudges: below this, turn/iteration
262
256
  // reminders are off (compression less likely). At/above this, reminders
263
257
  // are on. Accepts: number or "X%" of model context window.
264
- "minContextLimit": 50000,
258
+ "minContextLimit": "20%",
265
259
  // Optional per-model override for maxContextLimit by providerID/modelID.
266
260
  // If present, this wins over the global maxContextLimit.
267
261
  // Accepts: number or "X%".
package/dist/index.js CHANGED
@@ -1340,8 +1340,8 @@ var defaultConfig = {
1340
1340
  permission: "allow",
1341
1341
  showCompression: false,
1342
1342
  summaryBuffer: true,
1343
- maxContextLimit: 1e5,
1344
- minContextLimit: 5e4,
1343
+ maxContextLimit: "80%",
1344
+ minContextLimit: "20%",
1345
1345
  nudgeFrequency: 5,
1346
1346
  iterationNudgeThreshold: 15,
1347
1347
  nudgeForce: "soft",