nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:JaMoLpE88/dsh-session-remover
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Delete a DeepSeek Harness session for good, straight from its ⋯ menu. One red row, one confirmation, and the conversation is gone from DSH and from the disk: its JSONL log, its projection cache and its place in the workspace registry.
No settings page, no archive manager, no agent tools. English-only interface. Nothing else is added.
Español → README.es.md

The session ⋯ menu: Delete session sits in red after the shipped rows (pin, rename, fork, archive, copy Session ID). Workspace and session names are blurred.

The confirmation: the session to delete is named in the dialog (blurred here), Cancel has the initial focus, and nothing is sent to the Host until you confirm.
⋯ menu of every session row, in red, ordered after the shipped rows.<session store>/<project>/<session-id>/, including its .v4.jsonl.zstd log.storages/session_projcache/sessions/<session-id>.json, so no cached title or message text survives.attachments/v1/objects/<hash>) that other sessions may reference, so they are left alone. See What stays on disk.The only decision is which session to delete, and that is already an argument of the action. There is no threshold to tune, no interval, no key, no scope. A config page would be a second place to explain the same single behaviour.
>= 0.2.1-rc.3, profile desktop (tested on 0.2.1-rc.3, Windows 11).From npm:
dsh plugin --profile desktop add @jamolpe88/dsh-session-remover
From the repository:
dsh plugin --profile desktop add github:JaMoLpE88/dsh-session-remover
From a local checkout, while developing:
dsh plugin --profile desktop add C:\path\to\dsh-session-remover
Fully quit and reopen DSH after installing, then refresh the window.
⋯ menu.An archived session has no sidebar row: unarchive it first from DSH's own archive page, then delete it from its menu. Deletion clears the archive marker and the pin on the way out, so nothing stale is left in the registry.
| Path | What it is |
|---|---|
<session store>/<project>/<session-id>/ |
The session's own directory: its versioned .jsonl.zstd log and anything beside it |
storages/session_projcache/sessions/<session-id>.json |
Cached projections: title, message-derived values |
storages/workspace.json |
Only the references: the session is detached, unpinned and unarchived |
Nothing else is removed. The session is not moved to a recycle bin: the files are deleted, so the space is returned immediately.
Attachments. Images and files are stored once per content hash under attachments/v1/objects/. A forked session inherits references to the same hashes, so deleting the objects would break the fork's images. DSH keeps no reference count, so the plugin leaves them alone rather than guessing.
For a text-only conversation this is nothing at all. If your goal is reclaiming disk space, images are what dominates — that cleanup needs a scan of the remaining logs and is deliberately out of scope for now.
Also untouched: DSH's own logs, your workspace files, backups you made yourself and any copy that already left the machine.
The Host half registers one route, POST /plugins/session-remover/delete:
x-session-remover-confirmation: delete-session header. A link, an HTML form or a cross-site request cannot produce that header.^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$) before it can name a path.AgentHandle that ctx.agents.create/resume returned. DSH exposes no dispose on the registry itself, so the plugin keeps those handles as they are created and refuses to delete when it has none.sessionPersistence.stat + locate and cross-checked by scanning the store root, then required to be exactly <root>/<one project segment>/<session id>, a real directory, containing a session log file.The Client half is one plain client.js with no build step: it registers a row in sidebar.workspaces.session.menu.item and a dialog in shell.overlay, requires only react, and styles with --dsw-alias-* tokens. It does not load Harness Client packages, so a DSH update that renames a primitive cannot blank the entry.
| DSH | >= 0.2.1-rc.3 (tested on 0.2.1-rc.3) |
| Node | >= 22 |
| OS | Windows 11 (tested); macOS and Linux untested |
| Profile | desktop (tested); web untested |
| Session store | per-session JSONL backend (the default) |
| Catalog | listed on dsh-plugin.org |
Validation status: tested on Windows 11 with DSH Desktop 0.2.1-rc.3 (2026-10-26). The menu row and the confirmation were used through the interface; a real session (a fork) was deleted and its directory, its projection-cache record and its workspace references were verified gone afterwards, with a sibling session left intact.
Not validated: macOS, Linux, the web profile and other DSH versions.
AgentHandle returned by the agent registry; a future DSH release may change either.| Message | Meaning |
|---|---|
This session was opened before Session Remover was loaded… |
The agent existed before the plugin loaded. Restart DSH and try again; nothing was deleted. |
DeepSeek Harness did not finish closing this session; nothing was deleted. |
The teardown did not settle in time. Retry; nothing was deleted. |
The session directory does not contain a session log; nothing was deleted. |
The directory does not look like this session's storage. Nothing was deleted. |
This session matches more than one storage directory; nothing was deleted. |
The same id exists in two project directories. Resolve it by hand; nothing was deleted. |
The session files could not be removed (…) |
The operating system refused the removal; the dialog reports the code. |
The delete request did not pass the origin and confirmation checks. |
The request did not come from the app window. Reload DSH. |
When something fails, the rule is the same: nothing is deleted unless the whole validated path succeeds, and the error says so.
npm run check # syntax checks plus the path-validation self-check
npm test # end-to-end Host deletion against a throwaway tree
check.mjs covers the containment rules (invalid ids, .., wrong depth, foreign directories) and that the Client module id, the package name and the patch row agree — a mismatch crashes web boot. test-host.mjs drives the real handler with stubbed Harness services: request gating, invalid id, cold deletion with a surviving sibling, live-agent teardown, the cache-file fallback and the refusal to treat a log-less directory as storage.
Local install:
dsh plugin --profile desktop add C:\path\to\dsh-session-remover
No build step: client.js is the shipped artifact.
MIT © 2026 JaMoLpE88
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: session-management。