npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-session-trash

v0.1.1

Published

Session trash bin for DeepSeek Harness: move sessions to trash, restore or permanently delete (adds three-dot menu entry).

Readme

dsh-session-trash

Session trash bin for DeepSeek Harness — delete sessions into a trash bin; restore or permanently delete from the bin.

DeepSeek Harness itself has no session-deletion feature (its persistence layer deliberately exposes no deletion API; session logs only ever grow). This plugin implements trash-bin semantics by moving the session log directory — it never touches the persistence layer internals and never patches the host.

中文说明见文末(Chinese docs at the bottom)。

Features

  • Move to trash: the session disappears from the sidebar list (Harness' search index reconciles automatically) and its log directory moves to $DSH_HOME/trash/entries/<sessionId>/.
  • Restore: the log moves back; the session reappears in the official list and its workspace.
  • Permanently delete: delete an entry inside the trash bin = logs are removed for good, unrecoverable.
  • Empty trash: permanently delete all entries at once (with confirmation).
  • Entry points:
    1. Sidebar footer Trash button (sidebar.footer.action official slot, with entry-count badge);
    2. Move to trash icon button next to the session title in the conversation header (conversation.session.header.actions session-scoped slot);
    3. Move to trash as the 4th item in the session three-dot menu (same column as Rename / Fork / Archive) — Harness exposes no public session-row menu slot, so the plugin wraps dsh-client-ui-primitives' HoverCard to inject the item (detects content.props.node.id plus the inner Menu rename/fork/archive signature); when the signature does not match it silently degrades and never breaks the native menu.

Important design constraint

  • Running / in-memory (live) sessions are refused. The JSONL persistence layer's append path uses open(path, "a"), which would recreate the file at the original location — a moved-away live session would "resurrect" and leave a stale trash copy. Harness keeps every session opened during a run in memory until restart, so sessions opened in the current run need a dsh restart before they can be trashed.
  • Trash manifest: $DSH_HOME/trash/manifest.json (atomic writes); entries: $DSH_HOME/trash/entries/<sessionId>/.
  • List titles come from the session log (latest session/title event, else the first user/message text); logs are multi-frame zstd — decoded frame-by-frame with an output cap to avoid memory spikes.

HTTP API (host side, registered via ctx.webServer)

Prefix /dsh-session-trash, all POST with JSON:

| Action | Body | Returns | |---|---|---| | /api/list | {} | { ok, entries[] } (id/title/cwd/movedAt/size) | | /api/trash | { sessionId } | { ok, entry }; live/running → 409 | | /api/restore | { id } | { ok, entry } | | /api/purge | { id } | { ok } | | /api/empty | {} | { ok } |

Install

dsh plugin --profile web add dsh-session-trash

or from a local tarball: dsh plugin --profile web add ./dsh-session-trash-0.1.1.tgz

Build (development)

npm install --legacy-peer-deps   # local toolchain (typescript / tsdown)
npm run build                    # host only (tsc)
npm run build:client             # client only (tsdown)

Host deps are junction-linked from the dsh runtime (build.sh auto-probes DSH_CHECKOUT or dsh on PATH).

Technical notes

  • Resource registrations are attached with ctx.effect so hot reloads never leave stale routes.
  • The three-dot menu injection reads the primitives exports via ctx.modules.loadCache and swaps the HoverCard property in place (the workspace package resolves the component through namespace property access at render time); a polling reinstall self-heals HMR rebuilds.
  • If host stdout is invisible, apply failures are written to $DSH_HOME/super-injector/session-trash-apply.log.

中文说明

DeepSeek Harness 会话回收站:删除会话先进回收站,回收站内可恢复或永久删除。

  • 入口:侧边栏底部「回收站」(带数量徽标)、会话头部垃圾桶按钮、三点菜单第 4 项「移到回收站」。
  • 存储:日志目录移动到 $DSH_HOME/trash/entries/<会话id>/,清单在 $DSH_HOME/trash/manifest.json
  • 约束:正在运行或本次运行打开过的会话(仍驻留内存)拒绝移入——DSH 持久层会在原位置重建文件导致会话"复活",请重启 dsh 后回收。
  • 卸载:dsh plugin --profile web remove dsh-session-trash