DeepSeek Harness plugin

dsh-session-import-junelear

Import and verify DeepSeek Harness session exports with state sync, rollback protection, and an in-app workflow

Jump to install

Source facts

Repository
JuneLearn/dsh-session-import
Latest update
Aug 15, 2026
Category
Workflow & Automation
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/JuneLearn/dsh-session-import
Plugin: dsh-session-import-junelear
Author: JuneLearn

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README.mdSource · read only
README language

DSH Session Import

Need to restore a DeepSeek Harness conversation on another computer, another deployment, or a new workspace? This plugin reads .zip archives and bare .jsonl logs produced by DSH /export, validates their structure and SHA-256 fingerprint, and restores the content as a new DSH session. The complete workflow is available from an Import conversation dialog on the new-session page.

中文说明

Related projects

gpt-image-2 text-to-image and image-to-image support to DSH.

configures independent reasoning levels and wire values for third-party providers and models.

Features

  • Imports .zip archives and bare .jsonl session logs produced by DSH

/export.

  • Adds an Import conversation button to the new-session page with file

selection and drag-and-drop support.

  • Previews the title, message counts, tool activity, turns, original workspace,

model, and session state before importing.

  • Always allocates a new session ID and never overwrites an existing session.
  • Supports a target workspace, custom title, original timestamps or restamping

to the current time.

  • Selectively synchronizes model and reasoning effort, agent preset,

permissions, sandbox, approval policy, and plan mode.

  • Displays SHA-256 and optionally enforces an expectedHash match.
  • Supports side-effect-free dryRun=1 validation and immediate open=1

session resume.

  • Rolls back persistence, workspace attachment, or load-validation failures so

partial sessions are not left behind.

  • Restricts deletion to sessions successfully imported and registered by the

current plugin process instead of accepting arbitrary cold-session IDs.

  • Validates ZIP CRC-32, central-directory metadata, entry bounds, and local

header names, and rejects encrypted, multi-disk, and ZIP64 archives.

  • Handles request cancellation, file-selection races, Escape, focus restore,

and responsive layouts in the browser client.

Installation

Prerequisites

  • Install Node.js. DSH currently supports Node.js

22.19.x or version 24 and newer; Node.js 24 LTS is recommended. Node.js includes npm and npx.

  • Install Git so the plugin can be fetched from GitHub.
  • Install pnpm. Both methods require pnpm because dsh plugin invokes it in the

profile directory to install or remove plugins.

  • Your network must reach registry.npmjs.org and github.com. Configure a

working network proxy if npm or GitHub is unavailable or unstable.

  • Method 1 does not require a DeepSeek Harness source checkout. Method 2 also

requires that checkout.

Check the basic environment first:

node --version
npx --version
git --version
corepack enable
pnpm --version

If corepack enable fails with a permission error, run it once from an Administrator PowerShell. Alternatively, use another option from the pnpm installation guide.

If downloads fail with ECONNRESET, ETIMEDOUT, or a GitHub connection error, set a proxy for the current PowerShell window. Port 7890 is only an example; replace it with your proxy's actual port:

$proxy = "http://127.0.0.1:7890"
$env:HTTP_PROXY = $proxy
$env:HTTPS_PROXY = $proxy
$env:npm_config_proxy = $proxy
$env:npm_config_https_proxy = $proxy

These variables only affect the current PowerShell window and disappear when it is closed.

Method 1: npx (recommended for regular users)

This method does not require a DeepSeek Harness source checkout or a global dsh installation, but Git and pnpm must already be available:

npx --yes -p @deepseek-ai/dsh dsh plugin --profile web add github:JuneLearn/dsh-session-import

Start Web through the same package runner after installation:

npx --yes -p @deepseek-ai/dsh dsh web

Method 2: pnpm with the Harness source tree (recommended for developers)

Enter the DeepSeek Harness source root. Install its dependencies once, then install the plugin:

cd D:\deepseek-harness
pnpm install
pnpm dsh plugin --profile web add github:JuneLearn/dsh-session-import

Start Web from that source directory afterward:

cd D:\deepseek-harness
pnpm dsh web

The package's dsh.bundle declaration adds the plugin to the Web profile automatically. Neither method requires editing cordis.patch.yml. Web listens on http://127.0.0.1:3080 by default.

