DSH HUB
HomePlugin StoreRankingsPublish Guide
Plugin source
Back to catalog

omdsh-dev /

dsh-essential

Verified

为 DeepSeek Harness 提供可恢复的对话删除能力,支持菜单集成、即时隐藏与重启安全归档

★ 1 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@ea659780

dsh-essential

English | 中文

A recoverable conversation-deletion plugin for DeepSeek Harness. It contributes Delete conversation to each Session row menu and also registers /delete-conversation. After explicit confirmation, the selected Session lifecycle is queued and immediately hidden through the Workspace's durable archive projection; on the next DSH start its JSONL directory is atomically moved into recovery trash before the Web Workspace builds its index.

Why deletion is restart-gated

DSH currently defines Session persistence as append-only and exposes no deletion method. A live Agent's teardown handle also belongs only to its creator. Moving a log underneath a live writer would be unsafe, so the plugin separates intent from execution: the running process persists a request, and the next process performs the move before any Session is resumed.

Install

This package is a self-contained DSH bundle with cordis.patch.yml. It does not patch or rebuild the DeepSeek Harness source tree. Install it into a Web profile with the built Harness CLI:

node /path/to/DSH/apps/cli/lib/bin.js plugin --profile web add /path/to/dsh-essential

Restart DSH after installation. The bundle mounts the plugin, stores state under the DSH home conversation-trash directory, and makes the Web Workspace wait for deletion recovery before indexing persisted Sessions.

For a direct cordis.yml composition, stateDir is required and absolute:

- id: essential-conversation-delete
  name: '@deepseek-ai/dsh-essential'
  config:
    stateDir: /absolute/path/to/conversation-trash

Use

Open a Session row's … menu and choose Delete conversation. The Web UI opens an in-page card titled Delete this conversation? with Cancel / Delete conversation actions; it no longer uses native browser dialogs. Confirming addresses the clicked Session through the plugin's root Remote (which also works for historical Sessions without a live Agent), then archives the Session so it disappears immediately from every Session grouping surface. Cancelling sends no request.

Until Harness exposes a public Session-menu slot, the plugin observes semantic Session tree rows and portals its React action into the menu DOM from a stable document-level controller. The controller survives Host menu auto-close, so the confirmation card cannot disappear with the menu subtree. A pointer-boundary bridge keeps cross-root movement onto Delete conversation inside the Host menu; entering the action also explicitly cancels Host pointer grace when a browser omits relatedTarget, while normal pointer-leave dismissal outside it remains intact. Exact identity comes from the row's React owner; a unique visible-title match is the fail-safe fallback. Ambiguous rows are left untouched rather than risking deletion of the wrong Session.

While deletion is pending, the card pins itself open, disables both actions, changes the primary button to Deleting…, and shows progress. Failures and queued-but-not-hidden partial outcomes render inside the card. On full success, the disappearing row is the result feedback; no second success popup interrupts the flow.

Immediate hiding changes only the Workspace list projection; it never moves or deletes an active log. The next cold start still validates the exact lifecycle before moving the log into recovery trash. If queueing succeeds but the archive request fails, the plugin reports that deletion is queued but the row could not yet be hidden instead of misreporting the deletion as rejected.

The human command remains available. Delete the current conversation:

/delete-conversation CONFIRM

Delete another conversation by Session id:

/delete-conversation <session-id> CONFIRM

After the command succeeds, restart DSH. The next boot moves the log to <stateDir>/trash/<session-lifecycle-key>/. Its deletion.json records the original directory. To restore, stop DSH, remove deletion.json, and move the directory back to originalDirectory.

Configuration

Field Type Default Meaning
stateDir string required Absolute pending-request and recovery-trash directory, outside Session artifact directories.
commandName string delete-conversation Optional human-command alias without /; the menu always uses stable /delete-conversation.

Safety and recovery

  • The literal CONFIRM is mandatory.
  • Requests bind sessionId, createdAt, and cwd, preventing a reused id from deleting a newer lifecycle.
  • The persistence listing, backend location, and full inspection identity are checked again before the move.
  • HMR retains the request whenever the target Session is still live; only a cold start may move it.
  • Product deletion renames the Session directory; it never unlinks the log.
  • A crash after rename is recoverable through the deterministic trash target.
  • A failed validation or move retains the request and leaves the source untouched.

See docs/design.md for the transaction design.

Development verification

pnpm install
pnpm run verify:self-contained
pnpm run typecheck
pnpm test
pnpm run build
pnpm run prepare

Model Experience

Human command lifecycle

What the model sees

No direct model input. The command layer handles /delete-conversation without sending it to the model. The command framework records log-only command/run and command/done events, which do not enter the conversation surface.

Token effect

Zero direct request tokens and no model call.

KV Cache effect

The command neither replaces an existing model-request prefix nor creates an independent request. Once the entire Session is removed, it produces no future requests.

Known Limitations and Deferred Work

  • Per-Session JSONL only — SQLite has no independent artifact location, so the plugin rejects it explicitly.
  • Log move is effective after restart — the row hides immediately through the durable archive projection, but the running process never moves the target log; this preserves Agent ownership and persistence coordination.
  • Not permanent erasure — logs remain in recovery trash until an administrator applies a retention policy.
  • No sidecar cascade — independent stores such as message feedback can retain orphan rows because DSH has no cross-domain Session deletion transaction.
  • DOM compatibility boundary — until Harness ships a public Session-menu slot, the menu action depends on the semantic Session row/menu DOM and an isolated React-owner lookup. If a future Host changes both, the plugin fails closed and the slash command remains available.
DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

APIPublish GuideAbout
—/ 5

No ratings yet

Verified DSH bundle

Commit ea65978069bc

Community comments

No comments yet. Be the first to write one.