chuxindd/dsh-context-enhancement0

dsh-context-enhancement

Persistent task state and context-aware compaction for DeepSeek Harness coding sessions.

包名
dsh-context-enhancement
版本
0.1.5
许可证
MIT
最近更新
2026年9月6日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:chuxindd/dsh-context-enhancement

Usage and verification

  1. Start the Web profile and open or create a session.
  2. Select 上下文增强 in the agent picker.
  3. Work normally; task-state updates and context management are automatic.
  4. Open Enhanced features in the session header to inspect enabled state and trigger counts.
  5. 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

FieldDefaultPurpose
provider / modeldeepseek-official / deepseek-v4-flashModel route for background state updates
minEvents20Eligible events required to start an update
maxEvents200Maximum events processed by one update
maxInputBytes60000UTF-8 input budget for one update
maxOutputTokens4000Background generation limit
timeoutMs120000Request deadline
maxInfraRetries2Additional retries for transient infrastructure failures
maxEntriesPerKind50Limit for each facts/decisions/constraints/risks collection
maxEntryBytes4000Limit for one state entry
maxListItems40Limit 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.