DAG总览 / 组目录 / G04 启动与插件管理

dsh-config-editor · @deepseek-ai/dsh-config-editor

Layer 3G04
目录:ACP 协议API 网关与控制器附件启动与插件管理客户端运行时客户端 UI 包上下文压缩上下文注入核心运行时凭据与授权交付物文档处理实验特性宿主扩展反馈通道文件系统目标与计划工具守卫Hooks 扩展宿主服务交互命令作业调度LLM 适配LSP 集成MCP 协议规划模式Agent 预设代码执行运行时运行时诊断沙箱定时调度SDK 与协议会话核心会话检索设置Shell 执行技能溢出存储SSH 远程执行存储子代理子进程终端待办类型契约框架 vendorWeb 访问Webhook工作流工作区
依赖链 · 上游(该插件依赖的前驱):
依赖链 · 下游(依赖该插件的节点):
同一拓扑层(Layer 3,层次遍历层序):
↑ Layer 2(11 插件)Layer 3↓ Layer 4(13 插件)

插件信息

包名@deepseek-ai/dsh-config-editor
分组G04 · 启动与插件管理
拓扑层Layer 3(层次遍历:被依赖方先于依赖方)
源码路径packages/boot/config-editor

① 实现逻辑

`ConfigEditor extends Service` 提供对当前 profile patch 文件的持久化配置编辑能力 (src/index.ts:26-31)。`entries()` 筛出由 `include` 父树拥有且 id 唯一的可寻址行 (src/index.ts:39-44),`configuration()` 用 `loadProfileDirectory`+`composeEntries` 同时给出继承层值与显式覆盖值 (src/index.ts:49-68)。`edit()` 在文件锁下校验目标行仍在册、经 `waterfall('internal/config')`+`resolveConfig` 预演新配置、用 yaml AST 精确改写对应行,写盘后调用 `reconcileProfilePatches` 触发 Loader 重载,失败则回滚文件与 patch (src/index.ts:75-142)。

内部结构动态 DAG(深色主题:橙色=上游依赖 · 绿色=下游依赖 · 棕色=外部seam · 蓝=本插件)
本插件 上游依赖 下游依赖 外部 seam

② 注册/提供(provides)

③ 依赖(depends_on · 上游前驱)

cordis-plugin-includeE1
复用 entryListSchema 与 PatchOptions 类型解析 profile patch 的 entry 列表
src/index.ts:6
cordis-plugin-loaderE1+E2
读取 loader.entries() 定位可编辑行,并在写盘后走正常 Loader 重载路径
src/index.ts:8 + src/index.ts:27 static inject 'loader'
dsh-hmrE2
配置写入与 HMR 模块/配置重载串行化,避免编辑过程与热重载竞态
src/index.ts:9 (type merge) + src/index.ts:140-141 ctx.get('hmr').runExclusive

④ 被依赖(dependents · 下游消费者)

dsh-agent-default-model
将默认模型选择持久化写入 profile
package.json:31 dependency + src/index.ts:14 import type + src/index.ts:85 ctx.get('configEditor')
dsh-settings
通过配置编辑器枚举 profile 条目并对其原始文档执行 edit/写回
src/index.ts:9 import type {}; src/index.ts:224 static inject ['configEditor']; src/index.ts:292 ctx.configEditor.documentPath