目录: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-attachment-local |
|---|---|
| 分组 | G03 · 附件 |
| 拓扑层 | Layer 0(层次遍历:被依赖方先于依赖方) |
| 源码路径 | packages/attachment/attachment-local |
① 实现逻辑
以 `LocalAttachmentStore extends AttachmentStore` 实现本地持久化附件后端:构造时把存储根定为 `DSH_HOME/attachments/v1`,并从 Config 解析图像字节/像素/张数限额与归一化策略,建立 `CompressionLimiter` 并发闸 (src/index.ts:147-201)。图像经 `prepareImageFile` → `commitPreparedImageFile` 落盘,读取分别走 `readImageFile`、`readRequestImageFile`,并用 `SharedRequest` 对同一 variantId 做 in-flight 去重与取消传播 (src/index.ts:207-287)。文件类附件走 verbatim 流式写入/读取 (src/index.ts:232-246),底层实现分散在 store.ts/file-store.ts/request-image.ts/normalization.ts/sharp.ts。
内部结构动态 DAG(深色主题:橙色=上游依赖 · 绿色=下游依赖 · 棕色=外部seam · 蓝=本插件)
本插件
上游依赖
下游依赖
外部 seam
② 注册/提供(provides)
- 本地附件存储后端 (AttachmentStore 服务实现,内容寻址持久化到 $DSH_HOME/attachments/v1)
- 图像限额与归一化能力 (imageLimits、normalizationPolicy,供上层做请求体容量校验)
- 图像归一化与请求级变体工具 (normalizeImage、prepareImageFile、readRequestImageFile、requestImageVariantId)
③ 依赖(depends_on · 上游前驱)
无依赖(基础插件)
④ 被依赖(dependents · 下游消费者)
无下游(叶子/被消费端)