AI Agent Hub
Back to plugins
🧠

dsh-archive-retention

Memory Updated 2026.09.05

Run the following command in DeepSeek Harness:

dsh plugin install Momojie-S/dsh-archive-retention

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install Momojie-S/dsh-archive-retention in your DeepSeek Harness terminal to install the plugin; the source is available at https://github.com/Momojie-S/dsh-archive-retention, and a DSH restart is required after installation.

About this plugin

DSH archiving is strictly append-only: sessions in the physical archive (sessions-archive/) and GUI page archives pile up with no built-in cleanup. In practice a list of 664 sessions takes nearly a second to render and occupies roughly 880 KB, so the Web GUI grows progressively slower over weeks of use.

dsh-archive-retention mounts a scheduled sweeper on the host side. Archived records that outlive a configurable retention window (default 7 days; unit switchable to hours) are physically deleted on a cron schedule (minimum interval 15 minutes, default daily at 04:00). Every sweep drops an audit manifest under sessions-archive/_manifests/. Retention value and unit, the sweep cron, and independent scope toggles for the physical archive and GUI archives all live in an "Archive Auto-Cleanup" card on the Web settings page, so changes take effect immediately without editing config files or restarting. Hard safety boundaries are enforced: unarchived sessions, running or in-memory sessions, and the _manifests directory are never touched; in-memory GUI archives are deferred until after the next restart.

If you regularly archive sessions in DSH and want archiving to behave as a grace period rather than permanent storage, without manual directory-walking cleanup routines, this plugin is built for that workflow. Install, restart once, and the timer handles the rest from then on.

Use Cases

  • Periodic physical purge when accumulated archives slow down the Web GUI
  • Treating archiving as a grace period rather than permanent storage
  • Requiring an auditable manifest for every deletion cycle

Best For

  • DSH users who archive sessions frequently
  • Users sensitive to Web GUI render speed and memory footprint
  • Teams requiring auditable data lifecycle management