chuxindd/dsh-context-enhancement ↗★ 0
dsh-context-enhancement
Persistent task state and context-aware compaction for DeepSeek Harness coding sessions.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:chuxindd/dsh-context-enhancement说明文档
阅读完整 README ↗Usage and verification
- Start the Web profile and open or create a session.
- Select 上下文增强 in the agent picker.
- Work normally; task-state updates and context management are automatic.
- Open Enhanced features in the session header to inspect enabled state and trigger counts.
- Open Trajectory to inspect detailed pruning and compaction events.
Task state updates asynchronously after its event threshold is reached. A new session may report that an effect has not triggered yet even though the feature is enabled.
Configuration
Defaults live in cordis.patch.yml and can be replaced through a profile or home patch.
A patch replaces the entire config object, so provide every required field.
Task-state provider
| Field | Default | Purpose |
|---|---|---|
provider / model | deepseek-official / deepseek-v4-flash | Model route for background state updates |
minEvents | 20 | Eligible events required to start an update |
maxEvents | 200 | Maximum events processed by one update |
maxInputBytes | 60000 | UTF-8 input budget for one update |
maxOutputTokens | 4000 | Background generation limit |
timeoutMs | 120000 | Request deadline |
maxInfraRetries | 2 | Additional retries for transient infrastructure failures |
maxEntriesPerKind | 50 | Limit for each facts/decisions/constraints/risks collection |
maxEntryBytes | 4000 | Limit for one state entry |
maxListItems | 40 | Limit for one list field |
task-state-prompt.maxBytes defaults to 8000 and bounds the state injected into a
model request.
Compaction
contextual retains the official configuration vocabulary, including
thresholdRatio, retainRatio, retainTokens, summarizationProvider,
summarizationModel, maxTokens, compactionRetries, maxOverflowRetries,
modelPolicies, and auto.
Tool-output reduction uses thresholdChars, headChars, and tailChars. Inspect real
sessions in Trajectory before lowering these values. Aggressive thresholds increase
processing frequency and may remove output needed for debugging.