Skip to content

Commit 958453b

Browse files
committed
Merge refactor/one-tool-to-rule-them-all into dev (resolve conflicts favoring incoming)
2 parents d83ee03 + 7adc2c0 commit 958453b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+5067
-3236
lines changed

.gitignore

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ Thumbs.db
2828
# OpenCode
2929
.opencode/
3030

31-
# Generated prompt files (from scripts/generate-prompts.ts)
31+
# Python cache
32+
__pycache__/
33+
*.py[cod]
34+
*$py.class
35+
36+
# Legacy generated prompt files
3237
lib/prompts/**/*.generated.ts
3338

3439
# Tests
@@ -41,9 +46,3 @@ docs/
4146
SCHEMA_NOTES.md
4247

4348
repomix-output.xml
44-
45-
# Python
46-
__pycache__/
47-
*.pyc
48-
*.pyo
49-
*.pyd

.repomixignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ dist/
66
repomix-output.xml
77
bun.lock
88
package-lock.jsonc
9-
LICENCE
9+
LICENSE
10+
scripts/
11+
tests/
12+
README.md

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This arrangement ensures the project remains Open Source while providing a path
1919

2020
1. Fork the repository.
2121
2. Create a feature branch.
22-
3. Implement your changes and add tests if applicable.
22+
3. Implement your changes and add tests if applicable (please NO AI SLOP).
2323
4. Ensure all tests pass and the code is formatted.
2424
5. Submit a Pull Request.
2525

README.md

Lines changed: 170 additions & 140 deletions
Large diffs are not rendered by default.

assets/images/3.0 release.png

2.49 MB
Loading

dcp.schema.json

