zoahdev/dsh-shelf

Session lifecycle for DeepSeek Harness: export, archive, restore, trash, search, stats. Zero dependencies, read-only by default.

Bundle verified MIT JavaScript v0.6.0
Bundle verified

Listed

0

Session

Bundle verified

Versionv0.6.0
LanguageJavaScript
LicenseMIT
View on GitHub

Preview

Preview 1 of 2: zoahdev/dsh-shelf
Preview 2 of 2: zoahdev/dsh-shelf

What it does

Session lifecycle CLI: export (md/json/jsonl), archive/restore, trash, search, and stats. Read-only by default; nothing is ever deleted by the engine.

Best for

  • DSH users managing growing session libraries through listing, search, statistics, export, archive, restore, and recoverable trash operations.
  • Backup, migration, or analysis workflows needing Markdown, JSON, or JSONL session exports without modifying source files.
  • Maintainers rescuing unresumable sessions or checking for empty, unfinished, and orphaned session records.

Not ideal for

  • Workflows requiring permanent deletion, because the engine only moves sessions and never deletes them.
  • Live session synchronization or collaborative editing; it manages stored session lifecycle data.
  • Search deployments that specifically require SQLite FTS5, which is documented as future work rather than a current feature.

README

dsh-shelf

Session lifecycle for DeepSeek Harness: export, archive, restore, trash, search, and stats for your dsh session library. Zero dependencies, read-only by default.

Every dsh user accumulates hundreds of sessions and has no way to manage them (#1990, #1991). dsh-shelf is the missing shelf.

Quick start

npx dsh-shelf list                          # every session with id + path
npx dsh-shelf stats                         # counts, compressed/plain, bytes
npx dsh-shelf search "parser bug"           # header + body search (plain sessions)
npx dsh-shelf export <id> --format md       # Markdown transcript to stdout
npx dsh-shelf export --all --format jsonl --out all-sessions.jsonl
npx dsh-shelf archive <id>                  # move to sessions-archive (never deletes)
npx dsh-shelf restore <id>                  # move it back
npx dsh-shelf trash <id>                    # move to sessions-trash (recoverable)
npx dsh-shelf restore-trash <id>
npx dsh-shelf report                        # weekly session digest (Markdown)
npx dsh-shelf report 30 --format json       # 30-day digest as JSON
npx dsh-shelf report 14 --format html --out shelf-report.html   # offline dashboard
npx dsh-shelf verify                        # session health check (orphan tool calls, unfinished, empty)
npx dsh-shelf rescue <id>                   # export an un-resumable session's content
npx dsh-shelf archive-old 30                # dry run: sessions older than 30 days
npx dsh-shelf archive-old 30 --yes          # move them to sessions-archive
npx dsh-shelf web                           # local web panel at http://127.0.0.1:4174

DSH plugin mode (panel bound to the active profile):

dsh plugin --profile web add github:zoahdev/dsh-shelf
# panel at http://127.0.0.1:4174 (committed lib/, no build at install)

Roots: --root overrides; default is $DSH_SESSIONS or ~/.dsh/sessions. Archive/trash roots default to sessions-archive / sessions-trash next to the root.

Safety model

  • Listing, stats, export, and search are strictly read-only.
  • Archive/trash move a session directory; nothing is ever deleted by the engine.
  • Export never touches the source file.
  • Zstandard-compressed sessions are detected and reported (plain-JSONL export in v0.1; raw jsonl path preserved).

Development

node --test tests/shelf.test.mjs
node scripts/shelf.mjs list --root <fixtures>

Why this is the gap

  • Official discussions #1990 (no way to delete a conversation) and #1991 (archived sessions cannot be viewed or restored) are unanswered feature requests.
  • The session category has 229 plugins - memory, recall, evolution - but almost nothing for lifecycle.
  • dsh-shelf is the safe, scriptable first step: build export/archive/trash/search, then a web UI on top.

Roadmap

  • list / stats / export (md/json/jsonl) / archive / restore / trash / search
  • weekly digest (report) + auto-archive (archive-old, dry-run by default)
  • local web panel (dsh-shelf web) - list/search/export/archive/trash + daily chart from the browser
  • offline HTML dashboard (report --format html) - shareable per-day bars + largest sessions
  • Chinese search via CJK bigram tokenizer (zero-dependency; aligns with #1999)
  • DSH plugin wrapper (dsh plugin add github:zoahdev/dsh-shelf opens the panel)
  • session health check (verify) + rescue export for un-resumable sessions (#1959/#2034 family)
  • FTS5-backed search when the host provides SQLite FTS5
  • Zstandard export (node:zlib decode on Node >= 22.19)

License

MIT

Frequently Asked QuestionsFAQ

Use the verified command dsh plugin --profile default add github:zoahdev/dsh-shelf in a DSH-enabled shell. The command resolves the public package metadata and keeps the plugin attached to the catalog identity shown on this page.