mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-21 01:18:08 +00:00
【SDK DataDir API】
- SettingsAPI 新增 DataDir() string:返回插件专属数据目录
<data>/plugin_data/<name>(内核保证存在),解决此前插件只能
靠 GetCore("daemon.data_dir") 手工解析的缺陷
- settingsImpl 新增 dataDir 字段 + SetDataDir;Registry buildSDK
注入(<data>/plugin_data/<name> 并 MkdirAll);main.go 接线
- cabi 新增 CORE_SETTINGS_DATA_DIR (id 51);plugindev dispatchSettings
模板补 DataDir() 实现
【ai_image 交付本地路径】
- 生成后下载临时 S3 URL 到插件数据目录,返回本地文件路径(永久不
过期),而非 1 小时过期的 S3 URL。带 UA 规避图床对无 UA 客户端拦截
(此前 agent 裸 curl 验证被拒导致误报失败)
- 返回 local_paths 字段 + 提示用 output_send(type=image) 展示
端到端:ai_image_generate → plugin_data/ai_image/*.png 有效 PNG(1024²),
经 llmsproxy→siliconflow 生成。
20 lines
402 B
JSON
20 lines
402 B
JSON
{
|
|
"name": "ai_image",
|
|
"name_zh": "AI绘图",
|
|
"name_en": "AI Image",
|
|
"version": "1.3.0",
|
|
"description": "AI 图像生成插件,支持 OpenAI DALL·E / Stable Diffusion",
|
|
"author": "HomeAgent",
|
|
"entry": "plugin.so",
|
|
"tags": [
|
|
"ai",
|
|
"image",
|
|
"draw",
|
|
"generate"
|
|
],
|
|
"targets": "linux/amd64",
|
|
"outdir": "dist",
|
|
"bundle": true,
|
|
"replaces": {},
|
|
"source_dirs": []
|
|
} |