为 DeepSeek Harness 增加 agnes_image 宿主工具,使用 Agnes Image 2.5 Flash 生成与编辑图片。文生图接受详细提示词;图生图与多图合成通过 reference_images 接受工作区本地路径或公开 URL。可配置输出尺寸、宽高比与模型,结果保存在会话工作目录并作为附件内联展示。无运行时依赖,无构建步骤。需自备 Agnes API Key(环境变量 AGNES_API_KEY 或 ~/.dsh/.credentials.yaml)。与 zhp282515-wq/dsh-plugin-agnes-image 的工具名 agnes_image 和 loader id 相同,不能同装。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:foolfu86/dsh-agnes-image
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
A DeepSeek Harness plugin that adds one host tool, agnes_image, for image generation and image editing with Agnes Image 2.5 Flash.
It is deliberately dependency-free: it imports only Node builtins and uses the injected Cordis context (ctx.tools, ctx.credentials, ctx.attachments, ctx.workingDirectory). There is no build step and no @deepseek-ai/* peer dependency, so a git install works without any allowBuilds approval.
Install
dsh plugin --profile demo add github:foolfu86/dsh-agnes-image
dsh --profile demo --dump-config # expect a "# == dsh-agnes-image" layer
dsh --profile demo
# remove
dsh plugin --profile demo remove dsh-agnes-image
Credentials
The plugin needs an Agnes API key. It looks up the credential reference AGNES_API_KEY at runtime (first process.env, then the profile's credential store). Configure your own key, for example:
export AGNES_API_KEY=your_key_here
or add it to ~/.dsh/.credentials.yaml. No key is stored in this repository.
What the tool does
agnes_image calls the Agnes images endpoint, saves the result into the Session working directory (default agnes-images/), registers it as an attachment so the image shows inline in the conversation, and returns the durable file path.
Defaults (all overridable per call):
| Option | Default |
|---|---|
model |
agnes-image-2.5-flash (also 2.1-flash, 2.0-flash) |
size |
1K (2K, 3K, 4K) |
ratio |
1:1 (plus the common 3:4 / 4:3 / 16:9 / 9:16 / 2:3 / 3:2 / 21:9) |
baseURL |
https://apihub.agnes-ai.com/v1 |
apiKeyEnv |
AGNES_API_KEY |
outputDir |
agnes-images |
Local reference images (png / jpg / jpeg / webp / gif) can be passed for editing and multi-image composition.
Layout
package.json # declares dsh.bundle.patch
cordis.patch.yml # inserts this bundle into the profile layer stack
index.js # the agnes_image tool
License
MIT
链接
同类插件
liustack/modlens★ 4725
为纯文本模型架起视觉桥梁:粘贴图片,输出结构化 JSON 证据(OCR、版面、语义)。
ysr666/dsh-vision-router★ 1211
为纯文本 Agent 提供视觉能力:内置免 Key 视觉链 + 像素级视觉工具(看图问答、定位、裁剪、像素对比、取色、OCR、矢量化、抠图、截图);粘贴图片即可用。
Anionex/dsh-vision-toolkit★ 922
让纯文本模型处理视觉任务:粘贴图片后自动切换到 Vision Toolkit 变体,支持图片问答、多图比较、长截图 OCR、截图还原前端 UI、元素定位与像素对比。默认无需 API Key——图片经作者自建的免费服务处理,每台机器每天 100 张;也可改为指向自己的服务商。
SAOS-3624/dsh-video-storyboard★ 384
把视频(本地文件,或 B 站 / yt-dlp 链接)压成一张可寻址的宫格图:每格烧编号、对应精确时间、挂台词,底部还有同时间轴的音频包络;video_zoom 可对任意窗口高清重看——纯文本模型因此能「看」视频,而不是读别人写的摘要。
dickpy/dsh-imagegen★ 167
面向 DSH Web GUI 的 AI 生图插件:通过可配置的 OpenAI 兼容端点(gpt-image-2 / gpt-image-1 / dall-e-3)实现文生图与图生图,提供 api_url/api_key 设置卡片与侧边栏分栏生图工作台。
fandc520/dsh-comfyui★ 159
让 DeepSeek Harness 的 Agent 直接驱动本地或远程 ComfyUI:comfyui_run / comfyui_object_info / comfyui_workflow 工具生成与编辑图像、视频,附带工作流库(图工作流提取:按分量 / 主流程 / 整体)、加载区分辨率自动匹配、实时队列、SDXL 与 Wan 2.1 模板、配套 skill 与同源媒体代理。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。