feat: DesireCore 条目添加图片头像 (#84)

## 变更 / Changes

新增 `agents/desirecore/assets/avatar.webp`(512×512,32KB),并在 `agent.json`
的 `avatar` 加 `image` 字段。条目版本 1.1.0 → 1.2.0。

## ⚠️ 这是市场仓库的新约定

市场包此前**从不携带 Agent 图片资源** —— 整个 zip 里唯一的图标是技能用的 SVG。本次起,Agent 条目可在自己的目录下放
`assets/` 图片,由客户端的 `GET /api/market/agents/:id/avatar-image` 读取(上限
2MB,magic bytes 校验,仅 PNG/JPEG/WebP)。

This is a **new convention** for the market repo: entries may now ship
an `assets/` image alongside their config.

## `t` 与 `bg` 保留

不是冗余:客户端取不到图时回落到 `t + bg` 渲染;旧客户端不认识 `avatar.image`,也走这两个字段。所以它们仍是必填。

## 与安装后的头像是两套

市场 avatar(`{t, bg, image}`)是**展示元数据**,与安装后 `agent.json` 的 avatar(`{char,
color, image}`)互不迁移 —— 这是既有语义(配色本来就不迁移),本次不改变它。

## 配套 / Companion

- 客户端市场侧支持:desirecore#1951
- 核心智能体自身的头像:agent-desirecore#6(已合并)

Co-authored-by: yi-ge <jackyoncode@gmail.com>
This commit is contained in:
2026-08-15 01:10:12 +08:00
committed by GitHub
parent e15f152ed0
commit 43239669e5
2 changed files with 12 additions and 3 deletions

View File

@@ -3,11 +3,12 @@
"name": "DesireCore", "name": "DesireCore",
"avatar": { "avatar": {
"t": "D", "t": "D",
"bg": "linear-gradient(135deg, #007AFF, #005ECB)" "bg": "linear-gradient(135deg, #007AFF, #005ECB)",
"image": { "path": "assets/avatar.webp" }
}, },
"category": "management", "category": "management",
"version": "1.1.0", "version": "1.2.0",
"updatedAt": "2026-05-03", "updatedAt": "2026-08-13",
"maintainer": { "maintainer": {
"name": "DesireCore Official", "name": "DesireCore Official",
"verified": true "verified": true
@@ -44,6 +45,14 @@
"tools": [] "tools": []
}, },
"changelog": [ "changelog": [
{
"version": "1.2.0",
"date": "2026-08-13",
"changes": {
"zh-CN": ["新增图片头像assets/avatar.webp"],
"en-US": ["Added image avatar (assets/avatar.webp)"]
}
},
{ {
"version": "1.1.0", "version": "1.1.0",
"date": "2026-05-03", "date": "2026-05-03",

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB