目录:ACP 协议API 网关与控制器附件启动与插件管理客户端运行时客户端 UI 包上下文压缩上下文注入核心运行时凭据与授权交付物文档处理实验特性宿主扩展反馈通道文件系统目标与计划工具守卫Hooks 扩展宿主服务交互命令作业调度LLM 适配LSP 集成MCP 协议规划模式Agent 预设代码执行运行时运行时诊断沙箱定时调度SDK 与协议会话核心会话检索设置Shell 执行技能溢出存储SSH 远程执行存储子代理子进程终端待办类型契约框架 vendorWeb 访问Webhook工作流工作区
依赖链 · 上游(该插件依赖的前驱):
依赖链 · 下游(依赖该插件的节点):
同一拓扑层(Layer 0,层次遍历层序):
cordis-plugin-loadercordis-plugin-logger-consolecordis-plugin-timerdsh-attachment-localdsh-bash-localdsh-client-resourcesdsh-client-ui-primitivesdsh-credentials-localdsh-deepseek-llm-api-extensionsdsh-experimental-api-speech-to-textdsh-experimental-ptc-runtime-pythondsh-experimental-speech-to-text-sensevoicedsh-fs-localdsh-fs-observation-policydsh-host-directory-picker-browsedsh-host-directory-picker-nativedsh-host-webserverdsh-invariantsdsh-lsp-stdiodsh-pwsh-localdsh-sandbox-localdsh-sandbox-sshdsh-shell-envdsh-spill-localdsh-storagedsh-subprocess-localdsh-typert-registrydsh-workspace-changesschemastery
Layer 0↓ Layer 1(13 插件)
插件信息
| 包名 | @deepseek-ai/dsh-workspace-changes |
|---|---|
| 分组 | G11 · 交付物 |
| 拓扑层 | Layer 0(层次遍历:被依赖方先于依赖方) |
| 源码路径 | packages/deliverables/workspace-changes |
| 来源层 | L2 web-app bundle(base 之上装配) |
① 实现逻辑
汇总每个顶层 turn 改动的文件:以 git 工作树快照(turn 起止)为主,叠加文件工具编辑的整文件捕获,非 git 环境退化为仅文件工具编辑(src/index.ts:1-10、120-129)。`apply()` 通过 `session/event`、`agent/turn-stopping`、`tools/pre-execute` 驱动每 Session 的 `TurnRecorder`(src/index.ts:143-164),并把 `workspaceChanges` 服务 provide 到 ctx,按 SessionId+seq 提供 `summary()` 与按需计算的 `diff()`(src/index.ts:114-118、src/types.ts:78-97)。变更摘要由 `workspace/changes` Session 事件宣告,摘要本体留在 Host 侧(src/types.ts:99-108)。
内部结构动态 DAG(深色主题:橙色=上游依赖 · 绿色=下游依赖 · 棕色=外部seam · 蓝=本插件)
本插件
上游依赖
下游依赖
外部 seam
② 注册/提供(provides)
- ctx.workspaceChanges (按 Session/seq 提供每 turn 变更摘要与文件前后对比)
- Session 事件 workspace/changes
③ 依赖(depends_on · 上游前驱)
dsh-agentE1
在 turn 停止时收口快照
src/index.ts:14 import type {} from '@deepseek-ai/dsh-agent' + src/index.ts:153 agent/turn-stopping
dsh-sessionE1
按 Session 生命周期观察事件与释放记录器
src/index.ts:15 import type { Session, SessionId } + src/recorder.ts:5 import + src/index.ts:143 session/event
dsh-toolsE1
在工具执行前捕获文件编辑以覆盖 git 未跟踪路径
src/index.ts:17 import type {} from '@deepseek-ai/dsh-tools' + src/index.ts:156 tools/pre-execute
④ 被依赖(dependents · 下游消费者)
dsh-client-ui-deliverables
工作区变更记录/差异类型
src/changes.ts:3 import @deepseek-ai/dsh-workspace-changes/types + src/index.ts:10