Resolves the original local path of files uploaded to .dsh-uploads by matching file name, size, and sha256.
Install
# from a prebuilt release tarball
dsh plugin --profile web add "https://github.com/wlc114514/dsh-upload-origin/releases/download/v0.1.0/dsh-upload-origin-0.1.0.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:wlc114514/dsh-upload-origin
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
A host-side plugin for DeepSeek Harness that resolves the original local absolute path of a file the user dragged into the conversation.
Why
When a file is dragged into the web composer, the browser upload surface can send the file bytes and its display name, but it cannot expose the original absolute path to JavaScript. DSH stores the uploaded snapshot under:
<session cwd>/.dsh-uploads/<sessionId>/<sha256-16>-<name>
dsh-upload-origin runs on the DSH host, scans the session workspace and common user folders, and matches that snapshot against local files by name + size + sha256. The resolved original path is then injected into the system prompt for the current agent and is also available through a tool.
What it does
Watches the current session's
.dsh-uploadsdirectory when a turn is assembled.Keeps only uploads that a human prompt actually referenced.
Resolves each referenced upload against local files:
- first through the official workspace file-reference index (
ctx.fileReferences); - then through a bounded filesystem scan of the session cwd,
Desktop,Documents,Downloads,OneDrive, and a shallow home scan.
- first through the official workspace file-reference index (
Injects a mapping block into the system prompt:
[Uploaded files: original local paths] - uploaded: .dsh-uploads/session-.../7538541a1efdc6c6-report.docx original: C:\Users\Alice\Desktop\report.docx [exact] Prefer this original path when the user refers to their local file; the .dsh-uploads copy is a snapshot.Registers the
resolve_uploaded_filetool for on-demand lookup.
Install
Install the prebuilt tarball from GitHub Releases:
dsh plugin --profile web add https://github.com/wlc114514/dsh-upload-origin/releases/download/v0.1.0/dsh-upload-origin-0.1.0.tgz
The package declares dsh.bundle, so it installs through the normal DSH bundle/profile flow.
Tool: resolve_uploaded_file
Arguments:
| Argument | Type | Description |
|---|---|---|
file_path |
string, optional | Uploaded path, absolute or relative to the session workspace. |
name |
string, optional | Original file name to locate when no uploaded path is known. |
search_roots |
string[], optional | Extra absolute directories to scan. |
max_results |
integer, optional | Maximum candidates to return (1-20, default 10). |
The result contains the uploaded path, the original name, size, sha256, the best original path, confidence, candidates, scanned roots, and scan metadata.
Confidence values:
| Confidence | Meaning |
|---|---|
exact |
Name, size, and sha256 all match. |
name+size |
Name and size match; sha256 was not checked or differs. |
name+size-hash-differs |
Name and size match, but content has changed since upload. |
name-only-size-differs |
Same name, different size. |
name-only |
Same name only. Verify manually. |
Configuration
The plugin accepts these optional config fields in a bundle patch row:
- id: upload-origin
name: 'dsh-upload-origin'
config:
maxSearchFiles: 250000
searchTimeoutMs: 9000
maxDepth: 12
maxHashChecks: 30
maxResults: 10
recentUploadMs: 604800000
maxRecentUploads: 8
autoResolveTimeoutMs: 7000
| Field | Default | Description |
|---|---|---|
maxSearchFiles |
250000 |
Maximum filesystem entries visited per resolution. |
searchTimeoutMs |
9000 |
Overall search deadline per resolution. |
maxDepth |
12 |
Directory depth for common roots. |
maxHashChecks |
30 |
Maximum candidate files whose content is hashed. |
maxResults |
10 |
Maximum candidates returned by the tool. |
recentUploadMs |
604800000 |
Only uploads newer than this are auto-resolved (7 days). |
maxRecentUploads |
8 |
Maximum recent uploads considered per prompt assembly. |
autoResolveTimeoutMs |
7000 |
Maximum wait for automatic prompt mapping per turn. |
Limitations
- Browsers do not expose the original absolute path during drag-and-drop. This plugin recovers it by matching the uploaded snapshot on the host.
- If the original file was modified after upload, the sha256 will differ; the plugin falls back to name + size or name-only candidates.
- Files outside the default roots are not found automatically. Pass
search_rootsto the tool or configure additional roots in a future version. - The uploaded copy remains the durable source of truth for reading; the original path is used when the user wants to edit their local file.
Security
- Host-side only. No network calls.
- No credentials are read, stored, or transmitted.
- The plugin reads only local files whose names match the uploaded snapshot; content hashes are computed locally to confirm the match.
- The
resolve_uploaded_filetool is read-only.
License
MIT
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 27530
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
superdesigndev/treg★ 1711
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1115
Tencent CloudBase backend for DeepSeek Harness — scaffold and deploy full-stack apps from chat, render query results as table cards with paging, sorting and CSV export, preview a deployment on its domain, and call the CloudBase MCP toolset (`mcp__cloudbase__*`) with device-code login.
gitroomhq/postiz-agent#dsh-postiz★ 475
Connects DeepSeek Harness to Postiz over MCP: list connected social media channels, fetch per-platform posting rules, and schedule, draft, or publish posts to X, LinkedIn, Instagram, Facebook, Threads, TikTok, YouTube, Reddit, Bluesky, Mastodon, Discord, Slack, Telegram and more; adds a postiz workflow skill.
EthanYoQ/Invoice-Downloader#dsh-invoice-downloader★ 428
Local IMAP invoice download, OCR, archive, and Excel reimbursement summaries for DeepSeek Harness.
anysearch-team/anysearch-dsh★ 420
AnySearch-powered real-time web and vertical search provider for DeepSeek Harness.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.