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

@yiln-dsh/dsh-plugin-delete-session

v0.4.5

Published

DSH bundle plugin that permanently deletes the current session or a selected batch after explicit confirmation.

Readme

@yiln-dsh/dsh-plugin-delete-session

Adds permanent-delete actions to the current session and session rows in the DSH Web GUI.

Behavior

  • Adds a trash icon beside the current session title.
  • Draws every control it contributes with the shipped counterpart's own geometry, so the plugin is visually indistinguishable from the shell: the session-header action is the header's own 28px icon button, the batch-management action is the sidebar's round .iconButton, the row action is the same MenuItemButton cell the shipped Pin/Rename/Fork/Archive rows use, and the confirmation card is the shipped Modal (blurred mask, 24px layer-2 card, close button, Escape to dismiss, and 18px capsule buttons whose destructive action carries the error label color instead of a filled red). Icons come from the shipped icon set, resolved by name with a text fallback for a shell that predates them.
  • Adds a Delete session item to each ordinary session's three-dot menu — only while that row's own menu is open, so an unrelated popup (the composer's permission dropdown, for instance) never receives it — and reuses the destructive confirmation dialog. The product renders every menu through one primitives component, so the item is anchored to the menu box that actually sits against the row's action button rather than to the nearest open menu anywhere on the page.
  • Adds a batch-management control beside the New Workspace action; management mode exposes a checkbox on each visible ordinary session plus Cancel and Delete selected controls.
  • Sends selected sessions through one serialized Host operation, so active sessions are flushed and disposed safely before their persisted logs are removed.
  • Requires an explicit confirmation before sending the destructive request.
  • Flushes and disposes an active session before deleting its persisted log.
  • Deletes the subagent sessions delegated from the deleted session, at every depth, so no orphaned child transcript is left behind. Only sessions whose header records origin: "subagent" are followed: a session that merely names the deleted one as its fork parent stays untouched.
  • Reports the cascaded ids in subagentSessionIds; a batch target already removed by an earlier cascade in the same request is acknowledged with alreadyRemoved instead of failing.
  • Opens the next ordinary session when available, then re-reads the browser session list through the client session service's refresh(), so the deleted rows disappear without reloading the whole page. The deletion goes through this plugin's own Host route, which the Session Controller never sees, so that pull is what updates the sidebar; a shell too old to expose refresh() still falls back to the page reload.
  • Deletes the guarded per-session directory, including temporary files placed there by session-scoped features; it does not delete the workspace directory or content-addressed image objects, which may be shared by other sessions.

The plugin supports the stock per-session JSONL persistence backend, including every committed Session format generation (session.jsonl and session.vN.jsonl, each optionally zstd-compressed). Backends such as SQLite that do not expose a per-session artifact location return a clear unsupported-backend error instead of issuing a broad database deletion.

The Host wrapper records AgentHandle values returned by the public agent factory so an active Web session can be torn down in the correct order. A session that was already live before this plugin mounted, and whose teardown handle was not observed, is refused rather than having only its file removed. Restart dsh web after installing the plugin so newly opened sessions are tracked by the plugin.

Install

The published package is @yiln-dsh/[email protected].

dsh plugin --profile web add file:/path/to/dsh-plugin-delete-session

The profile must be the web profile. Restart dsh web after installation.