Skip to content

Releases: Jaylor-Wang/dsh-tool-session-delete

v1.2.0 - Windows Filesystem Lock Resilience & Defensive Cleanup / Windows 防锁死容错与防御式清理加固

Choose a tag to compare

@Jaylor-Wang Jaylor-Wang released this 24 Oct 17:05

English | 中文

English

What's Changed in v1.2.0

🛡️ Windows File Lock Resilience (rmWithRetry)

  • Implemented progressive retry backoff (6 attempts, 150ms interval) for Windows filesystem locks (EBUSY, EPERM, EACCES, ENOTEMPTY), preventing transient antivirus and search indexer locks from blocking session log deletion.

🔍 Deferred Deletion Verification (verifyDeleted)

  • Handled Windows deferred deletion semantics with repeated existence probing before declaring failure, ensuring zero false alarms during file release.

⏱️ Settle Delay Buffer (STOP_SETTLE_MS)

  • Added a 500ms quiescence period following workspace/session-stop and sessions.flush to ensure in-flight stream flushes finish writing to disk before unlinking.

📌 Pinned State Cleanup (unpinSession)

  • Ensured pinned sessions cleanly drop their pin state from workspaceRegistry upon deletion to prevent dangling pinned session entries.

🧪 Zero-Dependency Native Test Suite

  • Added a zero-dependency native Node.js test suite (node:test) covering the full delete lifecycle, quiescence order, Windows filesystem locks, and release resilience.

Installation & Upgrade

# Via DSH Plugin CLI (Recommended)
dsh plugin --profile web add dsh-tool-session-delete@latest

# Via npm / pnpm
npm install dsh-tool-session-delete@latest
pnpm add dsh-tool-session-delete@latest

Jump to Chinese / 跳转至中文


中文

v1.2.0 版本更新日志

🛡️ Windows 文件锁容错防御 (rmWithRetry)

  • 针对 Windows 系统下杀毒软件(如 Windows Defender)或系统索引服务在文件刚释放时的瞬时占用,实现 6 次退避重试(间隔 150ms),彻底杜绝 EBUSY / EPERM / EACCES / ENOTEMPTY 误报错。

🔍 延迟删除状态轮询 (verifyDeleted)

  • 兼容 Windows 异步延迟删除(deferred deletion)语义,在确认文件彻底抹除后再向客户端返回成功,防止误报。

⏱️ 停工平息缓冲 (STOP_SETTLE_MS)

  • 在触发 workspace/session-stop 与 sessions.flush 之后增加 500ms 缓冲等待,确保正在写流的末尾事件全部落盘平息后再下刀 rm,避免写句柄竞态。

📌 置顶清理补齐 (unpinSession)

  • 在 release() 解绑流程中同步执行 registry.unpinSession(sessionId),保证置顶会话在删除后无任何遗留脏数据。

🧪 零依赖原生测试套件

  • 内置全链路 Node.js 原生测试套件(test/delete-service.test.mjs),覆盖会话信息探测、停工顺序、物理落盘删除及置顶解绑容错。

安装与升级指南

# 通过 DSH 插件命令安装(推荐)
dsh plugin --profile web add dsh-tool-session-delete@latest

# 或通过 npm / pnpm 安装
npm install dsh-tool-session-delete@latest
pnpm add dsh-tool-session-delete@latest

Back to English / 返回英文

v1.1.0 - Initial Release of dsh-tool-session-delete / 永久删除会话插件发布

Choose a tag to compare

@Jaylor-Wang Jaylor-Wang released this 24 Oct 15:13

English | 中文

English

What's Changed in v1.1.0

  • Initial Release of dsh-tool-session-delete: Rebranded and configured as an official DeepSeek Harness out-of-tree bundle plugin.
  • Permanent Session Deletion: Adds a permanent Delete session action to the left sidebar session row … context menu (ordered immediately below Archive).
  • Pre-Deletion Activity & Log Inspection: Opens a confirmation dialog reporting:
    • Whether the session is currently resident/open on this machine.
    • The exact session log size on disk.
    • Active turns, subagent descendants, background tasks, and bound reminders.
  • Fail-Safe Quiescing & Deletion:
    • Automatically archives and quiesces running work (workspace/session-stop and sessions.flush()) before unlinking logs.
    • Verifies artifact removal from disk via post-deletion stat checks.
    • Releases live sessions in strict dependency order (agents -> sessions), dropping workspace archive IDs and projection cache entries (session_projcache).
  • Universal Runtime Support: Implemented via native Typert Remote service (sessionDelete), seamlessly supporting both DSH Web and Electron desktop environments without HTTP origin or CSRF restrictions.

Installation

# Via DSH Plugin CLI (Recommended)
dsh plugin --profile web add dsh-tool-session-delete

# Via npm / pnpm
npm install dsh-tool-session-delete
pnpm add dsh-tool-session-delete

Jump to Chinese / 跳转至中文


中文

v1.1.0 版本更新日志

  • dsh-tool-session-delete 初始版本发布:正式完成插件独立更名与 DeepSeek Harness Bundle 扩展配置。
  • 会话永久彻底删除:在左侧边栏每个会话条目的 … 上下文菜单中新增 「删除会话」 动作(排列在归档选项正下方)。
  • 删除前智能状态预检与确认弹窗:
    • 检测会话是否仍在本机处于打开/驻留状态。
    • 精确计算并展示磁盘会话日志大小(如约 41 KB / 3.2 MB 等)。
    • 清晰列出将被连带清理的活跃轮次、子 Agent 任务、后台作业及绑定的定时提醒。
  • 严谨的停机与注销流水线:
    • 删前自动对会话执行归档阻断(archiveSession)并调度 workspace/session-stop 与 sessions.flush() 平稳停机。
    • 物理删除目录后通过 stat 探测进行二次实测校验,防止文件锁定导致假删除。
    • 严格按顺序解绑 agents -> sessions,清理 workspace.json 中的死引用,并清除 session_projcache 投影缓存。
  • 全平台原生支持:采用 Typert Remote 原生 RPC 协议标准开发,原生无缝适配 DSH Web 端与 Electron 桌面客户端。

安装与使用

# 通过 DSH 插件命令安装(推荐)
dsh plugin --profile web add dsh-tool-session-delete

# 通过 npm / pnpm 安装
npm install dsh-tool-session-delete
pnpm add dsh-tool-session-delete

Back to English / 返回英文