From 61c82782c4d4acd824b4fc70dd146131fb8c89a5 Mon Sep 17 00:00:00 2001 From: Yige Date: Fri, 4 Sep 2026 01:18:03 -0400 Subject: [PATCH] =?UTF-8?q?fix(wecom-assistant):=20sidecar=20=E6=98=BE?= =?UTF-8?q?=E5=BC=8F=E5=A3=B0=E6=98=8E=20installPolicy/updatePolicy=20/=20?= =?UTF-8?q?declare=20install=20&=20update=20policy=20in=20sidecar=20(#116)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 中文 sidecar 的 `spec` 未声明 `installPolicy` / `updatePolicy`,而 legacy 侧对双缺省派生为 `market` / `market`,导致 `compareMarketCatalogWithLegacy` 判定 `spec.agent.policy` 不一致,**整个 sidecar 被拒**(`sidecarRejected`)并回退 listing-only。 真机取证——客户端市场索引 `cache/market/index.json` 中该条目: ```json "sidecarRejected": true, "catalogDiagnostics": [ {"code": "market.catalog-legacy-mismatch", "field": "governance.availability"}, {"code": "market.catalog-legacy-mismatch", "field": "spec.agent.policy"} ] ``` 本 PR 修掉其中的 `spec.agent.policy`。另一条 `governance.availability` 是**客户端侧的结构性缺陷**,不在本仓库范围:`market-agent-entry.client.schema.json` 等 5 个 market schema 均无 `availability` 字段且 `additionalProperties: false`,因此 pointer 条目的 legacy availability 恒为 `listing-only`,sidecar 声明 `installable` 必然 mismatch。主仓库已另开 PR 修复,客户端发版后本条目即可生效;在此之前旧客户端会降级为 listing-only 展示,不影响可用性。 校验:`validate_catalog_metadata.py` 0 error。 --- ## English The sidecar's `spec` omitted `installPolicy` / `updatePolicy`, while the legacy side derives `market` / `market` from the double default. `compareMarketCatalogWithLegacy` therefore flagged `spec.agent.policy` as inconsistent and **rejected the whole sidecar**, falling back to listing-only. Verified against a live client's market index, which showed `sidecarRejected: true` with diagnostics for both `spec.agent.policy` and `governance.availability`. This PR fixes the former. The latter is a **structural gap on the client side**, outside this repository: none of the five market schemas carry an `availability` field and all set `additionalProperties: false`, so a pointer entry's legacy availability is always `listing-only` and any sidecar declaring `installable` must mismatch. A separate PR in the main repository addresses that; this entry becomes effective once the client ships it. Older clients degrade to listing-only, which does not affect usability. Validation: 0 errors from `validate_catalog_metadata.py`. --- agents/wecom-assistant/catalog-metadata.v1.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agents/wecom-assistant/catalog-metadata.v1.json b/agents/wecom-assistant/catalog-metadata.v1.json index ad52ea7..0b329e4 100644 --- a/agents/wecom-assistant/catalog-metadata.v1.json +++ b/agents/wecom-assistant/catalog-metadata.v1.json @@ -103,6 +103,8 @@ "full business coverage", "reports failures honestly" ] - } + }, + "installPolicy": "market", + "updatePolicy": "market" } }