hucj09/dsh-move-session 预览 preview

hucj09/dsh-move-session

跨工作区会话迁移插件(dsh Web GUI)。在会话操作区新增 Move Session(迁移会话) 入口: 将当前会话原封不动地复制到另一个工作区(完整保留对话日志、标题、Agent 预设、模型选择), 并支持保留原会话或归档原会话。仅支持空闲会话迁移。

catalog descriptioncatalog 简介 / catalog description:DSH Web GUI 跨工作区会话迁移插件: 一键迁移原会话到其他工作区,保留完整上下文、会话历史、Agent 预设与模型选择等,支持保留或归档原会话。

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH) that enables cross-workspace session migration. It adds a “Move Session” button to the session header action bar and an entry to the sidebar session context menu, following DSH’s official hotplug convention that does not require modifying any core DSH source code. To install the plugin, you can run the official DSH CLI command dsh plugin --profile web add @hucj/dsh-move-session for a standard install, or link a local clone for development testing. After installation, you need to restart DSH web and force-refresh your browser to activate the plugin.

To use the plugin, first open an idle session (running sessions cannot be migrated) and click the Move Session button. Next, select your target workspace from the modal dialog, then choose whether to keep the original session or archive it, and confirm the migration. The plugin copies all session data including conversation logs, tool calls, model settings, and agent presets to the new session, and automatically updates all open sidebar tabs without manual refresh. If your target workspace already has a session with the same name, the plugin appends a [MS<n>] suffix to avoid conflicts, and preserves lineage information matching DSH’s official fork behavior.

The plugin is zero-dependency pure JavaScript, with source files in the lib folder acting directly as runtime artifacts, so no build step is required. It comes with a full test suite including unit tests, integrity checks for migrated session logs, and UI interaction tests that run automatically on commit and pull request. The plugin is released under the open MIT license, and can be uninstalled with a single DSH CLI command that removes all related files and dependencies. Uninstallation also requires a restart of DSH web to take full effect, and the current stable version is v0.1.3.

dsh-move-session 是专为 DeepSeek Harness 开发的原生会话迁移插件,为 DSH Web 界面添加跨工作区迁移会话功能。它在会话操作区新增「迁移会话」入口,支持将当前会话完整复制到另一工作区,原封不动保留对话日志、标题、Agent 预设和模型选择。插件遵循 DSH 热插拔约定,无需修改 DSH 源码,是零依赖纯 JavaScript 项目,源码直接作为运行产物无需构建。

插件支持用户选择保留原会话或将原会话归档,仅允许迁移处于空闲状态的会话。迁移过程中会为新会话生成独立ID,不会覆盖或删除任何现有记录,如果目标工作区存在同名会话,会自动追加 [MS<n>] 标记区分,避免重复命名冲突。迁移完成后所有打开的标签页侧边栏会即时更新,无需用户手动刷新页面,符合 DSH 的交互规范。

安装可通过 DSH 官方 CLI 完成,推荐使用 npm 源安装,也支持本地源码链接安装用于开发调试。安装后需重启 DSH Web 并强制刷新浏览器页面才能生效,卸载也通过 CLI 一键完成。插件遵循 MIT 开源许可协议,目前版本为 v0.1.3,提供完整的单元测试和交互测试保障稳定性。

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 @hucj/dsh-move-session

把 hucj09/dsh-move-session 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-move-session

English | 中文

跨工作区会话迁移插件(dsh Web GUI)。在会话操作区新增 Move Session(迁移会话) 入口: 将当前会话原封不动地复制到另一个工作区(完整保留对话日志、标题、Agent 预设、模型选择), 并支持保留原会话或归档原会话。仅支持空闲会话迁移。

当前版本 v0.1.3。与 dsh-ssh / dsh-task-board 等插件同一套"热插拔"约定: cordis.patch.yml 挂载 + profile node_modules 安装,不改任何 dsh 源码。 本包为零依赖纯 JavaScript,源码即产物(lib/ 即运行时文件),无需构建。


功能

需求 实现
1. 会话操作中新增「迁移会话」 ① 会话头部操作行 Move Session 按钮(图标+文字,与 agent 预设、子代理目录、任务列表并列);② 侧边栏会话行「…」菜单注入「迁移会话」项(紧随重命名/分叉/归档之后,正式安装版支持)
2. 原封不动迁到新工作区,保留全部上下文 复制完整事件日志(消息、工具调用、标题、agent-preset/selected、request/header 等全部事件原样保留),目标工作区新建会话记录
3. 保留原会话 或 归档原会话 对话框内单选:保留原会话(默认)或 归档原会话(真迁移)
4. 合适的 UI 交互 图标+文字按钮 → 模态对话框(目标工作区单选 + 模式单选 + 错误/成功态),迁移后自动跳转/提供打开入口;全部文案跟随 dsh 语言设置(中/英)

其它细节:

  • 仅空闲会话可迁移:会话运行中(agent running)时按钮置灰,宿主端再次校验并拒绝。
  • 跨端自动刷新:复制会话经 agents.create 发布为 live(与官方分叉同一路径),触发 host/session-added 帧;attachSession 触发 host/workspace-changed 帧;归档触发 host/archived-sessions-changed 帧——所有打开标签页的侧边栏即时更新,无需刷新页面。
  • 模型与预设继承:副本以源会话日志中最后一次 request/header 的 provider/model 作为 agentOptions(优于官方分叉的"当前默认模型"),并以源会话的 agent 预设(agentPreset 或最后一条 agent-preset/selected 事件)组合其 agent 世界。
  • 血缘保留:副本 header 记录 parentSession = 源会话 id、seedLength = 全部事件数, 与官方分叉的 lineage 语义一致;时间戳、事件顺序逐字节保留。
  • 多会话安全:副本使用新会话 id(session-mv-<time36>-<seq36>),不覆盖、不删除任何 现有记录;"保留原会话"模式中源会话完全不动。
  • 同名区分:仅当目标工作区已存在同名会话时,副本标题追加 [MS<n>] 标记 (如 我的会话 [MS1]),n 取目标区已有 [MS<n>] 的最大值 + 1——重复迁移自动递增不冲突, 已带标记的副本再次迁移时替换而非累积;无同名则保持原标题,无标题会话不加。 与官方分叉的数字后缀 (1) / (1) 明显不同。
  • 空工作区支持:迁移不依赖目标工作区是否有会话,新工作区可直接作为迁移目标(目录需存在)。

迁移会话示例


安装

方式一:npm 发布后(推荐)

dsh plugin --profile web add @hucj/dsh-move-session

方式二:本地路径(开发调试)

git clone git@github.com:hucj09/dsh-move-session.git   # 或使用已有源码目录
cd dsh-move-session
npm run check     # 语法检查 + 全部单元/结构测试(本包零构建,lib/ 即产物)

然后安装:

dsh plugin --profile web add link:/path/to/dsh-move-session

link: 安装为符号链接:源码改动后重新运行 npm run check 即可,重启 dsh 生效。 (也可用 file: 安装为一次性拷贝,源码后续改动不会自动同步。)

安装后重启 dsh web(新 bundle 只在下次启动时加载),浏览器 Ctrl+F5 强刷, 打开任意会话后头部操作行出现「迁移会话」按钮即安装成功。

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-prompt-optimizer 下一个 Next dsh-skin-studio →