Local development install

Link the working tree directly into the Web profile while developing locally:

cd D:\deepseek-harness
pnpm dsh plugin --profile web add "D:\CodexFile\临时文件夹\dsh-session-import"
pnpm dsh web

After a local link install, source changes normally require only a dsh web restart and browser refresh rather than another installation.

Upgrade

Run the corresponding installation command again. No uninstall or manual profile-patch maintenance is required.

npx method:

npx --yes -p @deepseek-ai/dsh dsh plugin --profile web add github:JuneLearn/dsh-session-import

pnpm source method:

cd D:\deepseek-harness
pnpm dsh plugin --profile web add github:JuneLearn/dsh-session-import

Uninstall

npx method:

npx --yes -p @deepseek-ai/dsh dsh plugin --profile web remove dsh-session-import

pnpm source method:

cd D:\deepseek-harness
pnpm dsh plugin --profile web remove dsh-session-import

Uninstalling the plugin does not remove sessions that were already imported. Restart dsh web; the import button and HTTP endpoints are then removed.

Usage

1. Open DSH Web and click New session at the top of the left sidebar. 2. Find the workspace and mode controls above the central prompt input. 3. Click Import conversation to the right of Standard mode. 4. Select or drop a .zip / .jsonl file produced by DSH /export. 5. Review the structural verdict, SHA-256, counts, original workspace, and synchronizable state. 6. Select a target workspace and adjust title, restamping, and synchronization options as needed. 7. Click Start import. The new session appears in the sidebar and opens automatically.

The control row is approximately:

[Select workspace]  [Standard mode]  [Import conversation]

The plugin also exposes local HTTP endpoints. See the complete [API documentation](./docs/api.md) for parameters and response formats.

Validation and resource limits

  • The upload and decompressed root session log are each limited to 256 MB.
  • One ZIP may contain at most 10,000 entries, and the expanded root log may

contain at most 1,000,000 events.

  • subagents/ logs and media/ files are counted but are not currently

imported with the root session.

  • Structural validation covers event sequence, time, type, references,

turn/step and tool-call pairing, message envelopes, surfaceOp, and sourceEventSeqs.

  • SHA-256 proves equality with a supplied fingerprint, but DSH exports are not

digitally signed and therefore do not prove author identity.

  • Deletion ownership is kept only for the current DSH process. Imported

sessions continue to work after restart, but can no longer be removed through the plugin rollback endpoint.

Permissions and data

  • Uploaded files are parsed locally in memory and are never sent to an external

service.

  • The plugin makes no outbound network requests and does not access API keys or

other DSH credentials.

  • Import writes only to DSH's own session persistence and workspace registry.
  • Rollback only acts on sessions successfully imported and registered by this

plugin process.

Troubleshooting

SymptomCause and action
Import conversation is missingOpen the new-session page, restart dsh web, then press Ctrl+F5
loaded without registeringAn old client bundle is cached; update the plugin, restart DSH, and hard-refresh
400 bad-fileThe file is not valid ZIP/JSONL, or is damaged, encrypted, oversized, or unsupported
409 hash-mismatchThe uploaded file does not match the expected SHA-256 fingerprint
422 structureEvents are broken or references are invalid; failed imported artifacts are rolled back
403 not-importedThe target was not registered by this plugin process, or DSH has restarted
503 persistence / workspaceThe active profile lacks required persistence or workspace services

Development

npm test
npm run check
npm pack --dry-run

tests/plugin.test.mjs covers log and ZIP parsing, structural validation, sequence remapping, transactional rollback, deletion protection, client helper functions, module identity, and package metadata.

Compatibility

The current release targets the public session format, dual-end plugin, WebServer, workspace, and session-persistence interfaces of DeepSeek Harness 0.1.0-rc.6. Harness is still in Developer Preview. If an upgrade breaks the plugin, check event types, message envelopes, Host service names, and the dsh.client.inject declaration first.

Acknowledgements

This project is based on the MIT-licensed kinyokun/dsh-session-import. Thanks to kinyokun for the original work. The upstream copyright and license notice remain in [LICENSE](./LICENSE). See [NOTICE](./NOTICE.md) and the [upstream comparison](./docs/upstream-comparison.md) for attribution and a detailed change summary.

License

[MIT](./LICENSE)