mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-10-21 06:24:08 +08:00
## 背景 / Background `invoice-organizer` 是 market 里最后一个 inline 形态的第三方 Agent。它的 `provenance.content` 是指向 market 自身的 **self-pointer**(`url=market.git`, `path=agents/invoice-organizer`)——治理字段已经按 pointer 写,内容却还在 market 里。本 PR 让两者一致。 ## 改动 / Changes 内容迁到 **[desirecore-agent/invoice-organizer](https://github.com/desirecore-agent/invoice-organizer)** @ `5ac1e29`,条目收敛为 3 个文件(`entry.json` + `catalog-metadata.v1.json` + `assets/avatar.webp`)。 ## pointer 形态的三处强制改动 `agent.json` 直接过 `agentConfigSchema`(根级 `additionalProperties: false`),实测改完 `validateAgentConfig` 返回 `success: true`: - **剥离 10 个市场字段**:`category` / `tags` / `updatedAt` / `maintainer` / `installPolicy` / `updatePolicy` / `i18n` / `persona` / `changelog` / `contentSource` - **`id` 从 slug 换 UUID** - **`avatar` 从 `{t,bg,image}` 换 `{char,color}`**:原 `bg` 是 `#34C759 → #007AFF` 的绿蓝渐变,取起点绿色 ## ⚠️ 一个必须补的兜底 / A gap this migration would otherwise open 原条目只有 `USAGE.zh-CN.md` 和 `USAGE.en-US.md`,**没有无后缀版本**。 pointer 形态下这两份都抓不到: 1. `fetchAgentRepoData` 总是抓无后缀 `USAGE.md`;`USAGE.<locale>.md` 的探测列表由 `extractDeclaredLocales` 从**上游 agent.json 的 `i18n.locales`** 得出 2. 而 pointer 的 `agent.json` 不能有 `i18n`——`agentConfigSchema` 顶层无此键且根级 `additionalProperties: false` 3. `readAgentDetailFromPointer` 调 `resolveUsageDocFromFiles(repoData.usage, locale)` 时**不传 localeHints**,回退链只剩 `locale → 无后缀` 不处理的话,使用说明会在详情页**彻底消失**。因此上游新增无后缀 `USAGE.md` 兜底(内容同 `zh-CN`,`source_locale` 就是 zh-CN),两份 locale 版本作为事实源保留。 **代价如实记录**:en-US 用户会从看到英文版降级为看到中文版。根因在平台侧,建议后续补齐 `readAgentDetailFromPointer` 的 locale hints,届时两份 locale 版本自动生效,无需再动条目。 ## 准入 / Availability **维持 `installable`**,证据六项自检全部通过: ``` content.ref == entry.source.ref ✅ 5ac1e29d3 compliance.reviewedRef == content.ref ✅ timestamps.reviewedAt == compliance.reviewedAt ✅ 2026-09-06 availability ✅ installable license known + licenseEvidencePath: LICENSE ✅ provenance 不再指向 market 自身 ✅ ``` `LICENSE` 随内容迁到上游——与 `feishu-orchestrator` 一致,`licenseEvidencePath` 相对的是内容仓库而非条目目录。 ## 已安装用户影响 / Impact on existing installs `timestamps.releasePublishedAt` 是 2026-09-06(今天),实际安装量应为零。`provenance.content.url` 变更会影响已安装条目的 ownership 校验,但在这个时间窗内无实际影响。 ## 结果 / Result market 的 `agents/` 现在只剩官方 `desirecore` 一个 inline 条目,其余全部 pointer。