目录:ACP 协议API 网关与控制器附件启动与插件管理客户端运行时客户端 UI 包上下文压缩上下文注入核心运行时凭据与授权交付物文档处理实验特性宿主扩展反馈通道文件系统目标与计划工具守卫Hooks 扩展宿主服务交互命令作业调度LLM 适配LSP 集成MCP 协议规划模式Agent 预设代码执行运行时运行时诊断沙箱定时调度SDK 与协议会话核心会话检索设置Shell 执行技能溢出存储SSH 远程执行存储子代理子进程终端待办类型契约框架 vendorWeb 访问Webhook工作流工作区
依赖链 · 上游(该插件依赖的前驱):
依赖链 · 下游(依赖该插件的节点):
dsh-api-workspace-filesdsh-client-ui-plandsh-client-ui-sidebar-documentpreviewdsh-client-ui-sidebar-rightdsh-client-ui-subagent
同一拓扑层(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-client-resources |
|---|---|
| 分组 | G05 · 客户端运行时 |
| 拓扑层 | Layer 0(层次遍历:被依赖方先于依赖方) |
| 源码路径 | packages/client/resources |
| 来源层 | L2 web-app bundle(base 之上装配) |
① 实现逻辑
Host 半为空实现,资源模型全在浏览器半 (src/index.ts:1-4)。浏览器半 `apply` 构建 `ResourceRegistry` 并 provide `ctx.resources`,再经 `slots.provideRoot` 贡献 `resource` keyed hook,使任意槽组件获得 `useResource` (src/client/index.ts:30-41)。`resources.ts` 按 `dsh-resource://` 地址维护 per-address 记录,以 holders 引用计数启停 provider 流,并把流帧折叠为 live/failed 快照,记录永不销毁以保证 source() 引用稳定 (src/client/resources.ts:75-211)。
内部结构动态 DAG(深色主题:橙色=上游依赖 · 绿色=下游依赖 · 棕色=外部seam · 蓝=本插件)
本插件
上游依赖
下游依赖
外部 seam
② 注册/提供(provides)
- ctx.resources (资源提供者注册表、pin、按地址的 ObservableSnapshot)
- useResource 全局标准 hook (经 slots.provideRoot 贡献给所有槽组件)
③ 依赖(depends_on · 上游前驱)
④ 被依赖(dependents · 下游消费者)
dsh-api-workspace-files
客户端 file 资源 provider 注册
src/client/index.ts:10 import + src/client/provider.ts:24 import
dsh-client-ui-plan
注册计划资源 provider
src/client/index.ts:17 import type + src/client/index.ts:64 ctx.resources.register
dsh-client-ui-sidebar-documentpreview
借用资源模型登记/固定被预览的文件资源
src/client/document/resource-group.ts:2 import (client) + src/client/index.ts:100 ctx.resources
dsh-client-ui-sidebar-right
把 tab 资源登记/固定到资源模型
src/client/index.ts:27 import (client) + src/client/index.ts:120 ctx.resources.pin
dsh-client-ui-subagent
注册 subagentchat 资源提供者
src/client/sidebar-chat/index.tsx:6 import type + src/client/sidebar-chat/index.tsx:178 ctx.resources.register