deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:cuteG41cute/dsh-time-stamp
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DeepSeek Harness 动态插件:在每个用户提问进入模型之前,向会话日志注入一条持久化的时钟上下文消息(提问接收时间 + 距上一条提问的间隔),让 Agent 具备精确的时间观念。缓存友好、意图无歧义、界面隐身呈现,并支持按项目(工作区)独立启用/停用。
~/.dsh/storages/time_stamp.jsonTime the user's latest message was received: 2026-08-17T15:33:51+08:00[Asia/Shanghai]. Elapsed since the previous user message: 4m 40s. Interpret relative time references (now, today, yesterday, 现在, 今天, 刚才) against this instant.
动态插件是进程内的,DSH 重启后需要重新加载。常驻版是普通 npm 插件包(static/ 目录),随组合加载,重启不丢、无需批准:
安装包体:把 static/ 复制为 ~/.dsh/profiles/web/node_modules/dsh-time-stamp/(package.json 位于该目录根部)
在 ~/.dsh/profiles/web/cordis.patch.yml 的 - insert: 列表追加一行:
- id: dsh-time-stamp
name: 'dsh-time-stamp'
重启 DSH(组合变更需重启生效),右上角出现「时间戳 开」即成功
配置迁移:常驻版把配置写入
settings.yaml的time-stamp段(全局默认 + 每工作区覆盖,schema 校验),不再使用~/.dsh/storages/time_stamp.json(旧的 storage 文件可删)。行为与动态版一致:缓存友好、不改用户原文、界面为折叠的「上下文注入」行、按项目开关。
本插件最初以 DSH 动态插件形式运行,源码同样保留在仓库中,可直接提交给 cordis_define:
cordis_define(kind: "new",idPrefix: "tstmp"):code.host ← plugin/host.js 全文code.client ← plugin/client.js 全文cordis_run 激活,并在界面批准授权(建议双 ✓ 授权未来版本)注意:动态插件是进程内的,DSH 重启后需要重新加载。保留本仓库即可随时重建,配置(每项目开关)持久化在存储文件中,重建后依然生效。
| 操作 | 位置 | 作用范围 |
|---|---|---|
| 「时间戳 开/关」按钮 | 任意会话头部右侧 | 当前工作区(同项目所有会话共享) |
| 「时间戳注入」开关 | 设置 → 通用 | 全局默认值 |
time_stamp.json |
~/.dsh/storages/ |
配置落盘位置 |
关闭某项目后,新消息不再注入;历史已注入的消息保留在日志中(删除会破坏缓存连续性,属设计行为)。
~/.dsh/storages/time_stamp.json 是否生成;按钮变红并悬停可查看具体原因。已知坑:存储域名必须匹配 /^[a-z][a-z0-9_]*$/(不允许连字符),曾因域名 time-stamp 含 - 导致写入路径静默失败(详见 docs/design.md)agent/request 文档原文),不存在只给模型看、不进日志的通道;本插件采用官方 time-context 同款持久化方案,界面呈现为产品原生设计的折叠式「上下文注入」小字行详见 docs/design.md:注入点选型(agent/pre-step vs llm/stream vs system-prompt)、缓存命中率分析、存储方案选型(动态版绕开 settings.register 的原因与静态版的正规化)、静态化移植记录、故障排查。
DeepSeek Harness dynamic plugin: injects a durable clock-context message after every user question so the agent has an accurate sense of time. Cache-friendly, intent-safe, stealth presentation, with per-workspace enable/disable.
agent/pre-step; tool-loop steps are never re-stamped~/.dsh/storages/time_stamp.jsonSubmit plugin/host.js as code.host and plugin/client.js as code.client to DSH's cordis_define (idPrefix: "tstmp"), then cordis_run and approve. Dynamic plugins are process-local — reload after a DSH restart (config survives).
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。