apex-mochen/dsh-clock-context ↗★ 1
dsh-clock-context
Give the DSH agent a clock: injects the current date/time into the runtime context on every turn. · 给 agent 一块表:每一轮把当前时间注入运行上下文。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:apex-mochen/dsh-clock-context说明文档
阅读完整 README ↗Configuration
Every option is optional. Set them in your profile's cordis.patch.yml (or in an overlay) under the
entry this bundle inserts:
- id: dsh-clock-context
config:
timeZone: Asia/Shanghai # any IANA zone; default: the host's zone
locale: zh-CN # default: the host's locale
label: 当前时间 # default: "Current date/time"
includeUtc: true # default: true
includeEpoch: false # default: false (unix seconds)
precision: minute # 'second' (default) or 'minute'
hint: true # default: true (append the "authoritative clock" sentence)
order: 105 # default: 105 (before SANDBOX_POLICY=110)
enabled: true # default: true
| Option | Type | Default | Meaning |
|---|---|---|---|
timeZone | string | host zone | IANA zone for the rendered local time |
locale | string | host locale | Passed to Intl.DateTimeFormat |
label | string | Current date/time | Prefix of the injected line |
includeUtc | boolean | true | Append the UTC instant |
includeEpoch | boolean | false | Append unix seconds |
precision | 'second' | 'minute' | 'second' | 'minute' renders a snapshot that only changes once a minute |
hint | boolean | true | Append the "use this, never guess" sentence |
order | number | 105 | Sort order inside the runtime-context snapshot |
enabled | boolean | true | Turn the contribution off without uninstalling |
The timezone offset is computed per call, so daylight-saving transitions are handled automatically.
On
precision. DSH only re-records a runtime-context snapshot when its text changes, so at second precision the snapshot is re-recorded every turn. That is cheap — the snapshot is a tail user-role message, so it does not invalidate the cached prefix — but if you prefer the lowest possible churn,precision: minutemakes the text change at most once a minute.
Note on
locale. It defaults to the host's locale, so azh-CNmachine renders2026年09月12日星期六 13:12:21while the label stays English. Setlocale: 'en-US'forSaturday, 09/12/2026, 13:12:21, or setlabelto match the locale you choose.