DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

Agent Mode Switcher — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
A

dsh-agent-mode-switcher

Agent Mode Switcher

DeepSeek Harness 插件:模型完成回答后切换当前对话的智能体预设(模式),并在同一会话中继续聊天

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

npx -y @deepseek-ai/dsh plugin --profile web add github:my-dsh-plugin/agent-mode-switcher#9b1757c86582bb1d99706c088f6fb6577fb30ed7
README兼容性版本

兼容性与来源证明

Agent Mode Switcher 以 dsh-agent-mode-switcher 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

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

版本

0.1.0stable
2026/9/14

相关插件

正在加载相关插件…

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

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Headless@deepseek-ai/dsh-headlessdsh one-shot bundle:基于 dsh-base 的直接核心 Agent/Session 运行器,不包含 Host、HTTP 或浏览器层Experimental Agent Team Web Profile@deepseek-ai/dsh-experimental-agent-team-web-profile用于 Agent Teams Remote 和 UI 插件的实验性 Web 配置层Subagent Codex@deepseek-ai/dsh-subagent-codex基于官方 app-server 协议的一次性 Codex 子代理提供程序Subagent Claude Code@deepseek-ai/dsh-subagent-claude-code基于官方 Agent SDK 的一次性 Claude Code 子代理提供方

README

dsh-agent-mode-switcher

DeepSeek Harness plugin: switch the current conversation's agent preset (mode) after the model finishes answering, and keep chatting in the same session.

What it does

The session header already shows which mode (agent preset) a conversation runs — 标准模式 / PTC 模式 / 极简模式 or a custom preset. In a stock harness that label is read-only once the conversation started, because agentPreset.select refuses every non-blank session. This plugin:

  1. Replaces the shipped header label with a live switcher chip (the same conversation.session.header.actions cell, id agent-preset).
  2. Picking another preset calls the standard agentPreset.select RPC, which recomposes the session's agent from that preset. The conversation, its history, and its workspace stay exactly where they are — only the toolset/prompt composition changes, recorded in the session log so a resume or fork rebuilds the same mode. The select echo updates the session summary immediately (the shipped seat's own pattern), so the header chip reflects the new mode without a page refresh.
  3. The chip is disabled while the model is answering and the host refuses the swap during a running turn regardless.

Requirements

The harness does not ship the idle-session preset switch yet (no upstream release channel), so a source checkout of deepseek-harness with the bundled patch applied is required today. On a harness without the patch the host still answers agent-preset-locked for started sessions and the switcher cannot change modes.

Install

The plugin itself never needs to be built. The repository ships the prebuilt host entry and browser bundle in lib/ (committed), so installing is a clone/pull plus one CLI command — no pnpm install in this repo, no prepare scripts, no allowBuilds approvals. The only build in the whole flow is the harness's own, for the core patch in step 1.

1. Patch the harness core

From this repository, against your deepseek-harness checkout:

node scripts/apply-patch.mjs /path/to/deepseek-harness
cd /path/to/deepseek-harness
npm run build:lib:host

The patch (patches/dsh-agent-preset-mid-conversation-switch.patch) relaxes the agentPreset.select guard from "blank only" to "not running", letting an idle session that already started switch modes. It is additive only — no existing behavior changes for blank sessions.

2. Install the plugin (no build needed)

From a local clone (recommended for iterating) — installs as a link: the committed lib/ is served as-is, and git pull in the clone updates the plugin without any build:

git clone https://github.com/my-dsh-plugin/agent-mode-switcher.git
pnpm dsh plugin add --profile web /path/to/agent-mode-switcher

(dsh CLI from your harness checkout; set DSH_HOME to your harness home if it is not the default ~/.dsh.)

Straight from git — pnpm fetches the repository and uses the committed lib/; no build script runs:

pnpm dsh plugin add --profile web github:my-dsh-plugin/agent-mode-switcher

dsh plugin add adds the dependency and reconciles the dsh.profile.bundles layer list. The manual equivalent is editing the profile's package.json:

"dependencies": {
  "dsh-agent-mode-switcher": "link:/path/to/agent-mode-switcher"
}
"dsh": {
  "profile": {
    "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-agent-mode-switcher"]
  }
}

then pnpm install inside the profile directory.

3. Restart and verify

Restart the harness (npx @deepseek-ai/dsh web or however you launch it). Open any started conversation: the header's agent-preset label is now a switcher chip. After the model finishes answering, pick another mode — the chip updates immediately and the conversation continues in the same session.

  • The chip is there but selecting a mode does nothing → the core patch is not active in the running build (check the rebuild step, or that the old process was fully stopped).
  • The chip is missing entirely → the plugin is not in the running profile's bundle layer (re-run dsh plugin add, verify the bundles list).

DeepSeek Harness Desktop — one-shot install

Desktop users need neither a harness checkout nor the core patch: the desktop harness is built from the my-dsh-plugin fork, which already carries the mid-conversation preset-switch support. Run this once in a normal terminal (not inside the app's own harness shell — the app bundle and app-data dir are sandboxed/read-only from there, especially on macOS):

bash <(curl -Ls https://raw.githubusercontent.com/my-dsh-plugin/agent-mode-switcher/main/scripts/install-desktop.sh) --restart

The script is idempotent: pulls the plugin from GitHub (prebuilt lib/, nothing to build), appends "agent-mode-switcher" to the embedded harness WEB_SETTINGS_NAMESPACES allowlist if missing, installs it into the desktop web profile, registers the bundle, and restarts the app (--restart). The agent-preset switcher chip then appears in session headers. Overrides: DSH_DESKTOP_APP, DSH_DESKTOP_HOME, DSH_SKILL_SOURCE_DIR.

End users of a released desktop build need no manual steps — upgrade and restart; the plugin is seeded and the allowlist is already in the shipped harness.

Maintenance

The patch is pinned to the current api-proxy select guard, so it drifts as the harness upstream moves. When your checkout updates, regenerate and re-verify the patch before committing:

node scripts/regenerate-patch.mjs /path/to/deepseek-harness
git -C /path/to/deepseek-harness stash
git -C /path/to/deepseek-harness apply --check /path/to/agent-mode-switcher/patches/dsh-agent-preset-mid-conversation-switch.patch
git -C /path/to/deepseek-harness stash pop

The regeneration covers only this plugin's core extension (the three api-proxy files). Set DSH_PATCH_BASE=<commit> when the extension lives on a committed branch instead of the working tree.

Development

Building is only for changing the plugin itself — consumers never build. It requires the sibling deepseek-harness checkout (../deepseek-harness) because the client bundle is produced by the shared harness preset:

pnpm install
pnpm test       # vitest: controller and select-echo suites
pnpm typecheck  # tsc -b over src + tests against the harness checkout
pnpm build      # tsc declarations + tsdown host + client bundle into lib/

After a build, commit lib/ so consumers keep getting the prebuilt artifacts (a git pull is all a link-installed profile needs to pick up a change).

Trade-offs

Switching a started conversation's mode leaves any history produced under the previous composition — logged tool calls the new toolset cannot make are the caller's accepted cost. The switch is refused while a turn runs, so the running request's tool schemas never change mid-answer.

Known Limitations and Deferred Work

  • The switch is offered wherever the header renders; a session with pending interactions (an approval dialog) may still switch, and the host guard (running only) is the only enforcement.
  • Roster refresh rides the settings/document-updated event and the component's own load; a preset authored on another machine requires a session reload to appear, matching the shipped agent-preset surfaces.
  • Other open tabs see the new mode only after a refresh (same as the shipped agent-preset surfaces).

License

Apache-2.0