dsh-profile-switch

DSH PLUGIN会话与消息

仓库 fan56/dsh-profile-switch · npm @aiwayds/dsh-profile-switch

会话与消息 未标注验证等级 安全审查:未标注 可信度:未标注 可安装插件
安装这个插件

为 DeepSeek Harness 提供命名模型配置档:一条命令即可切换默认模型、思考等级与子代理模型覆盖,支持 TUI 与网页端交互配置。

一句话选型结论

按资料字段整理

dsh-profile-switch 是会话与消息类的 DSH 可安装插件,未做沙盒验证,暂无安全审查结论,列出 5 项功能,有可直接复制的安装命令。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类会话与消息 收录类型可安装插件 验证等级未标注验证等级 安全审查未标注
验证等级 UNKNOWN 未标注验证等级
GitHub 星标 1 复刻 0 · 未关闭 issue 0
最近更新 2026-09-29 创建于 2026-09-11
README 9.8 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add @aiwayds/dsh-profile-switch
  1. 1
    确认版本与运行环境

    仓库没有标注兼容版本与 Node.js 要求,先确认你的 DSH 版本能装,再继续。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本未标注版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名@aiwayds/dsh-profile-switch可用 npm view 查看包信息

能做什么

5 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

dsh-profile-switch:DeepSeek Harness 的模型配置档切换插件

  • 命名模型配置档一键切换
  • 默认模型与思考等级快照
  • 子代理模型覆盖随档生效
  • 按工作区树绑定,不污染全局
  • 交互式向导新建与编辑

上游标签

dshdsh-plugin

验证等级与安全审查

未标注验证等级
自动化流程结论,不是人工审核
验证等级未标注验证等级上游未给出验证结论,安装前请自行确认
安全审查未标注静态分析结论,未标注不代表已通过审查
仓库健康度未标注按仓库活跃度与最近更新时间给出
可信度未标注综合仓库活跃度与验证结果

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。
  • 列出了 5 项功能,能直接看出它解决什么问题。

先想清楚的地方

  • 安全审查还没结论,装之前先看仓库改了什么、要什么权限。
  • 没有声明 Node.js 版本要求,版本不匹配可能装不上。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在会话与消息场景里给 DSH 补能力的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-profile-switch当前 未做沙盒验证 未标注 1 未标注 有
dsh-desktop L3 · 安装规范通过 低风险 3.0 万 未标注 无
openpets L4 · 沙盒安装通过 低风险 1,274 未标注 有
deeptide L4 · 沙盒安装通过 低风险 1,104 0.1.1-rc.2 有
jingyun-dsh L3 · 安装规范通过 低风险 1,004 未标注 有
study-mate 未做沙盒验证 未标注 856 未标注 无

仓库档案

会话与消息
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方fan56仓库 dsh-profile-switch · 默认分支 main
分类会话与消息client
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言TypeScript仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue1 / 0 / 0收录时的数值,非实时
创建 / 更新2026-09-11 · 2026-09-29最后推送 2026-09-29
本站收录2026-09-17首次进入本站目录的时间

README 全文

9.8 KB
作者原文,中文版优先;只做安全转义,不改内容

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//, dsh --profile)
> 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  add @aiwayds/dsh-profile-switch

Requires dsh ≥ 0.2.0-rc.2 (the peer-dependency floor). The plugin ships
localized Plugin-Manager metadata (locale/en.json / locale/zh.json) and
an icon.svg, so it renders with a proper title, description and icon in
the host's Plugin Manager.

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

Settings-free by design: since dsh 0.1.7 a plugin's static Config is
its settings-page registration, and this plugin declares none — its data is
the wizard-edited store and tree pins below, managed through the commands,
not form fields. Nothing to carry over from a pre-0.1.7 settings.yaml.

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:

Operation What it asks
new name → default model chain → per-subagent overrides
edit pick a profile → re-answer the same chain (current values shown in the questions)
save-current name → captures the live selection (or the deployment default) → optionally snapshot every discovered agent's baseline
rename pick a profile → new name
delete pick 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

TUI web headless
Question rendering dsh-tui-pi's ask-user dock panel the web composer takeover —
Live default-model switch yes (tui-pi bridge) yes (session controller) n/a
Tree binding + store yes yes via 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 /.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
}
}
]
}
  • /.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  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;
  • /.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.

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
dsh-profile-switch 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add @aiwayds/dsh-profile-switch` 即可。对应的 npm 包名是 `@aiwayds/dsh-profile-switch`。

dsh-profile-switch 的验证等级是什么意思?

未标注验证等级。上游未给出验证结论,安装前请自行确认

dsh-profile-switch 安全吗?

未标注。

dsh-profile-switch 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-profile-switch 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

dsh-profile-switch 有哪些功能?

命名模型配置档一键切换、默认模型与思考等级快照、子代理模型覆盖随档生效、按工作区树绑定,不污染全局、交互式向导新建与编辑。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

会话与消息
按星标排序,可作替代方案

dsh-desktop

dsh-desktop

为 DeepSeek Harness (DSH) 插件生态打造的现代化桌面端解决方案。万物皆「插件」,桌面本身也是「插件」。

L3 · 安装规范通过 3.0 万 星

openpets

openpets

L4 · 沙盒安装通过 1,274 星

deeptide

deeptide

L4 · 沙盒安装通过 1,104 星

jingyun-dsh

jingyun-dsh

井云 DSH 客户端插件,为 DeepSeek Harness 注入会员登录、订阅支付、算力管控与应用市场,让智能体和技能快速变成可交易商品

L3 · 安装规范通过 1,004 星

study-mate

study-mate

StudyMate 是 DSH 的「学习模式」预设与技能包,为数学、计算机科目定制学习路线、讲解课件与练习评估,跨科目共享记忆。

未标注验证等级 856 星

fan56 的其它插件

6 个

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 —。