dsh-moving-context: Move Session in DeepSeek Harness Workspace

Introduction

DeepSeek Harness (DSH) only provides attachSession / detachSession / insertSessionBefore by default, with no capability to move sessions across workspaces, and no drag-and-drop entry point in the UI. For users who need to organize conversations across multiple workspaces, this is quite a limitation. The dsh-moving-context plugin fills this gap on top of DSH’s official interfaces, offering three invocation methods—CLI, graphical plugin, and skill—so that sessions can be freely moved between workspaces.

What Is This

dsh-moving-context is a plugin and toolkit that provides cross-workspace session moving capability for DeepSeek Harness. It is maintained by muzi18273909375-cell and categorized as a client-side plugin. It works by modifying the first-frame header cwd of the session directory, the workspace membership table (workspace.json), and the projcache used for sidebar display, ensuring consistency across all three locations so that sessions actually appear in the target workspace after a restart.

Core Features

  • Plugin (GUI): Adds a “Move this chat…” option to the ⋯ menu on each sidebar session row. Selecting a target workspace takes effect immediately.
  • Command Line: Supports --list to view workspaces and sessions, --move … --to … to execute a move, --dry for a dry run, --verify for validation, and --json for machine-readable output.
  • Skill: Packages the CLI logic as a skill for autonomous invocation by an agent.
  • Safety & Rollback: Session ID whitelist, atomic writes, automatic rollback on failure, and a backup directory preserving original sessions and configuration.

Installation & Activation

0. Node.js Version

Node.js ≥ 22.15 (with built-in zstd) is required.

# Windows
winget install OpenJS.NodeJS.LTS
node -v
# macOS (or nvm)
brew install node
node -v

1. Clone the Repository

git clone https://github.com/muzi18273909375-cell/dsh-moving-context.git
cd dsh-moving-context
node src/move-session.mjs --help

2. Install the Graphical Plugin

Windows

xcopy /E /I . "%USERPROFILE%\.dsh\plugins\dsh-moving-context"
# Edit %USERPROFILE%\.dsh\profiles\desktop\package.json:
#   Add to dependencies:      "dsh-moving-context": "link:C:/Users/<your-username>/.dsh/plugins/dsh-moving-context"
#   Add to dsh.profile.bundles: "dsh-moving-context"
cd "%USERPROFILE%\.dsh\profiles\desktop"
pnpm install

macOS

mkdir -p ~/.dsh/plugins && cp -r . ~/.dsh/plugins/dsh-moving-context
# Edit ~/.dsh/profiles/desktop/package.json:
#   Add to dependencies:      "dsh-moving-context": "link:/Users/<your-username>/.dsh/plugins/dsh-moving-context"
#   Add to dsh.profile.bundles: "dsh-moving-context"
cd ~/.dsh/profiles/desktop && pnpm install

After installation, completely quit DeepSeek Harness and reopen it. The plugin is loaded at startup; it will not appear if you don’t restart.

3. Install the Skill (Optional)

xcopy /E /I skill "%USERPROFILE%\.dsh\skills\dsh-moving-context"
mkdir -p ~/.dsh/skills/dsh-moving-context && cp -r skill/. ~/.dsh/skills/dsh-moving-context/

4. Verify

node src/move-session.mjs --list

In the UI: click ⋯ on the right side of a sidebar session row → the menu should contain “Move this chat…”.

Typical Usage

Plugin Method (No Need to Exit the Workbench)

  1. Click ⋯ on the right side of a sidebar session row.
  2. Select “Move this chat…”.
  3. Choose the target workspace from the popup list.

Command Line Method (Requires Fully Exiting DSH)

# 1) List workspaces and sessions
node src/move-session.mjs --list

# 2) Dry run (no writes to disk)
node src/move-session.mjs --move "session-title-keyword" --to "target-workspace-name" --dry

# 3) Execute move (supports comma-separated multiple sessions)
node src/move-session.mjs --move session-90d0ddd1,session-60c6acee --to 6dd9307b-a7bf-45aa-9730-f2ba5aeff5a2

# 4) Verify a session
node src/move-session.mjs --verify session-90d0ddd1

Skill Method (Agent Self-Invocation)

After placing the skill directory at ~/.dsh/skills/dsh-moving-context, the agent can directly invoke the CLI interface it provides.

Use Cases & Cautions

  • Suitable for: organizing sessions across different workspaces, batch-migrating sessions, and letting an agent autonomously manage session placement.
  • Cautions:
  • The CLI method requires DeepSeek Harness to be fully exited before running; otherwise, in-memory stale state may overwrite workspace.json.
  • The plugin method takes effect at runtime by rebuilding the in-memory membership table and index, without requiring a restart.
  • The plugin API is local-loopback only; it does not accept cross-origin requests and only accepts application/json.
  • The first frame must contain exactly one header line; otherwise the session may be silently filtered out with no error reported.
  • Path comparisons use realpath; on Windows, be aware of full-width characters and case sensitivity differences.
  • It is recommended to use --dry for a dry run before executing, and to keep backups in session-move-backup/ for rollback purposes.

Summary

dsh-moving-context provides three complete invocation methods for the cross-workspace session moving capability that is missing from DeepSeek Harness, balancing graphical operation with scripting capability. By modifying three data points—the session directory, the workspace membership table, and the sidebar cache—and hardening the safety and rollback mechanisms, it makes session relocation both controllable and traceable. The installation and usage flow is straightforward, making it well-suited for users who need to maintain session structure across multiple workspaces.

  • Directory page: https://www.skillhub.cn/plugins/muzi18273909375-cell/dsh-moving-context
  • GitHub: https://github.com/muzi18273909375-cell/dsh-moving-context
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye