DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

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

@aiwayds/dsh-profile-switch

Profile Switch

dsh 插件:通过主机的 ask-user 流程交互式切换命名模型配置文件(默认模型、思考级别、每个子代理的模型),为 TUI 和 Web 界面提供统一实现,并在无头模式下快速失败

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

npx -y @deepseek-ai/dsh plugin --profile web add @aiwayds/dsh-profile-switch@0.1.2
README兼容性版本

兼容性与来源证明

Profile Switch 以 @aiwayds/dsh-profile-switch 发布,当前版本为 0.1.2。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

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

版本

0.1.2stable
2026/9/14

相关插件

正在加载相关插件…

最新版
0.1.2
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
215 kB
文件数
36
Surface
any
许可证
MIT
发布源
npm
GitHub
★ 0
周下载
0
最近提交
2026/9/14
查看源码 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题

README

dsh-profile-switch

A dsh plugin: named model profiles you can switch and configure interactively through the host's native ask-user flow — one implementation that works on the TUI and the web surface, and fails fast with guidance on headless.

A model profile is a snapshot of your whole model configuration:

  • the default model + think level (a saved /model selection), and
  • optional per-subagent model/thinking overrides.

Switching between contexts (work ↔ personal) becomes one command instead of a /model + per-agent tour.

"profile" means two different things in dsh — this plugin is the model kind. A dsh profile (~/.dsh/profiles/<name>/, dsh --profile <name>) is the boot-time plugin composition; it cannot change while the process runs. The model profiles this plugin switches live in ~/.dsh/model-profiles.json, apply at runtime, and are scoped to the workspace tree that binds them.

Install

dsh plugin --profile <your-profile> add @aiwayds/dsh-profile-switch

The plugin mounts with inject: ['commands', 'userQuestions'] — both are dsh-base services, so it coexists with any surface and any plugin stack.

Commands

/profile-switch

One question: which profile this workspace tree binds to. Answering applies the profile in layers:

  1. Live default model — when a live-selection channel exists: on the TUI through dsh-tui-pi's selection bridge, on the web through the session controller. The current conversation continues on the new model immediately. Without a channel the summary says so; the route still lands through the tree pin on the next session.
  2. Tree binding — writes .dsh-profile into the current directory (nearest file up the tree wins, .nvmrc style), so every NEW session in this tree assembles its initial selection from the profile. Other trees are untouched: a switch is workspace-scoped, never machine-global.
  3. Subagent overrides — written nowhere at apply time. Each agent's runtime model/thinking is composed at spawn from the agent file's frontmatter baseline ⊕ this pinned profile's overrides (recomputed on every dispatch, including continuations), which is what keeps a switch fully workspace-scoped.

The switch deliberately does NOT write the global agent-default-model setting — that stays /model's write, and crossing tree boundaries is exactly what a profile switch must not do.

The list also carries (unbind this tree) when the tree is bound: removes the pin (guarded — a hand-decorated pin file is never clobbered; the plugin refuses and says so).

/profile-cfg

The configuration wizard — an operation menu, then the matching flow:

OperationWhat it asks
newname → default model chain → per-subagent overrides
editpick a profile → re-answer the same chain (current values shown in the questions)
save-currentname → captures the live selection (or the deployment default) → optionally snapshot every discovered agent's baseline
renamepick a profile → new name
deletepick a profile → confirm (the last remaining profile is refused)

Every model choice is a three-step narrowing chain of separate ask-user questions — provider → that provider's models → that model's think levels — because each step's options depend on the previous answer. All three lists are read live from the installed llm adapters (listProviders / listModels / resolveModelInfo), so think levels are exactly what the adapter serves — never hardcoded (the llm-deepseek route rejects medium; only the adapter knows what a model accepts). A provider that lists nothing falls back to typing a model id; a model with no selectable efforts skips the think step.

Cancel anywhere (Esc / closing the question) aborts the wizard with nothing saved — the store is written exactly once, at the end.

Subagent overrides (with dsh-subagent-registry)

