omdsh-dev/dsh-ernie-image
Project Overview项目介绍
A DSH plugin that integrates Baidu's ERNIE-Image-Turbo text-to-image model. The host side registers an image-generation tool that saves PNGs to $DSH_HOME/ernie-image/<date>/ and exposes them as session attachments for the agent to read. The browser side provides a credential card (keys stored in the DSH vault, never echoed back) and a gallery panel with prompt input, seven size presets, count, seed, steps, and guidance — supporting preview, download, same-seed reproduction, seed variation, and insertion into the conversation. A Baidu AI Studio access token is required; rotate any token previously committed to a predecessor skill before use.
DSH 百度 ERNIE-Image-Turbo 文生图插件:宿主端注册图像生成工具,将生成的 PNG 落盘到 $DSH_HOME/ernie-image/<日期>/ 并注册为会话附件,agent 可继续读图;浏览器端提供密钥配置卡(凭据保险箱存储)与「✨ 文生图」生成面板,支持 prompt、尺寸预设、张数、seed、步数与引导系数,可预览、下载、同 seed 复现或换 seed 出变体,并将图片作为附件直接插入会话。需提供百度 AI Studio 访问令牌;旧版 skill 曾将令牌硬编码入 git 历史,视为已泄漏,请务必轮换后再填入。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-ernie-image(omdsh-dev/dsh-ernie-image)
仓库:https://github.com/omdsh-dev/dsh-ernie-image
本站详情页:https://www.yhbd.top/plugins/omdsh-dev-dsh-ernie-image/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 BSD-3-Clause · ⭐ 2 · 最近提交 2026-08-19 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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 web add github:omdsh-dev/dsh-ernie-image
把 omdsh-dev/dsh-ernie-image 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-ernie-image
Author / Maintainer: @Zacklinkk
DSH 百度 ERNIE-Image-Turbo 文生图插件:宿主端注册图像生成工具(图片落盘 + 注册为会话附件,agent 可继续读图),浏览器端提供插件配置卡(密钥用户自填、测试连接、默认参数)与「✨ 文生图」生成画廊面板(prompt → 变体 → 预览/下载/同 seed 复现/换 seed 出变体 → 插入会话)。
定位
- 数据源:百度 AI Studio 的
ERNIE-Image-Turbo文生图模型(/llm/lmapi/v3/images/generations)。 - 宿主工具:
ernie_generate_image(prompt, {size, n, seed, usePe, steps, guidance})→ 生成 PNG 落盘到$DSH_HOME/ernie-image/<YYYY-MM-DD>/并注册为会话附件,返回附件引用 + 磁盘路径;同 seed 同参数可复现同一张图。ernie_image_test()→ 最小请求(n=1、小 prompt)探测密钥与网络;未配置密钥时返回指向设置卡的引导。
- 浏览器 UI:
- 设置 → 插件配置 → ERNIE 文生图 卡片:密钥(走 DSH 凭据保险箱,值永不回传浏览器)、测试连接、 生成默认参数(size / use_pe / steps / guidance)、面板开关。
- 右下角 ✨ 文生图 面板:prompt + 7 档尺寸预设 chips + 张数/seed/步数/引导 → 生成骨架屏 → 画廊(大图预览 / 下载 / 同 seed 重生成 / 换 seed 出变体 / 插入会话,插入会话直接把图作为消息附件发给 agent)。
密钥获取与配置
- 打开 aistudio.baidu.com 并登录百度账号;
- 右上角头像 → 访问令牌 → 新建,复制令牌;
- 在 DSH 设置 → 插件配置 → ERNIE 文生图 卡片粘贴并保存(或设置环境变量
ERNIE_IMAGE_API_KEY,环境变量优先且只读遮蔽)。
与 OCR 插件(paddle-ocr)使用的是同一个 aistudio token,可以填同一个。
⚠️ 安全提醒:请勿复用旧 token。 本插件的前身 skill(
kk_skill/skills/ernie-image/generate.py) 曾把 AI Studio 访问令牌硬编码进脚本并进入 git 历史,该 token 视为已泄漏:请到 AI Studio 令牌页轮换(删除重建),不要把旧 token 填入本插件。本插件自身不含任何密钥,凭据只写入 DSH 凭据保险箱($DSH_HOME/.credentials.yaml),不进入设置文档、日志或会话内容。
安装
# 宿主组合(profile cordis.patch.yml / bundle patch)插入一行:
- insert:
- id: ernie-image
name: dsh-ernie-image
浏览器半区通过包内 dsh.client 清单自动发现(exports["./client"]),无需额外配置。
宿主行挂载后客户端 bundle 以 /plugins/dsh-ernie-image/client.js 提供服务。
说明:配置卡的默认参数读写走插件自带的
/ernie-imageloopback RPC 通道,而不是settingsScope——DSH 的 settings 线上域按 api-proxy 允许名单暴露命名空间,自包含插件 用自己的 RPC 即可在热重载下立刻可用,无需改动部署源码。
参数速查(ERNIE-Image-Turbo)
| 参数 | 范围/取值 | 默认 |
|---|---|---|
| size | 1024x1024 / 1376x768 / 1264x848 / 1200x896 / 896x1200 / 848x1264 / 768x1376 | 1024x1024 |
| n | 1-4 | 1 |
| seed | 正整数;同 seed 同参数可复现 | 随机 |
| use_pe | prompt 增强 | 开(默认参数可改) |
| num_inference_steps | 4-20 | 8 |
| guidance_scale | 1.0-7.5 | 1.0 |
开发与构建
npm install --no-audit --no-fund # 公开 devDependencies
DSH_WORKSPACE_ROOT=/path/to/dsh-checkout npm run setup:dsh-workspace # 链接 DSH 私有 peer
npm run typecheck && npm run build # 门禁:tsc(host 半区)+ tsdown(client bundle)
lib/ 为构建产物:host 半区 tsc 输出 + client 半区 tsdown bundle(CSS 内联、平台模块 external)。
宿主行修改后需要重启 DSH 进程生效(Node ESM 模块缓存);客户端 bundle 改动重建后刷新浏览器即可。
美术素材
assets/ 内的 SVG(插件图标、设置卡配图、生成骨架屏插画、7 个尺寸比例线框)为扁平线性插画风格
(中性灰描边 + 紫罗兰强调色,透明背景,适配深/浅色主题)。原计划由 Codex 生成,因 Codex 账号
用量上限(预计 Aug 18 重置)改为手工绘制,风格规范保持一致。
License
BSD-3-Clause
nexu-io/open-design
Devin-AXIS/iPolloWork
liustack/modlens
Alisa0808/vox-director
EthanYoQ/AI-Novel-Writer
Anionex/agent-vision-toolkit
ysr666/dsh-vision-router
tong-io/tongflow