jujiujiang222-cell/dsh-archive-sessions

Plugin插件 Native原生 ⭐ 2 MIT Sessions & Context会话与上下文

Project Overview项目介绍

dsh-archive-sessions is a session-archiving management plugin built specifically for DeepSeek Harness (DSH). It adds an "Archived Sessions" (归档会话) page to the DSH settings panel, listing every archived session whose durable log still exists on disk and exposing two operator actions: restore and permanent delete (the latter gated by an in-page two-step confirmation). The package follows the published DSH plugin layout, with src/index.js acting as the cordis host that registers same-origin HTTP routes /plugins/dsh-archive-sessions/{list,restore,delete}, and lib/client.js acting as the web-client half that registers the settings.section page. The bundle row is supplied via cordis.patch.yml, which inserts the plugin into the active profile's patch layer stack; installation is triggered with dsh plugin --profile web add github:<owner>/dsh-archive-sessions, or by adding the package via pnpm as a file: or git target and then ensuring the patch row is present.

Typical workflow: after archiving several sessions inside DSH, the user opens Settings → Archived Sessions to review a table containing the session title, creation time, working directory, and a flag indicating whether the session is currently resident in memory. Sessions that should be revived are restored, which moves them back out of the archive set so they reappear in the sidebar; sessions that are no longer wanted are permanently deleted, which removes the underlying session.jsonl[.zstd] artifact under the jsonl persistence backend and detaches the id from workspace accounting. The id is retained as an in-memory tombstone so a still-resident session hides from the sidebar until the next restart, and if a target session is in memory the host waits up to roughly four seconds for its agent to become idle before proceeding. The plugin is aimed at desktop power users who need to govern long-running DSH session archives and reclaim disk space from obsolete logs.

Dependencies and operational notes: the runtime is a DSH desktop or web profile that has the plugin market enabled (the README was authored against the local web profile), and installation requires pnpm plus a cordis.patch.yml bundle row. The host is implemented as a cordis plugin that talks to the app shell, while the web client uses the standard window.__ModuleLoader__ bundle metadata with dsh.client keys; a registry submission guide in docs/registry-submission.md explains how to request listing on awesome-dsh-plugin. Important caveats apply: deletion removes files inside DSH's own data directory, so the host invokes the shell under an explicit danger-full-access policy — review the source before installing and use at your own risk. A deleted session cannot be restored because its log is gone; load-time dependency wiring should be re-verified inside the target profile before publishing updates, and after install the app should be restarted or the client bundle hot-reloaded so the new settings page becomes visible.

dsh-archive-sessions 是面向 DeepSeek Harness(DSH)的归档会话管理插件,作用是在设置面板中新增"归档会话"页,集中列出磁盘上仍保留日志的会话,并提供恢复与永久删除两种操作。该插件按 DSH 官方插件布局打包:host 端通过 src/index.js 注册 cordis 插件,并暴露同源路由 /plugins/dsh-archive-sessions/{list,restore,delete};client 端由 lib/client.js 注册 settings.section 页面,最终通过 cordis.patch.yml 把插件行插入 profile 的 bundle 层叠。安装时可在插件市场中执行 dsh plugin --profile web add github:<owner>/dsh-archive-sessions,或通过 pnpm 以 file:/git 目标加入本地依赖。

典型使用流程是:在 DSH 中归档若干会话后,打开"设置 → 归档会话"查看会话列表(含标题、创建时间、工作目录、是否在内存中打开),对不再需要的会话先二次确认再永久删除,对误删或想继续编辑的会话则一键恢复到侧边栏。删除操作会移除 jsonl 持久化后端下的 session.jsonl[.zstd] 文件以及工作区记账项,并把 id 留在归档集合中作为墓碑,使运行期内存中的会话从侧边栏隐藏;如目标会话仍在内存且 agent 处于空闲状态,删除前会让 agent 停止(最多约 4 秒)。该插件面向需要长期治理 DSH 会话存档、清理冗余日志或回收磁盘空间的桌面端重度用户。

依赖方面:运行环境为带插件市场运行时的 DSH desktop / web profile(本文档对应本机 web profile),需 pnpm 与 cordis.patch.yml 配置,主体基于 cordis 插件机制。限制与首次运行注意:删除会话的沙箱默认 shell 无法触及应用数据目录内的文件,因此删除请求必须以 danger-full-access 策略走 shell 执行,安装前请阅读源码并自担风险;已删除会话不可恢复;开发期以 id 前缀 archv 的动态插件形式验证,正式安装后建议重启应用或等待市场热重载客户端 bundle,并在目标 profile 中再次校验加载期依赖连线。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:jujiujiang222-cell/dsh-archive-sessions

把 jujiujiang222-cell/dsh-archive-sessions 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-archive-sessions

Archived-session manager for DeepSeek Harness.

在 DSH 设置界面新增“归档会话”页:列出所有已归档会话,支持恢复与永久删除(删除前二次确认)。

Adds an “归档会话” (Archived Sessions) settings page that lists archived sessions and lets you restore or permanently delete each one (with an in-page confirmation step).

Features

  • Lists archived sessions that still have a durable log on disk (disk is the source of truth — no ghost rows from the in-memory session store).
  • Shows title, creation time, working directory and whether the session is currently open in memory.
  • Restore: moves a session out of the archive set; it reappears in the sidebar.
  • Permanently delete: removes the session's durable log file and detaches it from workspace accounting. Requires a two-step in-page confirmation.

Install

Requirements: a DeepSeek Harness desktop / web profile (the “web” profile on this machine) with the plugin market runtime.

# from a GitHub checkout (once the repository is listed in the marketplace
# registry) or directly from the repository:
dsh plugin --profile web add github:<owner>/dsh-archive-sessions

To build it from source and install locally, place the package into the active profile's dependency set (pnpm install file:/git target), then make sure the row below is present in the profile's bundle patch layer:

# cordis.patch.yml
- insert:
    - id: dsh-archive-sessions
      name: dsh-archive-sessions

After install/update, restart the app (or let the market hot-reload the client bundle) and open 设置 → 归档会话.

How it works

Layer File Role
Host src/index.js cordis plugin; registers same-origin HTTP routes /plugins/dsh-archive-sessions/{list,restore,delete} and implements all logic
Web client lib/client.js registers the settings.section page “归档会话” and talks to the host routes
Bundle row cordis.patch.yml inserts the plugin row into the profile layer stack

Design notes / caveats

  • No platform “delete session” service exists. The session log backend is append-only and every list is derived from what is on disk. Permanent deletion therefore removes the session's own artifact (session.jsonl[.zstd] under the jsonl persistence backend) plus workspace accounting. The id stays in the archived set as a tombstone so the still resident in-memory session stays hidden from the sidebar during this run; after an app restart nothing references it.
  • In-memory resident sessions. Sessions that were opened during the current app run keep a live agent in memory. Deleting such a session is allowed only when the agent is idle; a running agent is asked to stop first (up to ~4s).
  • Full-access file removal. The sandboxed default shell cannot delete files inside the app's own data directory, so deletion runs through the shell with an explicit danger-full-access policy. Read the code before installing; use at your own risk.
  • Restore of a deleted session is rejected: its log is gone.
  • Verification status: developed and battle-tested as a session-scoped dynamic plugin (see docs/dynamic-plugin-source.js). The installable static package in this repo follows the published plugin layout (dsh.client metadata, bundle patch, window.__ModuleLoader__ client bundle, same-origin host routes). Load-time dependency wiring should be verified in the target profile before publishing updates.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-cap-profile 下一个 Next dsh-custom-fonts →