XMoon/dsh-profile-settings ↗★ 0
@xmoon76/dsh-profile-settings
适用于 DSH 的多 Profile 独立设置覆盖插件
AI 分析
核心用途是支持在全局设置下,为不同的 Profile 配置独立的 settings.patch.yml 覆盖层。适合需要在不同运行环境间隔离配置的用户。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:XMoon/dsh-profile-settings说明文档
阅读完整 README ↗Configuration
The inserted row needs no config (defaults below); a profile's own
cordis.patch.yml may override the row's config:
| key | default | meaning |
|---|---|---|
profile | auto-detected | explicit active profile name |
globalPath | $DSH_HOME/settings.yaml | global settings document |
profileFile | settings.patch.yml | overlay filename inside the profile dir |
dshHome | $DSH_HOME or ~/.dsh | harness home |
watch | true | hot-reload both documents |
debounceMs | 100 | watcher write-settle window |
writable | true | allow 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).