The problem I kept hitting
I use the browser interface in DeepSeek Harness. I often ask the agent to inspect a local file or work inside a local directory.
The path is visible in Finder. I select the file and press Cmd + C, but the DSH composer receives no absolute path. I have to use “Copy as Pathname,” open a terminal, or type the path by hand.
Each workaround adds another step between finding a file and asking the agent to use it. I was repeating that step throughout the day.
/Users/you/code/my-project/src/index.js
The Finder–browser boundary
Finder places a native list of file references on the macOS Pasteboard. Ordinary clipboard text contains no absolute path. AppKit exposes the file list through NSFilenamesPboardType.
The DSH composer runs in a browser. Browser security rules prevent a web page from turning a copied file into its local absolute path. Without that rule, any page could learn the layout of my filesystem.
The path stays on the macOS host, outside the browser's reach. DSH receives nothing it can insert into the composer.
Finder
└─ macOS Pasteboard: native file list
╳ browser filesystem boundary
DSH Web composer
└─ wants a plain absolute path
The shortcut I wanted
I wanted one extra shortcut while keeping ordinary paste unchanged:
- Select one or more files or folders in Finder and press Cmd + C.
- Return to DSH Web.
- Press Ctrl + V.
- Insert the absolute paths into the current draft, one per line.
Cmd + V remains normal text paste. The plugin ignores Ctrl + V unless the clipboard contains file paths.
My solution: read on the host, write in the client
I wrote dsh-paste-path, a macOS plugin for the DSH Web profile. The host reads the Pasteboard; the client writes to the composer.
1. Read the native Pasteboard on the host
The host plugin runs osascript with AppKit and reads NSFilenamesPboardType. Finder can copy several files at once, so the plugin returns a list of paths. It accepts plain text when every non-empty line contains an absolute path.
The plugin exposes two local routes. The first checks whether a path is ready. The second returns the paths after I press the shortcut. The host tracks the Pasteboard change count and reuses its last result until the clipboard changes.
2. Insert paths from the DSH client
The client extension shows “Ctrl+V Paste path” when it finds a valid path. After I press the shortcut, it appends new paths to the composer draft and skips duplicates.
I kept the extra shortcut scoped to file paths. All other clipboard input follows the browser's normal behavior.
Finder Cmd+C
↓
macOS Pasteboard
↓ osascript / AppKit
DSH host plugin on 127.0.0.1
↓ same-origin request
DSH Web composer
↓ Ctrl+V
absolute path in the draft
Keep clipboard access local
The clipboard belongs to the machine running dsh web. The plugin accepts clipboard requests over loopback and checks the origin before it inserts a path.
- The host returns path strings and leaves file contents untouched.
- The host rejects clipboard requests from non-loopback addresses.
- The plugin registers no routes on Linux or Windows.
- Remote DSH setups need file upload or a client-side companion.
A DSH process on another machine cannot read my Mac's clipboard. SSH port forwarding makes the request look local to the server while the clipboard stays on my Mac.
Install it
The package is available on npm:
dsh plugin --profile web add dsh-paste-path
After installation, restart dsh web and refresh the page. The source, implementation notes, and current limitations are in the GitHub repository.
A narrow plugin for a narrow task
The operating system knows the file path. Browser security keeps it hidden from arbitrary pages. A local agent can use it after I ask for that transfer.
I kept the browser boundary intact and added a loopback bridge for one shortcut. The plugin reads path text, writes it to the draft, and stops there.