DSH Plugins Marketplace

DSH Plugins

Plugins

/

Just for Fun

/

dsh-log-memory

s

dsh-log-memory

Manifest valid★ 4

An abstract, entertainment-focused plugin. Many of its features are buggy, but it's a bit of fun, so I released it anyway. Its main function is to remind you to save the current chat history at regular intervals—both when DSH launches and while it's in use. The "fish talk" version is mainly designed with cross-device workflows in mind: it lets you directly feed the chat history from one device straight into another. The "plain talk" version is mainly meant to...

UI (client)hasBundlePatch

dsh-log-memory 🐋

简体中文 | English

License: MIT DSH Plugin Version

DSH(Deepseek Harness)插件:打开 Web 即弹窗守护会话日志——弹窗里能备份、能调提醒间隔、能选备份文件夹。

会话日志是和 AI 助手的所有对话记忆——文件损坏、误删、格式迁移翻车时,一份独立备份就是救命的。

功能

  • 🚪 打开 Web 即弹窗:每次打开 DSH 界面立即弹出守护面板(勾选「今日不再提醒」后当日不再打扰)
  • 💾 弹窗内询问是否备份:「立即备份到文件夹」一键把 ~/.dsh/sessions 下所有 session.jsonl / session.jsonl.zstd 增量复制到备份文件夹(按「路径:大小:mtime」跳过未变化文件,完整保留 <工作目录根>/<会话 id>/ 目录结构,索引持久化)
  • ⏰ 弹窗内设定提醒时间:预设档(10 分钟 / 30 分钟 / 1 小时 / 2 小时 / 3 小时)+ 滑杆自由微调,范围 10 分钟 – 3 小时,改动即保存并立即重排定时器,重启不丢
  • 🎚️ 备份格式二选一(双钮自由切换):
    • 🐟 鱼话版:原始 .zstd 压缩包,机器格式,可用于恢复
    • 🧑 人话版:每个会话渲染成可直接阅读的 .txt 聊天记录(标题/时间/token 用量档案头 + 按轮次排版的用户消息、助手思考与正文、工具调用与结果)
    • 两种格式各自维护独立增量索引,切换后首次备份为该格式全量,之后恢复增量;选择持久化
  • 📁 首次安装引导:安装后的第一个弹窗会要求确认/填写备份文件夹(绝对路径),运行期间也可随时在弹窗里修改;支持 「📁 浏览…」弹窗内点选(服务端列目录实现的文件夹浏览器:上一级/子目录点选/粘贴路径跳转,无需手填)
  • 📅 今日不再提醒:按北京时间自然日静音,跨天自动恢复
  • 🔒 安全边界:HTTP 路由仅接受同源 POST;备份是纯本机文件复制,不联网、不上报任何数据

安装

方式一:dsh 命令安装(推荐)

dsh plugin --profile web add github:says693/dsh-log-memory

安装后重启 DSH(Deepseek Harness EAC)。首次打开 Web 即弹出引导面板。

可运行 dsh --profile web --dump-config 确认插件已进入最终配置;需要改源码时,克隆仓库后在仓库目录运行 dsh plugin --profile web add .。

方式二:手动安装

  1. 把本文件夹复制到 DSH 的 profile 依赖目录:

    C:\Users\<你>\.dsh\profiles\web\node_modules\dsh-log-memory\
    
  2. 编辑 C:\Users\<你>\.dsh\profiles\web\package.json:

    在 dependencies 中加入:

    "dsh-log-memory": "file:<本文件夹的绝对路径>"
    

    在 dsh.profile.bundles 数组末尾加入:

    "dsh-log-memory"
    
  3. 重启 DSH。首次打开 Web 即弹出引导面板。

配置

提醒间隔与备份文件夹优先在弹窗里设置(持久化于 <DSH_HOME>/profiles/<profile>/log-memory.json)。cordis.patch.yml 里的 config 仅作为初始默认值:

键默认值说明
intervalMinutes30初始提醒间隔(分钟),需在 10–180 内
backupDir''初始备份文件夹(绝对路径);留空使用 <用户主目录>/dsh-log-memory-backups
backupMode'fish'初始备份格式:fish(鱼话版 .zstd)/ human(人话版 .txt)
debugfalsetrue 时:启动 20 秒后先弹一次提醒,并开放 POST /ds-log-memory/test-remind

HTTP 路由

