@collect-flow2/dsh-deeplink
v0.1.0
Published
Start a DeepSeek Harness Web conversation from a URL: /?project=<workspace>&question=<text>.
Maintainers
Readme
URL Deep Link
Start a conversation in the DeepSeek Harness Web UI directly from a URL:
http://127.0.0.1:3080/?project=crawl-next&question=run%20the%20testsThe plugin runs entirely in the browser. It reads the query parameters once, strips them from the address bar, resolves the Workspace, creates a fresh Session in it, reveals it, and sends the question as the first prompt.
Parameters
| Parameter | Required | Meaning |
| --- | --- | --- |
| question | yes | Prompt text, URL-encoded. Sent verbatim as one text block. |
| project | no | Workspace title (exact, case-insensitive) or the last segment of its path (or the full path). Unknown names fall back to the Workspace of the Session currently on screen. |
| autosend | no | default on. autosend=0 only leaves the text in the composer draft; nothing is sent. |
| preset | no | Agent preset id for the new Session (for example standard, ptc, minimal, cordis). Omit to use the Host default. |
A URL without a non-empty question is ignored completely.
Install
dsh plugin --profile web add -w @collect-flow2/dsh-deeplinkFrom a local checkout, install the directory instead:
dsh plugin --profile web add -w /Users/halo/Desktop/opensource/dsh-deeplinkThen make sure @collect-flow2/dsh-deeplink is listed in the profile's
dsh.profile.bundles (installing through the Plugin Manager page does that, and
a running Host reconciles a newly added bundle dependency on its own). The
profile's patchReload is live, so the running Host recomposes after the
manifest change; refresh the Web page.
The Host serves the browser bundle from
/plugins/@collect-flow2/dsh-deeplink/client.js.
Uninstall:
dsh plugin --profile web remove -w @collect-flow2/dsh-deeplinkand drop the bundle from dsh.profile.bundles.
Publish
npm publishpublishConfig.access: public makes the scoped package public on the first
release.
How it starts the conversation
readLink(location.search)parses the URL, thenhistory.replaceStatestrips the query so a refresh does not start a second conversation.- Waits for the workspace and session catalogs (
phase === 'ready'), then for the UI's initial Session restoration to settle. Acting earlier would be undone byui-workspace's ownreplaceMain. ctx.sessions.create({ workspaceId, agentPreset? }).ctx.uiWorkspace.openSession(sessionId)reveals it.ctx.sessions.using(sessionId, { source: 'deeplink' }, ref => ref.binding.session.prompt([{ type: 'text', text: question }], 'queue')).
With autosend=0 step 5 is replaced by writing the per-Session conversation
draft (localStorage['dsh.conversation.<sessionId>']), so the text waits in the
composer for a human click.
Security
Autosend is on by default, which means any link can start a prompt in a browser that is already authenticated to this Harness — a link-click CSRF / prompt-injection surface. Mitigations:
- Keep the server on its default loopback bind; never expose it to a network you do not trust.
- Use
autosend=0for links you post into chat, docs, or issue trackers. - Authentication is still required: a browser without the Web UI session cookie
receives
401and the plugin never runs. Do not append the launchtokento a deep link: the token branch303-redirects to./and drops the parameters.
Files
| File | Role |
| --- | --- |
| package.json | Bundle manifest plus the dsh.client declaration |
| cordis.patch.yml | Inserts the deeplink row |
| index.js | Empty Host half |
| client.js | Hand-written Client bundle (query parsing, navigation, prompt) |
| locale/en.json, locale/zh.json | Plugin Manager title and description |
| scripts/smoke-test.mjs | VM-based smoke test over a mocked Client Context |
Verification
node --check index.js && node --check client.js
node scripts/smoke-test.mjsThe smoke test loads client.js into a VM with a browser-like sandbox, binds it
to a mocked Client Context, and asserts: URL stripping, Workspace resolution by
title/path/fallback, Session creation, reveal, prompt content/mode, preset
passthrough, autosend=0 draft behavior, and that a prompt rejection is logged
instead of escaping as an unhandled rejection.
Browser verification: refresh the Web page, then open a deep link in the same browser. The address bar should lose the query, a new Session should appear in the requested Workspace with the question as its first user message.
