依赖清单(Dependencies)

August 15, 2026 · View on GitHub

本插件是 DeepSeek Harness (DSH) 的 bundle 插件dsh.bundle + dsh.client), 通过 dsh plugin add 安装。运行时依赖全部由宿主 DSH 提供(peer 依赖), 构建期依赖仅 typescript + tsdown。依赖分三层:

依赖是否随仓库打包提供方说明
npm peer 依赖@deepseek-ai/cordis宿主 DSH插件运行时形状(inject/apply/ctx.on/ctx.effect
npm peer 依赖@deepseek-ai/dsh-tools宿主 DSHdefineTool:工具定义 DSL(src/index.tsharness.defineTool 桥)
npm peer 依赖@deepseek-ai/dsh-client-runtime宿主 DSHClient 半运行环境(提供 slots/sessions 服务;dsh.client.inject 声明)
npm peer 依赖react(>=18)宿主 DSHClient 半 UI 渲染(浏览器模块表提供)
构建期typescripttsdowndevDependenciestsc 出 host 入口 + tsdown 出浏览器 client bundle
运行时服务见下方「Host 服务」宿主注入ctx.get('...') / inject 注入,DSH 插件协议的一部分

1. npm peer 依赖(宿主提供,不打包)

"peerDependencies": {
  "@deepseek-ai/cordis": ">=0.1.0",
  "@deepseek-ai/dsh-tools": ">=0.1.0",
  "@deepseek-ai/dsh-client-runtime": ">=0.1.0",
  "react": ">=18.0.0"
}
  • @deepseek-ai/cordis:插件框架。export const inject / export function apply(ctx)ctx.on/ctx.effect
  • @deepseek-ai/dsh-tools:Host 半工具注册。src/index.tsdefineTool 把 JSON-Schema 形态参数归一化为 DSL property map 后 ctx.tools.register
  • @deepseek-ai/dsh-client-runtime:Client 半运行环境。dsh.client.inject 声明依赖,浏览器模块表提供 slots/sessions 服务。
  • react:Client 半 UI(六列看板)。浏览器模块表外部模块,bundle 内 require('react')

2. Host 服务(宿主注入)

Host 半 inject: ['subagents', 'agents', 'tools'],另用 ctx.get() 探测:

服务用途
subagents队列 worker 派发子 agent(list/start
agents根 agent 解析 + 面板专用主 agent 创建(roots/list/create
tools8 个面板工具注册(ctx.tools.register
sessionQuery子 agent 会话 transcript 回读(readSession
fs状态持久化读写(resolve/readText/writeText
sandboxPolicyworkspaceRoot 回退 + workspace-write 写盘策略解析
systemPrompt面板状态提示词段落(section
agentPresets面板 agent 继承根 agent 装配(composeFrom
agentDefaultModel面板 agent 模型选择(currentSelection
directoryPicker目录选择器(capability/list/pick
webServerClient↔Host RPC 路由(register,路径 /plugins/dsh-task-panel/rpc

3. Client 服务(宿主注入)

Client 半 inject: ['slots', 'sessions']

服务用途
slots会话视图标签页注册(slots.inject('conversation.view', …) + slots.register
sessions「查看对话」跳转真实子代理会话(sessions.openSubagent

注意:不要声明未使用的 inject 服务(如 timer)——应用级 client 运行时没有 timer 服务,多余声明会让插件停在 PENDING。

4. 构建期(仅本地开发/发布)

  • typescripttsc -p tsconfig.json(Host 半 → lib/index.js + lib/types)、tsc -p tsconfig.client.json(Client 半 → lib/client/index.js)。
  • tsdowntsdown.config.tslib/client/index.js 打包为浏览器 bundle lib/client.jswindow.__ModuleLoader__.load({id:"dsh-task-panel", factory}),react/cordis 等平台模块保持 external)。

说明:lib/(含 lib/client.js随仓库提交,因此 dsh plugin add github:chinazkk/dsh-task-panel 的 git 安装直接可用,无需 pnpm prepare 构建权限。