Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture and supports extensible features. When developing agents or managing long-term conversations, you often need to bring historical sessions from DeepSeek’s web interface into DSH as context. The dsh-importer plugin solves this synchronization problem by syncing web sessions to local files, which can then be used by DSH’s file-reading tool.

Plugin Overview

This plugin syncs sessions from chat.deepseek.com (DeepSeek web) to DeepSeek Harness (DSH) and uses them as AI context. It is maintained by PrismScopes and licensed under the MIT License.

Core Features

  • Automatic Synchronization: After the token is configured for the first time, it automatically triggers an official full export and imports the session list (with accurate message counts). After that, it automatically checks for new sessions and pulls their content at the configured interval (2/5/10 minutes).
  • Automatic Refresh for Pulled Sessions: Sessions that already exist locally are automatically re-pulled when newer versions are available remotely, keeping local content up to date.
  • Settings Page: A new “Web Sync” section is added to DSH settings, including three subpages:
    • Session List: Supports search, sorting (last activity, title, message count), pagination, on-demand pulling, and inline viewing (including thinking process).
    • Local Sessions: Sessions whose content has already been pulled. Supports “Send” (fills the input field with a prompt referencing the local file, allowing the AI to read the file itself), viewing, and deletion.
    • Settings: Token management, automatic synchronization toggle and interval, help for obtaining tokens, and operation logs.
  • Security: The token endpoint validates Origin and only accepts sources from chat.deepseek.com and localhost; tokens are stored only on the node side.

Installation and Enabling

Install it in the DSH web profile (local path method):

dsh plugin --profile web add link:C://path//to//dsh-importer

Or add the following to the dependencies in H:\dsh-data\profiles\web\package.json:

"dsh-importer": "link:C://path//to//dsh-importer"

Then restart DSH. If the “Web Sync” section appears in the settings page, the installation was successful.

Typical Usage

  1. Open DSH Settings → Web Sync → Settings, and paste the token (see the help on the settings page for how to obtain it).
  2. After saving, full initialization starts automatically. Wait for it to complete.
  3. Sessions will then be synchronized automatically. In “Local Sessions”, click “Send” on a session row. A prompt (referencing the dsweb-sessions-<id>. file path) will be filled into the input field. Confirm and send it, and the AI will directly read the full session content via the file-reading tool.

Applicable Scenarios and Notes

  • Data Files: Located in $DSH_HOME/dsh-importer/ (default ~/.dsh/dsh-importer/), including dsweb-token.json, dsweb-config.json, dsweb-index.json, and dsweb-sessions-<id>.json.
  • Data Migration: Older dynamic plugin versions were limited by the fs sandbox and stored data in the DSH program directory. After hardening, the plugin now writes directly using native Node.js fs. After upgrading, if the old directory still contains data, you need to manually move it to the new directory.
  • Development Notes: This is a pure JavaScript dual-side plugin. The Host half uses subprocess + curl (with browser headers to bypass risk control). Data persistence uses native Node.js fs/promises direct writes. The Client half is a lazy CJS bundle.

Summary

This plugin provides the ability to sync web sessions to local files and supports one-click referencing. By converting web sessions into local files and leveraging DSH’s file-reading tool, it achieves seamless context continuity.