mirror of
https://git.openapi.site/https://github.com/desirecore/agent-desirecore.git
synced 2026-12-05 14:29:39 +08:00
fix: 头像补全自动化入库(显式供应商绕过默认解析 + 完成判据);补经验记忆与收件箱忽略规则
- schedules/f8f451d6.json:被 .git/info/exclude 排除、此前从未入库,git add -f 显式纳入,让修复随仓库分发给用户 - memory/lessons/2026-11-08:git status 干净≠已入库 - .gitignore:/inbox/ 不入库不分发(收件箱含用户私有工作记录)
This commit is contained in:
1 parent
afe36576b6
commit
61329a48dc
3 files changed
+68
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
# 收件箱为运行时消息(含用户私有工作记录),不入库、不分发
|
||||||
|
/inbox/
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
id: mem_2026-11-08-git-status-clean-not-tracked
|
||||||
|
type: lesson
|
||||||
|
pinned: false
|
||||||
|
created_at: 2026-11-08T11:05:00+08:00
|
||||||
|
topics: [git, 分发审计, 回执核验, schedules, inbox]
|
||||||
|
---
|
||||||
|
|
||||||
|
## L0
|
||||||
|
"git status 干净"≠"文件已入库"——被 .git/info/exclude 忽略的文件不显示;断言已提交必须 git ls-files 验证。
|
||||||
|
|
||||||
|
## L1
|
||||||
|
### 事件(2026-11-07→08)
|
||||||
|
我说"调度文件已被后端自动提交进 git(git status 干净)"——**错**。
|
||||||
|
实测:`agents/desirecore/schedules/` 被 `.git/info/exclude: /schedules/` 排除,
|
||||||
|
头像自动化修复文件**从未入库**。git status 干净只是"无追踪变更+无未跟踪提示"
|
||||||
|
(被 ignore 的文件两样都不显示)。照现状推送,GitHub 仓库里根本没有修复。
|
||||||
|
|
||||||
|
### 规则
|
||||||
|
1. 断言"某文件已提交/已入库"前,必须 `git ls-files --error-unmatch <file>` 或
|
||||||
|
`git ls-files <dir>` 验证——status 干净、文件在目录里,都不证明它在库里。
|
||||||
|
2. **分发审计双查**(推送/打包/交付前逐项核):
|
||||||
|
- 要发的文件必须在 `git ls-tree` 里命中(本例 schedules 修复缺席)
|
||||||
|
- 不该发的文件必须不在(本例 inbox/ 42 个收件箱被 auto-commit 入库,含
|
||||||
|
用户 UUID 路径与项目名,公开仓库必须剔除)
|
||||||
|
3. 平台运行时目录可能被 `.git/info/exclude` 本地排除(如 /schedules/)——
|
||||||
|
需要随仓库分发的资产要 `git add -f` 显式入库,并回读 git ls-tree 验证。
|
||||||
|
4. 同族教训再加一条:回报说了≠磁盘有了;**status 干净≠已入库**。
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"display_name": "历史默认头像补全",
|
||||||
|
"description": "补全本地智能体的缺省头像;用户设置优先。生成走显式供应商绕过坏的默认解析,处理清单落盘 avatar-backfill-receipt.md。",
|
||||||
|
"enabled": true,
|
||||||
|
"status": "active",
|
||||||
|
"tags": [
|
||||||
|
"platform",
|
||||||
|
"legacy-avatar-backfill"
|
||||||
|
],
|
||||||
|
"schedule": {
|
||||||
|
"kind": "interval",
|
||||||
|
"interval": "PT24H",
|
||||||
|
"anchor": "2026-10-13T02:36:56.664Z",
|
||||||
|
"no_overlap": true,
|
||||||
|
"missed_fire_policy": "fire_once"
|
||||||
|
},
|
||||||
|
"action": {
|
||||||
|
"type": "query",
|
||||||
|
"prompt": "请完成历史默认头像补全任务(legacy-avatar-backfill)。不依赖外部候选列表,自助执行:\n\n1. 用 ManageAgent list 列出全部智能体;对每个用 ManageAgent get 查看头像状态。\n2. 候选 = 没有图片头像(avatar.image 缺失)且 generationPolicy 非 manual/disabled 的智能体。ManageAgent get 显示\"头像后台任务\"仍 pending/排队的跳过,不重复付费。\n3. 生成头像必须走显式供应商绕过默认解析(defaultServiceMap.image_gen 常指向未启用的供应商,导致\"默认图像供应商不可用\"):\n a. 用 GenerateImage(purpose=\"agent-avatar\", provider=\"desirecore-cloud\", model=\"image-01\"),按该智能体的名称与职责生成默认透明真人头像:写实人物摄影、1:1、透明背景、上半身居中,外观与职责匹配且各智能体互不相同。\n b. 视觉复核生成图:真人摄影风格、构图居中、发丝与衣物边缘无明显抠图残片;不合格可重生成一次。\n c. 复核通过后用 ManageAgent update 提交 avatarImage={source:\"dc-media://<生成图 mediaId>\"} 挂载(落盘 assets/avatar.webp)。\n d. 若 GenerateImage 显式供应商失败,退回一次 ManageAgent update avatarGeneration={onlyIfMissing:true}(走默认服务);仍失败记 failed,不再重试、不静默吞掉。\n4. 完全没有 avatar 字段的智能体,先补 config.avatar={char: 名称首字} 保证可用兜底,再按 3 生成图片。\n5. 已有图片、3D 形象、generationPolicy=manual/disabled 的头像一律保留,不得覆盖用户选择。只补头像,不修改名称、人格、模型、技能或其他字段。\n6. 本次处理清单(处理了谁、跳过及原因、失败及原因)写入运行工作目录的 avatar-backfill-receipt.md——这是完成判据文件,必须在本次执行内写完。",
|
||||||
|
"completion": {
|
||||||
|
"artifacts": [
|
||||||
|
"avatar-backfill-receipt.md"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"failureAlert": {
|
||||||
|
"enabled": false,
|
||||||
|
"after": 2,
|
||||||
|
"cooldownMs": 3600000
|
||||||
|
},
|
||||||
|
"retry": {
|
||||||
|
"maxAttempts": 0
|
||||||
|
},
|
||||||
|
"id": "f8f451d6b6c8a410e002763f1812b366",
|
||||||
|
"agent_id": "desirecore",
|
||||||
|
"created_at": "2026-10-13T02:41:26.664Z",
|
||||||
|
"updated_at": "2026-11-07T15:06:27.253Z"
|
||||||
|
}
|
||||||
Reference in new issue
Block a user