Files
market/agents/invoice-organizer/entry.json
Yige 74466d1ac9 refactor(invoice-organizer): 迁出为独立仓库,条目转真 pointer / move to standalone repo (#140)
## 背景 / 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。
2026-09-06 14:17:21 -04:00

44 lines
1.5 KiB
JSON

{
"id": "invoice-organizer",
"name": "发票整理助手",
"category": "business",
"tags": [
"invoice",
"expense",
"ledger",
"finance",
"email"
],
"i18n": {
"zh-CN": {
"name": "发票整理助手",
"shortDesc": "把邮箱里的发票收拢成一本可对账的台账:按范围收集附件、解析 PDF / OFD / 扫描件、去重归档、生成表格台账与月度报告。需先在 DesireCore 中完成一次邮箱授权;只做形式校验,不做发票真伪查验。"
},
"en-US": {
"name": "Invoice Organizer",
"shortDesc": "Turns the invoices buried in a mailbox into a reconcilable ledger: collects attachments over a stated range, extracts fields from PDF, OFD and scanned images, deduplicates, archives, and produces a spreadsheet ledger plus a monthly report. Requires a one-time mailbox authorization inside DesireCore; it performs format and arithmetic checks only, never tax-authority invoice verification."
}
},
"latestVersion": "1.0.3",
"maintainer": {
"name": "DesireCore Official",
"verified": true
},
"stewardship": "official",
"license": "MIT",
"redistribution": "source-pointer-only",
"avatar": {
"t": "票",
"bg": "linear-gradient(135deg, #34C759, #007AFF)",
"image": {
"path": "assets/avatar.webp"
}
},
"source": {
"kind": "git",
"repoUrl": "https://github.com/desirecore-agent/invoice-organizer.git",
"repoBranch": "main",
"ref": "891deee7b0ff24706e07fb8dfacc182398820d7e"
}
}