Preface¶
In DeepSeek Harness (DSH), passing information between multiple sessions often requires manual copy-paste or external scripts. When you need to transfer conclusions, reminders, or handoff content between a “dispatcher session” and a “worker session,” this process is not only tedious but also error-prone. Additionally, batch-creating new sessions and workspaces with specific model and reasoning effort settings via the UI is inefficient.
Below is an introduction to dsh-session-bridge, a Host tool plugin that adds cross-session message delivery and session/workspace creation capabilities to DSH.
Plugin Overview¶
dsh-session-bridge is maintained by fengnowuyu-beep. It is a workflow-type plugin that enables cross-session communication and session management through three Host tools:
session_send: Deliver a user message to another DSH sessionsession_create: Create a new blank session with optional workspace, title, model, and reasoning effortworkspace_create: Create or reuse a workspace and set up its directory
Starting from plugin v0.3, the target session whitelist restriction has been removed. It supports text, images, and attachments. Images support PNG/JPEG/WebP/GIF formats, while regular files support local paths, file:// URLs, and http(s) URLs.
Core Features¶
session_send: Deliver a Message to Another Session¶
The tool signature is as follows:
{
"name": "session_send",
"parameters": {
"sessionId": "string (required)",
"text": "string (optional; at least one of text and attachments is required)",
"attachments": "string[] (optional; local path / file:// / http(s) URL)"
}
}
Sending Text¶
{
"sessionId": "session-00000000-0000-0000-0000-000000000000",
"text": "构建已完成,结果在 dist/ 目录;请接着做验收。"
}
Sending an Image¶
{
"sessionId": "session-00000000-0000-0000-0000-000000000000",
"text": "这是最新的界面截图。",
"attachments": ["E:/Data/Project/screenshots/ui.png"]
}
Images are transmitted to the target session via the host’s fileUploads.uploadImageStream. If the target model does not support vision, it will automatically fall back to a regular file attachment.
Sending a Regular File or URL¶
{
"sessionId": "session-00000000-0000-0000-0000-000000000000",
"text": "报告和构建日志在附件里。",
"attachments": [
"E:/Data/Project/report.pdf",
"https://example.com/releases/build.log"
]
}
Regular files are uploaded via fileUploads.uploadStream as a stream. URLs are first downloaded to a system temporary file and then uploaded; the temporary file is automatically deleted after the send is complete.
Attachment and Path Rules¶
- Local attachment paths support absolute paths, relative paths (resolved relative to the calling session’s cwd), and
file://URLs - URLs that contain localhost, 127.0.0.1, or other local/private IP literals are rejected by default; set
allowPrivateUrls: trueif a local development server is needed - The plugin imposes no hard limits on the number of attachments, total byte size, or text length; the actual limits come from the host itself
Delivery Mode and Success Indicators¶
sendMode can be set to queue or steer:
queue: Starts a new turn when the target is idle; queues the message if the target is runningsteer: Inserts the message into the currently running turn, interrupting it more aggressively
A successful session_send delivery only means the host has acknowledged and placed the message in the target session’s queue; it does not mean the target has already responded. The return result explicitly states this.
session_create: Create a New Blank Session¶
The tool signature is as follows:
{
"name": "session_create",
"parameters": {
"cwd": "string (optional; absolute path, choose one of cwd or workspaceId)",
"workspaceId": "string (optional; choose one of cwd or workspaceId)",
"title": "string (optional)",
"provider": "string (optional; must be provided together with model)",
"model": "string (optional; must be provided together with provider)",
"reasoningEffort": "string (optional)"
}
}
Example:
{
"workspaceId": "5e0d206a-9c0d-412f-bd7f-7ce7e65f8b50",
"title": "跨会话创建测试会话",
"provider": "deepseek-account",
"model": "deepseek-flash",
"reasoningEffort": "max"
}
Parameter notes:
- Only one of
cwdorworkspaceIdcan be provided; if neither is given, the host’s default directory is used - When only
cwdis provided, the plugin first callsworkspaceRegistry.resolveByPath(cwd)to look up a registered workspace; if found, the session is created under that workspace providerandmodelmust be provided as a pair; if onlyreasoningEffortis given, the default model from the host’s model catalog is used- The model ID and reasoning effort are validated against
modelCatalog()before creation session_createonly creates a blank session; it does not send any message
workspace_create: Create or Reuse a Workspace¶
The tool signature is as follows:
{
"name": "workspace_create",
"parameters": {
"path": "string (required; absolute directory)",
"title": "string (optional)",
"createDirectory": "boolean (optional; defaults to true)"
}
}
Example:
{
"path": "C:/Users/Kaede/AppData/Local/Temp/dsh-shots/bridge-workspace-test",
"title": "跨会话测试工作区",
"createDirectory": true
}
Parameter notes:
pathmust be an absolute pathcreateDirectorydefaults totrue, which recursively creates any missing directories- If a workspace already exists for the same directory, it is reused and the response returns
created: false - Registering a workspace does not delete directories, files, or sessions; to delete a workspace, do so through the UI
Installation & Activation¶
Prerequisites¶
- DSH Desktop or Web composition
@deepseek-ai/dsh-api-session-controllermust be mounted, as it providessessionController- Regular file attachments require the host to have the
fileUploadsservice mounted (@deepseek-ai/dsh-client-file-upload) - The
dsh-headlesscomposition does not includesessionControllerby default, so the plugin will not register its tools - A DSH restart is required after installation for changes to take effect
Installing into a Profile (Local Bundle)¶
The following example uses the desktop profile with the plugin located at E:\Data\Project\DeepSeekHarness\DSH-Homemade-Plugins\dsh-session-bridge:
- Edit
~/.dsh/profiles/<profile>/package.jsonand add the plugin to bothdependenciesanddsh.profile.bundles:
{
"dependencies": {
"dsh-session-bridge": "file:E:/Data/Project/DeepSeekHarness/DSH-Homemade-Plugins/dsh-session-bridge"
},
"dsh": {
"profile": {
"bundles": [
"...existing bundles...",
"dsh-session-bridge"
]
}
}
}
- Install dependencies in the profile directory:
dsh plugin --profile desktop install
-
Configure
allowFileRoots/allowPrivateUrlsas needed -
Restart DSH
Configuration¶
The plugin uses a single Loader configuration entry in the profile. The cordis.patch.yml bundled with the plugin already inserts this entry with the following defaults:
- insert:
- id: session-bridge
name: 'dsh-session-bridge'
config:
sendMode: queue
allowFileRoots: []
allowPrivateUrls: false
To tighten the configuration, override it using the same id in the profile’s own cordis.patch.yml (do not insert a new line):
- id: session-bridge
name: dsh-session-bridge
config:
enabled: true
sendMode: queue
allowFileRoots:
- E:/Data/Project/DeepSeekHarness
allowPrivateUrls: false
Configuration options:
enabled: When set tofalse, the plugin does not registersession_sendsendMode:queueorsteerallowFileRoots: When non-empty, local attachments must reside within these root directories; an empty array means no restriction on local pathsallowPrivateUrls: Whenfalse, URLs containing localhost, 127.0.0.1, or common private IP literals are rejected; whentrue, they are allowed through
Use Cases¶
- Have one session send conclusions, reminders, or handoff content to another session that is waiting
- Dispatch tasks from a “dispatcher” session to multiple already-existing sessions
- Deliver local images, reports, logs, or downloaded files to another session
- Use code/tooling to batch-create new sessions and workspaces instead of clicking through the UI
Notes¶
- The plugin runs with the current DSH process’s privileges; review the source code and license before installing
- The plugin does not modify existing session history or fabricate assistant messages
- A successful
session_senddelivery only means the host has acknowledged it; it does not mean the target has already responded - The plugin depends on the host’s
workspaceController; Desktop and Web compositions include it by default, but headless compositions may not
Ecosystem Context¶
DSH’s philosophy is “everything is a plugin.” The community catalog has no official affiliation with DeepSeek or 幻方 (High-Flyer).
References¶
- Catalog page: https://www.skillhub.cn/plugins/fengnowuyu-beep/dsh-session-bridge
- GitHub: https://github.com/fengnowuyu-beep/dsh-session-bridge
- Repository version: 0.3.2
- License: MIT