Bald0Wang/dsh-imggenerate

DeepSeek Harness插件:image_generate工具,支持qwen-image-3.0(阿里云MaaS)和doubao-seedream(火山方舟)提供商

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH) that adds an image_generate tool to DSH agents, allowing large language models running in DSH to generate images directly on demand. It supports two different provider channels: Volcano Engine Doubao Seedream and Alibaba Cloud MaaS Qwen. The Volcano channel supports text-to-image and image-to-image generation with configurable sizes up to 4K and optional watermarking, while the Qwen channel supports text-to-image with prompt extension. It is written purely in JavaScript and requires no build step or special pnpm build permission to install.

This plugin is intended for any DSH user that wants to give their agent the ability to create custom images. There are two supported installation methods: you can install it directly to a DSH profile via the DSH CLI command dsh plugin --profile <profile-name> add github:Bald0Wang/dsh-imggenerate, or clone the repository locally and run it via the overlay patch method. After installation, you must configure an API key for whichever provider you want to use, either through a profile config patch or via system environment variables. You can verify correct installation by checking for a startup log line that says [image-gen] registered image_generate tool.

The plugin does not come with any built-in API keys, so you must register for your own key from either Volcano Engine or Alibaba Cloud MaaS before you can use it. All generated image URLs are hosted by the provider and expire after 24 hours, so you need to download your generated images immediately after creation to avoid losing access to them. Configurable options include default provider, request timeout, custom endpoints and model names, default output size for Volcano, and default watermark setting. Users can also test the tool by starting a new session and asking the model to generate an image.

这是一个专门为 DeepSeek Harness (DSH) 开发的原生插件,作用是为 DSH 中的大模型注册 image_generate 工具,让 Agent 可以直接调用大模型进行图片生成操作。插件支持两种生成通道,分别是火山方舟的豆包 Seedream 模型和阿里 MaaS 的通义千问图像模型,不同通道支持不同的生成能力,可满足用户多样的文生图、图生图需求。

适合需要让 DSH Agent 具备图片生成能力的开发者和普通用户使用。安装支持两种方式,既可以直接通过 DSH CLI 命令添加到指定用户配置文件,也可以通过 overlay 方式本地克隆仓库后挂载运行。安装完成后必须配置对应通道的 API 密钥,密钥既可以在用户配置文件中写入,也可以通过系统环境变量注入完成配置。

插件本身完全由 JavaScript 编写,无需额外的构建步骤,安装时不需要 pnpm 构建授权,只需要安装依赖后即可运行。生成的图片链接由供应商提供,有效期一般为 24 小时,用户需要及时下载保存图片,否则链接过期后无法再访问获取。插件不自带任何 API 密钥,用户需要自行申请对应通道的密钥才能使用。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile demo add dsh-image-gen

把 Bald0Wang/dsh-imggenerate 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-image-gen

dsh-plugin

DeepSeek Harness 图片生成插件:给 agent 注册一个 image_generate 工具,让 dsh 里的大模型可以直接画图。

双通道支持:

Provider 模型 能力
volcano(火山方舟,默认) doubao-seedream-5-0-pro-260628 文生图、图生图(referenceImage)、size 1K/2K/4K 或 WxH、水印开关
qwen(阿里 MaaS) qwen-image-3.0-pro 文生图、promptExtend 提示词扩写

纯 JavaScript、零构建步骤,安装时无需 pnpm 构建授权。

安装

方式一:装进 profile(推荐)

dsh plugin --profile demo add github:Bald0Wang/dsh-imggenerate
dsh --profile demo

或从本地目录 / npm / tarball 安装:

dsh plugin --profile demo add ./dsh-image-gen        # 本地目录
dsh plugin --profile demo add dsh-image-gen          # npm(如已发布)
dsh plugin --profile demo add ./dsh-image-gen-0.1.0.tgz

方式二:不安装,直接 overlay

git clone https://github.com/Bald0Wang/dsh-imggenerate.git
cd dsh-imggenerate && npm install
cp quick.example.cordis.yml quick.cordis.yml   # 填入你的 key 与绝对路径
npx @deepseek-ai/dsh web --patch "$PWD/quick.cordis.yml"

配置 API Key(必做)

插件不携带任何密钥。二选一:

A. profile 用户层(推荐) — 编辑 $DSH_HOME/profiles/<name>/cordis.patch.yml(dsh web 对应 web profile),覆盖 image-gen 行(用户层在包层之后生效,需重述整个 config):

- id: image-gen
  config:
    defaultProvider: volcano
    qwenApiKey: 'sk-ws-...'
    volcanoApiKey: 'your-ark-key'

B. 环境变量 — DASHSCOPE_API_KEY(qwen 通道)、ARK_API_KEY(volcano 通道)。显式 config 优先于环境变量。

配置项(cordis.yml 中 config 下覆盖)

键 默认值 说明
defaultProvider volcano 未指定 provider 参数时使用
timeoutMs 180000 单次请求超时
qwenEndpoint / qwenModel / qwenApiKey 见 index.js 阿里 MaaS 通道
volcanoEndpoint / volcanoModel / volcanoApiKey 见 index.js 火山方舟通道
volcanoSize / volcanoWatermark 2K / true 火山默认尺寸与水印

工具参数(模型侧)

prompt(必填)、provider(qwen/volcano)、size、referenceImage(仅火山,图生图)、watermark(仅火山)、promptExtend(仅 qwen)、seed。

返回规范输出 {provider, model, images:[{url}], size?, watermark?};工具结果以文本块携带 URL(供应商 URL 一般 24 小时过期,需及时下载)。

验证安装

启动日志应出现 [image-gen] registered image_generate tool;新开会话对模型说「用 image_generate 画一张……」。也可用 dsh --profile <name> --dump-config 查看是否包含 # == dsh-image-gen 层。

← 上一个 Prev dsh-conversation-archive 下一个 Next dsh-prompt-enhancer →