When dsh-subagent-registry is installed, the new/edit wizards add a multi-select over your discovered agents (~/.dsh/agents/*.md), then the same provider → model → think chain per selected agent — with (inherit) leading every step. Composing semantics:

  • a recorded non-empty value wins over the agent file's frontmatter;
  • an empty entry (both steps inherited) records an explicit inherit;
  • agents absent from the profile compose from the baseline.

Without the registry the overrides would have no consumer, so the per-agent section is skipped with a note and profiles simply hold the main default model — detection is a contract-member probe (composeAgentRuntime / readModelProfilesDoc / workspaceProfileName), the same convention dsh-tui-pi established.

Surfaces

TUIwebheadless
Question renderingdsh-tui-pi's ask-user dock panelthe web composer takeover—
Live default-model switchyes (tui-pi bridge)yes (session controller)n/a
Tree binding + storeyesyesvia files
No-answerer behavior——fast-fail with guidance

On a surface with no ask-user answerer (headless runs one task and exits), the commands fail fast with guidance pointing at the non-interactive path: write <workspace>/.dsh-profile and edit ~/.dsh/model-profiles.json directly. Nothing hangs.

Storage & files

  • ~/.dsh/model-profiles.json — the store ($DSH_HOME honored). Versioned (version: 1), self-healing (a corrupt/unknown file degrades to the seeded work / personal / other profiles, never throws), atomically written (tmp sibling + rename). This file is a shared contract: dsh-subagent-registry reads it (spawn-time composition) and dsh-tui-pi's session bootstrap reads it (new-session seeding from the pin). Schema:

    {
      "version": 1,
      "current": "work",            // informational, last applied anywhere
      "profiles": [
        {
          "name": "work",
          "defaultModel": { "provider": "zai-coding-cn", "model": "glm-5.3", "reasoningEffort": "high" },
          "agents": {
            "workhorse": { "model": "volc-ark-plan/deepseek-v4-flash", "thinking": "high" },
            "oldfox": {}              // empty entry = explicit inherit
          }
        }
      ]
    }
    
  • <workspace>/.dsh-profile — the tree pin: one line naming the profile; blank lines and # comments allowed. The plugin overwrites it on a switch ONLY when it parses as exactly one entry line — a hand-decorated file is refused and surfaced, never clobbered.

Relation to dsh-tui-pi

The model-profile feature moved here from dsh-tui-pi (which carried it as TUI-only panels). Pairing:

  • with a dsh-tui-pi that provides the dshTuiModelSelection bridge: /profile-switch also live-switches the current TUI session's default model;
  • with an older/newer tui-pi without the bridge: everything else works; the live leg degrades to "next session in this tree" and the summary says so;
  • the per-agent editing entry in tui-pi's /agents manager writes the same store with the same schema — both editors coexist;
  • dsh-tui-pi ≥ 2.18.1 recommended on the TUI. tui-pi 2.16.0–2.18.0 dropped these command names from its never-aborting dispatch list while moving the panels here, so a /profile-cfg session longer than 90s echoed a spurious aborted due to timeout (the panel itself kept working; 2.18.1 restored the dispatch). On web/headless surfaces no such guard exists and any plugin version pairs with anything.

No manual profile wiring is expected anywhere: dsh plugin add reconciles the bundle entry, the bundle patch mounts the plugin, and the commands register on every surface the profile boots.

Uninstall

dsh plugin --profile <your-profile> remove @aiwayds/dsh-profile-switch

The plugin owns no daemons and holds no host resources, so removal is clean on the next boot. Your data is intentionally preserved:

  • ~/.dsh/model-profiles.json — delete it if you want the store gone;
  • <workspace>/.dsh-profile pins — delete per tree (rm .dsh-profile); a pin naming a missing profile simply binds nothing.

Development

pnpm install
pnpm build && pnpm check && pnpm test   # unit suite (builds first)
node scripts/smoke-boot.mjs             # real-host boot gate (needs global dsh)
pnpm contract                           # write↔read handshake with the registry
                                        # (auto-skips where no registry resolves)

The contract check proves the deployed three-repo shape on real files: the plugin's store write (pin + per-agent overrides) composed back through the registry's composeAgentRuntime — override wins, explicit-inherit and baseline fallback hold, and the probe leg confirms registryDetected() resolves through the profile's sibling node_modules exactly as it does in a live deployment. On machines/profiles without the registry it degrades to a documented skip, so it can run anywhere.

scripts/link-dsh-closure.mjs re-points node_modules/@deepseek-ai/* at the global dsh CLI's own closure so typecheck and tests see exactly one cordis. CI runs the same steps on Node 22/24 plus the boot smoke, and a daily schedule watches for upstream rc/stable drift.

License — MIT.

相关插件

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

Usage@linxin666/dsh-usage用于 dsh Web GUI 的使用统计插件:检测各提供商的余额和编码计划配额,并提供实时令牌使用记录,同时在侧边栏条目中显示当前会话提供商今日的使用量Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Usage Stats@ychris12138/dsh-usage-statsdsh Web GUI 的令牌使用热力图、提供商余额和订阅配额Codex Connectdsh-codex-connect用于 DeepSeek Harness 的 ChatGPT OAuth 和 Codex 模型。