xiaolulu0328/dsh-agnes-image ↗★ 1
@xiaolulu0328/dsh-agnes-image
Agnes Image 2.5 Flash image generation/editing tool with a masked local API key setting
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xiaolulu0328/dsh-agnes-imageREADME
Read the full README ↗配置 API Key
按下面的顺序解析,前一路为空才看下一路(每次工具调用重新解析,改 Key 不用重启):
- 设置界面(推荐):Plugins → Agnes 生图 → 配置 → 填入 API Key → 保存。
Key 以
role('secret')写入本机 profile 的 Cordis 配置,界面遮罩、无法读回; 插件在调用时通过settings.describe()取回真值(只在内存里用,不写日志)。 - 凭据服务:
ctx.credentials里的AGNES_API_KEY(.dsh/.credentials.yaml的refs)。 - 环境变量:
AGNES_API_KEY(需要重启进程才会进环境)。
未配置时调用工具不会抛错,而是返回一段引导,告诉用户去哪里配置。
拿不准当前用的是哪一路,可以让 AI 调 agnes_image_status,它只报告「有没有配好 / 来源 / Base URL / 超时」,不会回显 Key。
排查「配了 Key 还说没配」
agnes_image_status 会顺带打印诊断行:settings 里本插件的命名空间、该命名空间的 apiKey 状态、
以及插件实例收到的 config.apiKey 是否为空,用来区分「Key 没保存成功」和「保存了但没被读到」。