One-line clock context for DeepSeek Harness: a Current time timestamp reading (weekday, date, time, UTC offset, IANA timezone) opens every conversation turn and a Turn ended reading closes it, so the model always knows the time, date and idle gap across turns without asking.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-message-datetime
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:john-walks-slow/dsh-message-datetime
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
A DeepSeek Harness (cordis) plugin that injects a concise timestamp and cross-turn idle interval into the model context at the start of every conversation turn.
The model always knows "what time it is right now, what weekday it is, when the previous turn ended, and how long it has been idle" — date arithmetic, "today/tomorrow" semantics, idle-gap awareness across turns, and yymmdd path naming no longer require asking the user or guessing.
What the model sees
The first step of every turn appends a one-line notice after the user message (~30-50 tokens, append-only, KV-cache friendly):
First turn (no previous turn history):
Current time: Tue 2026-09-15 01:04:34 +08:00 (Asia/Shanghai)
Subsequent turns (combining previous turn end and idle duration):
Current time: Tue 2026-09-15 01:04:34 +08:00 (Asia/Shanghai) | Last turn ended: Tue 2026-09-15 00:39:34 +08:00 (idle for 25m)
The notice renders in the GUI as a collapsed context chip (not a user bubble); the collapsed row shows a seconds-free summary and idle time (e.g. Current time: Tue 2026-09-15 01:04 +08:00 (idle 25m)), and clicking expands the full text.
Behavior rules & design philosophy
- Exactly one injection per turn (at turn start): injected only at
step === 1; later steps within the turn (tool-call continuations) do not repeat it. - Preserves native DSH turn branching (fork): does not append trailing nodes after the assistant response at turn end, avoiding violations of the Web UI
turn-tailboundary check, ensuring seamless session branching from any completed turn. - Ready-to-use cross-turn awareness: instead of forcing the model to calculate time deltas across chat history, the plugin parses the previous
turn/endevent from session history and computes human-friendly idle intervals (<1m,25m,1h 10m,2d 5h). - Covers every session: user turns, goal auto-continuation rounds, and subagent turns all get injections (subagents have no browser context and need the clock most).
- Timezone resolution chain: the browser-reported timezone for this turn (
clientTimeZone, adopted only when unique) → the configuredtimeZonefallback → the Node process timezone. Invalid values fall back silently and never interrupt the turn. - Replay-safe: reading is
user/message(plugin-attributed notice) inside the step window, satisfying the token-meter replay constraint; the mechanism follows the official@deepseek-ai/dsh-time-context.
Configuration
- id: message-datetime
name: dsh-message-datetime
config:
timeZone: Asia/Shanghai # optional: fallback display timezone when the browser timezone is unavailable (defaults to the process timezone)
Differences from the official dsh-time-context
| Dimension | @deepseek-ai/dsh-time-context | dsh-message-datetime |
|---|---|---|
| Injection frequency | every eligible step | two per turn (opening + closing) |
| Size per reading | three lines (time + timezone policy + elapsed) | one line |
| Positioning | strict timezone-policy explanation (Schedule scenarios, opt-in) | lightweight clock awareness + cross-turn gap awareness (always-on) |
Enabling both at once is not recommended (double time injection).
Install
dsh plugin --profile web add dsh-message-datetime
No manual configuration needed after install — the bundled cordis.patch.yml mounts automatically; timeZone is an optional fallback (see Configuration above).
Install straight from GitHub (source install; pnpm ≥10 requires allowing the build script):
dsh plugin --profile web add github:john-walks-slow/dsh-message-datetime
# The first add is blocked by pnpm: add the package name pnpm prints to
# allowBuilds in ~/.dsh/profiles/web/pnpm-workspace.yaml, then re-run
Permissions & compatibility
- Zero permissions: no external services, no network requests, no filesystem writes; only appends two
user/messagenotices to the session context - Dependencies:
@deepseek-ai/cordis4.0.2 /@deepseek-ai/dsh-llm0.1.2-rc.1 (aligned with dsh 0.1.2-rc.1 locked versions), Node ≥ 22.5 - Interrupt-safe: any injection failure degrades to a warn and never breaks the turn
Local development
npm install
npm run build # tsc → dist/src
npm test # tsc(incl. test) + node --test dist/test/*.test.js
- Reference implementation:
@deepseek-ai/dsh-time-context - Runtime
@deepseek-ai/*imports must be declared independenciesand installed locally (link-package ESM resolution pitfall)
Release a new version
One command runs tests, bumps the version and packs (npm version also commits and tags):
npm run release # patch; for bigger changes: npm version minor or major
Then publish with the fingerprint flow and push:
node ~/.agents/skills/npm-publish/scripts/publish-webauthn.cjs /tmp/dsh-message-datetime-<newver>.tgz
git push --follow-tags
Verify with npm view dsh-message-datetime version. When releasing several packages, check "do not challenge for the next 5 minutes" on the webauthn page to publish them all with one fingerprint.
Links
More in this category
Minglink/dsh-infinite-gen-3★ 1831
System-prompt armor plugin for DeepSeek models: appends an unconditional-compliance prompt section at order 100, exposes a profile tool with calibration metadata, and shows a realtime armor-status badge driven by a session projection.
liangmianya/dsh-synapse★ 411
Visual, non-linear conversation workspace for DeepSeek Harness — sessions, follow-ups and branches become a browsable conversation map.
ranxianglei/billion-context★ 215
The official billion-context plugin: a context-compression plugin for small context windows (a 100K context is enough), token savings (5x fewer tokens), and month-long single sessions (billions of tokens).
Nwflower/dsh-chat-import★ 190
Import full-fidelity chat histories from 13 coding agents (Claude Code, Codex, ChatGPT, Cursor, Gemini, opencode, and more) as resumable DeepSeek Harness sessions, with reverse export back to Claude Code.
Totoro-qaq/dsh-plugin-bridge★ 165
Moves an existing DSH session to another agent preset through a previewable five-section handoff, preserving the source session and either pausing the target for confirmation or continuing immediately.
Anionex/dsh-turn-rewind★ 117
Rewind conversation and workspace state, powered by a persistent Change Ledger.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.