Lines changed: 119 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
"type": "string",
2525
"enum": ["off", "minimal", "detailed"],
2626
"default": "detailed",
27-
"description": "Level of notification shown when pruning occurs"
27+
"description": "Level of notification shown when context management occurs"
2828
},
2929
"pruneNotificationType": {
3030
"type": "string",
3131
"enum": ["chat", "toast"],
3232
"default": "chat",
33-
"description": "Where to display prune notifications (chat message or toast notification)"
33+
"description": "Where to display notifications (chat message or toast notification)"
3434
},
3535
"commands": {
3636
"type": "object",
@@ -48,7 +48,7 @@
4848
"type": "string"
4949
},
5050
"default": [],
51-
"description": "Additional tool names to protect from pruning via commands (e.g., /dcp sweep)"
51+
"description": "Additional tool names or wildcard patterns to protect from pruning via commands (e.g., /dcp sweep). Supports glob wildcards: * matches any characters, ? matches a single character (e.g., \"mcp_*\", \"my_tool_?\")"
5252
}
5353
},
5454
"default": {
@@ -94,6 +94,27 @@
9494
}
9595
}
9696
},
97+
"experimental": {
98+
"type": "object",
99+
"description": "Experimental settings that may change in future releases",
100+
"additionalProperties": false,
101+
"properties": {
102+
"allowSubAgents": {
103+
"type": "boolean",
104+
"default": false,
105+
"description": "Allow DCP processing in subagent sessions"
106+
},
107+
"customPrompts": {
108+
"type": "boolean",
109+
"default": false,
110+
"description": "Enable user-editable prompt overrides under dcp-prompts directories"
111+
}
112+
},
113+
"default": {
114+
"allowSubAgents": false,
115+
"customPrompts": false
116+
}
117+
},
97118
"protectedFilePatterns": {
98119
"type": "array",
99120
"items": {
@@ -102,112 +123,113 @@
102123
"default": [],
103124
"description": "Glob patterns for files that should be protected from pruning (e.g., '**/*.config.ts')"
104125
},
105-
"tools": {
126+
"compress": {
106127
"type": "object",
107-
"description": "Configuration for pruning tools",
128+
"description": "Configuration for the unified compress tool",
108129
"additionalProperties": false,
109130
"properties": {
110-
"settings": {
111-
"type": "object",
112-
"description": "General tool settings",
113-
"additionalProperties": false,
114-
"properties": {
115-
"nudgeEnabled": {
116-
"type": "boolean",
117-
"default": true,
118-
"description": "Enable nudge reminders to prune context"
119-
},
120-
"nudgeFrequency": {
121-
"type": "number",
122-
"default": 10,
123-
"description": "Frequency of nudge reminders (in turns)"
124-
},
125-
"protectedTools": {
126-
"type": "array",
127-
"items": {
128-
"type": "string"
129-
},
130-
"default": [],
131-
"description": "Tool names that should be protected from automatic pruning"
132-
},
133-
"contextLimit": {
134-
"description": "When session tokens exceed this limit, a compress nudge is injected (\"X%\" uses percentage of the model's context window)",
135-
"default": 100000,
136-
"oneOf": [
137-
{
138-
"type": "number"
139-
},
140-
{
141-
"type": "string",
142-
"pattern": "^\\d+(?:\\.\\d+)?%$"
143-
}
144-
]
131+
"permission": {
132+
"type": "string",
133+
"enum": ["ask", "allow", "deny"],
134+
"default": "allow",
135+
"description": "Permission mode (deny disables the tool)"
136+
},
137+
"showCompression": {
138+
"type": "boolean",
139+
"default": false,
140+
"description": "Show compression summaries in notifications"
141+
},
142+
"maxContextLimit": {
143+
"description": "Soft upper threshold. Above this, DCP keeps sending strong compression nudges (based on nudgeFrequency), so the model is pushed to compress. Accepts number or \"X%\" of the model context window.",
144+
"default": 100000,
145+
"oneOf": [
146+
{
147+
"type": "number"
145148
},
146-
"modelLimits": {
147-
"description": "Model-specific context limits by exact provider/model key. Examples: \"openai/gpt-5\", \"anthropic/claude-3-7-sonnet\", \"ollama/llama3.1\"",
148-
"type": "object",
149-
"additionalProperties": {
150-
"oneOf": [
151-
{
152-
"type": "number"
153-
},
154-
{
155-
"type": "string",
156-
"pattern": "^\\d+(?:\\.\\d+)?%$"
157-
}
158-
]
159-
}
149+
{
150+
"type": "string",
151+
"pattern": "^\\d+(?:\\.\\d+)?%$"
160152
}
161-
}
153+
]
162154
},
163-
"distill": {
164-
"type": "object",
165-
"description": "Configuration for the distill tool",
166-
"additionalProperties": false,
167-
"properties": {
168-
"permission": {
169-
"type": "string",
170-
"enum": ["ask", "allow", "deny"],
171-
"default": "allow",
172-
"description": "Permission mode (deny disables the tool)"
155+
"minContextLimit": {
156+
"description": "Soft lower threshold for reminder nudges. Below this, turn/iteration reminders are off (compression is less likely). At or above this, reminders are on. Accepts number or \"X%\" of the model context window.",
157+
"default": 30000,
158+
"oneOf": [
159+
{
160+
"type": "number"
173161
},
174-
"showDistillation": {
175-
"type": "boolean",
176-
"default": false,
177-
"description": "Show distillation output in the UI"
162+
{
163+
"type": "string",
164+
"pattern": "^\\d+(?:\\.\\d+)?%$"
178165
}
179-
}
166+
]
180167
},
181-
"compress": {
168+
"modelMaxLimits": {
169+
"description": "Per-model override for maxContextLimit by exact provider/model key. If set, this takes priority over the global maxContextLimit.",
182170
"type": "object",
183-
"description": "Configuration for the compress tool",
184-
"additionalProperties": false,
185-
"properties": {
186-
"permission": {
187-
"type": "string",
188-
"enum": ["ask", "allow", "deny"],
189-
"default": "ask",
190-
"description": "Permission mode (deny disables the tool)"
191-
},
192-
"showCompression": {
193-
"type": "boolean",
194-
"default": false,
195-
"description": "Show summary output in the UI"
196-
}
171+
"additionalProperties": {
172+
"oneOf": [
173+
{
174+
"type": "number"
175+
},
176+
{
177+
"type": "string",
178+
"pattern": "^\\d+(?:\\.\\d+)?%$"
179+
}
180+
]
197181
}
198182
},
199-
"prune": {
183+
"modelMinLimits": {
184+
"description": "Per-model override for minContextLimit by exact provider/model key. If set, this takes priority over the global minContextLimit.",
200185
"type": "object",
201-
"description": "Configuration for the prune tool",
202-
"additionalProperties": false,
203-
"properties": {
204-
"permission": {
205-
"type": "string",
206-
"enum": ["ask", "allow", "deny"],
207-
"default": "allow",
208-
"description": "Permission mode (deny disables the tool)"
209-
}
186+
"additionalProperties": {
187+
"oneOf": [
188+
{
189+
"type": "number"
190+
},
191+
{
192+
"type": "string",
193+
"pattern": "^\\d+(?:\\.\\d+)?%$"
194+
}
195+
]
210196
}
197+
},
198+
"nudgeFrequency": {
199+
"type": "number",
200+
"default": 5,
201+
"minimum": 1,
202+
"description": "How often the context-limit nudge fires when above maxContextLimit (1 = every fetch, 5 = every 5th fetch)"
203+
},
204+
"iterationNudgeThreshold": {
205+
"type": "number",
206+
"default": 15,
207+
"minimum": 1,
208+
"description": "How many messages to wait after a user message before adding compression reminders."
209+
},
210+
"nudgeForce": {
211+
"type": "string",
212+
"enum": ["strong", "soft"],
213+
"default": "soft",
214+
"description": "Controls how likely compression is after user messages. 'strong' is more likely, 'soft' is less likely."
215+
},
216+
"flatSchema": {
217+
"type": "boolean",
218+
"default": false,
219+
"description": "When true, the compress tool schema uses 4 flat string parameters (topic, startId, endId, summary) instead of the nested content object. This simplifies tool calls but changes TUI display."
220+
},
221+
"protectedTools": {
222+
"type": "array",
223+
"items": {
224+
"type": "string"
225+
},
226+
"default": [],
227+
"description": "Tool names or wildcard patterns whose completed outputs should be appended to the compression summary. Supports glob wildcards: * matches any characters, ? matches a single character (e.g., \"mcp_*\", \"my_tool_?\")"
228+
},
229+
"protectUserMessages": {
230+
"type": "boolean",
231+
"default": false,
232+
"description": "When enabled, your messages are never lost during compression"
211233
}
212234
}
213235
},
@@ -232,7 +254,7 @@
232254
"type": "string"
233255
},
234256
"default": [],
235-
"description": "Tool names excluded from deduplication"
257+
"description": "Tool names or wildcard patterns excluded from deduplication. Supports glob wildcards: * matches any characters, ? matches a single character (e.g., \"mcp_*\", \"my_tool_?\")"
236258
}
237259
}
238260
},
@@ -269,7 +291,7 @@
269291
"type": "string"
270292
},
271293
"default": [],
272-
"description": "Tool names excluded from error purging"
294+
"description": "Tool names or wildcard patterns excluded from error purging. Supports glob wildcards: * matches any characters, ? matches a single character (e.g., \"mcp_*\", \"my_tool_?\")"
273295
}
274296
}
275297
}

0 commit comments

Comments
 (0)