Bundle
@xiaohe-store/dsh-canvas
DeepSeek Harness 插件 - 小禾画布 AI 创作助手
- Source
- wild-River2016
- License
- MIT
- Updated
- Updated 12 hours ago
Readme
# @xiaohe-store/dsh-canvas
DeepSeek Harness 插件 - 小禾画布 AI 创作助手
让 DeepSeek Harness 能够操作小禾画布,帮助用户创作电商内容(图片、视频、工作流)。
## 功能
- 🎨 **画布操作**:创建、编辑、删除节点,管理连线和布局
- 📦 **模板库**:搜索和使用电商模板(服装、美妆、食品等 16 个分类)
- 🖼️ **AI 生成**:生成图片、视频、音频、文案
- 📚 **素材管理**:管理用户素材库
## 前提条件
1. **Node.js**:`^22.19.0` 或 `>=24.0.0`
2. **DeepSeek Harness**:`>=0.1.0-rc.6`
3. **Canvas Agent**:小禾画布需要在浏览器中打开,并运行 Canvas Agent
## 安装
### 方式一:从 npm 安装
```bash
# DSH Web 版
npx @deepseek-ai/dsh plugin --profile web add @xiaohe-store/dsh-canvas
# DSH Desktop 版
dsh plugin --profile desktop add @xiaohe-store/dsh-canvas
```
> ⚠️ **注意**:安装完成后需要**重启 DSH**(不是刷新界面),插件才会生效。
### 方式二:从本地安装
```bash
# 克隆仓库
git clone https://github.com/wild-River2016/dsh-xiaohe-canvas.git
cd dsh-xiaohe-canvas
# 安装依赖并构建
npm install
npm run build
# 安装到 dsh
npx @deepseek-ai/dsh plugin --profile web add /path/to/dsh-xiaohe-canvas
```
## 使用
### 1. 启动 DeepSeek Harness
```bash
npx @deepseek-ai/dsh web
```
插件会自动启动 Canvas Agent(通过 `npx @xiaohe-store/canvas-agent`)。
### 2. 打开小禾画布
在浏览器中打开小禾画布网页,Canvas Agent 会自动连接。
### 3. 开始对话
在 DeepSeek Harness 中输入:
```
我是淘宝店主,主要卖童装,帮我创建一个带货视频的工作流
```
## 配置
插件配置在 `~/.dsh/profiles/web/cordis.patch.yml` 中:
```yaml
- insert:
- id: xiaohe-canvas
name: '@xiaohe-store/dsh-canvas'
config:
apiUrl: 'http://127.0.0.1:17371' # Canvas Agent 地址
timeout: 30000 # 超时时间(毫秒)
autoStartAgent: true # 自动启动 Canvas Agent
```
设置 `autoStartAgent: false` 可以禁用自动启动,手动运行 Canvas Agent。
## 工具列表
插件提供 42 个工具:
### 导航
- `site_navigate` - 跳转网站页面
### 画布状态
- `canvas_list_projects` - 列出画布
- `canvas_get_state` - 读取画布状态
- `canvas_get_selection` - 读取选中节点
- `canvas_export_snapshot` - 导出快照
### 节点操作
- `canvas_apply_ops` - 批量操作
- `canvas_create_node` - 创建节点
- `canvas_create_text_node` - 创建文本节点
- `canvas_update_node` - 更新节点
- `canvas_delete_nodes` - 删除节点
- `canvas_move_nodes` - 移动节点
- `canvas_connect_nodes` - 连接节点
### 生成
- `canvas_generate_text` - 生成文本
- `canvas_generate_image` - 生成图片
- `canvas_generate_video` - 生成视频
- `canvas_generate_audio` - 生成音频
### 模板
- `templates_search` - 搜索模板
- `templates_get` - 获取模板详情
- `templates_categories` - 获取分类
- `templates_import_to_canvas` - 导入模板
### 素材
- `assets_list` - 列出素材
- `assets_add` - 添加素材
### 工作台
- `workbench_image_generate` - 生图工作台
- `workbench_video_generate` - 视频工作台
## 技能
插件包含 `xiaohe-canvas` 技能,提供:
- 引导式对话:主动询问用户需求
- 模板驱动创作:基于模板生成定制内容
- 工作流生成:自动布局、连线、添加便签说明
- 布局规范:从左到右分层,同层竖排
## 卸载
```bash
# DSH Web 版
npx @deepseek-ai/dsh plugin --profile web remove @xiaohe-store/dsh-canvas
# DSH Desktop 版
dsh plugin --profile desktop remove @xiaohe-store/dsh-canvas
```
## 开发
```bash
# 安装依赖
npm install
# 构建
npm run build
# 监听模式
npm run dev
# 本地测试
npx @deepseek-ai/dsh web --patch ./cordis.patch.yml
```
## 相关项目
- [小禾画布](https://github.com/wild-River2016/drawspace) - AI 创作画布
- [Canvas Agent](https://www.npmjs.com/package/@xiaohe-store/canvas-agent) - 画布 MCP 服务
- [DeepSeek Harness](https://github.com/deepseek-ai/dsh) - DeepSeek 官方 Agent 运行时
## 许可证
MIT
---
Updated: 2026-09-15
Install
dsh plugin --profile web add github:wild-River2016/dsh-xiaohe-canvas
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install xiaohe-store-dsh-canvas from the hub
- This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.