dsh-log-memory: Guarding Session Logs with Popups When Opening DSH Web

Preface

In the DSH plugin ecosystem, session logs are common materials for troubleshooting and backtracking. Log files are located in ~/.dsh/sessions. Once accidentally deleted, overwritten, or corrupted during format migration, recovery can be quite troublesome.

dsh-log-memory is a plugin designed for DSH that turns “opening the Web interface” into a checkpoint: it immediately pops up a guard panel, prompts whether to back up current session logs, and allows adjusting the reminder interval and selecting the backup folder within the popup.

What Is This

dsh-log-memory is an MIT-licensed DSH plugin, with the current version being 1.3.0. The repository address is:

  • https://github.com/says693/dsh-log-memory

Its positioning is specific: when you open the DSH Web interface, a guard panel pops up immediately, allowing you to back up session.jsonl / session.jsonl.zstd from ~/.dsh/sessions within the popup, as well as adjust the reminder interval and backup folder.

Core Features

  • When opening the DSH Web interface, a guard panel pops up immediately. You can check “Don’t remind me today” to mute notifications for the rest of the day; it mutes based on Beijing time natural days and automatically resumes reminders the next day.
  • Incrementally copies session.jsonl / session.jsonl.zstd from ~/.dsh/sessions to the backup folder within the popup.
  • Set the reminder interval within the popup, with presets of 10 minutes / 30 minutes / 1 hour / 2 hours / 3 hours, and a slider range of 10 minutes – 3 hours; the interval at runtime must be between 10–180 minutes.
  • Backup format options include fish-speak version (original .zstd) or human-speak version (readable .txt); each format maintains its own independent incremental index.
  • First-time installation guides you to confirm or fill in the backup folder, with directory browsing supported in the popup; the backup folder must be an absolute path and not within the session directory.
  • Runtime settings and backup indexes are persisted to <DSH_HOME>/profiles/<profile>/log-memory.json.
  • HTTP routes only accept same-origin POST requests; backups are purely local file copies, with no network access or data reporting.

Installation and Activation

Installing via the dsh command

Execute:

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

After installation, restart DSH (Deepseek Harness EAC). The first time you open the Web interface, the onboarding panel will appear.

You can run the following command to confirm the plugin has entered the final configuration:

dsh --profile web --dump-config

Installing from Source

If you need to modify the source code, clone the repository and run the following in the repository directory:

dsh plugin --profile web add .

Manual Installation

For manual installation, copy the plugin to the DSH profile dependencies directory, and add dsh-log-memory to both dependencies and dsh.profile.bundles in package.json, then restart DSH. The onboarding panel will appear the first time you open the Web interface.

Typical Usage

  1. After installation, restart DSH and open the Web interface to handle the first-time onboarding panel: confirm or fill in the backup folder.

  2. Set the reminder interval within the popup. You can use preset options first, or use the slider to adjust within the range of 10 minutes to 3 hours.

  3. Choose the backup format. The fish-speak version retains the original .zstd, while the human-speak version generates readable .txt files; each format maintains its own independent incremental index.

  4. When a manual backup is needed, trigger the backup within the popup, and the plugin will incrementally copy the corresponding session.jsonl / session.jsonl.zstd from ~/.dsh/sessions to the backup folder.

  5. When restoring session logs, look backward from the latest batch for the first version of the file; to restore the original format, place the file back into ~/.dsh/sessions/<corresponding directory>/.

Applicable Scenarios and Notes

  • Suitable for developers who need to establish local backups of DSH session logs and want backup reminders when opening the Web interface.
  • The plugin runs with the current dsh process permissions; it is recommended to review the source code and MIT license before installation.
  • The verified compatibility range includes Deepseek Harness EAC 3.0.1 (packaged version) and dsh agent 0.1.0-rc.6 (built-in), tested on Windows 11; it relies on Node built-in modules with no third-party dependencies.
  • The reminder interval must be between 10–180 minutes; the backup folder must be an absolute path and not within the session directory.
  • Backups are purely local file copies, with no network access or data reporting; HTTP routes only accept same-origin POST requests.

Summary

The problem dsh-log-memory solves is quite focused: it pops up a reminder when opening DSH Web, and within the popup, you can complete backups, adjust the reminder interval, and select the backup folder. Repository address:

  • https://github.com/says693/dsh-log-memory
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye