Skip to content
Back to search

dsh-turn-delete

Delete one complete turn from a DeepSeek Harness session without deleting the session

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked yesterday
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/hanshenmesen--dsh-turn-delete/badge.svg)](/listings/hanshenmesen--dsh-turn-delete)

HTML

<a href="/listings/hanshenmesen--dsh-turn-delete"><img src="/api/listings/hanshenmesen--dsh-turn-delete/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

From npm (recommended):

dsh plugin --profile web add dsh-turn-delete

From GitHub:

dsh plugin --profile web add github:hanshenmesen/dsh-turn-delete

From a prebuilt GitHub Release:

dsh plugin --profile web add https://github.com/hanshenmesen/dsh-turn-delete/releases/latest/download/dsh-turn-delete.tgz

Restart `dsh web` after installation. To remove it:

dsh plugin --profile web remove dsh-turn-delete

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 80 lines
  1. # dsh-turn-delete
  2. English | [中文](README.zh.md)
  3. Delete one complete closed turn from a DeepSeek Harness conversation without deleting or replacing the Session. The action appears beside the final assistant response for each completed top-level turn.
  4. ## Demo
  5. Delete the middle turn after confirmation while keeping the same Session and its later turn. This was recorded through the real DeepSeek model flow on DeepSeek Harness `0.1.0-rc.7`.
  6. ![Delete one turn without deleting the Session](https://github.com/hanshenmesen/dsh-turn-delete/releases/download/v0.1.0/dsh-turn-delete-demo-en.gif)
  7. ## Install
  8. From npm (recommended):
  9. ```sh
  10. dsh plugin --profile web add dsh-turn-delete
  11. ```
  12. From GitHub:
  13. ```sh
  14. dsh plugin --profile web add github:hanshenmesen/dsh-turn-delete
  15. ```
  16. From a prebuilt GitHub Release:
  17. ```sh
  18. dsh plugin --profile web add https://github.com/hanshenmesen/dsh-turn-delete/releases/latest/download/dsh-turn-delete.tgz
  19. ```
  20. Restart `dsh web` after installation. To remove it:
  21. ```sh
  22. dsh plugin --profile web remove dsh-turn-delete
  23. ```
  24. ## Behavior
  25. - A trash action appears only on completed ordinary Session turns. Subagent transcripts do not expose it.
  26. - Deletion requires confirmation and is disabled while the Session is running.
  27. - The prompt, assistant messages, and tool records for the selected turn are removed from the Session's current model surface.
  28. - The Session id, title, workspace association, later turns, and original append-only event log remain intact.
  29. - A durable zero-content replacement event records the deletion. Reloading the page or restarting the profile preserves it.
  30. - Repeating the same request is idempotent.
  31. The plugin refuses deletion when the target turn is still open or has already been merged into a compaction replacement with other history. This prevents deleting only part of model-visible context.
  32. ## Design
  33. The Host half registers `POST /dsh-turn-delete`, claims the target Agent's maintenance lease, validates the complete closed-turn surface span, appends a zero-content replacement, and waits for `sessions.flush()` before acknowledging success.
  34. The browser half contributes to the public `conversation.chat.assistant-actions` and `conversation.chat.turnTail` slots. A Conversation definition projects the durable tombstone onto the target Turn. DeepSeek Harness does not yet expose a public whole-Turn visibility hook, so the tail contribution applies a narrow presentation compatibility layer to the Chat rows between adjacent Turn tails. Model context deletion does not depend on that compatibility layer.
  35. ## Compatibility
  36. - DeepSeek Harness `0.1.0-rc.6` and `0.1.0-rc.7`
  37. - Node.js 22.19 or newer
  38. - Web profile and Web-based desktop shells
  39. DeepSeek Harness is in developer preview. After upgrading Harness, verify the plugin once with a disposable Session containing three short turns and delete the middle one.
  40. ## Development
  41. ```sh
  42. npm install
  43. npm run check
  44. dsh plugin --profile web add -w link:/absolute/path/to/dsh-turn-delete
  45. ```
  46. `npm run check` type-checks and builds both plugin halves, runs the unit/UI tests, and verifies the npm package contents.
  47. ## Security
  48. Like every DSH plugin, this package runs with the Harness process's permissions. Review the source before installing third-party plugins. The deletion changes future model context but deliberately retains the original append-only events for audit and replay.
  49. ## License
  50. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.