Popup guardian for session logs: opens with the Web UI on a configurable reminder interval (10 min-3 h), with one-click incremental backup of every session.jsonl(.zstd) under ~/.dsh/sessions in raw or readable chat-log format.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:says693/dsh-log-memory
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
简体中文 | English
A DSH (Deepseek Harness) plugin that pops up a guardian panel for your session logs the moment you open the Web UI — back up, tune the reminder interval, and pick your backup folder, all inside the popup.
Session logs are the entire memory of your conversations with the AI assistant. When a file gets corrupted, deleted by accident, or breaks during a format migration, an independent backup is a lifesaver.
Features
- 🚪 Popup on open — every time you open the DSH Web UI, the guardian panel appears immediately (check "Don't remind me today" to silence it for the rest of the day)
- 💾 One-click backup in the popup — "Back up now" incrementally copies every
session.jsonl/session.jsonl.zstdunder~/.dsh/sessionsinto your backup folder (unchanged files are skipped via apath:size:mtimeindex; the<workspace-root>/<session-id>/structure is preserved; the index persists) - ⏰ Reminder interval in the popup — presets (10 min / 30 min / 1 h / 2 h / 3 h) plus a free slider across 10 minutes – 3 hours; changes save instantly, the timer reschedules on the fly, and settings survive restarts
- 🎚️ Two backup formats (toggle freely):
- 🐟 Fish format: the raw
.zstdarchive — machine format, can be restored - 🧑 Human format: every session rendered into a directly readable
.txtchat log (title/time/token-usage header + per-turn layout of user messages, assistant reasoning and replies, tool calls and results) - Each format keeps its own incremental index; the first backup after switching is a full pass, then it goes incremental again; your choice persists
- 🐟 Fish format: the raw
- 📁 First-run wizard — the first popup after installation asks you to confirm/paste a backup folder (absolute path); you can also change it any time later, or pick it interactively via the in-popup "📁 Browse…" folder browser (server-side directory listing: go up, click subfolders, or paste a path to jump)
- 📅 "Don't remind me today" — muted until the next calendar day (Beijing time), resumes automatically
- 🔒 Security boundaries — HTTP routes accept same-origin POST only; backups are pure local file copies; no network access, no telemetry
Install
Option 1: dsh CLI (recommended)
dsh plugin --profile web add github:says693/dsh-log-memory
Restart DSH (Deepseek Harness EAC) afterwards. The first time you open the Web UI, the wizard panel pops up.
Run
dsh --profile web --dump-configto confirm the plugin made it into the final config. To hack on the source, clone the repo and rundsh plugin --profile web add .inside it.
Option 2: Manual copy
Copy this folder into your DSH profile's dependency directory:
C:\Users\<you>\.dsh\profiles\web\node_modules\dsh-log-memory\Edit
C:\Users\<you>\.dsh\profiles\web\package.json:add to
dependencies:"dsh-log-memory": "file:<absolute path to this folder>"and append
"dsh-log-memory"to the end of thedsh.profile.bundlesarray.Restart DSH. The first time you open the Web UI, the wizard panel pops up.
Configuration
The interval and backup folder are primarily configured in the popup (persisted at <DSH_HOME>/profiles/<profile>/log-memory.json). The cordis.patch.yml config only provides initial defaults:
| Key | Default | Notes |
|---|---|---|
intervalMinutes |
30 |
Initial reminder interval in minutes, clamped to 10–180 |
backupDir |
'' |
Initial backup folder (absolute path); empty = <home>/dsh-log-memory-backups |
backupMode |
'fish' |
Initial format: fish (raw .zstd) / human (readable .txt) |
debug |
false |
true: fire one reminder 20 s after startup and enable POST /ds-log-memory/test-remind |
HTTP routes
| Route | Method | Description |
|---|---|---|
/ds-log-memory/state |
GET | State: settings, first-run flag, interval bounds, current reminder, last backup, next reminder time |
/ds-log-memory/settings |
POST | Runtime settings: { intervalMinutes?, backupDir?, backupMode? } (interval clamped to 10–180; folder must be absolute and outside the sessions dir; mode is fish/human) |
/ds-log-memory/ack |
POST | Dismiss the current reminder |
/ds-log-memory/mute-today |
POST | Mute for today |
/ds-log-memory/backup |
POST | Run an incremental backup now |
/ds-log-memory/browse |
GET | Directory browse (?path= absolute path, returns subdirectories only; empty path = user home) — powers the in-popup "Browse…" button |
/ds-log-memory/test-remind |
POST | Debug: manually fire a reminder (debug: true only) |
All POST routes require same-origin requests (Origin must match Host).
Restoring
Incremental backups scatter "changed files" across timestamped batch folders. To restore a session log, walk the batches from newest to oldest and take the first copy of the file you find (each file's first occurrence wins; same for human-format .txt). For the fish format, put the recovered session.jsonl(.zstd) back under ~/.dsh/sessions/<matching dir>/ and DSH will read it again.
Architecture
src/index.js Server: reminder timer (hot rescheduling) + runtime settings + incremental backup engine + same-origin HTTP routes (cordis plugin)
client/client.js Client: on-open/reminder popup (same panel), interval slider/presets, folder input, backup result (zero-dependency vanilla DOM)
cordis.patch.yml Bundle patch: registers the log-memory plugin row into the profile
- The server manages timer lifecycles via
ctx.effectand registers routes viactx.inject(["webServer"]); - the client is injected into the Web UI via
dsh.client.inject(@deepseek-ai/dsh-client-runtime) and polls state every 15 s; - runtime settings and backup indexes persist at
<DSH_HOME>/profiles/<profile>/log-memory.json.
Compatibility
- Deepseek Harness EAC 3.0.1 (packaged), dsh agent 0.1.0-rc.6 (bundled), verified on Windows 11
- Node built-ins only (fs/crypto/os/path), zero third-party dependencies
License
Links
More in this category
PC2005-cloud/dsh-pet#dsh-pet★ 960
Desktop pet for the DSH Web UI with 25 transparent animations, screen wandering, click reactions and drag, plus a reproducible asset-generation pipeline.
Nagi-ovo/dsh-ads★ 643
Parody ads in 2005-Chinese-web style: sidebar banners, in-chat feeds, corner popups, and a close button whose hit area is smaller than it looks. All fictional.
vlln/whale-girl★ 339
Desktop pet (QQ-pet style): floats in the corner, draggable, feedable, playable.
a86582751/dsh-nexttavern★ 128
Roleplay workspace for DeepSeek Harness: import SillyTavern/TauriTavern character cards or author one from scratch through an interactive flow; turn a long TXT novel into a playable card with either an intensive or a coarse reading pass; the main agent consults worldbooks on demand, and prose is read in a dedicated tavern reader tab; explore multiple worldlines inside one conversation (regenerate, edit-and-send, explicit clone); scoped style presets with 16 built-in styles, a character agent cluster, a standalone decision card, and card or novel export; long stories hold together through a frozen settings prefix, a hard-cut context window, traceable director notes and keyword/semantic/hybrid recall, with embeddings either online or fully local. Targets Harness 0.1.2-alpha.3 and applies its documented compatibility patches.
yyh-001/dsh-meme★ 120
Chat meme stickers: text-only send, mood auto-send, QQ/WeChat-style picker, auto-learn, custom packs.
Sutera-Diffusus/dsh-whale-musume★ 106
A whale-girl desktop pet for the DeepSeek Harness Web UI: pat-to-raise growth, work-state poses per tool type, 494 dialogue lines, 30 achievements, a growth diary, drag physics, theme sync and an accessibility mode. Chat-keyword sensing and API-balance care ship off and are opt-in; an optional weather mood calls Open-Meteo only after you name a city. No telemetry.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.