Preface¶
The built-in @deepseek-ai/dsh-time-context plugin in DeepSeek Harness (DSH) injects about 280 characters of metadata on every request. This increases context redundancy and consumes a larger token budget.
dsh-date-wrapper is a solution to this issue. It compresses the same date information into 46 characters and changes where it is injected: instead of being sent in the message stream, it is attached to the platform’s runtime context snapshot (systemPrompt.context). This reduces the data volume and avoids additional JSONL event writes.
Plugin Purpose¶
dsh-date-wrapper is a Cordis host plugin. It attaches a date string (for example, “Current date: 2026-09-08 Asia/Shanghai Tuesday”) to DSH’s runtime context snapshot. The plugin is maintained by drscrewdriver, is licensed under the MIT License, and can be integrated without modifying DSH source code or submitting a PR.
Core Features¶
- Attach the date string to the runtime context snapshot
The plugin injects date information into DSH’s runtime context snapshot. - Compress metadata
It compresses the original ~280 characters of metadata into 46 characters (~12 tokens), for a compression ratio of about 84%. - No runtime dependencies
The plugin runs without depending on any external runtime libraries. - No dependency on
@deepseek-ai/dsh-time-context
It is a standalone implementation and does not depend on DSH’s officialdsh-time-contextpackage.
Configuration and Activation¶
The plugin is shipped with cordis.patch.yml. After installation, define the plugin in the configuration file and set the time zone, then restart the service to make it take effect.
Example cordis.patch.yml:
- insert:
- id: date-wrapper
name: dsh-date-wrapper
config:
timeZone: Asia/Shanghai # IANA zone; omit to use the process zone
The plugin is enabled once activated, without requiring any toggle or additional parameters in the settings panel.
Version Compatibility¶
The plugin is compatible with the DSH 0.1.x line (artifact ≤ 0.2.0) and the 0.2.0-rc.1+ line (artifact ≥ 0.3.0).
| DSH version range | Artifact version | Contract point used |
|---|---|---|
| 0.1.0-rc.7 ~ 0.1.7.x | ≤ 0.2.0 | systemPrompt.context |
| 0.2.0-rc.1+ | ≥ 0.3.0 | systemPrompt.context |
The plugin does not register a settings namespace and does not export a configuration schema (Config), so it does not provide a configuration entry in the settings panel.
Implementation Details and Notes¶
- Conflict with the native plugin: This plugin overlaps with DSH’s built-in
@deepseek-ai/dsh-time-contextfeature and cannot be used at the same time. Because the native plugin is not installed by default, the plugin is disabled by default. - No browser-side: The plugin does not include a browser-side
dsh.clientimplementation and does not involve DOM or CSS semantic tokens. - No source code modifications: The plugin is implemented through the Cordis plugin mechanism and does not patch DSH source code.
- Time zone handling: An invalid
timeZonethrows an error at startup, with no mechanism to silently fall back to UTC.