Replies: 5 comments 1 reply
|
这个问题如何解决呢?
|
|
遇到同样问题( 项目根要随仓库分发的话,在修复合入前可以把这个目录复制到用户根,或在启动脚本里同步。注意别被 判断是否命中这个 bug: English: While the runtime roots override is unfixed, place custom presets under /.agent-presets (includeUserRoot is on by default); treat --dump-config as non-authoritative since composeProfile overwrites roots after the dump step. |
|
Corroborating this from the other direction, in case it helps confirm the diagnosis: I ship a tool that writes custom presets ( Concretely, on rc.7: writing So this report matches what I see: the default user root is the one path that works, and it is the one I would tell people to use today. The detail I would underline for anyone landing here from a broken setup is your last one - If it is useful for a workaround section, the shape that does work:
If it saves anyone the YAML, the compiler that emits this shape is |
|
Independent corroboration from a different platform and a different downstream project — same root cause, same fix shape already suggested here. Setup: macOS, dsh 0.1.1-rc.2, investigating why Same source location, byte-for-byte: Confirms The Thanks to whoever filed this and to @naipi11/@taltara for the workaround — saved me from shipping a worse one. |
|
Thanks for the byte-for-byte confirmation - that is the detail that settles it. Worth spelling out exactly what the override does, because it explains why the if (rows.has("agent-presets")) composedOverlays.push({
id: "agent-presets",
config: {
...rows.get("agent-presets")?.config ?? {},
roots: [{ path: SHIPPED_PRESET_ROOT, trust: "system" }]
}
});It spreads your config and then replaces one key. Every other field you set on On @luria-hebb - your point about the user root surviving a Since three of us have now lost time to the dump disagreeing with the runtime, I It is a plain function over patch rows, so it is usable from anything that Happy to drop the rule the moment this is fixed upstream - it is scoped to this |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
[Bug Report]
agent-presets.roots用户配置被 composeProfile 强制覆盖,项目级/自定义 preset 根永远不生效摘要
dsh-agent-presets文档声称roots是可配置项(README 配置表),但apps/cli的composeProfile在组合完所有 patch 层之后,额外注入一个覆盖层,把agent-presets行的roots整体替换为只有 shipped root。结果是:用户通过 profilecordis.patch.yml或--patch配置的任何自定义 preset 根永远不会被扫描;只有includeUserRoot默认的用户根($DSH_HOME/.agent-presets)能工作。--dump-config不含该注入步骤,因此会显示"配置正确"的假象。复现步骤
D:\project\.dsh\agent-presets\my-preset\,内含agent.cordis.yml+preset.yml)npx @deepseek-ai/dsh web --patch test.patch.ymlmy-preset不出现对照:把同一 preset 复制到
$DSH_HOME/.agent-presets/my-preset/(includeUserRoot 默认行为)→ 立即可见。证明 preset 文件本身没问题,问题在 roots 注入。根因(源码定位)
apps/cli/src/profile-boot.ts(编译产物lib/profile-boot-DG5t9aNs.js)composeProfile()第 179-188 行:该覆盖层作为最后的 overlay 传给 loader(
composedOverlays),因此无论用户在哪一层配置roots,最终都会被替换为只有 shipped root。default与includeUserRoot因对象展开得以保留,只有roots被覆盖。为什么
--dump-config显示"配置正确"--dump-config输出的是 patch 层组合结果(bundle + profile + home +--patch),不包含composeProfile的运行时注入(注入发生在 dump 之后、loader 加载插件之前)。所以 dump 里能看到用户 roots,但运行时插件收到的 config 已被覆盖。建议修复
将"替换"改为"追加",让用户配置优先:
影响
dsh-agent-presetsREADME 的roots配置表)环境
npx @deepseek-ai/dsh,2026-08-14 安装)验证材料
--dump-config --patch test.patch.yml输出:roots 配置正确显示(假象)agentPresets.config):roots 只有 shippedFound by community user while building a project-level preset setup. Happy to provide more details or open a PR with the suggested fix.
All reactions