路由方法说明
/ds-log-memory/stateGET状态:设置、首次引导标志、间隔范围、当前提醒、上次备份、下次提醒时间
/ds-log-memory/settingsPOST运行时设置:{ intervalMinutes?, backupDir?, backupMode? }(间隔钳制 10–180;文件夹须为绝对路径且不在会话目录内;格式 fish/human 二选一)
/ds-log-memory/ackPOST关闭当前提醒
/ds-log-memory/mute-todayPOST今日不再提醒
/ds-log-memory/backupPOST立即增量备份
/ds-log-memory/browseGET目录浏览(?path= 绝对路径,仅返回子目录列表;空 path 默认用户主目录)——弹窗内「浏览…」按钮的数据源
/ds-log-memory/test-remindPOST调试:手动触发提醒(仅 debug: true 时可用)

POST 路由均要求同源(校验 Origin 与 Host 一致)。

恢复说明

增量备份把「变化的文件」分散在各时间戳批次目录中:恢复某份会话日志时,请从最新的批次向前找该文件的第一个版本(各批次按时间从新到旧,每个文件取第一次出现的那份;人话版 .txt 同理)。恢复原始格式(鱼话版)时,把找到的 session.jsonl(.zstd) 放回 ~/.dsh/sessions/<对应目录>/ 即可被 DSH 重新读取。

架构

src/index.js       服务端:提醒定时器(热重排)+ 运行时设置 + 增量备份引擎 + 同源 HTTP 路由(cordis 插件)
client/client.js   客户端:开屏弹窗与提醒弹窗(同一面板)、间隔滑杆/预设、文件夹输入、备份结果(零依赖原生 DOM)
cordis.patch.yml   bundle 补丁:向 profile 注册 log-memory 插件行
  • 服务端通过 ctx.effect 管理定时器生命周期,通过 ctx.inject(["webServer"]) 注册路由;
  • 客户端经 dsh.client.inject(@deepseek-ai/dsh-client-runtime)注入 Web UI,每 15 秒轮询一次状态;
  • 运行时设置与备份索引持久化于 <DSH_HOME>/profiles/<profile>/log-memory.json。

兼容性

  • Deepseek Harness EAC 3.0.1(封装版),dsh agent 0.1.0-rc.6(内置),Windows 11 实测通过
  • 依赖 Node 内置模块(fs/crypto/os/path),无任何第三方依赖

许可证

MIT

Comments

Loading…

Similar plugins

dsh-auto-memory

by 1304836815

DSH 会话级记忆插件:收尾提醒 + MEMORY.md 记忆索引维护 + 实时对话日志 + LLM 摘要压缩,配置面板在 设置→插件。Session memory for DeepSeek Harness.

Manifest valid

★ 0

MIT

JavaScript

Aug 21, 2026

dsh plugin --profile web add @dsh-external/dsh-auto-memory

by wojiao42

文件型长期记忆:每个会话注入你自己的 Markdown 记忆文件,提供读写工具,并能查出 DSH_HOME 漂移;不读对话、不联网 · File-backed memory for DeepSeek Harness, with verifiable constraints

Memory & ContextSessions & MessagesManifest valid

★ 0

MIT

JavaScript

Oct 7, 2026

dsh plugin --profile web add dsh-memory-file

by TheHeartFickle

DSH 会话管理插件 —— 对话回退 + 归档会话,长会话可回滚、可整理。

Sessions & MessagesManifest valid

★ 0

MIT

JavaScript

Sep 29, 2026

dsh plugin --profile web add @the-heart-fickle/dsh-session-manager

Message recall for DeepSeek Harness (dsh): cut the conversation back to before a message you already sent, and put its text back in the composer.

Sessions & MessagesManifest valid

★ 0

MIT

TypeScript

dsh plugin --profile web add @jochenyang/dsh-rewind-plugin

by suis077

DSH 插件:人设卡 + 跨会话记忆 + 好感度,让 AI 角色在多轮对话里逐渐成长

Manifest valid

★ 0

MIT

JavaScript

Oct 18, 2026

dsh plugin --profile web add dsh-companion

by NOOBnoob163

DSH 插件:会话在 Obsidian 库里工作时自动把库打开——这样你装的同步插件(坚果云同步等)就会开始跑,AI 改的东西才能真正同步出去。已开着的库跳过,新窗口不抢焦点。(是 DSH 插件,不是 Obsidian 插件)

Notifications & IntegrationsManifest valid

★ 0

MIT

JavaScript

Oct 17, 2026

dsh plugin --profile web add dsh-open-obsidian