XMoon/dsh-profile-settings0

@xmoon76/dsh-profile-settings

适用于 DSH 的多 Profile 独立设置覆盖插件

AI 分析

核心用途是支持在全局设置下,为不同的 Profile 配置独立的 settings.patch.yml 覆盖层。适合需要在不同运行环境间隔离配置的用户。

包名
@xmoon76/dsh-profile-settings
版本
0.1.0
许可证
MIT
最近更新
2026年8月23日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:XMoon/dsh-profile-settings

Configuration

The inserted row needs no config (defaults below); a profile's own cordis.patch.yml may override the row's config:

keydefaultmeaning
profileauto-detectedexplicit active profile name
globalPath$DSH_HOME/settings.yamlglobal settings document
profileFilesettings.patch.ymloverlay filename inside the profile dir
dshHome$DSH_HOME or ~/.dshharness home
watchtruehot-reload both documents
debounceMs100watcher write-settle window
writabletrueallow in-process writes into the overlay

The active profile is resolved in this order (never from cwd): explicit profile config → install location (profiles//node_modules/…, the dsh plugin layout) → launcher --profile / --profile=DSH_PROFILE environment variable. If none can be determined, boot fails loud.

Configuration chain and design notes

The provider keeps the official base-class document as the profile raw section, so update/replace/mutate/revision/expectedRevision/ describe keep their exact semantics; the global layer is folded into each registration's composed base (applyMasks(merge(composition, global), masks)). Only a narrow typed facade over the base class's TS-private members is touched — no Settings machinery is forked. See docs/research.md for the full M0 findings.

Fail-loud (boot): unresolvable profile, overlay root not a map, non-object namespace section, !unset inside an array, unsupported YAML tags (!!js/*, !!python/*, custom tags), overlay path escaping the profile directory, global and overlay pointing at the same file, duplicate ctx.settings owner.

Warn + keep last good (hot reload): temporarily invalid YAML in either document, unregistered namespaces (they are preserved for later-loading plugins).