Introduction

DSH injects a runtime context snapshot in every conversation turn. If the model does not have direct time information, it can only rely on tool outputs, log lines, or file timestamps to infer the time. This can cause problems such as “tonight” actually meaning tomorrow afternoon, or incorrect date ranges in a “today’s” report. This plugin adds a line with the current date and time to the context and re-evaluates it on every assembly, providing an authoritative clock value.

What Is This

This is a DeepSeek Harness (DSH) plugin maintained by apex-mochen.

  • Core feature: Injects the current date and time into the DSH agent so it can read the time instead of inferring it.
  • Problem solved: Resolves time-awareness errors caused by language models lacking a clock and relying on historical timestamps.

Core Features

  1. Dynamic injection: Injects the current date and time on every assembly.
  2. Authoritative clock: Provides an authoritative clock value, reducing the model’s guesswork about time.
  3. Highly configurable: Supports configuration of time zone, locale, label, precision, and more.
  4. Zero dependencies: The plugin itself has no external library dependencies (it only depends on the DSH runtime environment).

Installation and Activation

Install the plugin with npm or GitHub:

# Install via GitHub
dsh plugin --profile web add github:apex-mochen/dsh-clock-context

# Install via npm
dsh plugin --profile web add dsh-clock-context

After installation, restart the configuration profile or use patchReload: live to make it take effect.

Configuration

Configure the options in cordis.patch.yml. All options are optional; the defaults are:

- id: dsh-clock-context
  config:
    timeZone: Asia/Shanghai   # IANA time zone; defaults to the host time zone
    locale: zh-CN             # Locale; defaults to the host locale
    label: 当前时间            # Prefix for the injected line
    includeUtc: true          # Whether to include UTC time; defaults to true
    includeEpoch: false       # Whether to include the Unix timestamp; defaults to false
    precision: minute         # Precision: 'second' (default, updated each turn) or 'minute' (updated each minute)
    hint: true                # Whether to add an “authoritative clock” hint sentence; defaults to true
    order: 105                # Ordering within the context snapshot; defaults to 105
    enabled: true             # Whether enabled; defaults to true

Note on precision: DSH re-records only when the snapshot text changes. Setting it to second causes the snapshot to update on every turn; setting it to minute means the text updates at most once per minute, which can reduce the frequency of context changes.

Verification

Ask the agent to read its own runtime context to verify:

Quote the line from your runtime context that gives the current date and time, verbatim.

If the plugin is active, the response should include a Current date/time: line, and the timestamp should match the current time. If that line is absent, check the following:
1. dsh plugin --profile web ls - confirm the plugin is installed.
2. cordis.patch.yml - confirm the configuration entry is active.

Notes

  1. No Config Schema: The plugin does not declare a Config schema and relies on default values.
  2. Function property: The text property is a function rather than a string, ensuring the latest value is obtained on every assembly.
  3. Dependency version: It depends on @deepseek-ai/cordis (>= 4.0.1).
  4. Update frequency: With second precision, the context snapshot is updated on every turn; with minute precision, it is updated once per minute.

Conclusion

By injecting an authoritative clock, this plugin removes uncertainty in the model’s time inference and makes it more accurate when handling tasks involving current time, date spans, and related concerns. It is suitable for DSH workflows that require precise time awareness.

  • Plugin directory: https://www.skillhub.cn/plugins/apex-mochen/dsh-clock-context
  • GitHub repository: https://github.com/apex-mochen/dsh-clock-context