Preface

When users drag files from a web editor into the conversation, the browser can only transfer file bytes and display names, and cannot expose the original absolute paths of the files in the local system. DeepSeek Harness (DSH) stores uploaded snapshots under <session cwd>/.dsh-uploads/<sessionId>/<sha256-16>-<name>.

The dsh-upload-origin plugin runs on the DSH host side. By matching the name, size, and SHA256 hash of uploaded snapshots, it scans the session workspace and common user folders to recover the original local paths of the files. This path is then injected into the current agent’s system prompt and can be queried on demand via a tool.

Plugin Overview

This is a DSH host plugin that solves the path tracing problem after file upload. The plugin is maintained by wlc114514, belongs to the “network tools” category, and uses the MIT license. It watches the .dsh-uploads directory, filters referenced files, combines a file reference index with bounded filesystem scanning, and finally injects the original path mapping into the system prompt. It also registers a resolve_uploaded_file query tool.

Installation

Install the precompiled tarball using the official command. The plugin is automatically installed through DSH’s bundle/profile process:

dsh plugin --profile web add https://github.com/wlc114514/dsh-upload-origin/releases/download/v0.1.0/dsh-upload-origin-0.1.0.tgz

Configuration

The plugin can be configured using bundle patch lines. The main parameters include:

- id: upload-origin
  name: 'dsh-upload-origin'
  config:
    maxSearchFiles: 250000
    searchTimeoutMs: 9000
    maxDepth: 12
    maxHashChecks: 30
    maxResults: 10
    recentUploadMs: 604800000
    maxRecentUploads: 8
    autoResolveTimeoutMs: 7000

Tool: resolve_uploaded_file

The plugin registers a resolve_uploaded_file tool for manually querying the original path of a file when needed.

Parameters

  • file_path (string, optional): the path of the uploaded file, which can be an absolute path or a path relative to the session workspace.
  • name (string, optional): the original file name, used to locate the file when the uploaded path is unknown.
  • search_roots (string[], optional): additional absolute scan directories.
  • max_results (integer, optional): the maximum number of candidate results to return (default 10).

Return Values and Confidence

The tool returns the upload path, original name, size, SHA256 hash, best original path, confidence, candidate list, scan roots, and metadata. The confidence indicates how precisely the match corresponds:

Confidence Meaning
exact Name, size, and SHA256 all match.
name+size Name and size match; SHA256 was not checked or the hash differs.
name+size-hash-differs Name and size match, but the content changed after upload.
name-only-size-differs Only the name is the same, while the size differs.
name-only Only the name is the same; manual verification is required.

Notes

  • Runtime environment: The plugin runs on the host side only. It makes no network calls and does not read, store, or transmit credentials. All content hash calculations are performed locally.
  • Tool permissions: The resolve_uploaded_file tool is read-only.
  • Browser limitations: Because browsers do not expose the original absolute path during drag-and-drop upload, this plugin recovers the path through host-side matching.
  • File changes: If the original file is modified after upload, the SHA256 hash will differ. The plugin falls back to “name+size” or name-only candidates.
  • Scan scope: Files outside the default scan roots must be specified through the tool parameter search_roots or await future configuration extensions.