DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
S

@local/dsh-session-isolation

Session Isolation

主机 + 浏览器捆绑包:为配置的工作区中的每个会话提供独立的工作目录——新会话在 `startup` 时使用,现有会话则在工作区根目录下首次恢复时使用——此外还提供一个可打开该目录的标题栏按钮,以及一个用于修复 DSH 构建的文件地址的客户端修复机制

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:wangwuli-AAA/dsh-session-isolation#4d016326759a98ff989a768be1f7c12a4454bff2
README兼容性版本

说明

主机 + 浏览器捆绑包:为配置的工作区中的每个会话提供独立的工作目录——新会话在 `startup` 时使用,现有会话则在工作区根目录下首次恢复时使用——此外还提供一个可打开该目录的标题栏按钮,以及一个客户端修复机制,用于修复 DSH 使用过时工作区根目录构建的文件地址。

兼容性与来源证明

Session Isolation 以 @local/dsh-session-isolation 发布,当前版本为 1.2.3。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/10/30

版本

1.2.3stable
2026/10/30
1.2.1stable
2026/10/30
1.2.0stable
2026/10/26

相关插件

正在加载相关插件…

最新版
1.2.3
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/10/30
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 security-access 分类下经过校验的插件。

Experimental Auto Review@deepseek-ai/dsh-experimental-auto-review针对每个工具的 LLM 授权审查,适用于 DeepSeek Harness Auto 权限预设Cc Safety Netcc-safety-net编码代理 CLI 钩子——阻止破坏性命令和访问机密文件Doctor@linxin666/dsh-doctorDSH 配置档案的事务性救援模式,配备受监督的启动器、隔离的恢复容器、确定性修复、健康监控以及本地 Web 恢复控制台Pocketdsh-pocket把 DeepSeek Harness 装进你的口袋:一个包、一个设置页,手机扫码即同步访问电脑上的 DSH(局域网 + 公网,实时同屏)。

README

dsh-session-isolation

中文说明

Give every session in a chosen DeepSeek Harness workspace its own working directory — new sessions start there, and existing sessions get one the first time they are opened — without turning each session into a separate workspace.

@local/dsh-session-isolation is a local DSH bundle with two halves:

  • Host — listens to agent/created; when a session starts (startup), gets a fresh conversation (clear), or is an existing session resumed while still at the workspace root, it creates <workspace>\<baseDir>\<session-id> and switches the session's working-directory projection to that directory.
  • Browser — adds a folder button to the conversation header (next to DSH's built-in "Open in…" split button) that opens the session directory in the OS file manager, and repairs file addresses that DSH builds against the stale workspace root (v1.2.0).

Session ownership never changes: SessionHeader.cwd stays the workspace root, so the sidebar keeps grouping the session under its original workspace.

default-workspace\
├─ _sessions\                    ← one folder per new session
│  ├─ session-8c0bdfb7-…\
│  │  └─ poem.md
│  └─ session-f7f8c56c-…\
└─ …                             ← existing workspace files, untouched

Features

  • Per-session working directory — agents start in _sessions\<session-id> and only write there unless they explicitly go elsewhere.
  • No workspace surgery — no new workspace entries, no SessionHeader rewrite, no changes to DSH's profile or workspace registry.
  • Existing sessions too — a session that is still at its workspace root gets its own directory on first entry (a new session, a cleared session, or a session resumed after installing the bundle). Sessions that already have their own working directory — including an _sessions folder — are never moved.
  • Subagents included by default — every subagent session gets its own folder (can be turned off).
  • Never blocks a session — any isolation failure is logged as a warning and the session silently keeps the workspace root.
  • Header button only where it makes sense — it queries a read-only Host route instead of guessing a path, and stays hidden for sessions that are not isolated.
  • Client-side address repair (v1.2.0) — file links and file cards in chat open correctly in the document preview even though the working directory is no longer the workspace root.

Screenshots

The folder button added by the bundle, right of DSH's built-in "Open in…" split button:

Folder button in the conversation header

The files panel browsing the same workspace — every session folder lives under _sessions:

Files panel with _sessions expanded

Session folders

Animated tour of the files panel, zooming into _sessions — one folder per isolated session:

Animated tour of the files panel

Requirements

  • DSH Desktop 0.2.1-rc.2 or later (tested on 0.2.1-rc.2, 0.2.1-rc.3 and 0.2.1-rc.5).
  • The profile enables @deepseek-ai/dsh-working-directory and the browser module system — both are on by default in the desktop build.
  • Windows was the primary target; the Host half uses only node: built-ins and path semantics, so other platforms work as long as the configured workspace paths are absolute.

Install

The package is not published to npm. DSH links a local bundle into the current profile and mounts the Host row declared by the bundle's own cordis.patch.yml.

  1. Clone this repository into a stable directory, for example D:\dsh-session-isolation.
  2. Edit cordis.patch.yml: replace the example workspaces entry with your own workspace root (absolute path; write doubled backslashes in YAML on Windows).
  3. Install the folder as a bundle and restart DSH Desktop:
    • DSH Desktop → Plugins → install a bundle from a folder → select this directory; or
    • from a DSH session that exposes the plugin manager: plugin_manager install_bundle target=<repo path>

A local install is a link: DSH uses the folder in place, so keep it where it is (moving or deleting it disables the plugin).

Configuration

The inserted session-isolation row in cordis.patch.yml:

FieldTypeDefaultMeaning
workspacesstring[]requiredAbsolute workspace roots. Only sessions whose header.cwd equals one of them are isolated.
baseDirstring_sessionsDirectory name under each workspace. Relative paths are resolved per workspace; absolute paths are used as-is.
isolateSubagentsbooleantrueAlso give subagent sessions their own directory.

Invalid configuration makes the plugin fail at activation (the row shows as failed) instead of silently doing nothing.

How it works

Host side

agent/created is a serial event: DSH awaits every listener before the session creation transaction resolves, and a listener that throws aborts creation. The bundle therefore treats isolation as best-effort — the whole routine is wrapped in try/catch, failures only produce a warn log line, and the session keeps the workspace root.

It acts whenever a session's header.cwd matches a configured workspace and the session is still at that workspace root; the source only decides when DSH creates the agent (startup, clear, resume, compact). A session that already replayed its own working directory — an _sessions folder, or one the user moved to — is left alone, so isolation is applied exactly once per session.

Header button

The button never guesses: it asks the Host, then reuses DSH's own file-manager routes.

GET /session-isolation/session-directory?sessionId=<id>
  -> 200 {"sessionId": "...", "directory": "<workspace>\\_sessions\\<id>"}   isolated
  -> 404                                                                     not isolated / deleted

The route shares the web server's trust fence (connection.requestRejection, i.e. DSH's Host/Origin check plus browser auth), answers 405 for non-GET and 400 without a session id. Once a path is returned, the browser half calls the profile's own GET /open-in-app/apps and POST /open-in-app/open; on Windows that is File Explorer.

