Commit Graph

2 Commits

Author SHA1 Message Date
b18073cb97 docs(wecom-assistant): 补使用说明并重新 pin / add USAGE.md and repin (#136)
## 中文

企业微信助手的市场详情页「使用说明」区此前为空。内容仓库

[`desirecore-agent/wecom-assistant@047928a`](047928afe1)
新增 `USAGE.md`,本 PR 把条目重新 pin 过去。

### 为什么要写这两条

它们都是**装之前**该知道、且**装完也改不了**的边界,正是 `USAGE.md` 的定位(ADR-143:与 `fullDesc`
分开,不进模型上下文)。

**1. 群聊历史目前仅对 ≤10 人企业开放。** 官方错误码 `853001` 的释义原文如此。实际触发返回相邻的 `853006`:

```
errcode: 853006
errmsg:  this tool is not available for your corporation
```

措辞是 **for your
corporation**,不是「机器人未开通某品类」——所以让用户去找管理员开通品类是无效动作。本机实测复现,同一凭证下其余 12
个服务域全部正常,`chat` 是唯一被拒的域。上游 `WecomTeam/wecom-cli` #106 / #107 / #132 三个
issue 都在追这件事,截至提交时全部 OPEN、官方未回复。

**2. 同一条命令在不同规模的企业行为不同,而且不报错。** 上游维护者在 issue #64 确认:≤10
人「小团队模式」机器人以**授权用户身份**调用、继承其文档权限;>10
人「企业模式」机器人以**独立身份**调用、不继承。后果是同事分享给你的文档,小公司读得到、大公司读同一份返回
`851003`。这不是故障,但不写出来必然被当成故障反复重试。

顺带记入第三条与规模无关的边界:`wecom-cli identity whoami`
返回原文「只能写入或修改机器人创建或拥有的数据」——这是邮件署名固定为「XXX的机器人」、用户对助手所建文档反而没有管理权的根因。

### 条目改动

pointer 条目的 `USAGE.md` 由客户端从内容仓库**按 pinned ref** 抓取(`sync/market.ts` 的
`pointerUsage` ← `code-repo/file-fetcher.ts`),所以只推内容仓库不改 ref
的话客户端看不到。四处一起改,保持 ADR-137 证据链自洽:

| 字段 | 旧 | 新 |
| --- | --- | --- |
| `entry.source.ref` | `665ab1d2` | `047928a` |
| `compliance.reviewedRef` | `665ab1d2` | `047928a` |
| `compliance.reviewedAt` | 2026-09-04 | 2026-09-06 |
| `timestamps.reviewedAt.value` | 2026-09-04 | 2026-09-06 |
| `timestamps.catalogUpdatedAt.value` | 2026-09-04 | 2026-09-06 |

`releasePublishedAt` **不动**——版本仍是 1.0.0,本次只增文档。

已核对:`reviewedRef === source.ref`、`timestamps.reviewedAt ===
compliance.reviewedAt`、`availability: installable`、`license.state:
known`、compliance 五项必填齐全、ref 为 40 位 SHA、`repoUrl` 在官方前缀内。

### 证据等级

| 结论 | 来源 |
| --- | --- |
| `853006` 错误原文与触发条件 | 本机实测复现 |
| 「仅对 ≤10 人企业开放」 | 官方错误码 `853001` 释义 |
| 小团队 / 企业模式身份差异 | 上游 issue #64 维护者确认 |
| 「只能写入机器人拥有的数据」 | `identity whoami` 返回原文 |
| 群聊 7 天限制 | `chat messages list` 的 `begin_time` 字段 schema |

**未核实**:`853006` 的具体判定标准(是否严格按人数、有无灰度名单)与开通路径,官方未公开、上游 issue
未获回复。`USAGE.md` 里已如实标注。


### 追加:一并修正 docs 的 853006 归因

同一 ref 里还带了内容仓库

[`047928a`](047928afe1)
的一处事实修正。原 docs 把 `853006` 写成「机器人未开通『群聊会话』品类」,并给出
「要让它可用:为机器人开通群聊会话品类」——**这是让用户去做一件做不成的事**。

改了 6 处(`04-群聊历史` 四处、`README` / `01-快速开始` / `99-风险与确认` 各处),
只纠正群聊这一处的归因,**不动「能力按品类逐项开通」这条通则**——那条对 `850002`
依然成立。技能侧(`wecom-shared` / `wecom-workflows` / `wecomcli-message`)本就写的是
「企业级不可用」,本次是让 docs 与技能口径一致。

---

## English

The agent detail page's "Usage" section was empty for the WeCom
assistant. The content repo now carries a `USAGE.md`; this PR repins the
listing to it.

It documents two limits that a reader needs **before** installing and
cannot change afterwards:

1. **Chat history is currently limited to corporations of 10 people or
fewer.** Official error `853001` states this; the actual response is
`853006 this tool is not available for your corporation` — the wording
is *corporation*, not *bot*, so asking an admin to enable a bot
capability is a dead end. Reproduced locally; all 12 other service
domains work under the same credential. Upstream issues #106 / #107 /
#132 all remain OPEN with no official response.
2. **The same command behaves differently by corporation size, without
erroring.** Per the upstream maintainer in issue #64, bots in ≤10-person
"small team mode" call **as the authorizing user** and inherit their
document permissions; in ">10 person" enterprise mode they call **under
their own identity** and do not. A doc shared with you is readable in a
small company and returns `851003` in a large one.

A pointer listing's `USAGE.md` is fetched from the content repo **at the
pinned ref**, so `source.ref` and the ref-bound compliance evidence are
updated together to keep the ADR-137 chain self-consistent.
`releasePublishedAt` is unchanged — still 1.0.0, docs only.
2026-09-06 10:11:20 -04:00
2eebcd3d8c feat(wecom-assistant): 改为 pointer 形态并补齐获取证据 / switch to pointer form with full acquisition evidence (#115)
## 中文

把「企业微信助手」从 inline 形态改为 pointer 形态,并补齐严格证据门槛,使其成为**首个可一键安装的 Market
Agent**。

### 为什么改

此前该条目在市场详情页显示「仅收录 / 当前不能由 DesireCore 一键获取」。判定源是
`evaluateCatalogAcquisitionEligibility`:Agent 类条目**不享受** builtin Skill 的
`isTrustedBundledBuiltin` 快捷通道(该函数硬编码 `kind === 'skill'`),必须走 content
不可变 + license known + compliance 三重匹配的严格门槛。这与本仓库 README 的「Agent pointers
do not receive the built-in Skill exceptions」及 ADR-137 一致,是有意的设计而非缺陷。

inline 形态还存在自指问题:证据要求 `content` 指向不可变 commit,而 inline
内容就在本仓库里,条目无法预知自己将被合并进哪个 commit。现网 41 个 inline 条目全部没有 `content`,30 个
pointer 条目全部有——数据印证了这一点。

### 改了什么

**形态**:内容迁至 `desirecore-agent/wecom-assistant`,本仓库只保留 `entry.json` 与
sidecar。删除 53 个文件 / 16494 行,条目从 1.0M(全仓最大的 Agent 条目)降到数 KB。符合
ADR-038「market 仓库只放元数据、不放具体内容」。

**证据六项**:
| 项 | 值 |
|---|---|
| `provenance.content` | git + `665ab1d2…`(https + 40 位 SHA) |
| `governance.license` | `unknown` → `known` / MIT,`evidencePath:
LICENSE` |
| `governance.compliance` | 五项齐备,`reviewedRef` 等于 `content.ref` |
| `timestamps.reviewedAt` | 与 `compliance.reviewedAt` 逐字一致 |
| `availability` | `listing-only` → `installable` |
| `redistribution` | 与 `entry.json` 同为 `source-pointer-only` |

**内容侧**(在内容仓库中完成):13 个业务技能改为 vendor 企业微信官方
`WecomTeam/wecom-cli`(MIT,pinned `78c514b2`),自维护 `wecom-shared` /
`wecom-chat` / `wecom-workflows` 三个治理与增量技能。官方内容量为原自研版的 1.6 倍(21.6k vs
13.7k 行),并已修正官方 `meeting rooms search` 的 3
个失效参数名——`room_keyword`/`min_capacity`/`building_city` 在 CLI 1.2.0 已改名,而
CLI 对未知字段不校验、原样透传,会导致静默订错会议室。MIT 署名义务由内容仓库的 `NOTICE` 与
`third_party/wecom-cli/LICENSE` 履行。

### 校验

`validate_catalog_metadata.py` 0 error、`validate-i18n.py` 0
error、`gen-collection-children.py --check` 通过(wecom-cli 14 children)。129
个 warning 均为其他既有条目所有,本次未新增。

### 已知风险

市场 Agent 的安装链路此前**从未被真实用户走过**(现网 0 个 installable
agent,仅有单测覆盖)。合并后需真机验证安装、并重启客户端后再验一次卸载。

---

## English

Switches the WeCom Assistant entry from inline to pointer form and
supplies the full acquisition evidence, making it the **first
installable Market Agent**.

### Why

The entry previously rendered as listing-only. Agent items do **not**
receive the builtin-Skill fast path in
`evaluateCatalogAcquisitionEligibility` (`isTrustedBundledBuiltin`
hardcodes `kind === 'skill'`), so they must satisfy the strict gate:
immutable content, known license, and ref-bound compliance. That matches
this repo's README ("Agent pointers do not receive the built-in Skill
exceptions") and ADR-137 — it is deliberate, not a defect.

Inline form also has a self-reference problem: the gate requires
`content` to pin an immutable commit, but inline content lives in this
repository and cannot know which commit will carry it. All 41 inline
entries currently lack `content`; all 30 pointer entries have it.

### What changed

**Form**: content moved to `desirecore-agent/wecom-assistant`; only
`entry.json` and the sidecar remain here. 53 files / 16494 lines
removed, shrinking the entry from 1.0M (the largest Agent entry in the
repo) to a few KB, per ADR-038.

**Evidence**: `provenance.content` pins `665ab1d2…`; license becomes
known/MIT with `evidencePath`; compliance carries all five required
fields with `reviewedRef` equal to `content.ref`;
`timestamps.reviewedAt` matches `compliance.reviewedAt`; availability
becomes `installable`; redistribution aligns with `entry.json`.

**Content side**: 13 business skills are now vendored from the official
`WecomTeam/wecom-cli` (MIT, pinned `78c514b2`) — 1.6× the volume of the
previous in-house set — with three self-maintained skills for governance
and coverage gaps. Three stale meeting-room parameter names were
corrected; the CLI passes unknown fields through without validation, so
the stale names would silently book the wrong room. MIT attribution is
carried by `NOTICE` and `third_party/wecom-cli/LICENSE` in the content
repository.

### Validation

0 errors from the catalog and i18n validators; collection children check
passes. The 129 warnings all belong to pre-existing entries.

### Known risk

The Market Agent install path has never been exercised by a real user (0
installable agents in production; unit tests only). Post-merge, install
should be verified on a real client, and uninstall re-verified after a
restart.
2026-09-04 00:46:33 -04:00