File-address repair (v1.2.0)

DSH's browser code assumes session working directory == workspace root. With an isolated session that assumption can produce two kinds of broken file addresses:

  • missing separator — .../default-workspace_sessions/session-<id>/a.md (workspace root glued to baseDir);
  • working-directory-relative — a.md, which the Host then resolves against the workspace root and misses.

The browser half wraps sidebarRight.openResource and fixes both before opening: it inserts the missing / when a known workspace root is glued to baseDir, and prefixes relative paths with <baseDir>/<session-id>/ once the Host confirms the session is isolated. Repair only applies to configured-workspace, isolated sessions; every other address passes through untouched. The wrapper is idempotent, routes to the original method, and never throws.

Only newly opened files are repaired — tab addresses persisted by an older build are not rewritten, so click the file once after upgrading.

Changing index.js or client.js requires restarting DSH Desktop: the browser half is served from exports["./client"] by the client module system and is composed at boot.

Verification

  1. A session's log (session.v4.jsonl.zstd) contains a working-directory/change event pointing at _sessions\<session-id>.
  2. The system prompt shows Current working directory: <workspace>\_sessions\<id>.
  3. Sessions in other workspaces never get an _sessions directory.
  4. Resuming a session that already has its own directory adds no working-directory/change event; resuming a session still at the workspace root adds exactly one and gives it a folder.
  5. The header folder button appears and opens the session folder in the file manager.
  6. Clicking a file link/card inside an isolated session opens the document preview (v1.2.0 fix).

Compatibility

Tested with DSH 0.2.1-rc.2, 0.2.1-rc.3 and 0.2.1-rc.5 on Windows 11. The bundle only uses public, stable contracts and patches no DSH internals:

  • Host: agent/created (serial, awaited listener), the workingDirectory service, webServer.register + connection.requestRejection, sessions.get.
  • Browser: dsh.client packaging (exports["./client"] → /plugins/<name>/client.js), the conversation.session.header.utilities slot, the slots / locale / sessions services, and DSH's /open-in-app routes.

Behaviour of the host and client contracts above was re-checked against 0.2.1-rc.3 and again against 0.2.1-rc.5 (2026-10-30) — working directory service, agent/created signature, webServer.register + connection.requestRejection, slot registration (the bundle's header button is registered and active), file-address grammar and /open-in-app body validation are unchanged — no code changes were required. v1.2.2 (2026-10-30) additionally isolates resumed sessions that are still at the workspace root, so existing sessions get a folder the first time they are opened after installing the bundle; this was verified on 0.2.1-rc.5. v1.2.3 (2026-10-30) makes the header button retry the directory lookup for a few seconds after a miss (and never cache a miss), so a session restored while the window boots still gets its button. Runtime dependencies: none (Node built-ins only).

Notes

  • The plugin never changes sandbox, approval or permission settings. On Windows, DSH's own sandboxed shell can have environment-specific issues in some builds (e.g. console child processes under workspace-write, or a bundled PowerShell without its Modules directory); those are unrelated to this bundle.
  • Deleting a session may leave an empty _sessions\<id> folder behind; nothing cleans it up automatically.
  • A _sessions folder can be deleted at any time — the session falls back to the workspace root, and the folder is recreated on its next entry.

Uninstall

Disable the session-isolation row in the plugin manager to stop isolating sessions, or remove the whole bundle. Existing sessions and their _sessions folders are unaffected and can be deleted by hand.

Development

  • index.js — Host half (isolation + read-only directory route).
  • client.js — browser half (header button + address repair), served via exports["./client"].
  • cordis.patch.yml — the Host row inserted by the bundle.
  • locale/, icon.svg — plugin-manager display metadata.

License

MIT — see LICENSE.